/* ==========================================================================
   wallets.canton.foundation — shared styles
   Canton theme matching the Internal Hub: light + dark, Canton Purple,
   Canton Yellow accents, IBM Plex Sans body, wide display headings.
   ========================================================================== */

/* ---- Design tokens: change colours/spacing here, not in rules below ---- */
:root {
  /* Dark theme (default) — colours taken from the Canton Internal Hub */
  --bg: #1f083d;            /* page background (under the wash) */
  --page-wash: linear-gradient(180deg, #270e4c 0, #1f083d 700px, #190332 100%);
  --bg-raised: #050227;     /* cards, toolbars, table header */
  --bg-sunken: #050227;     /* table body */
  --line: #634BA9;          /* card + panel borders (Canton purple stroke) */
  --line-soft: #1e1650;     /* row dividers inside cards and tables */
  --line-strong: #3d2e75;   /* chips, outlined buttons, inputs */
  --header-line: #1c1430;   /* header/footer rule, quieter than card borders */

  --text: #fffffc;          /* Canton White */
  --text-2: #d6d2e4;        /* secondary text */
  --muted: #8b8a99;         /* captions */
  --faint: #4a4467;

  --purple: #875CFF;        /* Canton Purple: primary buttons */
  --purple-text: #b9a2ff;   /* purple as text (focus ring) */
  --purple-tint: #16104a;   /* wallet monogram tile */
  --yellow: #F3FF97;        /* Canton Yellow: active nav, selected chips */
  --link: #F3FF97;          /* links: yellow on dark, like the Hub */
  --eyebrow: #b78ec7;       /* small uppercase section labels */

  /* Status colours: yellow in dark mode, purple in light (the Hub's accent swap) */
  --green: #F3FF97;         /* "attested" check colour (name kept for history) */
  --green-tint: rgba(243, 255, 151, 0.14);
  --green-edge: #F3FF97;    /* outline of the "evidence linked" check */
  --orange: #fda29b;        /* disputed */
  --orange-tint: rgba(253, 162, 155, 0.16);
  --shield-tint: rgba(135, 92, 255, 0.35);   /* verified */
  --mono-text: #F3FF97;     /* monogram + verified icon */

  --chip-text: #e6e1f2;
  --id-text: #6e6690;       /* feature ids under names */
  --nil: #4a4467;           /* "no claim" dash */
  --link-hover: #fbffd0;
  --purple-hover: #7449f5;
  --hover-border: #875CFF;
  --intro-border: #3d2e75;
  --pending-border: #3d2e75;
  --section-bg: #0b0636;    /* "Primary / Other features" rows */
  --row-hover: #0b0636;
  --accent-border: #634BA9; /* "Tested this wallet yourself?" panel */
  --accent-bg: #0b0636;
  --header-bg: rgba(9, 4, 16, 0.94);
  --divider: #3a2d5c;
  color-scheme: dark;       /* native scrollbars, selects */

  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 14px;         /* cards, like the Hub */
  --max: 1240px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Krona One", "IBM Plex Sans", sans-serif;   /* wide headings + big numbers */
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--page-wash);
  background-repeat: no-repeat;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--purple-text); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.wrap--wide { max-width: 1360px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

/* ---- Header / nav ---- */
.site-header { border-bottom: 1px solid var(--header-line); background: var(--header-bg); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
/* Logo | divider | title, same arrangement as the SV Calendar header */
.brand { gap: 18px; min-width: 0; }
.brand-logo { height: 40px; width: auto; display: block; flex: 0 0 auto; }
.brand-divider { width: 1px; align-self: stretch; min-height: 36px; background: var(--divider); flex: 0 0 auto; }
.brand-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; }
@media (max-width: 640px) {
  .brand-logo { height: 32px; }
  .brand-divider { display: none; }
  .brand-title { font-size: 16px; }
}
.nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 15px; border-radius: 999px; color: var(--text); }
.nav a:hover { background: var(--line-soft); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"], .nav a[aria-current="page"]:hover { background: var(--yellow); color: #030206; }

/* ---- Buttons & chips ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--hover-border); text-decoration: none; color: var(--text); }
.btn--primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-hover); color: #fff; }
.btn--accent { background: var(--yellow); border-color: var(--yellow); color: #030206; }
.btn--accent:hover { background: #e9f57f; border-color: #e9f57f; color: #030206; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button, .chip {
  min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chip { border-radius: 999px; font-weight: 500; }
.seg button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #030206; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--chip-text); font-size: 12px; }

/* ---- Form fields ---- */
.field { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); background: var(--bg); }
.field input, .field select { flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 14px; outline: none; }
.field select option { background: var(--bg-raised); }
.field:focus-within { border-color: var(--purple-text); }
.field-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

/* ---- Hero ---- */
.hero { padding: 64px 0 36px; }
.hero h1 { margin: 0 0 18px; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -0.01em; max-width: 860px; }
.hero p { margin: 0; font-size: 18px; color: var(--text-2); max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pill-intro { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; margin-bottom: 20px; border: 1px solid var(--intro-border); border-radius: 999px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--eyebrow); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }

/* Stats strip: one bordered band split by 1px gaps */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; margin-top: 44px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat { background: var(--bg-raised); padding: 18px 22px; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; }
.stat span { display: block; margin-top: 6px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.stat .is-green { color: var(--green); }
.stat .is-purple { color: var(--purple-text); }

/* ---- Directory toolbar ---- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); }
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.toolbar .field { flex: 1 1 220px; }
.result-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 14px 4px 18px; font-size: 13px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--purple-text); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }

/* ---- Wallet cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; padding-bottom: 64px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-raised); }
.card:hover { border-color: var(--hover-border); }
.card-head { display: flex; align-items: center; gap: 12px; }
.mono-tile { flex: none; width: 44px; height: 44px; border-radius: 11px; background: var(--purple-tint); color: var(--mono-text); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 13px; }
/* Wallet logos in the tile (LOGOS in app.js): marks sit inset; "fill" logos
   are app icons clipped to the tile's corners; on-dark/on-light swap by theme */
.mono-tile img { display: block; width: 62%; height: 62%; object-fit: contain; }
.mono-tile--fill { overflow: hidden; }
.mono-tile--fill img { width: 100%; height: 100%; }
.mono-tile .on-light, :root[data-theme="light"] .mono-tile .on-dark { display: none; }
:root[data-theme="light"] .mono-tile .on-light { display: block; }
.card h2 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.25; }
.card h2 a { color: var(--text); }
.domain { font-size: 12px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.form-line { font-size: 13px; color: var(--muted); }
.keylist { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.keylist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--chip-text); }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.card-foot strong { color: var(--text); font-weight: 600; }
.empty { grid-column: 1 / -1; padding: 40px; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); text-align: center; color: var(--text-2); }

/* Small inline status words used on cards */
.st-yes { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 500; }
.st-no { color: var(--muted); }
.st-verified { display: inline-flex; align-items: center; gap: 6px; color: var(--mono-text); font-weight: 500; }
.st-none { color: var(--faint); }

/* ---- "How it works" band ---- */
.band { border-top: 1px solid var(--header-line); background: transparent; padding: 60px 0; }
.band h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.band > .wrap > p { margin: 0 0 30px; color: var(--text-2); max-width: 640px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.steps li { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-raised); }
.steps .step-n { font-family: var(--mono); font-size: 13px; }
.steps h3 { margin: 10px 0 8px; font-size: 18px; }
.steps p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* ---- Page header (matrix / profile) ---- */
.page-head { padding: 22px 0 22px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.01em; line-height: 1.15; }
.page-head p { margin: 0; color: var(--text-2); max-width: 640px; }

/* ---- Legend ---- */
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--bg-raised); font-size: 13px; color: var(--chip-text); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Status badges (matrix cells + legend) ---- */
.badge { width: 30px; height: 30px; border-radius: var(--radius-s); display: inline-flex; align-items: center; justify-content: center; }
.badge--sm { width: 22px; height: 22px; border-radius: 6px; }
.badge--proof { border: 1.5px solid var(--green-edge); color: var(--green); }     /* evidence linked: the stronger mark */
.badge--attested { background: var(--green-tint); color: var(--green); }         /* claim only: quieter */
.badge--verified { background: var(--shield-tint); color: var(--mono-text); }
.badge--disputed { background: var(--orange-tint); color: var(--orange); }
a.badge:hover { filter: brightness(1.3); text-decoration: none; }
.cell-stack { display: inline-flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; }
.unsup { white-space: nowrap; font-size: 12px; color: var(--muted); border-bottom: 1px dotted var(--id-text); }
.unsup:hover, .unsup:focus-visible { color: var(--text); text-decoration: none; border-bottom-style: solid; }
.reason-tip { position: fixed; z-index: 60; max-width: 300px; padding: 12px 14px; border-radius: var(--radius-m); background: var(--bg-raised); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font-size: 13px; line-height: 1.5; color: var(--text-2); pointer-events: none; }
.reason-tip strong { display: block; margin-bottom: 4px; color: var(--text); font-weight: 600; }
.reason-tip span { display: block; margin-top: 8px; font-size: 12px; color: var(--purple-text); }
.nil { color: var(--nil); }

/* ---- Matrix table ---- */
.matrix-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 16px; }
/* position: relative keeps the hidden screen-reader text inside the box,
   so it can't stretch the page sideways on phones */
.table-box { position: relative; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-sunken); margin-bottom: 18px; }
/* Narrow screens only: scroll sideways inside the box (height still grows with the table). */
.table-box.is-scroll { overflow-x: auto; }
/* Round the header's top corners now that the box no longer clips them. */
.matrix thead th:first-child { border-top-left-radius: var(--radius-l); }
.matrix thead th:last-child { border-top-right-radius: var(--radius-l); }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line-soft); }
.matrix thead th { position: sticky; top: var(--header-h, 0px); z-index: 3; background: var(--bg-raised); padding: 14px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: bottom; min-width: 96px; }
.matrix thead th.feat-col { left: 0; z-index: 4; text-align: left; padding-left: 20px; min-width: 230px; color: var(--muted); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }
.matrix .wallet-head { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text); text-align: center; }
.matrix .wallet-head:hover { text-decoration: none; }
.matrix .wallet-head .mono-tile { width: 36px; height: 36px; font-size: 13px; border-radius: 10px; }
.matrix .wallet-head b { font-size: 13px; line-height: 1.25; font-weight: 600; }
.matrix .wallet-head small { font-size: 11px; color: var(--muted); font-weight: 400; }
.matrix tbody th[scope="row"] { position: sticky; left: 0; z-index: 2; background: var(--bg-sunken); text-align: left; font-weight: 500; padding: 13px 20px; min-width: 230px; max-width: 280px; }
.matrix .feat-id { font-family: var(--mono); font-size: 11px; color: var(--id-text); margin-top: 2px; font-weight: 400; }
.matrix td { text-align: center; padding: 9px 6px; border-left: 1px solid var(--line-soft); }
.matrix td.text-cell { text-align: left; font-size: 12px; color: var(--text-2); line-height: 1.45; min-width: 96px; overflow-wrap: anywhere; }
.matrix .cat-row th { position: sticky; left: 0; background: var(--bg-sunken); text-align: left; padding: 20px 20px 8px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; color: var(--eyebrow); border-bottom: 1px solid var(--line-soft); }
.matrix .section-row th { background: var(--section-bg); text-align: left; padding: 14px 20px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--line); position: sticky; left: 0; }
.matrix tbody tr:hover td, .matrix tbody tr:hover th[scope="row"] { background: var(--row-hover); }
.note { font-size: 13px; color: var(--muted); margin: 0 4px 56px; }

/* ---- Profile ---- */
/* "Back to directory" link at the top-left of the matrix and wallet pages */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.back-link:hover { color: var(--text); border-color: var(--hover-border); text-decoration: none; }
.profile-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 22px; margin-top: 22px; }
.profile-id { display: flex; gap: 18px; align-items: center; }
.profile-id .mono-tile { width: 68px; height: 68px; border-radius: 18px; font-size: 22px; }
.profile-id h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.01em; line-height: 1.15; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.profile-tags { margin-top: 18px; }
.profile-stats { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.profile-stats div { padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); }
.profile-stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; }
.profile-stats span { display: block; margin-top: 6px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.profile-body { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; padding: 36px 0 64px; }
.profile-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.profile-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.group-title { margin: 0 0 10px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; color: var(--eyebrow); }
.feature-list { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); overflow: hidden; }
.feature-row { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.feature-row:last-child { border-bottom: 0; }
.feature-row { scroll-margin-top: calc(var(--header-h, 70px) + 16px); }
.feature-row.is-target { background: var(--row-hover); box-shadow: inset 3px 0 0 var(--purple); }
.feature-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.feature-top .name { font-weight: 600; font-size: 15px; }
.feature-top .fid { font-family: var(--mono); font-size: 11px; color: var(--id-text); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill--proof, .pill--attested { background: var(--green-tint); color: var(--green); }
.pill--unsupported { background: var(--line-soft); color: var(--chip-text); }
.pill--none { color: var(--faint); font-weight: 500; }
.pill--pending { border: 1px dashed var(--pending-border); color: var(--muted); font-weight: 500; }
.pill--verified { background: var(--shield-tint); color: var(--mono-text); }
.pill--disputed { background: var(--orange-tint); color: var(--orange); }
.reason { margin: 0; font-size: 14px; color: var(--text-2); }
.text-val { margin: 0; font-size: 14px; color: var(--text); }
.row-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
details.test summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.test p { margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); }
.panel h2 { margin: 0 0 12px; font-size: 15px; }
.panel--accent { border-color: var(--accent-border); background: var(--accent-bg); }
.panel p { margin: 0 0 16px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.panel dl { margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.panel dt { color: var(--muted); margin-bottom: 3px; }
.panel dd { margin: 0; line-height: 1.55; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.compare-form { display: flex; flex-direction: column; gap: 10px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--header-line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 26px; padding-bottom: 26px; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; }

/* ---- Loading / error ---- */
.state-msg { padding: 60px 0; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Skip link: hidden until focused with the keyboard */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--purple); color: #fff; }
.skip:focus { left: 8px; }

/* ---- Light theme ----------------------------------------------------------
   Turned on by <html data-theme="light"> (set by the header toggle and
   remembered in localStorage). Only tokens change; every rule above reads
   them, so nothing else needs a light-specific version.
   Text colours are picked to pass 4.5:1 on white.                          */
:root[data-theme="light"] {
  /* Light theme — colours taken from the Canton Internal Hub */
  --bg: #f2effb;
  --page-wash: linear-gradient(180deg, #ede7fb 0, #f2effb 700px, #f7f5fb 100%);
  --bg-raised: #ffffff;
  --bg-sunken: #ffffff;
  --line: #634BA9;
  --line-soft: #e6e0f5;
  --line-strong: #a193cb;
  --header-line: #e4def3;

  --text: #1b1340;
  --text-2: #3d355e;
  --muted: #6f6786;         /* 5:1 on white */
  --faint: #9b94b0;

  --purple: #875CFF;
  --purple-text: #6941c6;
  --purple-tint: #efe9fd;
  --yellow: #F3FF97;
  --link: #6941c6;
  --eyebrow: #a860c2;

  --green: #6941c6;
  --green-tint: #ece4ff;
  --green-edge: #6941c6;
  --orange: #b42318;
  --orange-tint: #fde7e5;
  --shield-tint: #875CFF;
  --mono-text: #6941c6;

  --chip-text: #1b1340;
  --id-text: #7d7692;
  --nil: #b3adc4;
  --link-hover: #4a26c0;
  --purple-hover: #7449f5;
  --hover-border: #6941c6;
  --intro-border: #a193cb;
  --pending-border: #a193cb;
  --section-bg: #f5f1fd;
  --row-hover: #f7f4ff;
  --accent-border: #634BA9;
  --accent-bg: #f5f1fd;
  --header-bg: rgba(253, 252, 252, 0.94);
  --divider: #d7cdf0;
  color-scheme: light;
}
/* In light mode the verified shield sits on solid purple, so draw it white. */
:root[data-theme="light"] .badge--verified, :root[data-theme="light"] .pill--verified { color: #ffffff; }

/* ---- Theme toggle button (in the header nav) ---- */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--text); background: transparent; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; }
.theme-toggle:hover { color: var(--text); background: var(--line-soft); }
