/* Basstion Forge client portal: "Forge" — the Midnight & Brass brand, alive.
   Ink and navy plates for depth, brass for anything that matters, ember and molten heat for
   motion: embers rise in the background, steps glow like heated metal and a press strikes sparks.
   The earlier violet "Nightforge" look is kept in portal/themes/ and the portal-nightforge git tag. */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root {
  --bg: #080a10;
  --bg-2: #0f1826;
  --plate: #121c2b;
  --plate-2: #18243a;
  --glass: rgba(24, 36, 58, .42);
  --glass-2: rgba(36, 52, 80, .5);
  --glass-3: rgba(52, 72, 106, .55);
  --line: rgba(236, 226, 205, .10);
  --line-2: rgba(236, 226, 205, .20);
  --text: #f4efe4;
  --dim: #b3ac9f;
  --mute: #7d776d;
  --brass: #c9a15b;
  --brass-hi: #ecd29a;
  --brass-lo: #8a6a33;
  --heat: #ff8a3d;
  --spark: #ffcf8a;
  --steel: #8fb1dc;
  --ember: #ffbe5c;
  --ember-2: #ff6a2b;
  --rose: #fb7185;
  --mint: #7dd3a8;
  --grad: linear-gradient(135deg, #f7e6bd 0%, #ddb872 38%, #c9a15b 62%, #9c7638 100%);
  --grad-ember: linear-gradient(120deg, #ffd27a 0%, #ff8a3d 55%, #e2512a 100%);
  --grad-heat: linear-gradient(90deg, #8a6a33 0%, #c9a15b 45%, #ffb04a 80%, #fff1c9 100%);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 20px;
  --rail: 268px;
  --side: 320px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brass-hi); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--brass); color: #120c04; }
:focus-visible { outline: 2px solid var(--heat); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--heat); color: #000; padding: 8px 14px; border-radius: 10px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- Living background: a forge at night ---------- */
/* Cool steel haze up top, brass light drifting, coals glowing along the bottom, embers rising. */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: radial-gradient(1200px 700px at 12% -10%, rgba(64, 96, 140, .22), transparent 60%), linear-gradient(180deg, #0b1220 0%, #080a10 55%, #0a0806 100%); }
.aurora i { position: absolute; border-radius: 50%; will-change: transform, opacity; }
.aurora i:nth-child(1) { width: 70vmax; height: 70vmax; background: radial-gradient(closest-side, rgba(201, 161, 91, .16), transparent); top: -38vmax; right: -24vmax; animation: drift1 44s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 120vw; height: 60vh; left: -10vw; bottom: -38vh; background: radial-gradient(closest-side, rgba(255, 106, 43, .26), rgba(255, 138, 61, .08) 55%, transparent); animation: coals 7s ease-in-out infinite; }
.aurora i:nth-child(3) { width: 50vmax; height: 50vmax; background: radial-gradient(closest-side, rgba(143, 177, 220, .08), transparent); top: 30vh; left: -20vmax; animation: drift3 56s ease-in-out infinite alternate; }
.aurora b { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 240, 210, .6) 1px, transparent 1px); background-size: 3px 3px; opacity: .022; }
@keyframes drift1 { to { transform: translate(-14vw, 14vh) scale(1.12); } }
@keyframes drift3 { to { transform: translate(16vw, -10vh) scale(1.15); } }
@keyframes coals { 0%, 100% { opacity: .85; transform: scaleY(1); } 35% { opacity: 1; transform: scaleY(1.06); } 60% { opacity: .7; transform: scaleY(.97); } }
.embers { position: absolute; inset: 0; }
.embers s { position: absolute; bottom: -12px; left: var(--x); width: var(--sz, 3px); height: var(--sz, 3px); border-radius: 50%; background: radial-gradient(circle, #fff3d6 0%, #ffb04a 45%, rgba(255, 106, 43, 0) 75%); box-shadow: 0 0 6px 1px rgba(255, 138, 61, .7); opacity: 0; animation: ember-rise var(--d, 14s) linear var(--dl, 0s) infinite; will-change: transform, opacity; }
@keyframes ember-rise {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
  8% { opacity: .95; }
  50% { transform: translate3d(var(--dx, 20px), -52vh, 0) scale(.85); opacity: .75; }
  100% { transform: translate3d(calc(var(--dx, 20px) * -.6), -104vh, 0) scale(.4); opacity: 0; }
}
.embers s:nth-child(1) { --x: 6%; --d: 15s; --dl: -2s; --dx: 30px; }
.embers s:nth-child(2) { --x: 14%; --d: 19s; --dl: -9s; --dx: -24px; --sz: 2px; }
.embers s:nth-child(3) { --x: 22%; --d: 13s; --dl: -5s; --dx: 40px; }
.embers s:nth-child(4) { --x: 31%; --d: 17s; --dl: -12s; --dx: -36px; --sz: 4px; }
.embers s:nth-child(5) { --x: 38%; --d: 21s; --dl: -1s; --dx: 22px; --sz: 2px; }
.embers s:nth-child(6) { --x: 46%; --d: 14s; --dl: -7s; --dx: -18px; }
.embers s:nth-child(7) { --x: 53%; --d: 18s; --dl: -15s; --dx: 34px; --sz: 2px; }
.embers s:nth-child(8) { --x: 61%; --d: 16s; --dl: -4s; --dx: -40px; }
.embers s:nth-child(9) { --x: 68%; --d: 12s; --dl: -10s; --dx: 26px; --sz: 4px; }
.embers s:nth-child(10) { --x: 75%; --d: 20s; --dl: -6s; --dx: -22px; --sz: 2px; }
.embers s:nth-child(11) { --x: 82%; --d: 15s; --dl: -13s; --dx: 30px; }
.embers s:nth-child(12) { --x: 90%; --d: 17s; --dl: -3s; --dx: -28px; --sz: 2px; }
.embers s:nth-child(13) { --x: 96%; --d: 22s; --dl: -11s; --dx: -34px; }
.embers s:nth-child(14) { --x: 10%; --d: 24s; --dl: -17s; --dx: 18px; --sz: 2px; }
.embers s:nth-child(15) { --x: 27%; --d: 23s; --dl: -20s; --dx: -16px; --sz: 2px; }
.embers s:nth-child(16) { --x: 57%; --d: 25s; --dl: -8s; --dx: 20px; --sz: 2px; }
.embers s:nth-child(17) { --x: 72%; --d: 26s; --dl: -19s; --dx: -24px; --sz: 3px; }
.embers s:nth-child(18) { --x: 87%; --d: 19s; --dl: -16s; --dx: 16px; --sz: 2px; }

/* ---------- Frame ---------- */
.rail, .stage, .side, .mbar, .tabbar, .authart { position: relative; z-index: 1; }
.stage { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1060px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 44px) 72px; outline: none; }
main:focus, main:focus-visible { outline: none; }
.foot { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding: 20px clamp(16px, 4vw, 44px); color: var(--mute); font-size: 13px; border-top: 1px solid var(--line); }
.foot a { color: var(--dim); }
.loading { color: var(--dim); padding: 80px 0; text-align: center; display: grid; justify-items: center; gap: 16px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--heat); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* App mode: rail on the left, optional panel on the right */
body[data-mode="app"] .stage { margin-left: var(--rail); }
body[data-mode="app"][data-side="on"] .stage { margin-right: var(--side); }
body:not([data-mode="app"]) .rail, body:not([data-mode="app"]) .side, body:not([data-mode="app"]) .tabbar, body:not([data-mode="app"]) .mbar { display: none; }
body[data-side="off"] .side { display: none; }

.rail {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--rail); display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px 16px; background: linear-gradient(180deg, rgba(15, 24, 38, .92), rgba(10, 15, 25, .92)); border-right: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow-y: auto; z-index: 30;
}
.rail-top { display: flex; align-items: center; justify-content: space-between; }
.rail-brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 4px 6px; border-radius: 14px; }
.rail-brand .rail-logo { width: 34px; height: 34px; filter: drop-shadow(0 0 14px rgba(201, 161, 91, .55)); transition: transform .5s var(--spring); }
.rail-brand:hover .rail-logo { transform: rotate(-12deg) scale(1.08); }
.rail-brand span { display: grid; line-height: 1.15; }
.rail-brand b { font-weight: 600; letter-spacing: .01em; }
.rail-brand small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-hi); }
.rail .rail-close { display: none; }
.rail-label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); padding: 0 12px 8px; }
.rail-nav { display: grid; gap: 3px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--dim); text-decoration: none;
  border: 1px solid transparent; background: none; cursor: pointer; font-size: 15px; transition: color .2s, background .25s, border-color .25s, transform .35s var(--spring);
}
.nav-item:hover { color: var(--text); background: var(--glass-2); transform: translateX(3px); }
.nav-item .nav-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); transition: .3s var(--ease); flex: none; }
.nav-item .ic { width: 18px; height: 18px; }
.nav-item .nav-label { flex: 1; }
.nav-item.on { color: var(--text); background: linear-gradient(90deg, rgba(201, 161, 91, .20), rgba(255, 138, 61, .06)); border-color: rgba(236, 210, 154, .28); }
.nav-item.on .nav-ic { background: var(--grad); color: #1b1207; border-color: transparent; box-shadow: 0 0 22px rgba(201, 161, 91, .55); }
.nav-item.on::before { content: ""; position: absolute; left: -16px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px var(--heat); }
.rail-card { position: relative; overflow: hidden; margin-top: auto; padding: 16px; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(201, 161, 91, .16), rgba(255, 138, 61, .05)); }
.rail-card b { display: block; margin-bottom: 2px; }
.rail-card p { font-size: 13px; color: var(--dim); margin: 0 0 12px; }
.rail-card-glow { position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 196, 110, .35), transparent); animation: pulse 5s ease-in-out infinite; }
.rail-foot { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.rail-nav + .rail-foot { margin-top: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 4px; min-width: 0; }
.me-text { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
.me-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #1b1207; background: var(--grad); text-decoration: none; box-shadow: 0 0 0 3px rgba(201, 161, 91, .18); }
.avatar.brand-av { background: var(--grad-ember); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--dim); cursor: pointer; transition: .25s var(--spring); flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); transform: scale(1.06); }
.icon-btn .ic { width: 18px; height: 18px; }

.side { position: fixed; top: 0; right: 0; bottom: 0; width: var(--side); padding: 24px 18px; overflow-y: auto; border-left: 1px solid var(--line); background: rgba(10, 15, 25, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; align-content: start; gap: 14px; z-index: 5; }
.panel { position: relative; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); animation: rise .6s var(--ease) both; }
.panel:nth-child(2) { animation-delay: .06s; }
.panel:nth-child(3) { animation-delay: .12s; }
.panel .eyebrow { margin-bottom: 12px; }
.panel.contact .row { margin-top: 10px; }

.mbar, .tabbar, .scrim { display: none; }

/* ---------- Signed-out screens: art on the left, form on the right ---------- */
.authart { display: none; }
body[data-mode="auth"] { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
body[data-mode="auth"] .authart { display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100vh; padding: 36px clamp(28px, 4vw, 56px); overflow: hidden; border-right: 1px solid var(--line); background: radial-gradient(700px 500px at 0% 0%, rgba(64, 96, 140, .28), transparent 60%), radial-gradient(600px 420px at 80% 105%, rgba(255, 106, 43, .22), transparent 60%), linear-gradient(180deg, #0f1826, #0b111c); }
body[data-mode="auth"] main { max-width: 560px; display: grid; align-content: center; min-height: calc(100vh - 70px); }
.authart-brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 600; position: relative; z-index: 2; }
.authart-brand svg { width: 40px; height: 40px; filter: drop-shadow(0 0 16px rgba(201, 161, 91, .6)); }
.authart-copy { position: relative; z-index: 2; max-width: 460px; }
.authart-copy h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.02em; margin: 0 0 28px; }
.authart-copy em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.authart-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: var(--dim); }
.authart-copy li { display: flex; gap: 14px; align-items: baseline; }
.authart-copy li span { font-family: var(--mono); font-size: 12px; color: var(--spark); }
.authart-foot { position: relative; z-index: 2; color: var(--mute); font-size: 13px; margin: 0; }
.authart-cast { position: absolute; right: -14%; top: 50%; width: min(620px, 92%); aspect-ratio: 1; transform: translateY(-50%); -webkit-mask: radial-gradient(closest-side, #000 52%, transparent 100%); mask: radial-gradient(closest-side, #000 52%, transparent 100%); opacity: .9; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 400; margin: 0 0 10px; letter-spacing: -.015em; }
h1 { font-family: var(--serif); font-size: clamp(38px, 5.4vw, 60px); line-height: 1.02; }
h2 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 38px); line-height: 1.08; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 12px; }
.lead { color: var(--dim); font-size: 17.5px; max-width: 62ch; }
.small { font-size: 14px; color: var(--dim); }
.meta { color: var(--mute); font-size: 13px; }
.hint { font-size: 13px; color: var(--mute); margin-top: 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-hi); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--grad); }
.eyebrow.hot { color: var(--ember); }
.eyebrow.hot::before { background: var(--grad-ember); }

/* ---------- Page heading ---------- */
.page-head { position: relative; display: flex; gap: 24px; align-items: center; justify-content: space-between; margin: 0 0 26px; animation: rise .6s var(--ease) both; }
.page-head.compact { margin-bottom: 18px; }
.page-head-text { position: relative; z-index: 1; min-width: 0; }
.page-head.with-art { padding: clamp(24px, 4vw, 40px); border-radius: 28px; border: 1px solid var(--line-2); background: radial-gradient(600px 300px at 0% 0%, rgba(201, 161, 91, .22), transparent 60%), radial-gradient(500px 300px at 100% 100%, rgba(255, 138, 61, .12), transparent 60%), var(--glass); overflow: hidden; }
.page-head.with-art { min-height: 260px; background: radial-gradient(600px 320px at 0% 0%, rgba(64, 96, 140, .22), transparent 60%), linear-gradient(100deg, rgba(15, 24, 38, .96) 0%, rgba(15, 24, 38, .9) 42%, rgba(15, 24, 38, .2) 75%), #0b111c; }
.page-head.with-art .page-head-text { max-width: 560px; }
.cast.page-art { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: 0; -webkit-mask: linear-gradient(90deg, transparent 0%, #000 40%); mask: linear-gradient(90deg, transparent 0%, #000 40%); }
@keyframes turn { to { --ang: 360deg; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ---------- Cards ---------- */
.card { position: relative; background: linear-gradient(180deg, rgba(26, 38, 60, .62), rgba(15, 24, 38, .62)); box-shadow: inset 0 1px 0 rgba(236, 210, 154, .07); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: rise .55s var(--ease) both; }
main > :nth-child(2) { animation-delay: .05s; }
main > :nth-child(3) { animation-delay: .10s; }
main > :nth-child(4) { animation-delay: .15s; }
main > :nth-child(5) { animation-delay: .20s; }
main > :nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.narrow { max-width: 480px; margin-inline: auto; width: 100%; }
.auth-card { max-width: 520px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + * { margin-top: 18px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* A card with a slowly turning light around its edge */
.glow-card { border-color: transparent; background: linear-gradient(180deg, rgba(20, 31, 48, .97), rgba(11, 17, 28, .97)) padding-box, conic-gradient(from var(--ang), rgba(201, 161, 91, .9), rgba(255, 138, 61, .7), rgba(255, 106, 43, .6), rgba(201, 161, 91, .9)) border-box; border: 1px solid transparent; animation: rise .55s var(--ease) both, turn 8s linear infinite; box-shadow: 0 20px 60px -30px rgba(201, 161, 91, .6); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text); padding: 11px 18px; border-radius: 14px; cursor: pointer; text-decoration: none; font-size: 15px; font-weight: 500;
  transition: transform .35s var(--spring), box-shadow .3s, border-color .25s, background .25s;
}
.btn .ic { width: 17px; height: 17px; transition: transform .35s var(--spring); }
.btn:hover { transform: translateY(-2px); border-color: rgba(236, 210, 154, .5); box-shadow: 0 10px 30px -12px rgba(201, 161, 91, .6); background: var(--glass-3); }
.btn:hover .ic:last-child:not(:first-child) { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .1s; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); }
.btn:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn.primary { background: var(--grad); background-size: 200% 100%; color: #1b1207; font-weight: 650; border-color: transparent; box-shadow: 0 8px 28px -10px rgba(201, 161, 91, .8), inset 0 1px 0 rgba(255, 255, 255, .45); animation: sheen 6s ease-in-out infinite; }
.btn.primary:hover { box-shadow: 0 14px 40px -10px rgba(255, 196, 110, .75), 0 0 0 4px rgba(201, 161, 91, .18), inset 0 1px 0 rgba(255, 255, 255, .5); }
@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn.ghost { border-color: transparent; background: none; color: var(--dim); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: var(--glass); }
.btn.danger { border-color: rgba(251, 113, 133, .4); color: #fda4af; }
.btn.danger:hover { border-color: var(--rose); box-shadow: 0 10px 30px -12px rgba(251, 113, 133, .6); background: rgba(251, 113, 133, .08); }
.btn.small { padding: 7px 12px; font-size: 13.5px; border-radius: 11px; }
.btn.wide { width: 100%; padding: 14px; }
.btn.big-btn { padding: 18px; font-size: 17px; border-radius: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #fff; font-weight: 600; }
.btn.google:hover { box-shadow: 0 14px 40px -12px rgba(255, 255, 255, .45), 0 0 0 4px rgba(255, 255, 255, .1); background: #fff; }
.btn.google svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 13px; margin: 20px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spaced { margin-top: 18px; }
.grow { flex: 1 1 auto; min-width: 0; }
.links-row { margin-top: 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--spark); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* ---------- Forms ---------- */
label { display: block; font-size: 14px; color: var(--dim); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], textarea, select {
  width: 100%; background: rgba(4, 7, 12, .6); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; color: var(--text); outline: none; transition: border-color .2s, box-shadow .25s, background .2s;
}
input:hover, textarea:hover, select:hover { border-color: rgba(236, 210, 154, .35); }
input:focus, textarea:focus, select:focus { border-color: var(--brass); box-shadow: 0 0 0 4px rgba(201, 161, 91, .18), 0 0 24px -6px rgba(255, 196, 110, .35); background: rgba(4, 7, 12, .8); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.big { min-height: 280px; }
.title-input { font-family: var(--serif); font-size: 26px !important; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: 14px; color: var(--dim); }
.check input { margin-top: 3px; accent-color: var(--brass); width: 18px; height: 18px; }
.limits { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--brass-hi); opacity: .8; }
.tl-dot { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; border: 2px solid var(--line-2); }
.tl-dot.on { border-color: var(--brass); background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass) 60%, var(--brass-lo)); box-shadow: 0 0 12px -2px rgba(236, 210, 154, .6); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: rgba(201, 161, 91, .1); border: 1px solid rgba(201, 161, 91, .3); color: var(--brass-hi); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer; transition: background .2s, border-color .2s; }
.pw-eye:hover, .pw-eye:focus-visible { background: rgba(201, 161, 91, .2); border-color: var(--brass); outline: none; }
.match { min-height: 20px; margin-top: 6px; font-size: 13px; color: var(--mute); }
.match.ok { color: var(--brass-hi); }
.match.ok::before { content: "\2713  "; }
.match.bad { color: var(--rose); }
.code-input { font-family: var(--mono); font-size: 28px !important; letter-spacing: .4em; text-align: center; }
.err { background: rgba(251, 113, 133, .1); border: 1px solid rgba(251, 113, 133, .35); color: #fecdd3; padding: 10px 14px; border-radius: 14px; font-size: 14px; margin: 12px 0; }
.ok { background: rgba(110, 231, 183, .08); border: 1px solid rgba(110, 231, 183, .32); color: #bbf7d0; padding: 10px 14px; border-radius: 14px; font-size: 14px; margin: 12px 0; }
.ts { min-height: 70px; margin-top: 14px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }

/* Choice lists: sign-in methods */
.choice { display: grid; gap: 10px; margin-top: 18px; }
.choice button { position: relative; display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--glass); cursor: pointer; transition: transform .35s var(--spring), border-color .25s, box-shadow .3s, background .25s; }
.choice button:hover:not([disabled]) { transform: translateY(-2px); border-color: rgba(236, 210, 154, .55); background: var(--glass-2); box-shadow: 0 16px 40px -18px rgba(201, 161, 91, .7); }
.choice button:active:not([disabled]) { transform: scale(.98); }
.choice button.best { border-color: rgba(255, 196, 110, .45); background: linear-gradient(120deg, rgba(201, 161, 91, .14), rgba(255, 138, 61, .06)); }
.choice button[disabled] { opacity: .5; cursor: not-allowed; }
.choice b { display: flex; align-items: center; gap: 8px; color: var(--text); }
.choice span > span { display: block; font-size: 14px; color: var(--dim); margin-top: 2px; }
.choice-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #1b1207; box-shadow: 0 0 20px -4px rgba(201, 161, 91, .7); }
.choice-ic .ic { width: 20px; height: 20px; }
.mfa-area:not(:empty) { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.now-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(255, 196, 110, .14); color: var(--spark); border: 1px solid rgba(255, 196, 110, .3); margin-left: 6px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: var(--mono); font-size: 16px; background: rgba(4, 7, 12, .6); padding: 16px; border-radius: 14px; border: 1px solid var(--line); }
.qr { background: #fff; padding: 12px; border-radius: 16px; width: 220px; height: 220px; margin: 14px 0; box-shadow: 0 0 40px -10px rgba(201, 161, 91, .7); }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.secret { font-family: var(--mono); font-size: 14px; word-break: break-all; color: var(--spark); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; }
.steps li::before { content: counter(s); flex: 0 0 26px; height: 26px; border-radius: 50%; background: rgba(201, 161, 91, .18); color: var(--brass-hi); display: grid; place-items: center; font-size: 13px; font-family: var(--mono); }

/* ---------- Overview ---------- */
.home-next:empty { display: none; }
.home-next .panel { margin-bottom: 18px; }
.next .next-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.next .next-row p { color: var(--dim); font-size: 14px; margin: 2px 0 0; }
.next-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--line-2); color: var(--spark); }
.next-ic .ic { width: 22px; height: 22px; }
.next.hot { border-color: rgba(255, 190, 92, .4); background: linear-gradient(140deg, rgba(255, 106, 43, .12), rgba(201, 161, 91, .06)); box-shadow: 0 20px 60px -30px rgba(255, 106, 43, .7); }
.next.hot .next-ic { background: var(--grad-ember); color: #2a1300; border-color: transparent; box-shadow: 0 0 24px -4px rgba(255, 106, 43, .8); animation: pulse 3s ease-in-out infinite; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  position: relative; display: grid; gap: 14px; padding: 18px; border-radius: 20px; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--glass); overflow: hidden;
  transition: transform .45s var(--spring), border-color .3s, box-shadow .35s, background .3s; animation: rise .55s var(--ease) both;
}
.tile:nth-child(2) { animation-delay: .06s; } .tile:nth-child(3) { animation-delay: .12s; } .tile:nth-child(4) { animation-delay: .18s; }
.tile::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: radial-gradient(260px 160px at var(--mx, 50%) 0%, rgba(201, 161, 91, .25), transparent 70%); opacity: 0; transition: opacity .35s; pointer-events: none; }
.tile:hover { transform: translateY(-5px) scale(1.015); border-color: rgba(236, 210, 154, .5); box-shadow: 0 24px 50px -24px rgba(201, 161, 91, .8); }
.tile:hover::before { opacity: 1; }
.tile:active { transform: scale(.98); }
.tile-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--line-2); color: var(--brass-hi); transition: .45s var(--spring); }
.tile:hover .tile-ic { background: var(--grad); color: #1b1207; transform: rotate(-8deg) scale(1.08); box-shadow: 0 0 28px -4px rgba(201, 161, 91, .8); }
.tile-ic .ic { width: 22px; height: 22px; }
.tile-body { display: grid; gap: 3px; }
.tile-body small { color: var(--dim); font-size: 13.5px; }
.tile-go { position: absolute; top: 18px; right: 18px; color: var(--mute); transition: .35s var(--spring); }
.tile-go .ic { width: 18px; height: 18px; }
.tile:hover .tile-go { color: var(--spark); transform: translateX(4px); }
.tile .badge { position: absolute; top: 16px; right: 16px; }
.tile.hot { border-color: rgba(255, 190, 92, .35); }
.tile.hot .tile-ic { background: var(--grad-ember); color: #2a1300; border-color: transparent; }
.peek { display: grid; gap: 4px; text-decoration: none; color: var(--text); transition: transform .4s var(--spring), border-color .3s; }
.peek:hover { transform: translateY(-3px); border-color: rgba(236, 210, 154, .45); }
.peek-text { color: var(--dim); font-size: 14px; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.trust { display: flex; gap: 16px; align-items: flex-start; }
.trust-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: rgba(110, 231, 183, .1); border: 1px solid rgba(110, 231, 183, .3); color: var(--mint); }
.trust-ic .ic { width: 22px; height: 22px; }
.trust .small { margin: 2px 0 0; }

/* Project journey */
.journey { position: relative; }
.journey-bar { height: 8px; border-radius: 8px; background: linear-gradient(180deg, #0a0f18, #1a2436); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); overflow: hidden; margin: 6px 0 18px; }
.journey-bar i { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--grad-heat); background-size: 200% 100%; box-shadow: 0 0 18px rgba(255, 138, 61, .55); transition: width 1.4s var(--ease); animation: molten 4s ease-in-out infinite; }
.journey-bar i::after { content: ""; position: absolute; right: -2px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, #fff6dc 0%, #ffb04a 40%, rgba(255, 106, 43, 0) 72%); animation: flicker 1.6s ease-in-out infinite; }
@keyframes molten { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 30% { opacity: .7; } 55% { opacity: .95; } 70% { opacity: .6; } }
.journey-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.jstage { position: relative; display: grid; gap: 10px; align-content: start; }
.stage-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--bg-2); color: #1b1207; font-size: 12px; }
.stage-dot .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.jstage.done .stage-dot { background: var(--grad); border-color: transparent; box-shadow: 0 0 14px -2px rgba(201, 161, 91, .8), inset 0 1px 0 rgba(255, 255, 255, .5); }
.jstage.now .stage-dot { border: 2px solid var(--heat); background: radial-gradient(circle at 50% 40%, #4a2410, #1a0f08); box-shadow: 0 0 0 5px rgba(255, 190, 92, .14), 0 0 22px rgba(255, 106, 43, .6); animation: beat 2.2s ease-in-out infinite; }
.jstage.now .stage-dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle, #fff3d6, #ff8a3d 60%, #e2512a); box-shadow: 0 0 10px #ff8a3d; animation: flicker 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 190, 92, .14), 0 0 18px rgba(255, 106, 43, .5); } 50% { box-shadow: 0 0 0 9px rgba(255, 190, 92, .05), 0 0 30px rgba(255, 106, 43, .8); } }
.stage-text { display: grid; gap: 2px; }
.stage-text b { font-size: 14px; font-weight: 600; }
.stage-text small { color: var(--mute); font-size: 12.5px; }
.jstage.next .stage-text b { color: var(--dim); }
.jstage .now-tag { background: rgba(255, 190, 92, .14); color: var(--ember); border-color: rgba(255, 190, 92, .35); }
@media (max-width: 980px) {
  .journey-list { grid-template-columns: 1fr; gap: 0; }
  .jstage { grid-template-columns: 30px 1fr; gap: 14px; padding-bottom: 16px; }
  .jstage:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 32px; bottom: 0; width: 1px; background: var(--line-2); }
}
.journey.compact .journey-list { grid-template-columns: 1fr; gap: 0; }
.journey.compact .jstage { grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 14px; }
.journey.compact .jstage:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 32px; bottom: 0; width: 1px; background: var(--line-2); }
.journey.compact .jstage.done:not(:last-child)::before { background: linear-gradient(var(--heat), var(--brass)); }

/* ---------- Intake steps ---------- */
.reassure { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: 18px 0 4px; border-radius: 18px; border: 1px solid rgba(255, 190, 92, .35); background: linear-gradient(120deg, rgba(255, 190, 92, .12), rgba(255, 106, 43, .04)); }
.reassure b { color: #fde68a; }
.reassure p { margin: 4px 0 0; color: var(--dim); }
.reassure.slim { margin: 0 0 16px; padding: 11px 16px; align-items: center; }
.reassure.slim p { margin: 0; font-size: 14.5px; }
.reassure-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--grad-ember); color: #2a1300; }
.reassure.slim .reassure-ic { width: 28px; height: 28px; border-radius: 9px; }
.reassure-ic .ic { width: 18px; height: 18px; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 20px; padding: 8px; border-radius: 20px; border: 1px solid var(--line); background: rgba(10, 15, 25, .5); position: sticky; top: 10px; z-index: 4; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; text-decoration: none; color: var(--dim); transition: background .25s, transform .35s var(--spring), color .2s; min-width: 0; }
.step:hover { background: var(--glass-2); color: var(--text); transform: translateY(-1px); }
.step-dot { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; border: 1px solid var(--line-2); background: var(--glass); transition: .35s var(--spring); }
.step-dot .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.step-label { display: grid; line-height: 1.15; min-width: 0; }
.step-label small { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.step-label b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.done .step-dot { background: rgba(255, 196, 110, .14); color: var(--spark); border-color: rgba(255, 196, 110, .4); }
.step.on { background: linear-gradient(120deg, rgba(201, 161, 91, .28), rgba(255, 138, 61, .1)); color: var(--text); }
.step.on .step-dot { background: var(--grad); color: #1b1207; border-color: transparent; box-shadow: 0 0 22px -2px rgba(201, 161, 91, .9); transform: scale(1.08); }
.step-body { animation: rise .5s var(--ease) both; }
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.step-count { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--mute); }
.intro-card h2 { margin-top: 4px; }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 980px) { .how { grid-template-columns: repeat(2, 1fr); } }
.how-step { position: relative; display: grid; gap: 8px; padding: 18px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); text-decoration: none; color: var(--text); transition: transform .45s var(--spring), border-color .3s, box-shadow .3s; animation: rise .55s var(--ease) both; }
.how-step:nth-child(2) { animation-delay: .06s; } .how-step:nth-child(3) { animation-delay: .12s; } .how-step:nth-child(4) { animation-delay: .18s; }
.how-step:hover { transform: translateY(-4px); border-color: rgba(236, 210, 154, .5); box-shadow: 0 20px 44px -22px rgba(201, 161, 91, .8); }
.how-n { position: absolute; top: 14px; right: 16px; font-family: var(--serif); font-size: 34px; line-height: 1; color: rgba(236, 210, 154, .28); }
.how-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--line-2); color: var(--spark); transition: .45s var(--spring); }
.how-step:hover .how-ic { background: var(--grad); color: #1b1207; transform: rotate(-8deg); }
.how-ic .ic { width: 20px; height: 20px; }
.how-step small { color: var(--dim); font-size: 13.5px; }
.review { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.review a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(4, 7, 12, .4); text-decoration: none; color: var(--text); transition: transform .35s var(--spring), border-color .25s; }
.review a:hover { transform: translateX(4px); border-color: rgba(236, 210, 154, .45); }
.review b { display: block; }
.review small { color: var(--dim); font-size: 13.5px; }
.review-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--glass-2); color: var(--dim); }
.review-ic.done { background: rgba(255, 196, 110, .14); color: var(--spark); }
.review-ic .ic { width: 18px; height: 18px; }

/* The microphone */
.mic-card { text-align: center; padding: clamp(28px, 5vw, 52px); overflow: hidden; background: radial-gradient(500px 300px at 50% 0%, rgba(201, 161, 91, .22), transparent 70%), radial-gradient(400px 260px at 50% 100%, rgba(255, 138, 61, .1), transparent 70%), rgba(12, 10, 26, .8); border-color: rgba(236, 210, 154, .3); }
.mic-card .prompt { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; max-width: 30ch; margin: 0 auto 8px; }
.mic-card .sub { color: var(--dim); max-width: 56ch; margin: 0 auto 30px; }
.mic { position: relative; width: 168px; height: 168px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; margin: 0 auto; color: #1b1207; background: var(--grad); box-shadow: 0 0 0 10px rgba(201, 161, 91, .1), 0 20px 60px -10px rgba(201, 161, 91, .8); transition: transform .45s var(--spring), box-shadow .3s; }
.mic::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; background: conic-gradient(from var(--ang), transparent 0 60%, rgba(255, 196, 110, .9) 75%, transparent 90%); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: turn 3.5s linear infinite; }
.mic:hover { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(201, 161, 91, .14), 0 26px 70px -10px rgba(255, 196, 110, .7); }
.mic:active { transform: scale(.95); }
.mic svg { width: 62px; height: 62px; position: relative; }
.mic .ring { position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--rose); opacity: 0; transform: scale(var(--lvl, 1)); transition: transform .08s linear, opacity .2s; pointer-events: none; }
.mic.live { background: linear-gradient(135deg, #fb7185, #ff8a3d); color: #fff; box-shadow: 0 0 0 10px rgba(251, 113, 133, .14), 0 20px 60px -10px rgba(251, 113, 133, .9); animation: breathe 1.8s ease-in-out infinite; }
.mic.live .ring { opacity: .8; }
.mic.paused { background: var(--bg-2); color: var(--text); box-shadow: 0 0 0 2px var(--brass) inset, 0 10px 40px -10px rgba(201, 161, 91, .6); }
.mic.paused::before { animation-play-state: paused; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 10px rgba(251, 113, 133, .14), 0 20px 60px -10px rgba(251, 113, 133, .9); } 50% { box-shadow: 0 0 0 22px rgba(251, 113, 133, .06), 0 20px 70px -6px rgba(251, 113, 133, 1); } }
.mic-label { margin-top: 22px; font-weight: 600; font-size: 18px; }
.timer { font-family: var(--mono); font-size: 36px; letter-spacing: .06em; margin-top: 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mic-state { color: var(--dim); font-size: 14px; min-height: 22px; margin-top: 4px; }
.mic-controls { margin-top: 18px; justify-content: center; }
.tips { margin: 26px auto 0; max-width: 640px; text-align: left; color: var(--dim); font-size: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(4, 7, 12, .4); }
.tips summary { cursor: pointer; color: var(--spark); }
.tips ul { margin: 10px 0 0; padding-left: 20px; }

/* Lists, files, pages */
.list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(4, 7, 12, .45); flex-wrap: wrap; transition: border-color .25s, background .25s; }
.item:hover { border-color: var(--line-2); background: rgba(4, 7, 12, .6); }
.item .grow { flex: 1; min-width: 180px; overflow-wrap: anywhere; }
.item audio { width: 100%; max-width: 360px; height: 36px; margin-top: 6px; }
.empty { color: var(--mute); font-size: 14px; padding: 6px 0; }
.empty-state { text-align: center; padding: 44px 24px; }
.empty-ic { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--line-2); color: var(--brass-hi); animation: float 6s ease-in-out infinite; }
.empty-ic .ic { width: 28px; height: 28px; }
.empty-state .small { max-width: 44ch; margin: 0 auto 16px; }
.saved { font-size: 12px; color: var(--mute); font-family: var(--mono); letter-spacing: .06em; }
.drop { border: 1.5px dashed rgba(236, 210, 154, .35); border-radius: 18px; padding: 28px 22px; text-align: center; color: var(--dim); cursor: pointer; transition: .3s var(--ease); background: radial-gradient(300px 120px at 50% 0%, rgba(201, 161, 91, .1), transparent); }
.drop b { display: block; color: var(--text); margin-bottom: 4px; }
.drop.over, .drop:hover { border-color: var(--heat); background: radial-gradient(300px 140px at 50% 0%, rgba(255, 138, 61, .16), transparent); color: var(--text); transform: scale(1.01); }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 6px; width: 100%; }
.bar i { display: block; height: 100%; background: var(--grad-heat); width: 0; transition: width .2s; box-shadow: 0 0 10px rgba(255, 138, 61, .7); }
.page { border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 12px; background: rgba(4, 7, 12, .45); }
.page input.title { font-family: var(--serif); font-size: 26px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 0 8px; box-shadow: none; }
.page textarea { margin-top: 10px; min-height: 160px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumb { position: relative; width: 120px; height: 90px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); display: grid; place-items: center; font-size: 12px; color: var(--dim); text-align: center; padding: 4px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(4, 7, 12, .85); color: var(--text); cursor: pointer; line-height: 1; z-index: 1; }
.send-card { text-align: center; }
.send-card .lead { margin-inline: auto; }
.status { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); }
.status.sent, .status.ready, .status.received { color: var(--mint); border-color: rgba(110, 231, 183, .4); }
.status.error { color: var(--rose); border-color: rgba(251, 113, 133, .4); }
.status.working, .status.queued, .status.submitted { color: var(--ember); border-color: rgba(255, 190, 92, .4); }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-hi); border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 999px; }
.small-tag { font-size: 9.5px; padding: 2px 7px; }

/* ---------- Messages, updates, documents ---------- */
.badge { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: linear-gradient(135deg, #fb7185, #ff8a3d); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 14px rgba(251, 113, 133, .7); animation: pop .5s var(--spring) both; }
.badge[hidden] { display: none; }
.badge.inline { margin-left: 8px; vertical-align: 2px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.chat-card { padding-top: 10px; }
.thread { list-style: none; padding: 6px 2px; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 12px; max-height: 58vh; overflow-y: auto; }
.bubble { max-width: min(580px, 86%); padding: 12px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass-2); animation: rise .4s var(--ease) both; }
.bubble.mine { align-self: flex-end; background: linear-gradient(135deg, rgba(201, 161, 91, .32), rgba(255, 138, 61, .14)); border-color: rgba(236, 210, 154, .35); border-bottom-right-radius: 6px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 6px; }
.who-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; font-size: 13.5px; }
.bubble .pre { background: none; border: 0; padding: 0; max-height: none; }
.bubble .read { margin-top: 6px; text-align: right; }
.composer { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.composer textarea { min-height: 90px; }
.composer .row { margin-top: 10px; }
.attach { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(4, 7, 12, .5); color: var(--text); text-decoration: none; font-size: 13.5px; transition: .3s var(--spring); }
a.chip:hover { border-color: var(--heat); transform: translateY(-2px); }
.chip .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.feed { display: grid; gap: 0; }
.feed-card { padding: clamp(18px, 3vw, 26px); }
.post h3 { margin: 12px 0 6px; font-size: 21px; }
.post.new { box-shadow: inset 3px 0 0 var(--heat); padding-left: 16px; }
.post + .post { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.post-head { align-items: center; gap: 10px; }
.linklist { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; color: var(--text); max-height: 520px; overflow: auto; background: rgba(4, 7, 12, .5); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.post .pre { background: none; border: 0; padding: 0; color: var(--dim); }
.md h2, .md h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin: 18px 0 6px; color: var(--brass-hi); }
.md ul { margin: 6px 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.hubtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(10, 15, 25, .5); width: fit-content; max-width: 100%; }
.hubtabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; color: var(--dim); text-decoration: none; font-size: 14.5px; transition: .3s var(--spring); }
.hubtabs a:hover { color: var(--text); background: var(--glass-2); }
.hubtabs a.on { background: var(--grad); color: #1b1207; font-weight: 600; box-shadow: 0 0 20px -4px rgba(201, 161, 91, .8); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.links-row.lr { margin-top: 16px; }

/* Admin tables */
.scroll-x { overflow-x: auto; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin th, table.admin td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.admin th { color: var(--mute); font-weight: 500; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
table.admin tr.click { cursor: pointer; transition: background .2s; }
table.admin tr.click:hover td { background: rgba(201, 161, 91, .08); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(24px) scale(.96); background: rgba(18, 28, 43, .95); border: 1px solid rgba(236, 210, 154, .4); padding: 11px 18px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: .35s var(--spring); z-index: 120; box-shadow: 0 20px 50px -20px rgba(201, 161, 91, .8); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1240px) {
  body[data-mode="app"][data-side="on"] .stage { margin-right: 0; }
  .side { display: none !important; }
}
@media (max-width: 900px) {
  body[data-mode="auth"] { display: block; }
  body[data-mode="auth"] .authart { position: relative; height: auto; padding: 22px 18px 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  body[data-mode="auth"] .authart-copy h2 { font-size: 40px; margin: 18px 0 0; }
  body[data-mode="auth"] .authart-copy ul, body[data-mode="auth"] .authart-foot, body[data-mode="auth"] .authart-copy .eyebrow { display: none; }
  body[data-mode="auth"] .authart-cast { width: 260px; right: -70px; opacity: .75; }
  body[data-mode="auth"] main { min-height: 0; padding-top: 24px; }
  body[data-mode="app"] .stage { margin-left: 0; }
  body[data-mode="app"] main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  body[data-mode="app"] .foot { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 20; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(8, 10, 16, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .mbar .rail-brand small { display: none; }
  .mbar .avatar { width: 36px; height: 36px; }
  .rail { transform: translateX(-104%); transition: transform .45s var(--ease); width: min(320px, 86vw); box-shadow: 30px 0 80px rgba(0, 0, 0, .6); z-index: 60; }
  body.drawer .rail { transform: none; }
  .rail .rail-close { display: grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(3, 2, 8, .6); opacity: 0; pointer-events: none; transition: opacity .35s; }
  body.drawer .scrim { opacity: 1; pointer-events: auto; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; padding: 6px; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(14, 12, 30, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); }
  .tabbar .nav-item { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 11px; border-radius: 16px; justify-content: center; }
  .tabbar .nav-item:hover { transform: none; }
  .tabbar .nav-item .nav-ic { width: 32px; height: 28px; border: 0; background: none; border-radius: 10px; }
  .tabbar .nav-item.on { background: none; border-color: transparent; }
  .tabbar .nav-item.on::before { display: none; }
  .tabbar .nav-item.on .nav-ic { background: var(--grad); }
  .tabbar .nav-label { flex: none; }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 26px); min-width: 18px; height: 18px; font-size: 10px; }
  .page-head.with-art { flex-direction: column-reverse; align-items: flex-start; padding: 22px; }
  .page-head.with-art { min-height: 0; padding-top: 170px; background: linear-gradient(180deg, rgba(15, 24, 38, 0) 0px, rgba(15, 24, 38, .96) 190px), #0b111c; }
  .cast.page-art { width: 100%; bottom: auto; height: 220px; -webkit-mask: linear-gradient(180deg, #000 55%, transparent 100%); mask: linear-gradient(180deg, #000 55%, transparent 100%); }
  .embers s:nth-child(n+10) { display: none; }
  .stepper { grid-template-columns: repeat(5, auto); overflow-x: auto; top: 64px; scrollbar-width: none; }
  .stepper::-webkit-scrollbar { display: none; }
  .step-label small { display: none; }
  .step:not(.on) .step-label { display: none; }
  .step { justify-content: center; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; gap: 10px; }
  .how { grid-template-columns: 1fr 1fr; }
  .bubble { max-width: 92%; }
  .mic { width: 148px; height: 148px; }
  .lead { font-size: 16.5px; }
  .hubtabs { width: 100%; }
  .hubtabs a { flex: 1 1 40%; justify-content: center; padding: 9px 10px; }
}
@media (max-width: 420px) {
  .tiles, .how { grid-template-columns: 1fr; }
  .step-nav .btn { padding: 11px 14px; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .aurora i, .embers { animation: none; }
  .embers, .sparks { display: none; }
  .cast .cast-star, .cast .cast-glow { opacity: 1 !important; }
}

/* ---------- Forge motion ---------- */
/* The star fort cast in brass: the empty mould, then the pour, then a glow that keeps breathing. */
.cast { overflow: hidden; pointer-events: none; }
.cast span { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: 66% 50%; }
.cast .cast-mold { background-image: url("/media/hf/home-hs2.webp"); }
.cast .cast-star { background-image: url("/media/hf/home-end-wide.webp"); opacity: 0; animation: pour 2.4s var(--ease) .5s forwards; }
.cast .cast-glow { background: radial-gradient(24% 30% at 66% 50%, rgba(255, 150, 60, .55), transparent 70%); mix-blend-mode: screen; opacity: 0; animation: pour-glow 3.2s ease-out .4s forwards, ember-breathe 5.5s ease-in-out 3.6s infinite; }
.cast.cast-done .cast-star { animation: none; opacity: 1; }
.cast.cast-done .cast-glow { animation: ember-breathe 5.5s ease-in-out infinite; opacity: .5; }
@keyframes pour { 0% { opacity: 0; filter: brightness(2.2) saturate(1.4); } 45% { opacity: 1; filter: brightness(1.6) saturate(1.3); } 100% { opacity: 1; filter: none; } }
@keyframes pour-glow { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: .5; } }
@keyframes ember-breathe { 0%, 100% { opacity: .5; } 50% { opacity: .22; } }

/* Sparks struck from a press or a finished step */
.sparks { position: fixed; width: 0; height: 0; z-index: 300; pointer-events: none; }
.sparks i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #fff1c9; box-shadow: 0 0 6px 2px rgba(255, 138, 61, .85); animation: spark var(--sd, 600ms) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes spark { 0% { transform: translate(0, 0) scale(var(--ss, 1)); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--sx), calc(var(--sy) + 26px)) scale(.2); opacity: 0; } }
.strike { animation: strike .8s var(--ease) both !important; }
@keyframes strike { 0% { filter: brightness(2.4) saturate(1.5); transform: scale(1.18); box-shadow: 0 0 0 0 rgba(255, 176, 74, .9), 0 0 40px rgba(255, 138, 61, .9); } 100% { filter: none; transform: none; } }

/* Primary buttons heat up under the pointer */
.btn.primary::before { content: ""; position: absolute; inset: -40% -10%; z-index: -1; background: radial-gradient(60% 60% at 50% 120%, rgba(255, 138, 61, .55), transparent 70%); opacity: 0; transition: opacity .4s; }
.btn.primary:hover::before { opacity: 1; }
.nav-item.on .nav-ic, .tabbar .nav-item.on .nav-ic { box-shadow: 0 0 20px -2px rgba(201, 161, 91, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.step.done .step-dot { background: var(--grad); color: #1b1207; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }

/* Demo badge: a quiet marker beside the name on the public demo. */
.rail-brand .demo-pill { display: inline-block; vertical-align: 2px; margin-left: 8px; padding: 2px 7px; border: 1px solid rgba(201, 161, 91, .45); border-radius: 999px; font: 500 9.5px/1.3 "Geist Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-hi, #f3dca5); background: rgba(201, 161, 91, .08); }
