/* ════════════════════════════════════════════════════════════════════════════
   SubShare — UI. Restrained, product-grade. No external assets.
   Direction: near-black canvas, one desaturated indigo accent, hairline borders,
   tight typographic scale (self-hosted Inter). Inspired by tools like Linear/Vercel.
   ════════════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

:root {
  /* surfaces */
  --bg: #08090b;
  --bg-alt: #0b0d10;
  --surface: #121317;
  --surface-2: #16181d;
  --surface-3: #1c1f25;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* ink */
  --text: #f3f4f6;
  --text-2: #9a9fab;
  --text-3: #6a6f7a;

  /* one accent (desaturated indigo) */
  --accent: #6169d8;
  --accent-hi: #868df0;
  --accent-fg: #ffffff;
  --accent-weak: rgba(97, 105, 216, 0.14);
  --accent-line: rgba(97, 105, 216, 0.4);
  --ring: rgba(97, 105, 216, 0.45);

  /* status (muted, not neon) */
  --ok: #4cb782;
  --warn: #e0b341;
  --danger: #e5575c;

  --r: 12px;
  --r-sm: 9px;
  --r-lg: 18px;
  --maxw: 1080px;
  --shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* subtle top accent wash + faint dot grid, both very low contrast */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(900px 480px at 50% -220px, rgba(97, 105, 216, 0.12), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 75%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 75%);
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.022em; font-weight: 650; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
b { font-weight: 600; }
.muted { color: var(--text-2); }
.grad-text { color: var(--accent-hi); } /* single-hue emphasis, not a rainbow */
.mono { font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace; }

/* ── Layout helpers ────────────────────────────────────────────────────────── */
.container { width: min(var(--maxw), 92vw); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 560;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }
.section-head { max-width: 40rem; margin: 0 auto clamp(2rem, 5vw, 3.25rem); text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: 0.9rem 0 0.6rem; }
.section-head p { color: var(--text-2); font-size: 1.02rem; }

/* ── Reveal-on-scroll ──────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.06s; } .reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.18s; } .reveal.d4 { transition-delay: 0.24s; }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(8, 9, 11, 0.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 0.15rem; }
.nav-links a { color: var(--text-2); font-size: 0.88rem; padding: 0.45rem 0.7rem; border-radius: 7px; transition: color 0.15s, background 0.15s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn { position: relative; font: inherit; font-weight: 550; font-size: 0.92rem; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 0.6rem 1.05rem;
  transition: background 0.15s var(--ease), border-color 0.15s, color 0.15s, transform 0.08s; white-space: nowrap; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.84rem; border-radius: 7px; }
.btn-lg { padding: 0.72rem 1.3rem; font-size: 0.96rem; }
.btn-block { width: 100%; }
.btn-primary { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }
.btn-primary:not(:disabled):hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-secondary { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }
.btn-secondary:hover { background: #23262d; }
.btn-glass, .btn-ghost { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn-glass:hover, .btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { color: var(--danger); background: transparent; border-color: rgba(229, 87, 92, 0.32); }
.btn-danger:hover { background: rgba(229, 87, 92, 0.1); border-color: rgba(229, 87, 92, 0.5); }

/* ── Surfaces (kept class name `glass`, now solid) ─────────────────────────── */
.glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(3rem, 7vw, 5rem); border-top: 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); font-weight: 680; margin: 1.1rem 0 0; letter-spacing: -0.03em; }
.hero .lede { color: var(--text-2); font-size: clamp(1rem, 2vw, 1.14rem); max-width: 33rem; margin-top: 1.15rem; }
.hero-cta { display: flex; gap: 0.7rem; margin-top: 1.9rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 1.3rem; margin-top: 2rem; flex-wrap: wrap; color: var(--text-3); font-size: 0.85rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }

.enter { opacity: 0; transform: translateY(14px); animation: enter 0.7s var(--ease) forwards; }
.enter.e1 { animation-delay: 0.04s; } .enter.e2 { animation-delay: 0.12s; }
.enter.e3 { animation-delay: 0.2s; } .enter.e4 { animation-delay: 0.28s; } .enter.e5 { animation-delay: 0.36s; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* ── Console (unlock) card ─────────────────────────────────────────────────── */
.console-card { padding: 1.5rem; box-shadow: var(--shadow); }
.console-card .ck-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.25rem; }
.console-card .ck-head svg { color: var(--text-2); }
.console-card h3 { font-size: 1.05rem; font-weight: 600; }
.console-card .ck-sub { color: var(--text-2); font-size: 0.89rem; margin-bottom: 1.15rem; }
label { display: block; font-size: 0.8rem; color: var(--text-2); margin-bottom: 0.45rem; }
.field { display: flex; gap: 0.5rem; }
input[type="text"], input[type="password"], input[type="email"] {
  flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 0.62rem 0.8rem; font: inherit; font-size: 0.92rem; transition: border-color 0.15s, box-shadow 0.15s;
}
/* Auth fields stack full-width (not in a flex .field row). */
#auth-form input { display: block; width: 100%; box-sizing: border-box; }
input::placeholder { color: var(--text-3); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.field-err { color: var(--danger); font-size: 0.84rem; margin-top: 0.65rem; }
.hint { color: var(--text-3); font-size: 0.8rem; margin-top: 0.65rem; }
.ck-feats { list-style: none; padding: 1.2rem 0 0; margin: 1.2rem 0 0; border-top: 1px solid var(--border); display: grid; gap: 0.6rem; }
.ck-feats li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.86rem; color: var(--text-2); }
.ck-feats .ic { color: var(--accent-hi); flex: none; display: inline-flex; }

/* ── Problem: contrast cards ───────────────────────────────────────────────── */
.contrast { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.25rem; align-items: stretch; }
@media (max-width: 860px) { .contrast { grid-template-columns: 1fr; } .contrast .vs { display: none; } }
.cmp { padding: 1.5rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.cmp h3 { font-size: 1.1rem; font-weight: 600; }
.cmp.good { border-color: rgba(76, 183, 130, 0.28); }
.cmp ul { list-style: none; padding: 0; margin: 1.05rem 0 0; display: grid; gap: 0.7rem; }
.cmp li { display: flex; gap: 0.6rem; font-size: 0.92rem; color: var(--text-2); }
.cmp li .ic { flex: none; margin-top: 1px; display: inline-flex; }
.cmp.bad li .ic { color: var(--danger); } .cmp.good li .ic { color: var(--ok); }
.vs { align-self: center; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 0.72rem; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); }
.tag { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; padding: 0.18rem 0.5rem; border-radius: 5px; }
.tag.bad { color: var(--danger); background: rgba(229, 87, 92, 0.12); }
.tag.good { color: var(--ok); background: rgba(76, 183, 130, 0.13); }

/* ── How it works ──────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 1.4rem; border-radius: var(--r); }
.step .n { width: 1.9rem; height: 1.9rem; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 0.85rem;
  color: var(--accent-hi); background: var(--accent-weak); border: 1px solid var(--accent-line); margin-bottom: 0.9rem; }
.step h3 { font-size: 1.02rem; font-weight: 600; } .step p { color: var(--text-2); font-size: 0.9rem; margin-top: 0.35rem; }

.flow { margin-top: 2rem; padding: 1.5rem; border-radius: var(--r); display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 0.9rem; align-items: center; text-align: center; }
@media (max-width: 820px) { .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); } }
.node { padding: 1rem; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.node .ic { color: var(--text-2); display: inline-flex; } .node b { display: block; margin-top: 0.4rem; font-size: 0.92rem; font-weight: 600; }
.node small { color: var(--text-3); font-size: 0.76rem; }
.node.secure { border-color: rgba(76, 183, 130, 0.3); } .node.secure .ic { color: var(--ok); }
.arrow { color: var(--text-3); display: grid; place-items: center; }
.arrow small { display: block; font-size: 0.68rem; color: var(--accent-hi); margin-top: 0.2rem; font-family: ui-monospace, monospace; }

/* ── Features grid ─────────────────────────────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }
.feat { padding: 1.35rem; border-radius: var(--r); transition: border-color 0.2s, background 0.2s; }
.feat:hover { border-color: var(--border-strong); background: var(--surface-2); }
.feat .ic-wrap { width: 2.3rem; height: 2.3rem; border-radius: 9px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent-hi); margin-bottom: 0.85rem; }
.feat h3 { font-size: 1rem; font-weight: 600; } .feat p { color: var(--text-2); font-size: 0.89rem; margin-top: 0.35rem; }

/* ── CTA band ──────────────────────────────────────────────────────────────── */
.cta-band { text-align: center; padding: clamp(2.5rem, 6vw, 3.75rem); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.cta-band h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 640; }
.cta-band p { color: var(--text-2); margin: 0.75rem auto 1.6rem; max-width: 30rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border); padding: 1.75rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-3); font-size: 0.84rem; }
.foot a { color: var(--text-2); } .foot a:hover { color: var(--text); }

/* ── "See it in action" animated demo ──────────────────────────────────────── */
.demo { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }

.demo-window { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.dw-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.dw-bar .tl { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.dw-bar .tl.r { background: #e5575c66; } .dw-bar .tl.y { background: #e0b34166; } .dw-bar .tl.g { background: #4cb78266; }
.dw-url { flex: 1; display: flex; align-items: center; gap: 0.45rem; margin-left: 0.5rem; padding: 0.3rem 0.7rem; border-radius: 7px; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); font-size: 0.8rem; }
.dw-badge { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.5rem; border-radius: 5px; color: var(--text-2); background: var(--surface-3); transition: 0.3s; }
.demo-window[data-scene="0"] .dw-badge { color: var(--ok); background: rgba(76,183,130,0.14); }
.demo-window[data-scene="1"] .dw-badge { color: var(--accent-hi); background: var(--accent-weak); }
.demo-window[data-scene="2"] .dw-badge { color: var(--ok); background: rgba(76,183,130,0.14); }
.demo-window[data-scene="3"] .dw-badge { color: var(--text-3); background: var(--surface-3); }

.dw-body { position: relative; height: 250px; padding: 1.1rem; overflow: hidden; }
.dw-page { display: grid; gap: 0.75rem; transition: opacity 0.5s, filter 0.5s; }
.dw-line { height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2)); }
.dw-line.w90 { width: 90%; } .dw-line.w80 { width: 80%; } .dw-line.w70 { width: 70%; } .dw-line.w50 { width: 50%; }

/* live-stream layer (scene 2) */
.dw-stream { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; background:
  repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 4px), var(--bg); }
.dw-stream .scan { position: absolute; left: 0; right: 0; height: 36%; top: -36%;
  background: linear-gradient(180deg, transparent, rgba(97,105,216,0.12), transparent); animation: scan 2.6s linear infinite; }
.dw-stream .dw-cursor { position: absolute; width: 12px; height: 12px; border: 2px solid var(--accent-hi); border-radius: 50%;
  left: 30%; top: 55%; animation: cursor 4s var(--ease) infinite; box-shadow: 0 0 0 4px rgba(97,105,216,0.12); }
.dw-stream .dw-live { position: absolute; top: 0.7rem; left: 0.8rem; font-size: 0.7rem; font-weight: 600; color: var(--ok); letter-spacing: 0.03em; }
@keyframes scan { to { top: 100%; } }
@keyframes cursor { 0%{left:28%;top:58%} 30%{left:62%;top:38%} 60%{left:48%;top:66%} 100%{left:28%;top:58%} }

/* floating link chip (scenes 1-2) */
.dw-chip { position: absolute; left: 50%; bottom: 1rem; transform: translate(-50%, 140%); display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  font-size: 0.8rem; box-shadow: var(--shadow); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.5s; white-space: nowrap; }
.dw-chip svg { color: var(--accent-hi); }
.dw-ttl { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-hi); }

/* revoked overlay (scene 3) */
.dw-revoked { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.2rem; text-align: center;
  background: rgba(8,9,11,0.78); backdrop-filter: blur(2px); color: var(--text); opacity: 0; pointer-events: none; transition: opacity 0.45s; }
.dw-revoked svg { color: var(--text-2); margin-bottom: 0.3rem; }
.dw-revoked small { color: var(--text-3); font-size: 0.8rem; }

/* per-scene visibility */
.demo-window[data-scene="2"] .dw-page { opacity: 0; }
.demo-window[data-scene="2"] .dw-stream { opacity: 1; }
.demo-window[data-scene="1"] .dw-chip,
.demo-window[data-scene="2"] .dw-chip { opacity: 1; transform: translate(-50%, 0); }
.demo-window[data-scene="3"] .dw-page { filter: grayscale(1) brightness(0.6); }
.demo-window[data-scene="3"] .dw-revoked { opacity: 1; }

/* step captions */
.demo-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; counter-reset: s; }
.demo-steps li { display: flex; gap: 0.75rem; padding: 0.8rem 0.9rem; border-radius: var(--r-sm); border: 1px solid transparent; transition: 0.3s; }
.demo-steps li .ds-dot { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 7px; display: grid; place-items: center; counter-increment: s;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3); font-size: 0.8rem; font-weight: 700; }
.demo-steps li .ds-dot::before { content: counter(s); }
.demo-steps li b { font-size: 0.94rem; font-weight: 600; } .demo-steps li p { color: var(--text-2); font-size: 0.84rem; margin-top: 0.15rem; }
.demo-steps li.active { background: var(--surface); border-color: var(--border-strong); }
.demo-steps li.active .ds-dot { background: var(--accent); border-color: var(--accent); color: #fff; }

/* flow diagram packets */
.flow .arrow .wire { position: relative; display: block; height: 2px; width: 100%; min-width: 60px; background: var(--border-strong); border-radius: 2px; overflow: hidden; }
.flow .arrow .pkt { position: absolute; top: 50%; left: 0; width: 14px; height: 4px; margin-top: -2px; border-radius: 3px; animation: pkt 1.8s linear infinite; }
.flow .arrow .pkt.ok { background: linear-gradient(90deg, transparent, var(--ok)); }
.flow .arrow .pkt.acc { background: linear-gradient(90deg, transparent, var(--accent-hi)); }
.flow .arrow .pkt.d { animation-delay: 0.9s; }
@keyframes pkt { from { left: -16px; } to { left: 100%; } }
.flow .node .stays { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.6rem; font-size: 0.68rem; color: var(--ok);
  background: rgba(76,183,130,0.12); border: 1px solid rgba(76,183,130,0.25); padding: 0.15rem 0.45rem; border-radius: 999px; animation: staypulse 2.4s var(--ease) infinite; }
@keyframes staypulse { 0%,100% { box-shadow: 0 0 0 0 rgba(76,183,130,0.0); } 50% { box-shadow: 0 0 0 4px rgba(76,183,130,0.12); } }

/* ── Auth tabs (login/signup) ─────────────────────────────────────────────────── */
.auth-tabs { display: flex; gap: 0.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.25rem; margin-bottom: 1.1rem; }
.auth-tab { flex: 1; background: transparent; border: 0; color: var(--text-2); padding: 0.5rem; border-radius: 6px; font: inherit; font-weight: 550; font-size: 0.9rem; cursor: pointer; transition: 0.15s; }
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.auth-links { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.7rem; }
.auth-links a { color: var(--text-2); font-size: 0.82rem; }
.auth-links a:hover { color: var(--accent-hi); }
.notice { font-size: 0.85rem; margin-top: 0.7rem; padding: 0.6rem 0.75rem; border-radius: var(--r-sm);
  color: var(--ok); background: rgba(76, 183, 130, 0.1); border: 1px solid rgba(76, 183, 130, 0.25); }
/* password show/hide toggle */
.pw-wrap { position: relative; display: block; width: 100%; }
.field .pw-wrap { flex: 1; }
.pw-wrap input { width: 100%; box-sizing: border-box; padding-right: 2.6rem; }
.pw-toggle { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); background: transparent;
  border: 0; padding: 0.35rem; cursor: pointer; color: var(--text-3); display: inline-flex; border-radius: 6px; }
.pw-toggle:hover { color: var(--text); }
.pw-match { font-size: 0.8rem; margin-top: 0.4rem; }
.pw-match.ok { color: var(--ok); }
.pw-match.no { color: var(--danger); }
/* email-verification banner */
.verify-banner { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.1rem;
  padding: 0.7rem 1rem; border-radius: var(--r-sm); color: var(--warn);
  background: rgba(224, 179, 65, 0.1); border: 1px solid rgba(224, 179, 65, 0.3); font-size: 0.88rem; }
.verify-banner .grow { flex: 1; min-width: 12rem; }

/* ════════════════ APP ════════════════ */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(8, 9, 11, 0.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }

/* catalog */
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.app-head h2 { font-size: 1.4rem; font-weight: 650; }
.search { display: flex; align-items: center; gap: 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 0.7rem; color: var(--text-3); min-width: 240px; }
.search input { border: 0; background: transparent; padding: 0.55rem 0; }
.search input:focus { outline: none; box-shadow: none; }
.grid-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 0 0 0.7rem; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; }
.svc-card { display: flex; align-items: center; gap: 0.8rem; text-align: left; padding: 0.9rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; font: inherit; transition: border-color 0.18s, background 0.18s, transform 0.08s; }
.svc-card:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.svc-logo { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 9px; display: grid; place-items: center; font-weight: 700; color: var(--accent-hi); background: var(--accent-weak); border: 1px solid var(--accent-line); }
.svc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.svc-info b { font-size: 0.96rem; font-weight: 600; }
.svc-info small { display: flex; align-items: center; gap: 0.4rem; color: var(--text-2); font-size: 0.8rem; }
.svc-go { color: var(--text-3); font-size: 1.1rem; }

/* service detail */
.sv-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 1.4rem; flex-wrap: wrap; }
.sv-title { display: flex; align-items: center; gap: 0.7rem; }
.sv-title h2 { font-size: 1.4rem; font-weight: 650; }
.uses-chip { font-size: 0.8rem; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--border); padding: 0.15rem 0.5rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
#user-email { font-size: 0.82rem; }

/* link usage history */
.hist-toggle { margin-top: 0.7rem; }
.hist-toggle summary { cursor: pointer; color: var(--text-2); font-size: 0.8rem; list-style: none; user-select: none; }
.hist-toggle summary::-webkit-details-marker { display: none; }
.hist-toggle summary::before { content: "▸ "; color: var(--text-3); }
.hist-toggle[open] summary::before { content: "▾ "; }
.history { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.82rem; padding: 0.3rem 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; }
.hist-name { color: var(--text); }
.hist-time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.topbar-right { display: flex; align-items: center; gap: 0.6rem; }
.pill { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; padding: 0.36rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); display: inline-block; transition: 0.3s; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(76, 183, 130, 0.16); }
.dot-bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(229, 87, 92, 0.16); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(224, 179, 65, 0.16); }

.dash { padding: clamp(1.5rem, 4vw, 2.25rem) 0; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 1.25rem; }
@media (max-width: 720px) { .strip { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); padding: 0.95rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.stat-label { font-size: 0.7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-val { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; font-weight: 550; }
.stat-action { justify-content: center; align-items: stretch; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 880px) { .dash-grid { grid-template-columns: 1fr; } }
.card { padding: 1.5rem; border-radius: var(--r); }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card h2 { font-size: 1.12rem; font-weight: 600; }
.card-sub { color: var(--text-2); font-size: 0.89rem; margin: 0.4rem 0 1.2rem; }
.block-label { display: block; font-size: 0.78rem; color: var(--text-2); margin-bottom: 0.5rem; }

.segmented { display: flex; gap: 0.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.25rem; margin-bottom: 1.15rem; }
.seg { flex: 1; background: transparent; border: 0; color: var(--text-2); padding: 0.55rem; border-radius: 6px; font: inherit; font-weight: 550; font-size: 0.9rem; cursor: pointer; transition: 0.15s; }
.seg:hover { color: var(--text); }
.seg[aria-checked="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

.minted { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); animation: rise 0.3s var(--ease); }
.minted-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.minted-actions { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
#minted-url { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.84rem; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.badge { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.55rem; border-radius: 5px; }
.badge-pending { color: var(--accent-hi); background: var(--accent-weak); }
.badge-active { color: var(--ok); background: rgba(76, 183, 130, 0.13); }
.badge-expired, .badge-revoked { color: var(--text-3); background: var(--surface-3); }

.share-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.share-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.85rem 0.95rem; animation: rise 0.25s var(--ease); }
.share-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.share-meta { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.share-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.share-sub { font-size: 0.79rem; color: var(--text-3); margin-top: 0.2rem; }
.share-actions { display: flex; gap: 0.4rem; }
.bar { height: 4px; background: var(--surface-3); border-radius: 999px; margin-top: 0.7rem; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 1s linear; }
.empty { text-align: center; padding: 2.5rem 1rem; }
.empty .ic { color: var(--text-3); display: inline-flex; } .empty p { margin: 0.3rem 0; }

/* ── Toasts ────────────────────────────────────────────────────────────────── */
.toasts { position: fixed; top: 1rem; right: 1rem; z-index: 60; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { display: flex; align-items: center; gap: 0.6rem; background: var(--surface-3); border: 1px solid var(--border-strong); border-left: 2px solid var(--accent); border-radius: var(--r-sm); padding: 0.7rem 0.95rem; box-shadow: var(--shadow); font-size: 0.88rem; max-width: 23rem; animation: toast-in 0.22s var(--ease); }
.toast-ok { border-left-color: var(--ok); } .toast-err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ── View transitions (unlock ↔ dashboard) ────────────────────────────────── */
::view-transition-old(root) { animation: vt-out 0.28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.4s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; } .enter { opacity: 1; transform: none; }
}
