/* are you cooked? — terminal verdict */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;0,800;1,400;1,700&display=swap');

:root {
  --bg: #0c0c0e;
  --surface: #131318;
  --surface-2: #1a1a22;
  --ink: #d4d4d8;
  --ink-bright: #fafafa;
  --muted: #5c5c6e;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --mono: "JetBrains Mono", "Fira Code", "SF Mono", "Cascadia Code", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* scanline overlay */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
}

.page-shell {
  width: min(720px, calc(100% - 24px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

/* ---- HERO ---- */
.hero {
  display: grid;
  gap: 16px;
  padding-bottom: 32px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

h1 {
  font-size: clamp(3.5rem, 14vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  font-weight: 800;
  color: var(--ink-bright);
}

.lede {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.source-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
  width: min(420px, 100%);
}

.source-title {
  color: var(--muted);
  font-size: 0.68rem;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.source-card ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
}

.job-num {
  color: var(--muted);
  margin-right: 8px;
}

.source-footer {
  margin-top: 10px;
  color: var(--red);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

/* ---- PANELS ---- */
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-top: 12px;
  padding: 20px;
}

/* ---- FORM ---- */
.panel-form {
  background: var(--surface);
}

form { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }

label span {
  font-size: 0.72rem;
  color: var(--muted);
}

.optional { color: var(--muted); opacity: 0.5; }

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink-bright);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.88rem;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-dim);
}

textarea {
  resize: vertical;
  min-height: 64px;
}

.form-footer { padding-top: 4px; }

button {
  font: inherit;
  border: 0;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 120ms ease;
}

#submit-button {
  background: var(--ink-bright);
  color: var(--bg);
}

#submit-button:hover {
  background: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

#submit-button:disabled {
  opacity: 0.4;
  cursor: wait;
}

/* ---- STATUS ---- */
.panel-status {
  background: var(--surface-2);
  border-color: var(--border);
}

.status-text {
  color: var(--muted);
  font-size: 0.82rem;
}

.status-text::before {
  content: "> ";
  color: var(--green);
}

/* ---- RESULT CARD ---- */
.panel-result {
  border-width: 2px;
  animation: fadeUp 300ms ease;
  position: relative;
  overflow: hidden;
}

.panel-result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.panel-result.outcome-escapes { border-color: var(--green); }
.panel-result.outcome-escapes::before { background: var(--green); }

.panel-result.outcome-borderline { border-color: var(--yellow); }
.panel-result.outcome-borderline::before { background: var(--yellow); }

.panel-result.outcome-cooked { border-color: var(--red); }
.panel-result.outcome-cooked::before { background: var(--red); }

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.result-handle {
  color: var(--ink-bright);
  font-weight: 700;
  font-size: 0.88rem;
}

.result-confidence {
  color: var(--muted);
  font-size: 0.72rem;
}

/* verdict headline */
.verdict-hero {
  margin-bottom: 20px;
}

.verdict-hero h2 {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink-bright);
}

/* score meter */
.score-meter-wrap {
  margin-bottom: 20px;
}

.score-meter {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1), background 300ms ease;
  width: 0%;
}

.score-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.68rem;
}

.score-label-left { color: var(--red); }
.score-label-right { color: var(--green); }

.score-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink-bright);
  letter-spacing: -0.04em;
}

/* stats */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

/* roast */
.roast {
  border: 0;
  border-left: 3px solid var(--red);
  background: var(--red-dim);
  border-radius: 0 6px 6px 0;
  padding: 16px 18px;
  margin: 0 0 16px 0;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-bright);
}

/* thesis */
.thesis {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* columns */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.col {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 14px;
}

h3 {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

ul li {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink);
  padding-left: 14px;
  position: relative;
}

ul li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* advice */
.advice-block {
  background: var(--green-dim);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 12px;
}

.advice-block h3 { color: var(--green); }

.advice-block li::before { color: var(--green); }

/* share */
.share-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-screenshot {
  background: var(--green);
  color: var(--bg);
  flex: 1;
}

.btn-screenshot:hover {
  box-shadow: 0 0 20px var(--green-dim);
}

.btn-share {
  background: var(--ink-bright);
  color: var(--bg);
  flex: 1;
}

.btn-share:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-copy {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  flex: 1;
}

.btn-copy:hover {
  background: var(--surface);
  border-color: var(--muted);
}

/* disclaimer */
.disclaimer {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
  opacity: 0.6;
}

/* ---- SIMILAR / LEADERBOARD ---- */
.section-sub {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 4px;
}

.card-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.similar-card, .leaderboard-entry {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
}

.similar-username, .lb-username {
  font-weight: 700;
  color: var(--ink-bright);
  font-size: 0.82rem;
}

.similar-meta, .lb-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.similar-headline, .lb-headline {
  font-size: 0.8rem;
  color: var(--ink);
}

.lb-rank {
  font-size: 0.68rem;
  color: var(--muted);
  margin-right: 6px;
}

/* outcome colors */
.outcome-escapes { color: var(--green) !important; }
.outcome-borderline { color: var(--yellow) !important; }
.outcome-cooked { color: var(--red) !important; }
.outcome-permanent_underclass { color: var(--red) !important; }

.muted { color: var(--muted); }

/* ---- FOOTER ---- */
.site-footer {
  margin-top: 32px;
  text-align: center;
}

.site-footer p {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .page-shell { padding-top: 28px; }
  h1 { font-size: 3rem; }
  .columns { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .share-row { flex-direction: column; }
}
