/* Muhrdor design tokens and base components. Shared by the panel, the browser extension
   pages (popup, options) and, through agent.qss, the tray agent; each build copies this folder
   (fonts included) into its dist/.
   System v4 (2026-09-16): a light grey ground, white cards with an 8 px radius, one action
   blue (buttons pill-shaped), Geist for everything, JetBrains Mono for identifiers, rows that
   light up on hover. Palette after Bitwarden's open design tokens (colours only). Colour only
   for meaning; dark mode follows prefers-color-scheme and can be forced with
   <html data-theme="light"|"dark">. The three surfaces share these tokens and the lockup - one
   product, one look (design/README.md). */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/Geist-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/Geist-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/Geist-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Medium.woff2") format("woff2");
}

:root {
  --page: #f7f8fa; /* the ground behind cards */
  --paper: #ffffff; /* cards, inputs, bars */
  --paper-1: #f3f6f9; /* table head, subtle rows, list well */
  --paper-2: #e6e9ef; /* document well */
  --text: #1b2029;
  --muted: #475169;
  --faint: #8a94ad; /* meta, placeholders (>= 3:1 on paper) */
  --hairline: #e6e9ef; /* dividers and table rules only */
  --line-strong: #8791a9; /* input and quiet-button borders */
  /* action: blue - the one interactive hue (buttons, links, active nav) */
  --ink: #175ddc;
  --ink-700: #1a41ac; /* hover / pressed */
  --ink-100: #dbe5f6; /* selected row, active nav, chips */
  --ink-200: #a9c0ee; /* focus ring */
  --ink-300: #7fa1e2; /* disabled action */
  --on-ink: #ffffff; /* text on the action colour */
  --hover: rgb(26 65 172 / 0.1); /* row and menu hover wash */
  /* identity: the seal mark, kickers, sheet numbers - the action blue, one hue */
  --seal: #175ddc;
  --seal-wash: #dbe5f6;
  /* semantic (A, 2026-10-04): the default dark text on every tint is 7:1; the colour itself is for the icon and the dot */
  --ok: #0a7a16;
  --ok-tint: #c5f5d5;
  --warn: #9a4c00;
  --warn-tint: #ffe3bf;
  --danger: #b3132a;
  --danger-tint: #ffd9dd;
  --info: #175ddc;
  --info-tint: #dbe5f6;
  /* type: Geist everywhere, JetBrains Mono for identifiers */
  --font: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --size-meta: 11px; /* labels: 500, caps, +0.06em */
  --size-body: 14px; /* 14/21 */
  --size-lead: 16px;
  --size-title: 22px; /* Geist 600 */
  --size-heading: 28px;
  --size-display: 40px;
  --radius: 8px; /* cards, inputs, dialogs */
  --radius-sm: 4px; /* tags, segments */
  --radius-pill: 999px; /* buttons */
  --gutter: 16px;
}

/* Dark mode: the same tokens remapped, not inverted - the ground becomes blue-black, cards a
   shade lighter, the action blue lightens to keep contrast. Follows the system unless the page sets
   <html data-theme="light"|"dark"> (the "Ko'rinish" setting). */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #121a27;
    --paper: #202733;
    --paper-1: #2a2f38;
    --paper-2: #303946;
    --text: #f3f6f9;
    --muted: #b4bfd2;
    --faint: #6b7890;
    --hairline: #303946;
    --line-strong: #707d95;
    --ink: #65abff;
    --ink-700: #aac3ef;
    --ink-100: #1d2e63;
    --ink-200: #2f4a8f;
    --ink-300: #3d6bb0;
    --on-ink: #121a27;
    --hover: rgb(170 195 239 / 0.1);
    --seal: #65abff;
    --seal-wash: #1d2e63;
    --ok: #6bf178;
    --ok-tint: #0f3d17;
    --warn: #ffb454;
    --warn-tint: #4a2a00;
    --danger: #ff8a96;
    --danger-tint: #4f0e17;
    --info: #65abff;
    --info-tint: #1d2e63;
  }
}

html[data-theme="dark"] {
  --page: #121a27;
  --paper: #202733;
  --paper-1: #2a2f38;
  --paper-2: #303946;
  --text: #f3f6f9;
  --muted: #b4bfd2;
  --faint: #6b7890;
  --hairline: #303946;
  --line-strong: #707d95;
  --ink: #65abff;
  --ink-700: #aac3ef;
  --ink-100: #1d2e63;
  --ink-200: #2f4a8f;
  --ink-300: #3d6bb0;
  --on-ink: #121a27;
  --hover: rgb(170 195 239 / 0.1);
  --seal: #65abff;
  --seal-wash: #1d2e63;
  --ok: #6bf178;
  --ok-tint: #0f3d17;
  --warn: #ffb454;
  --warn-tint: #4a2a00;
  --danger: #ff8a96;
  --danger-tint: #4f0e17;
  --info: #65abff;
  --info-tint: #1d2e63;
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* [hidden] must win over any display a component sets (flex lists, tabs, footers) */
.muhrdor [hidden] {
  display: none !important;
}

body.muhrdor {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 var(--size-body) / 1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

body.muhrdor h1,
body.muhrdor h2,
body.muhrdor p,
body.muhrdor ol,
body.muhrdor ul {
  margin: 0;
}

.title {
  font-size: var(--size-title);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.lead {
  font-size: var(--size-lead);
  font-weight: 500;
  line-height: 1.35;
}

.meta,
.muted {
  color: var(--muted);
}

.meta {
  font-size: 13px;
  line-height: 18px;
}

/* uppercase labels: table heads, list titles, form labels */
.label {
  font-size: var(--size-meta);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* time stamps, hashes, sums: digits align (system: tabular numerals wherever numbers line up) */
time,
.num {
  font-variant-numeric: tabular-nums;
}

/* semantic notices: text on its own tint (ok / warn / danger / info) */
.notice {
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: var(--size-body);
}

.notice.ok {
  color: var(--ok);
  background: var(--ok-tint);
}

.notice.warn {
  color: var(--warn);
  background: var(--warn-tint);
}

.notice.err {
  color: var(--danger);
  background: var(--danger-tint);
}

.notice.info {
  color: var(--info);
  background: var(--info-tint);
}

.hairline {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

.section {
  padding: 14px var(--gutter);
  border-top: 1px solid var(--hairline);
}

.section:first-of-type {
  border-top: 0;
}

.section-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}

.row + .row {
  border-top: 1px solid var(--hairline);
}

.row .row-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row .row-aside {
  flex: none;
  color: var(--muted);
  font-size: var(--size-meta);
}

/* ---- Controls ---- */

.muhrdor label {
  display: block;
  margin-top: 12px;
  font-weight: 500;
}

.muhrdor input:not([type="checkbox"]):not([type="radio"]),
.muhrdor select,
.muhrdor textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 40px; /* standard control height */
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--line-strong); /* a control border must be perceivable */
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.muhrdor textarea {
  height: auto;
  padding: 6px 10px;
}

.muhrdor input::placeholder {
  color: var(--faint);
}

.muhrdor input:focus-visible,
.muhrdor select:focus-visible,
.muhrdor textarea:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--ink-200);
  outline-offset: 0;
}

.muhrdor button:focus-visible,
.muhrdor a:focus-visible {
  outline: 2px solid var(--ink-200);
  outline-offset: 2px; /* 2 px paper gap, then the ring */
}

.muhrdor input[readonly] {
  background: var(--paper-1);
}

.muhrdor input:disabled,
.muhrdor select:disabled {
  background: var(--paper-1);
  color: var(--muted);
}

.muhrdor input.is-invalid,
.muhrdor input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  margin-top: 4px;
  font-size: var(--size-meta);
  color: var(--danger);
}

.field-hint {
  margin-top: 4px;
  font-size: var(--size-meta);
  color: var(--muted);
}

.muhrdor input[type="checkbox"],
.muhrdor input[type="radio"] {
  accent-color: var(--ink);
  margin-right: 4px;
}

/* one-time code: six boxes, one digit each (visual only - a single input behind it) */
.code-input {
  letter-spacing: 0.4em;
  font-size: var(--size-lead);
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px; /* standard; .btn-sm 28, .btn-lg 44 */
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--on-ink);
  font: inherit;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--ink-700);
  border-color: var(--ink-700);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--ink-300);
  border-color: var(--ink-300);
  color: var(--on-ink);
  cursor: default; /* disabled = ink-300, never opacity */
}

.btn.is-loading {
  color: transparent; /* keeps its width */
  position: relative;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  border: 2px solid var(--on-ink);
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 700ms linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: var(--size-lead);
}

/* secondary: outlined in the action colour */
.btn-quiet {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-quiet:hover {
  background: var(--hover);
  border-color: var(--ink-700);
  color: var(--ink-700);
}

.btn-quiet:disabled {
  background: transparent;
  border-color: var(--hairline);
  color: var(--faint);
}

.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-tint);
  border-color: var(--danger);
}

.btn-block {
  width: 100%;
}

.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--ink-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.muhrdor a {
  color: var(--ink);
  text-underline-offset: 2px;
}

/* a link styled as a button: the .btn colours win over the plain-link colour above */
.muhrdor a.btn {
  color: var(--on-ink);
  text-decoration: none;
}

.muhrdor a.btn-quiet,
.muhrdor a.btn-link {
  color: var(--ink);
}

.muhrdor a.btn-danger {
  color: var(--danger);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--paper-1);
}

.segmented button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
}

/* ---- Status lines ---- */

.status {
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.status:empty {
  display: none;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--danger);
}

.code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  background: var(--paper-1);
  border-radius: var(--radius-sm);
  padding: 2px 5px;
}

/* ---- Seal indicator: the Muhrdor mark (direction A1: ring + core + notch to the right).
   Standard cut (stroke 2, core r 4) from 20 px; the bold cut (stroke 3, core r 4.5) at 16 px.
   Markup: <svg class="seal" viewBox="0 0 24 24"><path class="seal-ring" d="M 19.37 6.84 A 9 9 0 1 0 19.37 17.16"/><circle class="seal-core" cx="12" cy="12" r="4"/><rect class="seal-notch" x="16" y="11" width="6" height="2"/></svg>
   States: (none)/is-on ink · is-off faint outline · is-pending warn · is-error danger. */

.seal {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--seal);
}

/* ---- Logo lockup: the mark and the wordmark, one standard on every surface. Mark 24 +
   gap 8 + "Muhrdor" (Geist 600, 20 px); .lockup-sm 20/17 (popup, agent windows);
   .lockup-lg 32/32 (sign-in, registration). The mark keeps the seal colour, the word the text
   colour; never restyle either part locally. ---- */

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.lockup .seal {
  width: 24px;
  height: 24px;
  color: var(--seal);
}

.lockup .wordmark {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.lockup-sm {
  gap: 6px;
}

.lockup-sm .seal {
  width: 20px;
  height: 20px;
}

.lockup-sm .wordmark {
  font-size: 17px;
}

.lockup-lg {
  gap: 10px;
}

.lockup-lg .seal {
  width: 32px;
  height: 32px;
}

.lockup-lg .wordmark {
  font-size: 32px;
  letter-spacing: -0.02em;
}

.seal-16 {
  width: 16px;
  height: 16px;
}

.seal-20 {
  width: 20px;
  height: 20px;
}

.seal-24 {
  width: 24px;
  height: 24px;
}

.seal-56 {
  width: 56px;
  height: 56px;
}

.seal-ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.seal-16 .seal-ring {
  stroke-width: 3;
}

.seal-core,
.seal-notch {
  fill: currentColor;
  stroke: none;
}

.seal.is-off {
  color: var(--faint);
}

.seal.is-off .seal-core {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.seal.is-pending {
  color: var(--warn);
}

.seal.is-pending .seal-ring {
  stroke-dasharray: 3 2;
}

.seal.is-error {
  color: var(--danger);
}

.seal.stamp {
  animation: seal-stamp 240ms ease-out;
  transform-origin: center;
}

@keyframes seal-stamp {
  from {
    transform: scale(1.18);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seal.stamp {
    animation: none;
  }
}

/* ---- UI kit components (Muhrdor UI kit, section A) ---- */

/* status tag: h 22, uppercase 11 px on a wash */
.pill {
  display: inline-flex;
  flex: none; /* never shrinks in a flex row: it wraps instead of overlapping its neighbour */
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--muted);
  background: var(--paper-1);
  white-space: nowrap;
}

.pill.ok {
  color: var(--ok);
  background: var(--ok-tint);
}

.pill.warn {
  color: var(--warn);
  background: var(--warn-tint);
}

.pill.err {
  color: var(--danger);
  background: var(--danger-tint);
}

.pill.info {
  color: var(--info);
  background: var(--info-tint);
}

.pill.ink {
  color: var(--ink-700);
  background: var(--ink-100);
}

.pill.seal {
  width: auto; /* .seal above is the mark icon (40 x 40); the tone class must not size the tag */
  height: 22px;
  color: var(--seal);
  background: var(--seal-wash);
}

/* section card: white on the grey ground, radius 8, no border */
.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
}

.card + .card {
  margin-top: 8px;
}

.card-title {
  font-weight: 600;
  margin-bottom: 4px;
}

/* dense table: tabular numerals, zebra by hairline only */
.table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 8px;
  border-bottom: 1px solid var(--hairline);
}

.table th {
  font-size: var(--size-meta);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-1);
}

.table tr.is-selected td {
  background: var(--ink-100);
}

.table-wrap {
  overflow-x: auto;
}

/* toast / status line */
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 2px 8px rgb(27 32 41 / 0.12);
}

.toast .btn-link {
  margin-left: auto;
}

/* empty state */
.empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
}

.empty .empty-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

/* modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  width: min(440px, calc(100% - 32px));
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
}

.modal .title {
  margin-bottom: 8px;
}

/* bottom navigation (popup): icon over label, the active one in the action colour */
.tabs {
  display: flex;
  height: 56px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
}

.tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.tabs button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button[aria-selected="true"] {
  color: var(--ink);
}

/* sidebar navigation (panel): 220 wide */
.sidenav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidenav a,
.sidenav button {
  display: block;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sidenav a:hover,
.sidenav button:hover {
  background: var(--hover);
}

.sidenav a[aria-current="page"],
.sidenav button[aria-current="page"] {
  background: var(--ink-100);
  color: var(--ink);
  font-weight: 600;
}

/* stat tile (dashboard) */
.tile {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
}

.tile .tile-value {
  font-size: var(--size-heading);
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -0.01em;
}

.tile .tile-label {
  font-size: var(--size-meta);
  color: var(--muted);
}

/* headings beyond title (system: heading 28/36, display 40/48) */
.heading {
  font-size: var(--size-heading);
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -0.01em;
}

.display {
  font-size: var(--size-display);
  font-weight: 600;
  line-height: 48px;
  letter-spacing: -0.015em;
}

/* used recovery code: struck through */
.code.is-used {
  text-decoration: line-through;
  color: var(--faint);
}

/* "yoki" divider between sign-in methods */
.divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--faint);
  font-size: var(--size-meta);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--hairline);
}

/* ---- Shared patterns (popup and panel): forms, list headings, PIN pad, facts ---- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack > .field,
.stack > .btn,
.stack > .divider,
.stack > .actions,
.stack > p {
  margin: 0;
}

.field label {
  display: block;
  font-weight: 500;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.field-head .btn-link {
  font-size: 12px;
  font-weight: 500;
  text-underline-offset: 3px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 64px;
}

.input-aside {
  position: absolute;
  right: 6px;
  top: 4px;
  bottom: 0;
  margin: auto 0;
  height: 28px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.muhrdor input.code-input {
  height: 48px;
  font-family: var(--font-mono);
  font-size: var(--size-title);
  font-weight: 500;
}

.rules {
  margin: 0;
  padding-left: 18px;
}

.rules li + li {
  margin-top: 2px;
}

.muhrdor .visually-hidden {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 1px !important;
  height: 1px !important;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px var(--gutter) 6px;
}

.list-head.tight {
  padding: 0;
}

.list-title {
  font-size: var(--size-meta);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-head .btn-link {
  font-size: var(--size-meta);
  font-weight: 500;
  text-decoration: none;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.pin-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--faint);
  box-sizing: border-box;
}

.pin-dots span.is-filled {
  border: 0;
  background: var(--ink);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 8px;
}

.keypad button {
  height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
}

.keypad button:hover {
  background: var(--hover);
}

.keypad button:active {
  background: var(--ink-100);
}

.keypad .keypad-del {
  font-size: 12px;
  color: var(--muted);
}

.screen-title {
  margin-bottom: 16px;
}

.screen-title .muted {
  margin-top: 4px;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  font-size: var(--size-meta);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--paper-1);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.muhrdor .check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  font-weight: 400;
}

.check input {
  margin-top: 3px;
  width: auto;
}

.secret-block {
  display: flex;
  gap: 16px;
  align-items: center;
}

.secret-text {
  min-width: 0;
}

.secret {
  display: block;
  margin: 4px 0 6px;
  padding: 6px 8px;
  line-height: 18px;
}

/* --- tokens v4.1 (2026-10-02): additions only. Everything above this line is frozen until the
   popup's own redesign (tests/unit/test_design_tokens.py pins it); below it only custom
   properties are added, never selectors - new components live in design/components.css.
   2026-10-03: the sizes follow direction A (docs/research/reports, section 4): three control
   heights, a 14-32 text scale, 100/200/300 ms motion. The colours of direction A are in
   design/tokens-a.css, which each surface links when its turn comes. */

:root {
  /* spacing: the 4 px steps the sheets already use */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-14: 56px;
  /* control heights: the one main action of a screen; ordinary buttons and fields (a field
     and the button beside it are the same height); tables and toolbars */
  --h-primary: 52px;
  --h-control: 48px;
  --h-compact: 36px;
  /* text scale: nothing readable is smaller than 14 px */
  --text-sm: 14px; /* table, label, note - 14/20 */
  --text-md: 16px; /* body - 16/24 */
  --text-lg: 18px; /* long reading (consent, act text), small heading - 18/28 */
  --text-xl: 22px; /* card and dialog title - 22/28 */
  --text-2xl: 28px; /* section heading - 28/36 */
  --text-3xl: 32px; /* page title - 32/40 */
  --radius-lg: 12px; /* cards, dialogs */
  /* elevation: card edge, card and menu, dialog */
  --shadow-1: 0 1px 2px rgb(27 32 41 / 0.06);
  --shadow-2: 0 2px 14px rgb(27 32 41 / 0.14);
  --shadow-3: 0 16px 48px rgb(27 32 41 / 0.24);
  --scrim: rgb(18 26 39 / 0.45); /* behind dialogs and drawers */
  /* motion: hover and press, enter and leave, large surfaces */
  --dur-1: 100ms;
  --dur-2: 200ms;
  --dur-3: 300ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  /* stacking: app bar, menus, drawer, dialogs, toasts */
  --z-sticky: 20;
  --z-dropdown: 30;
  --z-drawer: 40;
  --z-overlay: 60;
  --z-toast: 80;
  /* focus: the action blue, 2 px ring with a 2 px gap (--ink-200 was 1.83:1) */
  --focus-ring: var(--ink);
  --focus-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-2: 0 2px 14px rgb(0 0 0 / 0.4);
    --shadow-3: 0 16px 48px rgb(0 0 0 / 0.55);
    --scrim: rgb(0 0 0 / 0.6);
  }
}

html[data-theme="dark"] {
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-2: 0 2px 14px rgb(0 0 0 / 0.4);
  --shadow-3: 0 16px 48px rgb(0 0 0 / 0.55);
  --scrim: rgb(0 0 0 / 0.6);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 0ms;
    --dur-2: 0ms;
    --dur-3: 0ms;
  }
}
