:root {
  color-scheme: light;
  --shell-width: min(1396px, calc(100% - 44px));
  --hero-width: var(--shell-width);
  --topbar-width: var(--shell-width);
  --rail-width: 290px;
  --reader-width: minmax(0, 1fr);
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #eef3ee;
  --ink: #101715;
  --muted: #5f6f67;
  --faint: #8a9890;
  --line: #dce3dc;
  --line-strong: #c6d1c8;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d7eee8;
  --gold: #b7791f;
  --rose: #c2414b;
  --shadow: 0 18px 50px rgba(26, 36, 31, 0.08);
  --font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1412;
  --surface: #171f1c;
  --surface-soft: #111916;
  --ink: #eef5f1;
  --muted: #a7b5ae;
  --faint: #72827a;
  --line: #293631;
  --line-strong: #3a4a44;
  --accent: #63c7b4;
  --accent-strong: #86dccd;
  --accent-soft: rgba(99, 199, 180, 0.14);
  --gold: #f0bd62;
  --rose: #ff8b92;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.07) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.06) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.site-shell { min-height: 100vh; }
.progress { position: fixed; inset: 0 auto auto 0; z-index: 90; width: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--gold), var(--rose)); }

.topbar {
  position: sticky;
  top: 22px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: var(--topbar-width);
  min-height: 72px;
  margin: 16px auto 18px;
  padding: 9px 18px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, #ffffff);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.brand-wrap, .brand, .top-actions, .theme-trigger, .section-title-wrap, .side-community-head, .toolbox-item-head, .admin-actions { display: flex; align-items: center; min-width: 0; }
.brand-wrap { gap: 14px; min-width: 0; }
.brand { gap: 11px; min-width: 0; font-weight: 780; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); color: var(--accent-strong); font-weight: 900; }
.brand-copy { display: grid; gap: 1px; }
.brand-title { font-size: clamp(16px, 1vw, 18px); font-weight: 900; line-height: 1.2; }
.brand-subtitle, .theme-trigger-label, .side-label, .toolbox-label, .section-kicker, .contact-kicker, .side-community-eyebrow { color: var(--muted); font-size: 12px; font-weight: 800; }
.topbar-badge, .pill { width: fit-content; border-radius: 999px; padding: 5px 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 800; }
.top-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ghost-link, .theme-trigger, .button, .section-inline-btn, .toolbox-inline-link, .copy-chip, .copy-button { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 780; }
.ghost-link, .theme-trigger { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.theme-switcher { position: relative; }
.theme-trigger { gap: 10px; max-height: 62px; }
.theme-trigger-copy { display: grid; gap: 1px; text-align: left; }
.theme-trigger-value { font-size: 13px; }
.theme-icon { position: relative; width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 50%; color: var(--accent-strong); }
.theme-icon::after { content: ""; position: absolute; inset: -3px -7px -3px 7px; border-radius: 50%; background: var(--surface); }
[data-theme="dark"] .theme-icon::after { inset: 3px 3px auto auto; width: 5px; height: 5px; background: currentColor; }
.theme-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 90; width: min(280px, calc(100vw - 36px)); padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.theme-menu-title, .theme-menu-note { margin: 0; }
.theme-menu-note { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.theme-menu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.theme-option { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-weight: 760; }
.theme-option.is-active, .theme-option[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }

.hero { width: var(--hero-width); margin: 0 auto 18px; }
.hero-copy { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 25vw, 380px); gap: clamp(28px, 5vw, 96px); align-items: center; width: 100%; min-height: 540px; margin: 0 auto; padding: clamp(30px, 3.4vw, 56px) 30px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); }
.hero-main { display: grid; gap: 14px; max-width: 740px; }
.hero-kicker { width: fit-content; margin: 0; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 850; }
.hero h1 { max-width: 760px; margin: 0; color: var(--ink); font-size: clamp(48px, 4vw, 72px); line-height: 1.02; letter-spacing: 0; overflow-wrap: anywhere; }
.hero-lede { max-width: 700px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.78; }
.hero-note { display: inline-flex; width: fit-content; max-width: 700px; margin: 0; padding: 10px 13px; border-radius: 8px; background: var(--accent-soft); color: var(--muted); font-weight: 760; }
.hero-action-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; }
.hero-software-guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; max-width: 100%; margin: 0; }
.hero-software-title, .hero-software-tip { margin: 0; color: var(--muted); font-weight: 760; }
.hero-software-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.hero-software-link, .section-inline-btn, .toolbox-inline-link, .button.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 14px; border: 1px solid var(--accent-strong); border-radius: 8px; background: var(--accent-strong); color: #ffffff; font-weight: 800; line-height: 1.2; text-align: center; }
.hero-panel { align-self: stretch; display: grid; gap: 12px; align-content: center; min-height: 470px; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 26px 70px rgba(26, 36, 31, 0.1); }
.support-panel-block { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 14px; align-items: center; min-height: 206px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.support-panel-copy { display: grid; gap: 8px; min-width: 0; }
.support-panel-eyebrow { width: fit-content; margin: 0; padding: 5px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 850; }
.support-panel-copy h2 { margin: 0; color: var(--ink); font-size: 22px; line-height: 1.15; }
.support-panel-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.support-panel-button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 36px; padding: 7px 12px; border: 1px solid var(--accent-strong); border-radius: 8px; background: var(--accent-strong); color: #ffffff; font-size: 13px; font-weight: 850; line-height: 1.2; }
.support-panel-qr { display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; }
.support-panel-qr img { width: 96px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #ffffff; }

.layout { display: grid; grid-template-columns: var(--rail-width) var(--reader-width); justify-content: stretch; gap: 20px; width: var(--shell-width); margin: 0 auto; padding: 0 0 72px; align-items: start; }
.side-nav, .toolbox { position: sticky; top: 90px; display: grid; gap: 12px; max-height: calc(100vh - 112px); overflow: auto; }
.side-group, .toolbox-panel, .side-community-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 10px 28px rgba(26, 36, 31, 0.04); }
.tutorial-group { display: grid; gap: 18px; }
.tutorial-cluster { display: grid; gap: 6px; }
.side-label, .toolbox-label, .section-kicker { display: inline-flex; width: fit-content; min-height: 26px; align-items: center; padding: 4px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); }
.side-link, .side-group a { display: flex; align-items: center; width: 100%; min-width: 0; min-height: 34px; border: 0; border-radius: 8px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 720; line-height: 1.3; text-align: left; overflow-wrap: anywhere; word-break: break-word; }
.side-link.is-active, .side-link:hover, .side-group a.is-active, .side-group a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.side-community-card { display: grid; gap: 10px; }
.side-community-head { justify-content: space-between; gap: 10px; }
.side-community-card h3, .side-community-card p { margin: 0; }
.side-community-card p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.side-community-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #ffffff; font-size: 13px; font-weight: 800; }
.side-community-qr { display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }
.side-community-qr img { width: min(100%, 170px); max-height: 230px; object-fit: contain; }

.content { display: grid; gap: 18px; min-width: 0; }
.doc-section { position: relative; margin: 0; padding: 86px clamp(30px, 3vw, 44px) 34px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.doc-section:first-child { border-top: 1px solid var(--line); padding-top: 86px; }
.section-head { display: grid; gap: 14px; }
.section-title-wrap { justify-content: space-between; gap: 18px; align-items: flex-start; }
.doc-section h2, .download-panel h2 { margin: 0; color: var(--ink); font-size: clamp(32px, 3.8vw, 44px); line-height: 1.2; overflow-wrap: anywhere; }
.doc-section h2 { max-width: 900px; font-size: clamp(38px, 2.8vw, 48px); line-height: 1.1; }
.doc-section h3 { margin: 0 0 8px; color: var(--ink); font-size: 20px; line-height: 1.3; }
.doc-section > .section-kicker, .section-head > .section-kicker { position: absolute; top: 18px; left: 18px; min-height: 0; padding: 7px 16px 8px; border: 0; border-radius: 18px 18px 18px 6px; font-size: 16px; box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.section-intro { max-width: 820px; margin: 16px 0 22px; color: var(--muted); font-size: 16px; line-height: 1.72; }
.step-note { display: inline-flex; align-items: center; min-height: 34px; margin: 16px 0 0; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 760; line-height: 1.4; }
.steps { display: grid; gap: 18px; margin-top: 22px; }
.step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line)); border-radius: 20px; background: color-mix(in srgb, var(--surface) 94%, var(--surface-soft)); }
.step-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: #ffffff; font-weight: 850; box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 22%, transparent); }
.step-body { display: grid; gap: 12px; min-width: 0; }
.step-body p { margin: 0; color: var(--muted); }
.step-body > p + p { margin-top: 0; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.media-grid.single { grid-template-columns: 1fr; }
.shot { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.shot img { width: 100%; height: auto; object-fit: contain; background: var(--surface-soft); }
.shot figcaption { min-height: 44px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }

.download-panel { display: grid; gap: 10px; margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface)); }
.download-panel .section-kicker { min-height: 24px; padding: 3px 9px; border-radius: 7px; font-size: 11px; }
.download-panel h2 { font-size: clamp(24px, 2.5vw, 32px); line-height: 1.12; }
.download-panel .section-intro { max-width: 760px; margin: 4px 0 8px; font-size: 14px; line-height: 1.65; }
.download-grid, .step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.download-panel .download-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.download-card, .guide-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: none; }
.download-panel .download-card { gap: 7px; min-height: 92px; padding: 12px 14px; border-radius: 10px; }
.download-card strong, .guide-card h3 { color: var(--ink); }
.download-panel .download-card strong { font-size: 14px; line-height: 1.35; }
.download-card small, .guide-card p { color: var(--muted); line-height: 1.65; }
.download-panel .download-card small { font-size: 12px; line-height: 1.45; }
.download-panel .pill { padding: 3px 8px; font-size: 10px; line-height: 1.25; }
.guide-card h3, .guide-card p { margin: 0; }
.codex-start-check { position: relative; display: grid; gap: 14px; margin-top: 22px; padding: 76px 20px 20px; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 20px; background: color-mix(in srgb, var(--surface) 92%, var(--surface-soft)); }
.codex-start-check .section-kicker { position: absolute; top: 18px; left: 18px; min-height: 0; padding: 7px 16px 8px; border: 0; border-radius: 18px 18px 18px 6px; font-size: 16px; box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.codex-start-check h3, .codex-start-check p { margin: 0; }
.codex-start-check p { color: var(--muted); }
.pill.ok { background: var(--accent-soft); color: var(--accent-strong); }
.tabs { display: grid; gap: 18px; margin-top: 22px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tab-button { min-height: 36px; border: 0; border-radius: 8px; padding: 7px 13px; background: transparent; color: var(--muted); font-weight: 800; }
.tab-button.is-active { background: var(--accent-soft); color: var(--accent-strong); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.notice { display: flex; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 8px; background: color-mix(in srgb, #fff3d5 72%, var(--surface)); }
.notice-mark { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--surface); color: var(--gold); font-weight: 850; }
.copy-chip { display: inline-flex; align-items: center; width: 100%; min-height: 42px; margin-top: 10px; padding: 9px 12px; background: var(--surface-soft); color: var(--ink); font-family: var(--mono); font-size: 13px; line-height: 1.35; text-align: left; overflow-wrap: anywhere; }
.copy-chip::after { content: "\590d\5236"; margin-left: auto; color: var(--accent-strong); font-family: var(--font); font-size: 12px; font-weight: 820; }
.copy-chip.is-copied::after { content: "\5df2\590d\5236"; }
.code-card { overflow: hidden; margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; background: #111816; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.12); color: #aebbb5; font-size: 13px; font-weight: 760; }
.code-card pre { margin: 0; padding: 16px; overflow: auto; color: #e8f2ee; font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.copy-button { min-height: 30px; padding: 5px 10px; border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.05); color: #dff6f0; font-size: 12px; }
.copy-button::after { content: "\590d\5236"; }
.copy-button.is-copied::after { content: "\5df2\590d\5236"; }

.toolbox { gap: 14px; }
.toolbox-panel { display: grid; gap: 12px; }
.toolbox-copy-stack, .toolbox-item, .endpoint-block, .endpoint-stack { display: grid; gap: 12px; }
.toolbox-item { padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line)); border-radius: 8px; background: var(--surface); }
.toolbox-item-head { justify-content: space-between; gap: 10px; }
.toolbox-item-label, .endpoint-name { color: var(--ink); font-size: 14px; font-weight: 800; }
.toolbox-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.endpoint-row { position: relative; width: 100%; padding: 12px 78px 12px 14px; border: 0; border-radius: 8px; background: #182033; color: #f2f6ff; font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 1.4; text-align: left; word-break: break-all; }
.endpoint-row::after { content: "\70b9\51fb\590d\5236"; position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: rgba(242,246,255,0.72); font-family: var(--font); font-size: 10px; }
.endpoint-row.is-copied::after { content: "\5df2\590d\5236"; }

.footer { width: min(1480px, calc(100% - 36px)); margin: 0 auto 18px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow); }
.footer-brand { color: var(--ink); }
.lightbox, .contact-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(4, 8, 15, 0.72); }
.lightbox img { max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox button, .contact-close { position: absolute; top: 22px; right: 22px; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 24px; }
.contact-dialog { position: relative; display: grid; gap: 16px; width: min(760px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.contact-dialog h2, .contact-dialog p { margin: 0; }
.contact-intro { color: var(--muted); line-height: 1.75; }
.contact-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-qr-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; text-align: center; }
.contact-qr-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.contact-qr-grid figcaption { padding: 10px; color: #142033; }
.contact-group-link { color: var(--accent-strong); font-weight: 850; }
.error-page { width: min(720px, calc(100% - 32px)); margin: 18vh auto; }

@media (max-width: 1420px) {
  .hero-copy { width: 100%; min-height: 0; }
  .layout { grid-template-columns: 250px minmax(0, 1fr); justify-content: stretch; }
}
@media (max-width: 900px) {
  .topbar, .section-title-wrap, .footer-inner { align-items: flex-start; flex-direction: column; }
  .layout, .download-grid, .step-grid, .media-grid, .contact-qr-grid { grid-template-columns: 1fr; justify-content: stretch; }
  .hero-copy { grid-template-columns: 1fr; min-height: 0; }
  .hero-panel { min-height: 0; }
  .content { order: 1; }
  .side-nav { order: 2; }
  .side-nav { position: static; max-height: none; }
  .hero-action-row { grid-template-columns: 1fr; }
  .hero-software-guide { grid-template-columns: 1fr; }
  .hero h1 { font-size: 44px; }
  .doc-section h2, .download-panel h2 { font-size: 34px; }
}
@media (max-width: 680px) {
  .topbar, .hero, .layout, .footer { width: min(100% - 20px, 1400px); }
  .topbar { gap: 14px; padding: 8px 16px 12px; }
  .top-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .theme-switcher { grid-column: 1 / -1; justify-self: stretch; }
  .theme-trigger { min-height: 42px; }
  .theme-trigger-copy { display: block; }
  .theme-trigger-label { display: none; }
  .hero-copy { gap: 24px; min-height: 0; padding: 24px 18px; }
  .hero h1 { font-size: 32px; }
  .hero-lede { font-size: 15px; line-height: 1.55; }
  .hero-note { padding: 8px 11px; line-height: 1.55; }
  .hero-software-title, .hero-software-tip { line-height: 1.5; }
  .hero-software-links { display: grid; grid-template-columns: 1fr; }
  .hero-software-link, .ghost-link, .theme-trigger, .button { width: 100%; }
  .hero-software-link { min-height: 36px; padding-block: 7px; }
  .hero-panel { gap: 10px; min-height: 0; padding: 12px; }
  .support-panel-block { grid-template-columns: 1fr; min-height: 0; padding: 12px; }
  .support-panel-qr { display: none; }
  .support-panel-copy h2 { font-size: 20px; }
  .support-panel-button { width: 100%; }
  .step { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
}

/* 2026-07 visual token pass: match the mpltop document system more closely. */
:root {
  --shell-width: min(1394px, calc(100% - 44px));
  --hero-width: var(--shell-width);
  --topbar-width: var(--shell-width);
  --bg: #f6f7f4;
  --surface-soft: #edf1ec;
  --ink: #101715;
  --muted: #5f6f67;
  --faint: #8a9890;
  --line: #dce3dc;
  --line-strong: #c6d1c8;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d9eee9;
  --gold-soft: #fff3d5;
  --rose-soft: #fde7e8;
  --shadow: 0 18px 50px rgba(26, 36, 31, 0.08);
  --shadow-soft: 0 10px 30px rgba(26, 36, 31, 0.05);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
}

body {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.065) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.055) 0 1px, transparent 1px 100%),
    var(--bg);
  color: var(--ink);
}

.topbar {
  top: 23px;
  min-height: 80px;
  margin: 23px auto 22px;
  padding: 13px 18px;
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.brand-wrap {
  gap: 18px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  box-shadow: none;
}

.brand-title {
  font-size: 18px;
  line-height: 1.08;
}

.brand-subtitle {
  font-size: 12px;
  line-height: 1.2;
}

.topbar-badge,
.pill {
  padding: 5px 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  line-height: 1;
}

.ghost-link,
.theme-trigger,
.button,
.section-inline-btn,
.toolbox-inline-link,
.copy-chip,
.copy-button {
  border-color: var(--line);
  border-radius: var(--radius-sm);
}

.ghost-link,
.theme-trigger {
  min-height: 48px;
  padding: 8px 15px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.theme-trigger {
  min-width: 122px;
}

.theme-menu {
  border-radius: var(--radius-md);
}

.hero {
  margin: 0 auto 18px;
}

.hero-copy {
  grid-template-columns: minmax(0, 1fr) clamp(340px, 25.5vw, 360px);
  gap: clamp(28px, 5vw, 92px);
  min-height: 568px;
  padding: clamp(32px, 3.6vw, 50px) 30px;
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.74), transparent 32%),
    color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.hero-main {
  gap: 15px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.hero h1 {
  max-width: 820px;
  font-size: clamp(46px, 3.8vw, 60px);
  line-height: 1.06;
  font-weight: 900;
  text-wrap: balance;
}

.hero-lede {
  max-width: 750px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.hero-note {
  width: fit-content;
  max-width: 700px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--muted) 78%, var(--accent-strong));
  font-size: 15px;
  line-height: 1.62;
}

.hero-software-guide {
  gap: 9px;
  margin-top: 2px;
}

.hero-software-title,
.hero-software-tip {
  font-size: 15px;
  line-height: 1.55;
}

.hero-software-link,
.section-inline-btn,
.toolbox-inline-link,
.button.primary,
.support-panel-button {
  min-height: 42px;
  padding: 10px 16px;
  border-color: var(--accent-strong);
  border-radius: var(--radius-xs);
  background: var(--accent-strong);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.hero-software-link:nth-child(1) {
  border-color: #8ebcff;
  background: #89b8ff;
  color: #061321;
}

.hero-software-link:nth-child(2) {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.hero-software-link:nth-child(3) {
  border-color: color-mix(in srgb, var(--gold) 48%, var(--line));
  background: var(--gold-soft);
  color: var(--gold);
}

.hero-panel {
  position: relative;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 0;
  min-height: 470px;
  overflow: hidden;
  padding: 0;
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "客服与交流群";
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 820;
}

.hero-panel::after {
  content: "";
  position: absolute;
  top: 25px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: -16px 0 0 var(--gold), -32px 0 0 var(--rose);
}

.support-panel {
  align-content: stretch;
  padding-top: 56px;
}

.support-panel-block {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 14px;
  min-height: 207px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.support-panel-block:last-child {
  border-bottom: 0;
}

.support-panel-copy {
  gap: 7px;
}

.support-panel-eyebrow {
  min-height: 29px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.support-panel-copy h2 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
}

.support-panel-copy p {
  font-size: 13px;
  line-height: 1.55;
}

.support-panel-button {
  width: fit-content;
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.support-panel-qr {
  padding: 9px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
}

.support-panel-qr img {
  width: 96px;
  border-radius: var(--radius-xs);
}

.layout {
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  padding: 0 0 72px;
}

.side-nav,
.toolbox {
  top: 112px;
}

.side-group,
.toolbox-panel,
.side-community-card {
  padding: 14px;
  border-color: var(--line);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: none;
}

.tutorial-group {
  gap: 18px;
}

.tutorial-cluster {
  gap: 6px;
}

.side-label,
.toolbox-label,
.section-kicker {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
}

.side-link,
.side-group a {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  color: color-mix(in srgb, var(--muted) 84%, #465575);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.side-link.is-active,
.side-link:hover,
.side-group a.is-active,
.side-group a:hover {
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.content {
  gap: 18px;
}

.doc-section {
  padding: 76px clamp(28px, 3vw, 44px) 34px;
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.doc-section:first-child {
  padding-top: 76px;
}

.doc-section h2 {
  max-width: 920px;
  font-size: clamp(36px, 2.8vw, 44px);
  line-height: 1.12;
  font-weight: 900;
}

.doc-section h3 {
  font-size: 19px;
  line-height: 1.3;
}

.doc-section > .section-kicker,
.section-head > .section-kicker,
.codex-start-check .section-kicker {
  top: 18px;
  left: 18px;
  padding: 7px 16px 8px;
  border: 0;
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 18%, transparent);
  font-size: 15px;
}

.section-intro {
  max-width: 840px;
  font-size: 16px;
  line-height: 1.72;
}

.step {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-color: var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: none;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: none;
}

.download-panel {
  gap: 10px;
  padding: 16px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}

.download-card,
.guide-card,
.codex-start-check {
  border-color: var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: none;
}

.download-card,
.guide-card {
  padding: 18px;
}

.download-panel .download-card {
  min-height: 92px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
}

.tab-list,
.tab-button,
.notice,
.notice-mark,
.shot,
.code-card,
.copy-chip,
.copy-button,
.contact-dialog,
.contact-qr-grid figure {
  border-radius: var(--radius-xs);
}

.notice {
  background: var(--gold-soft);
  box-shadow: none;
}

.copy-chip {
  background: var(--surface-soft);
}

.footer {
  width: var(--shell-width);
}

.footer-inner {
  width: 100%;
  border-radius: 999px;
}

@media (max-width: 1420px) {
  .layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .topbar {
    top: 16px;
  }

  .hero-copy {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-panel {
    min-height: 0;
  }

  .side-nav {
    top: auto;
  }
}

@media (max-width: 680px) {
  .topbar,
  .hero,
  .layout,
  .footer {
    width: min(100% - 20px, 1400px);
  }

  .topbar {
    min-height: 0;
    margin: 15px auto 15px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .ghost-link,
  .theme-trigger {
    min-height: 40px;
    padding: 8px 12px;
  }

  .theme-trigger {
    min-width: 0;
  }

  .hero-copy {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }

  .hero h1 {
    font-size: 32px;
    line-height: 1.12;
  }

  .hero-panel::before {
    min-height: 52px;
  }

  .support-panel-block {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .doc-section {
    padding: 72px 18px 26px;
    border-radius: var(--radius-md);
  }

  .doc-section:first-child {
    padding-top: 72px;
  }

  .doc-section h2,
  .download-panel h2 {
    font-size: 28px;
  }

  .step {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .footer-inner {
    border-radius: var(--radius-md);
  }
}

/* 2026-07 mpltop dark replication pass. */
[data-theme="dark"] {
  --shell-width: min(1394px, calc(100% - 44px));
  --hero-width: var(--shell-width);
  --topbar-width: var(--shell-width);
  --rail-width: 290px;
  --bg: #162536;
  --surface: #111b2b;
  --surface-soft: #15223a;
  --ink: #f4f8ff;
  --muted: #b8c7dc;
  --faint: #8092ad;
  --line: #253653;
  --line-strong: #334a6f;
  --accent: #80aff8;
  --accent-strong: #91bbff;
  --accent-soft: #233b63;
  --gold: #f4b844;
  --gold-soft: rgba(244, 184, 68, 0.17);
  --rose: #ff7587;
  --rose-soft: rgba(255, 117, 135, 0.16);
  --shadow: 0 22px 62px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(77, 129, 187, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(128, 175, 248, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(128, 175, 248, 0.04) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: auto, 44px 44px, 44px 44px, auto;
  color: var(--ink);
}

[data-theme="dark"] .topbar {
  top: 23px;
  min-height: 80px;
  margin: 23px auto 22px;
  padding: 14px 18px;
  border: 1px solid #24364f;
  border-radius: 18px;
  background: #111b2b;
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .brand-mark {
  border: 0;
  background: #4c94ff;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(76, 148, 255, 0.24);
}

[data-theme="dark"] .brand-title,
[data-theme="dark"] .theme-trigger-value,
[data-theme="dark"] .ghost-link {
  color: var(--ink);
}

[data-theme="dark"] .brand-subtitle,
[data-theme="dark"] .theme-trigger-label {
  color: #b9c7dc;
}

[data-theme="dark"] .topbar-badge {
  background: #1e3559;
  color: #8fbaff;
}

[data-theme="dark"] .ghost-link,
[data-theme="dark"] .theme-trigger {
  min-height: 48px;
  border-color: #263850;
  border-radius: 18px;
  background: #101b2c;
  color: var(--ink);
}

[data-theme="dark"] .theme-icon::after {
  background: currentColor;
}

[data-theme="dark"] .theme-menu {
  border-color: var(--line);
  background: var(--surface);
}

[data-theme="dark"] .hero-copy {
  grid-template-columns: minmax(0, 1fr) clamp(340px, 24.5vw, 360px);
  min-height: 568px;
  padding: clamp(42px, 5vw, 72px) 30px;
  border-color: #253653;
  border-radius: 22px;
  background: #111b2b;
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .hero-kicker,
[data-theme="dark"] .side-label,
[data-theme="dark"] .toolbox-label,
[data-theme="dark"] .section-kicker,
[data-theme="dark"] .support-panel-eyebrow,
[data-theme="dark"] .pill.ok {
  background: #213961;
  color: #93bdff;
}

[data-theme="dark"] .hero-kicker::before {
  background: #6ca9ff;
}

[data-theme="dark"] .hero h1 {
  color: #f6f9ff;
  font-size: clamp(52px, 4.5vw, 70px);
  line-height: 1.04;
  font-weight: 900;
  max-width: 760px;
}

[data-theme="dark"] .hero-lede {
  color: #bfd0e8;
  font-size: 17px;
}

[data-theme="dark"] .hero-note {
  background: transparent;
  color: #bfd0e8;
  padding: 0;
  font-size: 16px;
}

[data-theme="dark"] .hero-software-title,
[data-theme="dark"] .hero-software-tip {
  color: #d0dded;
}

[data-theme="dark"] .hero-software-link,
[data-theme="dark"] .button.primary {
  min-height: 44px;
  border-radius: 14px;
  border-color: transparent;
  background: #86b4ff;
  color: #051324;
}

[data-theme="dark"] .hero-software-link:nth-child(2) {
  border-color: #2a3c56;
  background: #101b2c;
  color: #f5f8ff;
}

[data-theme="dark"] .hero-software-link:nth-child(3) {
  border-color: rgba(244, 184, 68, 0.58);
  background: rgba(244, 184, 68, 0.16);
  color: #ffcb62;
}

[data-theme="dark"] .hero-panel {
  min-height: 470px;
  border-color: #263850;
  border-radius: 8px;
  background: #121d30;
  box-shadow: none;
}

[data-theme="dark"] .hero-panel::before {
  border-bottom-color: #263850;
  color: #b9d2ff;
}

[data-theme="dark"] .support-panel-block {
  grid-template-columns: minmax(0, 1fr) 104px;
  min-height: 190px;
  border-bottom-color: #263850;
  background: #121d30;
}

[data-theme="dark"] .support-panel-block:first-of-type {
  padding-top: 18px;
}

[data-theme="dark"] .support-panel-copy h2 {
  color: #f6f9ff;
}

[data-theme="dark"] .support-panel-copy p {
  color: #b8c7dc;
}

[data-theme="dark"] .support-panel-button,
[data-theme="dark"] .section-inline-btn,
[data-theme="dark"] .toolbox-inline-link {
  border-color: #2a405f;
  border-radius: 12px;
  background: #17243a;
  color: #91bbff;
}

[data-theme="dark"] .support-panel-qr img {
  width: 88px;
}

[data-theme="dark"] .support-panel-qr {
  border-color: #263850;
  background: #0f1828;
}

[data-theme="dark"] .layout {
  gap: 22px;
}

[data-theme="dark"] .side-group,
[data-theme="dark"] .toolbox-panel,
[data-theme="dark"] .doc-section,
[data-theme="dark"] .download-card,
[data-theme="dark"] .guide-card,
[data-theme="dark"] .codex-start-check,
[data-theme="dark"] .download-panel {
  border-color: #253653;
  background: #111b2b;
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .side-link,
[data-theme="dark"] .side-group a {
  color: #b8c7dc;
}

[data-theme="dark"] .tutorial-group .tutorial-cluster:nth-child(1) .side-label {
  background: #24385c;
  color: #b7cbf0;
}

[data-theme="dark"] .tutorial-group .tutorial-cluster:nth-child(1) .side-link.is-active,
[data-theme="dark"] .tutorial-group .tutorial-cluster:nth-child(1) .side-link:hover {
  border-color: rgba(134, 180, 255, 0.16);
  background: #253b61;
  color: #eaf2ff;
}

[data-theme="dark"] .tutorial-group .tutorial-cluster:nth-child(2) .side-label {
  background: #233f48;
  color: #b8dcdf;
}

[data-theme="dark"] .tutorial-group .tutorial-cluster:nth-child(2) .side-link.is-active,
[data-theme="dark"] .tutorial-group .tutorial-cluster:nth-child(2) .side-link:hover {
  border-color: rgba(126, 196, 204, 0.16);
  background: #234149;
  color: #edf8f7;
}

[data-theme="dark"] .side-nav > .side-group:last-child .side-label {
  background: #403523;
  color: #f3d3a3;
}

[data-theme="dark"] .side-nav > .side-group:last-child a.is-active,
[data-theme="dark"] .side-nav > .side-group:last-child a:hover {
  border-color: rgba(244, 184, 68, 0.18);
  background: #463824;
  color: #fff4e2;
}

[data-theme="dark"] .doc-section {
  border-radius: 22px;
  padding-top: 86px;
}

[data-theme="dark"] .doc-section:first-child {
  padding-top: 86px;
}

[data-theme="dark"] .doc-section h2,
[data-theme="dark"] .download-panel h2,
[data-theme="dark"] .doc-section h3,
[data-theme="dark"] .download-card strong,
[data-theme="dark"] .guide-card h3 {
  color: #f6f9ff;
}

[data-theme="dark"] .section-intro,
[data-theme="dark"] .step-body p,
[data-theme="dark"] .download-card small,
[data-theme="dark"] .guide-card p {
  color: #b8c7dc;
}

[data-theme="dark"] .step {
  border-color: #253653;
  background: linear-gradient(180deg, #15233a 0%, #111b2b 100%);
}

[data-theme="dark"] .step-number {
  background: linear-gradient(135deg, #4096e8 0%, #2dd4bf 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(64, 150, 232, 0.24);
}

[data-theme="dark"] .download-panel {
  background: linear-gradient(180deg, #15233a 0%, #111b2b 100%);
}

[data-theme="dark"] .tab-list,
[data-theme="dark"] .shot,
[data-theme="dark"] .copy-chip,
[data-theme="dark"] .contact-dialog,
[data-theme="dark"] .contact-qr-grid figure {
  border-color: #253653;
  background: #111b2b;
}

[data-theme="dark"] .tab-button {
  color: #b8c7dc;
}

[data-theme="dark"] .tab-button.is-active {
  background: #213961;
  color: #93bdff;
}

[data-theme="dark"] .notice {
  border-color: rgba(244, 184, 68, 0.45);
  background: rgba(244, 184, 68, 0.15);
}

[data-theme="dark"] .notice strong {
  color: #fff4e2;
}

[data-theme="dark"] .notice-mark {
  background: #142033;
  color: #ffcb62;
}

[data-theme="dark"] .footer-inner {
  border-color: #253653;
  background: #111b2b;
  color: #b8c7dc;
}

[data-theme="dark"] .footer-brand {
  color: #f6f9ff;
}

@media (max-width: 900px) {
  [data-theme="dark"] .hero h1 {
    font-size: 52px;
  }
}

@media (max-width: 680px) {
  [data-theme="dark"] .topbar {
    top: 15px;
    margin: 15px auto 22px;
    border-radius: 16px;
  }

  [data-theme="dark"] .hero-copy,
  [data-theme="dark"] .doc-section {
    border-radius: 16px;
  }

  [data-theme="dark"] .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 24px 18px;
  }

  [data-theme="dark"] .hero h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  [data-theme="dark"] .hero-software-links {
    grid-template-columns: 1fr;
  }

  [data-theme="dark"] .hero-panel {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding-top: 52px;
  }

  [data-theme="dark"] .hero-panel::before {
    min-height: 52px;
  }

  [data-theme="dark"] .hero-panel::after {
    top: 21px;
  }

  [data-theme="dark"] .support-panel-block {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
}

.admin-body {
  background: #eef3f8;
  color: #142033;
}

.admin-shell {
  width: min(1680px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0;
}

.admin-login {
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
  margin: 10vh auto;
  border-radius: 18px;
  padding: 28px;
}

.admin-login h1,
.admin-topbar h1,
.editor-section h2 {
  margin: 0;
}

.admin-login p {
  margin: 8px 0 0;
  color: #667085;
  line-height: 1.7;
}

.admin-login label,
.editor-panel label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.admin-login input,
.editor-panel select,
.editor-panel input,
.editor-panel textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 11px 12px;
  background: #ffffff;
  color: #101828;
}

.editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.editor-section-head.compact {
  margin-top: 6px;
}

.editor-section-head h3,
.editor-section-head h4 {
  margin: 0;
}

.nested-list {
  display: grid;
  gap: 12px;
}

.nested-card {
  display: grid;
  gap: 12px;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  padding: 14px;
  background: #f8fbff;
}

.nested-card.mini {
  background: #ffffff;
}

.nested-card summary {
  cursor: pointer;
  color: #142033;
  font-weight: 900;
}

.nested-card > summary {
  position: sticky;
  top: 82px;
  z-index: 5;
  margin: -14px -14px 0;
  border-bottom: 1px solid #d0d5dd;
  border-radius: 14px 14px 0 0;
  padding: 12px 14px;
  background: #f8fbff;
}

.button.danger,
.button.ghost.danger {
  border-color: #fecaca;
  color: #b42318;
}

.editor-panel textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}

.editor-panel .json-area {
  min-height: 150px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
}

.editor-panel .json-area.tall {
  min-height: 360px;
}

.admin-topbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(238, 243, 248, 0.92);
  backdrop-filter: blur(14px);
}

.admin-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #f8fbff;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-nav {
  position: sticky;
  top: 106px;
  align-self: start;
}

.admin-nav-card {
  display: grid;
  gap: 10px;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.admin-nav-card nav,
.admin-nav-section {
  display: grid;
  gap: 6px;
}

.admin-nav-section {
  max-height: 34vh;
  overflow: auto;
  border-block: 1px solid #eef2f6;
  padding: 8px 0;
}

.admin-nav-link {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  background: transparent;
  color: #344054;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.admin-nav-link:hover,
.admin-nav-link:focus-visible {
  background: #eef4ff;
  color: #175cd3;
  outline: none;
}

.admin-nav-link.is-sub {
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.editor-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.editor-section {
  display: grid;
  gap: 14px;
  border-radius: 16px;
  padding: 18px;
  box-shadow: none;
}

.editor-section {
  grid-column: 1 / -1;
}

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

.editor-section > label,
.nested-card > label,
.nested-card.mini > label {
  min-width: 0;
}

.editor-section > label:has(textarea),
.nested-card > label:has(textarea),
.nested-card.mini > label:has(textarea) {
  grid-column: 1 / -1;
}

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

.nested-card.mini .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-list {
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  align-items: start;
}

.section-card {
  grid-column: 1 / -1;
}

.admin-bottom-actions {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  grid-column: 1 / -1;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(14px);
}

.editor-help {
  margin: 0;
  color: #667085;
  line-height: 1.6;
}

.button.ghost {
  background: #ffffff;
  color: #142033;
}

.error-page {
  width: min(720px, calc(100% - 32px));
  margin: 18vh auto;
}

@media (max-width: 1180px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
  }

  .admin-nav-card nav {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .admin-nav-section {
    max-height: 180px;
  }

  .editor-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .admin-topbar,
  .editor-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar,
  .admin-bottom-actions,
  .nested-card > summary {
    position: static;
  }

  .admin-actions,
  .admin-actions .button,
  .admin-status,
  .editor-section-actions,
  .editor-section-actions .button,
  .admin-bottom-actions,
  .admin-bottom-actions .button {
    width: 100%;
  }

  .form-grid,
  .nested-card .form-grid,
  .nested-card.mini .form-grid {
    grid-template-columns: 1fr;
  }
}

