/* ==========================================================================
   Forbidden Egg — shared styles
   Dark, monochrome, 404/terminal-inspired. No external fonts or assets.
   ========================================================================== */

:root {
  --bg: #07080b;
  --bg-soft: #0b0d12;
  --bg-raised: #0f1218;
  --panel: rgba(13, 16, 22, 0.82);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f1f3f5;
  --muted: #9299a5;
  --faint: #5c6370;
  --red: #ff453a;
  --red-dim: rgba(255, 69, 58, 0.14);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.12);
  --green: #34d399;
  --amber: #fbbf24;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Liberation Mono",
    Consolas, monospace;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 78%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 40% at 12% 0%, rgba(255, 69, 58, 0.08), transparent 70%),
    radial-gradient(ellipse 45% 40% at 92% 12%, rgba(34, 211, 238, 0.06), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(255, 255, 255, 0.035), transparent 70%);
  pointer-events: none;
}

::selection {
  background: var(--red);
  color: #fff;
}

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.accent {
  color: var(--red);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Shared chrome
   -------------------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: border-color 0.2s, color 0.2s;
}

.brand:hover .brand-mark {
  border-color: var(--red);
  color: var(--red);
}

.brand-divider {
  color: var(--faint);
}

.brand-sub {
  color: var(--muted);
  letter-spacing: 0.2em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.status-pill--ok .status-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.status-pill--admin .status-dot {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.footer a {
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Gate page
   -------------------------------------------------------------------------- */

.page--gate main {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.countdown-panel {
  position: relative;
  margin-top: clamp(36px, 6vw, 72px);
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 70%),
    var(--panel);
  overflow: hidden;
}

.countdown-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 130px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
}

.countdown-panel::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 100% 100%, rgba(34, 211, 238, 0.08), transparent 65%);
  pointer-events: none;
}

.countdown-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(22px, 3vw, 34px);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.countdown-title {
  margin: 7px 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.countdown-target {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: right;
}

.countdown-target span {
  color: var(--faint);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.countdown-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2.6vw, 30px) clamp(10px, 2vw, 24px);
  background: rgba(6, 7, 10, 0.78);
  overflow: hidden;
}

.countdown-unit::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  opacity: 0.7;
}

.countdown-value {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 0.88;
  color: var(--text);
}

.countdown-unit:first-child .countdown-value {
  color: var(--red);
  text-shadow: 0 0 32px rgba(255, 69, 58, 0.25);
}

.countdown-unit-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.countdown-unit-label strong {
  color: var(--faint);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.countdown-note {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.countdown-note.is-finished {
  color: var(--amber);
}

/* Forbidden hero */

.forbidden {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(20px, 5vw, 72px);
  padding: clamp(44px, 8vw, 100px) 0 clamp(40px, 6vw, 80px);
}

.forbidden-visual {
  position: relative;
  min-width: 0;
}

.forbidden-code {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(8.5rem, 23vw, 21rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.1em;
  line-height: 0.78;
  color: var(--text);
  user-select: none;
}

.forbidden-code::before,
.forbidden-code::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.forbidden-code::before {
  color: var(--red);
  transform: translate(5px, -3px);
  clip-path: inset(8% 0 58% 0);
  opacity: 0.7;
  animation: glitch-a 5s steps(2, end) infinite;
}

.forbidden-code::after {
  color: var(--cyan);
  transform: translate(-4px, 2px);
  clip-path: inset(56% 0 16% 0);
  opacity: 0.55;
  animation: glitch-b 4.2s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%,
  86%,
  100% {
    transform: translate(5px, -3px);
  }
  88% {
    transform: translate(-9px, -1px);
  }
  90% {
    transform: translate(8px, -5px);
  }
  92% {
    transform: translate(-3px, 2px);
  }
}

@keyframes glitch-b {
  0%,
  82%,
  100% {
    transform: translate(-4px, 2px);
  }
  84% {
    transform: translate(10px, 3px);
  }
  86% {
    transform: translate(-8px, -2px);
  }
  88% {
    transform: translate(4px, 1px);
  }
}

.forbidden-visual::after {
  content: "ACCESS DENIED / 拒绝访问";
  display: block;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
}

.forbidden-copy h1 {
  margin: 14px 0 20px;
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.forbidden-copy .lede {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hint,
.forbidden-copy .hint {
  max-width: 34em;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: #07080b;
}

.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(255, 69, 58, 0.22);
}

.btn-primary:hover span[aria-hidden="true"] {
  transform: translateX(3px);
}

.btn span[aria-hidden="true"] {
  transition: transform 0.2s var(--ease);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.text-link:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */

.page--auth main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) 0;
}

.auth-intro {
  position: sticky;
  top: 40px;
  padding-top: 8px;
}

.auth-intro h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.auth-intro > p:not(.eyebrow) {
  max-width: 34em;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.meta-list {
  margin: 0 0 28px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.meta-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.meta-list span {
  color: var(--faint);
}

.meta-list strong {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-align: right;
}

.account-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.account-badge strong {
  color: var(--cyan);
  font-size: 16px;
  letter-spacing: 0.18em;
}

.auth-card {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--panel);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 96px;
  height: 2px;
  background: var(--cyan);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.card-index {
  flex: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.card-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card-head p {
  margin: 4px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.field {
  margin-bottom: 20px;
}

.field > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.field > label span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  outline: none;
  background: rgba(4, 5, 8, 0.72);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field input::placeholder {
  color: var(--faint);
  letter-spacing: 0.08em;
}

.field input:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.field input:focus {
  border-color: var(--cyan);
  background: rgba(4, 5, 8, 0.95);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.field input:user-invalid {
  border-color: var(--red);
}

#account {
  letter-spacing: 0.3em;
  font-size: 17px;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 68px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  min-width: 54px;
  height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s, background-color 0.2s;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.form-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 69, 58, 0.32);
  border-left: 2px solid var(--red);
  background: var(--red-dim);
  color: #ffb4ae;
  font-size: 12px;
  line-height: 1.5;
}

.form-error ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.form-error li + li {
  margin-top: 2px;
}

.card-foot {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

/* Password strength */

.strength {
  margin-top: 10px;
}

.strength-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  height: 3px;
}

.strength-fill {
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.25s var(--ease);
}

.strength-fill.is-on {
  background: var(--red);
}

.strength[data-level="2"] .strength-fill.is-on {
  background: var(--amber);
}

.strength[data-level="3"] .strength-fill.is-on {
  background: #a3e635;
}

.strength[data-level="4"] .strength-fill.is-on {
  background: var(--green);
}

.strength-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.strength-meta strong {
  color: var(--muted);
  font-weight: 400;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.rule-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 11px;
  transition: color 0.2s;
}

.rule-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.rule-list li.is-met {
  color: var(--muted);
}

.rule-list li.is-met .rule-dot {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

.rule-list li.is-required.is-met {
  color: #9ff0cc;
}

.confirm-hint {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.confirm-hint.is-error {
  color: var(--red);
}

.confirm-hint.is-ok {
  color: var(--green);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.form-actions .btn {
  flex: 1 1 220px;
}

.steps {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  counter-increment: step;
}

.steps li::before {
  content: "0" counter(step);
  flex: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding-top: 2px;
}

/* --------------------------------------------------------------------------
   Main / 404 status page
   -------------------------------------------------------------------------- */

.page--status main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(calc(100% - 48px), 980px);
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0;
}

.status-code {
  position: relative;
  margin: 10px 0 6px -0.06em;
  font-family: var(--mono);
  font-size: clamp(8rem, 24vw, 18rem);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 0.78;
  color: var(--text);
  user-select: none;
}

.status-code::before,
.status-code::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-text-fill-color: currentColor;
  pointer-events: none;
}

.status-code::before {
  color: var(--red);
  opacity: 0.5;
  clip-path: inset(12% 0 60% 0);
  transform: translate(4px, -2px);
  animation: glitch-a 6s steps(2, end) infinite;
}

.status-code::after {
  color: var(--cyan);
  opacity: 0.4;
  clip-path: inset(58% 0 14% 0);
  transform: translate(-3px, 1px);
  animation: glitch-b 5s steps(2, end) infinite;
}

.status-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.status-message {
  max-width: 44em;
  margin: 18px 0 0;
  padding: 18px 0 18px 20px;
  border-left: 2px solid var(--red);
  color: var(--text);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.75;
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 34px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.status-meta strong {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.18em;
}

.status-meta .is-open {
  color: var(--green);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.page--status .topbar {
  border-bottom-color: transparent;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.account-chip strong {
  color: var(--cyan);
  font-weight: 400;
  letter-spacing: 0.16em;
}

/* --------------------------------------------------------------------------
   Admin console
   -------------------------------------------------------------------------- */

.page--admin main {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 84px) 0 70px;
}

.console-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  align-items: end;
  gap: 24px 48px;
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.console-title {
  margin: 14px 0 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.console-title span {
  color: var(--faint);
}

.console-head p:not(.eyebrow) {
  max-width: 34em;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  background: var(--line);
}

.console-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  background: var(--panel);
  overflow: hidden;
}

.console-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--line);
  transform: rotate(45deg);
}

.console-card h2 {
  margin: 22px 0 8px;
  font-size: 16px;
  font-weight: 500;
}

.console-card p {
  max-width: 22em;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.console-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  background: rgba(251, 191, 36, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.console-note strong {
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.12em;
}

/* --------------------------------------------------------------------------
   Generic 404 page
   -------------------------------------------------------------------------- */

.page--notfound main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(calc(100% - 48px), 980px);
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: 60px 0;
}

.notfound-message {
  max-width: 36em;
  margin: 18px 0 0;
  padding-left: 20px;
  border-left: 2px solid var(--cyan);
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .forbidden {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .forbidden-code {
    font-size: clamp(8rem, 38vw, 16rem);
  }

  .forbidden-copy .hint {
    margin-bottom: 24px;
  }

  .page--auth main {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .auth-intro {
    position: static;
  }

  .auth-intro h1 {
    font-size: clamp(2.8rem, 10vw, 4rem);
  }

  .console-head {
    grid-template-columns: 1fr;
  }

  .console-grid {
    grid-template-columns: 1fr;
  }

  .console-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .topbar,
  .footer,
  .page--gate main,
  .page--admin main,
  .page--status main,
  .page--notfound main {
    width: min(calc(100% - 32px), var(--max));
  }

  .topbar {
    padding: 18px 0;
  }

  .brand-sub {
    display: none;
  }

  .status-pill {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .countdown-panel {
    margin-top: 24px;
    padding: 20px 16px;
  }

  .countdown-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }

  .countdown-target {
    text-align: left;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown-value {
    font-size: clamp(2.7rem, 17vw, 4.4rem);
  }

  .countdown-unit {
    padding: 18px 16px;
  }

  .forbidden {
    padding: 44px 0 30px;
  }

  .forbidden-copy h1 {
    margin-top: 10px;
  }

  .page--auth main {
    padding: 32px 0 48px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .rule-list {
    grid-template-columns: 1fr;
  }

  .form-actions .btn {
    flex-basis: 100%;
  }

  .page--status main,
  .page--notfound main {
    min-height: calc(100vh - 150px);
    padding: 40px 0;
  }

  .status-code {
    font-size: clamp(7rem, 34vw, 12rem);
  }

  .status-message {
    padding-left: 14px;
  }

  .topbar-tools {
    gap: 10px;
  }

  .account-chip span {
    display: none;
  }

  .console-title {
    font-size: clamp(2.8rem, 15vw, 4.6rem);
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Turnstile + email binding
   -------------------------------------------------------------------------- */

.turnstile-slot {
  display: flex;
  justify-content: center;
  min-height: 65px;
  margin: 0 0 16px;
}

.turnstile-slot[hidden] {
  display: none;
}

.turnstile-status {
  margin: -6px 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-align: center;
}

.turnstile-status[hidden] {
  display: none;
}

.turnstile-status.is-error {
  color: var(--red);
}

.btn.is-awaiting-turnstile {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.email-help {
  margin: -10px 0 16px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.7;
}

.send-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.send-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.send-row .btn {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 0 14px;
  font-size: 10px;
}

.code-input {
  text-align: center;
  letter-spacing: 0.5em;
  font-size: 20px;
  padding-left: 0.5em;
}

.form-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.06);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  word-break: break-word;
}

.form-note[hidden] {
  display: none;
}

.form-note.is-error {
  border-color: rgba(255, 69, 58, 0.32);
  background: rgba(255, 69, 58, 0.06);
  color: var(--red);
}

.form-note strong {
  color: var(--text);
  letter-spacing: 0.16em;
}

@media (max-width: 560px) {
  .send-row {
    flex-direction: column;
  }

  .send-row .btn {
    width: 100%;
    min-height: 44px;
  }
}

