/* FlightAtom field notes: long-form editorial treatment */

.resource-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 72px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 88px 48px 92px;
}

.resource-hero .solution-breadcrumb {
    grid-column: 1 / -1;
}

.resource-kicker {
    grid-column: 1 / -1;
    display: inline-flex;
    width: fit-content;
    margin-bottom: 18px;
    color: #b7c5d5;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.resource-hero h1 {
    grid-column: 1 / -1;
    max-width: 1000px;
    margin-bottom: 34px;
    color: #f8fafc;
    font-size: clamp(2.9rem, 4.7vw, 4rem);
    font-weight: 680;
    letter-spacing: -0.034em;
    line-height: 1.05;
}

.resource-deck {
    grid-column: 1;
    max-width: 730px;
    color: #a8b4c6;
    font-size: clamp(1.03rem, 1.65vw, 1.23rem);
    line-height: 1.72;
}

.resource-meta {
    grid-column: 2;
    align-self: end;
    display: grid;
    gap: 8px;
    padding: 4px 0 4px 28px;
    color: #8291a6;
    border-left: 1px solid rgba(148, 163, 184, 0.24);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.resource-meta span + span::before {
    content: none;
}

.resource-shell {
    --text: #0c1726;
    --text-muted: #526174;
    --surface: #ffffff;
    --surface-border: #d7dee7;
    --border: #d7dee7;
    --accent: #0f6f8f;
    display: grid;
    grid-template-columns: minmax(24px, 1fr) 220px minmax(0, 760px) minmax(24px, 1fr);
    gap: 48px;
    max-width: none;
    margin: 0;
    padding: 76px 0 112px;
    color: var(--text);
    background: #f5f6f8;
    border-top: 1px solid #d7dee7;
}

.resource-toc {
    grid-column: 2;
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 18px 0 14px;
    background: transparent;
    border: 0;
    border-top: 3px solid var(--text);
    border-bottom: 1px solid var(--surface-border);
    border-radius: 0;
}

.resource-toc strong {
    display: block;
    margin-bottom: 14px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
}

.resource-toc a {
    display: block;
    margin-left: -10px;
    padding: 7px 10px;
    color: var(--text-muted);
    border-left: 2px solid transparent;
    font-size: 0.79rem;
    line-height: 1.42;
    text-decoration: none;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.resource-toc a:hover,
.resource-toc a:focus-visible {
    color: var(--accent);
    background: rgba(15, 111, 143, 0.04);
    border-left-color: var(--accent);
}

.resource-content {
    grid-column: 3;
    min-width: 0;
}

.resource-content section {
    scroll-margin-top: 104px;
    margin-bottom: 78px;
}

.resource-content h2 {
    max-width: 690px;
    margin-bottom: 20px;
    color: var(--text);
    font-size: clamp(2rem, 3.7vw, 2.8rem);
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 1.06;
}

.resource-content h3 {
    margin: 32px 0 10px;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.resource-content p,
.resource-content li {
    color: var(--text-muted);
    font-size: 0.99rem;
    line-height: 1.82;
}

.resource-content p + p {
    margin-top: 17px;
}

.resource-content a {
    color: var(--accent);
}

.resource-content .btn-primary {
    max-width: 310px;
    margin-top: 6px;
    color: #ffffff;
    background: var(--text);
    border-color: var(--text);
}

.resource-content .btn-primary:hover,
.resource-content .btn-primary:focus-visible {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.answer-box {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 28px;
    padding: 26px 0 34px;
    background: transparent;
    border: 0;
    border-top: 3px solid var(--text);
    border-bottom: 1px solid var(--surface-border);
    border-radius: 0;
}

.answer-box span {
    display: block;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.answer-box p {
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.66;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 30px;
    border-top: 2px solid var(--text);
    border-bottom: 1px solid var(--surface-border);
}

.criteria-card {
    min-height: 226px;
    padding: 24px 24px 28px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.criteria-card:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid var(--surface-border);
}

.criteria-card:nth-child(n + 3) {
    border-top: 1px solid var(--surface-border);
}

.criteria-card b {
    display: block;
    margin-bottom: 26px;
    color: #718096;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.criteria-card h3 {
    margin: 0 0 9px;
}

.criteria-card p {
    font-size: 0.91rem;
    line-height: 1.67;
}

.resource-table-wrap {
    overflow-x: auto;
    margin-top: 26px;
    border: 1px solid var(--surface-border);
    border-radius: 0;
}

.resource-table-wrap:focus-visible {
    outline: 3px solid rgba(15, 111, 143, 0.35);
    outline-offset: 4px;
}

.resource-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.resource-table th,
.resource-table td {
    padding: 17px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--surface-border);
}

.resource-table th {
    color: #f8fafc;
    background: #101c2c;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resource-table th + th,
.resource-table td + td {
    border-left: 1px solid var(--surface-border);
}

.resource-table td {
    color: var(--text-muted);
    background: #ffffff;
    font-size: 0.88rem;
    line-height: 1.62;
}

.resource-table tr:last-child td {
    border-bottom: 0;
}

.source-list {
    display: grid;
    gap: 0;
    margin-top: 24px;
    padding: 0;
    border-top: 2px solid var(--text);
}

.source-list li {
    list-style: none;
    padding: 17px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--surface-border);
    border-radius: 0;
    font-size: 0.89rem;
}

.scope-note {
    margin-top: 24px;
    padding: 18px 20px;
    color: #435267;
    background: #e9f2f6;
    border: 0;
    border-left: 3px solid var(--accent);
    border-radius: 0;
    font-size: 0.86rem;
    line-height: 1.68;
}

@media (max-width: 920px) {
    .resource-hero {
        column-gap: 36px;
    }

    .resource-shell {
        grid-template-columns: minmax(24px, 1fr) minmax(0, 760px) minmax(24px, 1fr);
        gap: 0;
    }

    .resource-toc,
    .resource-content {
        grid-column: 2;
    }

    .resource-toc {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 2px 12px;
        margin-bottom: 52px;
    }

    .resource-toc strong {
        width: 100%;
    }

    .resource-toc a {
        margin-left: 0;
        padding: 6px 0;
        border-left: 0;
        border-bottom: 1px solid transparent;
    }

    .resource-toc a:hover,
    .resource-toc a:focus-visible {
        background: transparent;
        border-bottom-color: var(--accent);
    }
}

@media (max-width: 720px) {
    .resource-hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 64px 22px 72px;
    }

    .resource-hero .solution-breadcrumb,
    .resource-kicker,
    .resource-hero h1,
    .resource-deck,
    .resource-meta {
        grid-column: 1;
        grid-row: auto;
    }

    .resource-hero h1 {
        margin-bottom: 24px;
        font-size: clamp(2.35rem, 10.3vw, 3.05rem);
        letter-spacing: -0.03em;
        line-height: 1.06;
    }

    .resource-deck {
        font-size: 1.02rem;
        line-height: 1.68;
    }

    .resource-meta {
        margin-top: 28px;
        padding: 16px 0 0;
        border-top: 1px solid rgba(148, 163, 184, 0.24);
        border-left: 0;
    }

    .resource-shell {
        grid-template-columns: 22px minmax(0, 1fr) 22px;
        padding-top: 58px;
        padding-bottom: 80px;
    }

    .resource-content section {
        margin-bottom: 62px;
    }

    .resource-content h2 {
        font-size: 2rem;
    }

    .answer-box,
    .criteria-grid {
        grid-template-columns: 1fr;
    }

    .answer-box {
        gap: 14px;
        padding: 24px 0 30px;
    }

    .criteria-card,
    .criteria-card:nth-child(even) {
        min-height: 0;
        padding: 24px 0 26px;
        border-left: 0;
    }

    .criteria-card + .criteria-card {
        border-top: 1px solid var(--surface-border);
    }

    .criteria-card b {
        margin-bottom: 18px;
    }

    .resource-table-wrap {
        overflow: visible;
        border: 0;
    }

    .resource-table {
        min-width: 0;
    }

    .resource-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .resource-table,
    .resource-table tbody,
    .resource-table tr,
    .resource-table td {
        display: block;
        width: 100%;
    }

    .resource-table tr {
        padding: 22px 0;
        border-top: 2px solid var(--text);
    }

    .resource-table td,
    .resource-table td + td {
        padding: 8px 0;
        border: 0;
        background: transparent;
    }

    .resource-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--text);
        font-size: 0.76rem;
        font-weight: 700;
    }
}

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

    .resource-toc a {
        transition: none;
    }
}
