/* HacknetAI: one stylesheet. Dark by default; light when the visitor picks it
   with the header's theme button (stored per browser, applied by theme.js). */

:root {
  --bg: #0b0e14;
  --bg-2: #111622;
  --surface: #151b29;
  --surface-2: #1b2334;
  --border: #263049;
  --text: #e8ecf4;
  --muted: #9aa5bd;
  --primary: #8b7cff;
  --primary-ink: #0b0e14;
  --lumen: #f5c451;
  --jobeasy: #2dd4bf;
  --ok: #4ade80;
  --danger: #ff7a7a;
  --accent: var(--primary);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --border: #dfe4ee;
  --text: #141a26;
  --muted: #5b6579;
  --primary: #5b4ee0;
  --primary-ink: #ffffff;
  --lumen: #b7860b;
  --jobeasy: #0f8f80;
  --ok: #16883f;
  --danger: #c62828;
  --shadow: 0 10px 30px rgba(20, 26, 38, .08);
  color-scheme: light;
}

.accent-lumen { --accent: var(--lumen); }
.accent-jobeasy { --accent: var(--jobeasy); }
.accent-bundle { --accent: var(--primary); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding-block: 56px; scroll-margin-top: 64px; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title-sm { font-size: 1.15rem; margin-bottom: 14px; }
.page-head { padding-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 600 1.15rem var(--display); }
.brand:hover { text-decoration: none; }
.brand b { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 22px; flex: 1; }
.nav-spacer { flex: 1; }
.nav-link { color: var(--muted); font-weight: 500; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-lumen:hover { color: var(--lumen); }
.nav-jobeasy:hover { color: var(--jobeasy); }
.nav-toggle, .nav-burger { display: none; }

/* The full nav (5 links + account) needs ~1000px; below that, the menu button. */
@media (max-width: 1020px) {
  .nav-burger { display: flex; flex-direction: column; gap: 5px; margin-left: auto; cursor: pointer; padding: 8px; }
  .nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-link { padding: 10px 4px; }
  .nav-spacer { display: none; }
  .nav .btn, .nav form, .nav form .btn { width: 100%; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .95rem var(--font); cursor: pointer; transition: transform .12s, background .12s, border-color .12s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-accent { background: var(--accent); color: var(--primary-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-product .hero-inner { max-width: 760px; }
.hero-glow {
  position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  filter: blur(40px); opacity: .55; pointer-events: none;
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--accent); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 680px; }
.grad { background: linear-gradient(90deg, var(--jobeasy), var(--primary) 55%, var(--lumen)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface-2);
}
.pill-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pill-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }

.product-split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.product-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 55%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 20px; padding: 32px; box-shadow: var(--shadow);
}
.product-card h2 { color: var(--accent); font-size: 2.2rem; margin-top: 10px; }
.product-card-head { display: flex; justify-content: space-between; align-items: center; }
.product-badge { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.product-tagline { font-size: 1.1rem; }
.product-card-foot { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.from { color: var(--muted); }
.from b { color: var(--text); font-size: 1.2rem; }

.ticks { list-style: none; padding: 0; margin: 8px 0 0; }
.ticks li { position: relative; padding-left: 26px; margin: 8px 0; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-n {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; margin-bottom: 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font: 700 1rem var(--display);
}

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); }
.feature h3 { color: var(--accent); }
.feature p { margin: 0; }

/* ---- plans ---- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 20px; }
.plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-blurb { margin: 2px 0 0; }
.saving { margin: 0 0 4px; font-size: .85rem; color: var(--accent); font-weight: 500; }
.btn.is-disabled { opacity: .55; cursor: default; transform: none; }
.plan-foot { margin-top: 14px; }

/* Monthly / Yearly switch: radios + sibling selectors, no script needed. */
.bill-m, .bill-y { position: absolute; opacity: 0; pointer-events: none; }
.bill-switch {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  border: 1px solid var(--border); border-radius: 99px; background: var(--surface);
}
.bill-switch label {
  flex-direction: row; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 16px; border-radius: 99px; color: var(--muted); font-weight: 600;
}
.bill-switch .save { font-size: .72rem; color: var(--accent); font-weight: 600; }
.bill-m:checked ~ .bill-switch .lbl-m,
.bill-y:checked ~ .bill-switch .lbl-y { background: var(--accent); color: var(--primary-ink); }
.bill-y:checked ~ .bill-switch .lbl-y .save { color: var(--primary-ink); }
.bill-m:focus-visible ~ .bill-switch .lbl-m,
.bill-y:focus-visible ~ .bill-switch .lbl-y { outline: 2px solid var(--accent); outline-offset: 2px; }
.bill-m:checked ~ .plans .y-only,
.bill-y:checked ~ .plans .m-only { display: none; }

.bundle-teaser {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 24px; padding: 18px 22px; border-radius: var(--radius); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.bundle-teaser:hover { text-decoration: none; border-color: var(--accent); }
.bundle-go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.plan { display: flex; flex-direction: column; }
.plan-featured { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.plan-head { display: flex; justify-content: space-between; align-items: center; }
.plan .ticks { margin-bottom: 20px; flex: 1; }
.price { margin: 6px 0 4px; }
.price b { font: 700 2.4rem var(--display); }
.price span { color: var(--muted); margin-left: 2px; }
.pricing-row-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pricing-row-head h2 { color: var(--accent); margin: 0; }
.pricing-row-head p { margin: 0; }
.reqs { margin-top: 18px; }

.waitlist { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.waitlist h3 { margin-top: 10px; }
.waitlist-form { display: flex; flex-direction: column; gap: 10px; }

/* ---- forms ---- */
.auth { display: grid; place-items: center; padding: 64px 16px; }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 1.8rem; margin: 0; }
.auth-card p { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
label.check input { margin-top: 4px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font: 1rem var(--font);
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.hint { color: var(--muted); font-weight: 400; font-size: .82rem; }
.error { color: var(--danger); margin: 0; }
.notice {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}

/* ---- account ---- */
.account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.app-card { display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--accent); }
.app-card h3 { color: var(--accent); margin: 0; font-size: 1.4rem; }
.app-card-head { display: flex; justify-content: space-between; align-items: center; }
.app-card .btn { margin-top: auto; }
.account-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 0; }
.account-lower form.card { display: flex; flex-direction: column; gap: 12px; }
.account-lower div.card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* two-step login */
.twostep { display: flex; flex-direction: column; gap: 18px; padding-top: 0; }
.twostep > * { max-width: 820px; }
.twostep-setup { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; }
.twostep-form { display: flex; flex-direction: column; gap: 12px; max-width: 360px; }
.twostep .card + .card, .twostep-form + .twostep-form { margin-top: 4px; }
.qr { background: #fff; padding: 10px; border-radius: 10px; width: max-content; line-height: 0; }
/* Whole-pixel modules: at 125%/150% display scaling, anti-aliased seams between rows stop phones reading it */
.qr svg { shape-rendering: crispEdges; display: block; }
.setup-key { font-size: 1rem; letter-spacing: .06em; word-break: break-all; }
.recovery-codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 28px; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .05em; }
@media (max-width: 760px) { .twostep-setup { grid-template-columns: 1fr; } }
.pill-row { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.app-card .btn-row .btn { margin-top: 0; }
.sub-list { list-style: none; padding: 0; margin: 0 0 14px; }
.sub-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }

/* ---- faq / legal ---- */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 4px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.legal { max-width: 760px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.draft-banner { display: inline-block; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--lumen) 20%, transparent); color: var(--lumen); font-size: .85rem; font-weight: 600; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 40px 0 24px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.footer-grid a:not(.brand) { display: block; color: var(--text); margin: 6px 0; }
.footer-base { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .feature-grid, .plans-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .section { padding-block: 40px; }
  .hero { padding: 64px 0 48px; }
  .product-split, .steps, .feature-grid, .plans, .plans-3, .account-grid, .account-lower, .waitlist, .footer-grid { grid-template-columns: 1fr; }
  .product-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---- dashboard ---- */
:root {
  /* Chart series colours: validated (scripts/validate_palette.js) per mode, not auto-flipped. */
  --viz-jobeasy: #1aa898;
  --viz-lumen: #bb8424;
  --status-warning: #e8a33d;
  --status-critical: #ff7a7a;
}
/* Light theme chart colours: validated separately against the light surface. */
:root[data-theme="light"] { --viz-jobeasy: #0f8f80; --viz-lumen: #b7860b; --status-warning: #9a5b00; --status-critical: #c62828; }
.accent-jobeasy { --viz: var(--viz-jobeasy); }
.accent-lumen { --viz: var(--viz-lumen); }

.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-head p { margin: 0; }
.dash-plans { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.dash-grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); padding-bottom: 24px; align-items: start; }
.dash-grid h2 { font-size: 1.2rem; margin: 0; }

.meter-card { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); }
.meter-card-head { display: flex; justify-content: space-between; align-items: center; }
.meter-card-head h2 { color: var(--accent); }
.meter-period { margin: 0; }
.meters { display: flex; flex-direction: column; gap: 14px; }
.meter-row { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 6px; }
.meter-track { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.meter-fill { height: 100%; background: var(--viz); border-radius: 99px; min-width: 0; }
.meter-warn .meter-fill { background: var(--status-warning); }
.meter-full .meter-fill { background: var(--status-critical); }
.meter-note { margin: 6px 0 0; font-size: .82rem; font-weight: 600; }
.status-warning { color: var(--status-warning); }
.status-critical { color: var(--status-critical); }

.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chart-head p { margin: 2px 0 0; }
.legend { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0; font-size: .85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.swatch-jobeasy { background: var(--viz-jobeasy); }
.swatch-lumen { background: var(--viz-lumen); }

.chart { position: relative; padding-left: 28px; }
.chart-grid { position: absolute; inset: 0 0 22px 28px; pointer-events: none; }
.chart-grid span {
  position: absolute; left: -28px; right: 0; transform: translateY(50%);
  font-size: .72rem; color: var(--muted); border-bottom: 1px dashed color-mix(in srgb, var(--border) 70%, transparent);
  line-height: 0; padding-bottom: 0;
}
.bars { position: relative; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; height: 170px; gap: 3px; }
.bar-col { height: 100%; display: flex; align-items: flex-end; cursor: default; border-radius: 4px 4px 0 0; }
.bar-col.is-hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.stack { width: 100%; display: flex; flex-direction: column; gap: 2px; min-height: 3px; }
.seg { min-height: 2px; }
.stack > .seg:first-child { border-radius: 4px 4px 0 0; }
.seg-jobeasy { background: var(--viz-jobeasy); }
.seg-lumen { background: var(--viz-lumen); }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; height: 16px; }
.chart-empty { position: absolute; left: 28px; right: 0; top: 70px; text-align: center; margin: 0; font-size: .9rem; }
.chart-tip {
  position: absolute; top: -8px; z-index: 2; min-width: 120px; padding: 8px 10px; pointer-events: none;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); font-size: .82rem;
}
.chart-tip div { display: flex; align-items: center; gap: 6px; }
.chart-table { margin-top: 14px; }
.chart-table summary { cursor: pointer; color: var(--muted); }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .88rem; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.chart-table th { color: var(--muted); font-weight: 500; }

.recent-card { display: flex; flex-direction: column; gap: 10px; }
.recent { list-style: none; padding: 0; margin: 0; }
.recent li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--border); }
.recent li:last-child { border-bottom: 0; }
.recent .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--viz); align-self: center; }
.recent-what { display: flex; flex-direction: column; font-size: .9rem; min-width: 0; }
.recent-what .muted { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-when { white-space: nowrap; font-size: .78rem; }
.recent-foot { margin-top: auto; }

@media (max-width: 860px) {
  .dash-grid, .dash-grid-wide { grid-template-columns: 1fr; }
  .bars { gap: 2px; }
}

/* ---- app sign-in ---- */
.device-code { font: 700 2rem var(--display); letter-spacing: .12em; text-align: center; margin: 4px 0;
  padding: 14px; border-radius: 10px; border: 1px dashed var(--border); background: var(--bg-2); }
.activate-form { display: flex; flex-direction: column; gap: 12px; }
.activate-form input { text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.device-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---- guide ---- */
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 48px; align-items: start; }
.guide-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; }
.guide-nav-title { font: 600 .78rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.guide-nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; border-left: 2px solid transparent; }
.guide-nav a.sub { padding-left: 26px; font-size: .9rem; }
.guide-nav a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.guide-nav a[aria-current="page"] { color: var(--text); background: var(--surface); border-left-color: var(--accent); font-weight: 600; border-radius: 0 8px 8px 0; }
.guide-body { max-width: 760px; }
.prose h1 { margin-bottom: .3em; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; scroll-margin-top: 80px; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose li > ul { margin-top: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0 16px; }
.prose code, .faq code { font: .88em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.prose pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 7px; text-align: center; font: 600 .78rem ui-monospace, Consolas, monospace;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; }
.callout { margin: 18px 0; padding: 14px 18px; border-radius: 0 10px 10px 0;
  border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.callout p { margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.toc a { font-size: .85rem; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.toc a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.guide-steps { list-style: none; padding: 0; counter-reset: step; margin: 28px 0 28px 17px; }
.guide-steps > li { counter-increment: step; position: relative; margin: 0; padding: 0 0 22px 36px; border-left: 1px solid var(--border); }
.guide-steps > li:last-child { border-left-color: transparent; }
.guide-steps > li::before { content: counter(step); position: absolute; left: -18px; top: -2px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font: 700 1rem var(--display); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.guide-steps h2 { font-size: 1.15rem; margin: 4px 0 8px; }
.guide-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.guide-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.guide-card:hover { text-decoration: none; border-color: var(--accent); }
.guide-card b { color: var(--accent); font-size: 1.05rem; }
.guide-card span { color: var(--muted); font-size: .9rem; }
.guide-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .93rem; }
.guide-table th, .guide-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.guide-table th { color: var(--muted); font-weight: 500; }
.kbd-table td:first-child { white-space: nowrap; width: 1%; }

/* ---- support ---- */
.support-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.support-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--radius); color: var(--text);
  border: 1px solid var(--border); background: var(--surface); }
.support-tile:hover { border-color: var(--primary); text-decoration: none; }
.support-tile span { color: var(--muted); font-size: .88rem; }
.support-fixes .faq { max-width: none; margin: 0 0 8px; }
.support-fixes h3 { margin-top: 28px; font-size: 1.05rem; }
.support-fixes h3.accent-lumen, .support-fixes h3.accent-jobeasy { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; align-items: start; }
.contact-form, .contact-done { display: flex; flex-direction: column; gap: 14px; }
.contact-done h3 { margin: 0; }
.contact-done p { margin: 0; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font: 1rem var(--font);
}
textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input:disabled { opacity: .7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- about ---- */
.about-app { color: var(--text); }
.about-app:hover { text-decoration: none; border-color: var(--accent); }
.about-contact .card { max-width: 760px; margin-inline: auto; text-align: center; }
.about-contact .cta-row { justify-content: center; }

@media (max-width: 900px) {
  .guide { grid-template-columns: 1fr; gap: 20px; padding-block: 32px; }
  .guide-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .guide-nav-title { width: 100%; margin-bottom: 0; }
  .guide-nav a, .guide-nav a.sub { padding: 6px 12px; border: 1px solid var(--border); border-radius: 99px; font-size: .88rem; }
  .guide-nav a[aria-current="page"] { border-radius: 99px; border-color: var(--accent); }
  .support-quick { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .guide-cards, .contact-row { grid-template-columns: 1fr; }
}

/* ---- site banner (admin panel) ---- */
.site-banner { padding: 10px 0; font-size: .92rem; text-align: center; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 14%, var(--bg)); }
.site-banner-warning { background: color-mix(in srgb, var(--lumen) 20%, var(--bg)); }
.nav-admin { color: var(--lumen); }

/* ---- admin panel ---- */
.admin { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; width: min(1320px, 100% - 32px);
  margin-inline: auto; padding-block: 32px 48px; align-items: start; }
.admin-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-title { font: 600 .78rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--lumen); margin-bottom: 8px; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; color: var(--muted); padding: 8px 12px; border-radius: 8px; }
.admin-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.admin-nav a[aria-current="page"] { color: var(--text); background: var(--surface); font-weight: 600; }
.count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 99px; font-size: .75rem; font-weight: 600;
  text-align: center; background: color-mix(in srgb, var(--primary) 25%, transparent); color: var(--text); }
.admin-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.admin-main h1 { font-size: 1.7rem; margin: 0; }
.admin-main h2 { font-size: 1.05rem; margin: 0 0 12px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.admin-head p { margin: 4px 0 0; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-state { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi b { font: 700 1.8rem var(--display); }
.kpi small { color: var(--muted); font-size: .78rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td .muted.small { display: block; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .pill { margin-left: 4px; }
.table-card { padding: 8px 12px; overflow-x: auto; }
/* Wide tables scroll inside their card on small screens instead of widening the page. */
.admin-main .card { min-width: 0; overflow-x: auto; }
.table-card h2 { padding: 10px 0 0; }
.row-open td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.admin-list li:last-child { border-bottom: 0; }
.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-filters input[type=search] { flex: 1; min-width: 220px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font: .95rem var(--font); }
.admin-filters select, .admin-inline-form select, .admin-inline-form input { width: auto; padding: 8px 10px; font-size: .9rem; }
.admin-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.admin-inline-form input[type=number] { width: 80px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-tabs a { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.admin-tabs a:hover { color: var(--text); text-decoration: none; }
.admin-tabs a[aria-current="page"] { color: var(--text); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; }
.status-open { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.status-answered { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.status-closed { color: var(--muted); }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.support-layout > div, .support-layout > aside { display: flex; flex-direction: column; gap: 16px; }
.thread-msg p { margin: 0 0 8px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.thread-reply { border-left: 3px solid var(--ok); border-radius: 0 var(--radius) var(--radius) 0; }
.thread-note { border-left: 3px solid var(--lumen); border-radius: 0 var(--radius) var(--radius) 0; background: color-mix(in srgb, var(--lumen) 6%, var(--surface)); }
.admin-reply { display: flex; flex-direction: column; gap: 12px; }
.admin-reply p { margin: 0; }
.settings-form { display: flex; flex-direction: column; gap: 16px; }
.settings-form .card { display: flex; flex-direction: column; gap: 14px; }
.switch-row { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; }
.switch-row input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.delete-form label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 400; }
.delete-form input[type=text] { width: 260px; padding: 8px 10px; }
.btn-danger { background: var(--danger); color: #fff; }

/* admin: grant access + monitor */
.grant-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grant-form textarea { width: 100%; resize: vertical; font: inherit; }
.monitor-title { font-size: 1.05rem; margin: 26px 0 12px; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.health { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.health p { margin: 0 0 4px; }
.health.state-bad { border-color: color-mix(in srgb, var(--status-critical) 55%, var(--border)); }
.health.state-warn { border-color: color-mix(in srgb, var(--status-warning) 55%, var(--border)); }
.health-name { display: flex; align-items: center; gap: 8px; }
.health-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.health-name .health-dot { margin-right: 0; }
.health-dot.state-ok { background: var(--ok); }
.health-dot.state-warn { background: var(--status-warning); }
.health-dot.state-bad { background: var(--status-critical); }
.health-dot.state-info { background: var(--primary); }
.attention li > span { display: flex; align-items: center; }
.attention li > a { white-space: nowrap; }
.seg-ok, .swatch-ok { background: var(--viz-jobeasy); }
.seg-fail, .swatch-fail { background: var(--status-critical); }
.seg-signup { background: var(--primary); }
@media (max-width: 760px) { .grant-row { grid-template-columns: 1fr; } }

@media (max-width: 1020px) {
  .admin { grid-template-columns: 1fr; gap: 16px; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .admin-nav-title { width: 100%; margin: 0; }
  .admin-nav a { border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; gap: 6px; font-size: .88rem; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-grid, .kpis { grid-template-columns: 1fr; }
}

.app-config h2 { color: var(--accent); margin: 0; }
.app-config h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 8px 0 0; }
.mono-input { font-family: ui-monospace, Consolas, monospace !important; font-size: .92rem !important; }

.model-field { display: flex; flex-direction: column; gap: 6px; }
.model-field > label { font-weight: 500; font-size: .92rem; }
.model-row { display: flex; gap: 8px; flex-wrap: wrap; }
.model-select { flex: 1 1 260px; min-width: 0; }
.effort-select { flex: 0 1 200px; }
.model-custom[hidden] { display: none; }

/* ---- theme switch ---- */
.theme-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (max-width: 1020px) {
  .theme-toggle { width: 100%; justify-content: flex-start; padding: 0 12px; grid-auto-flow: column; gap: 8px; }
  .theme-toggle::after { content: "Light mode"; font: 500 .95rem var(--font); }
  :root[data-theme="light"] .theme-toggle::after { content: "Dark mode"; }
}

.price-table input { min-width: 190px; padding: 8px 10px; }
.price-table td .muted.small { display: block; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.beta-card { margin-bottom: 24px; }
.cur-switch { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; align-items: center; margin: 0 0 12px; }
.cur-switch a { color: var(--muted); text-decoration: none; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; }
.cur-switch a[aria-current="true"] { color: var(--text); border-color: var(--border); }
