/* SCR Calculator - website styles. Self-hosted, no external fonts or frameworks. */

:root {
  --ink: #0d1b2a;
  --text: #1d2939;
  --muted: #566476;
  --faint: #8592a3;
  --line: #dde3ea;
  --line-strong: #c5ced9;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-tint: #eef4fb;
  --brand: #0a5bb0;
  --brand-dark: #07467f;
  --brand-ink: #062f57;
  --accent: #0d7a6f;
  --accent-soft: #e3f3f0;
  --ok: #0e6b3b;
  --ok-bg: #e6f4ec;
  --warn: #7a4f00;
  --warn-bg: #fff4dc;
  --danger: #a3221a;
  --danger-bg: #fdebe9;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(13, 27, 42, .12);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid #7fb2ea; outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; }
h4 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: .75rem; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.notice-bar { background: var(--ink); color: #d6e2f0; font-size: .875rem; }
.notice-bar .wrap { padding-top: .45rem; padding-bottom: .45rem; }
.notice-bar a { color: #fff; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 1.08rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand .brand-mark { width: 32px; height: 32px; flex: none; display: block; }
.brand .brand-sub { font-weight: 400; color: var(--muted); font-size: .8rem; display: block; line-height: 1; margin-top: 2px; }
.nav-main { display: flex; align-items: center; gap: .25rem; flex: 1; }
.nav-main a { color: var(--text); text-decoration: none; padding: .45rem .7rem; border-radius: var(--radius-sm); font-size: .95rem; }
.nav-main a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-main a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav-main .nav-spacer { flex: 1; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .site-header .wrap { flex-wrap: wrap; gap: .5rem; padding-top: .5rem; padding-bottom: .5rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-toggle summary { list-style: none; cursor: pointer; padding: .45rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: .95rem; }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-main { display: none; }
  .nav-toggle[open] + .nav-main { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: .25rem 0 .5rem; }
  .nav-toggle[open] + .nav-main .nav-spacer { display: none; }
  .nav-main .btn { margin-top: .25rem; }
}

/* ---------- Buttons and forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; font-size: .95rem;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none;
  line-height: 1.25; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-soft); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand); border-color: transparent; padding-left: .4rem; padding-right: .4rem; }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-danger { background: #fff; color: var(--danger); border-color: #e5b4ae; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; }
.btn-ms { background: #fff; color: #1b1b1b; border: 1px solid #8c8c8c; font-weight: 600; }
.btn-ms:hover { background: #f3f3f3; color: #1b1b1b; }
.btn-ms svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 .3rem; color: var(--ink); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text); background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: .55rem .7rem; line-height: 1.4;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid #cfe2f7; outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); vertical-align: -2px; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .25rem; flex: none; }
.field { margin-bottom: 1.1rem; }
.field-error { color: var(--danger); font-size: .85rem; margin-top: .25rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; align-items: end; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 700px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-grid .span-2 { grid-column: auto; } }
.inline-form { display: inline; }
.inline-fields { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.inline-fields > * { flex: 1 1 12rem; }
.inline-fields > .btn, .inline-fields > .shrink { flex: 0 0 auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
legend { font-weight: 650; padding: 0 .4rem; color: var(--ink); }

/* ---------- Messages ---------- */
.alert { border-radius: var(--radius-sm); padding: .8rem 1rem; margin: 0 0 1.25rem; border: 1px solid; font-size: .95rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { background: var(--bg-tint); border-color: #c4d9f0; color: var(--brand-ink); }
.alert-ok { background: var(--ok-bg); border-color: #b7dfc6; color: var(--ok); }
.alert-warn { background: var(--warn-bg); border-color: #f0d9a4; color: var(--warn); }
.alert-error { background: var(--danger-bg); border-color: #f1c0ba; color: var(--danger); }

/* ---------- Sections (public) ---------- */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--ink); color: #c9d6e5; }
.section-dark h2, .section-dark h3 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .75rem; display: block; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.section-head { max-width: 48rem; margin-bottom: 2.25rem; }

.hero { padding: 4.5rem 0 4rem; background:
  radial-gradient(900px 400px at 85% -10%, rgba(10, 91, 176, .10), transparent 70%),
  linear-gradient(180deg, #f7f9fc 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { max-width: 15em; }
.hero .lead { margin-bottom: 1.75rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.5rem; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.hero-points li::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); margin-right: .5rem; vertical-align: 1px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero { padding: 3rem 0; } }

.page-head { padding: 3.25rem 0 2.25rem; background: linear-gradient(180deg, #f7f9fc 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.5rem); }
.page-head .lead { margin-bottom: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card-flat { box-shadow: none; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: .9rem; }
.card-icon svg { width: 22px; height: 22px; }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: .35rem 0 .35rem 1.6rem; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: .2rem; top: .78rem; width: .7rem; height: .4rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.feature-list li.no { color: var(--faint); }
.feature-list li.no::before { border: 0; height: 2px; top: .95rem; background: var(--faint); transform: none; width: .65rem; }

/* Regimes */
.regime-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 900px) { .regime-groups { grid-template-columns: minmax(0, 1fr); } }
.regime-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .8rem; }
.regime { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: .5rem; }
.regime b { color: var(--ink); font-weight: 600; }
.regime span { color: var(--muted); font-size: .88rem; text-align: right; }

/* Capital stack illustration */
.stack-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 1.4rem 1.5rem 1.2rem; }
.stack-card .stack-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.stack-card .stack-title b { color: var(--ink); }
.stack-card .stack-title span { color: var(--muted); font-size: .85rem; }
.stack-row { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; align-items: center; margin: .45rem 0; font-size: .88rem; color: var(--muted); }
.stack-bar { height: 12px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.stack-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), #3f86d1); }
.stack-bar i.accent { background: linear-gradient(90deg, var(--accent), #35a596); }
.stack-bar i.neg { background: repeating-linear-gradient(45deg, #c5ced9, #c5ced9 4px, #dde3ea 4px, #dde3ea 8px); }
.w-90 { width: 90%; } .w-72 { width: 72%; } .w-55 { width: 55%; } .w-38 { width: 38%; } .w-30 { width: 30%; } .w-22 { width: 22%; } .w-64 { width: 64%; }
.stack-total { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .8rem; display: flex; justify-content: space-between; font-size: .9rem; }
.stack-total b { color: var(--ink); }
.stack-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .9rem; }
.tag { display: inline-block; font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
@media (max-width: 1000px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 34rem; } }
.plan { display: flex; flex-direction: column; }
.plan .price { font-family: var(--font-display); font-size: 2rem; font-weight: 650; color: var(--ink); line-height: 1.1; margin: .4rem 0 .2rem; }
.plan .price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.plan .plan-for { color: var(--muted); min-height: 3em; }
.plan .feature-list { margin: 1rem 0 1.25rem; flex: 1; }
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.plans-free { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.25rem; }
@media (max-width: 1000px) { .plans-free { grid-template-columns: minmax(0, 1fr); } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; color: var(--ink); background: var(--bg-soft); font-size: .85rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--faint); }

/* Badges */
.badge { display: inline-block; font-size: .75rem; font-weight: 650; padding: .15rem .55rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; line-height: 1.5; }
.badge-enterprise { background: #e8eefc; color: #1f3f99; border-color: #c9d6f7; }
.badge-professional { background: #e3f1fb; color: #0a5687; border-color: #bfdcf0; }
.badge-academic { background: #f1e9fb; color: #5b2c99; border-color: #dccbf2; }
.badge-evaluation { background: var(--warn-bg); color: var(--warn); border-color: #f0d9a4; }
.badge-learning { background: var(--bg-soft); color: var(--muted); border-color: var(--line); }
.badge-active, .badge-paid, .badge-approved, .badge-ok, .badge-published { background: var(--ok-bg); color: var(--ok); border-color: #b7dfc6; }
.badge-suspended, .badge-overdue, .badge-rejected, .badge-blocked, .badge-revoked, .badge-device_limit, .badge-invalid_token, .badge-server_error { background: var(--danger-bg); color: var(--danger); border-color: #f1c0ba; }
.badge-invoiced, .badge-pending, .badge-scheduled, .badge-rate_limited, .badge-bad_request, .badge-draft { background: var(--warn-bg); color: var(--warn); border-color: #f0d9a4; }
.badge-ended, .badge-waived, .badge-expired, .badge-released, .badge-other { background: var(--bg-soft); color: var(--muted); border-color: var(--line); }
.badge-admin { background: var(--ink); color: #fff; }

/* Prose (legal pages, notes) */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.08rem; margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose table { margin: 1rem 0 1.5rem; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; font-size: .92rem; }
.toc ol { margin: .3rem 0 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg-tint); color: var(--brand); font-weight: 700; display: grid; place-items: center; }
.steps h3 { margin: .2rem 0 .25rem; font-size: 1.02rem; }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 0; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: .7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .3rem 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; }

/* ---------- Account portal ---------- */
.account-head { background: linear-gradient(180deg, #f7f9fc 0%, #fff 100%); border-bottom: 1px solid var(--line); padding: 2rem 0 0; }
.account-head h1 { font-size: 1.7rem; margin-bottom: .25rem; }
.account-head .who { color: var(--muted); margin-bottom: 1rem; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; }
.account-head .who form { display: inline; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .65rem 1rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.account-body { padding: 2rem 0 4rem; }
.licence-summary { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .licence-summary { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .55rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: minmax(0, 1fr); gap: .1rem; } .kv dd { margin-bottom: .6rem; } }
.plan-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.plan-hero .plan-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 650; color: var(--ink); }
.stamp-preview { font-family: var(--mono); font-size: .85rem; background: var(--warn-bg); color: var(--warn); padding: .35rem .6rem; border-radius: var(--radius-sm); display: inline-block; }
.device { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; background: #fff; }
.device h3 { margin: 0 0 .15rem; font-size: 1rem; }
.device p { margin: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 560px) { .device { flex-direction: column; align-items: flex-start; } }

/* ---------- Admin console ---------- */
.admin-body { background: var(--bg-soft); }
.admin-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--ink) 236px, transparent 236px); }
.admin-side { background: var(--ink); color: #b9c7d8; padding: 1.1rem .8rem 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #fff; padding: .2rem .5rem 1rem; }
.admin-side .brand .brand-sub { color: #8ea3bb; }
.admin-nav { list-style: none; margin: 0; padding: 0; }
.admin-nav .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #7489a2; padding: 1.1rem .6rem .35rem; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; color: #d3deeb; text-decoration: none; padding: .45rem .6rem; border-radius: var(--radius-sm); font-size: .92rem; }
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a[aria-current="page"] { background: rgba(127, 178, 234, .16); color: #fff; font-weight: 600; }
.admin-nav .count { background: #f0b429; color: #3a2800; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 .45rem; }
.admin-main { padding: 1.5rem 2rem 4rem; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.5rem; margin: 0; }
.admin-top .crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }
.admin-top .crumbs a { color: var(--muted); }
.admin-user { font-size: .85rem; color: var(--muted); display: flex; gap: .75rem; align-items: center; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.02rem; margin: 0; }
.panel-body { padding: 1.1rem; }
.panel .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.panel-foot { padding: .7rem 1.1rem; border-top: 1px solid var(--line); font-size: .88rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.stat .label { font-size: .8rem; color: var(--muted); }
.stat .value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 650; color: var(--ink); line-height: 1.2; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
.two-col-wide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .two-col, .two-col-wide { grid-template-columns: minmax(0, 1fr); } }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters > div { flex: 1 1 14rem; }
.filters > .shrink { flex: 0 0 auto; }
.empty { padding: 1.5rem 1.1rem; color: var(--muted); text-align: center; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: flex-end; padding: .8rem 1.1rem; font-size: .9rem; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.diff pre { margin: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .7rem; font-size: .78rem; max-height: 22rem; overflow: auto; white-space: pre-wrap; word-break: break-word; }
details.audit-detail summary { cursor: pointer; color: var(--brand); font-size: .85rem; }
.danger-zone { border-color: #f1c0ba; }
.danger-zone .panel-head { background: #fff8f7; }
.feed-output { width: 100%; height: 34rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.code-block { font-family: var(--mono); font-size: .8rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .7rem; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .admin-side { position: static; height: auto; padding: .75rem 1rem; }
  .admin-side details summary { cursor: pointer; color: #fff; padding: .4rem .5rem; }
  .admin-main { padding: 1.25rem 16px 3rem; }
}
@media (min-width: 901px) {
  .admin-side details > summary { display: none; }
}

/* ---------- v1 pages in the new frame ---------- */
.manual-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2.5rem; padding: 2rem 0 4rem; }
@media (max-width: 900px) { .manual-shell { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.manual-nav { font-size: .9rem; }
.manual-nav details { border-bottom: 1px solid var(--line); padding: .35rem 0; }
.manual-nav summary { cursor: pointer; font-weight: 650; color: var(--ink); padding: .3rem 0; }
.manual-nav ul { list-style: none; margin: .2rem 0 .5rem; padding: 0; }
.manual-nav a { display: block; padding: .22rem .5rem; color: var(--muted); text-decoration: none; border-radius: 4px; }
.manual-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.manual-nav a[aria-current="page"] { background: var(--bg-tint); color: var(--brand); font-weight: 600; }
.manual-content { min-width: 0; }
.manual-content img { max-width: 100%; height: auto; }
.manual-content iframe { max-width: 100%; }
.manual-content table { width: auto; max-width: 100%; display: block; overflow-x: auto; }
.manual-pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; }
.image-grid { display: flex; flex-wrap: wrap; margin-bottom: 1em; }
.image-grid .image { margin: 10px; }
.legacy-note { font-size: .9rem; color: var(--muted); }
.notes-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; padding: 2rem 0 4rem; }
@media (max-width: 900px) { .notes-shell { grid-template-columns: minmax(0, 1fr); } }
.notes-shell aside ol { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.notes-shell aside li { margin: .3rem 0; }
.notes-shell aside a[aria-current="page"] { font-weight: 700; }
.release-note .note-title { margin: .35rem 0 .25rem; }
.release-note .note-meta { color: var(--muted); margin: 0 0 1.5rem; }
.release-note h2 { margin-top: 2rem; }
.release-note .note-figure { margin: 1.5rem 0; }
.release-note .note-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.release-note .note-figure figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.release-note code { background: var(--bg-soft); padding: .05rem .3rem; border-radius: 4px; font-size: .9em; }
.notes-shell aside .notes-list li { margin: .45rem 0; }
.note-editor textarea { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9rem; line-height: 1.5; }
.note-help { width: 100%; border-collapse: collapse; }
.note-help td { padding: .3rem .4rem .3rem 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.note-help td:first-child { white-space: nowrap; }
.note-pictures { list-style: none; padding: 0; margin: .5rem 0 0; }
.note-pictures li { display: flex; gap: .6rem; align-items: center; margin: .5rem 0; min-width: 0; }
.note-pictures img { width: 64px; height: 48px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; flex: none; }
.note-pictures code { font-size: .75rem; overflow-wrap: anywhere; user-select: all; }
.note-preview-panel { margin-bottom: 1.25rem; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 760px) { .video-grid { grid-template-columns: minmax(0, 1fr); } }
.video-grid video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0d1b2a; border-radius: var(--radius); }

@media print {
  .site-header, .site-footer, .notice-bar, .tabs, .admin-side { display: none; }
  body { font-size: 11pt; }
}
