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

@layer reset, base, layout, components;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  img, svg { display: block; max-width: 100%; }
  button { font: inherit; color: inherit; background: none; border: 0; }
  ul { margin: 0; padding: 0; list-style: none; }
}

@layer base {
  :root {
    /* tier 1: primitives */
    --ink-0: #0a0b0f;
    --ink-1: #101218;
    --ink-2: #15181f;
    --ink-3: #1c2028;
    --line: rgba(255, 255, 255, 0.065);
    --line-2: rgba(255, 255, 255, 0.13);

    --s1: 0.25rem;
    --s2: 0.5rem;
    --s3: 0.75rem;
    --s4: 1rem;
    --s5: 1.5rem;
    --s6: 2rem;
    --s7: 2.75rem;
    --s8: 3.5rem;
    --s9: 5rem;

    --r-xs: 6px;
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-full: 999px;

    --fs-3xl: clamp(2.125rem, 1.35rem + 2.6vw, 3.125rem);
    --fs-2xl: clamp(1.5rem, 1.25rem + 1.1vw, 1.9rem);
    --fs-xl: 1.3rem;
    --fs-lg: 1.0625rem;
    --fs-md: 0.9375rem;
    --fs-sm: 0.8125rem;
    --fs-xs: 0.75rem;
    --fs-2xs: 0.6875rem;

    --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
    --font-display: var(--font-text);
    --tracking-label: 0.095em;

    /* tier 2: semantic roles - the component API */
    --bg: var(--ink-0);
    --surface: var(--ink-1);
    --surface-2: var(--ink-2);
    --surface-hover: var(--ink-3);
    --surface-glass: rgba(10, 11, 15, 0.72);
    --border: var(--line);
    --border-strong: var(--line-2);
    --text: #f2f3f6;
    --text-muted: #a7adbb;
    --text-subtle: #8b93a4;

    --accent: #9d7bff;
    --accent-bright: #b79bff;
    --accent-ink: #0b0d12;
    --accent-soft: rgba(157, 123, 255, 0.14);
    --accent-line: rgba(157, 123, 255, 0.36);

    --gold: #eeba55;
    --success: #3ddb86;
    --success-soft: rgba(61, 219, 134, 0.13);
    --success-line: rgba(61, 219, 134, 0.42);
    --danger: #ff6b6f;
    --danger-soft: rgba(255, 107, 111, 0.13);
    --danger-line: rgba(255, 107, 111, 0.42);
    --warning: #e8b23a;

    --page-max: 1140px;
    --gutter: clamp(1rem, 4vw, 2.25rem);
    --shadow-pop: 0 18px 40px rgba(0, 0, 0, 0.45);
    --lift: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  html { color-scheme: dark; scrollbar-gutter: stable; }

  body {
    background: var(--bg);
    background-image: radial-gradient(
      120% 80% at 50% -20%,
      rgba(157, 123, 255, 0.09),
      transparent 60%
    );
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-text);
    font-size: var(--fs-md);
    line-height: 1.55;
    letter-spacing: -0.005em;
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
  }

  h1, h2, h3 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
  h1 { font-size: var(--fs-2xl); font-weight: 640; letter-spacing: -0.025em; line-height: 1.1; }
  h2 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
  h3 { font-size: var(--fs-md); font-weight: 600; }
  p { margin: 0; }

  a { color: var(--accent-bright); text-underline-offset: 3px; text-decoration-thickness: 1px; }
  a:hover { color: var(--accent); }

  ::selection { background: rgba(157, 123, 255, 0.32); }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-xs);
  }

  /** Every score, count and date is tabular so columns line up. */
  .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

  .label {
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    color: var(--text-subtle);
  }

  .sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@layer layout {
  .skip-link {
    position: absolute;
    inset-inline-start: var(--gutter);
    top: -4rem;
    z-index: 40;
    padding: var(--s3) var(--s4);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 650;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: top 120ms ease;
  }
  .skip-link:focus { top: var(--s3); }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface-glass);
    backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid var(--border);
  }

  .header-inner {
    display: flex;
    align-items: center;
    gap: var(--s4);
    inline-size: 100%;
    max-inline-size: var(--page-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    min-block-size: 60px;
  }

  .page {
    inline-size: 100%;
    max-inline-size: var(--page-max);
    margin-inline: auto;
    padding: var(--s6) var(--gutter) var(--s8);
    display: flex;
    flex-direction: column;
    gap: var(--s5);
    flex: 1;
  }

  .site-footer {
    border-top: 1px solid var(--border);
  }
  .footer-inner {
    max-inline-size: var(--page-max);
    margin-inline: auto;
    padding: var(--s5) var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    color: var(--text-subtle);
    font-size: var(--fs-sm);
  }

  /** Below 1024px a second copy of the same nav is rendered in the disclosure. */
  .grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }

  @media (min-width: 700px) {
    .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  }

  @media (min-width: 900px) {
    .page { padding-block: var(--s7) var(--s9); gap: var(--s6); }
    .header-inner { min-block-size: 64px; }
  }
}

@layer components {
  /* --- brand mark ------------------------------------------------------- */
  .brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    flex: none;
    min-block-size: 44px;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: var(--fs-md);
    font-weight: 640;
    letter-spacing: -0.015em;
    color: var(--text);
    text-decoration: none;
  }
  .brand:hover { color: var(--text); }
  .brandmark {
    flex: none;
    inline-size: 26px;
    block-size: 26px;
    border-radius: var(--r-xs);
    background: linear-gradient(145deg, var(--accent-bright), var(--accent));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }

  /* --- primary navigation ---------------------------------------------- */
  .site-nav--rail { display: none; }

  .nav-disclosure { margin-inline-start: auto; flex: none; }
  .nav-disclosure > summary {
    list-style: none;
    cursor: pointer;
    inline-size: 44px;
    block-size: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
  }
  .nav-disclosure > summary::-webkit-details-marker { display: none; }
  .nav-disclosure > summary:hover { background: var(--surface-hover); }
  .nav-disclosure[open] > summary { background: var(--accent-soft); border-color: var(--accent-line); }

  .bars { display: grid; gap: 4px; inline-size: 18px; }
  .bars span { block-size: 1.5px; border-radius: 2px; background: currentColor; }
  .nav-disclosure[open] .bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
  .nav-disclosure[open] .bars span:last-child { transform: translateY(-2.75px) rotate(-45deg); }
  .bars span:nth-child(2) { opacity: 1; }
  .nav-disclosure[open] .bars span:nth-child(2) { opacity: 0; }

  .nav-panel {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: grid;
    gap: var(--s2);
    padding: var(--s3) var(--gutter) var(--s4);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
    max-block-size: 72dvh;
    overflow-y: auto;
  }

  .nav-link {
    display: flex;
    align-items: center;
    min-block-size: 44px;
    padding-inline: var(--s3);
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-size: var(--fs-md);
    font-weight: 500;
    text-decoration: none;
  }
  .nav-link:hover { color: var(--text); background: var(--surface-2); }
  .nav-link[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

  /* --- account ---------------------------------------------------------- */
  .account { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
  .account-name {
    min-width: 0;
    max-width: 11rem;
    font-weight: 550;
    font-size: var(--fs-sm);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .avatar {
    inline-size: 30px;
    block-size: 30px;
    border-radius: var(--r-full);
    object-fit: cover;
    flex: none;
    box-shadow: 0 0 0 1px var(--border-strong);
  }
  .avatar-fallback {
    display: inline-block;
    background: linear-gradient(145deg, var(--surface-hover), var(--surface-2));
  }
  .account-panel {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding-block: var(--s3);
    border-top: 1px solid var(--border);
    margin-block-start: var(--s2);
  }
  .account-panel .account-name { max-width: none; flex: 1; font-size: var(--fs-md); }

  @media (min-width: 1024px) {
    .site-nav--rail {
      display: flex;
      align-items: center;
      gap: var(--s1);
      margin-inline: auto;
      min-inline-size: 0;
    }
    .nav-disclosure { display: none; }
    .site-nav--rail .nav-link {
      position: relative;
      min-block-size: 44px;
      padding-inline: var(--s3);
      font-size: var(--fs-sm);
      font-weight: 550;
      border-radius: var(--r-xs);
    }
    .site-nav--rail .nav-link:hover { background: transparent; }
    .site-nav--rail .nav-link[aria-current="page"] { background: transparent; }
    .site-nav--rail .nav-link[aria-current="page"]::after {
      content: "";
      position: absolute;
      inset-inline: var(--s3);
      bottom: -10px;
      block-size: 2px;
      border-radius: 2px;
      background: var(--accent);
    }
    .account-panel { display: none; }
    .header-inner > .account { margin-inline-start: var(--s2); }
  }

  /* --- page head -------------------------------------------------------- */
  .page-head { display: grid; gap: var(--s2); max-inline-size: 62ch; }
  .eyebrow {
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    color: var(--accent-bright);
  }
  .lede { color: var(--text-muted); }
  .who { color: var(--text); font-weight: 550; }

  /* --- panels ----------------------------------------------------------- */
  .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: clamp(1.125rem, 2.6vw, 1.75rem);
    box-shadow: var(--lift);
    min-inline-size: 0;
  }
  .panel-head { display: grid; gap: var(--s1); margin-block-end: var(--s4); }
  .panel-title { margin-block-end: var(--s4); }
  .panel-subtitle {
    margin: var(--s6) 0 var(--s3);
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .panel-note { color: var(--text-subtle); font-size: var(--fs-sm); max-inline-size: 68ch; }

  /* --- hero: the product itself, not an illustration -------------------- */
  .hero {
    display: grid;
    gap: var(--s5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--lift);
    padding: clamp(1.25rem, 3vw, 2rem);
    min-inline-size: 0;
    background-image: radial-gradient(
      90% 140% at 0% 0%,
      rgba(157, 123, 255, 0.13),
      transparent 58%
    );
  }
  .hero-balance { display: grid; gap: var(--s3); align-content: start; min-inline-size: 0; }
  .balance {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--s3);
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    font-weight: 640;
    line-height: 1;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
  }
  .balance-unit {
    font-size: var(--fs-lg);
    font-weight: 550;
    letter-spacing: 0;
    color: var(--text-subtle);
  }
  .hero-meta {
    display: grid;
    gap: var(--s4);
    align-content: start;
    border-top: 1px solid var(--border);
    padding-block-start: var(--s4);
  }
  .hero-meta dl { display: grid; gap: var(--s4); margin: 0; }
  .pair { display: grid; gap: var(--s1); }
  .pair dd { margin: 0; font-size: var(--fs-md); font-weight: 550; }
  .rank-chip { color: var(--gold); }

  @media (min-width: 880px) {
    .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s7); }
    .hero-meta { border-top: 0; border-inline-start: 1px solid var(--border); padding-block-start: 0; padding-inline-start: var(--s6); }
  }

  /* --- stats ------------------------------------------------------------ */
  .stat-label {
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    color: var(--text-subtle);
    margin-block-end: var(--s3);
  }
  .stat-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--s2);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4.6vw, 2.4rem);
    font-weight: 640;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
  }
  .stat-unit { font-size: var(--fs-md); font-weight: 550; color: var(--text-subtle); }
  .stat-meta { margin-block-start: var(--s2); color: var(--text-muted); font-size: var(--fs-sm); }

  /* --- controls --------------------------------------------------------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-block-size: 44px;
    padding: var(--s3) var(--s4);
    border-radius: var(--r-sm);
    border: 1px solid var(--border-strong);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-2);
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  }
  .btn:hover { background: var(--surface-hover); }
  .btn-primary {
    background: var(--accent);
    border-color: transparent;
    color: var(--accent-ink);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
  .btn-primary:hover { background: var(--accent-bright); color: var(--accent-ink); }
  .btn-ghost { background: transparent; border-color: var(--border-strong); }
  .btn-ghost:hover { background: var(--surface-2); }
  .btn-quiet {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    padding-inline: var(--s3);
  }
  .btn-quiet:hover { background: var(--surface-2); color: var(--text); }
  .btn-block { inline-size: 100%; }
  .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

  .cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

  input[type="text"], input[type="number"], input:not([type]), select, textarea {
    inline-size: 100%;
    min-block-size: 44px;
    padding: var(--s2) var(--s3);
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    font: inherit;
    font-size: var(--fs-md);
  }
  input[type="text"]:hover, input[type="number"]:hover, select:hover { border-color: var(--accent-line); }
  input[type="color"] {
    inline-size: 76px;
    block-size: 44px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    cursor: pointer;
  }

  .field { display: grid; gap: var(--s2); min-inline-size: 0; }
  .field-label { font-weight: 550; font-size: var(--fs-sm); color: var(--text-muted); }

  /* --- swatches --------------------------------------------------------- */
  .swatches { display: flex; flex-wrap: wrap; gap: var(--s2); }
  .swatch { position: relative; display: inline-flex; }
  .swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
  .swatch-dot {
    inline-size: 44px;
    block-size: 44px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  .swatch input:checked + .swatch-dot {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  }
  .swatch input:focus-visible + .swatch-dot { outline: 2px solid var(--accent); outline-offset: 3px; }
  .swatch--0 { background: #3a3f8f; }
.swatch--1 { background: #1f6f4a; }
.swatch--2 { background: #7a1f2b; }
.swatch--3 { background: #5b2a86; }
.swatch--4 { background: #a1541f; }
.swatch--5 { background: #155e75; }
.swatch--6 { background: #9d2449; }
.swatch--7 { background: #2b2d31; }
  .swatch-custom { background: linear-gradient(135deg, #b79bff, #9d7bff); }

  /* --- bank card editor -------------------------------------------------- */
  .card-editor {
    display: grid;
    gap: var(--s5);
    align-items: start;
    min-inline-size: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  @media (min-width: 700px) {
    .card-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  }
  .card-preview {
    inline-size: 100%;
    max-inline-size: 440px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
  }
  .card-form { display: grid; gap: var(--s4); min-inline-size: 0; }

  /* --- lists of domain rows -------------------------------------------- */
  .rows { display: grid; gap: var(--s2); }
  .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s4);
    padding: var(--s4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    min-inline-size: 0;
  }
  .row-main { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
  .row-name { font-weight: 550; overflow-wrap: anywhere; }
  .row-actions { display: flex; align-items: center; gap: var(--s3); flex: none; }
  .row-meta { color: var(--text-subtle); font-size: var(--fs-sm); }
  .amount { font-variant-numeric: tabular-nums; font-weight: 600; }
  .role-dot {
    inline-size: 8px;
    block-size: 8px;
    border-radius: var(--r-full);
    flex: none;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  /* --- tables: real table at >=700px, stacked rows below ---------------- */
  .table-wrap { min-inline-size: 0; }
  table { inline-size: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  caption { text-align: start; color: var(--text-subtle); font-size: var(--fs-sm); padding-block-end: var(--s3); }
  th, td { text-align: start; padding: var(--s3) var(--s2); border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
  code { overflow-wrap: anywhere; }
  th {
    color: var(--text-subtle);
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    white-space: nowrap;
  }
  th.amount, td.amount { text-align: end; }
  tbody tr:last-child td { border-bottom: 0; }

  @media (max-width: 699px) {
    .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td {
      display: block;
      inline-size: 100%;
    }
    .table-wrap thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
    .table-wrap tr {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--r-sm);
      padding: var(--s3) var(--s4);
      margin-block-end: var(--s2);
    }
    .table-wrap td {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: var(--s4);
      border: 0;
      padding: var(--s1) 0;
      text-align: start;
    }
    .table-wrap td::before {
      content: attr(data-label);
      color: var(--text-subtle);
      font-size: var(--fs-2xs);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: var(--tracking-label);
      flex: none;
    }
    .table-wrap td.amount, .table-wrap th.amount { text-align: end; }
  }

  .amount-pos { color: var(--success); }
  .amount-neg { color: var(--danger); }
  .amount-zero { color: var(--text-subtle); }

  .empty { color: var(--text-subtle); font-size: var(--fs-sm); }

  /* --- notices ---------------------------------------------------------- */
  .notice {
    display: flex;
    align-items: flex-start;
    gap: var(--s3);
    border-radius: var(--r-sm);
    padding: var(--s3) var(--s4);
    border: 1px solid var(--border);
    font-size: var(--fs-sm);
    font-weight: 500;
  }
  .notice-ok { background: var(--success-soft); border-color: var(--success-line); }
  .notice-error { background: var(--danger-soft); border-color: var(--danger-line); }

  .pill {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    padding: 0.2rem var(--s3);
    border-radius: var(--r-full);
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    white-space: nowrap;
  }
  .pill::before {
    content: "";
    inline-size: 6px;
    block-size: 6px;
    border-radius: var(--r-full);
    background: currentColor;
  }
  .pill-owned { background: var(--success-soft); border-color: var(--success-line); color: var(--success); }
  .pill-offline { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
  .pill-status { color: var(--text-muted); }

  /* --- login ------------------------------------------------------------ */
  .login {
    inline-size: 100%;
    max-inline-size: 27rem;
    margin: clamp(var(--s6), 12vh, var(--s9)) auto 0;
    display: grid;
    gap: var(--s5);
  }
  .login-brand { display: grid; gap: var(--s3); justify-items: start; }
  .login .brandmark { inline-size: 40px; block-size: 40px; border-radius: var(--r-sm); }
  .login h1 { font-size: var(--fs-2xl); }
  .login .panel { display: grid; gap: var(--s4); }
  .login .cta-row { display: grid; }
  .hint { color: var(--text-subtle); font-size: var(--fs-sm); }

  /* --- admin ------------------------------------------------------------ */
  .form-grid {
    display: grid;
    gap: var(--s4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  }
  .form-grid .field { min-width: 0; }
  .form-grid > button, .form-grid > .form-action { align-self: end; justify-self: start; }
  .form-action { display: flex; align-items: flex-end; }

  @media (prefers-reduced-motion: reduce) {
    .btn, .skip-link { transition: none; }
  }
}
