/* Grey Odometer — split-rail editorial (distinct layout system) */
:root {
    --od-rail: #18181b;
    --od-rail-text: #a1a1aa;
    --od-rail-active: #f4f4f5;
    --od-page: #fafafa;
    --od-sheet: #ffffff;
    --od-ink: #09090b;
    --od-body: #3f3f46;
    --od-muted: #71717a;
    --od-line: #e4e4e7;
    --od-line-strong: #18181b;
    --od-blue: #2563eb;
    --od-blue-soft: #eff6ff;
    --od-read: 42rem;
    --od-wide: 52rem;
    --font-serif: 'Newsreader', 'Palatino Linotype', Palatino, serif;
    --font-sans: 'Public Sans', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--od-body);
    background: var(--od-page);
    -webkit-font-smoothing: antialiased;
}

body.od-modal-open {
    overflow: hidden;
}

a {
    color: var(--od-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--od-ink);
}

/* —— Advert bar —— */
.od-adbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--od-ink);
    color: #d4d4d8;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    padding: 0.45rem 1rem;
    margin-top: 0;
}

.od-adbar strong {
    color: #fff;
    font-weight: 600;
}

/* —— Shell: rail + main —— */
.od-app {
    display: grid;
    min-height: 100vh;
    padding-top: 1.85rem;
}

@media (min-width: 960px) {
    .od-app {
        grid-template-columns: 260px 1fr;
    }
}

/* —— Left rail —— */
.od-rail {
    background: var(--od-rail);
    color: var(--od-rail-text);
    padding: 1.5rem 1.25rem 2rem;
    position: relative;
    z-index: 50;
}

@media (max-width: 959px) {
    .od-rail {
        position: fixed;
        top: 1.85rem;
        left: 0;
        bottom: 0;
        width: min(280px, 88vw);
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
    }

    .od-rail.is-open {
        transform: translateX(0);
    }
}

@media (min-width: 960px) {
    .od-rail {
        position: sticky;
        top: 1.85rem;
        height: calc(100vh - 1.85rem);
        overflow-y: auto;
    }
}

.od-rail-logo {
    display: block;
    line-height: 0;
    margin-bottom: 2rem;
}

.od-rail-logo img {
    height: 32px;
    width: auto;
    max-width: 200px;
}

.od-rail-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #71717a;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.od-rail-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #27272a;
}

.od-rail-nav li {
    border-bottom: 1px solid #27272a;
}

.od-rail-nav a {
    display: block;
    padding: 0.85rem 0;
    color: var(--od-rail-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.15s, padding-left 0.15s;
}

.od-rail-nav a:hover,
.od-rail-nav a.is-here {
    color: var(--od-rail-active);
    padding-left: 0.35rem;
}

.od-rail-cta {
    display: block;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--od-blue);
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.od-rail-cta:hover {
    background: #1d4ed8;
    color: #fff !important;
}

.od-rail-meta {
    margin-top: 2rem;
    font-size: 0.75rem;
    line-height: 1.55;
    color: #52525b;
}

.od-rail-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    top: 2.35rem;
    left: 0.75rem;
    z-index: 60;
    background: var(--od-rail);
    color: #fff;
    border: 1px solid #3f3f46;
    padding: 0.45rem 0.7rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

@media (min-width: 960px) {
    .od-rail-toggle {
        display: none;
    }
}

/* —— Main column —— */
.od-main {
    min-width: 0;
}

@media (max-width: 959px) {
    .od-main {
        padding-top: 2.5rem;
    }
}

/* —— Masthead —— */
.od-mast {
    border-bottom: 3px solid var(--od-line-strong);
    padding: 2.5rem 1.5rem 2rem;
    background: var(--od-sheet);
}

@media (min-width: 700px) {
    .od-mast {
        padding: 3.5rem 3rem 2.5rem;
    }
}

.od-mast-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--od-blue);
    margin-bottom: 1rem;
}

.od-mast h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--od-ink);
    margin: 0 0 1.25rem;
    max-width: 18ch;
}

.od-mast-deck {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--od-muted);
    max-width: 40ch;
    margin: 0 0 1.5rem;
}

.od-mast-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: var(--od-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--od-line);
}

.od-mast-byline span::before {
    content: '·';
    margin-right: 1.5rem;
    color: var(--od-line);
}

.od-mast-byline span:first-child::before {
    content: none;
    margin: 0;
}

/* —— Full-bleed figure —— */
.od-lead-fig {
    margin: 0;
    border-bottom: 1px solid var(--od-line);
}

.od-lead-fig img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.od-lead-cap {
    padding: 0.75rem 1.5rem;
    font-size: 0.78rem;
    color: var(--od-muted);
    background: var(--od-sheet);
    border-bottom: 1px solid var(--od-line);
}

@media (min-width: 700px) {
    .od-lead-cap {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* —— Article stream —— */
.od-stream {
    padding: 2.5rem 1.5rem 4rem;
    background: var(--od-sheet);
}

@media (min-width: 700px) {
    .od-stream {
        padding: 3rem 3rem 5rem;
    }
}

.od-stream-inner {
    max-width: var(--od-read);
}

.od-chapter {
    margin-bottom: 3.5rem;
    scroll-margin-top: 5rem;
}

.od-chapter-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--od-muted);
    margin-bottom: 0.5rem;
}

.od-chapter h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--od-ink);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--od-ink);
}

.od-chapter h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--od-ink);
    margin: 2rem 0 0.65rem;
}

.od-chapter p {
    margin: 0 0 1.1rem;
}

.od-chapter ul,
.od-chapter ol {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
}

.od-chapter li {
    margin-bottom: 0.4rem;
}

.od-quote {
    margin: 2rem 0;
    padding: 0 0 0 1.5rem;
    border-left: 4px solid var(--od-blue);
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-style: italic;
    line-height: 1.45;
    color: var(--od-ink);
}

.od-deflist {
    margin: 1.75rem 0;
    border: 1px solid var(--od-line);
}

.od-deflist dt {
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--od-ink);
    padding: 1rem 1.15rem 0.35rem;
    background: var(--od-page);
}

.od-deflist dd {
    margin: 0;
    padding: 0 1.15rem 1rem;
    font-size: 0.95rem;
    color: var(--od-body);
    border-bottom: 1px solid var(--od-line);
}

.od-deflist dd:last-child {
    border-bottom: 0;
}

.od-inline-fig {
    margin: 2rem 0;
}

.od-inline-fig img {
    display: block;
    width: 100%;
    border: 1px solid var(--od-line);
}

.od-jump {
    margin: 2.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--od-blue-soft);
    border: 1px solid #bfdbfe;
}

.od-jump p {
    margin: 0 0 0.75rem;
    font-weight: 600;
    color: var(--od-ink);
}

.od-jump a {
    font-weight: 600;
}

/* —— Quiz block (light, sharp, in-flow) —— */
.od-quiz-block {
    margin: 4rem 0;
    max-width: var(--od-wide);
    scroll-margin-top: 5rem;
}

.od-quiz-block header {
    margin-bottom: 1.5rem;
}

.od-quiz-block header h2 {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 500;
    color: var(--od-ink);
    margin: 0 0 0.5rem;
    border: 0;
    padding: 0;
}

.od-quiz-block header p {
    margin: 0;
    color: var(--od-muted);
    font-size: 0.95rem;
}

.od-quiz-frame {
    border: 2px solid var(--od-ink);
    background: var(--od-page);
    display: grid;
}

@media (min-width: 720px) {
    .od-quiz-frame {
        grid-template-columns: 140px 1fr;
    }
}

.od-quiz-side {
    padding: 1.25rem;
    background: var(--od-ink);
    color: #e4e4e7;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.od-quiz-side strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #fff;
    margin-top: 0.35rem;
    font-family: var(--font-serif);
    font-style: normal;
    text-transform: none;
}

.od-quiz-meter-wrap {
    height: 4px;
    background: #3f3f46;
    margin-top: 1.25rem;
}

.od-quiz-meter {
    height: 100%;
    width: 20%;
    background: var(--od-blue);
    transition: width 0.25s ease;
}

.od-quiz-body {
    padding: 1.5rem;
}

.od-quiz-pane {
    display: none;
}

.od-quiz-pane.is-active {
    display: block;
}

.od-quiz-q {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--od-ink);
    margin: 0 0 1rem;
    line-height: 1.35;
}

.od-quiz-opts {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--od-line);
    background: var(--od-sheet);
}

.od-quiz-opt {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.9rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--od-line);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--od-body);
    cursor: pointer;
    transition: background 0.12s;
}

.od-quiz-opt:last-child {
    border-bottom: 0;
}

.od-quiz-opt:hover {
    background: var(--od-blue-soft);
}

.od-quiz-opt.is-picked {
    background: var(--od-ink);
    color: #fff;
}

.od-quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    gap: 1rem;
}

.od-btn {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.65rem 1.1rem;
    cursor: pointer;
    border: 2px solid var(--od-ink);
    background: transparent;
    color: var(--od-ink);
}

.od-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.od-btn-fill {
    background: var(--od-ink);
    color: #fff;
}

.od-btn-fill:hover:not(:disabled) {
    background: var(--od-blue);
    border-color: var(--od-blue);
}

.od-quiz-done {
    text-align: left;
}

.od-quiz-done h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    margin: 0 0 1rem;
    color: var(--od-ink);
}

.od-quiz-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    color: var(--od-body);
}

.od-quiz-summary p {
    margin: 0 0 0.65rem;
}

.od-partner-link {
    display: inline-block;
    padding: 0.85rem 1.35rem;
    background: var(--od-blue);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.od-partner-link:hover {
    background: #1d4ed8;
    color: #fff !important;
}

.od-partner-note {
    font-size: 0.78rem;
    color: var(--od-muted);
    margin: 0;
    line-height: 1.5;
}

/* —— Bibliography sources —— */
.od-biblio {
    padding: 3rem 1.5rem 4rem;
    background: var(--od-page);
    border-top: 3px solid var(--od-ink);
    scroll-margin-top: 5rem;
}

@media (min-width: 700px) {
    .od-biblio {
        padding: 3rem 3rem 4rem;
    }
}

.od-biblio h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--od-ink);
    margin: 0 0 0.5rem;
}

.od-biblio > p {
    color: var(--od-muted);
    font-size: 0.92rem;
    margin: 0 0 1.75rem;
    max-width: 50ch;
}

.od-biblio ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: bib;
    max-width: var(--od-wide);
}

.od-biblio li {
    counter-increment: bib;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
}

.od-biblio li::before {
    content: counter(bib, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--od-blue);
}

.od-biblio a {
    font-weight: 600;
    color: var(--od-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--od-line);
}

.od-biblio a:hover {
    color: var(--od-blue);
    border-color: var(--od-blue);
}

.od-biblio .od-url {
    display: block;
    font-size: 0.78rem;
    color: var(--od-muted);
    font-weight: 400;
    margin-top: 0.2rem;
    word-break: break-all;
}

/* —— Legal strip —— */
.od-legal {
    padding: 2rem 1.5rem;
    background: #f4f4f5;
    border-top: 1px solid var(--od-line);
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--od-muted);
}

@media (min-width: 700px) {
    .od-legal {
        padding: 2rem 3rem;
    }
}

.od-legal h3 {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--od-ink);
    margin: 0 0 0.75rem;
}

.od-legal p {
    margin: 0 0 0.85rem;
    max-width: 65ch;
}

/* —— Footer —— */
.od-foot {
    padding: 1.5rem;
    background: var(--od-ink);
    color: #a1a1aa;
    font-size: 0.8rem;
}

@media (min-width: 700px) {
    .od-foot {
        padding: 1.5rem 3rem;
    }
}

.od-foot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.od-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.od-foot-linkbtn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: inherit;
    color: #d4d4d8;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.od-foot-linkbtn:hover {
    color: #fff;
}

.od-foot a {
    color: #d4d4d8;
}

/* —— Modals —— */
.od-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 640px) {
    .od-modal {
        align-items: center;
        padding: 2rem;
    }
}

.od-modal.is-open {
    display: flex;
}

.od-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.65);
}

.od-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow: auto;
    background: var(--od-sheet);
    border: 2px solid var(--od-ink);
    padding: 1.5rem;
}

.od-modal-close {
    float: right;
    width: 36px;
    height: 36px;
    border: 2px solid var(--od-ink);
    background: var(--od-sheet);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.od-modal-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
    clear: both;
}

.od-modal-meta {
    font-size: 0.78rem;
    color: var(--od-muted);
    margin: 0 0 1rem;
}

.od-modal-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--od-body);
}

.od-modal-body h3 {
    font-size: 0.88rem;
    margin: 1.25rem 0 0.4rem;
    color: var(--od-ink);
}

.od-modal-body ul {
    padding-left: 1.2rem;
}

.od-inline-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--od-blue);
    cursor: pointer;
    text-decoration: underline;
}

/* —— Cookie bar —— */
.od-cookie {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    background: var(--od-sheet);
    border-top: 2px solid var(--od-ink);
    padding: 1rem 1.25rem;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

.od-cookie[hidden] {
    display: none !important;
}

.od-cookie h2 {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    color: var(--od-ink);
}

.od-cookie p {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: var(--od-muted);
    max-width: 60ch;
}

.od-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.od-cookie-btn {
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid var(--od-ink);
    background: transparent;
    cursor: pointer;
}

.od-cookie-btn-primary {
    background: var(--od-ink);
    color: #fff;
}
