:root {
  color-scheme: dark;
  --bg: #050607;
  --panel: #111418;
  --ink: #f4f7fa;
  --soft-ink: #d1d8df;
  --muted: #a6b0ba;
  --faint: #737e89;
  --line: #282e34;
  --line-strong: #434c55;
  --black: #030405;
  --white: #f5f8fa;
  --accent: #52f2ff;
  --neon-lime: #c8ff3d;
  --neon-pink: #ff4fc3;
  --danger: #ff7979;
  --success: #c8ff3d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #050607 0%, #0c1014 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, input { font: inherit; }
button, a.action { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.72; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(82,242,255,0.82);
  outline-offset: 2px;
}

h1, h2, h3, p { margin: 0; }
h1 { letter-spacing: 0; }

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(420px, 0.96fr) minmax(420px, 1.04fr);
  min-height: 100vh;
  overflow: hidden;
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(30px, 4.2vw, 72px);
  color: var(--white);
  background:
    linear-gradient(135deg, #050607, #101418),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 88px);
  isolation: isolate;
}

.auth-art::before,
.auth-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  animation: slow-float 9s ease-in-out infinite;
}
.auth-art::before { width: 58vw; height: 58vw; right: -28vw; top: 11vh; }
.auth-art::after { width: 28vw; height: 28vw; left: -13vw; bottom: -10vw; animation-delay: 1.6s; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand.light { color: var(--white); }
.brand-accent { color: inherit; }
.brand-logo {
  display: block;
  width: 154px;
  max-width: 44vw;
  height: auto;
  object-fit: contain;
}
.brand.light .brand-logo {
  filter: brightness(0) invert(1);
}
.side .brand-logo {
  width: 132px;
  filter: brightness(0) invert(1);
}
.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: currentColor;
  color: var(--white);
  font-size: 16px;
}
.brand.light .mark { background: var(--white); color: var(--black); }

.auth-caption {
  max-width: 760px;
  margin-top: auto;
  padding-bottom: 2vh;
}
.eyebrow, .tiny-overline, .nav-label {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.page-top .eyebrow { color: var(--neon-pink); }
.tiny-overline { color: var(--accent); }
.auth-caption .eyebrow { color: var(--accent); }
.auth-caption h1 {
  max-width: 820px;
  margin-top: 16px;
  font-size: clamp(40px, 4.5vw, 66px);
  line-height: 1.03;
  font-weight: 860;
  color: var(--white);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.auth-caption p {
  max-width: 560px;
  margin-top: 26px;
  color: rgba(255,255,255,0.66);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.55;
}
.hero-case {
  width: min(660px, 100%);
  margin-top: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255,255,255,0.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
}
.hero-case span {
  display: block;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-case strong {
  display: block;
  max-width: 560px;
  margin-top: 10px;
  color: var(--white);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.13;
}
.hero-case small {
  display: block;
  max-width: 560px;
  margin-top: 10px;
  color: rgba(255,255,255,0.58);
  line-height: 1.55;
}
.hero-case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-case-metrics b {
  display: block;
  color: var(--white);
  font-size: 24px;
  line-height: 1;
}
.hero-case-metrics em {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.48);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}
.art-rule { width: 120px; height: 1px; margin: 24px 0 12px; background: rgba(255,255,255,0.28); }
.art-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.art-tags span {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
}
.auth-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(24px, 3vw, 42px);
  background: #171b20;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: panel-rise 0.62s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}
.auth-card h2 {
  margin-top: 12px;
  font-size: clamp(32px, 2.8vw, 42px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}
.muted { color: var(--muted); line-height: 1.65; }
.auth-card .muted { margin-top: 10px; font-size: 14px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 24px 0 20px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #222a32;
}
.auth-tabs button {
  border: 0;
  border-radius: 11px;
  padding: 13px 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 820;
}
.auth-tabs button.on { color: var(--black); background: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.24); }
label {
  display: grid;
  gap: 9px;
  margin-top: 13px;
  color: var(--soft-ink);
  font-size: 13px;
  font-weight: 780;
}
input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 12px 14px;
  color: var(--ink);
  background: #0a0d11;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 4px rgba(82,242,255,0.2); }
.primary, .action, .flow-link {
  border: 1px solid var(--accent);
  border-radius: 13px;
  padding: 12px 15px;
  color: var(--black);
  background: var(--accent);
  font-weight: 820;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.primary:hover, .action:hover, .flow-link:hover { transform: translateY(-2px); border-color: var(--neon-pink); background: var(--neon-pink); box-shadow: 0 0 24px rgba(255,79,195,0.25); }
.full { width: 100%; margin-top: 20px; }
.primary.full { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; }
.form-message { min-height: 20px; margin-top: 16px; color: var(--danger); font-size: 13px; font-weight: 760; }
.footnote { margin-top: 18px; font-size: 12px; }

#workspace { min-height: 100vh; }
.side {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 288px;
  padding: 28px 20px;
  color: #d8d8d8;
  background: var(--black);
  border-right: 1px solid #252d36;
}
.side .brand { color: var(--white); font-size: 16px; }
.side .mark { background: var(--white); color: var(--black); }
.nav-label { margin: 42px 12px 12px; color: #a0aab4; }
#nav { display: grid; gap: 7px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 14px;
  color: #adadad;
  background: transparent;
  text-align: left;
  font-weight: 780;
  transition: transform 0.22s ease, background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.nav-link:hover { transform: translateX(4px); color: var(--white); background: #1b222a; }
.nav-link.active { color: var(--accent); background: #102126; border-color: #23636a; }
.symbol { width: 24px; text-align: center; color: currentColor; }
.side-bottom { display: grid; gap: 16px; margin-top: auto; padding-top: 22px; border-top: 1px solid #2b323a; }
.signed-user { display: flex; align-items: center; gap: 12px; }
.signed-user small { display: block; margin-top: 3px; color: #8d8d8d; }
.avatar, .top-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--black);
  background: var(--accent);
  font-weight: 900;
}
.side-logout {
  border: 1px solid #4c5965;
  border-radius: 13px;
  padding: 12px 14px;
  color: var(--white);
  background: transparent;
  text-align: left;
  font-weight: 820;
  transition: background-color 0.22s ease, transform 0.22s ease;
}
.side-logout:hover { border-color: var(--neon-pink); color: var(--neon-pink); background: #1b101b; transform: translateY(-1px); }
.main { min-height: 100vh; margin-left: 288px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 0 clamp(22px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(7,9,11,0.96);
  backdrop-filter: blur(18px);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 820; letter-spacing: 0.12em; text-transform: uppercase; }
.breadcrumb strong { color: var(--ink); }
.top-right { display: flex; align-items: center; gap: 14px; }
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--soft-ink);
  background: #1b2026;
  font-size: 12px;
  font-weight: 760;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neon-lime); animation: pulse-dot 2.4s ease-out infinite; }
.content { max-width: 1380px; margin: 0 auto; padding: clamp(26px, 4vw, 54px); }
.page { display: grid; gap: 24px; animation: page-in 0.34s ease both; }
.page-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 10px 0 4px; }
.page-top h1 { margin-top: 10px; font-size: clamp(36px, 4.4vw, 62px); line-height: 0.96; font-weight: 860; }
.page-top p { max-width: 720px; margin-top: 12px; }
.grid2, .grid3 { display: grid; gap: 18px; }
.grid2 { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof-strip {
  display: grid;
  grid-template-columns: auto minmax(60px, auto) auto minmax(60px, auto) auto minmax(60px, auto);
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: #1b2026;
  box-shadow: var(--shadow-soft);
}
.proof-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.proof-strip b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.case-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(26px, 4vw, 46px);
  color: var(--white);
  background: linear-gradient(115deg, #07090b 0%, #111820 75%, #18242b 100%);
  box-shadow: var(--shadow);
}
.case-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
}
.case-panel span {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.case-panel h3 {
  position: relative;
  z-index: 1;
  max-width: 740px;
  margin-top: 14px;
  color: var(--white);
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.02;
  font-weight: 860;
}
.case-panel p {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin-top: 16px;
  color: rgba(255,255,255,0.62);
  font-size: 15px;
  line-height: 1.7;
}
.case-panel.featured { background: linear-gradient(115deg, #080a0c, #141b21 68%, #1b272e); }
.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 2.4vw, 32px);
  background: #111418;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #357a80;
  box-shadow: var(--shadow), 0 0 22px rgba(82,242,255,0.08);
}
.card h3 {
  font-size: 18px;
  font-weight: 820;
}
.stat { display: grid; gap: 8px; }
.stat .sym { color: var(--muted); font-size: 22px; }
.stat strong { min-height: 1.05em; font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-weight: 760; }
.flow-card, .file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin-top: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0e1115;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}
.file-row { grid-template-columns: minmax(0, 1fr) auto; }
.flow-card:hover, .file-row:hover {
  transform: translateY(-2px);
  border-color: #357a80;
  background: #172126;
}
.flow-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 15px;
  color: var(--black);
  background: var(--accent);
  font-weight: 900;
}
.flow-card p, .file-row p {
  margin-top: 5px;
  color: var(--muted);
}
.flow-link { white-space: nowrap; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #23636a;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent);
  background: #102126;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}
.chip.neutral {
  border-color: var(--line-strong);
  color: var(--muted);
  background: #1a1f24;
}
.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--neon-pink);
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--soft-ink);
  background: #111418;
  line-height: 1.65;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #11161b;
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}
th {
  color: var(--accent);
  background: #191f24;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
td b { color: var(--ink); }
td small { color: var(--muted); }
tbody tr { transition: background-color 0.18s ease; }
tbody tr:hover { background: #1b242c; }
.empty { padding: 32px; color: var(--muted); text-align: center; }
.judge-input { min-width: 96px; }
details pre {
  max-width: 420px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 11px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 48px));
  transform: translateY(18px);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 14px 17px;
  color: var(--black);
  background: var(--accent);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
code { color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; }

.journey-board { max-width: 980px; }
.journey-summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.journey-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--neon-lime);
  font-size: 58px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.journey-summary small {
  color: var(--muted);
  font-size: 20px;
}
.mission-label {
  border: 1px solid #34511d;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--neon-lime);
  background: #111a0b;
  font-size: 11px;
  font-weight: 850;
}
.journey-progress {
  height: 5px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #252b30;
}
.journey-progress span {
  display: block;
  width: var(--journey-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--neon-lime));
  box-shadow: 0 0 16px rgba(82,242,255,0.48);
  animation: progress-fill 900ms cubic-bezier(0.2,0.8,0.2,1) both;
}
.journey-steps { position: relative; }
.journey-steps::before {
  content: "";
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 23px;
  width: 2px;
  background: linear-gradient(var(--accent), #31383d 65%);
  opacity: 0.55;
}
.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease var(--step-delay), transform 600ms cubic-bezier(0.2,0.8,0.2,1) var(--step-delay);
}
.journey-step:last-child { border-bottom: 0; }
.journey-step.is-visible { opacity: 1; transform: translateY(0); }
.journey-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #4a555e;
  border-radius: 50%;
  color: var(--muted);
  background: #0a0d10;
  font-size: 13px;
  font-weight: 900;
}
.journey-step.complete .journey-node {
  border-color: var(--neon-lime);
  color: #080a05;
  background: var(--neon-lime);
  box-shadow: 0 0 20px rgba(200,255,61,0.26);
  animation: milestone-pulse 2.6s ease-out infinite;
}
.journey-copy > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.journey-step.complete .journey-copy > span { color: var(--neon-lime); }
.journey-copy h2 { margin-top: 5px; font-size: 20px; }
.journey-copy p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.journey-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #2d6469;
  border-radius: 7px;
  padding: 10px 13px;
  color: var(--accent);
  background: #0c171a;
  font-size: 12px;
  font-weight: 850;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.journey-action:hover {
  transform: translateX(2px);
  border-color: var(--accent);
  background: #102126;
  box-shadow: 0 0 18px rgba(82,242,255,0.12);
}
.fold-stack { display: grid; align-content: start; gap: 14px; }
.fold-card { overflow: hidden; padding: 0; }
.fold-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 22px 24px;
  cursor: pointer;
  list-style: none;
}
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary > span:first-child { display: grid; gap: 7px; }
.fold-card > summary b { color: var(--ink); font-size: 17px; }
.fold-card > summary small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.fold-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  user-select: none;
  transition: border-color 180ms ease, background 180ms ease;
}
.fold-chevron::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 180ms ease; }
.fold-card[open] > summary { border-bottom: 1px solid var(--line); }
.fold-card[open] .fold-chevron { border-color: var(--accent); background: #102126; }
.fold-card[open] .fold-chevron::before { transform: translateY(2px) rotate(225deg); }
.fold-card[open] .fold-body { animation: fold-in 220ms ease both; }
.fold-body { padding: 20px 24px 24px; }
.fold-body p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.fold-body .action { margin-top: 16px; }
.recent-section { margin-top: 6px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { font-size: 22px; }
.presentation-card { max-width: 850px; }
.presentation-heading { display: flex; align-items: center; gap: 16px; }
.presentation-heading h2 { margin-top: 4px; font-size: 24px; }
.presentation-drop {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 30px 18px;
  border: 1px dashed #32656c;
  border-radius: 10px;
  text-align: center;
  background: #0a1013;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.presentation-drop.dragging { border-color: var(--neon-lime); background: #111a0b; box-shadow: inset 0 0 24px rgba(200,255,61,0.08); }
.drop-symbol { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 24px; }
.presentation-drop strong { font-size: 16px; }
.presentation-drop > span:not(.drop-symbol) { color: var(--muted); font-size: 12px; }
.presentation-latest { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.presentation-latest small { color: var(--muted); }

.flow-num { color: var(--black); background: var(--accent); box-shadow: 0 0 16px rgba(82,242,255,0.14); }
.chip:not(.neutral) { border-color: #34511d; color: var(--neon-lime); background: #111a0b; }
.notice { border-left-color: var(--neon-pink); }
.toast { border-color: var(--accent); color: var(--black); background: var(--accent); }

.word {
  display: inline-block;
  white-space: nowrap;
}
.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.38em);
  animation: letter-in 0.5s cubic-bezier(0.2,0.9,0.28,1) forwards;
  will-change: transform, opacity;
}
.sentence-reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: sentence-in 0.64s ease forwards;
  animation-delay: var(--delay, 700ms);
}
.stagger-in {
  opacity: 0;
  transform: translateY(14px);
  animation: stagger-in 0.52s cubic-bezier(0.2,0.75,0.25,1) forwards;
  animation-delay: var(--delay, 0ms);
}
.primary.loading { position: relative; color: transparent; pointer-events: none; }
.primary.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

@keyframes panel-rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes letter-in { to { opacity: 1; transform: translateY(0); } }
@keyframes sentence-in { to { opacity: 1; transform: translateY(0); } }
@keyframes stagger-in { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-dot { 70% { box-shadow: 0 0 0 9px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
@keyframes milestone-pulse { 70% { box-shadow: 0 0 0 7px rgba(200,255,61,0); } 100% { box-shadow: 0 0 0 0 rgba(200,255,61,0); } }
@keyframes progress-fill { from { width: 0; } to { width: var(--journey-progress); } }
@keyframes fold-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slow-float { 50% { transform: translate3d(0,-18px,0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .letter, .sentence-reveal, .stagger-in { opacity: 1; transform: none; }
  .journey-step { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .auth-wrap { height: 100svh; min-height: 560px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-art { min-height: 0; padding: 18px clamp(20px, 5vw, 48px) 8px; }
  .auth-caption { margin-top: 16px; padding-bottom: 0; }
  .auth-caption h1 { max-width: 780px; margin-top: 8px; font-size: clamp(28px, 4vw, 38px); line-height: 1.08; }
  .auth-caption p, .hero-case, .art-rule, .art-tags { display: none; }
  .auth-panel { min-height: 0; padding: 12px 24px 24px; }
  .auth-card { padding: 24px 28px; }
  .auth-card h2 { margin-top: 8px; font-size: clamp(30px, 4vw, 38px); }
  .auth-card .muted { margin-top: 8px; }
  .auth-tabs { margin: 20px 0 16px; }
  label { margin-top: 12px; }
  input { padding: 11px 13px; }
  .full { margin-top: 16px; }
  .footnote { margin-top: 14px; font-size: 11px; }
  .side { position: static; width: auto; min-height: auto; }
  .side-bottom { display: none; }
  #nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main { margin-left: 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .journey-summary strong { font-size: 46px; }
  .journey-step { grid-template-columns: 42px minmax(0,1fr); gap: 13px; padding: 17px 0; }
  .journey-steps::before { left: 20px; }
  .journey-node { width: 42px; height: 42px; }
  .journey-action { grid-column: 2; justify-self: start; padding: 8px 11px; }
  .journey-copy h2 { font-size: 18px; }
  .presentation-drop { padding: 24px 14px; }
}

@media (max-width: 620px) {
  .auth-art { padding: 14px 20px 6px; }
  .auth-caption { margin-top: 12px; }
  .auth-caption h1 { font-size: 27px; line-height: 1.06; }
  .auth-panel { padding: 8px 16px 16px; }
  .auth-card { border-radius: 16px; padding: 20px; }
  .auth-tabs { margin: 16px 0 12px; }
  .auth-tabs button { padding: 10px; }
  .footnote { margin-top: 10px; }
  .topbar { min-height: 64px; padding: 0 16px; }
  .status-indicator { display: none; }
  .content { padding: 20px 14px 42px; }
  .page-top { align-items: flex-start; }
  .page-top h1 { font-size: 34px; }
  #nav { grid-template-columns: 1fr; }
  .proof-strip { grid-template-columns: 1fr 1fr; border-radius: 20px; }
  .flow-card, .file-row { grid-template-columns: 1fr; align-items: stretch; }
}

.mapping-dialog { width: min(1240px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 40px); padding: 28px; border: 1px solid var(--line, #ddd); border-radius: 20px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 90px #0004; }
.mapping-dialog::backdrop { background: #121b24a6; backdrop-filter: blur(3px); }
.mapping-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.mapping-heading h2 { margin: 8px 0; font-size: 28px; }
.mapping-heading p { color: var(--muted); overflow-wrap: anywhere; }
.mapping-intro, .mapping-footnote { color: var(--muted); line-height: 1.65; margin: 16px 0; font-size: 13px; }
.mapping-footnote code { overflow-wrap: anywhere; }
.mapping-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; font-size: 12px; }
.mapping-summary span { border-radius: 7px; padding: 8px 10px; background: #20262d; }
.mapping-summary .mapping-good { background: #143122; color: #b9f7c9; }
.mapping-summary .mapping-problem { background: #3b1e25; color: #ffb4bb; }
.mapping-summary .mapping-review { background: #372e18; color: #ffe19a; }
.mapping-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.mapping-table { width: 100%; min-width: 780px; border-collapse: collapse; table-layout: fixed; }
.mapping-table th:nth-child(1) { width: 22%; }.mapping-table th:nth-child(2) { width: 32%; }.mapping-table th:nth-child(3) { width: 25%; }.mapping-table th:nth-child(4) { width: 21%; }
.mapping-table tbody th { text-align: left; font-weight: 400; text-transform: none; letter-spacing: normal; }
.mapping-table th, .mapping-table td { padding: 16px 12px; vertical-align: top; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }
.mapping-table select { width: 100%; max-width: 100%; padding: 10px 7px; border: 1px solid var(--line-strong); border-radius: 7px; background: #0a0d11; color: var(--ink); font: inherit; font-size: 12px; }
.mapping-table small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 8px; }
.mapping-table [aria-invalid="true"] { border-color: #b92530; }
.mapping-row.mapping-review { background: #252317; }.mapping-row.mapping-problem { background: #2e1c23; }.mapping-row.mapping-ignored { background: #151a20; }
.mapping-badge { display: block; font-size: 12px; font-weight: 650; line-height: 1.6; }.mapping-review .mapping-badge { color: #ffe19a; }.mapping-problem .mapping-badge { color: #ffb4bb; }.mapping-accepted .mapping-badge { color: #b9f7c9; }
.mapping-dialog .mapping-review-check, .mapping-dialog .mapping-remember { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; cursor: pointer; }
.mapping-dialog input[type="checkbox"] { width: 17px; height: 17px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
.mapping-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; }
.mapping-actions { display: flex; gap: 12px; }.mapping-dialog button:disabled { opacity: .5; cursor: not-allowed; }
.mapping-error { background: #3b1e25; color: #ffb4bb; padding: 14px; border-radius: 8px; line-height: 1.65; }
.mapping-error p { margin: 8px 0 14px; }
.mapping-error code { overflow-wrap: anywhere; color: var(--ink); }
.mapping-alignment-examples { padding-left: 22px; margin: 14px 0; }
.mapping-alignment-examples li { margin: 10px 0; }
.mapping-dataset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.mapping-dataset summary { cursor: pointer; color: var(--soft-ink); }
.mapping-trace-link, .mapping-forget { padding: 5px 0; border: 0; background: none; color: var(--accent); text-decoration: underline; font-size: 12px; cursor: pointer; }
.mapping-dialog :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media(max-width: 620px) { .mapping-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; border-radius: 12px; }.mapping-heading h2 { font-size: 24px; }.mapping-actions { width: 100%; }.mapping-actions button { flex: 1; } }

.mapping-table tbody th { background: transparent; color: var(--ink); }
.page { grid-template-columns: minmax(0, 1fr); }
.page > *, .grid2 > *, .page-top > div { min-width: 0; }
.page-top > div { overflow-wrap: anywhere; }
@media(max-width: 720px) {
  .mapping-table { min-width: 0; table-layout: auto; }
  .mapping-table thead { display: none; }
  .mapping-table tbody, .mapping-table tr, .mapping-table td, .mapping-table tbody th { display: block; width: 100%; }
  .mapping-table tr { padding: 10px; border-bottom: 1px solid var(--line); }
  .mapping-table th:nth-child(n) { width: 100%; }
  .mapping-table td, .mapping-table tbody th { padding: 10px 6px; border: 0; }
  .mapping-table td::before { content: attr(data-label); display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
}

@media (max-height: 640px) {
  .auth-wrap { min-height: 0; }
  .auth-art { padding-top: 10px; }
  .auth-caption { margin-top: 8px; }
  .auth-caption h1 { font-size: 25px; }
  .auth-panel { padding-top: 6px; padding-bottom: 8px; }
  .auth-card { padding-top: 16px; padding-bottom: 16px; }
  .auth-tabs { margin-top: 12px; margin-bottom: 10px; }
  label { margin-top: 9px; }
  .full { margin-top: 12px; }
  .form-message { min-height: 14px; margin-top: 8px; }
  .footnote { margin-top: 8px; }
}

.comparison-counts { display:flex;flex-wrap:wrap;gap:12px;margin:22px 0; }.comparison-counts span { padding:15px;background:#20262d;border-radius:8px; }.comparison-counts b { color:var(--accent); }.comparison-output>p { font-size:13px;color:var(--muted);line-height:1.7; }.comparison-metrics { min-width:1000px; }.comparison-field-label { max-width:430px;margin:22px 0; }.comparison-field { padding:12px;background:var(--panel);color:var(--ink);border:1px solid var(--line-strong);border-radius:8px; }.comparison-chart svg { width:100%;max-height:300px; }.comparison-chart p { font-size:12px;color:var(--muted); }.comparison-result-key { color:var(--accent); }.comparison-reference-key { color:var(--neon-lime); }.comparison-unmatched { white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px; }.comparison-output [data-export] { margin-top:20px; }.comparison-dialog .mapping-table-wrap { margin:18px 0; }

.comparison-metrics tbody th { text-transform:none;letter-spacing:normal;background:transparent; }.comparison-metrics small { display:block;color:var(--muted);margin-top:5px; }

.card .mapping-footnote { overflow-wrap:anywhere; }

.official-vfm-metric-row>td { padding:10px 14px; }.official-vfm-metric-row summary { cursor:pointer;color:var(--accent); }.official-vfm-policy p { line-height:1.7;margin:15px 0;color:var(--muted); }

.vfm-ranking-controls { display:flex;align-items:end;flex-wrap:wrap;gap:14px;margin-bottom:20px; }.vfm-ranking-controls label { flex:1 1 170px;min-width:0;margin:0; }.vfm-ranking-control { width:100%;padding:12px;background:var(--panel);color:var(--ink);border:1px solid var(--line-strong);border-radius:9px;font:inherit; }.vfm-ranking-control:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }.vfm-active-metric { background:rgba(82,242,255,.08); }.vfm-unranked { color:var(--muted); }.vfm-metric-leaderboard td small { display:block;margin-top:5px; }.vfm-metric-leaderboard td { vertical-align:top; }.vfm-metric-leaderboard th { white-space:nowrap; }#vfm-ranking-status { color:var(--muted);font-size:13px;line-height:1.7;margin-bottom:20px; }

.vfm-metric-leaderboard { table-layout:fixed;min-width:850px; }.vfm-metric-leaderboard>thead>tr>th:nth-child(1) { width:6%; }.vfm-metric-leaderboard>thead>tr>th:nth-child(2) { width:20%; }.vfm-metric-leaderboard td { overflow-wrap:anywhere; }.vfm-metric-leaderboard .official-vfm-metric-row td { overflow-wrap:normal; }

.vfm-point-caps { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px; }.vfm-point-caps>div { padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--panel); }.vfm-point-caps span,.vfm-point-caps small { display:block;color:var(--muted); }.vfm-point-caps strong { display:block;font-size:25px;color:var(--accent);margin:8px 0; }.vfm-point-caps small { font-size:12px;line-height:1.6; }.official-vfm-metric-row small { display:block;color:var(--muted);margin-top:5px; }.official-vfm-policy summary { cursor:pointer;color:var(--accent); }.vfm-metric-leaderboard>thead>tr>th { white-space:normal; }.vfm-metric-leaderboard { min-width:800px; }@media(max-width:720px){.vfm-point-caps{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.vfm-point-caps>div{padding:15px}}

.scoring-allocation p { margin:12px 0;line-height:1.7; }.allocation-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:20px; }.allocation-grid>span { padding:14px;border:1px solid var(--line);border-radius:8px; }.allocation-grid b,.allocation-grid small { display:block;margin-top:6px; }.allocation-grid small { color:var(--muted); }.leaderboard-sort { display:block;max-width:460px;margin:20px 0; }.overall-leaderboard { min-width:740px; }.overall-leaderboard small { display:block;color:var(--muted);margin-top:5px; }.pta-leaderboard { min-width:850px; }.pta-ranking-section,.vfm-ranking-section { margin-top:32px; }.pta-ranking-section>p,.vfm-ranking-section>p { margin:12px 0 20px;line-height:1.6; }.pta-policy p,.pta-details p { color:var(--muted);line-height:1.7;margin-top:15px; }.pta-policy summary,.pta-details summary { cursor:pointer;color:var(--accent); }.podium-1 { background:rgba(255,205,82,.10); }.podium-2 { background:rgba(180,200,215,.08); }.podium-3 { background:rgba(205,145,90,.08); }.podium>td:first-child { font-weight:800; }.podium-1>td:first-child { color:#ffcd52; }.podium-2>td:first-child { color:#b4c8d7; }.podium-3>td:first-child { color:#cd915a; }@media(max-width:720px){.allocation-grid{grid-template-columns:1fr}.leaderboard-sort{max-width:100%}}

.own-vfm-metrics,.own-pta-metrics { min-width:520px; }.own-vfm-metrics caption,.own-pta-metrics caption { text-align:left;color:var(--accent);font-weight:700;padding:0 0 18px; }

.leaderboard-sort-controls { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:780px;margin:20px 0; }.leaderboard-sort-controls .leaderboard-sort { margin:0;max-width:none; }@media(max-width:600px){.leaderboard-sort-controls{grid-template-columns:1fr;gap:12px}}

/* Shared UI system: preserve the dark SOCAR palette while keeping every view consistent. */
:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 14px;
  --font-small: 12px;
  --font-control: 14px;
  --radius-control: 10px;
  --radius-card: 16px;
  --radius-small: 8px;
  --surface-raised: #171d23;
  --surface-inset: #0b0f13;
  --muted: #a9b4bf;
  --line: #2b333c;
  --line-strong: #42505c;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}
body { font-family: var(--font-sans); font-size: var(--font-body); line-height: 1.6; }
button, input, select, textarea { font-family: inherit; font-size: var(--font-control); line-height: 1.4; }
h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -.025em; line-height: 1.25; }
h2 { font-size: 22px; }
h3, .card h3 { font-size: 17px; font-weight: 650; }
p { overflow-wrap: break-word; }
b, strong { font-weight: 650; }
small { font-size: var(--font-small); line-height: 1.5; }
code, pre { font-size: 12px; line-height: 1.6; }
code { overflow-wrap: anywhere; }
.eyebrow, .tiny-overline, .nav-label { font-size: 11px; font-weight: 650; letter-spacing: .12em; }
.page-top { align-items: start; padding: 0; }
.page-top h1 { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.15; font-weight: 750; margin-top: 8px; }
.page-top p { font-size: 15px; line-height: 1.65; margin-top: 10px; }
.page { gap: var(--space-6); animation-duration: 180ms; }
.content { max-width: 1440px; padding: clamp(24px, 3vw, 40px); }
.section-heading h2, .presentation-heading h2 { font-size: 22px; font-weight: 700; }
.section-subtitle { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.section-heading { align-items: baseline; flex-wrap: wrap; }
.case-panel h3 { font-size: clamp(25px, 2.6vw, 36px); line-height: 1.2; font-weight: 700; }
.case-panel p { color: var(--muted); font-size: 14px; }
.auth-caption h1 { font-size: clamp(34px, 3.2vw, 52px); line-height: 1.12; font-weight: 750; }
.auth-caption p { font-size: 17px; color: var(--muted); }
.auth-card h2 { font-size: 32px; line-height: 1.2; font-weight: 700; }
.hero-case strong { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; }
.hero-case-metrics { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px 16px; }
.hero-case-metrics b { font-size: 24px; }
.hero-case-metrics em { margin: 0; color: var(--muted); font-size: 12px; }
.auth-art { overflow: hidden; }
.auth-card { background: var(--panel); border-radius: var(--radius-card); }
.auth-tabs { border-radius: 12px; background: var(--surface-inset); padding: 4px; }
.auth-tabs button { min-height: 44px; padding: 10px 14px; border-radius: var(--radius-small); font-size: 14px; font-weight: 600; }
.auth-tabs button.on { box-shadow: none; }
.form-message { font-size: 13px; font-weight: 500; color: var(--danger); overflow-wrap: anywhere; }
.form-message[data-tone="success"] { color: var(--success); }
.form-message[data-tone="error"] { color: var(--danger); }
label { font-size: 13px; font-weight: 600; gap: 8px; color: var(--soft-ink); }
input, select, textarea, .vfm-ranking-control, .comparison-field, .mapping-table select {
  min-height: 44px; padding: 11px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-control); background: var(--surface-inset); color: var(--ink);
  font-family: inherit; font-size: var(--font-control); font-weight: 500; line-height: 1.4;
  max-width: 100%; min-width: 0; transition: border-color 160ms ease, box-shadow 160ms ease;
}
select, .vfm-ranking-control, .comparison-field { width: 100%; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82,242,255,.1); }
input[type="checkbox"] { min-height: 0; accent-color: var(--accent); }
:is(button,input,select,textarea,summary,a):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.primary, .action, .flow-link, .journey-action, .side-logout {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; max-width: 100%; padding: 10px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  font-family: inherit; font-size: var(--font-control); font-weight: 600; line-height: 1.4;
  text-decoration: none; text-align: center; white-space: normal;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.primary { color: var(--black); background: var(--accent); border-color: var(--accent); }
.action, .flow-link, .journey-action, .side-logout { color: var(--accent); background: var(--surface-inset); }
.primary:hover { transform: none; color: var(--black); border-color: #8cf7ff; background: #8cf7ff; box-shadow: none; }
.action:hover, .flow-link:hover, .journey-action:hover, .side-logout:hover {
  transform: none; border-color: var(--accent); color: var(--accent); background: #112329; box-shadow: none;
}
button:disabled, .mapping-dialog button:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
button.loading { cursor: wait; }
.primary.loading { color: transparent; }
.primary.full { padding: 12px 16px; min-height: 48px; }
.mapping-trace-link, .mapping-forget { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; font: 500 12px/1.5 var(--font-sans); text-underline-offset: 3px; }
.side { overflow-y: auto; z-index: 6; padding: 24px 20px; }
.nav-link { min-height: 44px; border-radius: var(--radius-control); padding: 11px 12px; font-size: 14px; font-weight: 600; }
.nav-link:hover { transform: none; }
.nav-label { margin-top: 32px; }
.signed-user { min-width: 0; }
.signed-user > div:last-child { min-width: 0; }
.signed-user b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.signed-user small { color: var(--muted); font-size: 12px; }
.avatar, .top-avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: var(--radius-control); font-size: 14px; font-weight: 700; }
.side-logout { justify-content: start; width: 100%; }
.breadcrumb { min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; flex-wrap: wrap; gap: 6px 10px; }
.topbar { min-height: 72px; padding-inline: clamp(24px,3vw,40px); }
.card, .case-panel { border-radius: var(--radius-card); padding: var(--space-6); box-shadow: 0 8px 28px rgba(0,0,0,.15); }
.card { background: var(--panel); transition: border-color 160ms ease; }
.card:hover { transform: none; border-color: var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.15); }
.grid2 { grid-template-columns: minmax(0,1.25fr) minmax(280px,.85fr); }
.grid2, .grid3 { gap: var(--space-5); }
.grid2 > *, .grid3 > *, .main, .fold-stack > *, .mapping-heading > div { min-width: 0; }
.flow-card { grid-template-columns: 44px minmax(0,1fr) auto; gap: 16px; padding: 16px; border-radius: 12px; }
.file-row { grid-template-columns: minmax(0,1fr) auto; gap: 16px; margin: 0; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-inset); }
.flow-card:hover, .file-row:hover { transform: none; box-shadow: none; }
.file-row:hover { background: var(--surface-inset); border-color: var(--accent); }
.file-row h3 { font-size: 16px; font-weight: 650; line-height: 1.45; }
.file-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.upload-panel, .submission-history { margin-top: 20px; }
.upload-help, .pta-required-fields { margin-top: 20px; }
.flow-num { width: 44px; height: 44px; border-radius: 12px; box-shadow: none; font-weight: 700; }
.notice { border-radius: 12px; border-left-width: 3px; padding: 16px 18px; font-size: 13px; line-height: 1.7; }
.chip, .mission-label { min-height: 26px; padding: 4px 10px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.proof-strip { border-radius: 12px; background: var(--panel); box-shadow: none; }
.proof-strip span { font-size: 10px; font-weight: 600; letter-spacing: .07em; }
.stat strong { font-size: 36px; font-weight: 700; }
.stat small { font-weight: 500; }
.journey-summary strong { font-size: 48px; font-weight: 700; }
.journey-copy h2 { font-size: 18px; font-weight: 650; }
.journey-action { font-size: 13px; }
.journey-step.complete .journey-node { animation: none; box-shadow: none; }
.fold-card { padding: 0; }
.fold-card > summary { min-height: 76px; padding: 20px; }
.fold-card > summary b { font-size: 15px; font-weight: 650; }
.fold-chevron { flex-basis: 30px; width: 30px; height: 30px; }
.fold-body { padding: 20px; }
.presentation-card { max-width: none; }
.presentation-drop { border-radius: 12px; padding: 28px 20px; background: var(--surface-inset); }
.presentation-drop strong { font-size: 16px; font-weight: 650; }
.presentation-latest { padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.table-wrap, .mapping-table-wrap { max-width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); scrollbar-width: thin; }
.card.table-wrap { padding: 0; }
table { font-variant-numeric: tabular-nums; }
th, td { padding: 14px 16px; font-size: 13px; line-height: 1.5; }
thead th { font-size: 11px; font-weight: 650; line-height: 1.5; letter-spacing: .055em; color: var(--soft-ink); background: var(--surface-raised); }
tbody th { color: var(--ink); background: transparent; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: normal; }
tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: 0; }
tbody tr:hover { background: rgba(82,242,255,.035); }
.filename-cell { min-width: 180px; max-width: 280px; overflow-wrap: anywhere; }
.filename-cell small { display: block; margin-top: 6px; }
.row-actions { display: flex; flex-direction: column; align-items: start; gap: 4px; margin-top: 6px; }
.row-actions .action { white-space: nowrap; }
.submissions-table { min-width: 760px; }
.evaluation-details summary { color: var(--accent); cursor: pointer; white-space: nowrap; }
.evaluation-details pre { width: 380px; max-width: min(70vw,500px); margin: 12px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-inset); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.comparison-counts { gap: 12px; margin: 0; }
.comparison-counts span { display: flex; flex-direction: column; justify-content: space-between; flex: 1 1 150px; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-inset); color: var(--muted); font-size: 12px; }
.comparison-counts b { font-size: 18px; line-height: 1.35; font-weight: 650; font-variant-numeric: tabular-nums; }
.comparison-dialog .comparison-counts { margin: 20px 0; }
.comparison-dialog .comparison-counts span { flex-direction: column-reverse; }
.own-vfm-metrics caption, .own-pta-metrics caption { padding: 16px; font-size: 14px; font-weight: 650; color: var(--ink); background: var(--surface-raised); }
.leaderboard-section { margin-top: 0; }
.leaderboard-section-heading { margin-bottom: 20px; }
.leaderboard-section-heading h2 { font-size: 22px; font-weight: 700; }
.leaderboard-section-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.pta-ranking-section > p, .vfm-ranking-section > p { font-size: 13px; margin: 0 0 20px; }
.leaderboard-section .table-wrap { margin-top: 20px; }
.vfm-point-caps { margin-bottom: 20px; gap: 12px; }
.vfm-point-caps > div { padding: 16px; border-radius: 12px; background: var(--surface-inset); }
.vfm-point-caps span { font-size: 12px; }
.vfm-point-caps strong { font-size: 23px; font-weight: 650; }
.allocation-grid { gap: 12px; margin-top: 16px; }
.allocation-grid > span { border-radius: 10px; padding: 16px; background: var(--surface-inset); }
.allocation-grid b { color: var(--accent); font-size: 20px; font-weight: 650; }
.scoring-allocation > b { color: var(--ink); font-size: 14px; font-weight: 650; }
.leaderboard-sort-controls { grid-template-columns:repeat(3,minmax(0,1fr)); gap: 16px; margin: 0 0 16px; max-width: none; }
.vfm-ranking-controls { align-items: end; gap: 16px; margin: 0 0 16px; }
.vfm-ranking-controls .action { flex: 0 0 auto; }
.leaderboard-policy { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface-inset); }
.leaderboard-policy > summary { min-height: 28px; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; }
.leaderboard-policy p, .pta-details p, .official-vfm-policy p { font-size: 13px; line-height: 1.7; }
#hackathon-live-status, #vfm-live-status { color: var(--muted); font-size: 13px; line-height: 1.5; }
#hackathon-live-status { margin: -8px 0 0; }
.overall-leaderboard, .pta-leaderboard, .vfm-metric-leaderboard { table-layout: auto; min-width: 800px; }
.vfm-metric-leaderboard > thead > tr > th:nth-child(1), .vfm-metric-leaderboard > thead > tr > th:nth-child(2) { width: auto; }
:is(.overall-leaderboard,.pta-leaderboard,.vfm-metric-leaderboard) > :is(thead,tbody) > tr:not(.pta-details):not(.official-vfm-metric-row) > :is(th,td):first-child { width: 70px; text-align: center; }
:is(.overall-leaderboard,.pta-leaderboard,.vfm-metric-leaderboard) > :is(thead,tbody) > tr:not(.pta-details):not(.official-vfm-metric-row) > :is(th,td):nth-child(2) { min-width: 170px; max-width: 240px; overflow-wrap: anywhere; }
:is(.overall-leaderboard,.pta-leaderboard,.vfm-metric-leaderboard) > :is(thead,tbody) > tr:not(.pta-details):not(.official-vfm-metric-row) > :is(th,td):nth-child(n+3):not(:last-child) { text-align: right; }
.pta-details > td, .official-vfm-metric-row > td { padding: 12px 16px; background: var(--surface-inset); }
.pta-details summary, .official-vfm-metric-row summary { min-height: 28px; font-size: 12px; font-weight: 500; }
.pta-details .table-wrap, .official-vfm-metric-row .table-wrap { margin-top: 12px; }
.mapping-dialog { width: min(1180px,calc(100vw - 40px)); max-height: calc(100dvh - 40px); padding: 24px; border-radius: var(--radius-card); background: var(--panel); box-shadow: 0 24px 80px rgba(0,0,0,.6); overflow-y: auto; overscroll-behavior: contain; }
.mapping-dialog::backdrop { background: rgba(3,5,7,.78); backdrop-filter: blur(4px); }
.mapping-heading { gap: 16px; margin-bottom: 20px; }
.mapping-heading h2 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 6px 0; }
.mapping-heading p { font-size: 13px; line-height: 1.6; }
.mapping-heading > button { flex: 0 0 auto; }
.mapping-intro, .mapping-footnote, .comparison-feedback { font-size: 13px; line-height: 1.7; }
.comparison-feedback { color: var(--muted); margin: 12px 0; overflow-wrap: anywhere; }
.mapping-summary { gap: 8px; margin: 16px 0; }
.mapping-summary span, .mapping-error, .mapping-dataset { border-radius: var(--radius-small); }
.mapping-table th, .mapping-table td { padding: 16px 12px; }
.mapping-table select { font-size: 13px; }
.mapping-table small, .mapping-badge { font-size: 12px; font-weight: 500; }
.mapping-dialog .mapping-review-check, .mapping-dialog .mapping-remember { font-size: 13px; font-weight: 500; }
.mapping-dialog input[type="checkbox"] { width: 18px; height: 18px; }
.mapping-footer { gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.mapping-actions { gap: 10px; }
.comparison-field-label { margin: 20px 0; }
.comparison-chart { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-inset); }
.comparison-chart p { line-height: 1.7; }
.comparison-output > p + p { margin-top: 12px; }
.toast { z-index: 20; max-width: min(420px,calc(100vw - 32px)); right: 16px; bottom: 16px; padding: 14px 16px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.letter { animation-duration: 240ms; }
.sentence-reveal, .stagger-in { animation-duration: 220ms; }
@media (max-width: 1180px) { .grid2 { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 980px) {
  .auth-wrap { height: auto; min-height: 100svh; overflow: visible; grid-template-rows: auto 1fr; }
  .auth-art { min-height: auto; }
  .auth-caption h1 { font-size: clamp(26px,4vw,36px); line-height: 1.2; }
  .auth-panel { min-height: auto; padding-bottom: 24px; }
  .side { position: relative; padding: 16px 20px; width: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand-logo { width: 112px; }
  .side .nav-label { display: none; }
  #nav { display: flex; overflow-x: auto; gap: 8px; margin-top: 14px; padding: 4px 0; min-width: 0; scrollbar-width: thin; }
  .nav-link { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .side-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; padding-top: 14px; }
  .side-logout { width: auto; flex: 0 0 auto; }
  .signed-user { max-width: calc(100% - 132px); }
  .main { margin-left: 0; }
  .grid3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .topbar { min-height: 64px; padding-inline: 24px; }
}
@media (max-width: 620px) {
  .auth-wrap { min-height: 100svh; }
  .auth-card { padding: 24px 20px; }
  .auth-art { padding: 20px 20px 10px; }
  .auth-caption h1 { font-size: 27px; }
  .auth-card h2 { font-size: 28px; }
  .auth-panel { padding: 12px 16px 24px; }
  .side { padding: 16px; }
  .side-bottom { gap: 12px; }
  .side .avatar { display: none; }
  .signed-user { max-width: calc(100% - 120px); }
  .topbar { min-height: 60px; padding-inline: 16px; }
  .breadcrumb > span:first-child, .breadcrumb > .sep { display: none; }
  .breadcrumb { font-size: 11px; }
  .content { padding: 24px 16px 40px; }
  .page-top h1 { font-size: 30px; }
  .page-top p { font-size: 14px; }
  .card, .case-panel { padding: 20px 16px; }
  .card.table-wrap { padding: 0; }
  .fold-card { padding: 0; }
  .fold-card > summary, .fold-body { padding: 16px; }
  .grid3, .allocation-grid { grid-template-columns: minmax(0,1fr); }
  .flow-card { grid-template-columns: 40px minmax(0,1fr); padding: 14px; gap: 12px; }
  .flow-card > .flow-link { grid-column: 2; justify-self: start; }
  .file-row { grid-template-columns: minmax(0,1fr); padding: 16px; }
  .file-row > div:last-child > .action { width: 100%; }
  .leaderboard-sort-controls { grid-template-columns: minmax(0,1fr); }
  .vfm-point-caps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vfm-point-caps > div { padding: 14px; }
  .vfm-point-caps strong { font-size: 20px; }
  .vfm-ranking-controls > .action { width: 100%; }
  .comparison-counts span { flex-basis: calc(50% - 6px); padding: 14px; }
  .comparison-counts b { font-size: 17px; }
  .leaderboard-section-heading h2 { font-size: 21px; }
  .mapping-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; border-radius: 12px; }
  .mapping-heading { gap: 12px; }
  .mapping-heading h2 { font-size: 22px; }
  .mapping-heading > button { padding-inline: 12px; }
  .mapping-table select, input, select, .vfm-ranking-control, .comparison-field { font-size: 16px; }
  .mapping-table tr { padding: 10px; }
  .mapping-table th, .mapping-table td { padding: 10px 6px; }
  .mapping-actions { width: 100%; }
  .mapping-actions button { flex: 1 1 0; }
  .mapping-footer { align-items: stretch; }
  .mapping-footer > div { min-width: 0; }
  .presentation-heading { align-items: start; }
  .presentation-heading h2 { font-size: 21px; }
  .row-actions .mapping-trace-link { min-height: 40px; }
}

.table-scroll-hint { margin:12px 0 8px;color:var(--muted);font-size:12px;line-height:1.5; }.leaderboard-section .table-scroll-hint + .table-wrap { margin-top:0; }.table-wrap:focus-visible,.mapping-table-wrap:focus-visible { outline:2px solid var(--accent);outline-offset:3px; }

:is(.overall-leaderboard,.pta-leaderboard,.vfm-metric-leaderboard) > tbody > tr:not(.pta-details):not(.official-vfm-metric-row) > td:nth-child(n+3):not(:last-child) { white-space:nowrap; }
html { scroll-padding-top:88px; }button,input,select,summary,a { scroll-margin-top:88px; }

/* Explicit upload date convention, using the existing column review controls. */
.mapping-date-format { display: grid; gap: 8px; margin: 16px 0; }
.mapping-date-format select { width: 100%; max-width: 420px; }
.mapping-date-format small { color: var(--muted); line-height: 1.5; }

.leaderboard-sort-controls select:disabled { opacity:.55;cursor:default; }
.overall-leaderboard th[aria-sort] { color:var(--accent); }
