/* ==========================================================================
   morningbriefing.io — site.css (mobile-first, no framework)
   Brand: #000 / #f4f4f6 / Akzent #CE1141 · Lora (Headlines) + Inter (Text)
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lora";
    src: url("/fonts/lora-latin.woff2") format("woff2");
    font-weight: 500 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #000;
    --surface: #0c0c0e;
    --surface-2: #141417;
    --border: #1f1f24;
    --border-strong: #2c2c33;
    --text: #f4f4f6;
    --text-2: #b4b4bc;
    --text-3: #7a7a84;
    --accent: #ce1141;
    --accent-hover: #e0164d;
    --accent-soft: rgb(206 17 65 / 0.14);
    --radius: 14px;
    --radius-sm: 10px;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-serif: "Lora", Georgia, "Times New Roman", serif;
    --gutter: 20px;
    --tap: 44px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 16px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
}

a:hover {
    color: #fff;
    text-decoration-color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
    text-wrap: balance;
}

p {
    margin: 0;
    text-wrap: pretty;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

.wrap {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- Header ---------- */

.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
}

.logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding-inline: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
    border-color: var(--text-3);
    color: #fff;
}

.btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn--block {
    width: 100%;
}

/* ---------- Hero ---------- */

.hero {
    padding-block: 28px 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}

.eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
    font-size: clamp(28px, 7.4vw, 46px);
    margin-bottom: 12px;
}

.hero h1 em {
    font-style: normal;
    color: var(--text-2);
}

.hero__lead {
    color: var(--text-2);
    font-size: 15.5px;
    max-width: 60ch;
}

/* ---------- Player ---------- */

.player {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.player__head {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
}

.player__cover {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.player__meta {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 4px;
}

.player__meta strong {
    color: var(--accent);
    font-weight: 700;
}

.player__title {
    font-size: 18px;
    line-height: 1.3;
}

.player__progress {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--text-3);
}

.range {
    --p: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: var(--tap);
    margin: 0;
    background: transparent;
    cursor: pointer;
}

.range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent) var(--p), var(--border-strong) var(--p));
}

.range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--border-strong);
}

.range::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: var(--accent);
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -5px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}

.range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}

.player__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 6px;
}

.ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap);
    height: var(--tap);
    padding-inline: 10px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.ctrl:hover {
    border-color: var(--text-3);
}

.ctrl--play {
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    background: var(--accent);
    color: #fff;
}

.ctrl--play:hover {
    background: var(--accent-hover);
}

.ctrl--play svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.ctrl--play .icon-pause,
.is-playing .ctrl--play .icon-play {
    display: none;
}

.is-playing .ctrl--play .icon-pause {
    display: block;
}

.player__summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 15px;
    color: var(--text-2);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: 12px;
    color: var(--text-2);
}

/* ---------- Subscribe ---------- */

.subscribe {
    margin-top: 14px;
}

.subscribe__label {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.subscribe__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subscribe__list .btn {
    flex: 1 1 auto;
}

.copy-status {
    min-height: 1.4em;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-3);
}

/* ---------- Sections ---------- */

.section {
    padding-block: 28px;
}

.section + .section {
    border-top: 1px solid var(--border);
}

.section__title {
    font-size: 22px;
    margin-bottom: 6px;
}

.section__lead {
    color: var(--text-2);
    font-size: 15px;
    margin-bottom: 16px;
}

/* Weekday strip: horizontal scroll on mobile, grid on wide screens */
.days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.day {
    flex: 0 0 auto;
    min-width: 128px;
    scroll-snap-align: start;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}

.day__name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}

.day__topic {
    display: block;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.day[aria-current="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.day[aria-current="true"] .day__name {
    color: var(--accent);
}

/* Chapters */
.chapters {
    counter-reset: chap;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.chapter {
    counter-increment: chap;
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 2px 10px;
    padding: 14px 16px;
}

.chapter + .chapter {
    border-top: 1px solid var(--border);
}

.chapter::before {
    content: counter(chap, decimal-leading-zero);
    grid-row: span 2;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    padding-top: 2px;
}

.chapter__title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

.chapter__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 13px;
    color: var(--text-3);
}

.chapter__meta a {
    color: var(--text-2);
}

/* Transcript */
.transcript {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.transcript summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--tap);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
}

.transcript summary::-webkit-details-marker {
    display: none;
}

.transcript summary::after {
    content: "+";
    font-size: 20px;
    line-height: 1;
    color: var(--text-3);
}

.transcript[open] summary::after {
    content: "–";
}

.transcript__body {
    padding: 0 16px 16px;
    color: var(--text-2);
    font-size: 15px;
    white-space: pre-line;
}

/* Archive */
.archive {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.archive li + li {
    border-top: 1px solid var(--border);
}

.archive a {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
}

.archive a:hover {
    background: var(--surface-2);
}

.archive__meta {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}

.archive__title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    margin-top: 2px;
}

.archive a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent);
}

.archive a[aria-current="page"] .archive__meta {
    color: var(--accent);
}

/* B2B cards */
.cards {
    display: grid;
    gap: 14px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.card__kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.card h3 {
    font-size: 20px;
}

.card p {
    color: var(--text-2);
    font-size: 15px;
}

.card ul {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--text-2);
}

.card li {
    position: relative;
    padding-left: 18px;
}

.card li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.card__actions .btn {
    flex: 1 1 auto;
}

/* Contact form */
.form {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.form fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.form legend {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

.choice {
    position: relative;
    flex: 1 1 140px;
}

.choice input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.choice input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.choice input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
}

.field label small {
    font-weight: 400;
    color: var(--text-3);
}

.input {
    width: 100%;
    min-height: var(--tap);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg);
    font-size: 16px; /* prevents iOS zoom */
}

.input:focus {
    outline: none;
    border-color: var(--accent);
}

.input:user-invalid {
    border-color: #f87171;
}

textarea.input {
    min-height: 96px;
    resize: vertical;
}

.form__note {
    font-size: 13px;
    color: var(--text-3);
}

.form__note a {
    color: var(--text-2);
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.alert--ok {
    border: 1px solid #1f6f4a;
    background: rgb(16 185 129 / 0.1);
}

.alert--error {
    border: 1px solid #8b1d2c;
    background: rgb(239 68 68 / 0.1);
}

.empty {
    padding: 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-2);
}

/* ---------- Mini player (mobile, while playing) ---------- */

.mini {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgb(12 12 14 / 0.96);
    border-top: 1px solid var(--border-strong);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
}

.mini.is-visible {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease;
}

.mini__title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini__time {
    font-size: 12px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.mini .ctrl--play {
    width: var(--tap);
    height: var(--tap);
    flex: none;
}

.mini .ctrl--play svg {
    width: 18px;
    height: 18px;
}

/* ---------- Legal pages ---------- */

.legal {
    padding-block: 32px 48px;
}

.legal h1 {
    font-size: clamp(28px, 7vw, 40px);
    margin-bottom: 8px;
}

.legal h2 {
    font-size: 20px;
    margin: 32px 0 10px;
}

.legal h3 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 6px;
}

.legal p,
.legal li {
    color: var(--text-2);
    font-size: 15.5px;
}

.legal p + p {
    margin-top: 10px;
}

.legal ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 8px;
}

.legal li + li {
    margin-top: 4px;
}

.legal address {
    font-style: normal;
    color: var(--text-2);
}

.legal .updated {
    color: var(--text-3);
    font-size: 14px;
}

.legal .legal__actions {
    margin-top: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-block: 28px calc(28px + env(safe-area-inset-bottom));
    font-size: 13px;
    color: var(--text-3);
}

.site-footer__inner {
    display: grid;
    gap: 8px;
}

.site-footer a {
    color: var(--text-2);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 6px;
}

.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
    :root {
        --gutter: 28px;
    }

    .hero {
        padding-block: 48px 28px;
    }

    .player {
        padding: 22px;
    }

    .player__head {
        grid-template-columns: 112px 1fr;
        gap: 20px;
    }

    .player__cover {
        width: 112px;
        height: 112px;
    }

    .player__title {
        font-size: 22px;
    }

    .subscribe__list .btn {
        flex: 0 0 auto;
    }

    .days {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        overflow: visible;
        margin-inline: 0;
        padding: 0;
    }

    .day {
        min-width: 0;
    }

    .day__topic {
        white-space: normal;
        font-size: 13px;
        line-height: 1.35;
    }

    .chapter {
        grid-template-columns: 32px 1fr;
    }

    .section {
        padding-block: 40px;
    }

    .section__title {
        font-size: 26px;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__inner {
        grid-template-columns: 1fr auto;
        align-items: start;
    }

    .site-footer__links {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin-top: 0;
    }
}

@media (min-width: 900px) {
    .wrap {
        max-width: 820px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
