/* ==========================================================================
   Site pages (landing, log in, admin console) and shared account pieces.
   Built on the tokens and components in app.css.
   ========================================================================== */

/* scrolling documents instead of the studio's fixed frame */
html.site, html.site body, .auth-page { height: auto; overflow: auto; }
html.site { scroll-behavior: smooth; scroll-padding-top: 72px; }
html.site body { background: var(--stage-0); }
code { font-size: .92em; padding: 1px 5px; border-radius: var(--r1); background: var(--surface-3); color: var(--text-1); }

.btn-danger { background: var(--bad); border-color: var(--bad); color: #1d0b08; font-weight: 650; }
.btn-danger:hover:not(:disabled) { background: #ff8174; border-color: #ff8174; }
a.btn { text-decoration: none; }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; }
.muted { color: var(--text-3); font-weight: 500; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #3b352d, #2a2622); border: 1px solid var(--line-3);
  color: var(--accent-hi); font-weight: 680; font-size: var(--fs-s);
}
.avatar-lg { width: 38px; height: 38px; font-size: var(--fs-l); }
.avatar-btn { border: 0; background: none; padding: 2px; border-radius: 50%; }
.avatar-btn:hover .avatar { border-color: var(--accent); }

/* account menu (studio + admin) */
.account-slot { display: flex; margin-left: 4px; }
.account-menu { left: auto; right: 0; width: 280px; padding: 6px; }
.account-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; }
.account-head div { display: grid; min-width: 0; }
.account-head strong { font-weight: 640; }
.account-head small { color: var(--text-3); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; }
.account-plan { display: grid; gap: 6px; padding: 10px 8px; margin-bottom: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-plan > div { display: flex; gap: 6px; }
.account-plan small { color: var(--text-3); font-size: var(--fs-xs); }
.menu .menu-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: var(--r2);
  background: none; color: var(--text-1); text-decoration: none; font-size: var(--fs-s); font-weight: 500; text-align: left;
}
.menu .menu-row .i { color: var(--text-3); }
.menu .menu-row:hover, .menu .menu-row:focus-visible { background: var(--surface-3); outline: none; }
.menu .menu-row.danger, .menu .menu-row.danger .i { color: var(--bad); }

.banner-info { background: var(--select-soft); color: #cfe7ff; border: 1px solid rgba(95, 176, 255, .35); margin: 0 0 14px; }
.banner-bad { background: var(--bad-soft); color: #ffc2bb; border: 1px solid rgba(240, 107, 94, .4); margin: 0 0 14px; }

/* form fields (log in, admin plans) */
.form-field { display: grid; gap: 6px; }
.form-field > span { color: var(--text-2); font-size: var(--fs-s); font-weight: 560; }
.form-field em { font-style: normal; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.form-field small { color: var(--text-3); font-size: var(--fs-xs); }
.form-field input, .form-field textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r2); border: 1px solid var(--line-2);
  background: var(--surface-0); color: var(--text-1); font-size: var(--fs-m); transition: border-color .12s, box-shadow .12s;
}
.form-field textarea { height: auto; padding: 9px 12px; line-height: 1.5; resize: vertical; font: inherit; font-size: var(--fs-m); }
.form-field input:hover, .form-field textarea:hover { border-color: var(--line-3); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--select); box-shadow: 0 0 0 3px var(--select-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-check { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: var(--fs-s); cursor: pointer; }
.pw { position: relative; display: block; }
.pw input { padding-right: 60px; }
.pw .link-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Landing
   ========================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 64px; padding: 0 clamp(16px, 4vw, 48px); background: rgba(14, 16, 19, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.site-nav .brand-mark { width: 26px; height: 26px; }
.site-nav .brand-name, .site-nav .brand-studio { font-size: 16px; }
.site-links { display: flex; gap: 28px; }
.site-links a { color: var(--text-2); text-decoration: none; font-weight: 520; transition: color .12s; }
.site-links a:hover { color: var(--text-1); }
.site-account { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

.hero {
  display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; align-items: center; gap: 24px;
  min-height: calc(100vh - 64px); max-height: 940px; padding: 0 0 0 clamp(16px, 6vw, 96px); overflow: hidden;
}
.hero-copy { max-width: 560px; padding: 48px 0; position: relative; z-index: 2; }
.hero h1 {
  margin: 0; font-size: clamp(36px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.022em;
  font-weight: 760; font-stretch: 108%; text-wrap: balance;
}
.hero-sub { margin: 22px 0 0; color: var(--text-2); font-size: 17px; line-height: 1.55; max-width: 48ch; }
.hero-cta { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line); padding-top: 18px; }
.hero-facts div { padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--line); }
.hero-facts div:last-child { border-right: 0; }
.hero-facts dt { color: var(--text-3); font-size: var(--fs-xs); }
.hero-facts dd { margin: 3px 0 0; font-weight: 650; font-size: var(--fs-l); }

.hero-stage { position: relative; margin: 0; height: min(calc(100vh - 64px), 940px); min-height: 520px; }
.hero-canvas {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); cursor: grab;
  /* melt the render into the page instead of a framed box */
  -webkit-mask-image: radial-gradient(ellipse 58% 56% at 54% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 56% at 54% 50%, #000 58%, transparent 100%);
}
.hero-canvas.ready { opacity: 1; }
.hero-canvas.grabbing { cursor: grabbing; }
.hero-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-glow {
  position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-40%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(243, 181, 91, .16), transparent 65%); filter: blur(10px);
}
.hero-canvas.ready + .hero-glow { opacity: 0; transition: opacity 1.2s; }
.hero-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 16px; background: rgba(21, 20, 19, .8); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: var(--fs-s); white-space: nowrap; transition: opacity .6s;
}
.hero-hint.used { opacity: .45; }

.band { padding: clamp(64px, 9vw, 120px) clamp(16px, 6vw, 96px); border-top: 1px solid rgba(255, 255, 255, .05); }
.band-head { max-width: 640px; margin-bottom: 44px; }
.band h2 { margin: 0; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -.015em; font-weight: 720; font-stretch: 106%; text-wrap: balance; }
.band-head p { margin: 12px 0 0; color: var(--text-2); font-size: 16px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1040px; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border-radius: var(--r3);
  background: var(--surface-1); border: 1px solid var(--line-2);
}
.plan-hi { border-color: rgba(243, 181, 91, .55); background: linear-gradient(180deg, rgba(243, 181, 91, .07), var(--surface-1) 45%); }
.plan-flag { position: absolute; top: -11px; left: 24px; padding: 3px 9px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 680; }
.plan h3 { margin: 0; font-size: var(--fs-l); font-weight: 680; }
.plan-price { margin: 14px 0 0; display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 40px; font-weight: 740; letter-spacing: -.02em; font-stretch: 106%; }
.plan-price span { color: var(--text-3); }
.plan-price s { color: var(--text-3); font-size: 20px; font-weight: 560; text-decoration-thickness: 2px; }
.plan-sub { margin: 4px 0 0; min-height: 1.45em; color: var(--text-3); font-size: var(--fs-s); }
.plan-save { color: var(--good); font-weight: 620; }
.plan li.plan-no { color: var(--text-3); }
.plan li.plan-no .i { color: var(--text-3); }
.plan-period { width: max-content; margin: 0 0 28px; }
.plan-period button { height: 30px; padding: 0 14px; }
.plan-period em { font-style: normal; color: var(--good); font-weight: 620; }
.plan-blurb { margin: 6px 0 0; color: var(--text-2); }
.plan ul { list-style: none; margin: 20px 0 24px; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; color: var(--text-2); }
.plan li .i { color: var(--good); margin-top: 2px; }
.plan-cta { width: 100%; height: 38px; }
.plans-note { margin: 24px 0 0; color: var(--text-3); font-size: var(--fs-s); max-width: 640px; }

.site-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px clamp(16px, 6vw, 96px);
  border-top: 1px solid rgba(255, 255, 255, .05); color: var(--text-3); font-size: var(--fs-s);
}
.site-foot nav { display: flex; gap: 20px; }
.site-foot a { color: var(--text-3); text-decoration: none; }
.site-foot a:hover { color: var(--text-1); }

/* ==========================================================================
   Log in
   ========================================================================== */
.auth-page { background: var(--stage-0); }
.auth { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.auth-art { position: relative; background: #000; overflow: hidden; border-right: 1px solid var(--line); }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; }
.auth-art img[src] { opacity: .92; }
.auth-art-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 40px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.auth-art-copy p { margin: 0; color: var(--text-2); font-size: var(--fs-s); }
.auth-main { display: grid; align-content: center; justify-items: center; gap: 28px; padding: 48px 24px; }
.auth-main > .brand .brand-mark { width: 28px; height: 28px; }
.auth-main > .brand .brand-name, .auth-main > .brand .brand-studio { font-size: 18px; }
.auth-card { width: min(400px, 100%); }
.auth-tabs { margin-bottom: 28px; }
.auth-tabs button { height: 32px; }
.auth-card h1 { margin: 0; font-size: 26px; font-weight: 720; letter-spacing: -.012em; }
.auth-sub { margin: 6px 0 22px; color: var(--text-2); }
#auth-form { display: grid; gap: 16px; }
.auth-submit { width: 100%; margin-top: 6px; }
.auth-foot { margin: 20px 0 0; color: var(--text-3); font-size: var(--fs-s); }
.auth-social { display: grid; gap: 12px; margin-bottom: 20px; }
.auth-social-btns { display: grid; gap: 10px; }
/* provider buttons follow each brand's sign-in button rules: white with the G for Google, blue with the f for Facebook */
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 42px; border-radius: var(--r3);
  font-weight: 600; font-size: var(--fs-l); text-decoration: none; border: 1px solid transparent; transition: filter .15s, box-shadow .15s; }
.social-btn svg { width: 20px; height: 20px; flex: none; }
.social-btn:hover { filter: brightness(.95); }
.social-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.social-btn[aria-busy="true"] { pointer-events: none; opacity: .7; }
.social-google { background: #fff; color: #1f1f1f; border-color: #747775; }
.social-facebook { background: #1877f2; color: #fff; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: var(--fs-s); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ==========================================================================
   Admin console
   ========================================================================== */
.admin-app { grid-template-rows: var(--bar-h) 1fr; }
.admin-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 0; }
.admin-nav { display: grid; align-content: start; gap: 2px; padding: 14px 10px; background: var(--surface-1); border-right: 1px solid var(--line); }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r2);
  color: var(--text-2); text-decoration: none; font-weight: 560;
}
.admin-nav a .i { color: var(--text-3); }
.admin-nav a:hover { background: var(--surface-2); color: var(--text-1); }
.admin-nav a[aria-current="page"] { background: var(--surface-3); color: var(--text-1); }
.admin-nav a[aria-current="page"] .i { color: var(--accent); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--warn); color: #1e1206; font-size: var(--fs-xs); font-weight: 700; }
.admin-main { overflow-y: auto; padding: 24px clamp(16px, 3vw, 40px) 48px; outline: none; background: var(--surface-0); }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 22px; font-weight: 720; letter-spacing: -.01em; }
.admin-tools { display: flex; gap: 10px; align-items: center; }
.admin-lede { margin: -8px 0 20px; color: var(--text-2); max-width: 70ch; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface-1); overflow: hidden; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi dt { color: var(--text-3); font-size: var(--fs-s); }
.kpi dd { margin: 6px 0 2px; font-size: 28px; font-weight: 720; letter-spacing: -.02em; font-stretch: 104%; }
.kpi span { color: var(--text-3); font-size: var(--fs-xs); }
.kpi a { color: var(--select); }

.admin-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.panel { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface-1); }
.admin-grid { align-items: start; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel h2 { margin: 0; font-size: var(--fs-m); font-weight: 650; }
.panel-note { margin: 12px 0 0; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }
.live { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live dt { color: var(--text-3); font-size: var(--fs-xs); }
.live dd { margin: 3px 0 0; font-size: 22px; font-weight: 700; }
.live-dot { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-xs); }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.live-dot.on::before { background: var(--accent); animation: blink 1s infinite; }
.live-dot.off::before { background: var(--bad); }
.plan-split { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plan-split li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.plan-split .meter { grid-column: 1 / -1; }
.plan-split .meter i { background: var(--text-2); }

.chart-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; color: var(--text-2); font-size: var(--fs-xs); }
.chart-legend li, .c-tip span { display: flex; align-items: center; gap: 6px; }
.chart-legend i, .c-tip i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .c-grid { stroke: rgba(255, 255, 255, .06); }
.chart .c-base { stroke: var(--line-3); }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .c-y { text-anchor: end; dominant-baseline: central; }
.chart .c-x { text-anchor: middle; }
.chart .c-hit { fill: transparent; }
.chart .c-col.on .c-hit { fill: rgba(255, 255, 255, .04); }
.c-tip { position: absolute; left: 0; top: 0; z-index: 2; display: grid; gap: 4px; min-width: 150px; padding: 8px 10px; border-radius: var(--r2); background: var(--surface-3); border: 1px solid var(--line-3); box-shadow: var(--shadow-pop); font-size: var(--fs-xs); color: var(--text-2); pointer-events: none; }
.c-tip strong { color: var(--text-1); font-size: var(--fs-s); }
.c-tip b { margin-left: auto; padding-left: 12px; color: var(--text-1); }

.requests { list-style: none; margin: 0; padding: 0; display: grid; }
.requests li { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.requests li:first-child { border-top: 0; }
.requests div { display: grid; min-width: 0; }
.requests small { color: var(--text-3); font-size: var(--fs-xs); }
.empty-note { display: flex; align-items: center; gap: 10px; margin: 0; padding: 18px; color: var(--text-3); }
.empty-note .i { color: var(--good); }

.search { display: flex; align-items: center; gap: 8px; width: min(340px, 100%); height: 34px; padding: 0 10px; border-radius: var(--r2); border: 1px solid var(--line-2); background: var(--surface-1); color: var(--text-3); }
.search:focus-within { border-color: var(--select); box-shadow: 0 0 0 3px var(--select-soft); }
.search input { flex: 1; border: 0; background: none; outline: none; color: var(--text-1); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface-1); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.table th { position: sticky; top: 0; text-align: left; padding: 10px 14px; color: var(--text-3); font-weight: 560; background: var(--surface-1); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-off td { opacity: .55; }
.table tr.is-off td:nth-last-child(-n+2) { opacity: 1; }
.cell-user { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.cell-user div { display: grid; }
.cell-user strong { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cell-user small { color: var(--text-3); }
.cell-plan { display: flex; gap: 8px; align-items: center; }
.select-sm select { height: 26px; min-width: 100px; }
.chip-btn-act { border: 0; cursor: pointer; }
.chip-btn-act:hover { filter: brightness(1.2); }
.cell-act { width: 40px; text-align: right; }
.cell-file { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-err { color: var(--text-3); font-size: var(--fs-xs); max-width: 360px; margin-top: 4px; }
.chip .i { width: 12px; height: 12px; }
.chip-x { border: 0; background: none; color: inherit; padding: 0; margin-left: 2px; display: grid; }
.row-menu { position: fixed; z-index: 50; min-width: 220px; left: 0; top: 0; }

.plan-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.plan-form { display: grid; gap: 14px; align-content: start; }
.plan-form-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.plan-form .form-hint { margin: -8px 0 0; color: var(--text-3); font-size: var(--fs-xs); min-height: 1.3em; }
.plan-preview { margin-top: 6px; padding-top: 18px; border-top: 1px dashed var(--line-2); display: grid; gap: 10px; }
.plan-preview-label { color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.plan-preview .plan { pointer-events: none; }
.plan-preview.is-hidden .plan { opacity: .45; }
.admin-tools .plan-period { margin: 0; }
.confirm-dialog { width: min(440px, calc(100vw - 48px)); }
.confirm-body { padding: 16px 20px; color: var(--text-2); line-height: 1.55; }
.confirm-body p { margin: 0 0 12px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.secret { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r2); background: var(--surface-0); border: 1px solid var(--line-2); }
.secret code { background: none; font-size: var(--fs-l); letter-spacing: .03em; color: var(--accent-hi); }
.skeleton { height: 220px; border-radius: var(--r3); background: linear-gradient(90deg, var(--surface-1), var(--surface-2), var(--surface-1)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton-lg { height: 360px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.failure-inline { display: grid; justify-items: center; gap: 10px; padding: 64px 24px; text-align: center; }
.failure-inline .i { color: var(--bad); }
.failure-inline h2 { margin: 0; font-size: var(--fs-xl); }
.failure-inline p { margin: 0; color: var(--text-2); }

/* ==========================================================================
   Legal pages (terms, privacy, refunds, legal notice)
   ========================================================================== */
.legal-wrap {
  display: grid; grid-template-columns: 220px minmax(0, 720px); gap: clamp(24px, 5vw, 72px); justify-content: center;
  padding: clamp(40px, 6vw, 80px) clamp(16px, 6vw, 96px) 96px;
}
.legal-nav { position: sticky; top: 96px; align-self: start; display: grid; gap: 2px; }
.legal-nav a { padding: 7px 10px; border-radius: var(--r2); color: var(--text-2); text-decoration: none; font-weight: 520; }
.legal-nav a:hover { background: var(--surface-2); color: var(--text-1); }
.legal-nav a[aria-current] { background: var(--surface-3); color: var(--text-1); }
.legal { font-size: 15px; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere; }
.legal h1 { margin: 0; color: var(--text-1); font-size: clamp(28px, 3vw, 38px); line-height: 1.1; font-weight: 720; letter-spacing: -.015em; font-stretch: 106%; }
.legal h2 { margin: 40px 0 10px; color: var(--text-1); font-size: 19px; font-weight: 680; scroll-margin-top: 88px; }
.legal p, .legal ul, .legal dl { margin: 0 0 14px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text-1); font-weight: 620; }
.legal a { color: var(--accent); }
.legal a:hover { color: var(--accent-hi); }
.legal-updated { color: var(--text-3); font-size: var(--fs-s); margin: 8px 0 28px !important; }
.legal-lead { font-size: 17px; color: var(--text-1); }
.legal-note { padding: 12px 14px; border-radius: var(--r3); background: var(--accent-soft); color: var(--text-1); border: 1px solid rgba(243, 181, 91, .3); }
.legal-address { padding-left: 14px; border-left: 2px solid var(--line-3); color: var(--text-1); }
.legal-version { margin-top: 40px !important; color: var(--text-3); font-size: var(--fs-s); }
.legal-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.legal-table th { text-align: left; color: var(--text-1); font-weight: 640; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-3); }
.legal-table td { vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal-table td:last-child { width: 26%; color: var(--text-3); }
.legal-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
.legal-dl dt { color: var(--text-3); }
.legal-dl dd { margin: 0; color: var(--text-1); }
.legal-form { padding: 18px 20px; border: 1px dashed var(--line-3); border-radius: var(--r3); background: var(--surface-1); }
.legal-form p:last-child { margin-bottom: 0; }
.legal-missing { padding: 0 4px; border-radius: var(--r1); background: var(--bad-soft); color: #ffc2bb; font-weight: 600; }
.auth-legal { margin: 2px 0 0; color: var(--text-3); font-size: var(--fs-s); line-height: 1.5; }
.auth-legal a { color: var(--text-2); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; max-height: none; padding: 0 clamp(16px, 6vw, 96px); }
  .hero-copy { padding: 56px 0 0; }
  .hero-stage { height: 62vh; min-height: 420px; margin: 0 calc(-1 * clamp(16px, 6vw, 96px)); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .site-links { display: none; }
  .site-nav { grid-template-columns: 1fr auto; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-nav { grid-auto-flow: column; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-facts { flex-wrap: wrap; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .legal-wrap { grid-template-columns: minmax(0, 1fr); }
  .legal-nav { position: static; grid-auto-flow: column; justify-content: start; overflow-x: auto; }
  .legal-nav a { white-space: nowrap; }
  .legal-table thead { display: none; }
  .legal-table tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal-table td { border: 0; padding: 2px 0; }
  .legal-table td:last-child { width: auto; }
  .legal-dl { grid-template-columns: 1fr; gap: 2px; }
  .legal-dl dd { margin-bottom: 10px; }
}

/* ---------- admin: Server ---------- */
.verdicts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.verdict { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface-1); }
.verdict .i { width: 16px; height: 16px; }
.verdict strong { font-size: var(--fs-s); font-weight: 650; }
.v-label { font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.v-why { grid-column: 1 / -1; color: var(--text-2); font-size: var(--fs-xs); line-height: 1.45; }
.v-good .i, .v-good .v-label { color: var(--good); } .v-good .v-label { background: var(--good-soft); }
.v-warn .i, .v-warn .v-label { color: var(--warn); } .v-warn .v-label { background: var(--warn-soft); }
.v-bad { border-color: rgba(240, 107, 94, .45); }
.v-bad .i, .v-bad .v-label { color: var(--bad); } .v-bad .v-label { background: var(--bad-soft); }
.kpi dd small { font-size: 13px; font-weight: 520; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.server-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel-span { grid-column: 1 / -1; }
.mchart .c-limit { stroke: var(--text-3); stroke-dasharray: 5 4; stroke-width: 1; }
.mchart .c-limit-t { text-anchor: start; font-size: 10.5px; fill: var(--text-2); }
.mchart .c-empty { text-anchor: middle; fill: var(--text-3); font-size: 12px; }
.mchart .c-cross line { stroke: var(--line-3); stroke-width: 1; }
.c-tip-x { color: var(--text-3); }
.sv-form { display: grid; gap: 14px; }
.sv-row { display: flex; align-items: end; gap: 8px; }
.sv-row .form-field { flex: 1; }
.sv-table td:first-child, .sv-table th[scope="row"] { font-weight: 560; color: var(--text-1); }
.sv-table th[scope="row"] { position: static; background: none; border-bottom: 1px solid var(--line); padding: 10px 14px; white-space: normal; }
.sv-table .chip .i { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.sv-table td.muted { font-size: var(--fs-xs); line-height: 1.45; max-width: 46ch; }
@media (max-width: 1100px) { .server-grid { grid-template-columns: minmax(0, 1fr); } }
