/* Semantic appearance overrides; generated prototype styles remain untouched. */
:root { color-scheme:light; }
/* Appearance maps the shared tokens; light palette and typography live in tokens.css. */
:root {
  --you:color-mix(in srgb,var(--blue) 4%,var(--white));
  --row-hover:color-mix(in srgb,var(--ink) 2.5%,var(--white));
  /* The one accent for form controls, progress and neutral tags: ink, in both themes. Blue stays for its
     status meanings (unread, info, the user's own row) and the landing, never as a control colour. */
  --control:var(--ink);
}
:root[data-theme="dark"] {
  --canvas:#0f1218; --faint:#7d8699;
  --you:color-mix(in srgb,var(--blue) 12%,var(--white));
  --row-hover:color-mix(in srgb,var(--ink) 4%,var(--white));
  color-scheme:dark;
  --white:#12151c; --fog:#1b202b; --ink:#edf0f7; --mute:#a5aec0;
  --line:#384255; --line-soft:#2a3242; --surface:#1b202b;
  --blue:#a7a5ff; --sky:#83b8ff; --green:#63d594; --warn:#e9be69; --crit:#ff9298;
  --grad:linear-gradient(135deg,#efb0ff 0%,#c1a2ff 45%,#a7a5ff 100%);
  --shadow:0 4px 12px rgba(0,0,0,.24);
  --soft:color-mix(in srgb,var(--blue) 9%,var(--white));
}
/* Appearance: a fieldset of three radios drawn as one segmented control (System · Light · Dark).
   The legend floats so it lays out as an ordinary flex item beside the segments. */
.theme-control { display:inline-flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; margin:0; padding:0; border:0; color:var(--mute,#6b6b6b); font:500 12px var(--font-b,system-ui,sans-serif); }
.theme-control > legend { float:left; margin:0; padding:0; }
.theme-seg { display:inline-flex; flex:none; padding:2px; border:1px solid var(--line,#e5e5e6); border-radius:8px; background:var(--fog,#f4f4f4); }
.theme-seg label { position:relative; display:block; cursor:pointer; }
.theme-seg input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.theme-seg span { display:block; padding:6px 9px; border-radius:6px; font:500 11.5px/1 var(--font-b,system-ui,sans-serif); color:var(--mute,#6b6b6b); white-space:nowrap; }
.theme-seg label:hover span { color:var(--ink,#131214); }
.theme-seg input:checked + span { background:var(--white,#fff); color:var(--ink,#131214); box-shadow:0 1px 2px rgb(0 0 0 / .08); }
@media (pointer:coarse) { .theme-seg span { display:flex; align-items:center; min-height:40px; } }
:root[data-theme="dark"] .btn:not(.ghost):not(.danger):not(.done),
:root[data-theme="dark"] .connect,
:root[data-theme="dark"] .wsteps li.done .n,
:root[data-theme="dark"] .skip-link,
:root[data-theme="dark"] .toast,
:root[data-theme="dark"] .toastbox .tst { background:var(--ink); color:var(--white); }
:root[data-theme="dark"] .btn:not(.ghost):not(.danger):hover { background:#d5dbea; }
:root[data-theme="dark"] .btn.done { color:var(--white) !important; }
:root[data-theme="dark"] .toastbox .tst svg { color:#166534; }
:root[data-theme="dark"] .badge { color:var(--white); }
:root[data-theme="dark"] .development-banner { background:#30291b; color:#f1ce86; border-color:#625136; }
:root[data-theme="dark"] .development-banner a { color:#c6c3ff; }
:root[data-theme="dark"] .btn.danger { color:var(--crit); border-color:#84505b; }
:root[data-theme="dark"] .btn.danger:hover { background:#3b232c; }
:root[data-theme="dark"] .field-row.accent,
:root[data-theme="dark"] .notification-row.accent,
:root[data-theme="dark"] table.data tr.rowlink:hover td { background:var(--soft); }
@media (min-width:561px) and (max-width:1439px) {
  :root[data-theme="dark"] table.data.gen-position-table :is(tr.rowlink:hover + tr.gen-row-actions-line,
    tr.gen-row-actions-line:hover, tr.rowlink:has(+ tr.gen-row-actions-line:hover)) > td { background:var(--soft); }
}
:root[data-theme="dark"] table.data tr.you td { background:color-mix(in srgb,var(--blue) 14%,var(--white)); }
@media (max-width:560px) {
  :root[data-theme="dark"] table.data.position-table tr.you { background:color-mix(in srgb,var(--blue) 14%,var(--white)); }
  :root[data-theme="dark"] table.data.position-table tr.you > td { background:none; }
}
/* Explore's card mode (validator-directory.css): the card carries the tint, not each cell. */
@container directory (max-width: 1149px) {
  :root[data-theme="dark"] table.data.validator-directory tr.you { background:color-mix(in srgb,var(--blue) 14%,var(--white)); }
  :root[data-theme="dark"] table.data.validator-directory tr.you > td { background:none; }
}
:root[data-theme="dark"] .field input::placeholder { color:var(--mute); }
:root[data-theme="dark"] textarea { color:var(--ink); }
/* The standalone wallet portal uses the same appearance preference and assets. */
.sandbox-portal .theme-control { float:right; margin-bottom:16px; }
:root[data-theme="dark"] .sandbox-portal { background:var(--white); color:var(--ink); }
:root[data-theme="dark"] .sandbox-portal a { color:var(--blue); }
:root[data-theme="dark"] .sandbox-portal section { border-color:var(--line); }
:root[data-theme="dark"] .sandbox-portal button { background:var(--ink); color:var(--white); }
@media (max-width:560px) {
  .theme-control { gap:6px; }
}
/* QR modules must keep a white quiet zone in either appearance. */
.auth-qr-code { display:block; background:#fff; padding:12px; border-radius:8px; max-width:100%; height:auto; }

/* Canonical logo: preserve its ratio and adapt to the selected app theme. */
.brand-logo { object-fit:contain; flex-shrink:0; }
html[data-theme="dark"] .brand-logo { filter:invert(1); }
/* The Token ring centres on the StakeGen cap band, the byline hangs below. In ems of the wordmark:
   Lineca's cap middle sits .6em under the line top, so a .96em mark starts .12em down. */
.public-brand { display:inline-flex; align-items:flex-start; gap:10px; }
.public-brand .brand-wordmark { color:var(--ink); font:inherit; margin:0; }
.public-brand .brand-logo { width:.831em; height:.96em; margin-top:.12em; }
