/* PixelBox — after Apple's Human Interface Guidelines: system type, grouped
   inset lists, segmented controls, sheets for multi-step tasks, and colour
   used sparingly. Accent #416DA6 is for filled controls; text in the accent
   hue uses the darker/lighter --accent-ink so it clears 4.5:1. */

:root {
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --accent: #416DA6;
  --accent-press: #3A6396;
  --accent-ink: #416DA6;
  --accent-soft: rgba(65, 109, 166, .12);
  --on-accent: #FFFFFF;

  --bg: #F4F1E9;
  --row: #FFFFFF;
  --row-sheet: #FFFFFF;
  --sheet: #F2F2F7;
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .07);
  --label: #16151B;
  --label-2: rgba(60, 60, 67, .74);
  --label-3: rgba(60, 60, 67, .46);
  --sep: rgba(60, 60, 67, .16);
  --bar: rgba(242, 242, 247, .8);
  --seg-on: #FFFFFF;

  --green: #248A3D;   --green-fill: #34C759;  --green-soft: rgba(52, 199, 89, .14);
  --red: #D70015;     --red-fill: #FF3B30;    --red-soft: rgba(255, 59, 48, .11);
  --orange: #B25000;  --orange-fill: #FF9500; --orange-soft: rgba(255, 149, 0, .14);
  --teal-fill: #30B0C7; --gray-fill: #8E8E93; --indigo-fill: #5856D6;

  --shadow-sheet: 0 24px 70px -24px rgba(0, 0, 0, .38), 0 0 0 .5px rgba(0, 0, 0, .06);
  --shadow-pop: 0 10px 34px -10px rgba(0, 0, 0, .28), 0 0 0 .5px rgba(0, 0, 0, .08);
  --r-xl: 22px;
  --r-lg: 14px;
  --r: 11px;
  --r-sm: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #416DA6;
    --accent-press: #5A8BCB;
    --accent-ink: #7FA5D6;
    --accent-soft: rgba(65, 109, 166, .28);
    --bg: #16151B;
    --row: #1C1C1E;
    --row-sheet: #2C2C2E;
    --sheet: #1C1C1E;
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .14);
    --label: #F4F1E9;
    --label-2: rgba(235, 235, 245, .7);
    --label-3: rgba(235, 235, 245, .4);
    --sep: rgba(84, 84, 88, .55);
    --bar: rgba(22, 22, 24, .76);
    --seg-on: #636366;
    --green: #30D158;  --green-soft: rgba(48, 209, 88, .18);
    --red: #FF6961;    --red-soft: rgba(255, 69, 58, .18);
    --orange: #FFB340; --orange-soft: rgba(255, 159, 10, .18);
    --shadow-sheet: 0 24px 70px -20px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .08);
    --shadow-pop: 0 10px 34px -10px rgba(0, 0, 0, .7), 0 0 0 .5px rgba(255, 255, 255, .1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #416DA6;
  --accent-press: #5A8BCB;
  --accent-ink: #7FA5D6;
  --accent-soft: rgba(65, 109, 166, .28);
  --bg: #16151B;
  --row: #1C1C1E;
  --row-sheet: #2C2C2E;
  --sheet: #1C1C1E;
  --fill: rgba(118, 118, 128, .24);
  --fill-2: rgba(118, 118, 128, .14);
  --label: #F4F1E9;
  --label-2: rgba(235, 235, 245, .7);
  --label-3: rgba(235, 235, 245, .4);
  --sep: rgba(84, 84, 88, .55);
  --bar: rgba(22, 22, 24, .76);
  --seg-on: #636366;
  --green: #30D158;  --green-soft: rgba(48, 209, 88, .18);
  --red: #FF6961;    --red-soft: rgba(255, 69, 58, .18);
  --orange: #FFB340; --orange-soft: rgba(255, 159, 10, .18);
  --shadow-sheet: 0 24px 70px -20px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .08);
  --shadow-pop: 0 10px 34px -10px rgba(0, 0, 0, .7), 0 0 0 .5px rgba(255, 255, 255, .1);
  color-scheme: dark;
}

/* ── base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--label);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
[hidden] { display: none !important; }
img, svg { display: block; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
dialog.sheet:focus, dialog.sheet:focus-visible { outline: none; }
.mono { font-family: var(--mono); font-size: .88em; letter-spacing: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── top bar ────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: .5px solid var(--sep);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar-in {
  max-width: 980px; margin: 0 auto; height: 52px;
  display: flex; align-items: center; gap: 12px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.brand {
  display: flex; align-items: center; gap: 9px; margin-right: auto;
  font: 600 17px/1 var(--font-display); color: var(--label); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .logo { height: 28px; width: auto; }

/* The logo has a light and a dark drawing; show the one for the active theme. */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}

/* theme switch: a round button showing the current theme. Tap to expand the
   pill leftwards, pick, and it folds back. Only transform, opacity and
   clip-path animate, so the header never reflows. */
.theme-host { position: relative; width: 40px; height: 40px; flex: none; }
.theme-seg {
  position: absolute; top: 0; right: 0; z-index: 2;
  display: flex; gap: 2px; padding: 4px; border-radius: 980px;
}
.theme-seg::before {
  content: ""; position: absolute; inset: 0; border-radius: 980px; background: var(--fill);
  clip-path: inset(0 0 0 calc(100% - 40px) round 980px);
  transition: clip-path .32s cubic-bezier(.3, .9, .3, 1), background-color .2s ease;
}
.theme-seg.open::before {
  clip-path: inset(0 0 0 0 round 980px);
  box-shadow: inset 0 0 0 .5px var(--sep);
}
.theme-seg button {
  position: relative; appearance: none; border: 0; background: transparent; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--label-2);
  /* collapsed: every option sits in the right-hand slot; only the active one shows */
  transform: translateX(calc((2 - var(--i)) * 34px)) scale(.6);
  opacity: 0; pointer-events: none;
  transition: transform .32s cubic-bezier(.3, .9, .3, 1), opacity .2s ease, background-color .2s ease, color .2s ease;
}
.theme-seg button[aria-pressed="true"] {
  transform: translateX(calc((2 - var(--i)) * 34px)); opacity: 1; pointer-events: auto;
  background: var(--seg-on); color: var(--label);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .04);
}
.theme-seg.open button { transform: none; opacity: 1; pointer-events: auto; }
.theme-seg.open button:not([aria-pressed="true"]):hover { background: var(--fill); color: var(--label); }
.theme-seg button:active { transform: scale(.9); }
.theme-seg:not(.open) button[aria-pressed="true"]:active { transform: translateX(calc((2 - var(--i)) * 34px)) scale(.9); }
.theme-seg button svg { width: 17px; height: 17px; }
.theme-seg.picked button[aria-pressed="true"] svg { animation: theme-pick .36s cubic-bezier(.22, 1, .36, 1); }
@keyframes theme-pick { 0% { transform: scale(.6) rotate(-40deg); } 100% { transform: none; } }

.account { position: relative; }
.avatar {
  appearance: none; border: 0; cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font: 600 13px/1 var(--font); letter-spacing: 0;
  display: grid; place-items: center;
}
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 248px; z-index: 40;
  background: color-mix(in srgb, var(--row-sheet) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  border-radius: 12px; box-shadow: var(--shadow-pop); padding: 5px;
  transform-origin: top right; animation: menu-in .18s cubic-bezier(.22, 1, .36, 1);
}
@keyframes menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-head { padding: 8px 10px 9px; border-bottom: .5px solid var(--sep); margin: 0 0 4px; }
.menu-head b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.menu-head span { display: block; font-size: 12px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a, .menu button {
  display: flex; width: 100%; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px;
  font: 400 13.5px/1.2 var(--font); letter-spacing: -.005em; color: var(--label);
  background: none; border: 0; text-align: left; cursor: pointer; white-space: nowrap;
}
.menu a svg, .menu button svg { width: 16px; height: 16px; flex: none; color: var(--label-2); }
.menu a:hover, .menu button:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.menu a:hover svg, .menu button:hover svg { color: inherit; }
.menu .sep { height: .5px; background: var(--sep); margin: 4px 6px; }
.menu .danger { color: var(--red); }
.menu .danger svg { color: var(--red); }
.menu .danger:hover { background: var(--red-fill); color: #fff; }

/* ── page ───────────────────────────────────────────────────── */
.page {
  max-width: 680px; margin: 0 auto;
  padding: 26px 16px calc(64px + env(safe-area-inset-bottom, 0px));
}
.page.wide { max-width: 980px; }
.large-title {
  font: 700 34px/1.12 var(--font-display); letter-spacing: -.022em; margin: 8px 0 6px;
}
.subtitle { margin: 0 0 26px; color: var(--label-2); font-size: 17px; max-width: 46ch; }
.back {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 6px 0; margin: 0 0 2px -4px;
  display: inline-flex; align-items: center; gap: 2px; color: var(--accent-ink); font-size: 17px;
}
.back svg { width: 20px; height: 20px; }
.section-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--label-2);
  margin: 28px 16px 7px;
}
.footnote { font-size: 13px; color: var(--label-2); margin: 8px 16px 0; line-height: 1.45; }

/* ── home composer: the secret box is the main thing on the page ── */
.composer {
  background: var(--row); border-radius: var(--r-lg); margin: 0 0 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), inset 0 0 0 .5px var(--sep);
  transition: box-shadow .15s ease;
}
.composer:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.composer-input {
  display: block; width: 100%; min-height: 200px; resize: vertical; border: 0; background: transparent;
  padding: 18px 18px 8px; font-size: 17px; line-height: 1.5; color: var(--label);
}
.composer-input.mono { font-size: 16px; }
.composer-input:focus { outline: none; }
.composer-input::placeholder { color: var(--label-3); font-family: var(--font); }
.composer-bar {
  display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 12px 12px 18px; border-top: .5px solid var(--sep);
}
.composer-hint { font-size: 13px; color: var(--label-2); }
.composer-bar .btn { min-height: 40px; padding-inline: 18px; }
@media (max-width: 480px) {
  .composer-input { min-height: 160px; }
  .composer-bar .btn { flex: 1 1 100%; }
}

/* ── quiet secondary actions under the composer ── */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: -8px 0 0; }
.quick-btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  padding: 9px 12px; border-radius: 980px; background: var(--fill-2); white-space: nowrap;
  font: 500 13px/1 var(--font); letter-spacing: 0; color: var(--label-2);
  transition: background-color .15s ease, color .15s ease;
}
.quick-btn svg { width: 14px; height: 14px; flex: none; }
.quick-btn:hover { background: var(--fill); color: var(--label); text-decoration: none; }
.quick-meta { color: var(--label-3); font-weight: 400; }
.quick-meta:empty { display: none; }
.quick-meta::before { content: "·"; margin: 0 4px 0 1px; }

/* ── grouped inset list ─────────────────────────────────────── */
.group {
  list-style: none; margin: 0; padding: 0;
  background: var(--row); border-radius: var(--r); overflow: hidden;
}
.group > li + li > .row::before, .group > .row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--sep-inset, 16px);
  border-top: .5px solid var(--sep);
}
.row {
  position: relative; display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 11px 16px; min-height: 48px; text-align: left;
  background: transparent; border: 0; color: inherit; font: inherit;
}
button.row, a.row { cursor: pointer; text-decoration: none; }
button.row:hover, a.row:hover { background: var(--fill-2); }
button.row:active, a.row:active { background: var(--fill); }
.group + .group { margin-top: 20px; }
.group.icons { --sep-inset: 61px; }
.group.icons.big { --sep-inset: 69px; }
.row-icon {
  width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center; color: #fff;
}
.row-icon svg { width: 19px; height: 19px; }
.row-icon.big { width: 40px; height: 40px; border-radius: 10px; }
.row-icon.big svg { width: 23px; height: 23px; }
.i-accent { background: var(--accent); }
.i-green { background: var(--green-fill); }
.i-orange { background: var(--orange-fill); }
.i-gray { background: var(--gray-fill); }
.i-teal { background: var(--teal-fill); }
.i-indigo { background: var(--indigo-fill); }
.row-text { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 17px; line-height: 1.3; }
.row-sub { display: block; font-size: 14px; color: var(--label-2); line-height: 1.35; margin-top: 1px; }
.row-trail { color: var(--label-3); flex: none; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.row-trail svg { width: 14px; height: 14px; }

/* ── buttons ────────────────────────────────────────────────── */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 15px/1 var(--font); letter-spacing: -.01em;
  padding: 10px 16px; min-height: 36px; border-radius: 980px;
  transition: background-color .15s ease, opacity .15s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .38; cursor: default; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-filled { background: var(--accent); color: var(--on-accent); }
.btn-filled:hover:not(:disabled) { background: var(--accent-press); }
.btn-tinted { background: var(--accent-soft); color: var(--accent-ink); }
.btn-tinted:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-gray:hover:not(:disabled) { background: color-mix(in srgb, var(--fill) 100%, var(--fill-2)); filter: brightness(.97); }
.btn-plain { background: transparent; color: var(--accent-ink); padding-inline: 8px; }
.btn-plain:hover:not(:disabled) { background: var(--fill-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-lg { font-size: 17px; min-height: 50px; padding: 14px 22px; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { font-size: 13px; min-height: 28px; padding: 6px 12px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row > .btn-lg { flex: 1 1 160px; }

/* ── fields ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; color: var(--label-2); margin: 0 4px; }
.hint { font-size: 13px; color: var(--label-2); margin: 0 4px; line-height: 1.45; }
.input, .textarea {
  width: 100%; border: 0; border-radius: var(--r); background: var(--row-sheet); color: var(--label);
  padding: 13px 15px; font-size: 17px; line-height: 1.4;
  box-shadow: inset 0 0 0 .5px var(--sep);
}
.input:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.textarea { resize: vertical; min-height: 150px; }
.textarea.mono, .input.mono { font-family: var(--mono); font-size: 15px; }
.input::placeholder, .textarea::placeholder { color: var(--label-3); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline .input { flex: 1; min-width: 0; }

/* ── segmented control ──────────────────────────────────────── */
.seg {
  display: flex; padding: 2px; border-radius: 9px; background: var(--fill); gap: 0; position: relative;
}
.seg button {
  flex: 1; appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 7px 8px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--label);
  white-space: nowrap; min-height: 32px;
}
.seg button[aria-pressed="true"] {
  background: var(--seg-on); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .06), 0 0 0 .5px rgba(0, 0, 0, .04);
}

/* ── notes ──────────────────────────────────────────────────── */
.note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r);
  font-size: 15px; line-height: 1.45; background: var(--fill-2); color: var(--label);
}
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note.warn { background: var(--orange-soft); }
.note.warn svg { color: var(--orange); }
.note.bad { background: var(--red-soft); }
.note.bad svg { color: var(--red); }
.note.good { background: var(--green-soft); }
.note.good svg { color: var(--green); }
.note.info svg { color: var(--accent-ink); }

/* ── sheets (multi-step dialogs) ────────────────────────────── */
dialog.sheet {
  --row: var(--row-sheet);
  width: min(480px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 40px));
  margin: auto; padding: 0; border: 0; border-radius: var(--r-xl);
  background: var(--sheet); color: var(--label); box-shadow: var(--shadow-sheet);
  overflow: hidden; display: none; flex-direction: column;
}
dialog.sheet[open] { display: flex; animation: sheet-in .32s cubic-bezier(.2, .9, .3, 1); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in .2s ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  dialog.sheet {
    width: 100vw; max-width: 100vw; max-height: calc(100dvh - 10px - env(safe-area-inset-top, 0px));
    margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  dialog.sheet[open] { animation: sheet-up .36s cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
}

.sheet-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 10px 0; min-height: 50px; flex: none;
}
.sheet-nav .left { justify-self: start; }
.sheet-nav .right { justify-self: end; }
.sheet-nav .title { font-weight: 600; font-size: 17px; text-align: center; }
.sheet-nav .btn-plain { font-weight: 400; font-size: 17px; }
.sheet-nav .btn-plain.strong { font-weight: 600; }
.grabber { display: none; }
@media (max-width: 600px) {
  .grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); opacity: .6; margin: 7px auto 0; flex: none; }
  .sheet-nav { padding-top: 4px; }
}

.progress { display: flex; gap: 5px; padding: 8px 20px 0; flex: none; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--fill); transition: background-color .25s ease; }
.progress i.on { background: var(--accent); }

.sheet-body { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.step { padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 18px; }
.step[data-dir="fwd"] { animation: step-fwd .28s cubic-bezier(.2, .9, .3, 1); }
.step[data-dir="back"] { animation: step-back .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes step-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes step-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.step-title { font: 700 26px/1.18 var(--font-display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.step-lede { margin: -10px 0 0; color: var(--label-2); font-size: 16px; }
.step-foot { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }

/* ── mode choice cards (Sealed note / Quick link) ─────────────────── */
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  appearance: none; border: 0; cursor: pointer; text-align: left; width: 100%;
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  padding: 16px; border-radius: var(--r-lg); background: var(--row);
  box-shadow: inset 0 0 0 .5px var(--sep);
  transition: box-shadow .15s ease, transform .1s ease;
}
.choice:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.choice:active { transform: scale(.992); }
.choice-name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font: 600 19px/1.25 var(--font-display); letter-spacing: -.015em; }
.choice-desc { display: block; font-size: 15px; color: var(--label-2); margin-top: 4px; line-height: 1.45; }
.choice-points { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--label-2); }
.choice-points li { display: flex; gap: 7px; align-items: flex-start; }
.choice-points svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--green); }
.choice-points li.minus svg { color: var(--orange); }
.choice .row-trail { align-self: center; }

.badge {
  display: inline-flex; align-items: center; font: 600 12px/1 var(--font); letter-spacing: 0;
  padding: 4px 8px; border-radius: 980px; background: var(--fill); color: var(--label-2);
}
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.red { background: var(--red-soft); color: var(--red); }

/* ── result / copy boxes ────────────────────────────────────── */
.done-mark {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 0; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green);
}
.done-mark svg { width: 32px; height: 32px; }
.done-title { text-align: center; }
.done-lede { text-align: center; margin-top: -10px; color: var(--label-2); }

.copybox { background: var(--row); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 .5px var(--sep); }
.copybox-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.copybox-num {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font: 600 13px/1 var(--font); background: var(--accent); color: var(--on-accent);
}
.copybox-title { font-weight: 600; font-size: 16px; }
.copybox-sub { font-size: 13px; color: var(--label-2); margin: 2px 14px 0 48px; }
.copybox-head + .copybox-sub { margin-top: 2px; }
.copybox-val {
  margin: 10px 14px 0; padding: 11px 12px; border-radius: var(--r-sm); background: var(--fill-2);
  font: 400 13.5px/1.55 var(--mono); letter-spacing: 0; word-break: break-all; white-space: pre-wrap;
  max-height: 120px; overflow: auto; user-select: all;
}
.copybox-val.plain { font: 400 16px/1.5 var(--mono); word-break: break-word; max-height: 280px; user-select: text; }
.copybox-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px 14px; }
.fingerprint { font: 500 12px/1 var(--mono); color: var(--label-2); background: var(--fill); padding: 5px 8px; border-radius: 6px; margin-left: auto; white-space: nowrap; }

/* ── meter ──────────────────────────────────────────────────── */
.meter { display: flex; align-items: center; gap: 10px; margin: 0 4px; }
.meter-track { flex: 1; height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter-track i { display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--red-fill); transform: scaleX(0); transform-origin: left center; transition: transform .25s ease, background-color .25s ease; }
.meter-track i.ok { background: var(--orange-fill); }
.meter-track i.good { background: var(--green-fill); }
.meter-val { font-size: 13px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── status pills & lists of links ──────────────────────────── */
.status { font: 600 12px/1 var(--font); padding: 4px 8px; border-radius: 980px; white-space: nowrap; letter-spacing: 0; }
.status.active { background: var(--green-soft); color: var(--green); }
.status.used { background: var(--fill); color: var(--label-2); }
.status.expired { background: var(--orange-soft); color: var(--orange); }
.status.revoked { background: var(--red-soft); color: var(--red); }

.empty {
  text-align: center; padding: 44px 20px; background: var(--row); border-radius: var(--r);
  color: var(--label-2); font-size: 15px;
}
.empty svg { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--label-3); }
.empty b { display: block; color: var(--label); font-size: 17px; margin-bottom: 4px; font-weight: 600; }

/* ── vault ──────────────────────────────────────────────────── */
.lock-card { background: var(--row); border-radius: var(--r-lg); padding: 28px 20px 22px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.lock-card .lock-ico { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--fill); color: var(--label-2); }
.lock-card .lock-ico svg { width: 26px; height: 26px; }
.lock-card h2 { margin: 0; font: 600 22px/1.2 var(--font-display); letter-spacing: -.015em; }
.lock-card p { margin: -6px 0 0; color: var(--label-2); font-size: 15px; }
.lock-card .input { text-align: center; }
.title-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.title-row .large-title { margin-bottom: 0; }
.timer { font: 500 13px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--label-2); background: var(--fill); padding: 6px 10px; border-radius: 980px; }
.timer.low { color: var(--orange); background: var(--orange-soft); }
.entry-open { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.entry-open .copybox-val { margin: 0; }

/* ── admin ──────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.stat { background: var(--row); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font: 700 28px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--label-2); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .seg { flex: 0 1 300px; }
.search { position: relative; flex: 1 1 220px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--label-3); }
.search input { width: 100%; border: 0; border-radius: 10px; background: var(--fill); padding: 9px 12px 9px 34px; font-size: 16px; }
.search input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.log .row { align-items: flex-start; padding-block: 12px; }
.log .row-sub { word-break: break-word; }
.log .when { font-size: 13px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kind-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 7px; background: var(--gray-fill); }
.kind-dot.k-link_create { background: var(--accent); }
.kind-dot.k-link_view { background: var(--green-fill); }
.kind-dot.k-link_denied, .kind-dot.k-signin_blocked { background: var(--orange-fill); }
.kind-dot.k-link_revoke { background: var(--red-fill); }
.kind-dot.k-sealed_note { background: var(--indigo-fill); }
.kind-dot.k-signin { background: var(--teal-fill); }
.meta-line { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; color: var(--label-2); margin-top: 3px; }

/* ── recipient + notice pages ───────────────────────────────── */
body.centered { display: flex; flex-direction: column; }
.notice { flex: 1; display: grid; place-items: center; padding: 24px 16px 48px; }
.notice-card {
  width: 100%; max-width: 440px; background: var(--row); border-radius: var(--r-xl);
  padding: 34px 24px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px;
}
.notice-mark { margin: 0 auto 4px; }
.notice-mark { display: flex; justify-content: center; }
.notice-mark .logo { width: 140px; height: auto; }
.notice-card h1 { margin: 0; font: 700 26px/1.2 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.notice-card p { margin: 0; color: var(--label-2); font-size: 16px; }
.notice-card .copybox { text-align: left; }
.notice-card .step { padding: 0; gap: 14px; }
.notice-card .step-title { text-align: center; }
.notice-card .step-lede { margin-top: -6px; text-align: center; }
.notice-card .field, .notice-card .note, .notice-card .facts { text-align: left; }
.notice-card .progress { padding: 0 0 6px; }
.notice-card .lock-ico { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--fill); color: var(--label-2); }
.notice-card .lock-ico svg { width: 26px; height: 26px; }
.facts { display: flex; flex-direction: column; background: var(--fill-2); border-radius: var(--r); text-align: left; }
.facts div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; font-size: 15px; }
.facts div + div { border-top: .5px solid var(--sep); }
.facts dt { color: var(--label-2); margin: 0; }
.facts dd { margin: 0; font-weight: 500; text-align: right; }
.site-foot { text-align: center; font-size: 12px; color: var(--label-3); padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px)); }

/* ── toast ──────────────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 100;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: color-mix(in srgb, var(--label) 88%, transparent); color: var(--bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font: 600 14px/1 var(--font); padding: 12px 18px; border-radius: 980px; max-width: calc(100vw - 32px);
  transition: opacity .2s ease, transform .2s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 480px) {
  .large-title { font-size: 30px; }
  .step-title { font-size: 23px; }
  .brand span { display: none; }
}
.quick + .footnote { text-align: center; margin-top: 18px; color: var(--label-3); }
@media (max-width: 480px) {
  .quick { gap: 6px; }
  .quick-btn { padding: 8px 6px; gap: 5px; font-size: 12.5px; }
  .quick-btn svg { display: none; }
  .quick-meta { display: none; }
}

/* ── compact sheets: dialogs are a size smaller than the page ── */
dialog.sheet { font-size: 15px; }
dialog.sheet .sheet-nav { padding: 8px 8px 0; min-height: 44px; }
dialog.sheet .sheet-nav .title { font-size: 15px; }
dialog.sheet .sheet-nav .btn-plain { font-size: 15px; min-height: 30px; padding: 5px 10px; }
dialog.sheet .progress { padding: 6px 18px 0; gap: 4px; }
dialog.sheet .progress i { height: 3px; }
dialog.sheet .step { padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px)); gap: 14px; }
dialog.sheet .step-title { font-size: 20px; line-height: 1.2; letter-spacing: -.015em; }
dialog.sheet .step-lede { font-size: 14px; margin-top: -8px; }
dialog.sheet .field { gap: 6px; }
dialog.sheet .field-label, dialog.sheet .hint { font-size: 12.5px; }
dialog.sheet .input, dialog.sheet .textarea { font-size: 15px; padding: 10px 12px; border-radius: 10px; }
dialog.sheet .textarea { min-height: 120px; }
dialog.sheet .textarea.mono, dialog.sheet .input.mono { font-size: 14px; }
dialog.sheet .seg button { font-size: 13px; min-height: 28px; padding: 5px 6px; }
dialog.sheet .btn-lg { font-size: 15px; min-height: 42px; padding: 10px 18px; border-radius: 12px; }
dialog.sheet .note { font-size: 13.5px; padding: 10px 12px; }

dialog.sheet .choices { gap: 8px; }
dialog.sheet .choice { grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 12px; align-items: center; }
dialog.sheet .choice .row-icon.big { width: 32px; height: 32px; border-radius: 8px; }
dialog.sheet .choice .row-icon.big svg { width: 18px; height: 18px; }
dialog.sheet .choice-name { font-size: 16px; gap: 6px; }
dialog.sheet .choice-desc { font-size: 13px; margin-top: 2px; line-height: 1.4; }
dialog.sheet .choice-points { margin-top: 6px; gap: 2px; font-size: 12px; }
dialog.sheet .choice-points svg { width: 13px; height: 13px; margin-top: 1px; }
dialog.sheet .badge { font-size: 10.5px; padding: 3px 7px; }
dialog.sheet .done-mark { width: 48px; height: 48px; margin-top: 2px; }
dialog.sheet .done-mark svg { width: 24px; height: 24px; }
dialog.sheet .copybox-title { font-size: 14.5px; }
dialog.sheet .copybox-val { font-size: 12.5px; }
dialog.sheet .copybox-actions .btn { font-size: 13.5px; min-height: 32px; padding: 7px 13px; }
dialog.sheet .copybox-actions .btn svg { width: 15px; height: 15px; }

/* ── admin: people ── */
.avatar-sm {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font: 600 12.5px/1 var(--font); letter-spacing: 0;
}
.people-actions { margin-top: 9px; gap: 6px; }
.toolbar .seg { flex: 0 1 380px; }
.people-badges { display: flex; gap: 6px; align-items: center; flex: none; }

/* ── iOS-style switch row ── */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--row); box-shadow: inset 0 0 0 .5px var(--sep); cursor: pointer; }
.switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.switch-title { font-size: 15px; font-weight: 500; }
.switch-row .hint { margin: 0; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 46px; height: 28px; border-radius: 980px; background: var(--fill); position: relative;
  transition: background-color .2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.switch:checked { background: var(--green-fill); }
.switch:checked::after { transform: translateX(18px); }
.code-display { margin: 10px 14px 0; font: 600 30px/1.2 var(--mono); letter-spacing: .12em; text-align: center; padding: 10px; border-radius: 10px; background: var(--fill-2); user-select: all; }
.copybox-num svg { width: 13px; height: 13px; }
.code-input { text-align: center; font: 600 24px/1.2 var(--mono) !important; letter-spacing: .3em; }
#resets { margin-bottom: 26px; }
#resets .note { margin-bottom: 10px; }
#resets .section-label { margin-top: 0; }

/* ── vault: sync bar, backups, merge prompt ── */
.sync-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: var(--row); font-size: 13.5px; color: var(--label-2); }
.sync-bar:empty { display: none; }
.sync-text { flex: 1 1 200px; min-width: 0; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--gray-fill); }
.sync-dot.ok { background: var(--green-fill); }
.sync-dot.busy { background: var(--orange-fill); }
.sync-dot.bad { background: var(--red-fill); }
.vault-foot { display: flex; gap: 4px; justify-content: center; margin-top: 14px; }
.divider-text { font-size: 12px; color: var(--label-3); text-transform: uppercase; letter-spacing: .06em; margin: 2px 0; }
.note.foreign { margin-bottom: 14px; }
.foreign-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.foreign-form .input { flex: 1 1 200px; padding: 8px 12px; font-size: 15px; }

/* ── vault: folders, custom fields, drag and drop ── */
.vault-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vault-tools .search { flex: 1 1 180px; }
.folder { margin-top: 18px; }
.folder-head {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px 7px 4px; margin: 0 0 2px;
  border-radius: 8px; transition: background-color .15s ease;
}
.folder-head .fold {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 6px;
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; color: var(--label-2);
  font: 600 13px/1.2 var(--font); letter-spacing: .02em; text-transform: uppercase;
}
.folder-head .fold:hover { background: var(--fill-2); }
.folder-head .fold svg { width: 15px; height: 15px; flex: none; }
.folder-head .fold .chev { transition: transform .2s ease; }
.folder.collapsed .folder-head .fold .chev { transform: rotate(-90deg); }
.folder-head .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-head .fcount { font-weight: 400; color: var(--label-3); text-transform: none; letter-spacing: 0; }
.folder-head .factions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s ease; }
.folder-head:hover .factions, .folder-head:focus-within .factions { opacity: 1; }
@media (hover: none) { .folder-head .factions { opacity: 1; } }
.folder-head .rename-input { flex: 1; min-width: 0; padding: 5px 9px; font-size: 14px; border-radius: 7px; }
.folder.collapsed > .group, .folder.collapsed > .folder-empty { display: none; }
.folder-empty {
  border: 1.5px dashed var(--sep); border-radius: var(--r); padding: 16px; text-align: center;
  color: var(--label-3); font-size: 13.5px;
}

.grip {
  flex: none; width: 22px; height: 30px; display: grid; place-items: center; border-radius: 6px;
  color: var(--label-3); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.grip:hover { color: var(--label-2); background: var(--fill-2); }
.grip:active { cursor: grabbing; }
.grip svg { width: 14px; height: 14px; }
.row .grip { margin-left: -8px; margin-right: -4px; }

.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; max-width: 320px;
  padding: 9px 14px; border-radius: 10px; background: var(--row-sheet); color: var(--label);
  box-shadow: var(--shadow-pop); font: 500 14px/1.3 var(--font);
  display: flex; align-items: center; gap: 8px; transform: rotate(-1.5deg);
}
.drag-ghost svg { width: 15px; height: 15px; color: var(--accent-ink); }
.dragging-src { opacity: .35; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
.drop-line { position: relative; }
.drop-line.before::after, .drop-line.after::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 3px; border-radius: 2px;
  background: var(--accent); z-index: 3; pointer-events: none;
}
.drop-line.before::after { top: -2px; }
.drop-line.after::after { bottom: -2px; }
.drop-into > .folder-head { background: var(--accent-soft); }
.drop-into > .group, .drop-into > .folder-empty { box-shadow: 0 0 0 2px var(--accent); }

/* entry details: fields */
.kv { display: flex; flex-direction: column; border-radius: var(--r-sm); background: var(--fill-2); overflow: hidden; }
.kv-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; }
.kv-row + .kv-row { border-top: .5px solid var(--sep); }
.kv-name { flex: 0 0 34%; font-size: 13px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; }
.kv-val { flex: 1; min-width: 0; font: 400 14px/1.4 var(--mono); word-break: break-all; white-space: pre-wrap; }
.kv-val.masked { letter-spacing: .1em; color: var(--label-2); }
.kv-actions { display: flex; gap: 2px; flex: none; }
.icon-btn {
  appearance: none; border: 0; background: none; cursor: pointer; width: 30px; height: 30px; border-radius: 7px;
  display: grid; place-items: center; color: var(--label-2);
}
.icon-btn:hover { background: var(--fill); color: var(--label); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { color: var(--red); background: var(--red-soft); }

/* editor: custom field rows */
.field-rows { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto auto; gap: 6px; align-items: center; }
.field-row .input { padding: 9px 11px; font-size: 14.5px; }
.field-row .icon-btn[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); }
select.input { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field > .btn-plain.btn-sm { align-self: flex-start; }
.folder-head .fold:disabled { cursor: default; }
.folder-head .fold:disabled .chev { visibility: hidden; width: 0; margin-right: -8px; }
.folder-head .fold:disabled:hover { background: none; }

/* ── vault: entry types ── */
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card {
  appearance: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px;
  border-radius: 12px; background: var(--row); box-shadow: inset 0 0 0 .5px var(--sep);
  transition: box-shadow .15s ease, transform .1s ease;
}
.type-card:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.type-card:active { transform: scale(.985); }
.type-card .row-icon { margin-bottom: 4px; }
.type-name { font: 600 15px/1.2 var(--font); }
.type-desc { font-size: 12.5px; color: var(--label-2); line-height: 1.35; }
.note-area { min-height: 200px; font-size: 15px; line-height: 1.5; }
.inline .icon-btn { flex: none; }
.row .type-ico { width: 28px; height: 28px; border-radius: 7px; }
.row .type-ico svg { width: 16px; height: 16px; }
.type-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--font); color: var(--label-2); }
.type-chip .row-icon { width: 20px; height: 20px; border-radius: 5px; }
.type-chip .row-icon svg { width: 12px; height: 12px; }
.note-block { font: 400 14.5px/1.55 var(--font); white-space: pre-wrap; word-break: break-word; padding: 11px 12px; border-radius: var(--r-sm); background: var(--fill-2); }
.note-block.masked { color: var(--label-3); font-style: italic; }
.kv-val a { color: var(--accent-ink); }

/* ── vault: search ── */
.vault-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip-btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 980px; background: var(--fill-2); color: var(--label-2);
  font: 500 13px/1 var(--font);
}
.chip-btn svg { width: 13px; height: 13px; }
.chip-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.chip-btn .n { opacity: .7; font-variant-numeric: tabular-nums; }
mark.hit { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 500 11px/1 var(--mono); color: var(--label-3); border: .5px solid var(--sep); border-radius: 4px; padding: 3px 5px; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.results-head { font-size: 13px; color: var(--label-2); margin: 18px 4px 8px; }

/* ── picker (replaces native <select>) ── */
.picker { position: relative; }
.picker-btn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.picker-face { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; }
.picker-face svg { width: 16px; height: 16px; flex: none; color: var(--label-2); }
.picker-face span { overflow: hidden; text-overflow: ellipsis; }
.picker-chev svg { width: 15px; height: 15px; color: var(--label-2); transition: transform .2s ease; }
.picker-btn[aria-expanded="true"] .picker-chev svg { transform: rotate(180deg); }
.picker-btn[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.picker-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  max-height: 260px; overflow-y: auto; padding: 5px;
  background: color-mix(in srgb, var(--row-sheet) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  animation: menu-in .16s cubic-bezier(.22, 1, .36, 1); transform-origin: top center;
}
.picker.up .picker-pop { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; }
.picker-opt {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 15px; color: var(--label); user-select: none;
}
.picker-opt svg { width: 16px; height: 16px; flex: none; color: var(--label-2); }
.picker-opt.active { background: var(--accent); color: var(--on-accent); }
.picker-opt.active svg { color: inherit; }
.picker-check { width: 16px; display: grid; place-items: center; flex: none; }
.picker-check svg { color: var(--accent-ink); }
.picker-opt.active .picker-check svg { color: inherit; }
.picker-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-create { color: var(--accent-ink); font-weight: 500; }
.picker-sep { height: .5px; background: var(--sep); margin: 4px 6px; }
.picker-newrow { display: flex; gap: 6px; padding: 4px; }
.picker-newrow .input { flex: 1; min-width: 0; padding: 7px 10px; font-size: 14.5px; }

/* ---------- portfolio demo bar (mock-api.js) ---------- */
.demo-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 6px 16px; font-size: 13px; line-height: 1.3;
  background: var(--accent, #416DA6); color: #fff;
}
.demo-reset {
  font: inherit; font-weight: 600; color: inherit; background: rgba(255, 255, 255, .18);
  border: 0; border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.demo-reset:hover { background: rgba(255, 255, 255, .3); }
.demo-reset:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* No orphans: balanced headings, "pretty" paragraphs (never one word alone on the last line). */
h1, h2, h3, .large-title, .hero h1, .panel h2, b.me-name { text-wrap: balance; }
p, li, .subtitle, .card p, .pillars p, .bc-sub, .beam-callout b, .peer-status, .empty p, .footnote, .hint, .field-label, label { text-wrap: pretty; }

/* public edition footer */
.public-foot a { color: inherit; }
.public-foot { margin: 32px auto 24px; text-align: center; }
