/* =========================================================
   RDTS2
   Reduced Data Temporary Soft Fork v.2
   ========================================================= */

:root {
    --bg: #ffffff;
    --bg-soft: #f6f6f4;
    --bg-dark: #111111;
    --bg-dark-2: #181818;

    --text: #111111;
    --text-muted: #666666;
    --text-light: #eeeeee;
    --text-dark-muted: #999999;

    --border: #ddddda;
    --border-dark: #333333;

    --accent: #f7931a;
    --accent-dark: #d87900;

    --max-width: 1180px;
    --content-width: 760px;

    --mono:
        "SFMono-Regular",
        "Cascadia Code",
        "Roboto Mono",
        "Liberation Mono",
        Menlo,
        Monaco,
        Consolas,
        monospace;

    --sans:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

code {
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--bg-soft);
    font-family: var(--mono);
    font-size: .88em;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: min(
        calc(100% - 48px),
        var(--max-width)
    );

    margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
}

.header-inner {
    width: min(
        calc(100% - 48px),
        var(--max-width)
    );

    min-height: 64px;

    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.06em;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;

    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.desktop-nav a {
    color: var(--text-muted);
    transition: color .2s ease;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button,
.menu-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.icon-button {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    color: var(--text);
    font-size: 17px;
}

.menu-button {
    display: none;

    width: 36px;
    height: 36px;

    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 1px;
    background: currentColor;
}

.mobile-menu {
    display: none;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 130px 0 110px;

    border-bottom: 1px solid var(--border);

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0),
            rgba(246,246,244,.75)
        );
}

.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--text-muted);
}

.eyebrow span {
    margin-inline: 6px;
    color: var(--accent);
}

.hero h1 {
    max-width: 900px;

    margin: 24px 0;

    font-family: var(--mono);
    font-size: clamp(42px, 7vw, 84px);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.075em;
}

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

.lead {
    max-width: 680px;

    margin: 0;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 18px;
    line-height: 1.65;
}

.hero-meta {
    display: flex;
    gap: 50px;

    margin-top: 65px;
    padding-top: 24px;

    border-top: 1px solid var(--border);
}

.hero-meta > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.meta-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .13em;
    color: #999;
}

.hero-meta strong {
    font-family: var(--mono);
    font-size: 12px;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
    padding: 120px 0;
}

.two-column {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 70px;
}

.section-label {
    position: sticky;
    top: 100px;

    align-self: start;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--text-muted);
}

.section-label span {
    display: block;

    margin-bottom: 12px;

    color: var(--accent);
    font-size: 20px;
    letter-spacing: -.05em;
}

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

.content h2 {
    margin: 0 0 35px;

    font-family: var(--mono);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.06em;
    font-weight: 500;
}

.content p {
    margin: 0 0 24px;
    color: #444;
}

.large-text {
    font-family: var(--mono);
    font-size: 21px;
    line-height: 1.65;
    color: #222 !important;
}


/* =========================================================
   DARK SPECIFICATION
   ========================================================= */

.section-dark {
    background: var(--bg-dark);
    color: var(--text-light);
}

.section-dark .eyebrow {
    color: #888;
}

.section-heading {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 70px;

    margin-bottom: 100px;
}

.section-number {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 22px;
}

.section-heading h2 {
    margin: 10px 0 0;

    font-family: var(--mono);
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.065em;
}


/* =========================================================
   RULES
   ========================================================= */

.rule {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 70px;

    padding: 75px 0;

    border-top: 1px solid var(--border-dark);
}

.rule:last-child {
    border-bottom: 1px solid var(--border-dark);
}

.rule-number {
    color: #555;

    font-family: var(--mono);
    font-size: 12px;
}

.rule-content {
    max-width: 760px;
}

.rule-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    margin-bottom: 20px;
}

.rule-tag {
    color: #888;

    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .13em;
}

.rule-value {
    color: var(--accent);

    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
}

.rule h3 {
    margin: 0 0 25px;

    font-family: var(--mono);
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.055em;
}

.rule p {
    color: #aaa;
}

.rule strong {
    color: white;
}

.section-dark code {
    background: #262626;
    color: #eee;
}

.exception-box {
    margin-top: 35px;
    padding: 25px;

    border: 1px solid #333;
    background: #151515;
}

.exception-title {
    margin-bottom: 15px;

    color: var(--accent);

    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
}

.exception-box ul {
    margin: 0;
    padding-left: 20px;

    color: #999;
}


/* =========================================================
   QUOTE
   ========================================================= */

.quote {
    margin-top: 55px;
    padding: 30px 0 30px 35px;

    border-left: 2px solid var(--accent);
}

.quote-mark {
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 50px;
    line-height: .5;
}

.quote p {
    margin: 15px 0 0;

    font-family: var(--mono);
    font-size: 22px;
    color: #111 !important;
}


/* =========================================================
   Q&A
   ========================================================= */

.qa-section {
    background: #f3f3f0;
}

.light-heading h2 {
    color: #111;
}

.qa-list {
    max-width: 1000px;
    margin-left: 290px;
}

.qa-item {
    border-top: 1px solid #ccc;
}

.qa-item:last-child {
    border-bottom: 1px solid #ccc;
}

.qa-question {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 28px 0;

    border: 0;
    background: transparent;

    cursor: pointer;

    text-align: left;

    font-family: var(--mono);
    font-size: 15px;
    color: #111;
}

.qa-icon {
    width: 25px;

    color: var(--accent);

    font-size: 20px;
    text-align: right;

    transition: transform .25s ease;
}

.qa-item.open .qa-icon {
    transform: rotate(45deg);
}

.qa-answer {
    display: none;

    max-width: 760px;

    padding: 0 50px 35px 0;

    color: #555;
}

.qa-item.open .qa-answer {
    display: block;
}

.qa-answer p {
    margin-top: 0;
}

.external-link {
    display: inline-block;

    padding-bottom: 2px;

    border-bottom: 1px solid var(--accent);

    color: #111;

    font-family: var(--mono);
    font-size: 12px;
}

.example {
    margin: 30px 0;
    padding: 25px;

    border: 1px solid #d2d2cd;

    background: #fff;
}

.example-title {
    margin-bottom: 20px;

    color: var(--accent);

    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
}

.example-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

    margin-top: 15px;

    font-family: var(--mono);
    font-size: 12px;
}

.example-flow strong {
    color: #111;
}

.example-flow.muted {
    color: #777;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.summary-section {
    padding: 60px 0;

    background: #111;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    border-left: 1px solid #333;
}

.summary-card {
    min-height: 190px;

    padding: 25px;

    border-right: 1px solid #333;

    display: flex;
    flex-direction: column;
}

.summary-card span {
    color: #666;

    font-family: var(--mono);
    font-size: 10px;
}

.summary-card strong {
    margin-top: auto;

    color: #fff;

    font-family: var(--mono);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 500;
    letter-spacing: -.07em;
}

.summary-card small {
    margin-top: 8px;

    color: #777;

    font-family: var(--mono);
    font-size: 10px;
}


/* =========================================================
   RESOURCES
   ========================================================= */

.resource-list {
    border-top: 1px solid var(--border);
}

.resource {
    display: flex;
    justify-content: space-between;

    padding: 20px 0;

    border-bottom: 1px solid var(--border);

    font-family: var(--mono);
    font-size: 13px;

    transition:
        color .2s ease,
        padding .2s ease;
}

.resource:hover {
    padding-left: 10px;
    color: var(--accent);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 55px 0;

    background: #111;
    color: white;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-inner strong {
    font-family: var(--mono);
    font-size: 18px;
}

.footer-inner p {
    margin: 5px 0 0;

    color: #666;

    font-family: var(--mono);
    font-size: 11px;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;

    color: #666;

    font-family: var(--mono);
    font-size: 10px;
}


/* =========================================================
   DARK MODE
   ========================================================= */

body.dark {
    --bg: #0e0e0e;
    --bg-soft: #1a1a1a;

    --text: #eeeeee;
    --text-muted: #888;

    --border: #2d2d2d;
}

body.dark .site-header {
    background: rgba(14, 14, 14, .94);
}

body.dark .content p {
    color: #aaa;
}

body.dark .large-text,
body.dark .quote p {
    color: #eee !important;
}

body.dark .hero {
    background:
        linear-gradient(
            to bottom,
            #0e0e0e,
            #141414
        );
}

body.dark .qa-section {
    background: #151515;
}

body.dark .qa-question {
    color: #eee;
}

body.dark .qa-item {
    border-color: #333;
}

body.dark .qa-answer {
    color: #999;
}

body.dark .example {
    background: #1a1a1a;
    border-color: #333;
}

body.dark .example strong {
    color: white;
}

body.dark .external-link {
    color: white;
}

body.dark .resource-list,
body.dark .resource {
    border-color: #333;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: flex;
    }

    .mobile-menu {
        display: none;

        padding: 10px 24px 25px;

        border-top: 1px solid var(--border);
    }

    .mobile-menu.open {
        display: flex;
        flex-direction: column;
    }

    .mobile-menu a {
        padding: 14px 0;

        border-bottom: 1px solid var(--border);

        font-family: var(--mono);
        font-size: 12px;
    }

    .hero {
        padding: 90px 0 80px;
    }

    .hero-meta {
        gap: 30px;
    }

    .two-column,
    .section-heading,
    .rule {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-label {
        position: static;
    }

    .section-heading {
        margin-bottom: 65px;
    }

    .rule {
        padding: 50px 0;
    }

    .qa-list {
        margin-left: 0;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-card {
        min-height: 160px;
    }
}


@media (max-width: 600px) {

    .container,
    .header-inner {
        width: min(
            calc(100% - 32px),
            var(--max-width)
        );
    }

    .hero {
        padding: 70px 0 60px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .lead {
        font-size: 15px;
    }

    .hero-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    .section {
        padding: 75px 0;
    }

    .large-text {
        font-size: 17px;
    }

    .section-heading h2 {
        font-size: 36px;
    }

    .rule h3 {
        font-size: 27px;
    }

    .rule-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .qa-question {
        gap: 20px;
        font-size: 13px;
    }

    .qa-answer {
        padding-right: 0;
    }

    .example-flow {
        line-height: 2;
    }

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

    .summary-grid {
        border-left: 0;
    }

    .summary-card {
        border-left: 1px solid #333;
        border-bottom: 1px solid #333;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-right {
        align-items: flex-start;
    }
}
