@layer pages {
  .verify-banner { padding: var(--s-3) var(--gutter) 0; max-width: var(--content-max); margin: 0 auto; width: 100%; } .dev-box { margin-top: var(--s-3); }
  .nav-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: linear-gradient(90deg, transparent, var(--glas), var(--series-1), transparent); background-size: 40% 100%; background-repeat: no-repeat; opacity: 0; pointer-events: none; transition: opacity var(--t-fast); }
  .nav-progress.on { opacity: 1; animation: nav-slide 1.1s var(--ease-in-out) infinite; }
  @keyframes nav-slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
  .skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-fg); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
  .skip-link:focus { top: 8px; }
  .mobile-brand { display: none; } @media (max-width: 900px) { .mobile-brand { display: flex; padding: 0; } }

  /* ---------- intro ---------- */
  #db-intro { position: fixed; inset: 0; z-index: 9999; background: var(--bg); overflow: hidden; transition: opacity 0.7s ease; --ink: var(--navy); --tint: oklch(0.93 0.02 255); }
  :root[data-theme='dark'] #db-intro { --ink: oklch(0.93 0.02 255); --tint: oklch(0.26 0.05 262); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme='light']) #db-intro { --ink: oklch(0.93 0.02 255); --tint: oklch(0.26 0.05 262); } }
  #db-intro.is-done { opacity: 0; pointer-events: none; }
  #db-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  #db-skip { position: absolute; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--ink); background: none; border: 1px solid color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 999px; padding: 8px 14px; cursor: pointer; opacity: 0; transition: opacity 0.5s ease; }
  #db-skip.is-visible { opacity: 0.7; } #db-skip:hover { opacity: 1; } #db-skip:focus-visible { opacity: 1; box-shadow: var(--focus); }
  #db-world path { fill: none; stroke: var(--ink); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 1; }
  #db-world rect.win { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linejoin: round; opacity: 0; }
  #db-world #w-door rect { fill: var(--ink); stroke: none; } #db-world #w-door circle { fill: var(--bg); }
  #db-intro .ic { fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
  #db-intro .lens-ring { fill: none; stroke: var(--ink); stroke-linecap: round; }
  #db-intro .lens-bg { fill: var(--bg); } #db-intro .iris { fill: var(--tint); } #db-intro .lens-tint { fill: var(--ink); opacity: 0.035; }
  #db-intro .glint { fill: none; stroke: var(--bg); stroke-width: 9; stroke-linecap: round; opacity: 0.65; }
  #db-intro .streak { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; } #db-intro .wave { fill: none; stroke: var(--ink); stroke-width: 2.5; }
  #db-title .f { fill: var(--ink); } #db-intro .top-stroke { stroke: var(--bg); fill: none; }

  /* ---------- auth (login, sign-up, reset) ---------- */
  .auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
  .auth-visual { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, oklch(0.34 0.11 262) 0%, var(--navy-deep) 55%, oklch(0.16 0.05 262) 100%); color: oklch(0.96 0.02 255); display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(20px, 3vw, 36px); padding: clamp(24px, 4vw, 56px); }
  .auth-visual .intro-text { position: relative; z-index: 1; max-width: 46ch; }
  .auth-visual .intro-text::before { content: ''; position: absolute; inset: -40px -60px -40px -60px; background: radial-gradient(60% 70% at 30% 40%, oklch(0.2 0.07 262 / 0.9), transparent 75%); z-index: -1; pointer-events: none; }
  .auth-visual .caption { position: relative; margin-top: auto; opacity: 0.6; font-size: var(--fs-xs); }
  .auth-visual::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(oklch(1 0 0 / 0.045) 1px, transparent 1px), linear-gradient(90deg, oklch(1 0 0 / 0.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%); }
  .auth-visual .brand { color: inherit; position: relative; }
  .auth-visual h2 { position: relative; font-size: clamp(1.7rem, 1rem + 2vw, 2.6rem); max-width: 16ch; font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; }
  .auth-visual p { position: relative; margin-top: 12px; max-width: 42ch; color: oklch(0.85 0.03 255); font-size: var(--fs-base); }
  .auth-visual .claims { position: relative; display: grid; gap: 8px; font-size: var(--fs-sm); color: oklch(0.86 0.03 255); }
  .auth-visual .claims div { display: flex; gap: 10px; align-items: center; } .auth-visual .claims svg { width: 16px; height: 16px; stroke: var(--glas); fill: none; stroke-width: 2.4; stroke-linecap: round; flex: none; }
  /* The login's magnifier: ONE element (glass + ring + handle in one SVG frame) moved by transform only — no layout, no animated custom
     properties — so ring and handle can never drift apart and the page stays smooth. The sharp copy of the figures sits inside the glass
     and is moved the opposite way, which keeps it aligned with the blurred field behind. */
  .lens-field { position: absolute; inset: 0; pointer-events: none; }
  .lens-field .glyphs { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); align-content: end; gap: 22px 12px; padding: 8% 6% 10%; font-variant-numeric: tabular-nums; font-size: 0.8125rem; font-weight: 600; color: oklch(0.78 0.03 255); }
  .lens-field .glyphs.soft { filter: blur(2.6px); opacity: 0.45; }
  .lens-field .glyphs span { white-space: nowrap; } .lens-field .glyphs span::after { content: attr(data-v); display: block; font-size: 1.0625rem; color: oklch(0.95 0.02 255); font-weight: 800; }
  .lens-field .lens { position: absolute; left: 0; top: 0; width: var(--lr, 260px); height: var(--lr, 260px); will-change: transform; transition: transform 1.6s var(--ease-in-out); }
  .lens-field .glass { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: oklch(0.2 0.07 262); box-shadow: inset 0 0 40px oklch(1 0 0 / 0.07); }
  .lens-field .glass::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(60% 60% at 35% 30%, oklch(1 0 0 / 0.12), transparent 60%); }
  .lens-field .glass .glyphs { position: absolute; left: 0; top: 0; will-change: transform; transition: transform 1.6s var(--ease-in-out); width: auto; height: auto; }
  .lens-field .frame { position: absolute; left: 0; top: 0; width: 138%; height: 138%; max-width: none; overflow: visible; }
  @media (prefers-reduced-motion: reduce) { .lens-field .lens, .lens-field .glass .glyphs { transition: none; } }
  .auth-side { display: flex; flex-direction: column; min-height: 100dvh; }
  .auth-side .public-top { max-width: none; }
  .auth-main { flex: 1; display: grid; place-items: center; padding: clamp(16px, 3vw, 40px); }
  .auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(22px, 3vw, 36px); box-shadow: var(--sh-3); }
  .auth-card h1 { font-size: var(--fs-xl); margin-bottom: 4px; }
  .auth-card .lead { color: var(--text-2); font-size: var(--fs-sm); margin-bottom: var(--s-5); }
  .auth-card form { display: grid; gap: 14px; }
  .auth-card .links { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); flex-wrap: wrap; margin-top: 4px; }
  .auth-card .mark { margin-bottom: 14px; color: var(--primary); }
  .auth-foot { padding: 14px; text-align: center; font-size: var(--fs-xs); color: var(--text-3); display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
  .auth-foot a { color: inherit; }
  @media (max-width: 960px) { .auth { grid-template-columns: 1fr; } .auth-visual { display: none; } }
  .celebrate { text-align: center; padding: var(--s-5) 0; }
  .celebrate .big { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--primary); }
  .celebrate .big small { display: block; font-size: var(--fs-sm); letter-spacing: 0; color: var(--text-3); font-weight: 600; margin-top: 6px; }
  .confetti { position: relative; height: 0; } .confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; left: 50%; top: 0; animation: conf 1.6s var(--ease-out) forwards; background: var(--glas); }
  .confetti i:nth-child(2n) { background: var(--good); } .confetti i:nth-child(3n) { background: var(--warn); } .confetti i:nth-child(5n) { background: var(--series-1); }
  @keyframes conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }

  /* ---------- search ---------- */
  .search-hero { padding: clamp(32px, 6vw, 72px) 0 var(--s-5); text-align: center; }
  .search-hero h1 { font-size: var(--fs-3xl); }
  .search-hero p { color: var(--text-2); margin-top: 10px; max-width: 54ch; margin-inline: auto; }
  .sbox { position: relative; max-width: 680px; margin: var(--s-5) auto 0; }
  .sbox .input { padding-left: 50px; min-height: 58px; font-size: var(--fs-md); border-radius: 16px; box-shadow: var(--sh-2); }
  .sbox > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; stroke: var(--text-3); fill: none; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
  .sbox.busy > svg { animation: lens-pulse 1s ease-in-out infinite; }
  @keyframes lens-pulse { 50% { transform: translateY(-50%) scale(1.15); stroke: var(--glas-ink); } }
  .results { max-width: 680px; margin: var(--s-4) auto 0; display: grid; gap: 8px; }
  .hit { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); view-transition-name: var(--vt); }
  .hit:hover, .hit:focus-visible { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: color-mix(in oklab, var(--glas) 55%, var(--border)); }
  .hit b { font-size: var(--fs-base); display: block; } .hit .meta { font-size: var(--fs-xs); color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
  .hit .meta span + span::before { content: '·'; margin-right: 8px; color: var(--border-strong); }
  .hit .go { color: var(--text-3); } .hit:hover .go { color: var(--glas-ink); }
  .recent { max-width: 680px; margin: var(--s-5) auto 0; }
  .recent .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
  .chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); background: var(--surface); transition: background var(--t-fast), border-color var(--t-fast); }
  .chip:hover { background: var(--surface-2); border-color: var(--glas); }

  /* ---------- offer ---------- */
  .offer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: var(--s-5); align-items: start; }
  @media (max-width: 860px) { .offer-grid { grid-template-columns: minmax(0, 1fr); } }
  .company-head { display: grid; gap: 6px; margin: var(--s-5) 0; }
  .company-head h1 { font-size: var(--fs-2xl); }
  .company-head .meta { color: var(--text-3); font-size: var(--fs-sm); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .module-list { display: grid; gap: 8px; }
  .module { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color var(--t), background var(--t); }
  .module:has(input:checked) { border-color: color-mix(in oklab, var(--glas) 60%, var(--border)); background: color-mix(in oklab, var(--glas) 6%, var(--surface)); }
  .module:has(input:focus-visible) { box-shadow: var(--focus); }
  .module input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
  .module input:disabled { opacity: 0.9; }
  .module b { font-size: var(--fs-base); } .module .desc { color: var(--text-2); font-size: var(--fs-sm); grid-column: 2; }
  .module .price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--fs-sm); color: var(--text-2); }
  .module .note { grid-column: 2 / -1; margin-top: 6px; }
  .module.base { background: var(--surface-2); } .module.base .price { color: var(--text-3); }
  .quote { position: sticky; top: calc(var(--topbar-h) + 12px); }
  .quote .total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-lg); font-weight: 800; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 12px; }
  .quote .lines { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
  .quote .lines div { display: flex; justify-content: space-between; gap: 12px; }
  .quote .balance { margin-top: 14px; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--text-2); padding: 12px; border-radius: 12px; background: var(--surface-2); }
  .quote .balance b { font-variant-numeric: tabular-nums; }
  .presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-4); }
  .presets .btn[aria-pressed='true'] { background: var(--primary); color: var(--primary-fg); border-color: transparent; }

  /* ---------- confirm & wait ---------- */
  .summary { display: grid; gap: 10px; }
  .summary .row-kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
  .summary .row-kv span:first-child { color: var(--text-3); }
  .wait { text-align: center; padding: var(--s-7) 0 var(--s-5); display: grid; justify-items: center; gap: var(--s-4); }
  .wait h1 { font-size: var(--fs-2xl); }
  .wait .steps { display: grid; gap: 8px; width: min(440px, 100%); text-align: left; margin-top: var(--s-3); }
  .wait .step { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); }
  .wait .step i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); flex: none; }
  .wait .step.on { color: var(--text); border-color: color-mix(in oklab, var(--glas) 60%, var(--border)); } .wait .step.on i { background: var(--glas); animation: pulse 2s infinite; }
  .wait .step.done { color: var(--text-2); } .wait .step.done i { background: var(--good); }
  .wait .elapsed { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: var(--fs-sm); }

  /* ---------- dossier ---------- */
  .dossier-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: var(--s-4); font-size: var(--fs-sm); color: var(--text-3); }
  .dossier-top .sp { flex: 1; }
  .hero { padding: var(--s-6) 0 var(--s-4); text-align: center; }
  .hero .meta { color: var(--text-3); font-size: var(--fs-sm); display: flex; gap: 8px 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
  .hero .meta .stand { color: var(--text); font-weight: 800; }
  .hero h1 { font-size: var(--fs-3xl); margin: 6px auto 0; max-width: 24ch; overflow-wrap: anywhere; }
  .hero .legal { color: var(--text-2); font-size: var(--fs-sm); margin-top: 6px; }
  .gauge-box { position: relative; width: min(340px, 86%); margin: var(--s-5) auto 0; }
  .gauge-box svg { width: 100%; overflow: visible; }
  .gauge-box .garc { transition: stroke-dashoffset 1.6s var(--ease) 0.35s; }
  .gauge-box.go .garc { stroke-dashoffset: var(--to); }
  .gauge-box .gdot { opacity: 0; transition: opacity 0.4s 1.6s; } .gauge-box.go .gdot { opacity: 1; }
  .gnum { position: absolute; left: 0; right: 0; bottom: 10px; display: grid; justify-items: center; gap: 2px; }
  .gnum .v { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.04em; line-height: 1; filter: blur(6px); transition: filter 1.2s var(--ease) 0.6s; }
  .gauge-box.go .gnum .v { filter: blur(0); }
  .gnum .g { font-size: var(--fs-sm); font-weight: 700; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
  .gnum .g b { font-size: var(--fs-md); color: var(--text); background: var(--surface-2); padding: 0 8px; border-radius: 6px; }
  .hero .pill.hl { margin-top: 18px; font-size: var(--fs-sm); padding: 6px 14px; }
  .hero .lead { max-width: 58ch; margin: 14px auto 0; color: var(--text-2); font-size: var(--fs-md); }
  .hero .hint { margin-top: var(--s-5); color: var(--text-3); font-size: var(--fs-xs); display: inline-flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
  .hero .hint svg { width: 18px; height: 18px; stroke: var(--glas-ink); fill: none; stroke-width: 2.2; stroke-linecap: round; animation: bob 1.8s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(5px); } }
  .chapter-nav { position: sticky; top: var(--topbar-h); z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; margin: var(--s-3) 0 0; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .chapter-nav::-webkit-scrollbar { display: none; }
  .chapter-nav a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); text-decoration: none; }
  .chapter-nav a:hover { background: var(--surface-2); color: var(--text); }
  .chapter-nav a.on { background: var(--primary); color: var(--primary-fg); }
  @media (max-width: 900px) { .chapter-nav { top: var(--topbar-h); } }
  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
  .kpi .l { color: var(--text-3); font-size: var(--fs-sm); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
  .kpi .v { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 2px; }
  .kpi .v.na { color: var(--text-3); font-size: var(--fs-md); font-weight: 600; }
  .kpi .d { font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); display: inline-flex; gap: 4px; align-items: center; }
  .kpi .d.up { background: var(--good-bg); color: var(--good-fg); } .kpi .d.down { background: var(--crit-bg); color: var(--crit-fg); }
  .kpi .spark { width: 100%; height: 46px; margin-top: 12px; overflow: visible; }
  .spark .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease) 0.2s; } .spark .draw.go { stroke-dashoffset: 0; }
  .kpi .why { font-size: var(--fs-xs); color: var(--text-3); margin-top: 8px; }
  .two { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; } .two.why { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } @media (max-width: 960px) { .two, .two.why { grid-template-columns: minmax(0, 1fr); } }
  .card-head > .row { min-width: 0; max-width: 100%; } .card-head .tabs { flex: 0 1 auto; min-width: 0; }
  .chart { position: relative; margin-top: 12px; }
  .chart svg.bars { width: 100%; overflow: visible; display: block; }
  .bars .gl { stroke: var(--grid); stroke-width: 1; } .bars .base { stroke: var(--text-3); stroke-width: 1; opacity: 0.6; }
  .bars .ax { fill: var(--text-3); font-size: 0.7188rem; font-weight: 600; } .bars .val { fill: var(--text-2); font-size: 0.7188rem; font-weight: 800; }
  .bars .bar { transform-box: fill-box; transform: scaleY(0); transition: transform 0.8s var(--ease), opacity 0.2s; }
  .bars .bar.pos { transform-origin: bottom; } .bars .bar.neg { transform-origin: top; }
  .bars.go .bar { transform: scaleY(1); transition-delay: calc(var(--i) * 80ms); }
  .bars .col.dim .bar { opacity: 0.4; } .bars .col:focus { outline: none; } .bars .col:focus-visible .hit { stroke: var(--ring); stroke-width: 2; fill: color-mix(in oklab, var(--ring) 8%, transparent); }
  .bars .hit { fill: transparent; cursor: crosshair; } .bars .col:hover .hit { fill: color-mix(in oklab, var(--text) 4%, transparent); }
  .bars .gap { fill: none; stroke: var(--border-strong); stroke-dasharray: 3 3; } .bars .gapt { fill: var(--text-3); font-size: 0.75rem; font-weight: 800; }
  .tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: 0.75rem; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; white-space: nowrap; z-index: 3; box-shadow: var(--sh-3); display: grid; }
  .tip.on { opacity: 1; transform: none; } .tip b { font-size: 0.875rem; } .tip small { opacity: 0.8; font-weight: 500; }
  .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; margin-top: 8px; }
  .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
  .cbar { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin: 6px 0 4px; }
  .cbar i { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, var(--series-1), var(--glas)); transition: width 1.1s var(--ease) 0.2s; }
  .in .cbar i, .go .cbar i { width: var(--w); }
  .crit-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
  .crit-row:first-child { border-top: 0; }
  .crit-row b { font-size: var(--fs-sm); } .crit-row .cv { font-variant-numeric: tabular-nums; font-weight: 800; font-size: var(--fs-sm); }
  .crit-row .cbar { grid-column: 1 / -1; } .crit-row .q { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-3); }
  .ah .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 0.75rem; font-weight: 800; background: var(--surface-2); color: var(--text-2); }
  .ah .dot.p { background: var(--good-bg); color: var(--good-fg); } .ah .dot.n { background: var(--crit-bg); color: var(--crit-fg); } .ah .dot.m { background: var(--warn-bg); color: var(--warn-fg); }
  .ah .cv { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 700; font-size: var(--fs-xs); }
  .ab .body p + p { margin-top: 8px; }
  .ab .body .src { margin-top: 10px; font-size: var(--fs-xs); color: var(--text-3); }
  .kv-table { width: 100%; font-size: var(--fs-sm); }
  .kv-table th { text-align: left; color: var(--text-3); font-weight: 700; padding: 9px 10px 9px 0; width: 32%; vertical-align: top; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
  .kv-table td { padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
  .kv-table td .lens-btn { margin-left: 6px; }
  .kv-table .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .kv-table .clamp.open { display: block; }
  @container (max-width: 480px) { .kv-table th { display: block; width: auto; border: 0; padding: 10px 0 0; } .kv-table td { display: block; padding: 2px 0 10px; } }
  .table.fin th { white-space: normal; } .table.fin td, .table.fin th { padding: 9px 8px; }
  .persons { display: grid; gap: 6px; }
  .person { display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
  .person .av { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: var(--text-2); border: 1px solid var(--border); grid-row: span 2; }
  .person b { font-size: var(--fs-sm); } .person .role { font-size: var(--fs-xs); color: var(--text-2); font-weight: 700; } .person .rep { font-size: var(--fs-xs); color: var(--text-3); grid-column: 2; }
  .role-grp { margin-top: 12px; } .role-grp h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
  .role-grp h4 span { background: var(--surface-2); padding: 1px 7px; border-radius: 6px; }
  .timeline { position: relative; display: grid; gap: 10px; padding-left: 22px; }
  .timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); border-radius: 2px; }
  .tl { position: relative; font-size: var(--fs-sm); }
  .tl::before { content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--glas); }
  .tl .d { color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; } .tl .t { color: var(--text-2); }
  .avail { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
  .avail.available { background: var(--good-bg); color: var(--good-fg); } .avail.chargeable { background: var(--warn-bg); color: var(--warn-fg); } .avail.exempt { background: var(--info-bg); color: var(--info-fg); } .avail.not_present { color: var(--text-3); }
  .group-chain { display: flex; flex-direction: column; gap: 6px; }
  .group-chain .lvl-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
  .group-chain .lvl-row .lv { font-size: var(--fs-xs); font-weight: 800; color: var(--text-3); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
  .group-chain .arrow { text-align: center; color: var(--text-3); font-size: 0.75rem; line-height: 1; }
  .src-list { display: grid; gap: 8px; }
  .src { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: var(--fs-sm); }
  @container (max-width: 440px) { .src { grid-template-columns: auto 1fr; } .src > .nowrap { grid-column: 2; white-space: normal; } }
  .src .k { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; color: var(--text-2); } .src .k svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
  .match-box { display: flex; gap: 14px; align-items: center; }
  .match-box .pct { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.03em; }
  .dossier-foot { margin-top: var(--s-7); text-align: center; color: var(--text-3); font-size: var(--fs-xs); }

  /* ---------- lists / credits / profile ---------- */
  .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: var(--s-4); }
  .toolbar .input { max-width: 320px; min-height: 40px; }
  .toolbar select.input { width: auto; padding-right: 32px; }
  .order-row td a.strong { text-decoration: none; }
  .packages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
  .pkg { text-align: left; border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: var(--surface); display: grid; gap: 6px; transition: border-color var(--t), transform var(--t), box-shadow var(--t); width: 100%; }
  .pkg:hover { border-color: var(--glas); transform: translateY(-2px); box-shadow: var(--sh-2); }
  .pkg[aria-pressed='true'] { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 30%, transparent); }
  .pkg .n { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.03em; } .pkg .p { color: var(--text-2); font-size: var(--fs-sm); } .pkg .per { color: var(--text-3); font-size: var(--fs-xs); }
  .balance-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
  .balance-hero .big { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
  .balance-hero small { display: block; color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; margin-top: 4px; }
  .ledger .amt.pos { color: var(--good-fg); font-weight: 800; } .ledger .amt.neg { color: var(--text); font-weight: 700; }
  .setting { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
  .setting:first-child { border-top: 0; }
  .setting b { font-size: var(--fs-sm); } .setting .desc { font-size: var(--fs-xs); color: var(--text-3); grid-column: 1; }
  .setting .ctl { grid-column: 2; grid-row: 1 / span 2; }
  .qr { width: 180px; height: 180px; background: #fff; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); padding: 8px; }
  .codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-sm); }
  .codes span { background: var(--surface-2); padding: 6px 10px; border-radius: 8px; text-align: center; letter-spacing: 0.05em; }
  .profile-criteria { display: grid; gap: 10px; }
  .crit-edit { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; } @media (max-width: 560px) { .crit-edit { grid-template-columns: 1fr; } }
  .legal-page h1 { font-size: var(--fs-2xl); margin: var(--s-6) 0 var(--s-3); } .legal-page h2 { font-size: var(--fs-md); margin: var(--s-5) 0 var(--s-2); } .legal-page p { color: var(--text-2); max-width: 70ch; }
  .sys { min-height: 70dvh; display: grid; place-items: center; text-align: center; padding: var(--s-6) var(--gutter); }
  .sys .code { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.04em; color: var(--text-3); line-height: 1; }
  .sys h1 { font-size: var(--fs-xl); margin-top: 8px; } .sys p { color: var(--text-2); max-width: 46ch; margin: 10px auto 0; }
  .sys .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: var(--s-5); }
  .firstrun { background: linear-gradient(135deg, color-mix(in oklab, var(--glas) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in oklab, var(--glas) 40%, var(--border)); }
  .steps-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-top: 12px; }
  .steps-3 div { font-size: var(--fs-sm); color: var(--text-2); } .steps-3 b { display: block; color: var(--text); font-size: var(--fs-md); margin-bottom: 2px; }
  .dev-only { display: none; } .app-shell .dev-only.show, .public-shell .dev-only.show { display: block; }
}

@layer pages {
  .src > .src-links { grid-column: 1 / -1; }
}
