:root {
  --bg: #f7f5f0; --surface: #ffffff; --surface-2: #f1eee7; --fg: #161a22; --muted: #4f5563; --line: #d6d1c6; --line-2: #e6e2d9; --line-strong: #7f7a70;
  --brand: #0e5a68; --brand-hover: #0a4753; --brand-soft: #dcecef; --brand-ink: #0b4a56; --teal: #0e5a68; --lacquer: #c9680f; --lacquer-soft: #fbe9d6; --lacquer-ink: #9a4f0b;
  --good: #1f7a45; --good-soft: #dff2e4; --warn: #7a5a00; --warn-soft: #f8edc8; --bad: #b3261e; --bad-soft: #fbe3e1;
  --on-brand: #ffffff; --overlay: rgba(22,26,34,.5);
  --font: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; --font-display: "Schibsted Grotesk", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r-ctrl: 8px; --r-frame: 10px; --r-card: 12px; --radius: var(--r-frame); --shadow: 0 1px 0 rgba(22,26,34,.08);
  --sidebar: 240px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: "IBM Plex Mono", Consolas, monospace; font-size: .86em; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: var(--r-ctrl); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus, .flashes:focus { outline: none; }

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); color: var(--fg); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar::before { content: ""; display: block; height: 4px; background: repeating-linear-gradient(90deg, var(--brand) 0 28px, transparent 28px 36px, var(--lacquer) 36px 64px, transparent 64px 72px); }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; text-decoration: none; color: var(--fg); }
.sidebar .brand svg { width: 30px; height: 30px; }
.sidebar .brand .dot, .auth-side .brand .dot, .public-head .brand .dot { color: var(--lacquer); }
.sidebar nav { display: grid; gap: 2px; padding: 8px 12px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-ctrl); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.sidebar nav a svg { width: 18px; height: 18px; flex: none; }
.sidebar nav a:hover { background: var(--surface-2); color: var(--fg); }
.sidebar nav a.active { background: var(--brand-soft); color: var(--brand-ink); }
.sidebar nav a .badge { margin-left: auto; background: var(--lacquer-ink); color: var(--on-brand); font-size: .76rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sidebar .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 16px 24px 6px; font-weight: 700; }
.sidebar .foot { margin-top: auto; padding: 14px 20px 18px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; font-size: .85rem; }
.sidebar .user { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.sidebar .user .avatar { background: var(--brand); color: var(--on-brand); }
.sidebar .user small { display: block; color: var(--muted); font-size: .78rem; }
.sidebar .plan-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.sidebar .plan-pill b { color: var(--fg); }
.sidebar .foot a.quiet { color: var(--muted); text-decoration: none; }
.sidebar .foot a.quiet:hover { color: var(--fg); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 1.25rem; }
.topbar .actions { display: flex; gap: 10px; align-items: center; }
.page { padding: 28px 32px 48px; display: grid; gap: 24px; align-content: start; }
.menu-btn { display: none; min-width: 40px; min-height: 40px; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s ease; z-index: 20; }
  .sidebar.open { transform: none; }
  .sidebar.open::after { content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: var(--sidebar); background: var(--overlay); }
  .menu-btn { display: inline-flex; }
  .topbar, .page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: var(--on-brand); background: var(--muted); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.neutral { }
.pill.plain::before { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-ctrl); font-family: var(--font-display); font-weight: 600; font-size: .92rem; text-decoration: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; line-height: 1.2; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--fg); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { padding: 6px 11px; font-size: .84rem; min-height: 32px; }
.btn-lg { padding: 13px 22px; font-size: 1rem; min-height: 48px; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--brand-ink); padding: 0; font-weight: 600; cursor: pointer; font-family: var(--font); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 1.02rem; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid { display: grid; gap: 20px; }
.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)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.kpi { padding: 18px 20px; display: grid; gap: 4px; }
.kpi .label { font-size: .86rem; color: var(--muted); font-weight: 500; }
.kpi .value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.kpi .delta { font-size: .84rem; font-weight: 600; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: var(--bad); }
.kpi .delta.flat { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.data td { padding: 12px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-2); }
table.data a.row-link { color: inherit; text-decoration: none; }
table.data a.row-link:hover { text-decoration: underline; }
table.data td.r, table.data th.r { text-align: right; }
table.data .sub { display: block; font-size: .8rem; color: var(--muted); }
table.data tr.handled td { color: var(--muted); }
.bar { display: inline-block; width: 72px; height: 6px; border-radius: 3px; background: var(--line-2); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--good); }
.bar.warn i { background: var(--warn); }
.bar.bad i { background: var(--bad); }
.bar.brand i { background: var(--brand); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty b { color: var(--fg); font-family: var(--font-display); font-size: 1.05rem; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: .86rem; font-weight: 600; }
.field .hint { font-size: .86rem; color: var(--muted); }
.field .error { font-size: .86rem; color: var(--bad); font-weight: 600; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=file], .field select, .field textarea {
  font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); background: var(--surface); color: var(--fg); width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); }
.field.invalid input:focus, .field.invalid select:focus, .field.invalid textarea:focus { outline-color: var(--bad); }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; cursor: pointer; background: var(--surface); font-family: var(--font); color: var(--fg); min-height: 32px; }
.chip input { accent-color: var(--brand); }
.chip:has(input:checked), .chip[aria-pressed=true] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.chip:hover { border-color: var(--brand); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { font: inherit; font-size: .9rem; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); background: var(--surface); }

.flashes { display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--r-frame); font-size: .92rem; border: 1px solid transparent; display: flex; gap: 10px; align-items: flex-start; word-break: break-word; }
.flash.success { background: var(--good-soft); color: var(--good); }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.flash.info { background: var(--brand-soft); color: var(--brand-ink); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--brand-ink); border-color: var(--brand); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .86rem; font-weight: 600; color: var(--muted); min-height: 32px; }
.filters a.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.filters a .n { font-size: .76rem; background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }
.filters a.active .n { background: var(--brand-ink); color: var(--on-brand); }

.inbox { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; }
.inbox-side { border-right: 1px solid var(--line-2); padding: 12px; display: grid; gap: 2px; align-content: start; }
.inbox-side a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-ctrl); text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 500; }
.inbox-side a:hover { background: var(--surface-2); }
.inbox-side a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.inbox-side a .n { font-size: .76rem; background: var(--surface-2); padding: 2px 8px; border-radius: 999px; color: var(--muted); }
.inbox-side a .n.new { background: var(--lacquer-soft); color: var(--lacquer-ink); font-weight: 700; }
.inbox-side a.active .n { background: var(--brand); color: var(--on-brand); }
.inbox-side a.active .n.new { background: var(--lacquer-ink); color: var(--on-brand); }
.inbox-side .sep { height: 1px; background: var(--line-2); margin: 8px 4px; }
.reply-list { display: grid; }
.reply-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 20px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.reply-row:hover { background: var(--surface-2); }
.reply-row.unread { background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface)); }
.reply-row.unread .who { font-weight: 700; }
.reply-row .who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: .95rem; }
.reply-row .who small { font-weight: 400; color: var(--muted); }
.reply-row .text { font-size: .9rem; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-row .when { font-size: .8rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 800px) { .inbox { grid-template-columns: 1fr; } .inbox-side { border-right: 0; border-bottom: 1px solid var(--line-2); display: flex; overflow-x: auto; } .inbox-side a { white-space: nowrap; } .reply-row { grid-template-columns: 40px minmax(0, 1fr); } .reply-row .when { display: none; } }

.thread { display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--r-frame); padding: 14px 16px; background: var(--surface); }
.msg.in { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 40%, var(--surface)); }
.msg.queued { border-style: dashed; }
.msg .meta { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.msg .body { white-space: pre-wrap; font-size: .93rem; line-height: 1.55; }
.lead-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.lead-card dt { color: var(--muted); }
.lead-card dd { margin: 0; }

.step-card { border: 1px solid var(--line); border-radius: var(--r-frame); padding: 16px; display: grid; gap: 12px; background: var(--surface-2); }
.step-card .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.step-card .head b { font-family: var(--font-display); }
.step-card .delay { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.step-card .delay input { width: 64px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vars code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; font-size: .78rem; cursor: pointer; }
.preview { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-frame); padding: 14px 16px; white-space: pre-wrap; font-size: .9rem; }

.ready-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ready-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: .92rem; }
.ready-list li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .8rem; background: var(--line-2); color: var(--muted); }
.ready-list li.ok i { background: var(--good-soft); color: var(--good); }
.ready-list li.no i { background: var(--bad-soft); color: var(--bad); }
.ready-list li small { display: block; color: var(--muted); font-size: .84rem; }

.chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 140px; padding-top: 8px; }
.chart .col { display: grid; align-items: end; height: 100%; position: relative; }
.chart .col i { display: block; border-radius: 3px 3px 0 0; background: var(--brand); min-height: 2px; }
.chart .col i.r { background: var(--good); }
.chart .col:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--on-brand); font-size: .74rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; z-index: 2; }
.chart-labels { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; font-size: .76rem; color: var(--muted); text-align: center; margin-top: 6px; }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--brand); }
.legend i.r { background: var(--good); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; display: grid; gap: 14px; align-content: start; background: var(--surface); position: relative; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.plan.current { border-color: var(--good); }
.plan .badge { position: absolute; top: -11px; left: 18px; background: var(--lacquer-soft); color: var(--lacquer-ink); border: 1px solid var(--lacquer-ink); font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .badge.cur { background: var(--good); color: var(--on-brand); border-color: var(--good); }
.plan .name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.plan .price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.plan .price small { font-family: var(--font); font-size: .85rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .9rem; }
.plan li::before { content: "✓ "; color: var(--brand); font-weight: 700; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

.progress { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); transition: width .4s ease; }
.steps-list { display: grid; gap: 12px; }
.steps-list .s { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.steps-list .s .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--line-2); color: var(--muted); }
.steps-list .s.done .dot { background: var(--good-soft); color: var(--good); }
.steps-list .s.now .dot { background: var(--brand); color: var(--on-brand); }
.steps-list .s p { font-size: .88rem; color: var(--muted); }
.steps-list .s .btn { margin-top: 8px; }

.wizard { display: flex; gap: 24px; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }
.wizard span { display: inline-flex; align-items: center; gap: 8px; }
.wizard span i { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-weight: 700; font-size: .76rem; background: var(--line-2); }
.wizard span.now { color: var(--fg); font-weight: 600; }
.wizard span.now i { background: var(--brand); color: var(--on-brand); }
.wizard span.done i { background: var(--good-soft); color: var(--good); }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--surface-2); color: var(--fg); border-right: 1px solid var(--line); padding: clamp(32px, 6vw, 72px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; text-decoration: none; color: var(--fg); }
.auth-side .brand svg { width: 32px; height: 32px; }
.auth-side h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); color: var(--fg); max-width: 20ch; }
.auth-side h2 em { font-style: normal; color: var(--brand); }
.auth-side p { color: var(--muted); max-width: 46ch; margin-top: 14px; }
.auth-side ul { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: .95rem; }
.auth-side li::before { content: "✓ "; color: var(--lacquer); font-weight: 700; }
.auth-main { display: grid; place-items: center; padding: clamp(24px, 5vw, 64px) max(16px, env(safe-area-inset-right, 0px)) clamp(24px, 5vw, 64px) max(16px, env(safe-area-inset-left, 0px)); }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-card .alt { font-size: .9rem; color: var(--muted); }
.auth-card .alt a { color: var(--brand-ink); font-weight: 600; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

.public { min-height: 100vh; display: flex; flex-direction: column; }
.public-head { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.public-head .brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; text-decoration: none; color: var(--fg); }
.public-head .brand svg { width: 30px; height: 30px; }
.public-main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 20px; align-content: start; }
.public-main h1 { font-size: 1.6rem; }
.public-main .alt { font-size: .9rem; color: var(--muted); }
.public-main .alt a { color: var(--brand-ink); font-weight: 600; }
.public-foot { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); font-size: .86rem; color: var(--muted); text-align: center; border-top: 1px solid var(--line-2); }
.public-foot a { color: var(--muted); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.list-plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.log { display: grid; gap: 0; font-size: .88rem; }
.log div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.log div span:first-child { color: var(--muted); font-size: .8rem; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.callout { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 12px 16px; border-radius: 0 var(--r-frame) var(--r-frame) 0; font-size: .92rem; }
.callout.warn { border-color: var(--warn); background: var(--warn-soft); }
.callout.bad { border-color: var(--bad); background: var(--bad-soft); }
.callout.good { border-color: var(--good); background: var(--good-soft); }
details.more summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--brand-ink); }
.confirm-dialog { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 50; padding: 16px; }
.confirm-dialog .box { background: var(--surface); border-radius: var(--r-card); padding: 24px; max-width: 420px; width: 100%; display: grid; gap: 14px; box-shadow: var(--shadow); }
.confirm-dialog .box .row { justify-content: flex-end; }

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