:root {
  --bg: #121215;
  --bg-panel: #1c1c21;
  --bg-input: #17171b;
  --border: #303039;
  --text: #ededf0;
  --text-dim: #8f8f99;
  --neon: #37e6ff;
  --neon-soft: rgba(55, 230, 255, 0.12);
  --neon-glow: rgba(55, 230, 255, 0.35);
  --err: #ff6f8e;
  --err-soft: rgba(255, 111, 142, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(55, 230, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(120, 90, 255, 0.10), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.55;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

header.funnel {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

header.funnel .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.logo span { color: var(--neon); }

.logo img { height: 30px; width: auto; display: block; }

.step-indicator {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.step-indicator strong { color: var(--neon); }

.back-link {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-link:hover { color: var(--neon); }
.back-link svg { width: 14px; height: 14px; }

.account-chip {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.account-chip strong { color: var(--text); font-weight: 500; }

/* Badges — used on chooser cards and dashboard actions */
.badge-soon {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px;
}

.badge-live {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bg); background: var(--neon); border-radius: 999px; padding: 3px 9px;
}

footer.funnel {
  text-align: center;
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

footer.funnel a { color: var(--neon); text-decoration: none; }

h1 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 16px;
  text-wrap: balance;
}

.eyebrow {
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--neon);
  color: #041018;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--neon-glow), 0 12px 30px -12px var(--neon-glow);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--neon);
  text-decoration: none;
}

/* Per-NLE launch buttons (instances.html) — same shape as .choice-btn's
   disabled treatment, just inline/pill-sized rather than a big card, since
   these sit in a toolbar row, not a full-page chooser. */
.nle-launch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nle-btn { padding: 10px 20px 10px 14px; }

.nle-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
}

.nle-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Focused single-card layout, used by login/awaiting/upload */
.funnel-main {
  padding: 72px 0 100px;
}

.funnel-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px clamp(24px, 5vw, 40px);
}

.funnel-card.wide { max-width: 640px; }

.funnel-card h1 { font-size: 1.5rem; margin-bottom: 8px; }

.funnel-card .lead {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.funnel-card label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.funnel-card input[type="email"],
.funnel-card input[type="password"],
.funnel-card input[type="text"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
}

.funnel-card input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px var(--neon-soft);
}

.funnel-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.funnel-card .row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.funnel-card .row-between a { color: var(--neon); text-decoration: none; }

.funnel-note {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}
.funnel-note a { color: var(--neon); }

/* Dashboard */
.dash-main { padding: 56px 0 100px; }
.dash-wrap { max-width: 1040px; }

.dash-greeting { margin-bottom: 40px; }
.dash-greeting h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 6px; }
.dash-greeting p { color: var(--text-dim); }

.dash-section { margin-bottom: 48px; }
.dash-section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .action-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .action-grid { grid-template-columns: 1fr; }
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.action-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon-glow), 0 16px 40px -20px var(--neon-glow);
  text-decoration: none;
}

.action-card.disabled { opacity: 0.45; cursor: not-allowed; }
.action-card.disabled:hover { transform: none; border-color: var(--border); box-shadow: none; }

.action-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--neon-soft);
  color: var(--neon);
}
.action-icon svg { width: 20px; height: 20px; }

.action-card.disabled .action-icon { background: rgba(255,255,255,0.04); color: var(--text-dim); }

.action-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.98rem; }
.action-sub { font-size: 0.78rem; color: var(--text-dim); }

.history-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.history-table th {
  text-align: left;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.history-table tr:last-child td { border-bottom: none; }

.history-table .file-cell { display: flex; align-items: center; gap: 10px; }
.history-table .file-cell svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.status-pill.ready { background: var(--neon-soft); color: var(--neon); }
.status-pill.processing { background: rgba(255,255,255,0.06); color: var(--text-dim); }

.dash-empty-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 14px;
}

/* Chooser cards — used by any "pick an option" page (software chooser, account-type chooser) */
main.chooser { padding: 88px 0 100px; text-align: center; }
main.chooser h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
main.chooser > .wrap > p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 50ch;
  margin: 0 auto 56px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .choice-grid { grid-template-columns: 1fr; }
}

.choice-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 44px 20px 36px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.choice-btn.live { cursor: pointer; }

.choice-btn.live:hover {
  transform: translateY(-4px);
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon-glow), 0 20px 50px -20px var(--neon-glow);
  text-decoration: none;
}

.choice-btn.disabled { opacity: 0.45; cursor: not-allowed; }

.choice-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--neon-soft);
  color: var(--neon);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}

.choice-btn.disabled .choice-icon { background: rgba(255,255,255,0.04); color: var(--text-dim); }

.choice-name { font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; font-weight: 600; }
.choice-sub { font-size: 0.82rem; color: var(--text-dim); }

.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.78); z-index: 60;
  align-items: center; justify-content: center; padding: 24px; overflow-y: auto;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto;
}
.modal-box h2 { font-size: 1.15rem; margin: 0 0 12px; }
.modal-box p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 12px; }
.modal-box .field-row { margin: 0 0 14px; }
.modal-box .field-row label { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 4px; }
.modal-box .field-row select, .modal-box .field-row input[type="text"] {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font-size: 0.9rem; font-family: inherit;
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }
.callout-highlight { border: 1px solid var(--neon); box-shadow: 0 0 0 1px var(--neon-glow), 0 12px 30px -12px var(--neon-glow); border-radius: 12px; padding: 16px; }

/* Light theme (issue #143). Dark stays the default; logout.js sets data-theme on <html>. */
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef3fb;
  --bg-panel: #ffffff;
  --bg-input: #f1f5fb;
  --border: #d3d9e6;
  --text: #16181d;
  --text-dim: #565b66;
  --neon: #1456c7;
  --neon-soft: rgba(20, 86, 199, 0.10);
  --neon-glow: rgba(20, 86, 199, 0.30);
  --err: #b3213f;
  --err-soft: rgba(179, 33, 63, 0.10);
}
[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"], html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(20, 86, 199, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(20, 86, 199, 0.08), transparent 55%);
}
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .action-card.disabled .action-icon,
[data-theme="light"] .choice-btn.disabled .choice-icon { background: rgba(0,0,0,0.05); }
[data-theme="light"] .status-pill.processing { background: rgba(0,0,0,0.06); }
[data-theme="light"] .modal-overlay { background: rgba(20, 22, 30, 0.55); }
/* The logo artwork is a flat cyan fill (RGB 55,230,255 at varying alpha) --
   recolored 1:1 (same alpha mask) to the brand blue above, not filtered: a
   brightness/saturate filter on this hue rotated it towards green/teal,
   which is why the logo and the accent colour used to disagree in light mode. */
[data-theme="light"] .logo img { content: url("assets/editanyware-logo-light.png"); }

/* Neon theme: a third site-wide choice alongside light and dark, picked on
   the profile page. Same variable contract as the light theme above, so
   every page re-themes automatically without per-page changes. */
[data-theme="neon"] {
  color-scheme: dark;
  --bg: #0a0510;
  --bg-panel: #140b1f;
  --bg-input: #170c22;
  --border: #3a1f52;
  --text: #f5eaff;
  --text-dim: #b79ddb;
  --neon: #ff2fd6;
  --neon-soft: rgba(255, 47, 214, 0.16);
  --neon-glow: rgba(255, 47, 214, 0.45);
  --err: #ff3355;
  --err-soft: rgba(255, 51, 85, 0.14);
}
html[data-theme="neon"] body {
  background-image:
    radial-gradient(ellipse 900px 500px at 10% -10%, rgba(18, 247, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(255, 47, 214, 0.16), transparent 55%),
    radial-gradient(ellipse 800px 600px at 50% 100%, rgba(57, 255, 106, 0.10), transparent 60%);
}
@keyframes neonShiftGlobal { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
[data-theme="neon"] .funnel-card {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
    linear-gradient(120deg, #ff2fd6, #f6ff2a, #39ff6a, #12f7ff, #3b82ff, #ff2fd6) border-box;
  border: 1px solid transparent;
  background-size: 100% 100%, 300% 300%;
  animation: neonShiftGlobal 12s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(18, 247, 255, 0.12), 0 0 48px rgba(255, 47, 214, 0.08);
}
[data-theme="neon"] .btn-primary {
  background: linear-gradient(90deg, #ff2fd6, #3b82ff, #12f7ff);
  background-size: 300% 100%;
  animation: neonShiftGlobal 6s ease-in-out infinite;
  color: #0a0510;
}
[data-theme="neon"] header.funnel {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, #ff2fd6, #f6ff2a, #39ff6a, #12f7ff, #3b82ff) 1;
}
[data-theme="neon"] .logo span { text-shadow: 0 0 10px var(--neon-glow); }

/* Show/hide eye on password boxes (password-toggle.js) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 46px !important; }
.pw-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; border-radius: 6px;
}
.pw-eye:hover, .pw-eye:focus-visible { color: var(--text); }

/* Links inside cards (terms status, agree label, terms text) were browser-default dark blue: unreadable on dark. */
.funnel-card a:not(.btn), .terms-box a { color: var(--neon); }
