*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #F3F7FB;
    --bg-deep: #E6EFF7;
    --surface: #FFFFFF;
    --surface-soft: #DCEBF5;
    --ink: #10263A;
    --text: #263B4C;
    --muted: #60788C;
    --quiet: #8094A5;
    --brand: #3B9FE0;
    --brand-light: #67B9EC;
    --steel: #1E6FB8;
    --ice: #B8DDF3;
    --mint: #39A69C;
    --line: rgba(30,111,184,0.16);
    --line-strong: rgba(59,159,224,0.38);
    --shadow: 0 14px 36px rgba(16,38,58,0.08);
    --radius: 14px;
    --topbar-h: 72px;
}

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

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(103,185,236,0.13), transparent 34rem),
        linear-gradient(180deg, #F7FAFD 0, var(--bg) 28rem);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.78;
}

body.overlay-open {
    overflow: hidden;
}

a {
    color: var(--steel);
    text-decoration: none;
}

a:hover {
    color: #15578f;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(59,159,224,0.45);
    outline-offset: 3px;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.28;
    margin-top: 0;
}

h1 {
    font-size: clamp(30px, 4vw, 38px);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(22px, 2.7vw, 28px);
}

h3 {
    font-size: 19px;
}

p {
    margin: 0 0 1em;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    background: rgba(247,250,253,0.92);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(16,38,58,0.05);
    backdrop-filter: blur(16px);
}

.topbar-inner {
    width: min(1240px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    color: var(--ink);
}

.brand img,
.footer-brand img,
.panel-brand img {
    width: auto;
    height: auto;
    max-height: 34px;
}

.brand-text,
.panel-brand-text {
    font-weight: 800;
    font-size: 21px;
    letter-spacing: 0.02em;
}

.brand-status {
    color: var(--muted);
    font-size: 14px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button,
.close-button,
.rail-all {
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--steel);
    padding: 0 16px;
    font-weight: 700;
}

.icon-button:hover,
.close-button:hover,
.rail-all:hover {
    background: #EDF6FC;
}

.app-link,
.button-primary,
.button-secondary,
.inline-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 750;
    padding: 10px 18px;
}

.app-link,
.button-primary {
    color: #fff;
    background: linear-gradient(135deg,#67B9EC 0%,#3B9FE0 52%,#1E6FB8 100%);
    box-shadow: 0 10px 24px rgba(30,111,184,0.15);
}

.app-link:hover,
.button-primary:hover {
    color: #fff;
    filter: saturate(1.08) brightness(0.98);
}

.button-secondary,
.inline-link {
    color: var(--steel);
    background: #fff;
    border: 1px solid var(--line-strong);
}

.site-main {
    padding: 34px 0 74px;
}

.site-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.content-column {
    min-width: 0;
}

.desktop-rail {
    position: sticky;
    top: calc(var(--topbar-h) + 22px);
    display: grid;
    gap: 16px;
}

.rail-group {
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 8px 22px rgba(16,38,58,0.04);
}

.rail-group h2 {
    font-size: 14px;
    margin-bottom: 4px;
}

.rail-group p {
    margin-bottom: 10px;
    color: var(--quiet);
    font-size: 12px;
    line-height: 1.55;
}

.rail-group nav {
    display: grid;
    gap: 3px;
}

.rail-group a {
    min-height: 42px;
    display: flex;
    align-items: center;
    color: var(--text);
    padding: 7px 10px 7px 12px;
    border-left: 3px solid transparent;
    border-radius: 8px;
}

.rail-group a:hover {
    background: #F0F7FC;
}

.rail-group a.is-current {
    border-left-color: var(--steel);
    background: #E5F3FC;
    color: var(--ink);
    font-weight: 800;
}

.rail-all {
    width: 100%;
}

.page-hero,
.brand-cover,
.section-block,
.surface-card,
.callout,
.details-panel {
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.page-hero,
.section-block {
    padding: clamp(22px, 4vw, 38px);
}

.page-hero {
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(220,235,245,0.74)),
        var(--surface);
}

.breadcrumbs {
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 14px;
}

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

.lead {
    max-width: 820px;
    margin-bottom: 0;
    color: #365064;
    font-size: 17px;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--steel);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero-actions,
.section-actions,
.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.media-frame {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(135deg, #F8FBFD, #E4F0F7);
}

.media-frame img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: contain;
    object-position: center;
}

.media-frame.banner-frame {
    max-height: 420px;
}

.media-frame.banner-frame img {
    max-height: 420px;
}

.media-frame.app-frame {
    min-height: 320px;
    max-height: 460px;
}

.media-frame.app-frame img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: contain;
}

.media-frame.icon-frame {
    width: 80px;
    height: 80px;
    min-height: 80px;
    border-radius: 18px;
}

.media-frame.icon-frame img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

.media-fallback {
    width: 100%;
    min-height: 210px;
    display: grid;
    place-items: center;
    padding: 28px;
    color: var(--ink);
    background:
        linear-gradient(145deg, rgba(184,221,243,.65), rgba(255,255,255,.65)),
        repeating-linear-gradient(90deg, rgba(30,111,184,.05) 0, rgba(30,111,184,.05) 1px, transparent 1px, transparent 42px);
    text-align: center;
    font-weight: 800;
    letter-spacing: .05em;
}

.banner-frame .media-fallback {
    min-height: 280px;
}

.app-frame .media-fallback {
    min-height: 360px;
}

.icon-frame .media-fallback {
    min-height: 80px;
    padding: 8px;
    font-size: 12px;
}

.brand-cover {
    overflow: hidden;
    margin-bottom: 26px;
}

.brand-cover-content {
    padding: clamp(24px, 4vw, 42px);
}

.brand-cover-content .lead {
    max-width: 880px;
}

.task-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.task-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.task-card:nth-child(2) {
    background: #EAF5FB;
}

.task-card:nth-child(3) {
    background: #E8F4F1;
}

.task-card:nth-child(4) {
    background: #EDF1F5;
}

.task-card .task-no {
    color: var(--steel);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.task-card h2 {
    font-size: 20px;
    margin-bottom: 0;
}

.task-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    flex: 1;
}

.editorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr);
    gap: 18px;
    margin-bottom: 28px;
}

.editorial-main,
.editorial-side {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.editorial-main {
    overflow: hidden;
}

.editorial-copy {
    padding: 24px;
}

.editorial-side {
    display: grid;
    gap: 1px;
    overflow: hidden;
    background: var(--line);
}

.editorial-side article {
    padding: 22px;
    background: #fff;
}

.editorial-side h3 {
    margin-bottom: 8px;
}

.channel-stack {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}

.channel-band {
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(0, 1.15fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.channel-band:nth-child(even) .media-frame {
    order: 2;
}

.channel-band .media-frame {
    border: 0;
    border-radius: 0;
    min-height: 240px;
}

.channel-copy {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 18px;
}

.tag {
    border-radius: 8px;
    background: #EAF4FB;
    color: var(--steel);
    border: 1px solid rgba(30,111,184,.13);
    padding: 5px 9px;
    font-size: 13px;
    font-weight: 700;
}

.cast-craft {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.cast-craft-copy {
    display: grid;
    gap: 14px;
}

.node {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.node h3 {
    margin-bottom: 6px;
}

.topic-mosaic {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, auto);
    gap: 12px;
    margin-bottom: 28px;
}

.topic-tile {
    position: relative;
    min-height: 150px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #EDF5FA;
}

.topic-tile:nth-child(2),
.topic-tile:nth-child(5) {
    background: #E6F3EF;
}

.topic-tile:nth-child(3),
.topic-tile:nth-child(6) {
    background: #E9EEF4;
}

.topic-tile:nth-child(1),
.topic-tile:nth-child(4) {
    grid-column: span 2;
}

.topic-tile:nth-child(2) {
    grid-column: span 3;
}

.topic-tile:nth-child(3) {
    grid-column: span 1;
}

.topic-tile:nth-child(5),
.topic-tile:nth-child(6) {
    grid-column: span 2;
}

.topic-no {
    display: block;
    margin-bottom: 22px;
    color: var(--steel);
    font-size: 12px;
    font-weight: 900;
}

.topic-tile h3 {
    margin-bottom: 6px;
}

.topic-tile p {
    color: var(--muted);
    font-size: 14px;
}

.collect-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    margin-bottom: 28px;
}

.shelf-card,
.chart-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.shelf-copy,
.chart-copy {
    padding: 24px;
}

.shelf-slots {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    border-top: 3px solid var(--steel);
}

.shelf-slots a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
}

.chart-list {
    display: grid;
    gap: 11px;
    margin-top: 16px;
}

.chart-row {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 11px;
    align-items: start;
}

.chart-row strong {
    color: var(--steel);
    font-size: 24px;
    line-height: 1;
}

.lab-grid,
.boundary-grid,
.feature-grid,
.check-grid,
.flow-grid,
.info-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lab-card,
.boundary-card,
.feature-card,
.check-card,
.flow-step,
.info-card,
.related-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 22px;
}

.lab-card p,
.boundary-card p,
.feature-card p,
.check-card p,
.flow-step p,
.info-card p,
.related-card p {
    color: var(--muted);
}

.mobile-experience {
    display: grid;
    grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
    gap: 24px;
    align-items: center;
}

.app-icon-row {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.app-icon-row h2 {
    margin-bottom: 2px;
}

.feature-list {
    padding-left: 1.2em;
}

.feature-list li {
    margin-bottom: 8px;
}

.boundary-grid {
    margin-top: 18px;
}

.section-block {
    margin-bottom: 24px;
}

.section-block > :last-child {
    margin-bottom: 0;
}

.section-kicker {
    color: var(--steel);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .08em;
    margin-bottom: 6px;
}

.quote-note {
    padding: 18px 20px;
    border-left: 4px solid var(--mint);
    border-radius: 0 12px 12px 0;
    background: #EEF8F5;
    color: #2C4F4A;
}

.numbered-list {
    counter-reset: list;
    display: grid;
    gap: 13px;
    padding: 0;
    list-style: none;
}

.numbered-list li {
    counter-increment: list;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 12px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.numbered-list li::before {
    content: counter(list, decimal-leading-zero);
    color: var(--steel);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
}

.timeline-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 12px;
}

.timeline-column {
    min-height: 210px;
    padding: 18px;
    border-top: 4px solid var(--steel);
    border-radius: 12px;
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.timeline-column:nth-child(2) {
    border-top-color: var(--mint);
}

.timeline-column:nth-child(3) {
    border-top-color: #7895AF;
}

.timeline-column:nth-child(4) {
    border-top-color: var(--brand-light);
}

.timeline-column:nth-child(5) {
    border-top-color: #98AAB9;
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.magazine-card {
    min-height: 200px;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #EAF4FB;
}

.magazine-card:nth-child(2n) {
    background: #E9F5F1;
}

.magazine-card:nth-child(3n) {
    background: #EEF1F4;
}

.check-list {
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.check-list li {
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.check-list li::before {
    content: "✓";
    margin-right: 10px;
    color: var(--mint);
    font-weight: 900;
}

.policy-group {
    display: grid;
    gap: 14px;
}

.policy-item {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.policy-item h2 {
    font-size: 21px;
    margin-bottom: 8px;
}

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

.faq-list details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.faq-list summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 13px 18px;
    cursor: pointer;
    color: var(--ink);
    font-weight: 800;
}

.faq-list details p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--muted);
}

.cta-panel {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: linear-gradient(135deg, #E9F5FC, #F7FBFD);
}

.cta-panel h2 {
    margin-bottom: 8px;
}

.related-grid {
    margin-top: 14px;
}

.related-card {
    min-height: 100%;
}

.related-card a {
    font-weight: 800;
}

.density-demo {
    transition: padding .2s ease, line-height .2s ease;
}

.density-demo.is-compact {
    line-height: 1.55;
}

.density-demo.is-compact .lab-card {
    padding: 15px;
}

.site-footer {
    background: #13334E;
    color: #C9D9E6;
    padding: 54px 0 calc(48px + env(safe-area-inset-bottom));
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.footer-logo-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.footer-brand strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.footer-brand span {
    display: block;
    color: #9FC0D7;
    font-size: 12px;
    letter-spacing: .14em;
}

.footer-brand-name {
    color: #fff;
    font-weight: 800;
}

.footer-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 28px;
    padding: 30px 0;
}

.footer-groups h2 {
    color: #fff;
    font-size: 15px;
}

.footer-groups nav {
    display: grid;
    gap: 7px;
}

.footer-groups a {
    color: #BFD3E1;
    font-size: 14px;
}

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

.footer-note,
.copyright {
    color: #9FB8C9;
    font-size: 13px;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(16,38,58,.44);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.overlay.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.site-panel,
.search-dialog {
    position: fixed;
    z-index: 90;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: #F7FAFD;
    border: 1px solid var(--line);
    box-shadow: 0 24px 70px rgba(16,38,58,.24);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.site-panel {
    left: 50%;
    bottom: 18px;
    width: min(980px, calc(100% - 32px));
    max-height: 82vh;
    overflow: auto;
    transform: translate(-50%, 24px);
    border-radius: 18px;
    padding: 22px;
}

.search-dialog {
    left: 50%;
    top: 50%;
    width: min(650px, calc(100% - 32px));
    transform: translate(-50%, calc(-50% + 20px));
    border-radius: 16px;
    padding: 22px;
}

.site-panel.is-open,
.search-dialog.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.site-panel.is-open {
    transform: translate(-50%, 0);
}

.search-dialog.is-open {
    transform: translate(-50%, -50%);
}

.panel-head,
.search-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-brand h2,
.search-head h2 {
    margin: 0;
    font-size: 22px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.panel-group {
    min-width: 0;
}

.panel-group h3 {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.panel-item {
    min-height: 70px;
    display: block;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--text);
}

.panel-item:hover,
.panel-item.is-current {
    border-color: var(--line-strong);
    background: #EAF5FC;
}

.panel-item strong {
    display: block;
    color: var(--ink);
}

.panel-item span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.search-field {
    display: block;
}

.search-field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    padding: 0 15px;
}

.search-tip {
    color: var(--quiet);
    font-size: 13px;
    margin: 9px 0 14px;
}

.search-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
}

.search-presets a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
}

.search-presets a[hidden] {
    display: none;
}

.search-empty {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #EEF4F7;
    color: var(--muted);
}

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1080px) {
    .site-shell {
        grid-template-columns: 210px minmax(0,1fr);
        gap: 22px;
    }

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

    .topic-mosaic {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }

    .topic-tile,
    .topic-tile:nth-child(n) {
        grid-column: span 2;
    }

    .timeline-board {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (max-width: 960px) {
    .site-shell {
        grid-template-columns: 1fr;
    }

    .desktop-rail {
        display: none;
    }

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

@media (max-width: 760px) {
    :root {
        --topbar-h: 68px;
    }

    body {
        padding-bottom: calc(58px + env(safe-area-inset-bottom));
    }

    .topbar-inner,
    .site-shell,
    .footer-inner {
        width: calc(100% - 32px);
    }

    .brand-status,
    .top-app-link {
        display: none;
    }

    .top-actions {
        gap: 5px;
    }

    .icon-button {
        padding: 0 12px;
    }

    .site-main {
        padding-top: 22px;
    }

    .page-hero,
    .section-block,
    .brand-cover-content {
        padding: 22px 18px;
    }

    .task-strip,
    .editorial-grid,
    .cast-craft,
    .collect-grid,
    .mobile-experience,
    .lab-grid,
    .boundary-grid,
    .feature-grid,
    .check-grid,
    .flow-grid,
    .info-grid,
    .related-grid,
    .magazine-grid {
        grid-template-columns: 1fr;
    }

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

    .channel-band:nth-child(even) .media-frame {
        order: 0;
    }

    .channel-band .media-frame {
        min-height: 0;
        max-height: none;
    }

    .channel-band .media-frame img {
        height: auto;
        max-height: none;
    }

    .topic-mosaic {
        grid-template-columns: 1fr 1fr;
    }

    .topic-tile,
    .topic-tile:nth-child(n) {
        grid-column: span 1;
    }

    .timeline-board {
        grid-template-columns: 1fr;
    }

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

    .site-panel {
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 82vh;
        transform: translate(0, 30px);
        border-radius: 18px 18px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    }

    .site-panel.is-open {
        transform: translate(0, 0);
    }

    .panel-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .panel-item {
        min-height: 64px;
        padding: 10px;
    }

    .search-dialog {
        width: calc(100% - 32px);
        padding: 18px;
    }

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

    .mobile-bottom-nav {
        position: fixed;
        z-index: 60;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 58px;
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, minmax(0,1fr));
        background: rgba(247,250,253,.97);
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 28px rgba(16,38,58,.07);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
        text-align: center;
        padding: 6px 3px;
    }

    .mobile-bottom-nav a.is-current {
        color: #fff;
        background: var(--steel);
    }

    .site-footer {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .media-frame,
    .media-frame.banner-frame,
    .media-frame.app-frame {
        max-height: none;
        min-height: 0;
    }

    .media-frame img,
    .media-frame.banner-frame img,
    .media-frame.app-frame img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    .media-fallback,
    .banner-frame .media-fallback,
    .app-frame .media-fallback {
        min-height: 190px;
    }
}

@media (max-width: 480px) {
    .topbar-inner {
        gap: 8px;
    }

    .brand-text {
        font-size: 18px;
    }

    .icon-button {
        padding: 0 10px;
        font-size: 14px;
    }

    .task-strip,
    .topic-mosaic,
    .panel-grid,
    .footer-groups {
        grid-template-columns: 1fr;
    }

    .topic-tile {
        min-height: 130px;
    }

    .page-hero h1,
    .brand-cover h1 {
        font-size: 30px;
    }
}

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