/* ==========================================================================
   CrowID app — sign-in pages and the signed-in workspace (/app).
   Built on brand.css tokens. Dark by default; html[data-theme="light"] flips.
   ========================================================================== */

/* ---------- auth pages ---------- */
.auth-body { background: var(--ground); }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
@media (max-width: 960px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-aside { display: none; } }
.auth-main { display: grid; align-content: center; justify-items: center; gap: var(--s-6); padding: var(--s-7) var(--s-5); }
.auth-main > .logo { justify-self: center; }
.auth-card { width: min(100%, 27rem); display: grid; gap: var(--s-5); padding: var(--s-7) var(--s-6); border: 1px solid var(--line-strong); border-radius: calc(var(--r-3) * 1.4); background: var(--surface); box-shadow: var(--shadow-3); }
@media (max-width: 480px) { .auth-card { padding: var(--s-6) var(--s-5); } }
.auth-card .grid-2.tight-grid { gap: var(--s-4); }
@media (max-width: 480px) { .auth-card .grid-2.tight-grid { grid-template-columns: minmax(0, 1fr); } }
.auth-switch { text-align: center; }
.auth-legal { text-align: center; max-width: 27rem; }
.auth-aside { position: relative; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(50rem 30rem at 80% 0%, color-mix(in srgb, var(--signal) 18%, transparent), transparent 70%), radial-gradient(40rem 30rem at 0% 100%, color-mix(in srgb, var(--steel) 12%, transparent), transparent 70%), var(--ground-2); display: grid; align-content: end; padding: var(--s-9) var(--s-8); }
.auth-aside .mesh { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-quote { position: relative; display: grid; gap: var(--s-5); max-width: 34rem; }
.auth-big { font: 650 var(--fs-3xl)/1.08 var(--font-display); font-stretch: 86%; letter-spacing: -0.02em; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); color: var(--ink-2); }
.auth-points li { display: flex; gap: var(--s-3); align-items: center; }
.auth-points li::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.pw { position: relative; }
.pw .input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 0.375rem; top: 50%; transform: translateY(-50%); width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 0; border-radius: var(--r-2); background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle.on { color: var(--ink); background: var(--raised); }
.pw-toggle svg { width: 1.125rem; height: 1.125rem; stroke: currentColor; fill: none; stroke-width: 1.7; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; }
.pw-meter i { height: 0.25rem; border-radius: var(--r-pill); background: var(--line); transition: background 0.3s; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--coral); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--amber); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--signal); }
.pw-meter[data-s="4"] i { background: var(--ok); }

/* ---------- app shell ---------- */
.app-body { background: var(--ground); }
.app-boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--ground); z-index: 500; transition: opacity 0.4s var(--ease), visibility 0.4s; }
.app-boot.out { opacity: 0; visibility: hidden; }
.app-boot svg { width: 3rem; height: 3rem; animation: boot-pulse 1.4s ease-in-out infinite; }
.app-boot .mark-a { fill: var(--ink); } .app-boot .mark-b { fill: var(--signal); }
@keyframes boot-pulse { 50% { opacity: 0.45; transform: scale(0.94); } }
.app-shell { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); min-height: 100vh; }
.app-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-4) var(--s-3); border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); overflow-y: auto; z-index: 40; }
.app-rail .logo { padding: var(--s-2) var(--s-3); }
.ws { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--s-3); align-items: center; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--ground-2); }
.ws .av { width: 2.25rem; height: 2.25rem; border-radius: var(--r-2); display: grid; place-items: center; background: linear-gradient(135deg, var(--signal), var(--steel)); color: var(--on-signal); font: 700 var(--fs-sm) var(--font-display); }
.ws b { display: block; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.app-nav { display: grid; gap: 2px; }
.app-nav .lbl { font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: var(--s-4) var(--s-3) var(--s-2); }
.app-nav a { position: relative; display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; height: 2.5rem; padding: 0 var(--s-3); border-radius: var(--r-2); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; transition: background var(--dur), color var(--dur); }
.app-nav a:hover { background: var(--raised); color: var(--ink); }
.app-nav a[aria-current="page"] { background: var(--signal-tint); color: var(--ink); }
.app-nav a[aria-current="page"]::before { content: ""; position: absolute; left: calc(-1 * var(--s-3)); top: 0.5rem; bottom: 0.5rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.app-nav a svg { width: 1.125rem; height: 1.125rem; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-nav a[aria-current="page"] svg { stroke: var(--signal); }
.app-nav .count { min-width: 1.375rem; height: 1.375rem; padding: 0 0.375rem; border-radius: var(--r-pill); background: var(--coral); color: var(--on-coral); font: 600 var(--fs-xs)/1.375rem var(--font-mono); text-align: center; }
.rail-foot { margin-top: auto; display: grid; gap: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.rail-foot a { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-2); color: var(--muted); font-size: var(--fs-sm); }
.rail-foot a:hover { color: var(--ink); background: var(--raised); }
.rail-foot svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 1.7; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-top { position: sticky; top: 0; z-index: 30; height: 4rem; display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-6); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ground) 74%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); }
.crumbs { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; }
.crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--ink); }
.app-top .spacer { flex: 1; }
.top-search { display: inline-flex; align-items: center; gap: var(--s-2); height: 2.375rem; min-width: 17rem; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--dur), color var(--dur), box-shadow 0.3s; }
.top-search:hover { color: var(--ink); border-color: var(--muted); box-shadow: 0 0 0 3px var(--signal-tint); }
.top-search kbd { margin-left: auto; }
.top-search svg, .icon-btn svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.icon-btn { width: 2.375rem; height: 2.375rem; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); cursor: pointer; transition: background var(--dur), color var(--dur); position: relative; }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 0.375rem; right: 0.375rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--ground); }
.user-menu { position: relative; }
.avatar { width: 2.375rem; height: 2.375rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: linear-gradient(135deg, color-mix(in srgb, var(--signal) 40%, var(--surface)), var(--surface)); color: var(--ink); font: 650 var(--fs-xs) var(--font-ui); cursor: pointer; }
.menu { position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 15rem; padding: var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--shadow-3); display: grid; gap: 2px; z-index: 60; animation: menu-in 0.18s var(--ease) both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu .who { padding: var(--s-2) var(--s-3) var(--s-3); border-bottom: 1px solid var(--line); margin-bottom: var(--s-1); }
.menu .who b { display: block; font-size: var(--fs-sm); }
.menu .who span { font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.menu a, .menu button { display: flex; align-items: center; gap: var(--s-2); width: 100%; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-1); background: none; color: var(--ink-2); font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--raised); color: var(--ink); }
.rail-toggle { display: none; }
@media (max-width: 1020px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-rail { position: fixed; left: 0; top: 0; bottom: 0; width: min(18rem, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); background: var(--surface); box-shadow: var(--shadow-3); }
  .app-rail.open { transform: none; }
  .rail-toggle { display: grid; }
  .app-top { padding: 0 var(--s-4); }
  .top-search { min-width: 0; width: 2.375rem; padding: 0; justify-content: center; }
  .top-search span, .top-search kbd { display: none; }
}
.rail-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 35; animation: fade-in 0.25s both; }
@keyframes fade-in { from { opacity: 0; } }

.app-view { padding: var(--s-6) var(--s-6) var(--s-9); display: grid; gap: var(--s-5); align-content: start; min-width: 0; width: 100%; max-width: 100rem; margin: 0 auto; }
@media (max-width: 680px) { .app-view { padding: var(--s-5) var(--s-4) var(--s-8); } }
.view-enter > * { animation: rise 0.6s var(--ease) both; }
.view-enter > *:nth-child(2) { animation-delay: 60ms; } .view-enter > *:nth-child(3) { animation-delay: 120ms; } .view-enter > *:nth-child(4) { animation-delay: 180ms; } .view-enter > *:nth-child(n+5) { animation-delay: 240ms; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; }
.page-head h1 { font: 650 var(--fs-2xl)/1.1 var(--font-display); font-stretch: 86%; letter-spacing: -0.015em; }
.page-head p { color: var(--muted); margin-top: var(--s-2); max-width: 46rem; }
.page-head .acts { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* KPIs */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpi-row { grid-template-columns: minmax(0, 1fr); } }
.kpi { position: relative; display: grid; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow: hidden; color: inherit; transition: border-color 0.3s, transform 0.35s var(--ease); }
:root[data-theme="light"] .kpi { background: var(--surface); box-shadow: var(--shadow-1); }
a.kpi:hover { border-color: var(--line-strong); transform: translateY(-2px); color: inherit; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--k, var(--signal)); opacity: 0.85; }
.kpi .l { font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kpi .n { font: 650 var(--fs-3xl)/1 var(--font-display); font-stretch: 80%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .n small { font: 500 var(--fs-sm) var(--font-ui); color: var(--muted); margin-left: 0.25rem; letter-spacing: 0; }
.kpi .d { font-size: var(--fs-xs); color: var(--muted); }

/* panels */
.panel { position: relative; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); min-width: 0; display: flex; flex-direction: column; }
:root[data-theme="light"] .panel { background: var(--surface); box-shadow: var(--shadow-1); }
.panel-h { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 3.5rem; }
.panel-h h2 { font: 600 var(--fs-md)/1.3 var(--font-ui); }
.panel-h .meta { font-size: var(--fs-xs); color: var(--muted); }
.panel-h .acts { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.panel-b { padding: var(--s-5); display: grid; gap: var(--s-4); min-width: 0; }
.panel-b.flush { padding: 0; }
.panel .table-wrap { border: 0; border-radius: 0 0 var(--r-3) var(--r-3); background: transparent; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-5); }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols, .cols.even { grid-template-columns: minmax(0, 1fr); } }

/* table rows that open things */
.table tbody tr.go { cursor: pointer; }
.table tbody tr.go:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.table td .sub { display: block; font-size: var(--fs-xs); color: var(--muted); }
.table td.dom { font-weight: 600; }
.grade { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--r-2); font: 700 var(--fs-sm) var(--font-display); color: var(--g); background: color-mix(in srgb, var(--g) 16%, transparent); border: 1px solid color-mix(in srgb, var(--g) 45%, transparent); }
.mini-bar { display: grid; grid-template-columns: 2.25rem minmax(3rem, 8rem); gap: var(--s-2); align-items: center; font: 500 var(--fs-sm) var(--font-mono); }
.mini-bar i { display: block; height: 0.375rem; border-radius: var(--r-pill); background: var(--sunken); overflow: hidden; }
.mini-bar i b { display: block; height: 100%; width: var(--w); background: var(--g); border-radius: inherit; animation: grow-x 1s var(--ease) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }
.trend { font: 500 var(--fs-xs) var(--font-mono); }
.trend.up { color: var(--ok); } .trend.down { color: var(--coral-ink); } .trend.flat { color: var(--muted); }
.row-acts { display: flex; gap: var(--s-1); justify-content: flex-end; }
.btn-icon { width: 2rem; height: 2rem; padding: 0; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: var(--r-2); background: transparent; color: var(--muted); cursor: pointer; }
.btn-icon:hover { background: var(--raised); color: var(--ink); border-color: var(--line); }
.btn-icon.danger:hover { color: var(--coral-ink); }
.btn-icon svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font: 400 11px var(--font-mono); fill: var(--muted); }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .bar { transform-box: fill-box; transform-origin: left; animation: grow-x 1.1s var(--ease) both; }
.chart .ln { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { fill: url(#area-grad); }
.chart .pt { fill: var(--surface); stroke: var(--signal); stroke-width: 2; }
.chart .lbl { fill: var(--ink-2); font: 500 12px var(--font-ui); }
.chart a:hover .lbl { fill: var(--ink); text-decoration: underline; }

/* alerts list */
.alerts { display: grid; }
.alert-row { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: start; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); transition: background var(--dur); cursor: pointer; }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: var(--raised); }
.alert-row .ic { width: 2.25rem; height: 2.25rem; border-radius: var(--r-2); display: grid; place-items: center; background: var(--amber-tint); color: var(--amber); }
.alert-row .ic.lookalike { background: var(--coral-tint); color: var(--coral-ink); }
.alert-row .ic.certificate { background: color-mix(in srgb, var(--steel) 16%, transparent); color: var(--steel); }
.alert-row .ic svg { width: 1.125rem; height: 1.125rem; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert-row b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.alert-row p { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.alert-row .when { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; display: grid; justify-items: end; gap: var(--s-2); }
.alert-row.unread b::after { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-left: 0.5rem; border-radius: 50%; background: var(--coral); vertical-align: middle; }
.alert-row.read { opacity: 0.72; }

/* empty states */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s-3); padding: var(--s-8) var(--s-5); }
.empty .art { width: 4.5rem; height: 4.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--signal-tint); color: var(--signal); box-shadow: 0 0 0 0.75rem color-mix(in srgb, var(--signal-tint) 45%, transparent); margin-bottom: var(--s-3); }
.empty .art svg { width: 1.75rem; height: 1.75rem; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty h3 { font: 600 var(--fs-lg)/1.3 var(--font-ui); }
.empty p { color: var(--muted); max-width: 30rem; font-size: var(--fs-sm); }

/* forms in panels */
.inline-form { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: flex-start; }
.inline-form .field { flex: 1 1 16rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 680px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.danger-zone { border-color: color-mix(in srgb, var(--coral) 45%, transparent); }
.danger-zone .panel-h h2 { color: var(--coral-ink); }

/* dialog + palette */
dialog.modal { width: min(30rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--line-strong); border-radius: calc(var(--r-3) * 1.2); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); }
dialog.modal[open] { animation: modal-in 0.25s var(--ease) both; }
dialog::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(0.5rem) scale(0.98); } }
.modal-b { padding: var(--s-6); display: grid; gap: var(--s-4); }
.modal-b h2 { font: 600 var(--fs-xl)/1.25 var(--font-display); font-stretch: 90%; }
.modal-b p { color: var(--ink-2); font-size: var(--fs-sm); }
.modal-f { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line); background: var(--raised); border-radius: 0 0 calc(var(--r-3) * 1.2) calc(var(--r-3) * 1.2); }
dialog.palette { width: min(40rem, calc(100vw - 2rem)); margin-top: 12vh; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); overflow: hidden; }
dialog.palette[open] { animation: modal-in 0.2s var(--ease) both; }
.palette input { width: 100%; height: 3.5rem; padding: 0 var(--s-5); border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font-size: var(--fs-lg); outline: none; }
.palette ul { list-style: none; margin: 0; padding: var(--s-2); max-height: 55vh; overflow-y: auto; }
.palette li button { width: 100%; display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: var(--s-3); border: 0; border-radius: var(--r-2); background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-size: var(--fs-sm); }
.palette li button svg { width: 1rem; height: 1rem; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.palette li button span { color: var(--muted); font-size: var(--fs-xs); }
.palette li button[aria-selected="true"] { background: var(--signal-tint); }
.palette .pf { display: flex; gap: var(--s-4); padding: var(--s-2) var(--s-5); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }

/* secret scanner */
.drop { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-8) var(--s-5); border: 1.5px dashed var(--line-strong); border-radius: var(--r-3); text-align: center; color: var(--muted); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop.over { border-color: var(--signal); background: var(--signal-tint); color: var(--ink); }
.drop svg { width: 2rem; height: 2rem; stroke: var(--signal); fill: none; stroke-width: 1.6; }
.progress { height: 0.5rem; border-radius: var(--r-pill); background: var(--sunken); overflow: hidden; }
.progress i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--signal), var(--steel)); border-radius: inherit; transition: width 0.25s var(--ease); }
.privacy-note { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: var(--r-2); background: var(--ok-tint); font-size: var(--fs-sm); color: var(--ink-2); }
.privacy-note svg { width: 1.25rem; height: 1.25rem; stroke: var(--ok); fill: none; stroke-width: 1.8; flex: none; }
.sev { font: 500 var(--fs-xs) var(--font-mono); }
.mono-cell { font-family: var(--font-mono); font-size: var(--fs-xs); overflow-wrap: anywhere; }

@media print { .app-rail, .app-top, .page-head .acts, .no-print { display: none !important; } .app-shell { display: block; } }

/* flex children of panels must be allowed to shrink so wide tables scroll inside .table-wrap */
.panel > * { min-width: 0; }
@media (max-width: 680px) { .table th, .table td { padding: var(--s-3); } .page-head .inline-form { width: 100%; } }
.table-wrap { position: relative; } /* keeps .sr-only header labels inside the scroll box */

/* ---------- email: account pages, verify banner, notification settings ---------- */
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.label-row label { font: 550 var(--fs-sm)/1.3 var(--font-ui); color: var(--ink); }
.done-mark { width: 3rem; height: 3rem; display: grid; place-items: center; margin-bottom: var(--s-2); border-radius: 50%; background: var(--ok-tint); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); font: 600 1.375rem/1 var(--font-ui); box-shadow: 0 0 1.5rem -0.25rem color-mix(in srgb, var(--ok) 45%, transparent); animation: rise 0.6s var(--ease) both; }
.verify-banner { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin: var(--s-4) var(--s-5) 0; padding: var(--s-3) var(--s-4); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-radius: var(--r-2); background: var(--amber-tint); font-size: var(--fs-sm); color: var(--ink); animation: rise 0.5s var(--ease) both; }
.verify-banner::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 1px; transform: rotate(45deg); background: var(--amber); flex: none; }
.verify-banner p { flex: 1 1 18rem; margin: 0; }
.verify-banner .acts { display: flex; gap: var(--s-2); }
@media (max-width: 560px) { .verify-banner { margin: var(--s-3) var(--s-4) 0; } }
.toggle-row { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); }
.toggle-row p { margin: 0.25rem 0 0; }
.switch { position: relative; flex: none; width: 2.75rem; height: 1.5rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--sunken); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.switch::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--muted); transition: transform 0.25s var(--ease), background 0.2s; }
.switch[aria-checked="true"] { background: var(--signal); border-color: var(--signal); }
.switch[aria-checked="true"]::after { transform: translateX(1.25rem); background: var(--on-signal); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- domain detail: changes list, category bars ---------- */
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.chg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: var(--s-3) var(--s-3); border-left: 2px solid var(--line-strong); border-radius: 0 var(--r-1) var(--r-1) 0; }
.chg.worse { border-left-color: var(--coral); background: color-mix(in srgb, var(--coral-tint) 55%, transparent); }
.chg.better { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok-tint) 55%, transparent); }
.chg b { display: block; font-weight: 600; font-size: var(--fs-sm); }
.chg span { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.cat-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--s-3); }
.cat-bar { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-2); color: var(--ink); font-size: var(--fs-sm); font-weight: 550; transition: border-color 0.2s, background 0.2s; }
.cat-bar:hover { border-color: var(--line-strong); background: var(--raised); color: var(--ink); }
/* domain page: its own root keeps the view's rhythm and stagger */
.dd { display: grid; gap: var(--s-5); min-width: 0; }
.dd > * { min-width: 0; }
.view-enter > .dd > * { animation: rise 0.6s var(--ease) both; }
.view-enter > .dd > *:nth-child(2) { animation-delay: 60ms; } .view-enter > .dd > *:nth-child(3) { animation-delay: 120ms; } .view-enter > .dd > *:nth-child(n+4) { animation-delay: 180ms; }
.page-head h1 { overflow-wrap: anywhere; }
