@font-face {
  font-family: 'Schibsted Grotesk'; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(/static/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk'; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(/static/fonts/schibsted-grotesk-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root,
:root[data-theme="light"] {
  --bg-0: #f3f8f6; --bg-1: #ffffff; --bg-2: #eaf3f0; --bg-3: #dcebe6; --bg-elev: #ffffff; --glow: #d5f0e6;
  --bd-0: #d3e2dd; --bd-1: #b4ccc5; --bd-2: #8fb0a7;
  --tx-0: #0a1f1c; --tx-1: #2f4a45; --tx-2: #52706a; --tx-3: #64817a;
  --ac: #0b7f66; --ac-hi: #0a6e59; --ac-lo: #0b7f66; --ac-bg: rgba(11, 127, 102, 0.10); --ac-bd: rgba(11, 127, 102, 0.35); --ac-fg: #ffffff;
  --slot: #dff3ec; --slot-bd: #6fb8a4; --off: #c9dad5;
  --danger: #c0392f; --danger-hi: #a93128; --danger-bg: #fde6e3; --danger-fg: #ffffff;
  --warn: #8a5a00; --warn-bg: #fbf0d8; --warn-fg: #ffffff;
  --info: #1f5f8f; --info-bg: #e2eff8;
  --ok: #0b7f66; --ok-bg: #dff3ec;
  --selection-bg: var(--ac); --selection-fg: #ffffff;
  --shadow-card: none;
  --shadow-card-lg: 0 24px 60px rgba(10, 31, 28, 0.10);
  --shadow-pop: 0 20px 56px rgba(10, 31, 28, 0.18), 0 0 0 1px var(--bd-1);
  --shadow-toast: 0 20px 50px rgba(10, 31, 28, 0.16);
  --scrim: rgba(10, 31, 28, 0.45);
  --r-sm: 9px; --r: 12px; --r-lg: 20px; --r-xl: 26px;
  --font-sans: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-0: #0a1a1c; --bg-1: #10282a; --bg-2: #132f31; --bg-3: #1b4143; --bg-elev: #163537; --glow: #0f3231;
  --bd-0: #1f4244; --bd-1: #33565a; --bd-2: #4a7274;
  --tx-0: #eafaf6; --tx-1: #c4dcd7; --tx-2: #93b3af; --tx-3: #7a9c98;
  --ac: #5ee6c4; --ac-hi: #8af0d6; --ac-lo: #5ee6c4; --ac-bg: rgba(94, 230, 196, 0.12); --ac-bd: rgba(94, 230, 196, 0.38); --ac-fg: #04201a;
  --slot: #15383a; --slot-bd: #3a8577; --off: #274447;
  --danger: #ff7d73; --danger-hi: #ff988f; --danger-bg: #3a1d20; --danger-fg: #2a0705;
  --warn: #ffd166; --warn-bg: #36301a; --warn-fg: #241a00;
  --info: #86c8f2; --info-bg: #142f40;
  --ok: #5ee6c4; --ok-bg: #15383a;
  --selection-fg: #04201a;
  --shadow-card: none;
  --shadow-card-lg: 0 30px 70px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--bd-1);
  --shadow-toast: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--bd-1);
  --scrim: rgba(2, 10, 11, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--bd-2) transparent; }
html, body { margin: 0; padding: 0; }
html { min-height: 100vh; min-height: 100lvh; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bd-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--tx-3); }
::-webkit-scrollbar-corner { background: transparent; }
svg.ic { width: 14px; height: 14px; flex-shrink: 0; }
body {
  background: radial-gradient(circle at 70% 380px, var(--glow) 0, var(--bg-0) 620px) no-repeat, var(--bg-0);
  color: var(--tx-0);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--selection-bg); color: var(--selection-fg); }

.gk-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.gk-mark .gk-glyph { width: 40px; height: 40px; flex-shrink: 0; background: url(/static/icon.svg) center / contain no-repeat; }
.gk-mark .gk-glyph i { display: none; }
.gk-mark .gk-name { font-size: 17px; color: var(--tx-0); }
.gk-mark.lg .gk-glyph { width: 56px; height: 56px; }
.gk-mark.lg .gk-name { font-size: 24px; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

.dock {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 3px; padding: 8px;
  background: var(--bg-1); border: 1px solid var(--bd-1); border-radius: 22px;
  box-shadow: var(--shadow-card-lg); font-size: 15.5px; font-weight: 500; white-space: nowrap;
}
.dock-link {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 15px;
  background: none; border: 0; cursor: pointer; color: var(--tx-2); font: inherit; position: relative;
}
.dock-link:hover { color: var(--tx-0); background: var(--bg-3); }
.dock-link.on { background: var(--ac); color: var(--ac-fg); font-weight: 700; }
.dock-logo { width: 48px; height: 48px; margin: -2px 8px -2px 0; border-radius: 10px; background: url(/static/icon.svg) center / contain no-repeat; flex-shrink: 0; }
.dock-sep { width: 1px; height: 26px; background: var(--bd-1); margin: 0 6px; }
.dock-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.dock-menu {
  position: fixed; bottom: 96px; right: max(16px, calc(50% - 420px)); z-index: 51; display: none; width: 270px; padding: 10px;
  background: var(--bg-elev); border: 1px solid var(--bd-1); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.dock-menu.open { display: block; }
.dock-menu a, .dock-menu .row-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 12px;
  border: 0; border-radius: var(--r); background: none; color: var(--tx-0); font: inherit; font-size: 15px; cursor: pointer; text-align: left;
}
.dock-menu a:hover, .dock-menu .row-btn:hover { background: var(--bg-3); }
.dock-menu .who { padding: 6px 12px 10px; color: var(--tx-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.dock-menu .theme-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 15px; }
.dock-only-narrow { display: none !important; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; font-size: 14.5px; }
.subnav a { padding: 9px 14px; border-radius: var(--r); color: var(--tx-2); }
.subnav a:hover { color: var(--tx-0); background: var(--bg-3); }
.subnav a.on { color: var(--tx-0); box-shadow: inset 0 0 0 1.5px var(--ac); }
@media (max-width: 860px) {
  .dock { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); transform: none; justify-content: space-between; font-size: 14px; padding: 7px; }
  .dock-link { padding: 0 11px; }
  .dock-logo, .dock-sep, .dock-only-wide { display: none !important; }
  .dock-only-narrow { display: flex !important; }
  .dock-menu { right: 12px; bottom: 86px; }
}


.page { padding: 34px 32px 130px; max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 800; letter-spacing: -0.035em; margin: 0;
  line-height: 1; color: var(--tx-0);
}
.page-head .sub { color: var(--tx-2); font-size: 13.5px; margin-top: 6px; max-width: 560px; }
.page-head .head-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }


/* ============================================================
   THEME TOGGLE - 3-state segmented control (sun / monitor / moon)
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-1); border: 1px solid var(--bd-0);
  border-radius: var(--r); height: 32px;
  align-items: center;
}
.theme-toggle button {
  background: transparent; border: 0; cursor: pointer;
  width: 26px; height: 26px; border-radius: 5px;
  color: var(--tx-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
  padding: 0;
}
.theme-toggle button:hover { color: var(--tx-0); }
.theme-toggle button.on {
  background: var(--bg-3); color: var(--tx-0);
  box-shadow: 0 1px 0 rgba(40,30,15,0.04);
}
:root[data-theme="dark"] .theme-toggle button.on { background: var(--bg-3); color: var(--ac); }
.theme-toggle button .ic { width: 14px; height: 14px; }

/* compact icon-only theme toggle for tight spots */
.theme-toggle.compact {
  width: 32px; padding: 0;
  align-items: center; justify-content: center;
}

/* ============================================================
   AUTH
   ============================================================ */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 56px 24px; position: relative; }
body:has(> .gate) { background: radial-gradient(circle at 50% 45%, var(--glow) 0, var(--bg-0) 760px) no-repeat, var(--bg-0); }
.gate main { width: 100%; max-width: 410px; display: grid; gap: 16px; }
.gate h1 { font-size: clamp(38px, 9vw, 46px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; margin: 0; overflow-wrap: anywhere; }
.gate h1 span { color: var(--tx-2); }
.gate p { margin: 0; font-size: 17px; color: var(--tx-2); }
.gate p b { color: var(--tx-0); }
.gate form, .ways { display: grid; gap: 14px; }
.gate .field { margin: 0; }
.gate .field-label { font-size: 14.5px; font-weight: 500; color: var(--tx-2); }
.gate .input { height: 54px; font-size: 16px; border-width: 1.5px; border-radius: 14px; padding: 0 16px; }
.gate .input[readonly] { color: var(--tx-2); }
.gate .btn { width: 100%; height: 56px; border-radius: 16px; font-size: 16.5px; font-weight: 700; justify-content: center; }
.gate .alert { margin: 0; }
.way { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; border: 2px dashed var(--bd-1); border-radius: 20px; background: none; font-size: 16.5px; font-weight: 600; cursor: pointer; }
.way:hover { border-color: var(--ac); }
.way svg { width: 18px; height: 18px; }
.gate-logo { display: block; width: 72px; height: 72px; border-radius: 17px; background: url(/static/icon.svg) center / contain no-repeat; object-fit: cover; }
.gate-logo.wide { width: auto; max-width: 220px; border-radius: 0; background: none; object-fit: contain; }
.gate-lock { width: 72px; height: 72px; color: var(--danger); }
.gate-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-left: -4px; font-weight: 600; color: var(--tx-2); }
.gate-back:hover { color: var(--tx-0); }
.gate .gate-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; font-weight: 600; }
.gate-foot a { color: var(--ac); }
.gate-foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.trust { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--tx-2); cursor: pointer; }
.trust input { width: 20px; height: 20px; accent-color: var(--ac); }
.qr { display: inline-block; padding: 14px; border-radius: 22px; background: #fff; margin-bottom: 14px; }
.qr img { display: block; }
.code-input { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.code-input input { width: 100%; grid-column: 1 / -1; height: 74px; padding: 0 16px; border: 2px dashed var(--bd-1); border-radius: 20px; background: none; font-size: 28px; font-weight: 800; letter-spacing: 0.3em; }
.code-input i { display: none; }
.code-input.ready input { position: absolute; inset: 0; border: 0; color: transparent; caret-color: transparent; letter-spacing: 1.4em; outline: none; z-index: 1; cursor: pointer; }
.code-input.ready input::selection { background: transparent; }
.code-input.ready i { display: grid; place-items: center; height: 74px; border: 2px dashed var(--bd-1); border-radius: 20px; font-size: 28px; font-weight: 800; font-style: normal; }
.code-input i.on { border: 2px solid var(--ac); background: var(--ac); color: var(--ac-fg); }
.code-input i.next { border-color: var(--ac); }
.auth-toggle { position: absolute; top: 24px; right: 24px; z-index: 2; display: flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .code-input { gap: 6px; } .code-input.ready i { height: 62px; border-radius: 16px; } .gate { padding: 64px 20px 32px; } .auth-toggle { top: 14px; right: 14px; } }

.seg { display: flex; padding: 3px; background: var(--bg-2); border: 1px solid var(--bd-0); border-radius: var(--r); margin-bottom: 20px; }
.seg button {
  flex: 1; padding: 8px 10px; border: 0; background: transparent;
  border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: var(--tx-2); display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.seg button.on { background: var(--bg-1); color: var(--tx-0); box-shadow: 0 1px 0 rgba(40,30,15,0.04), 0 0 0 1px var(--bd-0); }
:root[data-theme="dark"] .seg button.on { box-shadow: 0 0 0 1px var(--bd-1); }
.seg button:hover:not(.on) { color: var(--tx-1); }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--tx-1); font-weight: 600; margin-bottom: 6px;
}
.field-hint { font-size: 11.5px; color: var(--tx-2); margin-top: 6px; line-height: 1.45; }
.field-err { font-size: 11.5px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.input, .textarea, .select {
  width: 100%; display: block;
  background: var(--bg-1);
  border: 1px solid var(--bd-1); border-radius: var(--r);
  color: var(--tx-0); font-size: 13.5px;
  padding: 9px 12px; height: 38px;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.textarea { height: auto; min-height: 86px; resize: vertical; font-family: var(--font-mono); font-size: 12px; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--bd-2); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--ac);
  box-shadow: 0 0 0 4px var(--ac-bg);
}
.input.invalid, .textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.input::placeholder, .textarea::placeholder { color: var(--tx-3); }
.input.mono { font-family: var(--font-mono); font-size: 12.5px; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }
.input-wrap .input-affix {
  position: absolute; right: 4px; top: 4px; bottom: 4px;
  display: flex; align-items: center; padding: 0 10px; cursor: pointer;
  color: var(--tx-3); border-radius: 6px; background: transparent; border: 0;
}
.input-wrap .input-affix:hover { color: var(--tx-0); background: var(--bg-2); }

.otp-field {
  display: flex; gap: 8px; justify-content: space-between; margin: 20px 0 14px;
}
.otp-field input {
  flex: 1; max-width: 52px; height: 60px;
  background: var(--bg-1); border: 1px solid var(--bd-1); border-radius: var(--r);
  color: var(--tx-0); font-family: var(--font-mono); font-size: 24px; font-weight: 500;
  text-align: center;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.otp-field input:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 4px var(--ac-bg); }
.otp-field input.filled { background: var(--bg-2); border-color: var(--bd-2); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.06s, box-shadow 0.12s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ic { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--ac); color: var(--ac-fg);
  border-color: var(--ac-lo);
}
.btn-primary:hover:not(:disabled) { background: var(--ac-hi); border-color: var(--ac-hi); }
.btn-primary.lg { height: 44px; padding: 0 18px; font-size: 14px; }

.btn-ghost { background: var(--bg-1); border-color: var(--bd-1); color: var(--tx-0); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-2); border-color: var(--bd-2); }

.btn-quiet { background: transparent; color: var(--tx-1); }
.btn-quiet:hover:not(:disabled) { background: var(--bg-3); color: var(--tx-0); }

.btn-danger { background: var(--danger); color: var(--danger-fg); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-hi); border-color: var(--danger-hi); }

.btn-warning { background: var(--warn); color: var(--warn-fg); border-color: var(--warn); }
.btn-warning:hover:not(:disabled) { opacity: 0.9; }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 5px; }
.btn-icon { width: 32px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }

.kbd {
  display: inline-flex; align-items: center; gap: 2px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-1); border: 1px solid var(--bd-1);
  color: var(--tx-2); line-height: 1;
}
:root[data-theme="light"] .kbd { box-shadow: 0 1px 0 var(--bd-0); }

/* ============================================================
   CARDS / SECTIONS
   ============================================================ */
.card {
  background: var(--bg-1); border: 1px solid var(--bd-0);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd-0);
  background: var(--bg-2);
}
.card-head h3 { font-size: 13.5px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.card-head .sub { color: var(--tx-2); font-size: 12.5px; }
.card-head .head-actions { margin-left: auto; display: flex; gap: 6px; }
.card-head > .ic:first-child { color: var(--ac); }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--bd-0); display: flex; gap: 8px; align-items: center; background: var(--bg-2); }
.card-foot .right { margin-left: auto; display: flex; gap: 6px; }

/* ============================================================
   PILLS / TAGS
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 2px 9px;
  border-radius: 100px; line-height: 1.55;
  border: 1px solid transparent;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(47,111,63,0.18); }
.pill-ok .dot { background: var(--ok); }
:root[data-theme="dark"] .pill-ok { border-color: rgba(94,219,134,0.25); }
:root[data-theme="dark"] .pill-ok .dot { box-shadow: 0 0 6px var(--ok); }
.pill-off { background: var(--bg-3); color: var(--tx-2); border-color: var(--bd-0); }
.pill-off .dot { background: var(--tx-3); }
.pill-err { background: var(--danger-bg); color: var(--danger); border-color: rgba(193,53,42,0.18); }
.pill-err .dot { background: var(--danger); }
:root[data-theme="dark"] .pill-err { border-color: rgba(255,89,97,0.25); }
.pill-warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(182,95,0,0.18); }
.pill-warn .dot { background: var(--warn); }
:root[data-theme="dark"] .pill-warn { border-color: rgba(255,186,46,0.25); }
.pill-info { background: var(--info-bg); color: var(--info); border-color: rgba(31,111,191,0.18); }
.pill-info .dot { background: var(--info); }
:root[data-theme="dark"] .pill-info { border-color: rgba(94,179,255,0.25); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 2px 7px; border-radius: 4px;
  background: var(--bg-2); color: var(--tx-1); border: 1px solid var(--bd-0);
}

/* ============================================================
   TABLES
   ============================================================ */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--bd-0);
  font-size: 13px;
}
.table th {
  color: var(--tx-2); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--bg-2); position: sticky; top: 0;
  padding-top: 10px; padding-bottom: 10px;
}
.table tbody tr { transition: background 0.08s; }
.table tbody tr:hover { background: var(--bg-2); }
.table tbody tr.selected { background: var(--ac-bg); }
.table td .row-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; justify-content: flex-end; }
.table tbody tr:hover .row-actions { opacity: 1; }
.table td.mono { font-family: var(--font-mono); font-size: 12px; color: var(--tx-1); }
.table td.num { font-variant-numeric: tabular-nums; text-align: right; }

.table-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--bd-0); background: var(--bg-2);
  flex-wrap: wrap;
}
.table-toolbar .input { height: 32px; font-size: 12.5px; max-width: 300px; }
.table-toolbar .filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border-radius: var(--r); background: var(--bg-1); border: 1px solid var(--bd-0);
  font-size: 11.5px; color: var(--tx-1); cursor: pointer; font-weight: 500;
}
.fchip:hover { border-color: var(--bd-1); color: var(--tx-0); }
.fchip.on { background: var(--ac-bg); border-color: var(--ac-bd); color: var(--ac); }
:root[data-theme="dark"] .fchip.on { background: var(--ac-bg); border-color: var(--ac-bd); color: var(--ac); }

/* ============================================================
   DETAIL LISTS
   ============================================================ */
.dlist { display: grid; grid-template-columns: 170px 1fr; gap: 10px 22px; font-size: 13px; }
.dlist dt { color: var(--tx-2); font-weight: 500; }
.dlist dd { color: var(--tx-0); margin: 0; }
.dlist dd.mono { font-family: var(--font-mono); font-size: 12px; }

/* ============================================================
   STATS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--bg-1); border: 1px solid var(--bd-0);
  border-radius: var(--r-lg); padding: 16px 18px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.stat .label {
  font-size: 11px; color: var(--tx-2); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 6px;
}
.stat .label .ic { color: var(--ac); }
.stat .value {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 400; letter-spacing: -0.02em;
  margin-top: 6px; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat .delta { font-size: 11.5px; color: var(--tx-2); margin-top: 6px; }
.stat .delta b { color: var(--ok); font-weight: 600; }
.stat .delta b.dn { color: var(--danger); }
.stat .spark {
  position: absolute; right: 14px; bottom: 14px; width: 70px; height: 30px;
  opacity: 0.8;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex; gap: 11px; padding: 12px 14px;
  border-radius: var(--r); border: 1px solid var(--bd-0);
  background: var(--bg-2); font-size: 13px; margin-bottom: 16px;
  align-items: flex-start;
}
.alert .ic { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.alert b { font-weight: 600; color: var(--tx-0); }
.alert p { margin: 2px 0 0; color: var(--tx-1); }
.alert-err { background: var(--danger-bg); border-color: rgba(193,53,42,0.2); }
.alert-err .ic, .alert-err b { color: var(--danger); }
:root[data-theme="dark"] .alert-err { border-color: rgba(255,89,97,0.25); }
.alert-ok { background: var(--ok-bg); border-color: rgba(47,111,63,0.2); }
.alert-ok .ic, .alert-ok b { color: var(--ok); }
.alert-warn { background: var(--warn-bg); border-color: rgba(182,95,0,0.2); }
.alert-warn .ic, .alert-warn b { color: var(--warn); }
:root[data-theme="dark"] .alert-warn { border-color: rgba(255,186,46,0.25); }
.alert-info { background: var(--info-bg); border-color: rgba(31,111,191,0.2); }
.alert-info .ic, .alert-info b { color: var(--info); }
:root[data-theme="dark"] .alert-info { border-color: rgba(94,179,255,0.25); }

/* ============================================================
   TOOLTIP
   ============================================================ */
.tt-host { position: relative; display: inline-flex; }
.tt {
  position: absolute; pointer-events: none; opacity: 0; z-index: 100;
  bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(2px);
  background: var(--tx-0); border: 1px solid var(--tx-0);
  color: var(--bg-1); padding: 6px 10px;
  font-size: 11.5px; line-height: 1.45; border-radius: 6px;
  white-space: nowrap; max-width: 280px;
  box-shadow: 0 12px 30px rgba(40,30,15,0.18);
  transition: opacity 0.12s, transform 0.12s;
  font-weight: 500;
}
:root[data-theme="dark"] .tt { background: var(--bg-elev); border-color: var(--bd-2); color: var(--tx-0); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.tt.wide { white-space: normal; width: 240px; }
.tt-host:hover .tt, .tt-host:focus-within .tt { opacity: 1; transform: translateX(-50%) translateY(0); }
.tt .kbd {
  margin-left: 6px; background: rgba(255,255,255,0.1); color: var(--bg-1);
  border-color: rgba(255,255,255,0.15);
}
:root[data-theme="dark"] .tt .kbd { background: var(--bg-3); color: var(--tx-0); border-color: var(--bd-1); }
.tt-host.right .tt { bottom: 50%; left: calc(100% + 8px); transform: translateY(50%) translateX(2px); }
.tt-host.right:hover .tt { transform: translateY(50%) translateX(0); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-stack {
  position: fixed; bottom: 100px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
  pointer-events: none;
}
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-elev); border: 1px solid var(--bd-1);
  border-radius: var(--r-lg); padding: 13px 14px;
  box-shadow: var(--shadow-toast);
  font-size: 12.5px;
  animation: toast-in 0.24s var(--ease);
  pointer-events: auto; min-width: 270px;
  transition: opacity 0.2s, transform 0.2s;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast b { font-weight: 600; color: var(--tx-0); display: block; }
.toast p { margin: 1px 0 0; color: var(--tx-2); }
.toast.ok .ic { color: var(--ok); }
.toast.err .ic { color: var(--danger); }
.toast.warn .ic { color: var(--warn); }
.toast.info .ic { color: var(--info); }
.toast .x {
  background: transparent; border: 0; color: var(--tx-3); cursor: pointer;
  width: 20px; height: 20px; border-radius: 5px; margin-left: 4px;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.toast .x:hover { color: var(--tx-0); background: var(--bg-2); }

/* ============================================================
   DIALOG / MODAL
   ============================================================ */
.scrim {
  position: fixed; inset: 0; z-index: 150;
  background: var(--scrim); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: scrim-in 0.16s ease;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-1); border: 1px solid var(--bd-1);
  border-radius: var(--r-xl);
  width: 100%; max-width: 500px;
  box-shadow: var(--shadow-pop);
  animation: modal-in 0.2s var(--ease);
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 20px 22px 6px; }
.modal-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.modal-head p { color: var(--tx-2); font-size: 13px; margin: 6px 0 0; }
.modal-body { padding: 14px 22px; overflow: auto; flex: 1; }
.modal-foot { padding: 14px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--bd-0); background: var(--bg-2); }
.modal-foot .left { margin-right: auto; }

.modal.danger { border-color: rgba(193,53,42,0.5); }
:root[data-theme="dark"] .modal.danger { border-color: rgba(255,89,97,0.5); }
.modal.danger .modal-head h2 { color: var(--danger); }

dialog {
  background: var(--bg-1); border: 1px solid var(--bd-1);
  border-radius: var(--r-xl); padding: 0;
  width: 100%; max-width: 500px;
  box-shadow: var(--shadow-pop);
  color: inherit;
  max-height: calc(100vh - 48px);
  overflow: auto;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop {
  background: var(--scrim); backdrop-filter: blur(3px);
  animation: scrim-in 0.16s ease;
}

.confirm-row {
  display: flex; gap: 10px; padding: 11px 13px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--bd-1); border-radius: var(--r);
  font-size: 13px;
}
.confirm-row.danger { background: var(--danger-bg); border-color: rgba(193,53,42,0.25); }
:root[data-theme="dark"] .confirm-row.danger { border-color: rgba(255,89,97,0.35); }
.confirm-row .ic { color: var(--danger); width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.cmdk-scrim {
  position: fixed; inset: 0; z-index: 160;
  background: var(--scrim); backdrop-filter: blur(5px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  animation: scrim-in 0.14s ease;
}
.cmdk {
  width: 100%; max-width: 560px;
  background: var(--bg-1); border: 1px solid var(--bd-1);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-pop);
  animation: modal-in 0.18s var(--ease);
}
.cmdk-input {
  width: 100%; height: 52px; padding: 0 18px;
  background: transparent; border: 0; color: var(--tx-0);
  font-size: 15px; border-bottom: 1px solid var(--bd-0);
}
.cmdk-input:focus { outline: none; }
.cmdk-input::placeholder { color: var(--tx-3); }
.cmdk-list { max-height: 380px; overflow: auto; padding: 8px; }
.cmdk-group-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--tx-3); padding: 8px 12px 4px; font-weight: 700;
}
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 13.5px; color: var(--tx-1);
}
.cmdk-item .ic { width: 15px; height: 15px; color: var(--tx-2); }
.cmdk-item .kbd { margin-left: auto; }
.cmdk-item.on { background: var(--bg-2); color: var(--tx-0); }
:root[data-theme="dark"] .cmdk-item.on { background: var(--bg-3); }
.cmdk-item.on .ic { color: var(--ac); }
.cmdk-foot {
  padding: 10px 14px; border-top: 1px solid var(--bd-0); background: var(--bg-2);
  display: flex; gap: 14px; font-size: 11px; color: var(--tx-3);
  align-items: center;
}
.cmdk-foot span { display: flex; align-items: center; gap: 4px; }

/* ============================================================
   POPOVER (used for theme dropdown etc)
   ============================================================ */
.popover {
  position: absolute; z-index: 80;
  background: var(--bg-elev); border: 1px solid var(--bd-1);
  border-radius: var(--r-lg); padding: 6px;
  box-shadow: var(--shadow-pop);
  min-width: 200px;
  animation: pop-in 0.12s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.popover-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 12.5px; color: var(--tx-1); font-weight: 500;
}
.popover-item:hover { background: var(--bg-3); color: var(--tx-0); }
.popover-item.on { color: var(--tx-0); }
.popover-item.on .ic-check { color: var(--ac); }
.popover-item .ic { width: 14px; height: 14px; }
.popover-item .ic-check { margin-left: auto; opacity: 0.9; }
.popover-divider { height: 1px; background: var(--bd-0); margin: 4px -6px; }
.popover-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tx-3); padding: 6px 10px 2px; font-weight: 700; }

/* ============================================================
   EMPTY
   ============================================================ */
.empty {
  padding: 48px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.empty .ic-bg {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--bd-0);
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-2); margin-bottom: 6px;
}
.empty h4 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0; color: var(--tx-0); }
.empty p { font-size: 13px; color: var(--tx-2); margin: 0 0 12px; max-width: 340px; line-height: 1.5; }

/* ============================================================
   QR / passkey
   ============================================================ */
.qr-card {
  background: #fff; padding: 14px; border-radius: var(--r);
  display: inline-block; border: 1px solid var(--bd-0);
}
.recovery-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  font-family: var(--font-mono); font-size: 12px;
}
.recovery-grid code {
  background: var(--bg-2); border: 1px solid var(--bd-0);
  padding: 9px 10px; border-radius: var(--r);
  color: var(--tx-0); text-align: center;
  font-weight: 500; letter-spacing: 0.04em;
}

/* mobile */
@media (max-width: 760px) {

  .page { padding: 18px 14px 110px; }

  /* --- Dashboard grids --- */
  .dash-grid-2-1,
  .dash-grid-3,
  .dash-grid-2 { grid-template-columns: 1fr !important; }

  .dash-event-row {
    grid-template-columns: auto 1fr !important;
    grid-template-rows: auto auto;
  }
  .dash-event-row > *:nth-child(3),
  .dash-event-row > *:nth-child(4),
  .dash-event-row > *:nth-child(5) { display: none; }

  /* --- Page head --- */
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
  .page-head h1 { font-size: 26px; }
  .page-head .sub { font-size: 13px; margin-top: 3px; }
  .page-head .head-actions { margin-left: 0; flex-wrap: wrap; }

  /* --- Stats --- */
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .stat { padding: 11px 12px; }
  .stat .value { font-size: 26px; }
  .stat .label { font-size: 10px; gap: 4px; margin-bottom: 4px; }
  .stat .delta { font-size: 11px; margin-top: 4px; }
  .stat .spark { display: none; }

  /* --- Cards --- */
  .card { overflow-x: auto; }
  .card-head { flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
  .card-head .head-actions { margin-left: 0; width: 100%; }
  .card-head .head-actions .btn { flex: 1; justify-content: center; }
  .card-body { padding: 14px; }

  /* --- Table toolbar --- */
  .table-toolbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .table-toolbar .input { max-width: none; width: 100%; }
  .filter-chips { flex-wrap: wrap; gap: 5px; }

  /* --- Audit filter bar --- */
  .audit-filters { flex-direction: column !important; gap: 8px !important; padding: 10px 14px !important; }
  .audit-filter-sep { display: none !important; }

  /* --- Audit rows --- */
  .audit-row-head { display: none; }
  .audit-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
    padding: 10px 14px;
  }
  .audit-row .ts { flex-basis: 100%; font-size: 10.5px; order: -1; }
  .audit-row .ev { order: 0; }
  .audit-row > *:nth-child(3) { order: 1; flex: 1; min-width: 0; overflow: hidden; }
  .audit-row > *:nth-child(4),
  .audit-row > *:nth-child(5),
  .audit-row .ip,
  .audit-row > *:nth-child(7) { display: none; }
  .audit-row:hover .audit-filter-btn { display: none; }

  /* --- Detail list --- */
  .dlist { grid-template-columns: 1fr; gap: 2px 0; }
  .dlist dt { margin-top: 10px; }

  /* --- Auth --- */
  .auth-wrap { padding: 20px 14px; }
  .auth-card { padding: 22px 18px; border-radius: var(--r-lg); }
  .auth-card h1 { font-size: 24px; }
  .auth-toggle { top: 14px; right: 14px; }

  /* --- Settings inline grids --- */
  .form-grid { grid-template-columns: 1fr !important; }

  /* --- Modals / native dialog --- */
  dialog {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--r-xl);
  }


  /* --- User home --- */
}

@media (min-width: 761px) and (max-width: 1100px) {
  .audit-row {
    grid-template-columns: 80px 150px minmax(110px,1.2fr) minmax(90px,1fr) minmax(120px,1.5fr) 28px;
    gap: 8px;
  }
  .audit-row > *:nth-child(6) { display: none; }
}

@media (max-width: 480px) {
  .otp-field input { max-width: 40px; height: 50px; font-size: 20px; }
}

.split { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 70px; align-items: center; min-height: calc(100vh - 190px); }
.hero { display: grid; gap: 19px; align-content: center; }
.hero h1 { font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; margin: 0; overflow-wrap: anywhere; }
.hero h1 span { color: var(--tx-2); }
.hero .lede { font-size: 17px; line-height: 1.5; color: var(--tx-2); margin: 0; max-width: 470px; }
.kicker { font-size: 15.5px; font-weight: 600; color: var(--ac); display: flex; align-items: center; gap: 8px; }
.kicker.bad { color: var(--danger); }
.kicker.warn { color: var(--warn); }
.kicker a { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--tx-2); }
.kicker a:hover { background: var(--bg-3); color: var(--tx-0); }
.todo { display: grid; }
.todo > * { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; margin: 0; border-top: 1.5px dashed var(--bd-1); font-size: 16px; min-height: 50px; }
.todo > *:last-child { border-bottom: 1.5px dashed var(--bd-1); }
.todo a, .todo button { color: var(--ac); font: inherit; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.todo a:hover, .todo button:hover { text-decoration: underline; text-underline-offset: 4px; }
.todo .dim { color: var(--tx-2); }
.btn-lg { height: 48px; padding: 0 22px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.dial { width: 100%; max-width: 640px; height: auto; margin: 0 auto; display: block; }
.dial .ring { fill: none; stroke: var(--off); stroke-width: 30; }
.dial .ring.on { stroke: var(--ac); }
.dial .ring.bad { stroke: var(--danger); }
.dial .lock { fill: var(--ac); }
.dial .lock.off { fill: var(--off); }
.dial .lock.bad { fill: var(--danger); }
.dial .hole { fill: var(--bg-0); }
.dial text { font-family: var(--font-sans); font-size: 15px; font-weight: 500; fill: var(--tx-2); text-anchor: middle; }
.dial text.big { font-size: 20px; font-weight: 700; fill: var(--tx-0); }
.dial text.red { fill: var(--danger); }
.dial .dot { fill: var(--danger); }
.opened { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.opened a { width: 62px; text-align: center; font-size: 13.5px; color: var(--tx-2); }
.opened .app-tile { margin: 0 auto 7px; }
.app-tile { width: 58px; height: 58px; border-radius: 15px; display: block; object-fit: cover; background: var(--bg-3); }
.app-tile.letter { display: grid; place-items: center; background: hsl(var(--h) 52% 42%); color: #fff; font-weight: 800; font-size: 25px; }
@media (max-width: 980px) {
  .split { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; }
  .split > .hero.lead { display: contents; }
  .split > .hero.lead > * { order: 0; }
  .split > .stage { order: 1; }
  .split > .hero.lead > .todo, .split > .hero.lead > .btns { order: 2; }
  .split { gap: 18px; }
  .dial { max-width: 460px; }
  .dial text { font-size: 22px; }
  .dial text.big { font-size: 27px; }
}

.split.people { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 54px; }
.stage-title { font-size: 19px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .stage-title { margin: 12px 0 -2px; }
.stack > .stage-title:first-child { margin-top: 0; }
.subnav.flat { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 14.5px; color: var(--tx-2); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend .slot { width: 24px; height: 24px; border-radius: 7px; cursor: default; }
.slot { display: inline-grid; place-items: center; padding: 0; border: 2px dashed var(--bd-1); border-radius: 20px; background: none; color: transparent; cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.slot:hover:not(:disabled) { border-color: var(--ac); }
.slot:disabled { opacity: 0.5; cursor: progress; }
.slot.is-key { border: 2px solid var(--slot-bd); background: var(--slot); color: var(--slot-bd); }
.slot.is-open { border: 2px dotted var(--slot-bd); color: var(--slot-bd); }
.slot.is-used { border: 2px solid var(--ac); background: var(--ac); color: var(--ac-fg); }
.slot svg { width: 22px; height: 28px; fill: currentColor; }
.keys-scroll { overflow-x: auto; margin: -6px; padding: 6px; }
.keys { border-collapse: separate; border-spacing: 10px; margin: -10px; }
.keys th { font-weight: 500; text-align: left; }
.keys thead th { text-align: center; font-size: 13.5px; color: var(--tx-2); vertical-align: bottom; }
.keys thead .app-tile { margin: 0 auto 7px; width: 46px; height: 46px; border-radius: 13px; font-size: 20px; }
.keys thead span:not(.app-tile) { display: block; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keys tbody th[scope=row] { min-width: 150px; position: sticky; left: 0; z-index: 1; padding-right: 8px; }
.keys th a { display: block; }
.keys th a b { display: block; font-size: 17px; font-weight: 700; }
.keys th a:hover b { color: var(--ac); }
.keys th a span { font-size: 13.5px; color: var(--tx-2); }
.keys th a span.warn { color: var(--warn); }
.keys td .slot { width: 76px; height: 74px; }
.keys.md { border-spacing: 7px; margin: -7px; }
.keys.md td .slot { width: 46px; height: 46px; border-radius: 13px; }
.keys.md .slot svg { width: 15px; height: 20px; }
.keys.md thead .app-tile { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
.keys.md thead span:not(.app-tile) { max-width: 46px; font-size: 12px; }
.keys.sm { border-spacing: 4px; margin: -4px; }
.keys.sm td .slot { width: 26px; height: 26px; border-radius: 8px; border-width: 1.5px; }
.keys.sm .slot svg { width: 9px; height: 12px; }
.keys.sm thead .app-tile { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; margin: 0; }
.keys.sm thead span:not(.app-tile) { display: none; }
.keys.sm th a b { font-size: 15px; }
@media (min-width: 981px) {
  .keys.sm th a span:not(.app-tile):not(.warn) { display: none; }
  .keys.sm th[scope=row] a { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; padding-right: 8px; }
  .keys.sm th[scope=row] a span.warn { font-size: 12.5px; }
}
.keys .fold button { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 16px; font-weight: 700; color: var(--tx-0); cursor: pointer; }
.keys .fold button::before { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 10px 2px 2px; border: solid var(--tx-2); border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.keys .fold button[aria-expanded=true]::before { transform: rotate(45deg); }
.dim { color: var(--tx-2); font-weight: 400; }
.todo .acts { display: flex; gap: 18px; align-items: center; }
.todo .acts form, .acts form { margin: 0; }
.todo button.bad, .link.bad { color: var(--danger); }
.todo a.plain { color: inherit; font-weight: 500; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ac); cursor: pointer; }
.acts { display: flex; gap: 16px; align-items: center; }
.slot-box { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 88px; padding: 14px 18px; border: 2px dashed var(--bd-1); border-radius: 20px; }
.slot-box b { font-size: 17px; }
.slot-box span { font-size: 14.5px; }
.slot-box.on { border: 2px solid var(--ac); background: var(--ac); color: var(--ac-fg); }
.slot-box.on-soft { border: 2px solid var(--slot-bd); background: var(--slot); }
.slot-box.on-soft:hover { border-color: var(--ac); }
.slot-box.wide { flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; border-radius: 24px; padding: 18px 24px; }
.slot-box.wide > span:first-child { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.slot-box.wide > span:first-child > span { color: var(--tx-2); }
.slot-box.wide b { font-size: 20px; letter-spacing: -0.01em; }
.slot-box.wide > span:last-child { white-space: nowrap; }
.empty-box { align-items: center; text-align: center; min-height: 160px; color: var(--tx-2); }
.empty-box b { color: var(--tx-0); }
.slot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 11px; }
.key-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 11px; }
.card-slot { min-height: 116px; gap: 8px; align-content: center; padding: 12px 8px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--tx-0); }
.card-slot.is-key, .card-slot.is-open { color: var(--tx-0); }
.card-slot.is-used { color: var(--ac-fg); }
.card-slot .app-tile { width: 50px; height: 50px; border-radius: 14px; font-size: 21px; margin: 0 auto; }
.card-slot.is-none .app-tile { opacity: 0.45; }
.card-slot.is-none { color: var(--tx-2); }
.card-slot small { font-size: 12px; font-weight: 500; color: var(--tx-2); margin-top: -6px; }
.card-slot.is-used small { color: var(--ac-fg); }
.person-head { display: flex; align-items: center; gap: 18px; }
.person-head img { border-radius: 22px; object-fit: cover; }
.form { display: grid; gap: 4px; max-width: 640px; }
.form .field-label { font-size: 14.5px; font-weight: 500; color: var(--tx-2); }
.form .input, dialog .input { height: 48px; font-size: 15.5px; border-width: 1.5px; border-radius: 13px; padding: 0 15px; }
.form textarea.input, dialog textarea.input { height: auto; padding: 12px 15px; }
.form .field-hint { font-size: 13.5px; }
.form .seg button { font-size: 14.5px; }
dialog .field-label { font-size: 14.5px; font-weight: 500; color: var(--tx-2); }
dialog .modal-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
dialog .modal-head p { font-size: 15.5px; }
dialog .modal-head { padding-top: 26px; }
dialog .modal-foot { background: none; border-top: 0; justify-content: flex-start; }
dialog .modal-foot .btn { height: 48px; padding: 0 20px; border-radius: 14px; font-size: 15.5px; font-weight: 700; }
dialog .modal-foot .btn-ghost { order: 2; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px dashed var(--bd-1); border-radius: 12px; font-size: 15px; cursor: pointer; }
.checks label:has(:checked) { border: 1.5px solid var(--slot-bd); background: var(--slot); }
.checks input { accent-color: var(--ac); }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { height: 48px; border-radius: 14px; font-size: 15.5px; flex: 1; min-width: 0; }
.copy-line { display: flex; gap: 12px; align-items: center; width: 100%; padding: 11px 14px; border: 1.5px solid var(--bd-1); border-radius: 13px; background: var(--bg-0); }
.copy-line code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 13px; }
.copy-line button { background: none; border: 0; font: inherit; font-weight: 600; color: var(--ac); cursor: pointer; }
@media (max-width: 980px) {
  .split.people { grid-template-columns: minmax(0, 1fr); }
  .keys, .keys.md, .keys.sm, .keys thead, .keys tbody { display: block; margin: 0; width: max-content; }
  .keys tr { display: grid; grid-template-columns: repeat(var(--apps), 50px); gap: 8px; margin-bottom: 16px; }
  .keys th, .keys td { padding: 0; }
  .keys thead th:first-child, .keys .fold th:last-child { display: none; }
  .keys tbody th, .keys tbody th[scope=row] { grid-column: 1 / -1; justify-self: start; min-width: 0; max-width: calc(100vw - 60px); position: sticky; left: 6px; padding: 0; }
  .keys th[scope=row] a, .keys.sm th[scope=row] a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .keys.sm th[scope=row] a span { display: inline; }
  .keys td .slot, .keys.md td .slot, .keys.sm td .slot { width: 50px; height: 50px; border-radius: 15px; border-width: 2px; }
  .keys .slot svg, .keys.md .slot svg, .keys.sm .slot svg { width: 15px; height: 20px; }
  .keys thead .app-tile, .keys.md thead .app-tile, .keys.sm thead .app-tile { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; margin: 0 auto 5px; }
  .keys thead span:not(.app-tile), .keys.md thead span:not(.app-tile), .keys.sm thead th a span:not(.app-tile) { display: block; max-width: 50px; font-size: 11.5px; }
}
@media (max-width: 560px) {
  .todo > * { font-size: 15.5px; }
  .todo > * > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .key-cards { grid-template-columns: repeat(3, 1fr); }
  .slot-row { grid-template-columns: 1fr 1fr; }
  .slot-box.wide { flex-direction: column; align-items: flex-start; }
}

.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.app-card { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 196px; padding: 22px 24px; border: 2px solid var(--slot-bd); border-radius: 30px; background: var(--slot); transition: border-color 0.12s; }
.app-card:hover { border-color: var(--ac); }
.app-card .app-tile { width: 66px; height: 66px; border-radius: 18px; font-size: 28px; }
.app-card > span { display: grid; gap: 3px; }
.app-card b { font-size: 21px; letter-spacing: -0.01em; }
.app-card > span > span { font-size: 14.5px; color: var(--tx-2); min-height: 1em; }
.app-card.is-open { border-style: dotted; background: none; }
.app-card.is-none { border: 2px dashed var(--bd-1); background: none; }
.app-card.add { align-items: center; border: 2px dashed var(--bd-1); background: none; color: var(--ac); font-size: 17px; font-weight: 700; }
.big-icon .app-tile { width: 76px; height: 76px; border-radius: 20px; font-size: 32px; }
.clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.with-btn { display: flex; align-items: center; gap: 14px; }
.with-btn .input { flex: 1; min-width: 0; }
.icon-edit { display: flex; gap: 18px; align-items: center; }
.icon-edit > div { flex: 1; min-width: 0; display: grid; gap: 10px; }
.icon-edit .acts { font-size: 15px; flex-wrap: wrap; }
.icon-edit .app-tile { width: 76px; height: 76px; border-radius: 20px; font-size: 32px; }
.people-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.people-cards .card-slot { min-height: 84px; gap: 4px; }
.people-cards .card-slot small { margin: 0; }
.todo .good { color: var(--ok); font-weight: 600; }
.todo .bad { color: var(--danger); font-weight: 600; }
.keys thead th a { display: block; }
.split.guides { align-items: start; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.split.guides .hero { position: sticky; top: 34px; }
@media (max-width: 980px) { .split.guides { grid-template-columns: minmax(0, 1fr); } .split.guides .hero { position: static; } }
@media (max-width: 560px) { .app-cards { grid-template-columns: 1fr 1fr; gap: 11px; } .app-card { padding: 16px; min-height: 180px; border-radius: 24px; } .app-card b { font-size: 18px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 240px; overflow-y: auto; }
.chips form { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 8px 8px 14px; border: 2px solid var(--slot-bd); border-radius: 12px; background: var(--slot); font-size: 15px; }
.chips a:hover { color: var(--ac); }
.chips button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--tx-2); cursor: pointer; }
.chips button:hover { background: var(--bg-3); color: var(--danger); }
.rule { min-height: 106px; }
.slot-box.rule b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.slot-box.rule:not(.on):hover { border-color: var(--ac); }
.slot-box.rule.on > span:first-child > span { color: inherit; opacity: 0.85; }
.rule-apps { display: flex; gap: 9px; }
.rule-apps .app-tile { width: 50px; height: 50px; border-radius: 14px; font-size: 22px; }
.app-tile.more { display: grid; place-items: center; color: var(--tx-1); font-weight: 700; }
.log { list-style: none; margin: 0 0 22px; padding: 0; }
.log li { display: grid; grid-template-columns: 12px 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 58px; font-size: 16.5px; }
.log i { width: 12px; height: 42px; border-radius: 4px; background: var(--off); }
.log .in i { background: var(--ac); }
.log .refused i { background: var(--danger); }
.log .change i { background: none; border: 2px dashed var(--tx-2); }
.log .info { font-size: 15px; color: var(--tx-2); }
.log .info i { height: 22px; }
.log .refused > span:nth-child(3) { color: var(--danger); }
.log time { color: var(--tx-2); font-variant-numeric: tabular-nums; }
.log b, .log a { font-weight: 700; }
.log a:hover { text-decoration: underline; text-underline-offset: 3px; }
.log span { overflow-wrap: anywhere; }
.log .addr { font-size: 13.5px; color: var(--tx-2); text-align: right; white-space: nowrap; }
.log-day { margin-top: 6px; }
@media (max-width: 560px) { .log li { grid-template-columns: 10px 44px minmax(0, 1fr); gap: 11px; font-size: 15.5px; } .log .addr { display: none; } .log i { width: 10px; } .slot-box.wide.rule { align-items: flex-start; } }

@media (max-width: 980px) { .split:has(> .hero.lead) { gap: 18px; } }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { min-height: 122px; padding: 18px 22px; border-radius: 26px; text-align: left; font: inherit; color: inherit; background: none; cursor: pointer; overflow-wrap: anywhere; }
.slot-box.tile b { font-size: 19px; letter-spacing: -0.01em; }
.tile span { color: var(--tx-2); }
.tile:hover { border-color: var(--ac); }
.slot-box.bad { border: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 18%, var(--bg-0)); }
.slot-box.bad b, .slot-box.bad span { color: var(--danger); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair.wide-first { grid-template-columns: 3fr 1fr; }
[hidden] { display: none !important; }
.swatch { width: 48px; height: 48px; padding: 4px; border: 1.5px solid var(--bd-1); border-radius: 13px; background: none; cursor: pointer; }
.provider { gap: 14px; padding: 20px 24px; border-radius: 26px; }
.provider .form { max-width: none; }
.provider .field { margin-bottom: 10px; }
.provider-head { display: flex; justify-content: space-between; align-items: center; }
.provider-head b { font-size: 22px; letter-spacing: -0.02em; }
.provider summary { cursor: pointer; color: var(--ac); font-weight: 600; font-size: 14.5px; }
.provider details p { margin: 8px 0 0; font-size: 14.5px; color: var(--tx-2); line-height: 1.5; }
.slot-box.hook > .acts { flex-wrap: wrap; white-space: normal; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.codes code { padding: 13px; border: 2px solid var(--slot-bd); border-radius: 14px; background: var(--slot); font-family: var(--font-mono); font-size: 15px; text-align: center; }
.enroll { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.enroll img { padding: 12px; border-radius: 20px; background: #fff; }
.enroll .form { flex: 1; min-width: 220px; }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; gap: 11px; } .tile { min-height: 108px; padding: 14px 16px; border-radius: 22px; } .slot-box.tile b { font-size: 17px; } .pair, .pair.wide-first { grid-template-columns: 1fr; gap: 0; } }

.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.launch .empty-box { grid-column: 1 / -1; }
.launch-app { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; min-height: 178px; padding: 18px 12px; border: 2px solid var(--slot-bd); border-radius: 30px; background: var(--slot); font: inherit; text-align: center; overflow-wrap: anywhere; cursor: pointer; transition: border-color 0.12s; }
.launch-app:hover { border-color: var(--ac); }
.launch-app .app-tile { width: 76px; height: 76px; border-radius: 20px; font-size: 32px; }
.launch-app b { font-size: 18px; letter-spacing: -0.01em; }
.launch-app.ask { border: 2px dashed var(--bd-1); background: none; color: var(--tx-2); font-size: 16px; font-weight: 600; }
.launch-app.ask svg { width: 26px; height: 30px; fill: var(--bd-1); }
.ask-row { display: flex; align-items: center; gap: 13px; }
.ask-row .app-tile { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
a.slot-box:hover { border-color: var(--ac); }
.stage > .launch + .slot-row { margin-top: 2px; }
.slot-box.device.on > span:first-child > span { color: inherit; opacity: 0.85; }
.slot-box.device form { margin: 0; }
.user-menu { right: max(16px, calc(50% - 235px)); }
@media (max-width: 560px) { .launch { grid-template-columns: repeat(3, 1fr); gap: 11px; } .launch-app { min-height: 120px; padding: 12px 6px; border-radius: 22px; gap: 9px; } .launch-app .app-tile { width: 54px; height: 54px; border-radius: 15px; font-size: 24px; } .launch-app b, .launch-app.ask { font-size: 14px; } .user-dock .dock-link { flex: 1; justify-content: center; } .slot-box.device { flex-direction: row; align-items: center; } }
@media (max-width: 860px) { .user-menu { right: 12px; } }
@media (max-width: 980px) { .dial.lock-ring text { font-size: 19px; } .dial.lock-ring text.big { font-size: 22px; } }
.host-list { display: grid; gap: 10px; margin: 6px 0 10px; }
.host { display: flex; gap: 10px; }
.host .input { flex: 1; min-width: 0; }
.host-btn { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; padding: 0; border: 2px dashed var(--bd-1); border-radius: 13px; background: none; color: var(--ac); font-size: 24px; font-weight: 600; line-height: 1; cursor: pointer; }
.host-btn:hover { border-color: var(--ac); }
.host-btn[data-remove-host] { color: var(--danger); }
.host-btn[data-remove-host]:hover { border-color: var(--danger); }
.dial-wrap { position: relative; width: 100%; max-width: 640px; margin: 0 auto; }
.dial .hit { fill: none; stroke: transparent; stroke-width: 74; pointer-events: stroke; cursor: pointer; outline: none; }
.dial .ring { transition: opacity 0.15s, stroke-width 0.15s; }
.dial .centre { transition: opacity 0.15s; }
.dial-wrap.active .ring { opacity: 0.35; }
.dial-wrap.active .ring.now { opacity: 1; stroke-width: 40; }
.dial-wrap.active .centre { opacity: 0; }
.hour { position: absolute; top: 50%; left: 50%; width: 56%; max-height: 62%; transform: translate(-50%, -50%); display: grid; gap: 8px; justify-items: center; text-align: center; font-size: 15px; overflow: hidden; }
.hour > b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.hour .bad { color: var(--danger); }
.hour-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 12px 6px 6px; border: 2px solid var(--slot-bd); border-radius: 16px; background: var(--slot); text-align: left; }
a.hour-row:hover { border-color: var(--ac); }
.hour-row .app-tile { flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
.hour-lock { background: url(/static/icon.svg) center / contain no-repeat; }
.hour-row > span:not(.app-tile) { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.hour-row b, .hour-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hour-row small { font-size: 13px; color: var(--tx-2); }
.hour-row time { font-size: 13px; color: var(--tx-2); font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .dial-wrap { max-width: 460px; } }
@media (max-width: 560px) { .hour { width: 58%; max-height: 72%; gap: 4px; font-size: 12.5px; line-height: 1.25; } .hour > b { font-size: 17px; } .hour-row { gap: 7px; padding: 1px 8px 1px 2px; border-width: 1.5px; border-radius: 11px; } .hour-row .app-tile { width: 25px; height: 25px; border-radius: 8px; font-size: 12px; } .hour-row > span:not(.app-tile) { line-height: 1.15; } .hour-row b { font-size: 12.5px; } .hour-row small, .hour-row time { font-size: 10.5px; } }
.host-hint { margin: 2px 0 18px; }
.release-notes { max-width: 720px; display: block; line-height: 1.6; overflow-wrap: anywhere; }
.release-notes h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 14px; }
.release-notes h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
.release-notes p { margin: 0 0 12px; color: var(--tx-2); }
.release-notes ul { margin: 0 0 12px; padding-left: 20px; list-style: disc; color: var(--tx-2); }
.release-notes li { margin: 5px 0; }
.release-notes strong { color: var(--tx-1); }
.release-notes a { color: var(--ac); }
.release-notes code { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-3); padding: 1px 6px; border-radius: 6px; }
