/*
 * The shared skin for joblit.app.
 *
 * Tokens transcribed from src/theme/index.ts — the values the app actually
 * renders, not the ones CLAUDE.md describes. That file documents a warm
 * obsidian and champagne system; the code is pure black with a blue accent, and
 * the logo is that same blue. Matching the code is what makes this look like the
 * product.
 *
 * These rules started as the billing page's inline block and were lifted out
 * unchanged so /post/ and /apply/ could not drift from it. Anything below the
 * "beyond billing" line is new and used only by those two.
 */

:root {
  --bg: #000000;
  --surface: #0C0C0E;
  --raised: #151517;
  --line: #2A2A2E;
  --line-soft: #1A1A1D;
  --accent: #2F4FD6;
  --on-accent: #FFFFFF;
  --text: #FFFFFF;
  --text-muted: #A1A1A6;
  --good: #3DDC97;
  --bad: #FF6B85;
  --warn: #F5B94A;

  --tight: 8px;
  --group: 16px;
  --gutter: 20px;
  --section: 32px;
  --major: 56px;

  --radius: 14px;
}

/* Native controls — checkboxes, range tracks, scrollbars — render light by
   default and a stark white checkbox on a near-black card looks like a bug.
   This is the supported way to say the whole UI is dark. */
:root { color-scheme: dark }

* { box-sizing: border-box }

html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh; display: flex; flex-direction: column;
  padding: max(var(--gutter), env(safe-area-inset-top)) var(--gutter) max(var(--gutter), env(safe-area-inset-bottom));
}

.wrap {
  width: 100%; max-width: 520px; margin: 0 auto; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  gap: var(--section); padding: var(--section) 0;
}
/* A form is read top-down, not centred in the viewport like a single card. */
.wrap.flow { justify-content: flex-start }

.mast { display: flex; align-items: center; gap: var(--tight) }
.mast img { width: 34px; height: 34px; border-radius: 9px; display: block }
.mast span { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.2px }

h1 { margin: 0; font-size: clamp(28px, 7vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; text-wrap: balance }
.sub { margin: var(--group) 0 0; font-size: 17px; line-height: 24px; color: var(--text-muted) }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--gutter); display: flex; flex-direction: column; gap: var(--group);
}
.eyebrow {
  margin: 0; font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-muted);
}
.price { display: flex; align-items: baseline; gap: var(--tight) }
.price b { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums }
.price span { font-size: 15px; color: var(--text-muted) }
.card p { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-muted) }

form { display: flex; flex-direction: column; gap: var(--tight); margin: 0 }
label {
  font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-muted);
}
input, textarea, select {
  width: 100%; background: var(--raised); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 13px var(--group); font: inherit; font-size: 16px; line-height: 22px;
}
input::placeholder, textarea::placeholder { color: #8E8E93 }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}

button, .btn {
  appearance: none; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent);
  font: inherit; font-size: 17px; font-weight: 600; line-height: 24px; padding: 13px var(--group);
  cursor: pointer; text-align: center; text-decoration: none; display: block; width: 100%;
  margin-top: var(--tight);
}
button.secondary, .btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text) }
button:disabled { opacity: .5; cursor: default }
button:focus-visible, .btn:focus-visible { outline: 2px solid #FFF; outline-offset: 2px }

.msg { margin: 0; font-size: 15px; line-height: 20px; min-height: 20px }
.msg.ok { color: var(--good) } .msg.err { color: var(--bad) } .msg.warn { color: var(--warn) }

footer {
  border-top: 1px solid var(--line-soft); padding-top: var(--group);
  display: flex; flex-wrap: wrap; gap: var(--tight) var(--group); justify-content: space-between;
  font-size: 13px; line-height: 18px; color: var(--text-muted);
}
footer a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px }
footer a:hover { color: var(--text) }

[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;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important }
}

/* ══════════════════════════════════════════════ beyond billing ══════ */

/* A labelled field. `gap` on the group, never margins on the parts. */
.field { display: flex; flex-direction: column; gap: 6px }
.field .hint { font-size: 13px; line-height: 18px; color: var(--text-muted); margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400 }
textarea { min-height: 140px; resize: vertical; line-height: 24px }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tight) }

/* Pay unit. Two choices, so a segmented control rather than a select — an
   hourly rate and an annual salary are different things, not a dropdown. */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden }
.seg button {
  margin: 0; border-radius: 0; background: var(--raised); color: var(--text-muted);
  font-size: 15px; font-weight: 600; padding: 11px var(--tight); border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0 }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent) }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px 0 }
.check input { width: 20px; height: 20px; accent-color: var(--accent); padding: 0; flex: 0 0 auto }
.check span { font-size: 16px; line-height: 22px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400 }

/* The pass mark. A number this consequential gets shown, not hidden in a slider. */
.thresh { display: flex; align-items: center; gap: var(--group) }
.thresh input[type=range] { flex: 1; padding: 0; background: transparent; border: 0; accent-color: var(--accent) }
.thresh b { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right }

/* The share link — the thing they came for, so it gets the emphasis. */
.linkbox {
  display: flex; align-items: center; gap: var(--tight); background: var(--raised);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px var(--group);
}
.linkbox code {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; line-height: 20px; overflow-x: auto; white-space: nowrap; color: var(--text);
}
.linkbox button { width: auto; margin: 0; flex: 0 0 auto; padding: 9px 14px; font-size: 15px }

/* The generated questions, numbered because the order is the order asked. */
ol.qlist { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 10px }
ol.qlist li { font-size: 15px; line-height: 22px; color: var(--text) }
ol.qlist li::marker { color: var(--text-muted); font-variant-numeric: tabular-nums }

/* ── the screening ── */
.progress { display: flex; align-items: center; gap: var(--group) }
.bar { flex: 1; height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .24s ease }
.progress span { font-size: 13px; line-height: 16px; color: var(--text-muted); font-variant-numeric: tabular-nums }

.question { margin: 0; font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance }

/* Answers already given. Muted, because the live question is what matters. */
.said { display: flex; flex-direction: column; gap: var(--group) }
.said .turn { display: flex; flex-direction: column; gap: 4px; padding-left: var(--group); border-left: 2px solid var(--line-soft) }
.said .turn p { margin: 0; font-size: 14px; line-height: 20px }
.said .turn .q { color: var(--text-muted) }
.said .turn .a { color: var(--text) }

/* The verdict. The booked time is the headline; the score is supporting. */
.verdict { display: flex; flex-direction: column; gap: var(--tight); align-items: flex-start }
.pill {
  font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; border: 1px solid currentColor;
}
.pill.good { color: var(--good) } .pill.bad { color: var(--text-muted) }
.big { margin: 0; font-size: clamp(24px, 6vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance }
.score { font-size: 15px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin: 0 }
