/* Shard website. The desktop app's design system (src/ui/app.css), token for token:
   flat neutral greys, 1px hairlines, one monochrome primary (white on dark,
   near-black on light) and muted status colours only where they mean something.
   No gradients, glows or pulses; motion is soft and quick. Dark first. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --wide: 1160px;

  /* dark (the app's tokens) */
  --chrome: #0F0F0F;
  --bg: #131313;
  --surface: #171717;
  --raised: #1C1C1C;
  --hover: #232323;
  --press: #1A1A1A;
  --well: #0E0E0E;
  --line: #222222;
  --line-2: #2C2C2C;
  --line-3: #3A3A3A;
  --text: #EDEDED;
  --text-2: #A0A0A0;
  --text-3: #6E6E6E;
  --primary: #EDEDED;
  --primary-hi: #FFFFFF;
  --primary-ink: #0F0F0F;
  --fav: #F2C14E;
  --ok: #46A758;
  --warn: #D6A23B;
  --danger: #E5484D;
  --danger-line: rgba(229, 72, 77, .45);
  --danger-soft: rgba(229, 72, 77, .08);
  --ok-soft: rgba(70, 167, 88, .1);
  --warn-soft: rgba(214, 162, 59, .1);
  --tint: rgba(255, 255, 255, .05);
  --sel: rgba(255, 255, 255, .14);
  --pop: #1A1A1A;
  --scrim: rgba(0, 0, 0, .62);
  --shadow: 0 16px 40px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 40px 100px rgba(0, 0, 0, .55);
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F0F0F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  color-scheme: dark;

  /* older names, still used by the admin panel */
  --base: var(--bg);
  --sheet-solid: var(--surface);
  --layer: var(--surface);
  --layer-hi: var(--raised);
  --edge: transparent;
  --accent: var(--primary);
  --accent-text: var(--text);
  --accent-soft: var(--tint);
  --accent-ring: var(--line-3);
  --live: var(--ok);
  --live-soft: var(--ok-soft);
  --shadow-1: var(--shadow-sm);
  --shadow-3: var(--shadow);
}
@media (prefers-color-scheme: light) {
  :root {
    --chrome: #F3F3F3;
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --raised: #FFFFFF;
    --hover: #F0F0F0;
    --press: #E9E9E9;
    --well: #F3F3F3;
    --line: #E8E8E8;
    --line-2: #DCDCDC;
    --line-3: #C4C4C4;
    --text: #161616;
    --text-2: #5E5E5E;
    --text-3: #8E8E8E;
    --primary: #161616;
    --primary-hi: #000000;
    --primary-ink: #FFFFFF;
    --fav: #C98A09;
    --ok: #2F8A43;
    --warn: #B07D12;
    --danger: #CE2C31;
    --danger-line: rgba(206, 44, 49, .4);
    --danger-soft: rgba(206, 44, 49, .06);
    --ok-soft: rgba(47, 138, 67, .08);
    --warn-soft: rgba(176, 125, 18, .08);
    --tint: rgba(0, 0, 0, .04);
    --sel: rgba(0, 0, 0, .1);
    --pop: #FFFFFF;
    --scrim: rgba(20, 20, 20, .28);
    --shadow: 0 16px 40px rgba(0, 0, 0, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-lg: 0 40px 100px rgba(0, 0, 0, .14);
    --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: text-decoration-color .18s var(--ease), color .18s var(--ease); }
a:hover { text-decoration-color: currentColor; }
a.btn, a.brand, a.tab, a.row { text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
::selection { background: var(--sel); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 22px; height: 22px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--text-2); outline-offset: 2px; border-radius: var(--r-sm); }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 4px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--line-3); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }

/* ---------------------------------------------------------------- top bar */

.top {
  position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 max(16px, calc((100vw - var(--wide)) / 2));
  border-bottom: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.top.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 600 16px var(--font-display); letter-spacing: -.015em; white-space: nowrap; }
.brand svg.mark { width: 20px; height: 20px; flex: none; }
.brand small { font: 500 12px var(--font); color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.top .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.tabs { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-lg); }
.tab {
  position: relative; z-index: 1; height: 34px; padding: 0 13px; border: 0; border-radius: var(--r); background: transparent;
  display: flex; align-items: center; gap: 9px; color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.tab svg.i { width: 16px; height: 16px; color: var(--text-3); transition: color .2s var(--ease); }
a.tab:hover { color: var(--text); background: color-mix(in srgb, var(--hover) 55%, transparent); }
.tab.on, .tab.on:hover { color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }
.tab.on svg.i, a.tab:hover svg.i { color: var(--text); }
.tabs.sliding .tab.on { background: transparent; box-shadow: none; }
.tab-ind {
  position: absolute; top: 3px; height: 34px; border-radius: var(--r); z-index: 0; opacity: 0;
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: left .42s var(--ease-out), width .42s var(--ease-out), opacity .2s var(--ease);
}
.tab-ind.show { opacity: 1; }

.capsule {
  height: 30px; padding: 0 12px 0 11px; border-radius: 15px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; color: var(--text-2); white-space: nowrap;
}
.capsule b { color: var(--text); font-weight: 500; }

/* ---------------------------------------------------------------- buttons */

.btn {
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 13.5px var(--font); white-space: nowrap; flex: none; cursor: pointer; user-select: none; text-decoration: none;
  background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease), opacity .18s, transform .18s var(--ease);
}
a.btn { color: var(--text); }
.btn:hover { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-3); }
.btn:active { background: var(--press); transform: scale(.97); }
.btn svg.i { width: 15px; height: 15px; }
.btn.sm { height: 31px; padding: 0 11px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 31px; }
.btn.ghost, a.btn.ghost { background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger, a.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-line); }
.btn.ghost.danger:hover { box-shadow: none; }
.btn[disabled], .btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary, a.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: none; font-weight: 600; }
.btn.primary:hover { background: var(--primary-hi); }
.btn.primary[disabled], .btn.primary:disabled { opacity: .35; }
.btn.danger.solid { background: var(--danger); color: #fff; box-shadow: none; }
.btn.danger.solid:hover { filter: brightness(1.08); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-3); border-top-color: var(--text); animation: spin .8s linear infinite; flex: none; }
.btn.primary .spin { border-color: color-mix(in srgb, var(--primary-ink) 25%, transparent); border-top-color: var(--primary-ink); }
.btn.danger.solid .spin { border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { border: 0; background: none; padding: 0; color: var(--text); font-weight: 500; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.link-btn:hover { text-decoration-color: currentColor; }

.keycap {
  display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 10px; margin: 0 4px; border-radius: var(--r); border: 0;
  font: 500 13px var(--mono); color: var(--text); background: var(--raised); vertical-align: middle; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line-3), inset 0 -2px 0 var(--line-2);
  transition: transform .1s var(--ease), background .15s var(--ease), box-shadow .1s;
}
.keycap:hover { background: var(--hover); }
.keycap:active, .keycap.down { transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--line-3); background: var(--press); }
kbd { font: 500 11.5px var(--mono); padding: 1px 6px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px var(--line-3); color: var(--text); }

/* ---------------------------------------------------------------- form controls */

.field { display: grid; gap: 8px; }
.field label, .label { font-size: 13px; font-weight: 500; color: var(--text-2); transition: color .2s var(--ease); }
.field:focus-within label { color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 13px; border-radius: var(--r); border: 0; outline: none;
  background: var(--well); color: var(--text); font: 14px var(--font);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s var(--ease), background .2s var(--ease);
}
textarea.input { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
.input::placeholder { color: var(--text-3); }
.input:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.input:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--text-2); }
.input.bad, .input.bad:focus { box-shadow: inset 0 0 0 1px var(--danger); }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E8E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
select.input option { background: var(--pop); color: var(--text); }
.input.code { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.input.otp { height: 54px; text-align: center; font: 500 22px var(--mono); letter-spacing: .4em; padding: 0 0 0 .4em; font-variant-numeric: tabular-nums; }
.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw button {
  position: absolute; right: 5px; top: 5px; width: 30px; height: 30px; border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--text-3); display: grid; place-items: center; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease);
}
.pw button:hover { background: var(--hover); color: var(--text); }
.check-row { display: flex; gap: 11px; align-items: flex-start; color: var(--text-2); font-size: 13px; line-height: 1.5; cursor: pointer; }
.check-row input {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 1px 0 0; flex: none; border-radius: var(--r-xs); cursor: pointer;
  background: var(--well); box-shadow: inset 0 0 0 1px var(--line-3); transition: background .15s var(--ease), box-shadow .15s var(--ease);
}
.check-row input:hover { box-shadow: inset 0 0 0 1px var(--text-3); }
.check-row input:checked { background: var(--check) center / 13px no-repeat, var(--primary); box-shadow: none; }
.check-row input.bad { box-shadow: inset 0 0 0 1px var(--danger); }

.switch {
  position: relative; width: 42px; height: 24px; border-radius: 12px; border: 0; flex: none; padding: 0; cursor: pointer;
  background: var(--line-2); transition: background .25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-2); transition: transform .35s var(--ease-out), background .25s var(--ease), width .2s var(--ease);
}
.switch:hover { background: var(--line-3); }
.switch:active::after { width: 21px; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--primary-ink); }
.switch[aria-checked="true"]:active::after { transform: translateX(15px); }
.switch:disabled { opacity: .35; cursor: default; }
@media (prefers-color-scheme: light) {
  .switch::after, .switch[aria-checked="true"]::after { background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .15); }
}

.seg { position: relative; display: inline-flex; padding: 3px; border-radius: var(--r); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-2); flex: none; }
.seg button {
  position: relative; z-index: 1; height: 28px; padding: 0 13px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-3); transition: color .2s var(--ease), background .2s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-3); }
@media (prefers-color-scheme: light) { .seg button.on { background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .06); } }

/* ---------------------------------------------------------------- tags, dots */

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; white-space: nowrap; vertical-align: 1px;
  font-size: 11.5px; font-weight: 500; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2);
}
.pill + .pill { margin-left: 4px; }
.pill.live { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 40%, transparent); }
.pill.accent { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); background: var(--tint); }
.pill.danger { color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-line); }
.pill.warn { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; display: inline-block; }
.dot.live { background: var(--ok); }
.dot.danger { background: var(--danger); }
.dot.warn { background: var(--warn); }

/* ---------------------------------------------------------------- surfaces */

.card { background: var(--surface); border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line); }
.card.pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.card-head svg.i { color: var(--text-3); }
.card-head h2 { font-size: 15px; letter-spacing: -.01em; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; }
.card-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }

/* the app's settings rows */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 14px 22px; }
.row + .row { border-top: 1px solid var(--line); }
.row .ico { width: 18px; display: grid; place-items: center; flex: none; color: var(--text-3); align-self: flex-start; margin-top: 3px; }
.row .main { min-width: 0; flex: 1; }
.row .main b { display: block; font-weight: 500; font-size: 14.5px; }
.row .main .meta { color: var(--text-3); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { display: flex; gap: 8px; align-items: center; flex: none; }
.row.enter { animation: rise .3s var(--ease-out) both; }
.row.leaving { opacity: 0; transform: translateX(8px); transition: opacity .2s, transform .2s var(--ease); }
.row .avatar { width: 34px; height: 34px; font-size: 14px; align-self: center; margin: 0; }
.row:has(> .avatar) .ico { display: none; }
.empty { padding: 28px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.subhead { display: flex; align-items: center; gap: 10px; font: 600 11.5px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 36px 4px 12px; }
.subhead .end { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r); font-size: 13.5px; line-height: 1.45; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.notice svg.i { margin-top: 1px; }
.notice.danger { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-line); }
.notice.accent { background: var(--tint); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); }
.notice.ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.notice.ok span, .notice.accent span { color: var(--text); }

.avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 20px var(--font-display); color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-3);
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- sign in, register, reset (the app's sign-in screen) */

.signin { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.si-top { height: 64px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.si-top .corner { margin-left: auto; display: flex; gap: 10px; align-items: center; color: var(--text-3); font-size: 13px; }
.si-form { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 24px; }
.si-box { width: min(400px, 100%); margin: auto 0; padding: 32px 0 48px; }
.si-mark { width: 64px; height: 64px; color: var(--text); margin: 0 auto 30px; display: block; overflow: visible; animation: si-mark 1s var(--ease-out) both; }
/* The mark assembles: its two facets slide together (the app's sign-in does it too). */
.si-mark path { transform-box: fill-box; transform-origin: 50% 50%; }
.si-mark path:first-child { animation: si-facet-l 1.05s var(--ease-out) both; }
.si-mark path:last-child { animation: si-facet-r 1.05s var(--ease-out) .06s both; }
.si-box form, .si-box .step { display: grid; gap: 18px; }
.si-box:has(#done:not(.hidden)) .si-mark { display: none; }
.si-box .head { text-align: center; margin-bottom: 14px; }
.si-box h2 { font: 600 30px var(--font-display); letter-spacing: -.02em; margin: 0 0 10px; }
.si-box .lead { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.si-box .input { height: 48px; padding: 0 15px; font-size: 15px; }
.si-box .input.otp { height: 56px; font-size: 22px; }
.si-box .pw .input { padding-right: 52px; }
.si-box .pw button { right: 7px; top: 7px; width: 34px; height: 34px; }
.si-box .btn.lg { height: 50px; margin-top: 6px; font-size: 15px; }
.si-box .btn.ghost.block { height: 44px; }
.si-box .foot { margin-top: 22px; color: var(--text-2); font-size: 13px; text-align: center; }
.si-box .form-err { display: none; }
.si-box .form-err.show { display: flex; animation: si-err .45s var(--ease-out) both; }
.si-box > form > *, .si-box > .step > * { animation: si-rise .75s var(--ease-out) both; }
.si-box > form > :nth-child(2), .si-box > .step > :nth-child(2) { animation-delay: 50ms; }
.si-box > form > :nth-child(3), .si-box > .step > :nth-child(3) { animation-delay: 100ms; }
.si-box > form > :nth-child(n + 4), .si-box > .step > :nth-child(n + 4) { animation-delay: 150ms; }
.si-legal { flex: none; padding: 18px 24px 22px; text-align: center; font-size: 12px; color: var(--text-3); }
.si-legal a { color: var(--text-2); }
.reqs { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; color: var(--text-3); }
.reqs li { display: flex; gap: 8px; align-items: center; transition: color .2s var(--ease); }
.reqs li svg { width: 14px; height: 14px; opacity: .35; transition: opacity .2s var(--ease), transform .35s var(--ease-out); transform: scale(.85); }
.reqs li.ok { color: var(--text); }
.reqs li.ok svg { opacity: 1; transform: none; color: var(--ok); }
.meter { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; margin-top: 2px; }
.meter > i { display: block; height: 100%; width: 0; background: var(--danger); border-radius: 2px; transition: width .3s var(--ease), background .3s var(--ease); }
.done-ic {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 4px;
  color: var(--primary-ink); background: var(--primary); animation: si-mark .6s var(--ease-out) both;
}
@keyframes si-mark { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes si-facet-l { from { opacity: 0; transform: translate(-14px, 8px) rotate(-8deg); } }
@keyframes si-facet-r { from { opacity: 0; transform: translate(14px, -8px) rotate(8deg); } }
@keyframes si-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes si-err { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------------------------------------------------------- landing */

.page { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.intro { padding: 88px 0 52px; max-width: 780px; }
.intro .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.intro .eyebrow .dot { width: 6px; height: 6px; background: var(--ok); }
.intro h1 { font: 600 clamp(40px, 5.6vw, 68px)/1.02 var(--font-display); letter-spacing: -.04em; text-wrap: balance; }
.intro h1 em { font-style: normal; color: var(--text-3); }
.intro .lead { margin-top: 22px; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 34em; }
.intro .cta { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.intro .small { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.intro > * { animation: si-rise .75s var(--ease-out) both; }
.intro > :nth-child(2) { animation-delay: 50ms; }
.intro > :nth-child(3) { animation-delay: 100ms; }
.intro > :nth-child(4) { animation-delay: 150ms; }
.intro > :nth-child(5) { animation-delay: 200ms; }

.window {
  position: relative; margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--chrome);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-lg); animation: window-in 1s var(--ease-out) .15s both;
}
.window img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
@keyframes window-in { from { opacity: 0; transform: translateY(24px); } }
.window .notice-toast {
  position: absolute; left: 50%; bottom: 7%; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 9px 20px 9px 9px;
  border-radius: var(--r-lg); background: var(--pop); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); transform: translate(-50%, 16px) scale(.97); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .45s var(--ease-out);
}
.window .notice-toast.show { opacity: 1; transform: translate(-50%, 0); }
.notice-toast .t-ic { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }
.notice-toast b { display: block; font: 600 13.5px var(--font-display); color: var(--text); }
.notice-toast span span { display: block; font-size: 12.5px; color: var(--text-2); }
.try { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 24px 0 0; color: var(--text-3); font-size: 13px; }

.section { padding: 120px 0 0; scroll-margin-top: 40px; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 14px; display: block; }
.section-head h2 { font: 600 clamp(28px, 3.4vw, 40px)/1.08 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.section-head p b { color: var(--text); font-weight: 500; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: var(--r-xl); overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 28px; background: var(--surface); border-radius: 0; box-shadow: none; transition: background .25s var(--ease); }
.feature:hover { background: var(--raised); }
.feature .fi { width: 18px; height: 18px; color: var(--text-2); }
.feature h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; margin: 6px 0 6px; }
.feature p { color: var(--text-2); font-size: 14px; line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-radius: var(--r-xl); overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.stat { padding: 26px 26px 24px; background: var(--surface); }
.stat b { display: block; font: 600 34px/1.05 var(--font-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 17px; font-weight: 500; color: var(--text-3); margin-left: 3px; letter-spacing: -.01em; }
.stat span { display: block; margin-top: 10px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.stats-note { margin-top: 14px; color: var(--text-3); font-size: 12.5px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.split .section-head { margin-bottom: 0; }
.split ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.split li { display: flex; gap: 12px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.split li svg { color: var(--text); margin-top: 2px; }
.demo { overflow: hidden; }
.demo .row { min-height: 76px; }
.demo .row .main span { display: block; color: var(--text-3); font-size: 13px; margin-top: 3px; transition: color .2s var(--ease); }
.demo .row .main, .demo .row .ico { transition: opacity .25s var(--ease); }
.demo .row.off .main, .demo .row.off .ico { opacity: .45; }
.demo-foot { display: flex; align-items: center; gap: 12px; padding: 14px 22px; font-size: 13px; color: var(--text-2); background: var(--well); border-top: 1px solid var(--line); }
.demo-foot b { color: var(--text); font-weight: 500; }
.demo-foot svg.i { color: var(--text-3); }

.band { display: flex; align-items: center; gap: 22px; padding: 30px 32px; margin: 120px 0 0; }
.band img { width: 56px; height: 56px; flex: none; }
.band h2 { font-size: 24px; letter-spacing: -.025em; }
.band p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.band .end { margin-left: auto; display: flex; gap: 10px; }

.foot-bar { max-width: var(--wide); margin: 0 auto; padding: 64px 16px 44px; display: flex; align-items: center; gap: 18px; color: var(--text-3); font-size: 13px; }
.foot-bar .brand { font-size: 14px; color: var(--text-2); }
.foot-bar .brand svg.mark { width: 17px; height: 17px; }
.foot-bar nav { margin-left: auto; display: flex; gap: 20px; }
.foot-bar.narrow { max-width: 860px; }
.foot-bar nav a { color: var(--text-2); text-decoration: none; }
.foot-bar nav a:hover { color: var(--text); }

/* ---------------------------------------------------------------- account */

.wrap { max-width: 860px; margin: 0 auto; padding: 40px 16px 40px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font: 600 28px/1.15 var(--font-display); letter-spacing: -.025em; }
.page-head p, .page-head .sub { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.page-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.acct-card { display: flex; align-items: center; gap: 18px; padding: 22px; animation: rise .45s var(--ease-out) both; }
.acct-card .who { flex: 1; min-width: 0; }
.acct-card .who h1 { font: 600 22px/1.2 var(--font-display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.acct-card .who span { display: block; font-size: 13px; color: var(--text-3); margin-top: 3px; }
.acct-card + .notice { margin-top: 14px; }
.wrap > .card.rows, .wrap > .subhead, .wrap > .dl-note { animation: rise .45s var(--ease-out) .06s both; }
.card.rows { overflow: hidden; }
h2.subhead { scroll-margin-top: 80px; }
a.row { color: inherit; transition: background .15s var(--ease); }
a.row:hover { background: var(--raised); }
.dl-rows .ico { color: var(--text-2); }
.dl-note { color: var(--text-3); font-size: 12.5px; margin: 12px 4px 0; }
.inline { padding: 4px 22px 24px 56px; animation: rise .3s var(--ease-out) both; }
.inline + .row { border-top: 1px solid var(--line); }
.form-grid { display: grid; gap: 14px; max-width: 420px; }
.form-grid .acts { display: flex; gap: 8px; }
.form-grid .form-err { display: none; }
.form-grid .form-err.show { display: flex; animation: rise .2s var(--ease) both; }
.totp-setup { display: grid; grid-template-columns: 184px 1fr; gap: 24px; align-items: start; }
.totp-setup img { width: 184px; height: 184px; border-radius: var(--r-lg); background: #fff; padding: 8px; box-shadow: 0 0 0 1px var(--line-2); }
.secret { font: 13px var(--mono); padding: 9px 12px; border-radius: var(--r); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-2); word-break: break-all; user-select: all; }

/* ---------------------------------------------------------------- toasts, dialogs (the app's) */

.toasts { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 11px; padding: 7px 18px 7px 16px; min-height: 48px; border-radius: var(--r-lg);
  background: var(--pop); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow);
  font-size: 13.5px; animation: toast-in .45s var(--ease-out);
}
.toast svg { color: var(--text-2); }
.toast.bad { box-shadow: inset 0 0 0 1px var(--danger-line), var(--shadow); }
.toast.bad svg { color: var(--danger); }
.toast.out { animation: toast-out .28s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

.scrim { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: grid; place-items: center; padding: 16px; animation: fade .2s var(--ease); }
.modal {
  width: min(440px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border-radius: var(--r-xl); display: grid; gap: 12px;
  background: var(--pop); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow);
  animation: pop-in .32s var(--ease-out);
}
.modal h2 { font: 600 19px var(--font-display); letter-spacing: -.015em; }
.modal > p { color: var(--text-2); font-size: 13.5px; margin-top: -4px; line-height: 1.55; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .totp-setup { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .top { gap: 10px; }
  .top .tabs.opt { display: none; }
  .intro { padding-top: 48px; }
  .features { grid-template-columns: 1fr; }
  .section { padding-top: 88px; }
  .band { flex-wrap: wrap; margin-top: 88px; padding: 24px; }
  .band .end { margin-left: 0; width: 100%; }
  .band .end .btn { flex: 1; }
  .foot-bar { flex-wrap: wrap; }
  .foot-bar nav { margin-left: 0; width: 100%; }
  .row { gap: 12px; padding: 14px 16px; align-items: flex-start; flex-wrap: wrap; }
  .row .main { flex-basis: calc(100% - 30px); }
  .row .end { margin-left: 30px; }
  .row .main .meta { white-space: normal; }
  .row:has(> .switch) { flex-wrap: nowrap; align-items: center; }
  .row:has(> .switch) .main { flex-basis: auto; }
  .row:has(> .avatar) .main { flex-basis: calc(100% - 50px); }
  .row:has(> .avatar) .end { margin-left: 46px; }
  .inline { padding: 4px 16px 20px; }
  .acct-card { padding: 18px; }
  .top .tabs .tab { padding: 0 11px; }
  .wrap { padding-top: 24px; }
  .si-top { padding: 0 16px; }
  .si-top .corner .lbl { display: none; }
  .si-form { padding: 0 20px; }
  .si-box { padding-top: 16px; }
  .si-mark { width: 52px; height: 52px; margin-bottom: 24px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat b { font-size: 28px; }
  .top .end .btn.ghost.opt { display: none; }
  .top:has(.tabs:not(.opt)) .brand { font-size: 0; gap: 0; }
  .top .end .lbl { display: none; }
  .top .end .btn.sm:has(.lbl) { width: 31px; padding: 0; }
  .window { border-radius: var(--r); }
  .window .notice-toast { padding: 7px 14px 7px 7px; gap: 10px; }
  .notice-toast .t-ic { width: 28px; height: 28px; }
  .notice-toast span span { display: none; }
}
