.guide-section {
    --ink: #112c47;
    --muted: #485e72;
    --blue: #075eab;
    --blue-dark: #064779;
    --blue-soft: #e1eefc;
    --pale: #edf5fc;
    --paper: #fff;
    --heading: Montserrat, system-ui, sans-serif;
    background: var(--paper);
}

.guide-content {
    color: var(--ink);
    line-height: 1.55;
    user-select: text;
}

.guide-content [hidden] { display: none !important; }
.guide-content :is(h1, h2, h3, p) { margin: 0; }
.guide-content :is(h1, h2, h3) { font-family: var(--heading); font-weight: 700; line-height: 1.16; }
.guide-content a { color: var(--blue); text-decoration: underline; text-underline-offset: .22em; }
.guide-content :is(button, input) { font: inherit; }
.guide-content button { cursor: pointer; }
.guide-content :focus-visible { outline: 3px solid #146acf; outline-offset: 4px; }

.shell { width: min(100% - 5rem, 74rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus {
    position: fixed;
    z-index: 1001;
    inset: .75rem auto auto .75rem;
    padding: .625rem 1rem;
    border-radius: .5rem;
    background: #fff;
    color: var(--blue);
    text-decoration: underline;
}

.guide-content .button {
    display: inline-flex;
    width: fit-content;
    min-height: 2.875rem;
    align-items: center;
    justify-content: center;
    padding: .65rem 1.125rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    background: #eb6a2c;
    color: #fff;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}
.guide-content .button:hover { background: var(--blue-dark); }
.guide-content .button--outline { border-color: #b7cee4; background: transparent; color: var(--blue-dark); }
.guide-content .button--outline:hover { border-color: #8db6da; background: var(--pale); }

.catalog { padding-block: clamp(2.3rem, 4.5vw, 4rem) 4.5rem; }
.catalog-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 19rem);
    gap: 1.25rem 1.75rem;
    align-items: end;
}
.catalog h1 { font-size: clamp(2.25rem, 5vw, 45px); letter-spacing: -.057em; }
.catalog-intro p { max-width: 39rem; margin-top: .9rem; color: var(--muted); font-size: clamp(1.02rem, 1.7vw, 1.2rem); }
.search-box { position: relative; }
.search-box::before, .search-box::after { content: ''; position: absolute; pointer-events: none; }
.search-box::before { top: 1.02rem; left: 1rem; width: .81rem; height: .81rem; border: 1.7px solid currentColor; border-radius: 50%; }
.search-box::after { top: 1.81rem; left: 1.67rem; width: .43rem; height: 1.6px; background: currentColor; transform: rotate(45deg); }
.search-box input {
    display: block;
    width: 100%;
    min-height: 3rem;
    padding: .65rem 1rem .65rem 2.5rem;
    border: 1px solid #cbd9e6;
    border-radius: .6rem;
    background: #fff;
    color: var(--ink);
    box-shadow: none;
}
.search-box input::placeholder { color: var(--muted); opacity: 1; font: inherit; }
.topics {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 1.65rem;
    padding-bottom: .95rem;
}
.topics button {
    padding: .48rem .95rem;
    min-height: 2.65rem;
    border: 1px solid transparent;
    border-radius: .45rem;
    background: #f5f7fa;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}
.topics button:hover { background: #009eff; color: #fff; }
.topics button[aria-pressed='true'] { background: #009eff; color: #fff; }

.guides-feature {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
    min-height: 24rem;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--pale);
}
.feature-content { padding: clamp(1.65rem, 3.8vw, 3.1rem); align-self: center; }
.feature-content h2 { margin-block: .85rem; font-size: clamp(1.85rem, 3vw, 32px); letter-spacing: -.045em; text-wrap: balance; }
.feature-content p { color: var(--muted); font-size: 15px; }
.feature-content .button, .article-intro .button { margin-top: 1.55rem; }
.feature-media, .article-media, .card-media { position: relative; background: var(--blue-soft); }
.feature-media img, .article-media img, .card-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media img { position: absolute; inset: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; color: var(--muted); font-size: .875rem; }
.category { color: var(--blue-dark); font-weight: 700; }
.meta .category + span::before { content: '·'; margin-right: .75rem; }

.catalog-list { margin-top: clamp(8px, 5vw, 8px); }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.2rem; }
.section-heading h2 { font-size: clamp(1.55rem, 3vw, 32px); letter-spacing: -.035em; }
.result-count { color: var(--muted); font-size: .93rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; margin: 0; padding: 0; list-style: none; }
.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.card:hover, .card:focus-within { border-color: #9bbad7; box-shadow: 0 .4rem 1.5rem #0939610d; }
.guide-content .card-link { display: flex; height: 100%; flex-direction: column; color: inherit; text-decoration: none; }
.card-link:focus-visible { outline-offset: -4px; }
.card-media { overflow: hidden; aspect-ratio: 1.95; }
.card-content { display: flex; flex: 1; flex-direction: column; align-items: start; gap: .6rem; padding: 1.2rem; }
.card-content h3 { font-size: 20px; }
.card-content p { color: var(--muted); }
.card-action { margin-top: auto; padding-top: .38rem; color:#009eff; font-size: 14px; font-weight: 600; }
.card-link:hover .card-action, .card-link:focus-visible .card-action { text-decoration: underline; }
.empty-state { padding: 2rem; border: 1px solid var(--line); border-radius: .9rem; background: #fff; }
.empty-state .button { margin-top: .9rem; }
.list-controls { display: flex; justify-content: center; margin-top: 1.5rem; }

.catalog-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.1rem 2rem;
    margin-top: 3.75rem;
    padding: 1.75rem 2rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: var(--pale);
}
.catalog-banner h2 { font-size: 1.4rem; letter-spacing: -.03em; }
.catalog-banner p { margin-top: .4rem; color: var(--muted); }
.catalog-banner .button { flex-shrink: 0; }

.article-top { padding-block: 1.5rem clamp(2rem, 5vw, 4rem); border-bottom: 1px solid var(--line); background: var(--pale); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem .65rem; color: var(--muted); font-size: .9rem; }
.breadcrumbs a { font-weight: 600; }
.article-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: 1.5rem; }
.article-intro h1 { margin-block: .7rem; font-size: clamp(2rem, 4.25vw, 36px); letter-spacing: -.055em; }
.article-intro p { max-width: 39rem; color: var(--muted); font-size: clamp(1.03rem, 1.8vw, 18px); }
.article-media { overflow: hidden; aspect-ratio: 1.6; border-radius: .9rem; }
.article-body { max-width: 46rem; padding-block: 3rem; }
.article-copy { color: #243e55; font-size: 1.0625rem; line-height: 1.7; }
.article-copy section { scroll-margin-top: 1.5rem; }
.article-copy section + section { margin-top: 2.15rem; }
.article-copy h2 { margin-bottom: .85rem; color: var(--ink); font-size: clamp(1.38rem, 2.3vw, 24px); letter-spacing: -.035em; }
.article-copy p + p, .article-copy ul { margin-top: .7rem; }
.article-copy ul { margin-bottom: 0; padding-left: 1.25rem; list-style: disc; }
.article-copy li + li { margin-top: .35rem; }
.document-panel { padding: 1.45rem; border: 1px solid #ccdeef; border-radius: .9rem; background: var(--pale); }
.document-panel ul { margin-top: 1rem; list-style: none; padding-left: 0; }
.sources { margin-top: 1.5rem; padding: .8rem 0; border-top: 1px solid var(--line); font-size: .94rem; }
.sources summary { width: fit-content; color: var(--muted); font-weight: 700; cursor: pointer; }
.related-guides { padding-block: 1rem 4rem; }

@media (max-width: 58rem) {
    .shell { width: min(100% - 3rem, 74rem); }
    .guides-feature { min-height: 20rem; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 43rem) {
    .shell { width: calc(100% - 2rem); }
    .catalog { padding-bottom: 2.9rem; }
    .catalog-intro, .guides-feature, .article-hero { grid-template-columns: minmax(0, 1fr); }
    .catalog-intro p { margin-top: .65rem; }
    .topics { gap: .15rem; margin-top: 1rem; padding-bottom: .55rem; }
    .topics button { padding-inline: .4rem; }
    .guides-feature { min-height: 0; margin-top: 1.15rem; }
    .feature-content { padding: 1.4rem; }
    .feature-media { order: -1; aspect-ratio: 1.85; }
    .catalog-banner { align-items: start; flex-direction: column; margin-top: 2.5rem; padding: 1.25rem; }
    .article-top { padding-top: 1rem; }
    .article-hero { margin-top: 1.15rem; }
    .article-body { padding-block: 1.6rem 2rem; }
}

@media (max-width: 34rem) {
    .card-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 991px) {
    .article-copy section { scroll-margin-top: 4.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .guide-content *, .guide-content *::before, .guide-content *::after { transition: none !important; }
}
