:root {
    --fdd-blue: #00558c;
    --fdd-blue-light: #78aac8;
    --fdd-red: #d1202a;
    --fdd-dark: #414042;
    --fdd-text: #636466;
    --fdd-gray: #c9cacc;
    --fdd-yellow: #e7ac51;
    --paper: #f4f1ea;
    --paper-2: #ece7dc;
    --rule: rgba(65, 64, 66, 0.18);
    --rule-soft: rgba(65, 64, 66, 0.08);
    --ink: #2a2a2a;
    --sans: "urw-din", "Helvetica Neue", Arial, sans-serif;
    --sans-cond: "urw-din-condensed", "urw-din", Arial, sans-serif;
    --body: "lato", Georgia, serif;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-top: 75px;
}

/* ───── Site Navbar ───── */
.fdd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 75px;
    background: #141414;
}
.fdd-header-inner {
    height: 75px;
    display: flex;
    align-items: center;
    padding: 4px 30px;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}
.fdd-logo {
    display: inline-flex;
    align-items: center;
    max-width: 210px;
}
.fdd-logo img {
    height: 56px;
    width: auto;
    display: block;
}
.fdd-nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    font-family: var(--body);
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    max-width: 60%;
    text-align: center;
}
.fdd-nav-title.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.fdd-header-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--fdd-yellow);
    transform-origin: 0 50%;
    transform: scaleX(0);
    will-change: transform;
    pointer-events: none;
}
@media (max-width: 768px) {
    .fdd-nav-title {
        display: none;
    }
    .fdd-header-inner {
        padding: 4px 20px;
        justify-content: center;
    }
    .fdd-logo img {
        height: 48px;
    }
}

/* ───── Masthead ───── */
.masthead {
    position: relative;
    border-bottom: 1px solid var(--rule);
    padding: 96px 40px 72px;
    background-color: #0a0a0a;
    background-image: url("assets/GettyImages-2266986744.jpg");
    background-size: cover;
    background-position: center center;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 78vh;
    overflow: hidden;
    isolation: isolate;
}
.masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 12, 22, 0.78) 0%,
        rgba(8, 12, 22, 0.62) 38%,
        rgba(8, 12, 22, 0.78) 100%
    );
    z-index: 0;
}
.masthead::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at center,
            rgba(0, 0, 0, 0) 30%,
            rgba(0, 0, 0, 0.45) 100%
        );
    z-index: 0;
    pointer-events: none;
}
.masthead > * {
    position: relative;
    z-index: 1;
}
h1.title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.018em;
    color: #fff;
    margin: 0 auto 22px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
h1.title em {
    font-style: normal;
    color: #fff;
}
h1.title .vs {
    display: inline-block;
    font-family: var(--sans-cond);
    font-style: italic;
    font-weight: 400;
    color: var(--fdd-yellow);
    padding: 0 0.15em;
}
h1.title strong {
    color: #fff;
    font-weight: 700;
}

.dek {
    font-family: var(--body);
    font-size: clamp(15px, 1.3vw, 19px);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
    max-width: 70ch;
    margin: 0 auto 6px;
}

.masthead-credit {
    position: absolute;
    right: 18px;
    bottom: 14px;
    z-index: 1;
    font-family: var(--sans-cond);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

/* ───── Timeline intro row ───── */
.timeline-intro {
    display: grid;
    grid-template-columns: 96px 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 36px 0 46px;
    border-bottom: 0.5px solid rgba(150, 150, 150, 0.35);
}
.timeline-intro-copy {
    padding: 0 24px;
}
.timeline-intro-copy p {
    font-family: var(--sans);
    font-weight: 400;
    font-size: clamp(20px, 2.1vw, 30px);
    line-height: 1.3;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin: 0;
    text-align: center;
}
.timeline-intro-copy.left p {
    color: var(--fdd-blue);
    font-weight: 300;
}
.timeline-intro-copy.right p {
    color: var(--ink);
}
.timeline-intro-copy .muted {
    color: var(--fdd-text);
    display: block;
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.55;
    font-style: normal;
    font-family: var(--body);
    text-align: center;
}
/* ───── Timeline ───── */
.timeline {
    position: relative;
    padding: 56px 40px 0;
    background: var(--paper-2);
}
.timeline-inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}
.timeline-inner::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(156px + (100% - 176px) / 2);
    width: 1px;
    background: linear-gradient(
        180deg,
        rgba(65, 64, 66, 0) 0%,
        rgba(65, 64, 66, 0.18) 6%,
        rgba(65, 64, 66, 0.18) 94%,
        rgba(65, 64, 66, 0) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.legend {
    display: grid;
    grid-template-columns: 96px 1fr 1fr;
    gap: 40px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--ink);
    font-family: var(--sans-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(20px, 2.2vw, 30px);
    line-height: 1.15;
    margin-bottom: 0;
    position: sticky;
    top: 75px;
    background: var(--paper-2);
    z-index: 5;
}
.legend .col-left {
    color: var(--fdd-blue);
    text-align: center;
}
.legend .col-right {
    color: var(--fdd-red);
    text-align: center;
}
.legend-title {
    display: block;
}
.legend small {
    display: block;
    margin-top: 6px;
    font-family: var(--body);
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    color: var(--fdd-text);
}

.period {
    display: grid;
    grid-template-columns: 96px 1fr 1fr;
    gap: 40px;
    padding: 64px 0;
    border-bottom: 0.5px solid rgba(150, 150, 150, 0.35);
    position: relative;
    align-items: start;
}
.period:last-of-type {
    border-bottom: none;
}

.period-sunset {
    position: sticky;
    top: 170px;
    align-self: start;
    display: flex;
    justify-content: center;
}

/* Sunset motif: a sun that progressively drops below the horizon
   across the 6 timeline periods. */
.period-sunset::after {
    content: "";
    display: block;
    width: 60px;
    height: 40px;
    background:
        radial-gradient(
            circle 9px at 50% var(--sun-pos, 20%),
            var(--sun-color, var(--fdd-yellow)) 0 8.5px,
            transparent 9.5px
        ),
        linear-gradient(to top, #999 0 1px, transparent 1px);
    background-repeat: no-repeat;
    background-position: center bottom;
}
.period:nth-of-type(1) .period-sunset {
    --sun-pos: 24%;
    --sun-color: var(--fdd-yellow);
}
.period:nth-of-type(2) .period-sunset {
    --sun-pos: 32%;
    --sun-color: var(--fdd-yellow);
}
.period:nth-of-type(3) .period-sunset {
    --sun-pos: 55%;
    --sun-color: #e89042;
}
.period:nth-of-type(4) .period-sunset {
    --sun-pos: 78%;
    --sun-color: #d96730;
}
.period:nth-of-type(5) .period-sunset {
    --sun-pos: 100%;
    --sun-color: var(--fdd-red);
}
.period:nth-of-type(6) .period-sunset {
    --sun-pos: 130%;
    --sun-color: var(--fdd-red);
}

.rail {
    position: relative;
    padding-left: 22px;
}
.rail::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--ink);
    opacity: 1;
    transition: background 0.5s ease;
}
.rail.left {
    color: var(--fdd-blue);
}
.rail.right {
    color: var(--fdd-red);
}
.rail-tag {
    font-family: var(--sans-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 16.8px;
    line-height: 1.4;
    color: currentColor;
    margin-bottom: 16px;
    display: inline-block;
    border: 1px solid currentColor;
    padding: 5px 9px 4px;
}

.rail h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    margin: 22px 0 10px;
    color: var(--fdd-dark);
    letter-spacing: -0.005em;
}
.rail h3:first-of-type {
    margin-top: 4px;
}

.rail.left h3 {
    color: var(--fdd-blue);
    font-style: italic;
    font-weight: 500;
    font-size: 22px;
}

/* Collapsible categories on the right rail */
details.cat {
    margin: 0;
    border-bottom: 1px solid rgba(209, 32, 42, 0.18);
}
details.cat:first-of-type {
    border-top: 1px solid rgba(209, 32, 42, 0.18);
}
details.cat > summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 15px 2px 15px 0;
    font-family: var(--body);
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.005em;
    font-size: 15px;
    line-height: 1.3;
    color: var(--fdd-red);
    transition: background 0.18s ease;
}
details.cat > summary::-webkit-details-marker {
    display: none;
}
details.cat > summary:hover {
    background: rgba(209, 32, 42, 0.09);
    border-left: 3px solid var(--fdd-red);
    padding-left: 8px;
}
details.cat > summary:focus-visible {
    outline: 2px solid var(--fdd-red);
    outline-offset: 2px;
}
details.cat .cat-count {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: var(--fdd-text);
    background: rgba(99, 100, 102, 0.1);
    padding: 3px 8px;
    border-radius: 2px;
}
details.cat .cat-toggle {
    width: 14px;
    height: 14px;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
details.cat .cat-toggle::before,
details.cat .cat-toggle::after {
    content: "";
    position: absolute;
    background: var(--fdd-red);
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}
details.cat .cat-toggle::before {
    left: 0;
    right: 0;
    top: 50%;
    height: 1.5px;
    margin-top: -0.75px;
}
details.cat .cat-toggle::after {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1.5px;
    margin-left: -0.75px;
}
details.cat[open] .cat-toggle::after {
    opacity: 0;
    transform: scaleY(0);
}
details.cat[open] > summary {
    color: var(--ink);
}
details.cat[open] .cat-count {
    background: rgba(209, 32, 42, 0.1);
    color: var(--fdd-red);
}
details.cat > ul {
    padding: 0 0 14px;
}

.rail ul {
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
}
.rail li {
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    padding: 10px 0;
    border-bottom: 1px dashed var(--rule-soft);
    transition:
        color 0.5s ease,
        opacity 0.5s ease;
}
.rail li:last-child {
    border-bottom: none;
}

.rail.left li {
    font-style: normal;
    color: var(--ink);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 0;
}
.rail.left li::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    background: var(--fdd-blue);
    flex-shrink: 0;
    margin-top: calc((1.6em - 6px) / 2);
}

.rail.right li {
    color: var(--ink);
    font-style: normal;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 0;
}
.rail.right li::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    background: var(--fdd-red);
    flex-shrink: 0;
    margin-top: calc((1.6em - 6px) / 2);
}

.prose {
    font-family: var(--body);
    font-style: italic;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    margin: 0;
}
.rail.right .prose {
    font-style: italic;
    color: var(--ink);
}

/* ───── Closing prose panel ───── */
.coda {
    background: #0f1d2e;
    color: #ece7dc;
    padding: 96px 40px 96px;
    border-top: 6px solid var(--fdd-red);
}
.coda-inner {
    max-width: 880px;
    margin: 0 auto;
}
.coda-tag {
    font-family: var(--sans-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: clamp(15.2px, 1.52vw, 20.9px);
    line-height: 1.4;
    color: var(--fdd-yellow);
    margin-bottom: 18px;
}
.coda h2 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.3;
    margin: 0 0 28px;
    color: #fff;
    letter-spacing: -0.005em;
}
.coda p {
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.65;
    color: #d8d2c2;
    margin: 0 0 18px;
}
.coda p strong {
    color: #fff;
    font-weight: 700;
}

/* ───── Sources ───── */
.sources {
    padding: 56px 40px 80px;
    background: var(--paper-2);
    border-top: 1px solid var(--rule);
}
.sources-inner {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.sources h3 {
    font-family: var(--sans-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 12px;
    line-height: 1.4;
    color: var(--fdd-blue);
    margin: 0 0 14px;
}
.sources p {
    font-family: var(--body);
    font-style: italic;
    font-size: 15px;
    line-height: 1.7;
    color: var(--fdd-dark);
    margin: 0;
}
.sources-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 760px;
    columns: 2;
    column-gap: 40px;
    text-align: left;
}
.sources-list li {
    font-family: var(--body);
    font-style: italic;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--fdd-dark);
    padding-left: 16px;
    margin-bottom: 10px;
    break-inside: avoid;
    position: relative;
}
.sources-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--fdd-blue);
}
.sources-credit {
    margin-top: 28px !important;
    padding-top: 18px;
    border-top: 1px solid var(--rule-soft);
    font-size: 13.5px !important;
    color: var(--fdd-text) !important;
}
.sources-credit-main {
    margin-top: 28px !important;
    padding-top: 18px;
    border-top: 1px solid var(--rule-soft);
    font-size: 13.5px !important;
    color: var(--fdd-text) !important;
    font-weight: 500;
}
@media (max-width: 720px) {
    .sources-list {
        columns: 1;
    }
}
.sources a {
    color: var(--fdd-dark);
    text-decoration: underline;
    text-decoration-color: var(--fdd-blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease,
        text-decoration-thickness 0.15s ease;
}
.sources a:hover {
    color: var(--fdd-blue);
    text-decoration-color: var(--fdd-red);
    text-decoration-thickness: 2px;
}
.sources a:focus-visible {
    outline: 2px solid var(--fdd-yellow);
    outline-offset: 3px;
    border-radius: 1px;
}

/* ───── Site Footer ───── */
.fdd-footer {
    position: relative;
    background: #141414;
    padding: 56px 32px;
    overflow: hidden;
}
.fdd-footer-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #141414 0%, #1f1f1f 100%);
    pointer-events: none;
}
.fdd-footer-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}
.fdd-footer-left {
    width: min(672px, 100%);
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.fdd-footer-logo {
    display: inline-flex;
    align-items: center;
    height: 48px;
    text-decoration: none;
}
.fdd-footer-logo img {
    height: 48px;
    width: auto;
    display: block;
}
.fdd-footer-description {
    font-family: var(--body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}
.fdd-footer-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.fdd-footer-copyright,
.fdd-footer-privacy {
    font-family: var(--body);
    font-weight: 400;
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}
.fdd-footer-privacy {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}
.fdd-footer-privacy:hover {
    color: #fff;
}
.fdd-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 22px;
    flex: 1 1 240px;
    min-width: 240px;
}
.fdd-footer-ctas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
.fdd-footer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 11px 26px;
    color: #fff;
    font-family: var(--sans-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.fdd-footer-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.85);
}
.fdd-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}
.fdd-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.fdd-footer-social-link:hover {
    background: rgba(255, 255, 255, 0.1);
}
.fdd-footer-social-link img {
    height: 22px;
    width: auto;
    max-width: 26px;
    display: block;
    filter: brightness(0) invert(1);
}
@media (max-width: 900px) {
    .fdd-footer-right {
        align-items: flex-start;
    }
    .fdd-footer-social {
        justify-content: flex-start;
    }
}
@media (max-width: 600px) {
    .fdd-footer {
        padding: 40px 20px;
    }
}

/* ───── Mobile ───── */
@media (max-width: 880px) {
    .timeline-inner::before {
        display: none;
    }
    .masthead {
        padding: 64px 20px 56px;
        min-height: 60vh;
    }
    .masthead-credit {
        right: 12px;
        bottom: 10px;
        font-size: 9.5px;
    }
    .timeline-intro {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 32px 0 42px;
    }
    .timeline-intro-spacer {
        display: none;
    }
    .timeline-intro-copy {
        padding: 0;
    }
    .timeline {
        padding: 48px 20px 0;
    }
    .legend {
        display: none;
    }
    .period {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 20px 0;
        border-bottom: 2px solid rgba(65, 64, 66, 0.45);
    }
    .period-sunset {
        display: none;
    }
    .rail {
        position: relative;
        padding-top: 22px;
        padding-left: 0;
    }
    .rail::before {
        position: static;
        display: table;
        width: auto;
        height: auto;
        background: transparent;
        font-family: var(--sans-cond);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-size: 12px;
        line-height: 1;
        padding: 0 0 8px;
        border-bottom: 1px solid currentColor;
        margin: 0 auto 12px;
        white-space: normal;
        text-align: center;
    }
    .rail.left::before {
        content: "JCPOA & UNSCR 2231 Provisions";
        color: var(--fdd-blue);
    }
    .rail.right::before {
        content: "Actual Events";
        color: var(--fdd-red);
    }
    .rail-tag {
        border: none;
        padding: 0;
    }
    .timeline-intro-copy.left::before,
    .timeline-intro-copy.right::before {
        display: table;
        font-family: var(--sans-cond);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-size: 12px;
        line-height: 1;
        padding-bottom: 10px;
        border-bottom: 1px solid currentColor;
        margin: 0 auto 18px;
        text-align: center;
    }
    .timeline-intro-copy.left::before {
        content: "JCPOA & UNSCR 2231 Provisions";
        color: var(--fdd-blue);
    }
    .timeline-intro-copy.right::before {
        content: "Actual Events";
        color: var(--fdd-red);
    }
    .coda {
        padding: 64px 20px;
    }
    .coda p {
        font-size: 14.45px;
    }
    .sources {
        padding: 40px 20px 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
