:root {
  --paper: #f6f5f1;
  --paper-soft: #faf8f4;
  --paper-raise: #ecebe6;
  --ink: #151716;
  --ink-muted: #4a4a46;
  --ink-dim: #8d918a;
  --line: #1a1a1a14;
  --line-strong: #1a1a1a2b;
  --sky: #8fafc1;
  --sky-deep: #4f7f99;
  --sky-soft: #dce8ed;
  --sky-wash: #edf5f7;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.mono { font-family: var(--mono); letter-spacing: 0.06em; }
.dim { color: var(--ink-dim); }

/* ── Masthead ───────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 700;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-soft) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.04);
  backdrop-filter: blur(18px) saturate(1.04);
  box-shadow: 0 12px 42px #1517160c;
}
.masthead-row { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 0; }
.brand { display: inline-flex; align-items: center; gap: 14px; min-height: 34px; font-weight: 700; }
.brand img { width: 148px; height: 32px; object-fit: contain; display: block; }
.brand .sub { color: var(--ink); font-size: 17px; font-weight: 760; line-height: 1; }
.masthead-nav { display: flex; align-items: center; gap: 8px; }
.masthead-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--ink) 76%, transparent);
  font-weight: 680;
  transition:
    background-color 180ms var(--ease-out-quart),
    color 180ms var(--ease-out-quart),
    box-shadow 180ms var(--ease-out-quart);
}
.masthead-nav a:hover { color: var(--ink); background: var(--sky-wash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sky-deep) 18%, transparent); }
.masthead-nav a.here { color: var(--ink); background: color-mix(in srgb, var(--sky-wash) 72%, transparent); }
body[data-page="login"] .masthead .wrap,
body[data-page="register"] .masthead .wrap,
body[data-page="authorize"] .masthead .wrap {
  max-width: none;
  padding-left: clamp(24px, 4vw, 64px);
  padding-right: clamp(24px, 4vw, 64px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 180ms var(--ease-out-quart),
    opacity 180ms var(--ease-out-quart);
}
.menu-scrim,
.mobile-menu-panel,
.console-mobile-header {
  display: none;
}
html.menu-open,
body.menu-open,
body.console-menu-open {
  overflow: hidden;
}

.meta-strip { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.meta-strip span:first-child { color: var(--sky-deep); }

/* ── Page head ──────────────────────────────── */
.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); position: relative; }
.ph-index { display: flex; gap: 20px; align-items: baseline; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: clamp(24px, 3.5vw, 44px); }
.ph-index span:first-child { color: var(--sky-deep); }
.page-head h1 { margin: 0; font-size: clamp(40px, 6vw, 82px); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; max-width: 18ch; }
.lede { margin: clamp(22px, 3vw, 34px) 0 0; max-width: 62ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-muted); }
.ph-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: clamp(28px, 4vw, 44px); }

/* ── Buttons / links ────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper-soft); font-size: 15px; font-weight: 600; transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.btn i { font-style: normal; color: var(--sky-deep); transition: transform 0.2s var(--ease); }
.btn:hover { border-color: var(--sky); background: var(--sky-wash); }
.btn:hover i { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary i { color: var(--sky); }
.btn-primary:hover { background: #202321; border-color: #202321; }
.act { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; padding-bottom: 4px; border-bottom: 1px solid var(--line-strong); transition: border-color 0.2s, gap 0.2s; }
.act i { font-style: normal; color: var(--sky-deep); transition: transform 0.2s var(--ease); }
.act:hover { border-color: var(--ink); }
.act:hover i { transform: translateX(4px); }

/* ── Section ────────────────────────────────── */
.block { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line-strong); }
.block-head { display: grid; grid-template-columns: clamp(52px, 6vw, 96px) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: start; margin-bottom: clamp(32px, 4.5vw, 56px); }
.idx { font-family: var(--mono); font-size: clamp(22px, 3.2vw, 46px); color: var(--sky-deep); letter-spacing: 0.02em; }
.kicker { margin: 0 0 12px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.block-head h2 { margin: 0; font-size: clamp(28px, 4vw, 52px); font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; }
.block-head .lede { margin-top: 16px; }

/* ── Card grid ──────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.card { display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 2.6vw, 34px); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); min-height: 188px; transition: background 0.2s; }
.card:hover { background: var(--sky-wash); }
a.card:hover { background: var(--sky-wash); }
.card-no { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-dim); }
.card .ti { font-size: 22px; color: var(--sky-deep); margin-bottom: 4px; }
.card h3 { margin: 4px 0 0; font-size: clamp(18px, 2vw, 23px); font-weight: 700; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-muted); font-size: 15px; }
.card-link { margin-top: auto; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--sky-deep); }

/* ── Spec / key-value ───────────────────────── */
.spec { margin: 0; display: grid; border-top: 1px solid var(--line-strong); }
.spec div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px clamp(4px, 1vw, 14px); border-bottom: 1px solid var(--line-strong); }
.spec dt { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.spec dd { margin: 0; font-size: 15px; color: var(--ink); text-align: right; }
.spec dd.mono { font-family: var(--mono); font-size: 14px; }

/* ── Table ──────────────────────────────────── */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-strong); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { text-align: left; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-dim); font-weight: 400; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line-strong); }
table.data td { padding: 15px 18px 15px 0; border-bottom: 1px solid var(--line-strong); vertical-align: top; color: var(--ink-muted); }
table.data td:first-child { color: var(--ink); }
table.data td.mono, table.data .path { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
table.data td.actions-cell { min-width: 190px; padding-right: 0; vertical-align: middle; }
.oricode-plans-table { min-width: 1040px; }
.oricode-subscribers-table { min-width: 1320px; table-layout: fixed; }
.oricode-subscribers-table th, .oricode-subscribers-table td { overflow: hidden; }
.oricode-subscribers-table select { max-width: 100%; }
.oricode-subscribers-table th:nth-child(1), .oricode-subscribers-table td:nth-child(1) { width: 260px; }
.oricode-subscribers-table th:nth-child(2), .oricode-subscribers-table td:nth-child(2) { width: 126px; }
.oricode-subscribers-table th:nth-child(3), .oricode-subscribers-table td:nth-child(3) { width: 112px; }
.oricode-subscribers-table th:nth-child(4), .oricode-subscribers-table td:nth-child(4),
.oricode-subscribers-table th:nth-child(5), .oricode-subscribers-table td:nth-child(5) { width: 160px; }
.oricode-subscribers-table th:nth-child(6), .oricode-subscribers-table td:nth-child(6) { width: 152px; }
.oricode-subscribers-table th:nth-child(7), .oricode-subscribers-table td:nth-child(7) { width: 150px; }
.oricode-subscribers-table th:nth-child(8), .oricode-subscribers-table td:nth-child(8) { width: 180px; }

/* ── Code block ─────────────────────────────── */
.code { border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--paper-soft); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--ink-dim); background: var(--paper-raise); }
.code pre { margin: 0; padding: 18px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.code .tok-key { color: var(--sky-deep); }
.code .tok-dim { color: var(--ink-dim); }

/* ── Badge ──────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; background: var(--sky-soft); color: var(--sky-deep); white-space: nowrap; }
.badge-ink { background: var(--paper-raise); color: var(--ink-muted); }
.badge-method { min-width: 52px; justify-content: center; background: var(--ink); color: var(--paper); }

/* ── Index list ─────────────────────────────── */
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.index-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: clamp(14px, 3vw, 36px); align-items: center; padding: clamp(20px, 2.6vw, 28px) clamp(6px, 1.5vw, 16px); border-bottom: 1px solid var(--line-strong); transition: background 0.2s; }
.index-list li:hover { background: var(--paper-soft); }
.li-no { font-family: var(--mono); font-size: 14px; color: var(--ink-dim); }
.li-main h3 { margin: 0; font-size: clamp(18px, 2vw, 24px); font-weight: 700; }
.li-main p { margin: 7px 0 0; font-size: 15px; color: var(--ink-muted); max-width: 64ch; }

/* ── Note / callout ─────────────────────────── */
.note { display: flex; gap: 12px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper-soft); font-size: 14.5px; color: var(--ink-muted); }
.note .ti { color: var(--sky-deep); font-size: 19px; flex-shrink: 0; }
.note strong { color: var(--ink); font-weight: 600; }

/* ── Two-column layout ──────────────────────── */
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

/* ── Dark CTA band ──────────────────────────── */
.dark { position: relative; color: var(--paper-soft); padding: clamp(72px, 10vw, 130px) 0; }
.dark::before { content: ""; position: absolute; z-index: 0; inset: 0; left: 50%; transform: translateX(-50%); width: 100vw; background: var(--ink); }
.dark > * { position: relative; z-index: 1; }
.dark .kicker { color: var(--sky); }
.dark h2 { margin: 0; font-size: clamp(30px, 4.6vw, 60px); font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; color: var(--paper); max-width: 20ch; }
.dark p { color: rgba(246, 245, 241, 0.7); max-width: 56ch; font-size: clamp(16px, 1.6vw, 19px); margin: 18px 0 0; }
.dark .ph-actions { margin-top: clamp(28px, 4vw, 44px); }
.dark .btn { background: transparent; color: var(--paper); border-color: rgba(246, 245, 241, 0.3); }
.dark .btn:hover { border-color: var(--sky); background: rgba(143, 175, 193, 0.12); }
.dark .btn i { color: var(--sky); }
.dark .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dark .btn-primary i { color: var(--sky-deep); }
.dark .btn-primary:hover { background: #fff; border-color: #fff; }
.dark .act { color: var(--paper); border-bottom-color: rgba(246, 245, 241, 0.32); }
.dark .act i { color: var(--sky); }

/* ── Colophon ───────────────────────────────── */
.colophon { border-top: 1px solid var(--line-strong); background: var(--paper-soft); padding: clamp(44px, 6vw, 72px) 0 36px; }
.colo-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 64px); }
.colo-brand h2 { margin: 0; font-size: clamp(20px, 2.2vw, 27px); font-weight: 800; letter-spacing: -0.01em; }
.colo-brand p { margin: 12px 0 0; color: var(--ink-dim); font-size: 14.5px; max-width: 32ch; }
.colo-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.colo-cols h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); font-weight: 400; }
.colo-cols a { display: block; padding: 6px 0; font-size: 14px; color: var(--ink-muted); transition: color 0.2s; }
.colo-cols a:hover { color: var(--ink); }
.colo-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(36px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--line-strong); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .colo-top { grid-template-columns: 1fr; }
  .colo-cols { grid-template-columns: repeat(2, 1fr); }
  .index-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .block-head { grid-template-columns: 40px minmax(0, 1fr); }
  .meta-strip { flex-wrap: wrap; }
}

/* ── Auth shell (login / register) ──────────── */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); min-height: calc(100vh - 64px); border-top: 1px solid var(--line-strong); }
.auth-aside { position: relative; padding: clamp(40px, 5vw, 76px) clamp(24px, 4vw, 64px); border-right: 1px solid var(--line-strong); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; overflow: hidden; }
.a-index { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-deep); }
.auth-aside h2 { margin: 18px 0 0; font-size: clamp(28px, 3.2vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; max-width: 13ch; }
.a-note { margin: 16px 0 0; color: var(--ink-muted); font-size: 16px; max-width: 32ch; }
.a-foot { position: relative; z-index: 1; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); display: grid; gap: 6px; }
.auth-aside .ring-mark { position: absolute; right: -70px; bottom: -50px; width: 320px; height: auto; overflow: visible; z-index: 0; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(40px, 5vw, 72px) clamp(24px, 4vw, 56px); }
.auth-card { width: 100%; max-width: 412px; }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.sub-line { margin: 0 0 30px; color: var(--ink-muted); font-size: 14.5px; }
.sub-line a, .auth-foot a, .check a, .field .label-row a, .link-button { color: var(--sky-deep); border-bottom: 1px solid var(--line-strong); }
.register-card { max-width: 500px; }
.auth-slide-surface { position: relative; min-height: var(--auth-slide-height, 338px); }
.auth-slide-surface.is-sliding { overflow: hidden; }
.auth-slide-surface.is-sliding > .register-step,
.auth-slide-surface.is-sliding > .auth-slide-page {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: var(--auth-slide-height, 338px);
  background: var(--paper);
  backface-visibility: hidden;
  contain: paint;
  will-change: transform;
}
.auth-slide-page { min-height: 338px; }
.register-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 24px; }
.register-progress span { min-width: 0; padding: 8px 5px; border-bottom: 1px solid var(--line-strong); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-dim); text-align: center; }
.register-progress span.active { color: var(--ink); border-color: var(--sky-deep); background: var(--sky-wash); }
.register-step { min-height: 338px; }
.register-step[hidden] { display: none; }
.step-kicker { margin: 0 0 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--sky-deep); text-transform: uppercase; }
.register-step h1 { margin-bottom: 12px; font-size: 34px; line-height: 1.12; }
.step-copy, .welcome-line { margin: 0 0 24px; color: var(--ink-muted); font-size: 16px; line-height: 1.6; }
.welcome-line { font-size: 20px; color: var(--ink); }
.step-actions { display: grid; gap: 14px; margin-top: 6px; }
.step-actions .more { justify-self: center; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label, .label-row span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a, .link-button { font-size: 11px; }
.link-button { appearance: none; border-width: 0 0 1px; background: transparent; padding: 0; font: inherit; cursor: pointer; }
.link-button:disabled { color: var(--ink-dim); cursor: not-allowed; opacity: 0.6; }
.field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper-soft); font-family: var(--sans); font-size: 15px; color: var(--ink); transition: border-color 0.2s, background 0.2s; }
.field textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper-soft); font-family: var(--sans); font-size: 15px; color: var(--ink); resize: vertical; transition: border-color 0.2s, background 0.2s; }
.field input:focus, .field textarea:focus, .field select:focus, .toolbar input:focus, #user-search:focus, .compact:focus { outline: none; border-color: var(--sky-deep); background: #fff; }
.field input::placeholder { color: var(--ink-dim); }
.field .hint { font-size: 12px; color: var(--ink-dim); }
.field select, .toolbar input, #user-search, .compact { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); font-family: var(--sans); font-size: 14px; color: var(--ink); transition: border-color 0.2s, background 0.2s; }
.field select { height: 48px; }
.field select[multiple] { height: auto; min-height: 96px; padding: 8px 12px; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-muted); margin: 4px 0 20px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--sky-deep); flex-shrink: 0; }

.btn-full { width: 100%; justify-content: center; height: 50px; font-size: 15.5px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.sso { display: grid; gap: 10px; }
.sso .btn { width: 100%; justify-content: center; height: 46px; background: var(--paper-soft); font-weight: 500; }
.auth-foot { margin-top: 26px; font-size: 14px; color: var(--ink-muted); }
.alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); color: var(--ink-muted); font-size: 13.5px; white-space: pre-wrap; }
.alert.success { border-color: rgba(92, 153, 120, 0.45); background: #e9f4ee; color: #315c45; }
.alert.error { border-color: rgba(184, 100, 100, 0.45); background: #f7e9e9; color: #813838; }

/* ── OAuth authorize ────────────────────────── */
.client-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--paper-soft); margin-bottom: 6px; }
.client-logo { width: 46px; height: 46px; border-radius: 11px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.client-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.client-card p { margin: 3px 0 0; font-size: 12px; color: var(--ink-dim); font-family: var(--mono); }
.connect-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.oauth-page { min-height: calc(100vh - 65px); align-items: flex-start; padding-top: clamp(36px, 6vh, 72px); }
.oauth-card { max-width: 468px; }
.oauth-switch { font-family: var(--mono); font-size: 11px; color: var(--sky-deep); border-bottom: 1px solid var(--line-strong); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sky-soft); color: var(--sky-deep); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.avatar.tiny { width: 28px; height: 28px; border-radius: 8px; color: var(--ink); }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.scopes { margin: 22px 0 24px; border-top: 1px solid var(--line-strong); }
.scope { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line-strong); }
.scope .mark { color: var(--sky-deep); font-family: var(--mono); font-weight: 700; }
.scope h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.scope p { margin: 4px 0 0; font-size: 13px; color: var(--ink-muted); }
.oauth-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; margin-bottom: 18px; }
.oauth-actions .btn { width: 100%; justify-content: center; height: 50px; }

/* ── Account dashboard ──────────────────────── */
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(28px, 4vw, 50px) 0 clamp(18px, 3vw, 30px); }
.account-id { display: flex; align-items: center; gap: 15px; }
.account-id .avatar { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.account-id h1 { margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; letter-spacing: -0.01em; }
.account-id .aid { margin: 3px 0 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); }
.dash-tabs { display: flex; gap: 28px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); overflow-x: auto; }
.dash-tabs a { padding: 14px 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.dash-tabs a.here { color: var(--ink); border-color: var(--ink); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); border-left: 1px solid var(--line-strong); }
.panel { background: var(--paper); padding: clamp(22px, 2.6vw, 32px); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.panel .p-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 16px; display: flex; justify-content: space-between; }
.panel h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-strong); font-size: 14px; }
.key-row:last-child { border-bottom: none; }
.key-row .mono { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.key-row a { font-family: var(--mono); font-size: 12px; color: var(--sky-deep); }
.usage-bar { height: 8px; border-radius: 4px; background: var(--paper-raise); overflow: hidden; margin: 12px 0 8px; }
.usage-bar > span { display: block; height: 100%; background: var(--sky-deep); border-radius: 4px; }
.svc-links { display: grid; gap: 2px; }
.svc-links a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-strong); font-size: 14.5px; transition: color 0.2s; }
.svc-links a:last-child { border-bottom: none; }
.svc-links a:hover { color: var(--sky-deep); }
.svc-links a span { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { display: none; }
  .oauth-actions { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ── Console layout (account & admin) ───────── */
.console { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line-strong); padding: 24px 0 16px; display: flex; flex-direction: column; background: var(--paper-soft); overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 22px 20px; }
.side-brand img { height: 20px; width: auto; }
.side-brand .sub { font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--sky-deep); padding-left: 11px; border-left: 1px solid var(--line-strong); }
.side-nav { flex: 1; padding: 4px 12px; display: flex; flex-direction: column; gap: 1px; }
.side-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); padding: 16px 10px 7px; }
.side-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 8px; font-size: 14px; color: var(--ink-muted); transition: background 0.15s, color 0.15s; }
.side-nav a:hover { background: var(--paper-raise); color: var(--ink); }
.side-nav a.here { background: var(--ink); color: var(--paper); }
.side-nav a .tag { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.side-nav a.here .tag { color: var(--sky); }
.side-foot { padding: 14px 16px 0; border-top: 1px solid var(--line-strong); margin: 8px 12px 0; display: flex; flex-direction: column; gap: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user .avatar { width: 34px; height: 34px; border-radius: 9px; }
.side-user b { font-size: 13px; font-weight: 600; display: block; }
.side-user span { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.reg { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--sky-deep); }

.console-main { min-width: 0; }
.console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: clamp(26px, 4vw, 44px) clamp(22px, 4vw, 48px) clamp(18px, 2.4vw, 26px); border-bottom: 1px solid var(--line-strong); flex-wrap: wrap; }
.ch-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sky-deep); margin: 0 0 8px; }
.console-head h1 { margin: 0; font-size: clamp(25px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.02em; }
.head-sub { margin: 6px 0 0; color: var(--ink-muted); font-size: 14px; }
.ch-actions { display: flex; gap: 12px; align-items: center; }
.console-body { padding: clamp(22px, 3vw, 36px) clamp(22px, 4vw, 48px) 64px; }

body[data-page^="account"] .account-main { background: linear-gradient(180deg, #fbfaf7 0%, var(--paper) 64%); }
body[data-page^="account"] .side { background: rgba(250, 248, 244, 0.94); }
.account-hero { position: relative; display: block; padding: clamp(44px, 6vw, 76px) clamp(24px, 5vw, 72px) clamp(30px, 4vw, 46px); border-bottom: 1px solid var(--line-strong); overflow: hidden; }
.account-home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(26px, 5vw, 74px); align-items: center; }
.account-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.62; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg, #202321 0%, rgba(32,35,33,0.72) 42%, transparent 92%); }
.account-hero-copy, .account-pass { position: relative; z-index: 1; }
.account-hero-copy { max-width: 720px; }
.account-hero-copy h1 { margin: 0; font-size: clamp(38px, 5vw, 70px); line-height: 0.96; font-weight: 820; letter-spacing: -0.035em; }
.account-hero-copy .head-sub { max-width: 58ch; margin-top: 14px; font-size: 16px; line-height: 1.7; color: var(--ink-muted); word-break: break-word; }
.account-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.account-hero-actions .btn { min-height: 42px; }
.account-pass { border: 1px solid var(--line-strong); border-radius: 8px; background: color-mix(in oklch, var(--paper-soft) 92%, var(--sky-soft)); box-shadow: 0 24px 70px rgba(21, 23, 22, 0.08); overflow: hidden; }
.pass-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 24px; }
.account-pass-avatar { width: 76px; height: 76px; border-radius: 18px; font-size: 23px; box-shadow: inset 0 0 0 1px rgba(21, 23, 22, 0.08); }
.pass-label { display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky-deep); }
.pass-top strong { display: block; font-size: 22px; line-height: 1.08; letter-spacing: -0.02em; }
.pass-top p { margin: 7px 0 0; color: var(--ink-muted); font-size: 13px; word-break: break-word; }
.pass-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line-strong); }
.pass-meta div { min-height: 82px; padding: 16px 18px; border-bottom: 1px solid var(--line-strong); }
.pass-meta div:nth-child(odd) { border-right: 1px solid var(--line-strong); }
.pass-meta div:nth-last-child(-n+2) { border-bottom: 0; }
.pass-meta dt { margin: 0 0 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.pass-meta dd { margin: 0; font-size: 14px; color: var(--ink); }
.account-body { max-width: 1180px; margin: 0 auto; padding-top: clamp(26px, 3.2vw, 44px); }
.account-section-body { max-width: 1040px; }
.account-signal-band { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); overflow: hidden; }
.account-overview-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); border: 0; }
.account-overview-stats .overview-stat { min-height: 132px; padding: 22px 24px; border: 0; border-right: 1px solid var(--line-strong); background: transparent; }
.account-overview-stats .overview-stat:last-child { border-right: 0; }
.account-overview-stats .overview-stat strong { font-size: clamp(24px, 2.7vw, 34px); }
.account-overview-stats .overview-stat small { color: var(--ink-muted); }
.account-panel { min-width: 0; margin-top: 0; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(250, 248, 244, 0.78); box-shadow: 0 18px 44px rgba(21, 23, 22, 0.045); }
.account-services, .account-apps { margin-top: clamp(24px, 3vw, 34px); }
.account-panel .sec-head { align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.account-panel .sec-head h2 { font-size: 22px; line-height: 1.05; letter-spacing: -0.02em; }
.section-kicker { margin: 0 0 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--sky-deep); }
body[data-page^="account"] .form-panel { border-top: 0; padding-top: 0; margin-bottom: 18px; }
body[data-page^="account"] .profile-grid { grid-template-columns: minmax(190px, 0.74fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
body[data-page^="account"] .profile-grid .avatar-field { grid-row: span 2; }
body[data-page^="account"] .profile-grid .form-action { grid-column: 2 / -1; justify-self: end; align-self: end; }
.rich-avatar-edit { grid-template-columns: 72px minmax(0, 1fr) 46px; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); }
.rich-avatar-edit .avatar-preview { width: 72px; height: 72px; border-radius: 18px; font-size: 21px; }
.avatar-controls { display: grid; gap: 10px; min-width: 0; }
.avatar-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.avatar-swatch { appearance: none; width: 20px; height: 20px; border: 1px solid rgba(21, 23, 22, 0.18); border-radius: 999px; background: var(--swatch, #dce8ed); cursor: pointer; transition: transform 0.16s var(--ease), border-color 0.16s; }
.avatar-swatch:hover { transform: translateY(-1px); border-color: var(--ink); }
.avatar-swatch:active { transform: translateY(0) scale(0.96); }
.avatar-swatch.selected { outline: 2px solid color-mix(in oklch, var(--sky-deep) 58%, transparent); outline-offset: 2px; }
.avatar-swatch[data-avatar-color="#dce8ed"] { --swatch: #dce8ed; }
.avatar-swatch[data-avatar-color="#e3f0e9"] { --swatch: #e3f0e9; }
.avatar-swatch[data-avatar-color="#f4ead6"] { --swatch: #f4ead6; }
.avatar-swatch[data-avatar-color="#f3e0e0"] { --swatch: #f3e0e0; }
.avatar-swatch[data-avatar-color="#151716"] { --swatch: #151716; }
.rich-avatar-edit .avatar-code-input { height: 40px; }
.rich-avatar-edit .color-input { width: 46px; height: 46px; border-radius: 12px; }
.readonly-identity-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 112px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); }
.readonly-identity-card .avatar-preview { width: 72px; height: 72px; border-radius: 18px; font-size: 21px; }
.readonly-identity-card strong { display: block; margin-bottom: 6px; font-size: 18px; letter-spacing: -0.01em; }
.readonly-identity-card span { display: block; color: var(--ink-muted); font-size: 13px; line-height: 1.5; }
.readonly-field { min-height: 48px; display: flex; align-items: center; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: color-mix(in oklch, var(--paper-soft) 86%, var(--paper)); color: var(--ink); word-break: break-word; }
.refined-table { border-top: 1px solid var(--line-strong); }
.refined-table table.data td { padding-top: 17px; padding-bottom: 17px; }
.account-security .refined-table { max-height: 360px; overflow: auto; }
.profile-spec { margin-top: 18px; }

.category-list { display: grid; border-top: 1px solid var(--line-strong); }
.category-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: clamp(14px, 3vw, 32px); align-items: center; min-height: 92px; padding: 18px 4px; border-bottom: 1px solid var(--line-strong); transition: background 0.18s var(--ease), transform 0.18s var(--ease); }
.category-item:hover { background: color-mix(in oklch, var(--sky-wash) 72%, transparent); }
.category-item:active { transform: translateY(1px); }
.category-index { font-family: var(--mono); font-size: 13px; color: var(--ink-dim); }
.category-copy { display: grid; gap: 4px; min-width: 0; }
.category-copy strong { font-size: clamp(18px, 2vw, 23px); line-height: 1.12; letter-spacing: -0.012em; }
.category-copy small { max-width: 68ch; color: var(--ink-muted); font-size: 14px; }
.category-meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; color: var(--sky-deep); white-space: nowrap; }

.password-panel { margin-bottom: 0; }
.password-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: clamp(20px, 4vw, 44px); align-items: start; }
.password-fields { display: grid; gap: 2px; }
.password-review { border: 1px solid var(--line-strong); border-radius: 8px; padding: 18px; background: var(--paper); }
.strength-meter { height: 7px; overflow: hidden; border-radius: 999px; background: var(--paper-raise); }
.strength-meter span { display: block; width: 8%; height: 100%; border-radius: inherit; background: var(--sky-deep); transition: width 0.24s var(--ease); }
.review-title { margin: 16px 0 12px; font-weight: 700; letter-spacing: -0.01em; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review-list li { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 13.5px; }
.review-list li::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--ink-dim); opacity: 0.45; }
.review-list li.ok { color: var(--ink); }
.review-list li.ok::before { background: #5c9978; opacity: 1; }
.security-check { margin-top: 2px; margin-bottom: 14px; }
.inline-field-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.inline-field-action .btn { min-height: 48px; white-space: nowrap; }

.oricode-quota-panel, .oricode-activity-panel { border-top: 1px solid var(--line-strong); padding-top: clamp(18px, 2.4vw, 28px); }
.oricode-balance { display: grid; grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr); border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); overflow: hidden; }
.balance-primary { padding: clamp(22px, 3vw, 34px); border-right: 1px solid var(--line-strong); }
.balance-label { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-deep); }
.balance-primary strong { display: block; font-size: clamp(34px, 5vw, 58px); line-height: 0.95; letter-spacing: -0.035em; }
.balance-primary strong small { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--ink-dim); letter-spacing: 0; }
.balance-primary p { max-width: 34ch; margin: 16px 0 0; color: var(--ink-muted); font-size: 14px; line-height: 1.6; }
.balance-bars { display: grid; align-content: center; gap: 20px; padding: clamp(22px, 3vw, 34px); }
.balance-bars div { display: grid; gap: 9px; }
.balance-bars span { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink); }
.balance-bars b { font-family: var(--mono); font-size: 12px; color: var(--sky-deep); }
.balance-bars i { display: block; height: 9px; border-radius: 999px; overflow: hidden; background: var(--paper-raise); border: 1px solid color-mix(in oklch, var(--line-strong) 78%, transparent); }
.balance-bars em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5c9978, var(--sky-deep)); transition: width 0.24s var(--ease); }
.balance-bars small { font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted); }
.token-activity { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 5px; align-items: start; max-width: 100%; overflow-x: auto; padding: 3px 0 8px; }
.activity-cell { width: 13px; height: 13px; border-radius: 3px; background: #e6e2d8; box-shadow: inset 0 0 0 1px rgba(21, 23, 22, 0.045); }
.activity-cell[data-level="1"], .activity-legend i[data-level="1"] { background: #cfe0d7; }
.activity-cell[data-level="2"], .activity-legend i[data-level="2"] { background: #9fc4b0; }
.activity-cell[data-level="3"], .activity-legend i[data-level="3"] { background: #6ea18b; }
.activity-cell[data-level="4"], .activity-legend i[data-level="4"] { background: #4f7f99; }
.activity-legend { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 10px; color: var(--ink-dim); font-family: var(--mono); font-size: 11px; }
.activity-legend i { width: 12px; height: 12px; border-radius: 3px; background: #e6e2d8; box-shadow: inset 0 0 0 1px rgba(21, 23, 22, 0.045); }

.account-overview-panel { display: grid; grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr); gap: clamp(22px, 4vw, 54px); align-items: stretch; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); overflow: hidden; }
.overview-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: clamp(22px, 3vw, 34px); border-right: 1px solid var(--line-strong); }
.avatar-xl { width: clamp(68px, 7vw, 92px); height: clamp(68px, 7vw, 92px); border-radius: 18px; font-size: clamp(19px, 2.4vw, 26px); }
.overview-kicker { margin: 0 0 5px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-deep); }
.overview-identity h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.05; letter-spacing: -0.02em; }
.overview-identity p { margin: 6px 0 0; color: var(--ink-muted); word-break: break-word; }
.overview-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.overview-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid transparent; }
.overview-stat { min-height: 118px; padding: 22px 24px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); display: flex; flex-direction: column; justify-content: space-between; gap: 9px; }
.overview-stat:nth-last-child(-n+2) { border-bottom: 0; }
.overview-stat span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-dim); }
.overview-stat strong { font-size: clamp(22px, 3vw, 30px); line-height: 1; letter-spacing: -0.02em; }
.overview-stat strong small { font-size: 13px; font-weight: 500; color: var(--ink-dim); }
.overview-stat small { font-family: var(--mono); font-size: 11.5px; color: var(--sky-deep); }
.console-sec { margin-top: clamp(26px, 3.5vw, 42px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.more { font-family: var(--mono); font-size: 12px; color: var(--sky-deep); }
button.more { appearance: none; border: 0; padding: 0; background: transparent; cursor: pointer; }
button.more:disabled { color: var(--ink-dim); cursor: not-allowed; opacity: 0.45; }
.danger-link { color: #8a3b3b; }
.right { text-align: right; }
.empty { text-align: center; color: var(--ink-dim) !important; padding: 24px 0 !important; }
.row-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-dim); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 13px; }

.form-panel { border-top: 1px solid var(--line-strong); padding-top: 16px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.profile-grid { grid-template-columns: minmax(190px, 0.8fr) minmax(170px, 1fr) minmax(230px, 1.2fr) minmax(150px, 0.75fr); }
.profile-grid .form-action { grid-column: 1 / -1; justify-self: end; min-width: 210px; margin-bottom: 0; }
.profile-grid .form-action .btn { min-width: 210px; white-space: nowrap; }
.admin-create-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.form-action { align-self: end; }
.form-action .btn { width: 100%; justify-content: center; min-height: 48px; }
.toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; margin-bottom: 14px; }
.toolbar .btn { height: 42px; min-height: 42px; justify-content: center; }
#user-search { margin-bottom: 14px; max-width: 520px; }
.compact { min-width: 96px; height: 34px; padding: 0 9px; font-size: 12.5px; }
.quota-input { width: 128px; }
.wide-input { min-width: 220px; }
.avatar-text-input { width: 64px; text-transform: uppercase; }
.avatar-field { min-width: 0; }
.avatar-edit { display: grid; grid-template-columns: 48px minmax(54px, 74px) 44px; gap: 8px; align-items: center; }
.avatar-preview { width: 48px; height: 48px; border-radius: 12px; font-size: 15px; }
.avatar-code-input { text-transform: uppercase; text-align: center; font-family: var(--mono) !important; padding: 0 8px !important; }
.color-input { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); vertical-align: middle; margin-left: 6px; }
.avatar-edit .color-input { width: 44px; height: 48px; margin-left: 0; }
.name-input { min-width: 150px; }
.email-input { min-width: 220px; }
.password-input { min-width: 132px; }
.inline-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 34px; white-space: nowrap; }
.actions-cell .inline-actions { width: 100%; }
.date-cell { white-space: nowrap; }
.usage-cell, .rate-cell { font-family: var(--mono); color: var(--ink); vertical-align: middle; }
.metric-pair { display: grid; grid-template-columns: repeat(2, minmax(54px, 1fr)); gap: 10px; align-items: center; }
.metric-pair span { display: grid; gap: 2px; min-width: 0; }
.metric-pair b { font-size: 13.5px; font-weight: 500; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-pair small { font-size: 10px; letter-spacing: 0.07em; color: var(--ink-dim); line-height: 1; white-space: nowrap; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.metric { background: var(--paper); padding: 19px 22px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.m-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 11px; }
.m-value { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.m-value small { font-size: 13px; font-weight: 400; color: var(--ink-dim); }
.m-delta { font-family: var(--mono); font-size: 11.5px; margin: 9px 0 0; color: var(--sky-deep); }
.m-delta.flat { color: var(--ink-dim); }

.provider-panel { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); overflow: hidden; }
.provider-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line-strong); }
.provider-summary div { min-height: 104px; padding: 18px 20px; border-right: 1px solid var(--line-strong); display: grid; align-content: space-between; gap: 10px; }
.provider-summary div:last-child { border-right: 0; }
.provider-summary span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-dim); }
.provider-summary strong { font-size: 20px; line-height: 1.12; letter-spacing: -0.01em; word-break: break-word; }
.provider-summary small { font-family: var(--mono); font-size: 11.5px; color: var(--sky-deep); word-break: break-word; }
.provider-form { display: grid; grid-template-columns: minmax(170px, 0.8fr) minmax(260px, 1.15fr) minmax(150px, 0.75fr) minmax(220px, 1fr); gap: 14px; align-items: end; padding: 20px; }
.provider-form .field { margin-bottom: 0; }
.provider-key-field .hint { margin-top: 2px; }
.provider-clear-key { margin: 0; align-self: center; }
.provider-form .btn { justify-content: center; min-height: 48px; }
.log-filter-grid { grid-template-columns: minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(240px, 1.4fr) minmax(150px, 0.6fr); }
.log-extra { max-width: 680px; white-space: normal; word-break: break-word; }
.support-ticket-grid { grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(140px, 0.7fr); align-items: start; }
.support-ticket-grid .support-message-field { grid-column: 1 / -1; }
.ticket-filter-grid { grid-template-columns: repeat(4, minmax(130px, 0.72fr)) minmax(220px, 1.2fr) minmax(150px, 0.6fr); }
.ticket-note.compact { min-width: 220px; min-height: 54px; height: 54px; padding: 8px 9px; margin-top: 7px; resize: vertical; font-size: 12.5px; line-height: 1.35; }
.mail-settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.mail-password-field .hint { margin-top: 2px; }
.mail-check { align-self: center; min-height: 46px; margin: 0; }
.mail-form-action { grid-column: 1 / -1; justify-self: end; min-width: 220px; }
.mail-test-grid { grid-template-columns: minmax(260px, 420px) minmax(160px, 220px); justify-content: start; }
.desktop-update-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.desktop-update-grid .field { margin-bottom: 0; }
.desktop-hot-update-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.desktop-update-check { margin: 10px 0 0; min-height: 42px; align-items: center; }
.desktop-update-notes { grid-column: 1 / -1; }
.desktop-update-notes textarea { min-height: 112px; }
.desktop-update-actions { grid-column: 1 / -1; justify-self: end; min-width: 240px; margin-bottom: 0; display: grid; gap: 10px; }
.desktop-updates-table { min-width: 1180px; }
.desktop-hot-updates-table { min-width: 1280px; }
.desktop-update-events-table { min-width: 1080px; }
.desktop-hot-update-events-table { min-width: 1120px; }
.desktop-update-summary { margin-bottom: 16px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sky-deep); margin-right: 7px; vertical-align: middle; }
.dot.ok { background: #5c9978; }
.dot.warn { background: #b8915c; }
.dot.down { background: #b86464; }
.badge.ok { background: #e3f0e9; color: #3b6d52; }
.badge.warn { background: #f4ead6; color: #835c2a; }
.badge.down { background: #f3e0e0; color: #8a3b3b; }

@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .side { position: static; height: auto; overflow: visible; }
  .side-nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .side-group { grid-column: 1 / -1; }
  .account-home-hero { grid-template-columns: 1fr; min-height: 0; }
  .account-pass { max-width: 560px; }
  .account-overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-overview-stats .overview-stat:nth-child(2) { border-right: 0; }
  .account-overview-stats .overview-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-strong); }
  body[data-page^="account"] .profile-grid,
  .password-layout { grid-template-columns: 1fr; }
  body[data-page^="account"] .profile-grid .avatar-field,
  body[data-page^="account"] .profile-grid .form-action { grid-column: auto; grid-row: auto; justify-self: stretch; }
  .account-overview-panel { grid-template-columns: 1fr; }
  .overview-identity { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oricode-balance { grid-template-columns: 1fr; }
  .balance-primary { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .ch-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .form-grid, .admin-create-grid { grid-template-columns: 1fr; }
  .mail-settings-grid, .mail-test-grid { grid-template-columns: 1fr; }
  .mail-form-action { grid-column: auto; justify-self: stretch; min-width: 0; }
  .desktop-update-grid, .desktop-hot-update-grid { grid-template-columns: 1fr; }
  .desktop-update-notes, .desktop-update-actions { grid-column: auto; justify-self: stretch; min-width: 0; }
  .toolbar { grid-template-columns: 1fr; }
  .inline-actions { justify-content: flex-start; }
  .provider-summary { grid-template-columns: 1fr; }
  .provider-summary div { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .provider-summary div:last-child { border-bottom: 0; }
  .provider-form { grid-template-columns: 1fr; }
  .log-filter-grid, .support-ticket-grid, .ticket-filter-grid { grid-template-columns: 1fr; }
  .support-ticket-grid .support-message-field { grid-column: auto; }
}

@media (max-width: 560px) {
  body[data-page="login"] .masthead .wrap,
  body[data-page="register"] .masthead .wrap,
  body[data-page="authorize"] .masthead .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .account-hero { padding: 34px 20px 28px; }
  .account-hero-copy h1 { font-size: 36px; }
  .account-pass { border-radius: 0; margin-left: -20px; margin-right: -20px; border-left: 0; border-right: 0; }
  .pass-top { grid-template-columns: 1fr; }
  .pass-meta { grid-template-columns: 1fr; }
  .pass-meta div,
  .pass-meta div:nth-child(odd),
  .pass-meta div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .pass-meta div:last-child { border-bottom: 0; }
  .account-body { padding-left: 20px; padding-right: 20px; }
  .account-signal-band { border-left: 0; border-right: 0; border-radius: 0; margin-left: -20px; margin-right: -20px; }
  .account-panel { margin-left: 0; margin-right: 0; }
  .account-overview-stats { grid-template-columns: 1fr; }
  .account-overview-stats .overview-stat,
  .account-overview-stats .overview-stat:nth-child(2),
  .account-overview-stats .overview-stat:nth-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .account-overview-stats .overview-stat:last-child { border-bottom: 0; }
  .category-item { grid-template-columns: 36px minmax(0, 1fr); }
  .category-meta { grid-column: 2; }
  .rich-avatar-edit { grid-template-columns: 64px minmax(0, 1fr); }
  .rich-avatar-edit .color-input { grid-column: 1 / -1; width: 100%; }
  .rich-avatar-edit .avatar-preview { width: 64px; height: 64px; }
  .account-overview-panel { border-left: 0; border-right: 0; border-radius: 0; margin-left: calc(clamp(22px, 4vw, 48px) * -1); margin-right: calc(clamp(22px, 4vw, 48px) * -1); }
  .overview-identity { grid-template-columns: 1fr; }
  .overview-stats { grid-template-columns: 1fr; }
  .overview-stat:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-strong); }
  .overview-stat:last-child { border-bottom: 0; }
}

/* ── 注册 · 二次验证 (MFA) ── */
.mfa-setup { display: flex; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper-soft); margin-bottom: 18px; }
.mfa-qr { width: 100px; height: 100px; flex-shrink: 0; border-radius: 8px; background: repeating-conic-gradient(var(--ink) 0% 25%, var(--paper-raise) 0% 50%) 50% / 14px 14px; display: flex; align-items: center; justify-content: center; }
.mfa-qr span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ink-dim); background: var(--paper); padding: 3px 6px; border-radius: 4px; }
.mfa-key { display: grid; gap: 7px; min-width: 0; }
.mfa-key code { font-size: 15px; letter-spacing: 0.14em; color: var(--ink); word-break: break-all; }
.register-card .link-button { background: none; border: none; padding: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--sky-deep); cursor: pointer; justify-self: start; }

/* ── 全局加载进度条 ── */
.app-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999; pointer-events: none; }
.app-progress::before { content: ""; display: block; height: 100%; width: 100%; background: var(--sky-deep); transform: scaleX(0); transform-origin: left; opacity: 0; }
.app-progress.active::before { opacity: 1; animation: app-progress-grow 1.8s var(--ease) forwards; }
.app-progress.done::before { opacity: 0; transform: scaleX(1); transition: transform 0.18s var(--ease), opacity 0.32s 0.12s; }
@keyframes app-progress-grow { 0% { transform: scaleX(0); } 55% { transform: scaleX(0.66); } 100% { transform: scaleX(0.9); } }

/* ── 注册步切换动画 ── */
.slide-in-right { animation: auth-slide-in-right 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
.slide-in-left { animation: auth-slide-in-left 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
.slide-out-left { animation: auth-slide-out-left 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
.slide-out-right { animation: auth-slide-out-right 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes auth-slide-in-right { from { transform: translate3d(100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes auth-slide-in-left { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes auth-slide-out-left { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-100%, 0, 0); } }
@keyframes auth-slide-out-right { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(100%, 0, 0); } }
.mfa-qr { overflow: hidden; }
.mfa-qr canvas, .mfa-qr img { display: block; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .app-progress.active::before { animation: none; transform: scaleX(0.9); }
  .slide-in-right, .slide-in-left, .slide-out-left, .slide-out-right { animation: none; }
}


/* ── 内容 / 文章（新闻 · 开发文档） ── */
.md-body { color: var(--ink); font-size: 16px; line-height: 1.78; }
.md-body > :first-child { margin-top: 0; }
.md-body h1, .md-body h2, .md-body h3 { letter-spacing: -0.01em; line-height: 1.22; margin: 1.7em 0 0.5em; font-weight: 700; }
.md-body h1 { font-size: 1.6em; font-weight: 800; }
.md-body h2 { font-size: 1.3em; }
.md-body h3 { font-size: 1.1em; }
.md-body p { margin: 0 0 1em; }
.md-body a { color: var(--sky-deep); border-bottom: 1px solid var(--line-strong); }
.md-body ul, .md-body ol { margin: 0 0 1em; padding-left: 1.3em; }
.md-body li { margin: 0.32em 0; }
.md-body strong { font-weight: 700; }
.md-body blockquote { margin: 1em 0; padding: 0.5em 1em; border-left: 2px solid var(--sky); color: var(--ink-muted); background: var(--paper-soft); }
.md-body code { font-family: var(--mono); font-size: 0.87em; background: var(--paper-raise); padding: 0.12em 0.42em; border-radius: 5px; }
.md-body pre { background: var(--ink); color: var(--paper-soft); padding: 16px 18px; border-radius: 10px; overflow-x: auto; line-height: 1.6; }
.md-body pre code { background: none; padding: 0; color: inherit; font-size: 0.84em; }
.md-body img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-strong); margin: 0.5em 0; }
.md-body table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.95em; }
.md-body th, .md-body td { border: 1px solid var(--line-strong); padding: 9px 12px; text-align: left; }
.md-body th { background: var(--paper-soft); font-weight: 600; }
.md-body hr { border: 0; border-top: 1px solid var(--line-strong); margin: 2em 0; }
.article-wrap { max-width: 768px; padding-top: clamp(26px, 5vw, 52px); padding-bottom: clamp(56px, 9vw, 104px); }
.article h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.06; margin: 14px 0 0; }
.article-meta { margin: 16px 0 30px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-dim); }
.article-attachments { margin-top: 36px; display: grid; gap: 8px; }
.article-attachments:empty { display: none; }
.article-attachments a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper-soft); font-size: 14px; color: var(--ink); }
.article-attachments a:hover { background: var(--sky-wash); }
.news-time { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.content-editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.content-markdown-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.content-preview { min-height: 380px; max-height: 600px; overflow-y: auto; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper-soft); font-size: 14px; }
.content-attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.content-attach-list .chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper-soft); color: var(--ink-muted); }
.content-attach-list .chip button { appearance: none; border: 0; border-left: 1px solid var(--line-strong); margin: 0 -2px 0 2px; padding: 0 0 0 8px; background: transparent; color: var(--sky-deep); font: inherit; cursor: pointer; }
.content-attach-list .chip button:hover { color: var(--ink); }
.content-kind-tab.here { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 760px) { .content-editor-split { grid-template-columns: 1fr; } }


/* ── 新闻卡片 + 文章封面 ── */
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; margin: 10px 0 80px; }
.news-card { display: block; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: var(--paper-soft); transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease); }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 18px 46px rgba(21, 23, 22, 0.10); }
.news-card-cover { aspect-ratio: 8 / 3; background: var(--paper-soft); overflow: hidden; }
.news-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--sky); }
.news-card-body { padding: 18px 20px 22px; }
.news-card-date { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.news-card h3 { margin: 8px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.news-card p { margin: 8px 0 0; color: var(--ink-muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


.content-cover-row { display: flex; gap: 16px; align-items: center; }
.content-cover-preview { width: 220px; aspect-ratio: 8 / 3; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.content-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.content-cover-empty { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.content-cover-actions { display: grid; gap: 8px; }


/* ── 服务级独立控制台（ORiCode 等） ── */
.side-nav a.side-back { color: var(--ink-dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); border-radius: 0; }
.side-nav a.side-back:hover { background: transparent; color: var(--ink); }


/* ── 文章封面：液态玻璃 + 卡片堆叠 ── */
.article-cover-stack { position: relative; margin: 32px 0 26px; isolation: isolate; }
.article-cover-stack[hidden] { display: none; }
.article-cover-stack::before, .article-cover-stack::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  border-radius: 16px; background: color-mix(in oklch, var(--paper-soft) 78%, #ffffff);
  border: 1px solid var(--line-strong); z-index: -1;
  box-shadow: 0 10px 26px rgba(21, 23, 22, 0.06);
}
.article-cover-stack::before { transform: translate(7px, 8px); opacity: 0.85; }
.article-cover-stack::after { transform: translate(15px, 17px); opacity: 0.5; }
.article-cover {
  display: block; width: 100%; height: auto; border-radius: 16px; position: relative; z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 14px 32px rgba(21, 23, 22, 0.14), 0 3px 8px rgba(21, 23, 22, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; }
.pager:empty { display: none; }
.pager-info { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); letter-spacing: 0.02em; }
.pager .btn-small[disabled] { opacity: 0.4; cursor: not-allowed; }

.provider-row { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--paper-soft); }
.provider-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.provider-row-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.provider-row-grid .field span { display: block; font-size: 12px; color: var(--ink-dim); margin-bottom: 4px; }
.provider-row-actions { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.provider-add { margin-top: 6px; }
.routing-row { display: grid; grid-template-columns: 200px 130px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.routing-role { display: flex; flex-direction: column; gap: 2px; }
.routing-targets { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.routing-target { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-muted); }
@media (max-width: 720px) { .routing-row { grid-template-columns: 1fr; gap: 8px; } }


/* ── 统一移动端导航：官网 / 账户 / 超管共用 ── */
@media (max-width: 900px) {
  .masthead {
    min-height: 60px;
    z-index: 760;
  }
  .masthead-row {
    min-height: 60px;
  }
  .masthead .brand {
    gap: 8px;
    min-height: 26px;
  }
  .masthead .brand img {
    width: 128px;
    height: 26px;
    transform: translateY(1.5px);
  }
  .masthead .brand .sub {
    font-size: 13px;
    font-weight: 620;
  }
  .masthead-nav {
    display: none;
  }
  .menu-toggle {
    position: relative;
    z-index: 820;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
  }
  .menu-toggle span {
    position: absolute;
    right: 4px;
    width: 18px;
    height: 1.5px;
    transform-origin: 100% 50%;
  }
  .menu-toggle span:nth-child(1) {
    transform: translateY(-5px);
  }
  .menu-toggle span:nth-child(2) {
    transform: translateY(0);
  }
  .menu-toggle span:nth-child(3) {
    transform: translateY(5px);
  }
  .menu-toggle[aria-expanded="true"] {
    color: #050605;
  }
  .menu-toggle[aria-expanded="true"] span {
    height: 2px;
    background: #050605;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(0) rotate(40deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: translateX(-4px);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(0) rotate(-40deg);
  }

  .menu-scrim,
  .mobile-menu-panel {
    display: block;
  }
  .menu-scrim {
    position: fixed;
    inset: 0;
    z-index: 640;
    pointer-events: none;
    background: color-mix(in srgb, var(--ink) 38%, transparent);
    opacity: 0;
    transition: opacity 320ms var(--ease-out-quart);
  }
  .menu-scrim[data-open="true"] {
    pointer-events: auto;
    opacity: 1;
  }
  .mobile-menu-panel {
    position: fixed;
    inset: 0;
    z-index: 720;
    min-height: 100svh;
    padding: 128px 22px 44px;
    color: var(--ink);
    background: color-mix(in srgb, var(--paper-soft) 94%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.04);
    backdrop-filter: blur(18px) saturate(1.04);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -6vh, 0);
    transition: opacity 360ms var(--ease-out-quart), visibility 360ms var(--ease-out-quart), transform 360ms var(--ease-out-quart);
  }
  .mobile-menu-panel[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }
  .mobile-menu-nav {
    display: grid;
    gap: clamp(24px, 5vh, 50px);
  }
  .mobile-menu-nav a {
    width: fit-content;
    color: var(--ink);
    font-size: clamp(48px, 14vw, 82px);
    font-weight: 850;
    line-height: 0.94;
    letter-spacing: -0.04em;
  }
  .mobile-menu-nav a,
  .mobile-menu-foot a {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 520ms var(--ease-out-quint), transform 520ms var(--ease-out-quint);
  }
  .mobile-menu-panel[data-open="true"] .mobile-menu-nav a,
  .mobile-menu-panel[data-open="true"] .mobile-menu-foot a {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  .mobile-menu-panel[data-open="true"] .mobile-menu-nav a:nth-child(1) { transition-delay: 120ms; }
  .mobile-menu-panel[data-open="true"] .mobile-menu-nav a:nth-child(2) { transition-delay: 220ms; }
  .mobile-menu-panel[data-open="true"] .mobile-menu-nav a:nth-child(3) { transition-delay: 320ms; }
  .mobile-menu-panel[data-open="true"] .mobile-menu-nav a:nth-child(4) { transition-delay: 420ms; }
  .mobile-menu-panel[data-open="true"] .mobile-menu-foot a:nth-child(1) { transition-delay: 520ms; }
  .mobile-menu-panel[data-open="true"] .mobile-menu-foot a:nth-child(2) { transition-delay: 620ms; }
  .mobile-menu-foot {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 34px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--ink-muted);
    font-size: clamp(15px, 4.2vw, 18px);
    font-weight: 720;
  }

  .console-mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 760;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper-soft) 88%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.04);
    backdrop-filter: blur(18px) saturate(1.04);
    box-shadow: 0 12px 42px #1517160c;
  }
  .console-mobile-header .brand {
    gap: 8px;
    min-height: 26px;
  }
  .console-mobile-header .brand img {
    width: 128px;
    height: 26px;
    object-fit: contain;
    transform: translateY(1.5px);
  }
  .console-mobile-header .brand .sub {
    color: var(--ink);
    font-size: 13px;
    font-weight: 620;
  }

  .console {
    display: block;
    padding-top: 60px;
  }
  .side {
    position: fixed;
    inset: 0;
    z-index: 720;
    display: flex;
    height: 100svh;
    padding: 122px 22px 34px;
    border-right: 0;
    background: color-mix(in srgb, var(--paper-soft) 94%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.04);
    backdrop-filter: blur(18px) saturate(1.04);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -6vh, 0);
    transition: opacity 360ms var(--ease-out-quart), visibility 360ms var(--ease-out-quart), transform 360ms var(--ease-out-quart);
  }
  body.console-menu-open .side {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }
  .side-brand {
    display: none;
  }
  .side-nav {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 4px;
    padding: 0;
    overflow: auto;
  }
  .side-group {
    padding: 18px 0 8px;
    font-size: 11px;
  }
  .side-nav a {
    min-height: 44px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent !important;
    color: var(--ink);
    font-size: clamp(20px, 5.6vw, 30px);
    font-weight: 800;
  }
  .side-nav a.here {
    color: var(--sky-deep);
  }
  .side-foot {
    margin: auto 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--line-strong);
  }
  .side-nav > *,
  .side-foot {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 480ms var(--ease-out-quint), transform 480ms var(--ease-out-quint);
  }
  body.console-menu-open .side-nav > *,
  body.console-menu-open .side-foot {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  body.console-menu-open .side-nav > *:nth-child(1) { transition-delay: 90ms; }
  body.console-menu-open .side-nav > *:nth-child(2) { transition-delay: 150ms; }
  body.console-menu-open .side-nav > *:nth-child(3) { transition-delay: 210ms; }
  body.console-menu-open .side-nav > *:nth-child(4) { transition-delay: 270ms; }
  body.console-menu-open .side-nav > *:nth-child(5) { transition-delay: 330ms; }
  body.console-menu-open .side-nav > *:nth-child(6) { transition-delay: 390ms; }
  body.console-menu-open .side-nav > *:nth-child(n+7) { transition-delay: 450ms; }
  body.console-menu-open .side-foot { transition-delay: 540ms; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span,
  .menu-scrim,
  .mobile-menu-panel,
  .mobile-menu-nav a,
  .mobile-menu-foot a,
  .side,
  .side-nav > *,
  .side-foot {
    transition-duration: 0.01ms !important;
  }
}
