/* ============================================================
   DEUTSCH-KLUB — v2 "technical minimalism": monochrome, light + dark theme, Geist / Geist Mono.
   Landmarks are rendered live as ASCII 3D objects (assets/ascii3d.js). Theme switch: assets/theme.js.
   ============================================================ */

:root, [data-theme="light"] {
  --bg: #fafafa;
  --bg-deep: #f2f2f2;
  --bg-rgb: 250, 250, 250;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-rgb: 10, 10, 10;
  --ink-2: #262626;
  --muted: #5c5c5c;
  --faint: #8a8a8a;
  --faint-2: #b5b5b5;
  --accent: #0a0a0a;              /* monochrome: the accent is the ink itself */
  --accent-2: #0a0a0a;
  --accent-3: #404040;
  --accent-rgb: 10, 10, 10;
  --on-accent: #fafafa;
  --hairline: rgba(10, 10, 10, 0.12);
  --hairline-soft: rgba(10, 10, 10, 0.07);
  --grid: rgba(10, 10, 10, 0.045);
  --danger: #c62828; --danger-rgb: 198, 40, 40;
  --ok: #1b7f3b; --warn: #9a6700; --info: #1f5fbf;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-deep: #050505;
  --bg-rgb: 10, 10, 10;
  --surface: #111111;
  --ink: #ededed;
  --ink-rgb: 237, 237, 237;
  --ink-2: #d4d4d4;
  --muted: #a1a1a1;
  --faint: #737373;
  --faint-2: #4a4a4a;
  --accent: #ededed;
  --accent-2: #ffffff;
  --accent-3: #bdbdbd;
  --accent-rgb: 237, 237, 237;
  --on-accent: #0a0a0a;
  --hairline: rgba(237, 237, 237, 0.14);
  --hairline-soft: rgba(237, 237, 237, 0.08);
  --grid: rgba(237, 237, 237, 0.04);
  --danger: #ff8a7a; --danger-rgb: 255, 138, 122;
  --ok: #7fd6a0; --warn: #ffcf7a; --info: #8ec9ff;
  color-scheme: dark;
}
:root {
  --sans: "Geist", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: var(--sans);            /* headings: the old serif slot now uses Geist */
  --caps: var(--mono);
  --maxw: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background-color: var(--bg);
  background-image:                     /* faint engineering grid */
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-variant-numeric: lining-nums;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::selection { background: var(--ink); color: var(--bg); }

img { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-color: var(--faint-2); }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--mono); }

/* ---------- typography helpers ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow.center { justify-content: center; }

.mark { display: inline-block; flex: none; border: 1px solid currentColor; }
.mark-circle { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mark-diamond { width: 7px; height: 7px; transform: rotate(45deg); }
.mark-star { width: auto; border: none; }
.mark-star::before { content: "*"; font-family: var(--mono); line-height: 1; }

h1, h2 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.02; margin: 0.9rem 0 1.4rem; }
h2.center, .subtext.center { text-align: center; }
h1 em, h2 em { font-style: normal; color: var(--faint); }

.subtext { color: var(--muted); font-size: 1.02rem; }

/* ---------- buttons ---------- */

.btn-solid {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin-top: 0.5rem;
  background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em; text-transform: none;
  padding: 0.95rem 1.4rem; cursor: pointer; text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.2s ease;
}
.btn-solid:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -10px rgba(var(--ink-rgb), 0.45); }
.btn-solid:active { transform: translateY(0); }
.btn-solid:disabled, .btn-solid[disabled] { opacity: 0.4; transform: none; box-shadow: none; cursor: not-allowed; }
.btn-solid .arr, .btn-ghost .arr { transition: transform 0.3s var(--ease); }
.btn-solid:hover .arr, .btn-ghost:hover .arr { transform: translateX(3px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; text-decoration: none;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0.95rem 1.4rem; background: var(--surface);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- nav ---------- */

.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; border-bottom: 1px solid transparent; transition: background 0.3s ease, border-color 0.3s ease; }
.nav.scrolled { background: rgba(var(--bg-rgb), 0.78); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom-color: var(--hairline-soft); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0.85rem var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.logo-mark {                         /* static Ü mark (footer, member card): the SVG is a mask, so it takes the text colour */
  display: inline-block; width: 26px; height: 26px; flex: none;
  background: currentColor;
  -webkit-mask: url(/assets/img/logo-u.svg?v=1) center / contain no-repeat; mask: url(/assets/img/logo-u.svg?v=1) center / contain no-repeat;
}
.logo-text { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; }
/* animated Ü in the header: the dots hop in turn every few seconds, faster while hovered */
.logo-u { width: 28px; height: 28px; flex: none; overflow: visible; }
.logo-u .u-dot { transform-box: fill-box; animation: uHop 5s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
.logo-u .u-b { animation-delay: 0.16s; }
.logo:hover .logo-u .u-dot { animation-duration: 1.1s; }
@keyframes uHop { 0%, 14%, 100% { transform: none; } 7% { transform: translateY(-4.5px); } }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }
.btn-pill {
  border: 1px solid var(--ink); border-radius: 999px; padding: 0.45rem 0.95rem !important;
  color: var(--bg) !important; background: var(--ink); transition: opacity 0.2s ease;
}
.btn-pill:hover { opacity: 0.85; }
.theme-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hairline); background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: border-color 0.2s ease;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 16px; height: 16px; grid-area: 1 / 1; transition: transform 0.5s var(--ease), opacity 0.3s ease; }
.theme-btn .i-moon { transform: rotate(-60deg) scale(0.6); opacity: 0; }
[data-theme="dark"] .theme-btn .i-sun { transform: rotate(60deg) scale(0.6); opacity: 0; }
[data-theme="dark"] .theme-btn .i-moon { transform: none; opacity: 1; }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ============================================================
   LANDING PAGE — few sections, each landmark is part of the layout (no frames, no captions)
   ============================================================ */

.home main { overflow-x: clip; }

/* ASCII objects (assets/ascii3d.js) */
.ascii {
  display: block; margin: 0; white-space: pre; overflow: hidden; user-select: none; cursor: grab; touch-action: pan-y;
  font-family: var(--mono); font-weight: 500; line-height: 1; letter-spacing: 0; color: var(--ink); text-align: left; contain: strict;
}
.ascii:active { cursor: grabbing; }
.ascii.bare {                                   /* melts into the page: no box, soft edges */
  background: transparent;
  -webkit-mask-image: radial-gradient(75% 72% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(75% 72% at 50% 50%, #000 58%, transparent 100%);
}
.ascii.dim { color: var(--muted); }

/* hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 6rem var(--pad) 2.5rem; }
.hero-grid { max-width: var(--maxw); width: 100%; margin: 0 auto; display: grid; grid-template-columns: 0.95fr 1.15fr; gap: clamp(1rem, 3vw, 3rem); align-items: center; }
.cmd { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); min-height: 1.3em; }
.cmd .ps { color: var(--faint); margin-right: 0.5em; }
.cmd .caret { display: inline-block; width: 0.55em; height: 1.1em; background: var(--ink); vertical-align: -0.15em; animation: blink 1.1s steps(1) infinite; }
.hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.6rem); line-height: 0.95; letter-spacing: -0.055em; margin: 1.2rem 0 1.3rem; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: inline-block; animation: lineUp 1.1s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 0.24s; }
.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.15rem); color: var(--muted); max-width: 30rem; animation: fadeUp 1s var(--ease) 0.45s both; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.9rem; animation: fadeUp 1s var(--ease) 0.6s both; }
.hero-cta .btn-solid { margin: 0; }
.hero-art { position: relative; animation: fadeIn 1.4s ease 0.3s both; }
.hero-art .ascii { height: min(72svh, 640px); }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 1.6rem; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  display: flex; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: 0.7rem; color: var(--faint);
  animation: fadeIn 1s ease 1.2s both;
}
.hero-foot .scroll::after { content: ""; display: inline-block; width: 1px; height: 12px; background: currentColor; margin-left: 0.6rem; vertical-align: -2px; animation: pulse 1.6s ease-in-out infinite; }

/* sections */
.section { position: relative; padding: clamp(5rem, 11vw, 8rem) var(--pad); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.sec-no { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.section h2 { margin: 0.8rem 0 0; max-width: 15ch; }

/* intro video: the explainer plays inside a terminal window, like a program the club runs; never autoplays */
.intro { padding-top: clamp(3rem, 7vw, 5rem); }
.intro-head { display: grid; grid-template-columns: 1fr minmax(0, 24rem); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem); }
.intro-head .subtext { margin: 0; }
.player { margin: 0; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); overflow: hidden; outline: none;
  box-shadow: 0 40px 120px -50px rgba(0, 0, 0, 0.6); }
.player .term-bar .p-file { color: var(--muted); }
.player .p-now { margin-left: auto; color: var(--ink); white-space: nowrap; }
.p-stage { position: relative; aspect-ratio: 16 / 9; background: #0a0a0a; }
.p-stage video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #0a0a0a; cursor: pointer; }
.p-big {                                         /* the only way to start: a quiet console-style play key */
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.9rem; border: 0; cursor: pointer;
  color: #ededed; background: radial-gradient(60% 60% at 50% 50%, rgba(10, 10, 10, 0.15), rgba(10, 10, 10, 0.55));
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; transition: opacity 0.35s var(--ease);
}
.p-big-ico { width: clamp(64px, 8vw, 88px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(237, 237, 237, 0.55); background: rgba(10, 10, 10, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease); }
.p-big-ico svg { width: 38%; margin-left: 8%; }
.p-big:hover .p-big-ico, .p-big:focus-visible .p-big-ico { transform: scale(1.08); background: #ededed; color: #0a0a0a; border-color: #ededed; }
.p-big-label { padding: 0.25rem 0.6rem; border: 1px solid rgba(237, 237, 237, 0.25); border-radius: 999px; background: rgba(10, 10, 10, 0.5); }
.player.is-started:not(.is-ended) .p-big { opacity: 0; pointer-events: none; }
.p-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.7rem; border-top: 1px solid var(--hairline-soft); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.p-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.p-btn:hover, .p-btn:focus-visible { border-color: var(--hairline); background: var(--bg); outline: none; }
.p-btn svg { width: 16px; height: 16px; }
.p-btn .i-pause, .player.is-playing .p-btn .i-play, .p-btn .i-mute, .player.is-muted .p-btn .i-vol { display: none; }
.player.is-playing .p-btn .i-pause, .player.is-muted .p-btn .i-mute { display: block; }
.p-time { flex: none; padding: 0 0.5rem; font-variant-numeric: tabular-nums; }
.p-time [data-cur] { color: var(--ink); }
.p-scrub { position: relative; flex: 1; height: 34px; display: flex; align-items: center; margin: 0 0.4rem; }
.p-track { position: relative; width: 100%; height: 3px; background: var(--hairline); border-radius: 2px; transition: height 0.2s ease; }
.p-scrub:hover .p-track { height: 5px; }
.p-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--ink); border-radius: 2px; }
.p-head { position: absolute; top: 50%; left: calc(var(--p, 0) * 100%); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--ink); border-radius: 2px; }
.p-ticks i { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--faint-2); }
.p-scrub input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.p-tip { position: absolute; bottom: 100%; transform: translateX(-50%); margin-bottom: 4px; padding: 0.2rem 0.45rem; border-radius: 6px;
  background: var(--ink); color: var(--bg); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s ease; }
.p-scrub:hover .p-tip { opacity: 1; }
.player:fullscreen { border-radius: 0; display: flex; flex-direction: column; background: #0a0a0a; }
.player:fullscreen .p-stage { flex: 1; aspect-ratio: auto; }

/* what we do: three short lines, the Reichstag stands beside them */
.what { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.what-list { list-style: none; margin-top: 2.4rem; border-top: 1px solid var(--hairline); }
.what-list li { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1rem; align-items: baseline; padding: 1.3rem 0; border-bottom: 1px solid var(--hairline); }
.what-list .n { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.what-list strong { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.what-list span { color: var(--muted); font-size: 0.95rem; }
.what-list a { font-family: var(--mono); font-size: 0.74rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.what-list a:hover { text-decoration: underline; }
.what-art .ascii { height: clamp(380px, 48vw, 640px); -webkit-mask-image: linear-gradient(transparent, #000 8%, #000 90%, transparent); mask-image: linear-gradient(transparent, #000 8%, #000 90%, transparent); }

/* levels: one interactive scale */
.scale { margin-top: 2.6rem; }
.scale-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.scale-bar button {
  font: inherit; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); background: transparent; cursor: pointer;
  border: 0; border-top: 2px solid var(--hairline); padding: 0.9rem 0 0; text-align: left; transition: color 0.2s ease, border-color 0.3s ease;
}
.scale-bar button b { display: block; font-family: var(--sans); font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.05em; color: var(--faint); transition: color 0.2s ease; }
.scale-bar button:hover b, .scale-bar button.on b { color: var(--ink); }
.scale-bar button.on { border-top-color: var(--ink); color: var(--ink); }
.scale-info { margin-top: 1.4rem; min-height: 3.4em; max-width: 40rem; color: var(--muted); font-size: 1.02rem; }
.scale-info strong { color: var(--ink); font-weight: 600; }
.scale-cta { margin-top: 1.4rem; }

/* schedule: terminal with a live countdown */
.sched { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.term { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 0.8rem; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--hairline-soft); }
.term-bar .dots { display: flex; gap: 6px; } .term-bar .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--faint-2); display: block; }
.term-bar .live { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; }
.term-bar .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.term-body { padding: clamp(1.1rem, 3vw, 1.6rem); font-family: var(--mono); font-size: clamp(0.78rem, 1.3vw, 0.88rem); line-height: 1.9; }
.term-body .k { color: var(--faint); display: inline-block; min-width: 4.5em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hairline-soft); }
.countdown div { padding: 1.1rem 0.8rem; border-left: 1px solid var(--hairline-soft); text-align: center; }
.countdown div:first-child { border-left: 0; }
.countdown b { display: block; font-size: clamp(1.7rem, 4.4vw, 2.7rem); font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }

/* join: Victoria rises from the bottom-left edge of the section, cropped by it; the form stays in front */
#join { overflow: hidden; padding-bottom: clamp(8rem, 22vw, 20rem); }   /* room for Victoria below the heading */
#join .section-inner { position: relative; z-index: 1; }
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.join-side { position: relative; }
.ascii.join-art {                               /* 1.5x the box height (data-fit), top anchored, cut by the section's bottom edge */
  position: absolute; z-index: 0; left: 0; top: 30%; bottom: 0; width: min(56vw, 820px); height: auto;
  color: var(--muted);
  -webkit-mask-image: linear-gradient(to right, #000 50%, transparent 96%); mask-image: linear-gradient(to right, #000 50%, transparent 96%);
}
#join .apply-form { position: relative; box-shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.55); }
.join-side .subtext { margin-top: 1rem; max-width: 26rem; }
.apply-form { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); padding: clamp(1.4rem, 4vw, 2.2rem); display: flex; flex-direction: column; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 0.45rem; }
.field input, .field select {
  width: 100%; background: var(--bg); border: 1px solid var(--hairline); border-radius: 8px; color: var(--ink);
  font-family: var(--sans); font-size: 0.98rem; padding: 0.8rem 0.9rem; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%238a8a8a'/></svg>");
  background-repeat: no-repeat; background-position: right 0.9rem center;
}
.field input::placeholder { color: var(--faint-2); }
.field input:focus, .field select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(var(--ink-rgb), 0.08); }
.field select:invalid { color: var(--faint); }
.field option { color: var(--ink); background: var(--surface); }
.apply-form .btn-solid { width: 100%; margin-top: 0.4rem; }
.privacy { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.68rem; color: var(--faint); }
.form-note { display: none; margin-top: 1rem; font-size: 0.9rem; color: var(--ink); }
.form-note.visible { display: block; }
.form-note.error { color: var(--danger); }
.contact-line { margin-top: 1.4rem; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.contact-line a { color: var(--ink); }

/* footer */
.footer { border-top: 1px solid var(--hairline-soft); padding: 2.2rem var(--pad); font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.footer-in { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer .logo-mark { width: 20px; height: 20px; vertical-align: middle; margin-right: 0.5rem; }

/* motion */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.nav { animation: fadeIn 0.8s ease-out both; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 1080px) { .nav-links { gap: 1.1rem; } .nav-links a[href="#schedule"] { display: none; } }
@media (max-width: 960px) {
  .hero-grid, .what, .sched, .join-grid { grid-template-columns: 1fr; }
  .intro-head { grid-template-columns: 1fr; align-items: start; }
  .hero { padding-top: 5.5rem; padding-bottom: 4rem; }
  .hero-art .ascii { height: 46svh; }
  .what-art { order: -1; } .what-art .ascii { height: 300px; }
  #join { padding-bottom: 300px; }                /* room under the form for Victoria to rise from the edge */
  .ascii.join-art { top: auto; height: 380px; width: 100%; -webkit-mask-image: none; mask-image: none; }
  .hero-foot { display: none; }
}
@media (max-width: 860px) { .nav-links a:not(.btn-pill) { display: none; } .nav-links { gap: 0.6rem; } }
@media (max-width: 600px) {
  .p-bar { flex-wrap: wrap; row-gap: 0; } .p-scrub { order: -1; flex: 1 1 100%; margin: 0 0.2rem; } .p-time { margin-right: auto; }
  .player .term-bar .p-file { display: none; }
  .hero-cta .btn-solid, .hero-cta .btn-ghost { flex: 1 1 100%; }
  .scale-bar { gap: 3px; } .scale-bar button { font-size: 0.66rem; }
  .what-list li { grid-template-columns: 2.4rem 1fr; } .what-list a { grid-column: 2; }
  .countdown b { font-size: 1.6rem; }
  .nav-links .btn-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1 .line > span, .hero-lead, .hero-cta, .hero-art, .hero-foot, .nav { animation: none !important; }
  .cmd .caret, .logo-u .u-dot, .term-bar .live::before, .hero-foot .scroll::after { animation: none; }
}


/* ============================================================
   ACCOUNTS — nav icon, menu, login dialog, bottom bar, portal
   ============================================================ */

.nav-links .acct { margin-left: 0.2rem; }
.acct { position: relative; }
.acct-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--hairline); background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--accent); background: rgba(var(--ink-rgb), 0.06); }
.acct-btn svg { width: 18px; height: 18px; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 0.7rem); min-width: 200px; z-index: 80;
  background: var(--surface); border: 1px solid var(--hairline); padding: 0.35rem; display: none;
}
.acct-menu.open { display: block; }
.acct-menu .who {
  padding: 0.7rem 0.9rem 0.6rem; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--hairline-soft); margin-bottom: 0.3rem; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-menu .item {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink-2); cursor: pointer; text-decoration: none;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; padding: 0.85rem 0.9rem;
}
.acct-menu .item:hover, .acct-menu .item:focus-visible { background: rgba(var(--ink-rgb), 0.07); color: var(--ink); outline: none; }
.acct-menu .item.danger { color: var(--danger); }

/* log in dialog */
dialog.dk-dialog {
  margin: auto; width: min(440px, calc(100vw - 2rem)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--hairline); padding: clamp(1.6rem, 5vw, 2.4rem);
}
dialog.dk-dialog::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(3px); }
.dk-dialog h2 { font-size: 1.7rem; margin: 0.8rem 0 0.5rem; }
.dk-dialog .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.dk-dialog .x {
  position: absolute; top: 0.8rem; right: 0.9rem; width: 34px; height: 34px; background: none; border: 0; color: var(--muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.dk-dialog .x:hover { color: var(--ink); }
.id-input {
  width: 100%; background: transparent; border: 1px solid var(--hairline); color: var(--ink); outline: none; border-radius: 0;
  font-family: var(--serif); font-size: 1.55rem; letter-spacing: 0.18em; text-align: center; padding: 0.9rem 0.6rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.id-input:focus { border-color: rgba(var(--ink-rgb), 0.6); }
.id-input::placeholder { color: var(--faint-2); letter-spacing: 0.18em; }
.dk-dialog .btn-solid { width: 100%; margin-top: 1.2rem; }
.dk-dialog .btn-solid[disabled] { opacity: 0.4; cursor: not-allowed; }
.dk-dialog .err { min-height: 1.3rem; margin-top: 0.9rem; font-size: 0.85rem; color: var(--danger); text-align: center; }
.dk-dialog .alt { margin-top: 1rem; text-align: center; font-size: 0.8rem; color: var(--faint); line-height: 1.9; }
.dk-dialog .alt button, .dk-dialog .alt a {
  background: none; border: 0; color: var(--ink-2); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0;
}

/* "Are you registered?" bar */
.reg-bar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 0.9rem 1.1rem; flex-wrap: wrap; justify-content: center;
  width: max-content; max-width: calc(100vw - 1.5rem);
  background: rgba(var(--bg-rgb), 0.94); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); padding: 0.7rem 2.6rem 0.7rem 1.2rem; font-size: 0.82rem; color: var(--ink-2);
}
.reg-bar[hidden] { display: none; }
.reg-bar .q { color: var(--muted); }
.reg-bar button.lnk {
  background: none; border: 0; border-bottom: 1px solid var(--accent); color: var(--ink); cursor: pointer; padding: 0 0 1px;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
}
.reg-bar .x { position: absolute; right: 0.55rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: 1.25rem; cursor: pointer; }
.reg-bar .x:hover { color: var(--ink); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 1.6rem; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 120;
  background: var(--ink); color: var(--on-accent); padding: 0.8rem 1.3rem; font-size: 0.85rem; font-weight: 700; max-width: calc(100vw - 2rem); text-align: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- portal ---------- */
.p-main { max-width: var(--maxw); margin: 0 auto; padding: 7.2rem var(--pad) 5rem; }
.p-hidden { display: none !important; }
.p-loading { min-height: 60vh; display: grid; place-items: center; color: var(--faint); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; }

.p-banner {
  position: relative; border: 1px solid var(--hairline); background: rgba(var(--ink-rgb), 0.04);
  padding: 1.3rem 3.2rem 1.3rem 1.5rem; margin-bottom: 2.6rem;
}
.p-banner p { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 1rem; }
.p-banner .row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.p-banner .x { position: absolute; top: 0.55rem; right: 0.7rem; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.4rem; }
.p-banner .x:hover { color: var(--ink); }
.btn-line {
  background: transparent; color: var(--ink); border: 1px solid var(--accent); cursor: pointer;
  font-family: var(--sans); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; padding: 0.85rem 1.3rem;
  transition: background 0.2s ease, color 0.2s ease; text-decoration: none; display: inline-block;
}
.btn-line:hover { background: var(--accent); color: var(--on-accent); }
.btn-line.solid { background: var(--accent); color: var(--on-accent); }
.btn-line.solid:hover { background: transparent; color: var(--ink); }

.p-hello { font-size: clamp(2.1rem, 6vw, 3.8rem); line-height: 1.12; margin: 0.6rem 0 0.4rem; word-break: break-word; }
.p-welcome-note { color: var(--muted); margin-bottom: 1.8rem; }

.idcard {
  border: 1px solid var(--hairline); padding: 1.4rem 1.6rem; margin: 1.6rem 0 3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.idcard.is-new { border-color: rgba(var(--ink-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), 0.06); }
.idcard .lbl { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.idcard .num { font-family: var(--serif); font-size: clamp(1.6rem, 5.5vw, 2.4rem); letter-spacing: 0.14em; font-variant-numeric: lining-nums tabular-nums; }
.idcard .hint { color: var(--faint); font-size: 0.78rem; margin-top: 0.3rem; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 0.55rem; background: transparent; color: var(--ink); border: 1px solid var(--hairline); cursor: pointer;
  font-family: var(--sans); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; padding: 0.8rem 1.1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.copy-btn:hover { border-color: var(--accent); background: rgba(var(--ink-rgb), 0.06); }
.copy-btn svg { width: 16px; height: 16px; }

.p-section { margin-top: 3rem; }
.p-section > .eyebrow { margin-bottom: 1.2rem; }
.p-sub { color: var(--muted); font-size: 0.9rem; margin: -0.4rem 0 1.2rem; }
.p-card { border: 1px solid var(--hairline); padding: 1.6rem; }
.p-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin-bottom: 0.4rem; }
.p-card p { color: var(--muted); font-size: 0.9rem; }
.p-event { display: grid; grid-template-columns: 130px 1fr auto; gap: 1.2rem; align-items: baseline; }
.p-event .day { font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.p-event .meta { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--faint); }
.p-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.chan { border: 1px solid var(--hairline); padding: 1.5rem; display: flex; gap: 1.3rem; align-items: center; }
.chan img { width: 128px; height: 128px; flex: none; border-radius: 6px; }
.chan h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: 0.3rem; }
.chan p { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.9rem; }
.p-test { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.p-test .tag { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--hairline-soft); padding: 0.4rem 0.8rem; }
.p-off { color: var(--faint); font-size: 0.9rem; border: 1px dashed var(--hairline); padding: 1.2rem 1.4rem; }
.p-off button { background: none; border: 0; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }

/* settings */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 1.1rem 0; border-top: 1px solid var(--hairline-soft); }
.set-row:first-of-type { border-top: 0; }
.set-row .t { font-size: 0.95rem; color: var(--ink); }
.set-row .d { font-size: 0.8rem; color: var(--faint); margin-top: 0.15rem; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 100%; height: 100%; }
.switch i { position: absolute; inset: 0; border: 1px solid var(--hairline); border-radius: 999px; transition: background 0.2s ease, border-color 0.2s ease; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform 0.2s ease, background 0.2s ease; }
.switch input:checked + i { background: rgba(var(--ink-rgb), 0.14); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.set-select { background: transparent; color: var(--ink); border: 1px solid var(--hairline); padding: 0.6rem 0.8rem; font-family: var(--sans); font-size: 0.9rem; border-radius: 0; }
.set-select option { background: var(--surface); }
.set-links { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.6rem; }
.set-links .btn-line { font-size: 0.58rem; padding: 0.7rem 1rem; }
.btn-line.danger { border-color: rgba(var(--danger-rgb), 0.6); color: var(--danger); }
.btn-line.danger:hover { background: var(--danger); color: var(--on-accent); }

@media (max-width: 780px) {
  .p-channels { grid-template-columns: 1fr; }
  .p-event { grid-template-columns: 1fr; gap: 0.3rem; }
  .chan { flex-direction: column; text-align: center; }
  .idcard { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .reg-bar { bottom: 0.6rem; padding-left: 0.9rem; font-size: 0.78rem; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* dialog polish */
dialog.dk-dialog::backdrop { background: rgba(0, 0, 0, 0.88); }
html:has(dialog[open]) { overflow: hidden; }
.dk-dialog .sub { color: var(--ink-2); text-wrap: balance; }
.dk-dialog .alt { color: var(--muted); }
.dk-dialog .err { font-weight: 700; }
.dk-dialog .x { width: 40px; height: 40px; top: 0.5rem; right: 0.5rem; font-size: 1.7rem; }
.id-input[aria-invalid="true"] { border-color: var(--danger); }
@media (max-width: 780px) { .acct-btn { width: 44px; height: 44px; } }

/* welcome dialog: the new ID */
.idbig {
  border: 1px solid rgba(var(--ink-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), 0.06); text-align: center; user-select: all;
  font-family: var(--serif); font-size: clamp(1.7rem, 8vw, 2.5rem); letter-spacing: 0.14em; font-variant-numeric: lining-nums tabular-nums;
  padding: 1.3rem 0.5rem; margin: 0.4rem 0 1rem;
}

/* ============================================================
   v2 overrides for the account UI, portal and dialogs (monochrome, rounded, mono IDs)
   ============================================================ */
.acct-btn { width: 34px; height: 34px; }
.acct-menu, dialog.dk-dialog, .reg-bar, .p-banner, .idcard, .p-card, .chan, .toast { border-radius: 12px; }
.acct-menu { background: var(--surface); box-shadow: 0 20px 50px -25px rgba(var(--ink-rgb), 0.4); }
.acct-menu .item { font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 0.78rem; border-radius: 8px; }
dialog.dk-dialog { background: var(--surface); box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.5); }
dialog.dk-dialog::backdrop { background: rgba(var(--bg-rgb), 0.7); backdrop-filter: blur(6px); }
.dk-dialog h2 { letter-spacing: -0.03em; }
.id-input, .idcard .num, .idbig { font-family: var(--mono); letter-spacing: 0.08em; }
.id-input { border-radius: 10px; }
.idbig { border-radius: 12px; border-color: var(--ink); box-shadow: none; }
.reg-bar { background: rgba(var(--bg-rgb), 0.9); font-size: 0.8rem; }
.reg-bar button.lnk { font-family: var(--mono); letter-spacing: 0.02em; text-transform: none; font-weight: 500; font-size: 0.78rem; }
.btn-line { border-radius: var(--radius); font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 0.76rem; border-color: var(--hairline); }
.btn-line:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.copy-btn { border-radius: 8px; font-family: var(--mono); letter-spacing: 0.02em; text-transform: none; font-weight: 500; }
.toast { background: var(--ink); color: var(--bg); font-family: var(--mono); font-weight: 500; }
.privacy { text-transform: none; letter-spacing: 0; text-align: left; }

/* ---- sign-up / log-in with Google or Microsoft (api/auth.js) ---- */
.oauth { display: grid; gap: 0.6rem; margin-top: 0.2rem; }
.oauth[hidden], .btn-oauth[hidden], .oauth-login[hidden] { display: none; }
.oauth-note { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 0.2rem; }
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%;
  padding: 0.85rem 1rem; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.3s var(--ease);
}
.btn-oauth:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-oauth svg { width: 20px; height: 20px; flex: none; }
.oauth-login { display: grid; gap: 0.55rem; margin-top: 1rem; }
.oauth-login .or { display: flex; align-items: center; gap: 0.8rem; font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.oauth-login .or::before, .oauth-login .or::after { content: ""; flex: 1; height: 1px; background: var(--hairline-soft); }
.use-oauth .field[hidden] { display: none; }
.apply-form [hidden] { display: none !important; }

/* ---- live field checks (join form, member card) ---- */
.field-msg { min-height: 0; margin-top: 0.4rem; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.field-msg:empty { margin-top: 0; }
.field-msg.err { color: var(--danger); }
.field-msg.ok { color: var(--ok); }
.field-msg.warn { color: var(--ink); }
.field input[aria-invalid="true"], .a-field input[aria-invalid="true"] { border-color: var(--danger); }
.msg-btn { font: inherit; font-size: 0.7rem; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 6px; padding: 0.15rem 0.5rem; cursor: pointer; }
.msg-btn.ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }

/* ---- log-in with the member ID (assets/account.js, api/login.js) ---- */
.id-login .btn-solid { margin-top: 0.2rem; }
.id-login .hint { margin: 0; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-align: center; }
.cf-box { max-width: 440px; }
.cf-box .btn-solid { width: 100%; margin-top: 1.4rem; }
.cf-box .err { min-height: 1.3rem; margin-top: 0.9rem; font-size: 0.85rem; color: var(--danger); }
