:root {
    --brand: #B93A4A;
    --brand-soft: #D9828D;
    --ink: #2B2528;
    --text: #332D2F;
    --muted: #756B6E;
    --paper: #FFF9F7;
    --paper-soft: #F6ECEB;
    --accent: #E45B4F;
    --line: rgba(43, 37, 40, 0.12);
    --line-strong: rgba(43, 37, 40, 0.2);
    --shadow: 0 20px 50px rgba(80, 39, 48, 0.10);
    --shadow-soft: 0 10px 30px rgba(80, 39, 48, 0.07);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --wrap: min(1180px, calc(100vw - 48px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

a:hover {
    color: var(--brand);
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

.wrap {
    width: var(--wrap);
    margin-inline: auto;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 5000;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(185, 58, 74, 0.10);
    background: rgba(255, 249, 247, 0.94);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 174px;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    color: var(--ink);
    font-size: 19px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.primary-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
}

.primary-nav a {
    position: relative;
    padding: 10px 11px;
    border-radius: 10px;
    color: #5f5558;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
    background: var(--paper-soft);
    color: var(--brand);
}

.primary-nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 4px;
    height: 2px;
    border-radius: 10px;
    background: var(--brand);
}

.search-trigger,
.menu-toggle,
.search-close,
.back-to-top {
    border: 0;
    cursor: pointer;
}

.search-trigger {
    padding: 10px 15px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.search-trigger:hover {
    background: var(--brand);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 12px;
    background: var(--paper-soft);
}

.menu-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 10px;
    background: var(--ink);
}

.breadcrumbs {
    padding-top: 26px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs a:hover {
    color: var(--brand);
}

.search-modal[hidden] {
    display: none !important;
}

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: start center;
    padding: 11vh 24px 40px;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(43, 37, 40, 0.66);
    backdrop-filter: blur(5px);
}

.search-dialog {
    position: relative;
    width: min(680px, 100%);
    padding: 38px;
    border-radius: 28px;
    background: var(--paper);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.search-dialog h2 {
    margin: 6px 0 10px;
    color: var(--ink);
    font-size: clamp(27px, 4vw, 40px);
    line-height: 1.18;
}

.search-dialog p {
    margin: 0 0 22px;
    color: var(--muted);
}

.search-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--paper-soft);
    font-size: 28px;
    line-height: 1;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.search-form input {
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    outline: none;
    background: #fff;
    color: var(--ink);
}

.search-form input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(185, 58, 74, 0.08);
}

.search-form button,
.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 750;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.search-form button,
.button {
    background: var(--accent);
    color: #fff;
}

.button:hover,
.search-form button:hover {
    transform: translateY(-1px);
    background: #cf493e;
    color: #fff;
}

.button-secondary {
    border: 1px solid var(--line-strong);
    background: rgba(255,255,255,.72);
    color: var(--ink);
}

.button-secondary:hover {
    border-color: rgba(185,58,74,.45);
    color: var(--brand);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 10px;
    background: var(--brand-soft);
}

.hero {
    padding: 62px 0 46px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 56px;
    align-items: center;
}

.hero-copy h1,
.page-hero h1 {
    margin: 12px 0 18px;
    color: var(--ink);
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.hero-copy h1 em {
    color: var(--brand);
    font-style: normal;
}

.hero-copy .lead,
.page-hero .lead {
    max-width: 760px;
    margin: 0;
    color: #5f5659;
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.85;
}

.hero-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 620px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
}

.hero-note strong {
    color: var(--ink);
}

.hero-visual {
    position: relative;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: -18px 26px 24px -20px;
    border-radius: 36px;
    background: var(--paper-soft);
    transform: rotate(-2.5deg);
}

.hero-visual img {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-mini-card {
    position: absolute;
    right: -18px;
    bottom: 26px;
    z-index: 3;
    width: min(280px, 74%);
    padding: 18px 20px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 18px;
    background: rgba(255, 249, 247, .94);
    box-shadow: var(--shadow-soft);
}

.hero-mini-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.hero-mini-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.section {
    padding: 76px 0;
}

.section-soft {
    background: var(--paper-soft);
}

.section-dark {
    background: var(--ink);
    color: #f7efed;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(280px, .3fr);
    gap: 40px;
    align-items: end;
    margin-bottom: 34px;
}

.section-heading h2 {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.17;
    letter-spacing: -0.025em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.section-dark .section-heading h2,
.section-dark h2,
.section-dark h3 {
    color: #fff8f5;
}

.section-dark .section-heading p,
.section-dark p {
    color: #d1c5c7;
}

.topic-grid,
.card-grid,
.guide-grid,
.value-grid,
.search-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.topic-card,
.content-card,
.info-card,
.search-result,
.stateless-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.67);
    box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
}

.topic-card,
.content-card,
.info-card,
.stateless-card {
    padding: 26px;
}

.topic-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.topic-card .number {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--paper-soft);
    color: var(--brand);
    font-weight: 850;
}

.topic-card h3,
.content-card h3,
.info-card h3,
.search-result h2,
.stateless-card h3 {
    margin: 14px 0 9px;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.35;
}

.topic-card p,
.content-card p,
.info-card p,
.search-result p,
.stateless-card p {
    margin: 0;
    color: var(--muted);
}

.text-link {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    color: var(--brand);
    font-weight: 760;
}

.text-link:hover span {
    transform: translateX(2px);
}

.text-link span {
    transition: transform .2s ease;
}

.editorial-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr);
    gap: 48px;
    align-items: center;
}

.editorial-copy h2 {
    margin: 10px 0 18px;
    color: var(--ink);
    font-size: clamp(31px, 4.3vw, 50px);
    line-height: 1.15;
}

.editorial-copy p {
    margin: 0 0 18px;
    color: #5f5659;
}

.editorial-visual img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.editorial-list {
    display: grid;
    gap: 1px;
    margin: 26px 0 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.editorial-list li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.editorial-list b {
    color: var(--brand);
}

.band {
    padding: 34px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.band-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 26px;
    align-items: center;
}

.band-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    font-size: 22px;
}

.band h2 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 22px;
}

.band p {
    margin: 0;
    color: var(--muted);
}

.page-hero {
    padding: 52px 0 58px;
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(360px, .75fr);
    gap: 54px;
    align-items: center;
}

.page-hero h1 {
    font-size: clamp(40px, 5vw, 62px);
}

.page-hero-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
}

.intent-note {
    margin-top: 24px;
    padding: 18px 20px;
    border-left: 4px solid var(--brand);
    border-radius: 0 14px 14px 0;
    background: var(--paper-soft);
    color: #5d5356;
}

.intent-note strong {
    color: var(--ink);
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    align-items: start;
}

.article {
    min-width: 0;
}

.article > h2 {
    margin: 46px 0 14px;
    color: var(--ink);
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.25;
}

.article > h2:first-child {
    margin-top: 0;
}

.article > h3 {
    margin: 30px 0 10px;
    color: var(--ink);
    font-size: 22px;
}

.article p {
    margin: 0 0 18px;
    color: #4f4749;
}

.article ul,
.article ol {
    margin: 12px 0 24px;
    padding-left: 1.35em;
}

.article li {
    margin: 8px 0;
}

.article figure {
    margin: 34px 0;
}

.article figure img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 22px;
}

.article figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.side-nav {
    position: sticky;
    top: 102px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.62);
}

.side-nav h2 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 18px;
}

.side-nav a {
    display: block;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    color: #675d60;
    font-size: 14px;
}

.side-nav a:last-child {
    border-bottom: 0;
}

.side-nav a:hover {
    color: var(--brand);
}

.step-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.66);
}

.step-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 850;
}

.step h3 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 19px;
}

.step p {
    margin: 0;
}

.check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding: 16px 16px 16px 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.7);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 15px;
    top: 15px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--paper-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.note-box,
.warning-box,
.tip-box {
    margin: 26px 0;
    padding: 20px 22px;
    border-radius: 16px;
}

.note-box {
    border: 1px solid rgba(185,58,74,.18);
    background: var(--paper-soft);
}

.tip-box {
    border: 1px solid rgba(217,130,141,.28);
    background: #fff2f0;
}

.warning-box {
    border: 1px solid rgba(228,91,79,.28);
    background: #fff0ec;
}

.note-box strong,
.warning-box strong,
.tip-box strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.compare-table {
    width: 100%;
    margin: 24px 0 30px;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,.65);
}

.compare-table th,
.compare-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.compare-table th {
    background: var(--paper-soft);
    color: var(--ink);
    font-size: 14px;
}

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

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.7);
    overflow: clip;
}

.faq-item summary {
    position: relative;
    padding: 19px 54px 19px 20px;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
    font-weight: 760;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    top: 15px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--paper-soft);
    color: var(--brand);
    font-size: 20px;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--muted);
}

.cta-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    padding: 36px;
    border-radius: 26px;
    background: var(--ink);
    color: #fff;
}

.cta-panel h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

.cta-panel p {
    max-width: 760px;
    margin: 0;
    color: #d6cacc;
}

.cta-panel .button-secondary {
    border-color: rgba(255,255,255,.26);
    background: rgba(255,255,255,.09);
    color: #fff;
}

.cta-panel .button-secondary:hover {
    border-color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.14);
}

.topic-index {
    display: grid;
    gap: 16px;
}

.topic-row {
    display: grid;
    grid-template-columns: minmax(160px, .34fr) 1fr auto;
    gap: 26px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.topic-row:first-child {
    border-top: 1px solid var(--line);
}

.topic-row strong {
    color: var(--ink);
    font-size: 18px;
}

.topic-row p {
    margin: 0;
    color: var(--muted);
}

.topic-row a {
    color: var(--brand);
    font-weight: 760;
    white-space: nowrap;
}

.mini-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 30px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--line);
}

.mini-metrics div {
    padding: 20px;
    background: rgba(255,255,255,.75);
}

.mini-metrics b {
    display: block;
    color: var(--brand);
    font-size: 20px;
}

.mini-metrics span {
    color: var(--muted);
    font-size: 13px;
}

.search-page {
    padding: 54px 0 80px;
}

.search-page h1 {
    margin: 8px 0 14px;
    color: var(--ink);
    font-size: clamp(36px, 5vw, 56px);
}

.search-page > .wrap > p {
    color: var(--muted);
}

.search-page .search-form {
    max-width: 760px;
    margin: 26px 0 42px;
}

.search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-result {
    padding: 24px;
}

.search-result h2 {
    font-size: 21px;
}

.search-result .result-url {
    display: inline-block;
    margin-top: 14px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

.empty-state {
    padding: 34px;
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
    background: var(--paper-soft);
}

.empty-state h2 {
    margin: 0 0 8px;
    color: var(--ink);
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.not-found {
    padding: 76px 0 100px;
}

.not-found-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, .6fr);
    gap: 48px;
    align-items: center;
}

.not-found h1 {
    margin: 8px 0 16px;
    color: var(--ink);
    font-size: clamp(46px, 7vw, 78px);
    line-height: 1;
}

.not-found p {
    color: var(--muted);
    font-size: 18px;
}

.not-found img {
    width: 100%;
    border-radius: 26px;
}

.site-footer {
    margin-top: 40px;
    padding: 58px 0 22px;
    background: var(--ink);
    color: #e9dddf;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(3, 1fr);
    gap: 46px;
}

.footer-about p {
    max-width: 360px;
    margin: 14px 0 0;
    color: #bfb2b5;
}

.footer-brand {
    color: #fff;
    font-size: 26px;
    font-weight: 850;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 15px;
}

.site-footer nav a {
    display: block;
    width: fit-content;
    padding: 5px 0;
    color: #c8bbbe;
    font-size: 14px;
}

.site-footer nav a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.footer-bottom p {
    margin: 0;
    color: #998d90;
    font-size: 13px;
}

.back-to-top {
    padding: 8px 0;
    background: transparent;
    color: #c8bbbe;
    font-size: 13px;
}

.back-to-top:hover {
    color: #fff;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1120px) {
    :root {
        --wrap: min(100% - 40px, 1040px);
    }

    .header-inner {
        gap: 14px;
    }

    .primary-nav a {
        padding-inline: 8px;
        font-size: 13px;
    }

    .brand-text small {
        display: none;
    }

    .hero-grid,
    .page-hero-grid {
        gap: 38px;
    }

    .footer-grid {
        gap: 32px;
    }
}

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: auto 1fr auto auto;
        min-height: 70px;
    }

    .menu-toggle {
        display: block;
        justify-self: end;
    }

    .primary-nav {
        position: absolute;
        top: 70px;
        left: 20px;
        right: 20px;
        display: none;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: var(--paper);
        box-shadow: var(--shadow);
    }

    .primary-nav.is-open {
        display: grid;
    }

    .primary-nav a {
        padding: 12px 14px;
        font-size: 14px;
    }

    .primary-nav a[aria-current="page"]::after {
        display: none;
    }

    .hero-grid,
    .page-hero-grid,
    .editorial-split,
    .content-layout,
    .not-found-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-copy {
        max-width: 720px;
    }

    .hero-visual,
    .page-hero-image {
        max-width: 720px;
    }

    .hero-mini-card {
        right: 14px;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .topic-grid,
    .card-grid,
    .guide-grid,
    .value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .side-nav {
        position: static;
    }

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

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    :root {
        --wrap: min(100% - 28px, 650px);
    }

    body {
        font-size: 15px;
    }

    .brand {
        min-width: auto;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .search-trigger {
        padding-inline: 12px;
    }

    .hero,
    .page-hero {
        padding: 38px 0 42px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: clamp(36px, 11vw, 54px);
    }

    .hero-visual::before {
        inset: -10px 18px 20px -8px;
    }

    .hero-mini-card {
        position: relative;
        right: auto;
        bottom: auto;
        width: calc(100% - 30px);
        margin: -42px 15px 0;
    }

    .section {
        padding: 58px 0;
    }

    .topic-grid,
    .card-grid,
    .guide-grid,
    .value-grid,
    .search-results,
    .check-list {
        grid-template-columns: 1fr;
    }

    .topic-card {
        min-height: 0;
    }

    .band-inner {
        grid-template-columns: auto 1fr;
    }

    .band-inner .button-secondary {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .cta-panel {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .topic-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .topic-row a {
        justify-self: start;
    }

    .mini-metrics {
        grid-template-columns: 1fr;
    }

    .search-dialog {
        padding: 30px 22px 24px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .search-form button {
        width: 100%;
    }

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

    .footer-about {
        grid-column: auto;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    :root {
        --wrap: calc(100% - 24px);
    }

    .header-inner {
        gap: 7px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .search-trigger {
        min-height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .hero-copy .lead,
    .page-hero .lead {
        font-size: 17px;
    }

    .button,
    .button-secondary {
        width: 100%;
    }

    .button-row {
        display: grid;
    }

    .topic-card,
    .content-card,
    .info-card,
    .stateless-card {
        padding: 22px;
    }

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

    .compare-table {
        display: block;
        overflow-x: auto;
        white-space: normal;
    }
}
