/* SCL UI — components. Semantic tokens only; every component works in both
   themes. Documented and rendered at /styleguide. */
@layer scl.reset, scl.tokens, scl.base, scl.layout, scl.components, scl.utilities;

@layer scl.components {
  /* ---------------------------------------------------------------- page */
  .page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
  .page-header > div:not(.page-actions) { display: grid; gap: var(--space-1-5); min-width: 0; }
  .page-title { font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); }
  .page-lede { color: var(--color-text-muted); max-width: 68ch; font-size: var(--text-base); }
  .page-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .back-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-text-muted); font-size: var(--text-sm); text-decoration: none; }
  .back-link:hover { color: var(--color-text); }

  /* ------------------------------------------------------------- buttons */
  .btn {
    --btn-bg: var(--color-surface); --btn-fg: var(--color-text); --btn-border: var(--color-border-strong); --btn-hover: var(--color-surface-hover);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: var(--control-height); padding: 0 var(--space-4); border-radius: var(--radius-md);
    background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-border);
    font-size: var(--text-sm); font-weight: var(--weight-semibold); letter-spacing: 0.005em; line-height: 1;
    text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
    box-shadow: var(--shadow-xs);
    transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
  }
  .btn:hover { background: var(--btn-hover); text-decoration: none; }
  .btn:active { transform: translateY(1px); }
  .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
  .btn-primary { --btn-bg: var(--color-brand); --btn-fg: var(--color-on-brand); --btn-border: transparent; --btn-hover: var(--color-brand-hover);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / 0.08); }
  .btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-hover: var(--color-surface-sunken); --btn-fg: var(--color-text-muted); box-shadow: none; }
  .btn-danger { --btn-bg: var(--color-surface); --btn-fg: var(--color-danger-text); --btn-border: var(--color-danger-border); --btn-hover: var(--color-danger-soft); }
  .btn.is-selected { --btn-bg: var(--color-emphasis); --btn-fg: var(--color-on-emphasis); --btn-border: transparent; --btn-hover: var(--color-emphasis); }
  .btn-sm { min-height: var(--control-height-sm); padding: 0 var(--space-3); font-size: var(--text-xs); border-radius: var(--radius-sm); }
  .btn-lg { min-height: var(--control-height-lg); padding: 0 var(--space-6); font-size: var(--text-base); }
  .btn-block { width: 100%; }
  .btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
  .btn[aria-busy="true"]::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--btn-fg); border-right-color: transparent; animation: scl-spin 700ms linear infinite; }
  form.button_to { display: contents; }
  @keyframes scl-spin { to { transform: rotate(360deg); } }

  /* --------------------------------------------------------------- forms */
  .field { display: grid; gap: var(--space-1-5); min-width: 0; }
  .field-label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); }
  .field-hint { font-size: var(--text-xs); color: var(--color-text-muted); }
  .field-error { font-size: var(--text-xs); color: var(--color-danger-text); }
  .input, .select, .textarea {
    width: 100%; min-height: var(--control-height); padding: 0 var(--space-3);
    background: var(--color-surface); color: var(--color-text);
    border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
    font-size: 16px; /* 16px stops iOS zooming on focus */
    box-shadow: var(--shadow-xs) inset;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  }
  .textarea { padding: var(--space-2-5, 10px) var(--space-3); min-height: 96px; resize: vertical; line-height: var(--leading-body); }
  .input::placeholder, .textarea::placeholder { color: var(--color-text-subtle); }
  .input:hover, .select:hover, .textarea:hover { border-color: var(--color-text-subtle); }
  .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus) 22%, transparent); }
  .input[aria-invalid="true"] { border-color: var(--color-danger-solid); }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .form-grid .span-full { grid-column: 1 / -1; }
  .fieldset { border: 0; padding: 0; display: grid; gap: var(--space-4); }
  .fieldset legend { font-size: var(--text-md); font-weight: var(--weight-semibold); margin-bottom: var(--space-3); padding: 0; }
  @media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

  /* ------------------------------------------------- panel (main container) */
  .panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
  .panel-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
  .panel-header h2, .panel-title { font-size: var(--text-md); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); }
  .panel-header p { color: var(--color-text-muted); font-size: var(--text-sm); }
  .panel-body { padding: var(--space-5); display: grid; gap: var(--space-4); }
  .panel-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border); background: var(--color-surface-sunken); border-radius: 0 0 var(--radius-lg) var(--radius-lg); font-size: var(--text-sm); color: var(--color-text-muted); }
  .panel-quiet { background: var(--color-surface-sunken); box-shadow: none; }
  .panel-brand { background: var(--color-brand-soft); border-color: var(--color-brand-border); box-shadow: none; }

  /* tile: a panel that is one big link */
  .tile { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); color: inherit; text-decoration: none; transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
  .tile:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); text-decoration: none; }
  .tile-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-weight: var(--weight-semibold); }
  .tile p { color: var(--color-text-muted); font-size: var(--text-sm); }

  /* -------------------------------------------------------------- badges */
  .badge {
    --badge-fg: var(--color-text-muted); --badge-bg: var(--color-surface-sunken); --badge-border: var(--color-border);
    display: inline-flex; align-items: center; gap: var(--space-1-5); height: 22px; padding: 0 var(--space-2);
    border-radius: var(--radius-full); border: 1px solid var(--badge-border); background: var(--badge-bg); color: var(--badge-fg);
    font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; line-height: 1;
  }
  .badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .badge-success { --badge-fg: var(--color-success-text); --badge-bg: var(--color-success-soft); --badge-border: var(--color-success-border); }
  .badge-warning { --badge-fg: var(--color-warning-text); --badge-bg: var(--color-warning-soft); --badge-border: var(--color-warning-border); }
  .badge-danger  { --badge-fg: var(--color-danger-text);  --badge-bg: var(--color-danger-soft);  --badge-border: var(--color-danger-border); }
  .badge-info    { --badge-fg: var(--color-info-text);    --badge-bg: var(--color-info-soft);    --badge-border: var(--color-info-border); }
  .badge-brand   { --badge-fg: var(--color-brand-text);   --badge-bg: var(--color-brand-soft);   --badge-border: var(--color-brand-border); }
  .badge-accent  { --badge-fg: var(--color-accent-text);  --badge-bg: var(--color-accent-soft);  --badge-border: var(--color-accent-border); }

  /* tag: neutral data label (Sugar modules, sources) */
  .tag { display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-xs); background: var(--color-surface-raised); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); }
  .tag-read { color: var(--color-info-text); background: var(--color-info-soft); }
  .tag-write { color: var(--color-warning-text); background: var(--color-warning-soft); }

  /* -------------------------------------------------------------- alerts */
  .alert {
    --alert-fg: var(--color-text); --alert-bg: var(--color-surface-sunken); --alert-border: var(--color-border); --alert-icon: var(--color-text-muted);
    display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start;
    padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--alert-border);
    background: var(--alert-bg); color: var(--alert-fg); font-size: var(--text-sm);
  }
  .alert::before { content: ""; width: 8px; height: 8px; margin-top: 0.45em; border-radius: 50%; background: var(--alert-icon); }
  .alert-success { --alert-bg: var(--color-success-soft); --alert-border: var(--color-success-border); --alert-icon: var(--color-success-solid); --alert-fg: var(--color-success-text); }
  .alert-warning { --alert-bg: var(--color-warning-soft); --alert-border: var(--color-warning-border); --alert-icon: var(--color-warning-solid); --alert-fg: var(--color-warning-text); }
  .alert-danger  { --alert-bg: var(--color-danger-soft);  --alert-border: var(--color-danger-border);  --alert-icon: var(--color-danger-solid);  --alert-fg: var(--color-danger-text); }
  .alert-info    { --alert-bg: var(--color-info-soft);    --alert-border: var(--color-info-border);    --alert-icon: var(--color-info-solid);    --alert-fg: var(--color-info-text); }

  /* ------------------------------------------------------- stats (KPIs) */
  /* A strip divided by rules, not a row of identical cards. */
  .stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
  .stat { display: grid; gap: var(--space-1); align-content: start; padding: var(--space-4) var(--space-5); border-left: 1px solid var(--color-border); border-top: 1px solid var(--color-border); margin: -1px 0 0 -1px; }
  .stat-label { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: var(--weight-medium); }
  .stat-value { font-size: var(--text-2xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); line-height: 1.1; font-variant-numeric: tabular-nums; }
  .stat-meta { font-size: var(--text-xs); color: var(--color-text-muted); }
  .meter { height: 4px; border-radius: var(--radius-full); background: var(--color-surface-sunken); overflow: hidden; margin-top: var(--space-1); }
  .meter > span { display: block; height: 100%; border-radius: inherit; background: var(--color-brand); width: var(--value, 0%); transition: width var(--duration-slow) var(--ease-out); }
  .meter-accent > span { background: var(--color-accent); }

  /* ---------------------------------------------------------- data lists */
  .list { list-style: none; padding: 0; display: grid; }
  .list-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border); min-width: 0; }
  .list-item:first-child { border-top: 0; }
  a.list-item { color: inherit; text-decoration: none; }
  a.list-item:hover { background: var(--color-surface-hover); }
  .list-item-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
  .list-item-title { font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .list-item-meta { font-size: var(--text-sm); color: var(--color-text-muted); }

  .meta { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-6); font-size: var(--text-sm); }
  .meta dt { color: var(--color-text-muted); }
  .meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
  @media (max-width: 640px) { .meta { grid-template-columns: 1fr; gap: 0; } .meta dd { margin-bottom: var(--space-2); } }

  .table-wrap { overflow-x: auto; }
  .table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
  .table th { text-align: left; font-weight: var(--weight-medium); color: var(--color-text-muted); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
  .table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); vertical-align: top; }
  .table tr:last-child td { border-bottom: 0; }
  .table .num { text-align: right; font-variant-numeric: tabular-nums; }

  /* ------------------------------------------------------------- misc */
  .avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-400); color: var(--navy-950); font-size: var(--text-sm); font-weight: var(--weight-bold); flex: none; }
  .empty { display: grid; justify-items: start; gap: var(--space-3); padding: var(--space-8) var(--space-6); text-align: left; }
  .empty h3 { font-size: var(--text-md); }
  .empty p { color: var(--color-text-muted); max-width: 52ch; }
  .divider { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text-subtle); font-size: var(--text-xs); }
  .divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--color-border); }
  .kbd { font-family: var(--font-mono); font-size: var(--text-xs); padding: 1px 6px; border: 1px solid var(--color-border-strong); border-bottom-width: 2px; border-radius: var(--radius-xs); }

  /* ------------------------------------------ run sheet (the day's route) */
  /* A timed sequence of stops joined by a gold line. Status per stop:
     data-status="done | overdue | scheduled | suggested". */
  .runsheet { list-style: none; padding: var(--space-2) 0; display: grid; }
  .runsheet-stop { display: grid; grid-template-columns: 64px 28px minmax(0, 1fr) auto; column-gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-3) var(--space-4); position: relative; }
  .runsheet-stop:hover { background: var(--color-surface-hover); }
  .runsheet-time { font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); font-size: var(--text-md); letter-spacing: var(--tracking-snug); padding-top: 1px; text-align: right; }
  .runsheet-node { position: relative; display: grid; justify-items: center; }
  .runsheet-node::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--color-accent); opacity: 0.55; }
  .runsheet-stop:first-child .runsheet-node::before { top: 12px; }
  .runsheet-stop:last-child .runsheet-node::before { bottom: calc(100% - 12px); }
  .runsheet-node > span { position: relative; margin-top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-surface); border: 2px solid var(--color-accent); box-shadow: 0 0 0 4px var(--color-surface); }
  .runsheet-stop[data-status="done"] .runsheet-node > span { background: var(--color-accent); }
  .runsheet-stop[data-status="done"] .runsheet-time, .runsheet-stop[data-status="done"] .runsheet-title { color: var(--color-text-muted); }
  .runsheet-stop[data-status="overdue"] .runsheet-node > span { border-color: var(--color-warning-solid); background: var(--color-warning-soft); }
  .runsheet-stop[data-status="next"] .runsheet-node > span, .runsheet-stop.is-next .runsheet-node > span { width: 18px; height: 18px; margin-top: 2px; border-width: 3px; border-color: var(--color-brand); }
  .runsheet-body { display: grid; gap: 2px; min-width: 0; padding-bottom: var(--space-1); }
  .runsheet-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: var(--weight-semibold); }
  .runsheet-body p { font-size: var(--text-sm); color: var(--color-text-muted); }
  .runsheet-actions { display: flex; gap: var(--space-2); align-items: start; }
  .runsheet details { grid-column: 3 / -1; margin-top: var(--space-2); }
  .runsheet summary { cursor: pointer; font-size: var(--text-sm); color: var(--color-brand-text); font-weight: var(--weight-medium); width: max-content; }
  .runsheet blockquote { margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--color-accent); background: var(--color-accent-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: var(--text-sm); }
  @media (max-width: 640px) {
    .runsheet-stop { grid-template-columns: 44px 22px minmax(0, 1fr); padding-right: var(--space-4); }
    .runsheet-time { font-size: var(--text-sm); }
    .runsheet-actions { grid-column: 3; margin-top: var(--space-2); }
    .runsheet details { grid-column: 3; }
  }

  /* --------------------------------------------------------- checklist */
  .checklist { list-style: none; padding: 0; display: grid; }
  .checklist li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border); }
  .checklist li:first-child { border-top: 0; }
  .checklist input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-brand); }
  .checklist label { display: grid; gap: 1px; cursor: pointer; }
  .checklist small { color: var(--color-text-muted); font-size: var(--text-sm); }
  .checklist input:checked + label { color: var(--color-text-muted); text-decoration: line-through; text-decoration-color: var(--color-border-strong); }

  /* ------------------------------------------------------------ chat */
  .chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: min(70dvh, 760px); }
  .chat-log { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); overflow-y: auto; }
  .chat-msg { display: grid; gap: var(--space-1); max-width: min(72ch, 92%); }
  .chat-msg-user { align-self: flex-end; }
  .chat-msg-user .chat-bubble { background: var(--color-emphasis); color: var(--color-on-emphasis); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg); }
  .chat-msg-assistant .chat-bubble { background: var(--color-surface-raised); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs); }
  .chat-bubble { padding: var(--space-3) var(--space-4); font-size: var(--text-base); display: grid; gap: var(--space-2); overflow-x: auto; }
  .chat-bubble :is(ul, ol) { padding-left: 1.2em; display: grid; gap: var(--space-1); }
  .chat-bubble table { border-collapse: collapse; font-size: var(--text-sm); }
  .chat-bubble th, .chat-bubble td { border-bottom: 1px solid var(--color-border); padding: var(--space-1) var(--space-2); text-align: left; }
  .chat-bubble blockquote { border-left: 3px solid var(--color-accent); padding-left: var(--space-3); color: var(--color-text-muted); }
  .chat-meta { font-size: var(--text-xs); color: var(--color-text-subtle); padding: 0 var(--space-1); }
  .chat-compose { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--color-border); background: var(--color-surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); align-items: end; }
  .chat-compose .textarea { min-height: 44px; max-height: 200px; resize: none; }
  .prompt-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .prompt-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); cursor: pointer; }
  .prompt-chip:hover { border-color: var(--color-brand-text); color: var(--color-brand-text); }

  /* ------------------------------------------------------ capture zone */
  .dropzone { position: relative; display: grid; justify-items: center; align-content: center; gap: var(--space-2); min-height: 240px; padding: var(--space-8) var(--space-6); text-align: center;
    border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-xl); background: var(--color-surface); cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out); }
  .dropzone:hover, .dropzone:focus-within { border-color: var(--color-brand-text); background: var(--color-brand-soft); }
  .dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .dropzone-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent-text); font-size: 22px; }
  .dropzone strong { font-size: var(--text-md); }
  .dropzone small { color: var(--color-text-muted); }
  .is-busy .dropzone { pointer-events: none; opacity: 0.7; }
  .is-busy .dropzone-icon { animation: scl-pulse 1.1s var(--ease-in-out) infinite; }
  @keyframes scl-pulse { 50% { opacity: 0.4; } }
}

/* ------------------------------------------------ walkthrough (Train me) */
@layer scl.components {
  .tour-target { position: relative; z-index: calc(var(--z-overlay) + 1); border-radius: var(--radius-lg);
    box-shadow: 0 0 0 3px var(--color-focus), 0 0 0 100vmax rgb(0 10 20 / 0.5); transition: box-shadow var(--duration-base) var(--ease-out); }
  .tour-card { position: fixed; z-index: calc(var(--z-overlay) + 2); width: min(360px, calc(100vw - 32px)); display: grid; gap: var(--space-2);
    padding: var(--space-4) var(--space-5); background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
  .tour-card.tour-sheet { left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; }
  .tour-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
  .tour-count { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: var(--weight-medium); }
  .tour-title { font-size: var(--text-md); }
  .tour-body { font-size: var(--text-sm); color: var(--color-text-muted); }
  .tour-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-1); }
}

/* --------------------------------------------- disclosure menu */
@layer scl.components {
  details.menu { position: relative; display: inline-block; }
  details.menu > summary { list-style: none; }
  details.menu > summary::-webkit-details-marker { display: none; }
  .menu-list { position: absolute; z-index: var(--z-overlay); top: calc(100% + 4px); left: 0; min-width: 190px; display: grid; padding: var(--space-1);
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
  .menu-list a { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; font-size: var(--text-sm); }
  .menu-list a:hover { background: var(--color-surface-hover); }
}

/* --------------------------------------------- style guide page helpers */
@layer scl.components {
  .swatch-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
  .swatch { aspect-ratio: 1.3; border-radius: var(--radius-sm); border: 1px solid rgb(0 0 0 / 0.06); display: grid; align-content: end; padding: 4px; font-size: 10px; font-variant-numeric: tabular-nums; }
  @media (max-width: 760px) { .swatch-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
  .token-row { display: grid; grid-template-columns: 220px 48px 1fr; gap: var(--space-3); align-items: center; font-size: var(--text-sm); }
  .token-chip { width: 48px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
}
