/* site.css: Doctor Key West. The single stylesheet. Component sections in the
   declared order: tokens, base, header and ticker, footer, headline stack, column
   cards, prose measure, worry-box, reviewer block, kwco-cta, pull quote, ask teaser
   and form, season strip, index lists, press items, legal prose, 404, print,
   reduced motion. No other colors, no shadows, no gradients; radius 8px only on
   buttons, inputs, and the worry-box. */

/* 1. Tokens. Documented contrast on paper: ink about 12:1; ink-soft about 5.8:1
   (AA at 13.5px and up); olive about 5.8:1; worry about 6:1. */
:root {
    --paper: #F8F2E3;
    --paper-deep: #EFE5CE;
    --wash: #DCE9CC;
    --ink: #2A2416;
    --ink-soft: #6A5D45;
    --olive: #42691C;
    --olive-deep: #2F4E10;
    --worry: #A8321E;
    --rule-ink: #2A2416;
    --rule-dot: #C6B896;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 40px;
    --space-5: 64px;
    --space-6: 96px;
    --space-0: 4px;
    --space-1h: 12px;
    --font-display: Besley, serif;
    --font-body: Gelasio, serif;
    --font-ui: 'Schibsted Grotesk', sans-serif;
    --fs-micro: 0.84375rem;
    --fs-small: 0.875rem;
    --fs-footer: 0.9375rem;
    --fs-nav: 0.96875rem;
    --fs-base: 1rem;
    --fs-card-dek: 1.0625rem;
    --fs-body: 1.125rem;
    --fs-dek: 1.25rem;
    --fs-h3: 1.3125rem;
    --fs-wordmark: 1.375rem;
    --fs-h2: 1.625rem;
    --fs-h1: clamp(2.125rem, 5vw, 3.375rem);
    --fs-lede: clamp(2.375rem, 6vw, 3.625rem);
    --lh-body: 1.7;
    --container: 1040px;
    --measure: 720px;
    --tap: 44px;
}

/* 2. Base. Floors: html 16px, body 18px at 1.7, nothing below 13.5px. */
html {
    font-size: 100%;
}

/* The HTML hidden attribute must win over component display rules. Without this,
   the ticker-static and ticker-strip flex rules override [hidden] and the static
   dateline stays visible behind the live strip on / and /this-week/. */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--ink);
    background: var(--paper);
}

p {
    margin: 0 0 var(--space-2);
}

a {
    color: var(--olive);
    text-decoration: underline;
}

a:visited {
    color: var(--olive); /* single-hue accent: no purple visited state */
}

a:hover,
a:focus,
a:active {
    color: var(--olive-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 2px;
}

ul, ol {
    margin: 0 0 var(--space-2);
    padding-left: var(--space-3);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

.measure {
    max-width: var(--measure);
}

main {
    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
}

main > h1,
main > h2,
main > p,
main > ul,
main > ol,
main > section,
main > article,
main > aside,
main > nav,
main > figure,
main > form,
main > details {
    max-width: var(--measure);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

.scotch-rule {
    border-top: 3px solid var(--rule-ink);
    position: relative;
    padding-top: 9px;
}

.scotch-rule::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    border-top: 1px solid var(--rule-ink);
}

.hairline {
    border-top: 1px dotted var(--rule-dot);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    background: var(--paper-deep);
    color: var(--ink);
    padding: var(--space-1) var(--space-2);
}

.skip-link:focus {
    left: var(--space-1);
    z-index: 10;
}

.eyebrow {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: var(--fs-micro);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.byline,
.dateline,
.breadcrumbs {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
    color: var(--ink-soft);
}

.breadcrumbs a {
    display: inline-block;
    padding: var(--space-0) 0;
    color: var(--ink-soft);
}

.breadcrumbs a:hover,
.breadcrumbs a:active {
    color: var(--olive-deep);
}

@media (max-width: 760px) {
    main {
        padding-top: var(--space-4);
        padding-bottom: var(--space-4);
    }
}

/* 3. Header and ticker. Deck one 72px on paper; deck two 44px on paper-deep (the
   dateline link is a 44px tap target), bounded below by the Scotch rule. Not sticky.
   No CTA button. */
.site-header {
    background: var(--paper);
}

.identity-deck {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
}

.identity {
    display: flex;
    align-items: center;
    gap: var(--space-1h);
    text-decoration: none;
}

.conch-mark {
    display: inline-flex;
    width: 28px;
    height: 28px;
    color: var(--olive);
}

.conch-mark svg {
    width: 100%;
    height: 100%;
}

.identity-text {
    display: flex;
    flex-direction: column;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--fs-wordmark);
    line-height: 1.2;
    color: var(--ink);
    margin: 0;
}

.identity:hover .wordmark,
.identity:focus .wordmark {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--olive);
    text-underline-offset: 4px;
}

.sub-line {
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: var(--fs-micro);
    color: var(--ink-soft);
    margin: 0;
}

.site-nav {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.site-nav a,
.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-nav);
    color: var(--ink);
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a:active,
.footer-nav a:hover,
.footer-nav a:focus,
.footer-nav a:active {
    color: var(--olive-deep);
    text-decoration: underline;
}

.site-nav a {
    min-width: var(--tap); /* the short labels (Press) were 41px wide */
    justify-content: center;
}

.site-nav a.active {
    text-decoration: underline;
    text-decoration-color: var(--olive);
    text-underline-offset: 4px;
    color: var(--ink);
}

.nav-toggle {
    display: none;
    min-height: var(--tap);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-nav);
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink-soft); /* the dotted-rule tan read 1.8:1 on paper; ink-soft reads 5.8:1 */
    border-radius: 8px;
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus,
.nav-toggle:active,
.nav-toggle[aria-expanded="true"] {
    color: var(--ink);
    background: var(--paper-deep);
    border-color: var(--ink);
}

.ticker-deck {
    background: var(--paper-deep);
    border-bottom: 3px solid var(--rule-ink);
    position: relative;
    margin-bottom: 6px;
}

.ticker-deck::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    border-top: 1px solid var(--rule-ink);
}

.ticker-band {
    min-height: var(--tap);
    display: flex;
    align-items: center;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
    font-variant-numeric: tabular-nums;
}

.ticker-static {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--space-2);
}

.dateline-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
}

.strip-credit {
    font-family: var(--font-ui);
    font-size: var(--fs-micro);
    color: var(--ink-soft);
    margin: var(--space-1) auto 0;
}

.strip-credit a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
}

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        display: none;
    }

    .site-nav.open {
        display: flex;
        flex-direction: column;
        gap: var(--space-0);
        width: 100%;
        background: var(--paper);
        padding: var(--space-1) 0 var(--space-2);
    }

    .site-nav.open a {
        font-size: var(--fs-body);
        justify-content: flex-start;
    }

    .ticker-band {
        padding-top: var(--space-1);
        padding-bottom: var(--space-1);
    }

    .ticker-static {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .ticker-strip {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1) var(--space-2);
    }
}

/* 4. Footer. Paper-deep band opened by the Scotch rule. */
.site-footer {
    font-family: var(--font-body);
    font-size: var(--fs-footer);
    background: var(--paper-deep);
    padding: var(--space-4) 0;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-colophon .wordmark {
    font-size: var(--fs-body);
}

.footer-colophon .conch-mark {
    color: var(--olive-deep);
}

.footer-disclaimer {
    color: var(--ink);
    max-width: var(--measure);
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--olive);
    text-decoration: underline;
}

/* 5. Headline stack. */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0 0 var(--space-3);
}

h1 {
    font-weight: 800;
    font-size: var(--fs-h1);
    line-height: 1.15;
    text-wrap: balance;
}

.lede-headline {
    font-weight: 800;
    font-size: var(--fs-lede);
    line-height: 1.15;
    text-wrap: balance;
}

.lede-headline a {
    text-decoration: none;
}

.lede-headline a:hover,
.lede-headline a:focus,
.lede-headline a:active {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

h2 {
    font-weight: 700;
    font-size: var(--fs-h2);
    line-height: 1.25;
    margin-top: var(--space-4);
    text-wrap: pretty;
}

h3 {
    font-weight: 600;
    font-size: var(--fs-h3);
    line-height: 1.3;
    margin-top: var(--space-3);
    text-wrap: pretty;
}

.dek {
    font-family: var(--font-body);
    font-style: italic;
    font-size: var(--fs-dek);
    line-height: 1.55;
    color: var(--ink-soft);
    text-wrap: pretty;
}

/* 6. Column cards. Unboxed: no borders, no backgrounds; dotted rules and
   whitespace do the separating. */
.column-card {
    padding: var(--space-3) 0;
}

.card-date {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
    color: var(--ink-soft);
    margin: 0;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h3);
    line-height: 1.3;
    margin: 0;
}

.card-title a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: var(--space-0) 0;
    color: var(--ink);
    text-decoration: none;
}

.card-title a:hover,
.card-title a:focus,
.card-title a:active {
    color: var(--olive-deep);
    text-decoration: underline;
}

.card-dek {
    font-family: var(--font-body);
    font-style: italic;
    font-size: var(--fs-card-dek);
    color: var(--ink-soft);
    margin: 0;
}

/* 7. Prose measure. 720px, about 65 to 75 characters at 18px. */
.prose,
article.column-body {
    max-width: var(--measure);
}

.prose p,
.prose ul,
.prose ol {
    max-width: var(--measure);
}

/* 8. Worry-box. Its own recognizable object. */
.worry-box {
    border: 2px solid var(--worry);
    border-radius: 8px;
    background: var(--paper);
    padding: var(--space-3);
    margin: var(--space-4) auto;
}

.worry-caption {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: var(--fs-micro);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--worry);
    margin: 0 0 var(--space-2);
}

.worry-box .worry-list,
.worry-box .worry-closing {
    font-family: var(--font-body);
    font-size: var(--fs-body);
}

.worry-box .worry-closing {
    margin-bottom: 0;
}

.worry-line strong {
    color: var(--worry);
}

/* 9. Reviewer block. */
.reviewer-block {
    border-top: 1px dotted var(--rule-dot);
    padding-top: var(--space-2);
    margin: var(--space-4) auto;
    font-size: var(--fs-base);
    color: var(--ink-soft);
}

.reviewer-block p {
    margin: 0;
}

/* 10. kwco-cta. Compact, manicule prefixed, the only kwco variant. */
.kwco-cta {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    background: var(--wash);
    padding: var(--space-3);
    margin: var(--space-4) auto;
}

.kwco-cta .manicule {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--olive-deep);
    margin-top: var(--space-0);
}

.kwco-cta .manicule svg {
    width: 100%;
    height: 100%;
}

.kwco-cta p {
    margin: 0;
}

/* 11. Pull quote. Fleuron above, no rules. */
.pull-quote {
    margin: var(--space-4) auto;
    text-align: center;
}

.pull-quote .fleuron {
    display: inline-flex;
    width: 24px;
    height: 24px;
    color: var(--olive);
    margin-bottom: var(--space-1);
}

.pull-quote .fleuron svg {
    width: 100%;
    height: 100%;
}

.pull-quote blockquote {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: var(--fs-wordmark);
    line-height: 1.5;
    margin: 0;
}

/* 12. Ask teaser and form. */
.ask-teaser {
    background: var(--wash);
    padding: var(--space-3);
    margin: var(--space-4) auto;
}

.teaser-question {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-h3);
    margin: 0 0 var(--space-1);
}

.teaser-answer {
    font-family: var(--font-body);
    margin: 0 0 var(--space-0);
}

.teaser-link {
    margin: 0 0 calc(var(--space-1h) * -1);
}

.teaser-link a {
    display: inline-block;
    padding: var(--space-1h) 0;
}

.ask-form {
    margin: var(--space-3) auto;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-0);
    margin: 0 0 var(--space-3);
}

.form-field label {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
    color: var(--ink-soft);
}

input,
select,
textarea {
    min-height: var(--tap);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-base);
    color: var(--ink);
    background: var(--paper-deep);
    border: 1px solid var(--ink-soft); /* the dotted-rule tan read 1.6:1 on paper-deep; ink-soft reads 5.1:1 */
    border-radius: 8px;
    padding: var(--space-1) var(--space-1h);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--ink);
}

::placeholder {
    color: var(--ink-soft);
    opacity: 1;
}

button {
    min-height: var(--tap);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-base);
    color: var(--paper);
    background: var(--olive);
    border: 1px solid var(--olive-deep);
    border-radius: 8px;
    padding: var(--space-1h) var(--space-3);
    cursor: pointer;
}

button:hover,
button:focus,
button:active {
    background: var(--olive-deep);
}

.form-rule {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--ink-soft);
    max-width: var(--measure);
}

.form-error {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
    color: var(--worry);
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
}

/* 12b. Details and summary: the column FAQ and the mailbag entries. Besley question,
   44px summary box, olive-deep hover. */
details {
    padding: var(--space-1) 0;
}

summary {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-body);
    line-height: 1.4;
    color: var(--ink);
    cursor: pointer;
    padding: var(--space-1h) 0;
}

summary:hover,
summary:active {
    color: var(--olive-deep);
    text-decoration: underline;
}

details[open] summary {
    margin-bottom: var(--space-1);
}

details > p:last-child {
    margin-bottom: var(--space-1);
}

/* 13. Season strip. Schibsted labels 14px, values 700, tabular figures; the band's
   type rules live in section 3 with the band itself. */
.ticker-strip {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    width: 100%;
}

.strip-item .label {
    color: var(--ink-soft);
}

.strip-item .value {
    font-weight: 700;
    color: var(--ink);
}

.strip-dot {
    color: var(--ink-soft);
}

.alert-chip {
    color: var(--worry);
    border: 1px solid var(--worry);
    padding: 1px var(--space-1);
    font-weight: 700;
}

.strip-line {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    font-size: var(--fs-base);
    color: var(--ink);
}

/* 14. Index lists. Dotted hairlines between rows. */
.index-list {
    margin: var(--space-3) auto;
    padding: 0;
    list-style: none;
}

.index-list > li {
    border-top: 1px dotted var(--rule-dot);
    padding: var(--space-1) 0;
}

.index-list a {
    display: inline-block;
    padding: var(--space-1) 0; /* 47px tap box; the row keeps its 63px rhythm */
}

/* 15. Press items. */
.press-item {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding: var(--space-2) 0;
    font-size: var(--fs-base);
}

.press-date {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: var(--fs-small);
    color: var(--ink-soft);
}

.press-outlet {
    font-family: var(--font-display);
    font-weight: 600;
}

/* 16. Legal prose. */
.legal-prose p,
.legal-prose ul {
    max-width: var(--measure);
}

.legal-prose h2 {
    font-size: var(--fs-h3);
}

/* 17. 404. */
.page-404 p {
    max-width: var(--measure);
}

/* 18. Print. Columns print cleanly; chrome hidden. */
@media print {
    .site-header,
    .site-footer,
    .skip-link,
    .nav-toggle,
    .ticker-deck,
    .strip-credit {
        display: none;
    }

    body {
        background: var(--paper);
    }

    main {
        padding: 0;
    }
}

/* 19. Reduced motion. The strip never animates; this covers everything else. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none;
        transition: none;
        scroll-behavior: auto;
    }
}
