/* Tempmail. Нейтральная шкала + один акцент (индиго). Системные шрифты, без внешних запросов.
   Компоненты ссылаются только на семантические токены (--bg, --surface, --ink, --accent ...). */
:root {
  /* primitives */
  --n-0: #ffffff; --n-50: #f7f7f5; --n-100: #efefec; --n-200: #e2e2dd; --n-600: #5c5c56; --n-900: #1a1a18;
  --i-50: #eceefd; --i-600: #4350d9; --i-800: #2b35a8;
  --r-600: #bf3320; --g-700: #1c7448;
  /* semantic (light) */
  --bg: var(--n-50); --surface: var(--n-0); --sunk: var(--n-100); --line: var(--n-200);
  --ink: var(--n-900); --ink-2: var(--n-600);
  --accent: var(--i-600); --on-accent: #ffffff; --accent-soft: var(--i-50); --accent-ink: var(--i-800);
  --danger: var(--r-600); --on-danger: #ffffff; --ok: var(--g-700);
  --shadow: 0 1px 2px rgb(20 20 15 / .06), 0 8px 24px rgb(20 20 15 / .08);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --side: 264px; --list: 380px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f11; --surface: #16171a; --sunk: #202125; --line: #2b2c31; --ink: #ececf0; --ink-2: #a2a3ad;
    --accent: #929dff; --on-accent: #0e0f11; --accent-soft: #23264d; --accent-ink: #b5bcff;
    --danger: #ff8d79; --on-danger: #0e0f11; --ok: #72d6a0; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f11; --surface: #16171a; --sunk: #202125; --line: #2b2c31; --ink: #ececf0; --ink-2: #a2a3ad;
  --accent: #929dff; --on-accent: #0e0f11; --accent-soft: #23264d; --accent-ink: #b5bcff;
  --danger: #ff8d79; --on-danger: #0e0f11; --ok: #72d6a0; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .45); color-scheme: dark;
}
.no-tr, .no-tr * { transition: none !important; }

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 0.9375rem/1.5 var(--sans); min-height: 100dvh; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.01em; text-wrap: balance; }
a { color: var(--accent); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
kbd { font: 600 0.6875rem/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--sunk); color: var(--ink-2); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 0.875rem; font-weight: 500; line-height: 1.2;
  cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap;
  transition-property: scale, background-color, border-color, color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.btn:enabled:active, a.btn:active { scale: 0.96; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.icon { padding: 0; width: 36px; }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 0.8125rem; }
.btn.sm.icon { width: 30px; }
@media (hover: hover) {
  .btn:enabled:hover, a.btn:hover { background: var(--sunk); }
  .btn.primary:enabled:hover, .btn.danger-solid:enabled:hover { background: var(--accent); filter: brightness(1.1); }
  .btn.danger-solid:enabled:hover { background: var(--danger); }
}
@media (pointer: coarse) { .btn { min-height: 44px; } .btn.icon { width: 44px; } .btn.sm { min-height: 40px; } .btn.sm.icon { width: 40px; } }

/* ---------- поля ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--ink-2); border-radius: 8px; background: var(--surface); font-size: 1rem;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 84px; resize: vertical; font-family: var(--mono); font-size: 0.9rem; }
select { width: auto; }
label { display: grid; gap: 6px; font-size: 0.8125rem; font-weight: 600; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 0.9375rem; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.note { font-size: 0.8125rem; color: var(--ink-2); }
.err { font-size: 0.875rem; color: var(--danger); min-height: 1.4em; }

/* ---------- диалоги и тосты ---------- */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 24px; width: min(92vw, 480px); max-height: 90dvh; overflow: auto; overscroll-behavior: contain; box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(8 8 10 / .5); }
dialog h2 { font-size: 1.125rem; margin-bottom: 16px; }
dialog form { display: grid; gap: 16px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: pop 180ms var(--ease); }
  dialog[open]::backdrop { animation: fade 180ms ease-out; }
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; inset-inline: 16px; bottom: 20px; margin-inline: auto; width: max-content; max-width: calc(100vw - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 0.875rem; z-index: 50; opacity: 0; translate: 0 8px; pointer-events: none; transition-property: opacity, translate; transition-duration: 200ms; transition-timing-function: var(--ease); }
.toast.show { opacity: 1; translate: 0 0; }
.toast[data-kind="err"] { background: var(--danger); color: var(--on-danger); }

/* ---------- аватар, бейджи ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 0.875rem; text-transform: uppercase; }
.avatar.sm { width: 28px; height: 28px; font-size: 0.75rem; }
.badge { display: inline-flex; align-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 700 0.6875rem/1 var(--sans); font-variant-numeric: tabular-nums; justify-content: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); font-size: 0.75rem; font-weight: 600; }
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.chip { display: inline-block; font: 700 0.75rem/1.4 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; padding: 0 8px; width: max-content; }

/* ======================= ПОЧТОВЫЙ КЛИЕНТ ======================= */
.mail { display: grid; grid-template-columns: var(--side) var(--list) minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-inline-end: 1px solid var(--line); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 0.95rem/1 var(--mono); }
.side-new { padding: 8px 16px 12px; }
.side-new .btn { width: 100%; justify-content: space-between; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 8px 8px; overscroll-behavior: contain; }
.side h3 { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding: 12px 8px 6px; font-weight: 700; }
.boxes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.box-btn { width: 100%; display: flex; align-items: center; gap: 8px; text-align: start; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; min-height: 40px; transition: background-color 150ms ease-out; }
.box-btn .t { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.box-btn .l { font-weight: 600; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-btn .d { font-size: 0.75rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-btn[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.box-btn[aria-current="true"] .d { color: inherit; opacity: .8; }
@media (hover: hover) { .box-btn:hover { background: var(--sunk); } .box-btn[aria-current="true"]:hover { background: var(--accent-soft); } }
.side-empty { padding: 8px 10px; font-size: 0.8125rem; color: var(--ink-2); }
.side-foot { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me .who { flex: 1; min-width: 0; line-height: 1.25; }
.me .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.foot-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.foot-row .grow { flex: 1; }
.foot-row select { min-height: 30px; padding: 2px 8px; font-size: 0.8125rem; }
.hints { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.6875rem; color: var(--ink-2); }

/* список писем */
.listpane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); border-inline-end: 1px solid var(--line); }
.list-head { padding: 14px 16px 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.addr-row { display: flex; align-items: center; gap: 8px; min-height: 36px; min-width: 0; }
.addr-row .menu-btn { display: none; }
.addr { flex: 1; min-width: 0; text-align: start; border: 0; background: transparent; padding: 4px 6px; margin-inline-start: -6px; border-radius: 6px; cursor: pointer; font: 600 0.9375rem/1.3 var(--mono); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); transition: background-color 150ms ease-out; }
@media (hover: hover) { .addr:hover { background: var(--sunk); } }
.guest-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.8125rem; color: var(--ink-2); flex-wrap: wrap; }
.guest-bar b { color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.guest-bar.low b { color: var(--danger); }
.searchbox { position: relative; }
.searchbox .ico { position: absolute; inset-inline-start: 10px; top: 11px; color: var(--ink-2); pointer-events: none; }
.searchbox input { padding-inline-start: 36px; padding-inline-end: 36px; min-height: 40px; }
.searchbox kbd { position: absolute; inset-inline-end: 10px; top: 11px; }
.filters { display: flex; gap: 6px; }
.filters .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.msgs { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.msgs > li { border-bottom: 1px solid var(--line); }
.msg-btn { width: 100%; text-align: start; border: 0; background: var(--surface); padding: 12px 16px 12px 36px; display: grid; gap: 2px; cursor: pointer; position: relative; transition: background-color 150ms ease-out; }
.msg-btn .top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; color: var(--ink-2); }
.msg-btn .from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg-btn .subj { font-size: 0.9375rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-btn .snip { font-size: 0.8125rem; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.msg-btn .chip { margin-top: 2px; }
.msg-btn.unread .subj, .msg-btn.unread .from { font-weight: 700; color: var(--ink); }
.msg-btn.unread::before { content: ""; position: absolute; inset-inline-start: 15px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.msg-btn[aria-current="true"] { background: var(--accent-soft); }
.msg-btn[aria-current="true"] .snip, .msg-btn[aria-current="true"] .top { color: var(--accent-ink); }
@media (hover: hover) { .msg-btn:hover { background: var(--sunk); } .msg-btn[aria-current="true"]:hover { background: var(--accent-soft); } }
.skel { padding: 14px 16px 14px 36px; display: grid; gap: 8px; background: var(--surface); }
.skel i { display: block; height: 10px; border-radius: 5px; background: var(--sunk); }
.skel i:nth-child(1) { width: 40%; } .skel i:nth-child(2) { width: 75%; } .skel i:nth-child(3) { width: 55%; }
@media (prefers-reduced-motion: no-preference) { .skel i { animation: shimmer 1.4s ease-in-out infinite; } }
@keyframes shimmer { 50% { opacity: .45; } }
.empty-state { display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; padding: 56px 24px; color: var(--ink-2); max-width: 36ch; margin: 0 auto; }
.empty-state .ring { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.empty-state .ring .ico { width: 26px; height: 26px; }
.empty-state h2 { font-size: 1.0625rem; color: var(--ink); }
.empty-state .pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; }
@media (prefers-reduced-motion: no-preference) { .empty-state .pulse { animation: shimmer 1.6s ease-in-out infinite; } }

/* окно чтения */
.reader { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
.r-tools { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.r-tools .grow { flex: 1; }
.r-tools .back { display: none; }
.r-scroll { flex: 1; overflow-y: auto; padding: 24px 32px 40px; overscroll-behavior: contain; }
.r-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }
.r-inner h2 { font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }
.sender { display: flex; gap: 12px; align-items: center; min-width: 0; }
.sender .who { min-width: 0; line-height: 1.35; }
.sender .who b { overflow-wrap: anywhere; }
.sender .who span { display: block; font-size: 0.8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.found { display: grid; gap: 10px; border: 1px solid var(--accent); border-radius: 12px; padding: 14px 16px; background: var(--accent-soft); }
.found h3 { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); font-weight: 700; }
.codes { display: flex; flex-wrap: wrap; gap: 10px; }
.code { display: inline-flex; align-items: center; gap: 12px; font: 700 clamp(1.5rem, 5vw, 2rem)/1.1 var(--mono); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; padding: 10px 16px; background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; cursor: pointer; color: var(--ink); transition-property: scale, background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.code .ico { color: var(--accent-ink); }
.code:active { scale: 0.96; }
@media (hover: hover) { .code:hover { background: var(--bg); } }
.link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-row .u { flex: 1 1 220px; min-width: 0; font: 0.8125rem var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tabs .grow { flex: 1; }
.tabs .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.frame { width: 100%; height: clamp(320px, 62dvh, 720px); border: 1px solid var(--line); border-radius: 10px; background: #fff; color-scheme: light; }
.plain { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.875rem/1.6 var(--mono); margin: 0; max-width: 80ch; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; }
.reader-empty { flex: 1; display: grid; place-items: center; }
.r-fade { animation: none; }
@media (prefers-reduced-motion: no-preference) { .r-fade { animation: rise 220ms var(--ease); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- боковая панель как ящик (до 1100px) ---------- */
@media (max-width: 1100px) {
  .mail { grid-template-columns: var(--list) minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 300px); z-index: 30; translate: -100% 0; box-shadow: var(--shadow); transition: translate 220ms var(--ease); }
  [dir="rtl"] .side { translate: 100% 0; }
  .side.open { translate: 0 0; }
  .scrim { position: fixed; inset: 0; z-index: 25; background: rgb(8 8 10 / .45); opacity: 0; pointer-events: none; transition: opacity 200ms ease-out; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .addr-row .menu-btn { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: opacity 150ms linear; opacity: 0; } .side.open { opacity: 1; } }
@media (min-width: 1101px) { .scrim { display: none; } }
/* ---------- одна колонка (до 760px) ---------- */
@media (max-width: 760px) {
  .mail { grid-template-columns: minmax(0, 1fr); }
  .listpane { border-inline-end: 0; }
  body[data-view="list"] .reader, body[data-view="message"] .listpane { display: none; }
  .r-tools .back { display: inline-flex; }
  .r-scroll { padding: 16px 16px 32px; }
  .r-inner h2 { font-size: 1.25rem; }
  .frame { height: 60dvh; }
}

/* ======================= СТРАНИЦЫ: вход, настройки, админка ======================= */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(100%, 400px); display: grid; gap: 20px; }
.auth-card .brand { justify-content: center; font-size: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 16px; }
.card form { display: grid; gap: 16px; }
.card h1 { font-size: 1.25rem; }
.auth-foot { text-align: center; font-size: 0.875rem; color: var(--ink-2); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.page > header h1 { font-size: 1.5rem; }
.page > header p { color: var(--ink-2); margin-top: 4px; }
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.section > h2 { font-size: 1.0625rem; }
.rows { display: grid; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row-item:first-child { border-top: 0; }
.row-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.meter { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 4px; }
.stat b { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { font-size: 0.8125rem; color: var(--ink-2); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.bars div { flex: 1; display: grid; align-content: end; justify-items: center; gap: 4px; height: 100%; min-width: 0; font-size: 0.6875rem; color: var(--ink-2); }
.bars i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; }
.tabnav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); padding-inline: 24px; background: var(--surface); position: sticky; top: 57px; z-index: 4; }
.tabnav button { border: 0; background: transparent; padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 0.875rem; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; }
.tabnav button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (hover: hover) { .tabnav button:hover { color: var(--ink); } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; white-space: nowrap; background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.actions-cell { text-align: end; min-width: 220px; }
td.actions-cell .btn { margin: 2px 0 2px 6px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.toolbar input[type="search"] { width: min(100%, 320px); }
.reveal { font: 700 1.05rem var(--mono); letter-spacing: 0.04em; background: var(--accent-soft); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; overflow-wrap: anywhere; user-select: all; }
@media (max-width: 760px) { .page { padding: 20px 16px 48px; } .topbar { padding: 10px 16px; } .tabnav { padding-inline: 16px; } }
@media (prefers-reduced-motion: reduce) { .btn, .code { transition-property: background-color, color; } .btn:enabled:active, .code:active, a.btn:active { scale: 1; } .toast { translate: 0 0; } }
