:root {
    color-scheme: light;
    --page-x: clamp(32px, 5vw, 120px);
    --ink: #111827;
    --ink-soft: #34403d;
    --muted: #73807d;
    --paper: #f7f3e8;
    --paper-cool: #edf8f6;
    --white: rgba(255, 255, 255, 0.78);
    --white-solid: #fffdf8;
    --line: rgba(17, 24, 39, 0.12);
    --line-strong: rgba(17, 24, 39, 0.2);
    --teal: #12b8aa;
    --green: #75b83d;
    --blue: #4f7dff;
    --amber: #d88b22;
    --coral: #e56855;
    --shadow: 0 24px 72px rgba(43, 64, 60, 0.14);
    --shadow-light: 0 14px 38px rgba(43, 64, 60, 0.09);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    line-height: 1.6;
    background:
        linear-gradient(115deg, rgba(18, 184, 170, 0.13), transparent 30%),
        linear-gradient(250deg, rgba(79, 125, 255, 0.09), transparent 34%),
        linear-gradient(180deg, #fcfaf3 0%, #eff8f5 46%, #f8f1e7 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(rgba(17, 24, 39, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, 0.04) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, transparent 0 140px, rgba(18, 184, 170, 0.045) 140px 141px),
        repeating-linear-gradient(0deg, transparent 0 120px, rgba(216, 139, 34, 0.04) 120px 121px);
}

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

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

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

button {
    cursor: pointer;
}

main,
.site-header,
.site-footer,
.admin-header,
.admin-body main {
    width: calc(100% - (var(--page-x) * 2));
    margin-inline: auto;
}

.site-noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.12;
    background-image: repeating-linear-gradient(0deg, rgba(17, 24, 39, 0.06), rgba(17, 24, 39, 0.06) 1px, transparent 1px, transparent 4px);
}

.site-header,
.admin-header {
    position: sticky;
    top: 18px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
    margin-top: 18px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(24px) saturate(1.2);
    box-shadow: var(--shadow-light);
}

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

.brand-mark {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #112e2c, #14cbbb);
    color: white;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 16px 34px rgba(18, 184, 170, 0.25);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 10px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.1;
}

.brand small {
    max-width: 260px;
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a,
.admin-nav a,
.admin-nav button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--ink-soft);
    background: transparent;
    font-size: 0.92rem;
    font-weight: 760;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.admin-nav a:hover,
.admin-nav button:hover {
    color: #063f3a;
    background: rgba(18, 184, 170, 0.12);
    transform: translateY(-1px);
}

.admin-nav form {
    margin: 0;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--ink);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(520px, 0.9fr) minmax(560px, 1.1fr);
    gap: clamp(28px, 4.2vw, 84px);
    min-height: calc(100vh - 112px);
    padding: clamp(42px, 5.8vw, 96px) 0 clamp(48px, 6vw, 112px);
    align-items: center;
}

.hero::before {
    content: "";
    position: absolute;
    left: calc(var(--page-x) * -0.35);
    right: calc(var(--page-x) * -0.35);
    top: 8%;
    bottom: 8%;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 44px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, rgba(18, 184, 170, 0.08), transparent 34%, rgba(216, 139, 34, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
}

.eyebrow {
    margin: 0 0 18px;
    color: #078f85;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero h1,
.page-hero h1 {
    margin-bottom: 28px;
    color: var(--ink);
    font-size: clamp(4.2rem, 7.6vw, 10rem);
    line-height: 0.95;
    letter-spacing: 0;
    text-wrap: balance;
}

.hero h1 {
    max-width: 940px;
    font-size: clamp(4.2rem, 6vw, 8rem);
    white-space: nowrap;
    background: linear-gradient(105deg, #111827 0%, #116d67 56%, #c17a1e 100%);
    background-clip: text;
    color: transparent;
}

.hero-copy,
.page-hero p {
    max-width: 760px;
    color: var(--ink-soft);
    font-size: clamp(1.02rem, 1.25vw, 1.28rem);
}

.hero-actions,
.install-actions,
.form-actions,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
    font-weight: 850;
    box-shadow: 0 10px 26px rgba(43, 64, 60, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(43, 64, 60, 0.16);
}

.button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #18c7b8, #8ec942);
    color: #08231f;
}

.text-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #078f85;
    font-weight: 900;
}

.hero-system {
    position: relative;
    min-height: clamp(560px, 66vh, 820px);
    overflow: hidden;
    padding: clamp(24px, 2.6vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 42px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 248, 246, 0.76)),
        linear-gradient(300deg, rgba(216, 139, 34, 0.11), transparent 42%);
    box-shadow: var(--shadow);
    isolation: isolate;
    transform: perspective(1200px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
    transition: transform 200ms ease;
}

.hero-system::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(18, 184, 170, 0.16);
    border-radius: 30px;
    pointer-events: none;
}

.hero-system::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
}

.system-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.system-topline strong {
    color: #0f8278;
}

.orbit-board {
    position: relative;
    height: clamp(300px, 38vh, 440px);
    margin: clamp(26px, 4vw, 52px) 0 28px;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(18, 184, 170, 0.24);
    border-radius: 999px;
    animation: orbit-spin 18s linear infinite;
}

.orbit-a {
    inset: 12% 22% 13% 12%;
}

.orbit-b {
    inset: 0 8% 0 26%;
    border-color: rgba(79, 125, 255, 0.18);
    animation-duration: 24s;
    animation-direction: reverse;
}

.orbit-c {
    inset: 22% 4% 20% 38%;
    border-style: dashed;
    border-color: rgba(216, 139, 34, 0.28);
    animation-duration: 30s;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.node {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 8px rgba(18, 184, 170, 0.13), 0 0 32px rgba(18, 184, 170, 0.35);
}

.node-a { top: 18%; left: 30%; }
.node-b { top: 38%; right: 19%; background: var(--amber); }
.node-c { bottom: 19%; left: 18%; background: var(--blue); }
.node-d { bottom: 28%; right: 35%; background: var(--teal); }

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

.system-grid article,
.system-focus {
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-light);
}

.system-grid article {
    padding: 20px;
}

.system-grid span,
.panel-label {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--amber);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.system-grid strong {
    display: block;
    color: #0b756d;
    font-size: clamp(2rem, 3vw, 3.6rem);
    line-height: 1;
}

.system-grid p,
.system-focus p {
    margin-bottom: 0;
    color: var(--muted);
}

.system-focus {
    margin-top: 14px;
    padding: 22px;
}

.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: -22px;
}

.stats-band div {
    padding: clamp(24px, 2.6vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(18px);
}

.stats-band strong {
    display: block;
    margin-bottom: 6px;
    color: #0d746c;
    font-size: clamp(2.3rem, 3.7vw, 4.4rem);
    line-height: 1;
}

.stats-band span,
.muted,
.article-row p,
.project-card p,
.topic-card p,
.resource-card p,
.timeline-list p,
.timeline-line p,
.side-panel p,
.side-panel dd {
    color: var(--muted);
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(36px, 5vw, 92px);
    padding: clamp(86px, 8vw, 136px) 0;
    align-items: start;
}

.section-grid.reverse {
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
}

.section-grid.reverse .section-heading {
    order: 2;
}

.section-heading {
    position: sticky;
    top: 120px;
}

.section-heading h2 {
    margin-bottom: 18px;
    font-size: clamp(2.6rem, 4.8vw, 6.4rem);
    line-height: 0.96;
    letter-spacing: 0;
    text-wrap: balance;
}

.section-heading p {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.04rem;
}

.section-heading.horizontal,
.admin-panel-head,
.admin-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-heading.horizontal {
    position: static;
}

.card-grid,
.project-strip,
.project-index,
.resource-grid {
    display: grid;
    gap: 18px;
}

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

.topic-card,
.project-card,
.article-row,
.admin-card,
.resource-card,
.timeline-list article,
.timeline-line article,
.message-list article,
.content-band,
.prose-panel,
.side-panel,
.contact-form,
.search-panel,
.admin-panel,
.install-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(18px);
}

.topic-card,
.project-card,
.article-row,
.resource-card,
.admin-card {
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.topic-card:hover,
.project-card:hover,
.article-row:hover,
.admin-card:hover,
.resource-card:hover {
    transform: translateY(-7px);
    border-color: rgba(18, 184, 170, 0.35);
    box-shadow: 0 28px 70px rgba(43, 64, 60, 0.16);
}

.topic-card {
    min-height: 260px;
    padding: 28px;
}

.topic-card > span {
    display: block;
    width: 54px;
    height: 6px;
    margin-bottom: 28px;
    border-radius: 99px;
    background: var(--accent, var(--teal));
}

.topic-card h2,
.topic-card h3,
.project-card h2,
.project-card h3,
.article-row h2,
.article-row h3,
.resource-card h2 {
    margin-bottom: 12px;
    line-height: 1.15;
}

.topic-card.large,
.project-card.large {
    min-height: 310px;
}

.topic-index,
.project-index,
.resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 46px 0 108px;
}

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

.project-card {
    min-height: 250px;
    padding: 30px;
}

.project-card::after {
    content: "";
    position: absolute;
    inset: auto 26px 24px auto;
    width: 96px;
    height: 96px;
    border: 1px solid color-mix(in srgb, var(--accent, var(--teal)) 38%, transparent);
    border-radius: 28px;
    transform: rotate(12deg);
}

.project-card span,
.resource-card span,
.timeline-list span,
.article-row span,
.message-list span {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 900;
}

.project-card small,
.message-list small {
    color: #82908e;
}

.content-band {
    padding: clamp(28px, 4vw, 62px);
}

.article-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.article-list.full {
    width: 100%;
    padding: 44px 0 108px;
}

.article-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 120px;
    gap: 22px;
    padding: 24px;
    align-items: start;
}

.article-row h2,
.article-row h3 {
    margin: 0;
}

.article-row p {
    grid-column: 2 / 3;
    margin: -8px 0 0;
}

.article-row time {
    color: #82908e;
    text-align: right;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-list span {
    display: inline-flex;
    padding: 5px 10px;
    border: 1px solid rgba(18, 184, 170, 0.2);
    border-radius: 999px;
    color: #32736e;
    background: rgba(18, 184, 170, 0.08);
    font-size: 0.76rem;
}

.timeline-preview,
.timeline-list,
.contact-layout,
.readable-layout {
    padding: clamp(76px, 8vw, 120px) 0;
}

.timeline-line {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.timeline-line article,
.timeline-list article,
.message-list article {
    padding: 24px;
}

.timeline-line time,
.timeline-list time {
    color: #078f85;
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 34px;
    padding: clamp(62px, 7vw, 112px);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 38px;
    background:
        linear-gradient(115deg, rgba(255,255,255,0.9), rgba(237,248,246,0.7)),
        linear-gradient(290deg, rgba(216,139,34,0.13), transparent 50%);
    box-shadow: var(--shadow-light);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(18, 184, 170, 0.13);
    border-radius: 28px;
    pointer-events: none;
}

.page-hero.compact h1 {
    font-size: clamp(3rem, 6.4vw, 7.8rem);
}

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

.prose-panel,
.side-panel,
.contact-form,
.search-panel {
    padding: clamp(24px, 3vw, 44px);
}

.prose-panel {
    max-width: min(980px, 100%);
    justify-self: stretch;
}

.prose-panel.accented {
    border-top: 7px solid var(--accent, var(--teal));
}

.prose-panel h1,
.prose-panel h2,
.prose-panel h3 {
    margin: 34px 0 12px;
}

.prose-panel p,
.prose-panel li {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.prose-panel ul {
    padding-left: 20px;
}

.side-panel {
    position: sticky;
    top: 120px;
}

.side-panel dl {
    display: grid;
    gap: 18px;
    margin: 0;
}

.side-panel dt {
    color: var(--amber);
    font-weight: 900;
}

.side-panel dd {
    margin: 4px 0 0;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    color: var(--muted);
}

.resource-card {
    min-height: 260px;
    padding: 28px;
}

.timeline-list {
    display: grid;
    gap: 20px;
}

.timeline-list article {
    border-left: 6px solid rgba(18, 184, 170, 0.22);
}

.contact-form,
.form-grid,
.admin-form,
.search-form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
}

label span {
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 850;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 16px;
    padding: 13px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(18, 184, 170, 0.68);
    background: white;
    box-shadow: 0 0 0 4px rgba(18, 184, 170, 0.12);
}

.notice {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.72);
}

.notice-success {
    border-color: rgba(18, 184, 170, 0.45);
    background: rgba(18, 184, 170, 0.1);
}

.notice-error {
    border-color: rgba(229, 104, 85, 0.48);
    background: rgba(229, 104, 85, 0.1);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 42px 0 54px;
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 4px 0 0;
    color: var(--muted);
}

.footer-search {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    gap: 8px;
}

.footer-search button,
.search-form button,
.admin-nav button,
.table-actions button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--ink);
    background: rgba(255,255,255,0.76);
}

.center-panel {
    min-height: 320px;
    display: grid;
    place-items: center;
}

.install-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.install-shell {
    width: min(780px, calc(100% - 40px));
    margin: 0 auto;
}

.install-card {
    padding: clamp(28px, 4vw, 52px);
}

.install-mark {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 28px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #173c39, #12c9ba);
    color: white;
    font-weight: 900;
}

.admin-shell {
    padding: 46px 0 88px;
}

.admin-title {
    margin-bottom: 26px;
}

.admin-title h1 {
    margin-bottom: 0;
    font-size: clamp(2.4rem, 4vw, 4.8rem);
    line-height: 0.95;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.admin-card {
    min-height: 140px;
    padding: 22px;
}

.admin-card span {
    color: var(--muted);
}

.admin-card strong {
    display: block;
    margin-top: 18px;
    color: #0c746d;
    font-size: 2.6rem;
    line-height: 1;
}

.admin-panel {
    padding: 26px;
    margin-top: 18px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

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

.admin-table th {
    color: var(--amber);
    font-size: 0.86rem;
}

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

.table-actions form {
    margin: 0;
}

.table-actions a,
.table-actions button {
    color: #078f85;
    font-size: 0.9rem;
}

.table-actions button {
    color: var(--coral);
}

.admin-form {
    max-width: 980px;
    padding: 28px;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-field input {
    width: auto;
}

label small {
    color: #82908e;
}

.message-list {
    display: grid;
    gap: 18px;
}

.admin-message-list article {
    padding: 22px;
}

.search-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.reveal-ready {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal-ready.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 1880px) {
    :root {
        --page-x: 132px;
    }

    .hero {
        grid-template-columns: minmax(620px, 0.88fr) minmax(780px, 1.12fr);
    }
}

@media (max-width: 1180px) {
    :root {
        --page-x: 28px;
    }

    .hero,
    .section-grid,
    .section-grid.reverse,
    .readable-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .section-grid.reverse .section-heading {
        order: initial;
    }

    .section-heading,
    .side-panel {
        position: static;
    }

    .card-grid,
    .topic-index,
    .project-index,
    .resource-grid,
    .timeline-line {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    :root {
        --page-x: 14px;
    }

    .site-header,
    .admin-header {
        top: 8px;
        margin-top: 8px;
        align-items: flex-start;
        border-radius: 22px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid rgba(255,255,255,0.88);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: var(--shadow-light);
    }

    .site-nav.is-open {
        display: flex;
    }

    .admin-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .hero {
        min-height: auto;
        padding: 52px 0 48px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 3.2rem;
        white-space: normal;
    }

    .hero-system {
        min-height: 520px;
        border-radius: 26px;
    }

    .system-grid,
    .stats-band,
    .card-grid,
    .topic-index,
    .project-index,
    .resource-grid,
    .timeline-line,
    .project-strip,
    .admin-cards {
        grid-template-columns: 1fr;
    }

    .article-row {
        grid-template-columns: 1fr;
    }

    .article-row p,
    .article-row time {
        grid-column: auto;
        text-align: left;
    }

    .content-band,
    .install-card,
    .prose-panel,
    .side-panel,
    .contact-form,
    .search-panel,
    .admin-panel,
    .admin-form,
    .page-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .site-footer,
    .section-heading.horizontal,
    .admin-panel-head,
    .admin-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-search,
    .search-form {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .table-panel {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 720px;
    }
}

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