/* Numa. The look follows amans-video-machine (itself after ElevenLabs): calm, mostly
   monochrome, white canvas, a faint gray sidebar, black primary buttons, one blue for
   focus. Colour is reserved for meaning: up is green, down is red. Dark mode follows
   the system, with no toggle. */

@font-face {
  font-family: "InterVariable";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --panel: #fafafa;
  --panel-2: #f4f4f5;
  --panel-3: #ececee;
  --raised: #ffffff;
  --border: #ededef;
  --border-strong: #dcdce0;

  --text: #0b0b0c;
  --text-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;

  --primary: #0b0b0c;
  --primary-hover: #26262a;
  --on-primary: #ffffff;
  --select: #2f6fed;

  --ok: #1f9d55;
  --ok-bg: #e8f6ee;
  --ok-fg: #14663a;
  --warn: #c2680a;
  --warn-bg: #fef3e2;
  --warn-fg: #7a4307;
  --danger: #d4342c;
  --danger-bg: #fdeceb;

  /* chart: visitors in ink, pageviews as a faint second line, bars in panel gray */
  --chart-line: #0b0b0c;
  --chart-area: rgba(11, 11, 12, 0.06);
  --chart-pv: #c4c4cc;
  --chart-hover: rgba(11, 11, 12, 0.04);
  --bar: #f1f1f3;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.07);
  --chip-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --hairline: rgba(0, 0, 0, 0.1);

  --font: "InterVariable", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f12;
    --panel: #141418;
    --panel-2: #1f1f25;
    --panel-3: #2a2a31;
    --raised: #1c1c21;
    --border: #24242a;
    --border-strong: #34343b;

    --text: #ededef;
    --text-2: #c6c6ce;
    --muted: #8e8e98;
    --faint: #5f5f69;

    --primary: #f4f4f5;
    --primary-hover: #d9d9de;
    --on-primary: #0b0b0c;
    --select: #5b8cff;

    --ok: #34b26b;
    --ok-bg: #11241a;
    --ok-fg: #7fd4a2;
    --warn: #e08a2e;
    --warn-bg: #2a1d0e;
    --warn-fg: #f2b866;
    --danger: #e5534b;
    --danger-bg: #2c1514;

    --chart-line: #ededef;
    --chart-area: rgba(237, 237, 239, 0.07);
    --chart-pv: #4a4a53;
    --chart-hover: rgba(255, 255, 255, 0.04);
    --bar: #1d1d22;

    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.45);
    --chip-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --hairline: rgba(255, 255, 255, 0.12);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: "cv05" 1, "cv11" 1; /* tailed l, single-storey a */
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font: inherit;
  font-feature-settings: inherit;
  color: inherit;
  letter-spacing: inherit;
}

a { color: inherit; }
code { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Phosphor icons in bold, drawn inline with {{icon "name" "ic"}} */
.ic { width: 18px; height: 18px; flex: none; }
.logo { width: 20px; height: 20px; flex: none; }
.logo rect { fill: #0b0b0c; }
.logo path { fill: none; stroke: #ffc2d1; stroke-width: 124; stroke-linecap: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--raised); color: var(--text); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.lg { padding: 11px 18px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; justify-content: center; }
.btn .ic { width: 16px; height: 16px; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2);
}
.icon-btn:hover { background: var(--panel-2); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: 100vh; }
.main { display: flex; flex-direction: column; min-width: 0; overflow: auto; }

.side {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 12px;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.015em; text-decoration: none;
}
.nav {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 9px; width: fit-content; max-width: 100%;
  padding: 6px 12px 6px 9px; border: 0; border-radius: 999px; background: none;
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.nav:hover { background: var(--panel-2); color: var(--text); }
.nav[aria-current="page"] { color: var(--text); }
.nav[aria-current="page"]:hover { background: none; }
/* The current item's fill is its own element so it can slide between items when the
   page changes (see page transitions). */
.nav-pill { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--panel-2); view-transition-name: nav-pill; }
.nav .ic { color: var(--muted); }
.nav[aria-current="page"] .ic { color: var(--text); }
.nav.site-link { font-weight: 400; }
.favicon { width: 16px; height: 16px; flex: none; border-radius: 4px; object-fit: contain; }
.nav.add-link { margin-top: 2px; color: var(--muted); font-weight: 400; }
.nav.add-link:hover { color: var(--text); }
.side-label { padding: 18px 10px 6px; font-size: 13px; color: var(--muted); }
.side-foot { margin-top: auto; padding-top: 16px; }

.tile {
  width: 20px; height: 20px; flex: none; display: grid; place-items: center;
  border-radius: 6px; background: var(--panel-3); color: var(--text-2);
  font-size: 11px; font-weight: 600;
}


.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.live b { color: var(--text); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px var(--ok-bg); }
.dot.off { background: var(--faint); box-shadow: none; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .side { flex-direction: row; align-items: center; gap: 4px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; }
  .side .brand { padding: 0 8px 0 0; }
  .side .nav { flex: none; }
  .side-label, .side-foot { display: none; }
}

/* ---------- page ---------- */
.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 40px 96px; }
.page.narrow { max-width: 760px; }
/* a site's page: a smaller title with a little more air above it */
.site-page { padding-top: 52px; }
.site-page .page-head h1 { font-size: 25px; letter-spacing: -0.022em; }
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.page-head .actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 8px; font-size: 13.5px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
h2.section { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 44px 0 6px; }
p.section-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .page { padding: 24px 16px 64px; }
  .page-head .actions { margin-left: 0; max-width: 100%; }
}

.box { border: 1px solid var(--border); border-radius: 14px; padding: 22px; background: var(--bg); }

/* the period menu: a <details> dropdown, so it opens without script */
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary .ic { width: 16px; height: 16px; color: var(--muted); }
.menu summary .caret { margin-left: 2px; transition: transform 160ms ease; }
.menu[open] summary .caret { transform: rotate(180deg); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 296px;
  padding: 6px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--raised); box-shadow: var(--shadow);
  transform-origin: top right; animation: numa-pop 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes numa-pop { from { opacity: 0; transform: scale(0.97) translateY(-4px); } }
.menu-group { display: flex; flex-direction: column; padding: 4px 0; }
.menu-group + .menu-group { border-top: 1px solid var(--border); }
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px;
}
.menu-item:hover { background: var(--panel-2); color: var(--text); }
.menu-item[aria-current] { color: var(--text); font-weight: 500; }
.menu-item .check { width: 16px; height: 16px; }
.menu-custom { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 10px 6px 4px; border-top: 1px solid var(--border); }
.menu-label { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.range { display: flex; align-items: center; gap: 6px; }
.range .input { height: 34px; padding: 0 8px; font-size: 13px; min-width: 0; }
@media (max-width: 760px) { .menu-panel { right: auto; left: 0; transform-origin: top left; } }

/* ---------- overview: stats + chart ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: -6px -6px 22px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.change { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.change.up { color: var(--ok); }
.change.down { color: var(--danger); }
.change.up.inverse { color: var(--danger); }
.change.down.inverse { color: var(--ok); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-value { font-size: 22px; } }

.legend { display: flex; gap: 16px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 2px; border-radius: 2px; display: inline-block; }
.swatch.visitors { background: var(--chart-line); height: 3px; }
.swatch.pageviews { background: var(--chart-pv); }

.chart { position: relative; padding-left: 44px; }
.chart-plot { position: relative; height: 240px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .line, .chart .pv { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart .line { stroke: var(--chart-line); stroke-width: 2; }
.chart .pv { stroke: var(--chart-pv); stroke-width: 1.5; }
.chart .area { fill: var(--chart-area); }
.chart .col { fill: transparent; }
.chart .col:hover { fill: var(--chart-hover); }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); }
.gridline span { position: absolute; right: calc(100% + 10px); top: -9px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-x { position: relative; height: 26px; }
.chart-x span { position: absolute; top: 8px; transform: translateX(-50%); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
@media (max-width: 520px) { .chart-plot { height: 180px; } }

/* ---------- breakdown cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.list-card { padding: 18px 18px 12px; }
.list-card header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.list-card h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.list-card header span { font-size: 12.5px; color: var(--muted); }
.list-card ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.list-card li { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 7px; font-size: 13.5px; }
.list-card .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bar); border-radius: 7px; }
.list-card .label { position: relative; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.list-card .flag, .list-card .row-ic { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; }
.list-card .row-ic { color: var(--muted); }
.flag { border-radius: 50%; box-shadow: 0 0 0 0.5px var(--hairline); }
/* emoji flags are rectangles; crop them into the same circle as the art */
.flag.emoji { overflow: hidden; font-size: 21px; line-height: 16px; text-align: center; text-indent: -2.5px; }
.list-card .value { position: relative; color: var(--text); font-weight: 500; }
.list-card .none { margin: 6px 0 10px; color: var(--muted); font-size: 13.5px; }

/* ---------- sites ---------- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.site-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 0;
  border: 1px solid var(--border); border-radius: 14px; text-decoration: none; overflow: hidden;
}
.site-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.site-card-head { display: flex; align-items: center; gap: 12px; }
.site-card-head .tile { width: 36px; height: 36px; border-radius: 9px; background: var(--panel-2); }
.site-card-head .favicon { width: 20px; height: 20px; }
.site-card h3 { margin: 0; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; }
.site-card p { margin: 0; font-size: 13px; color: var(--muted); }
.site-card-stat { font-size: 13px; color: var(--muted); }
.site-card-stat b { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; margin-right: 4px; }
.spark { display: block; width: calc(100% + 36px); height: 48px; margin: 0 -18px; }
.spark .line { fill: none; stroke: var(--chart-line); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .area { fill: var(--chart-area); }

.empty { text-align: center; padding: 64px 20px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 14px; }
.empty h3 { color: var(--text); font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.empty p { margin: 0; }

/* ---------- forms ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; }
.field small { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--bg); font-size: 14px; font-weight: 400; outline: none;
}
.input:focus { border-color: var(--text); }

.form { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); align-items: start; }
.row > label, .row > .label { font-size: 14px; font-weight: 500; padding-top: 9px; }
.row .hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.row .id { padding-top: 10px; color: var(--text-2); word-break: break-all; }
.form-foot { padding-top: 18px; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: 8px; } }

.prefixed { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); }
.prefixed:focus-within { border-color: var(--text); }
.prefixed span { padding-left: 12px; color: var(--muted); font-size: 14px; }
.prefixed .input { border: 0; padding-left: 1px; background: none; }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel); }
.copy-field code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12.5px; scrollbar-width: none; }
.danger-zone { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.danger-zone .field { flex: 1; min-width: 220px; }

.note { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); font-size: 13.5px; color: var(--text-2); }
.note.warn { background: var(--warn-bg); color: var(--warn-fg); }
.note.ok { background: var(--ok-bg); color: var(--ok-fg); }

/* ---------- account ---------- */
.account .page-head { margin-bottom: 24px; }

/* how you're protected, at a glance */
.status { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border-radius: 14px; }
.status h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.status p { margin: 2px 0 0; font-size: 13.5px; }
.status-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.status-ic .ic { width: 20px; height: 20px; }
.status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.status.ok .status-ic { background: var(--ok); color: #fff; }
.status.warn { background: var(--warn-bg); color: var(--warn-fg); }
.status.warn .status-ic { background: var(--warn); color: #fff; }

.card { border: 1px solid var(--border); border-radius: 16px; background: var(--bg); margin-bottom: 16px; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 16px; }
.card-head h2 { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -0.012em; }
.card-head p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.card-foot { padding: 14px 20px 16px; border-top: 1px solid var(--border); background: var(--panel); }
.card-foot .note { margin-top: 10px; }

.rows { border-top: 1px solid var(--border); }
.row-item { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.row-item + .row-item { border-top: 1px solid var(--border); }
.row-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--panel-2); color: var(--text-2); }
.row-ic .ic { width: 19px; height: 19px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; }
.row-meta { font-size: 12.5px; color: var(--muted); }

/* a passkey's name edits in place: it reads as text until hovered or focused; Enter saves */
.input.bare { height: 26px; padding: 0 6px; margin-left: -6px; border-color: transparent; font-weight: 500; background: none; }
.input.bare:hover { border-color: var(--border); }
.input.bare:focus { border-color: var(--text); background: var(--bg); }

.icon-btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.icon-btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.danger:hover, .btn.danger:hover { color: var(--danger); background: var(--danger-bg); }
.btn.ghost { border-color: transparent; background: none; }
.icon-btn .ic { width: 17px; height: 17px; }

.add-key { display: flex; gap: 8px; }
.add-key .input { flex: 1; min-width: 0; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 32px 28px; border-top: 1px solid var(--border); }
.empty-state h3 { margin: 6px 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.012em; }
.empty-state p { margin: 0 0 18px; max-width: 380px; font-size: 13.5px; color: var(--muted); }
.empty-state .add-key { width: 100%; max-width: 420px; }
.empty-state .note { width: 100%; max-width: 420px; margin-top: 10px; text-align: left; }
.empty-state.compact { padding-bottom: 24px; }
.empty-state.compact p { margin: 0; }

.empty-ic { width: 72px; height: 72px; margin: 18px 0 8px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); color: var(--text); }
.empty-ic .ic { width: 34px; height: 34px; }

.recovery .card-head { padding-bottom: 14px; }
.command {
  display: flex; align-items: center; gap: 8px; margin: 0 20px 18px; padding: 6px 6px 6px 14px;
  border-radius: 10px; background: var(--panel-2); font-family: var(--mono); font-size: 12.5px;
}
.command.flush { margin: 0; }
.command code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; color: var(--text); }
.command::before { content: "$"; color: var(--faint); }
.command .icon-btn { width: 30px; height: 30px; }
.command .icon-btn[data-copied] { color: var(--ok); }

.hint-text { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.side-foot { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 520px) {
  .add-key { flex-direction: column; }
  .empty-state { padding: 8px 18px 24px; }
}

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--panel); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { justify-content: center; padding: 0 0 28px; font-size: 17px; }
.auth-card h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 8px; text-align: center; }
.auth-card .lead { margin: 0 0 28px; text-align: center; color: var(--muted); font-size: 15px; }
.auth-foot { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-panel { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); }

/* ---------- page transitions ----------
   Navigations within Numa animate between full page loads (Chrome/Edge 126+, Safari
   18.2+; other browsers just navigate). Three layers:
   - root: the page content, crossfading with a slight rise;
   - nav-pill: the current item's fill, sliding from the old item to the new one;
   - sidebar: the sidebar's text and icons, holding still above the pill. The sidebar
     has no background of its own, so the pill shows through it. */
@view-transition { navigation: auto; }

.side { view-transition-name: sidebar; }

::view-transition-group(nav-pill) { z-index: 1; animation-duration: 280ms; animation-timing-function: cubic-bezier(0.3, 0.9, 0.3, 1); }
::view-transition-group(sidebar) { z-index: 2; animation-duration: 200ms; }

/* Both halves overlap fully, so the content never dips to blank mid-way. */
::view-transition-old(root) { animation: 200ms ease-out both numa-fade-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both numa-fade-up; }

@keyframes numa-fade-out { to { opacity: 0; } }
@keyframes numa-fade-up { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .menu-panel { animation: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
