/* ------------------------------------------------------------------
   Paradeplatz — International Typographic Style.
   Paper, black ink, one Swiss red. A strict grid, flush-left type,
   tabular numbers. The one flourish: a station clock on the dashboard
   that counts down to the next scan.
   ------------------------------------------------------------------ */
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #ffffff;
  --mist: #f2f2ef;
  --ink: #000000;
  --graphite: #5b5b58;
  --ash: #8b8b86;
  --rule: #dcdcd7;
  --red: #da291c;
  --red-ink: #b81f14;
  --red-tint: #fcebe9;
  --on-red: #ffffff;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);

  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --s-1: 0.8125rem;
  --s0: 1rem;
  --s1: 1.25rem;
  --s2: 1.75rem;
  --s3: 2.75rem;
  --s4: 4.25rem;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121211; --mist: #1c1c1a; --ink: #f4f4f0; --graphite: #b4b4ad; --ash: #86867f;
  --rule: #2e2e2b; --red: #ff4a3d; --red-ink: #ff6a5f; --red-tint: #3a1714; --on-red: #ffffff;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121211; --mist: #1c1c1a; --ink: #f4f4f0; --graphite: #b4b4ad; --ash: #86867f;
    --rule: #2e2e2b; --red: #ff4a3d; --red-ink: #ff6a5f; --red-tint: #3a1714; --on-red: #ffffff;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 var(--s0)/1.5 var(--font);
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: var(--s1); margin-bottom: 1rem; }
p { margin: 0 0 0.75rem; }
.muted { color: var(--graphite); }
.hint { color: var(--ash); font-weight: 400; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- Header ---------------- */
.masthead { border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.masthead-inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; }
.brand:hover { color: var(--ink); }
.cross { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 0.25rem; margin-left: auto; align-items: center; }
.nav a, .nav button {
  font: 500 0.95rem/1 var(--font); color: var(--graphite); text-decoration: none; padding: 0.55rem 0.8rem;
  border-radius: 2px; background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--ink); background: var(--mist); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.nav form { margin: 0; }
.theme-toggle { display: inline-flex; align-items: center; }

/* ---------------- Page grid ---------------- */
.page { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 3rem var(--gutter) 4rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem; }
.hero-title { font-size: var(--s4); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.hero-lede { font-size: var(--s1); color: var(--graphite); max-width: 42ch; margin: 1rem 0 0; }
.hero-slim { grid-template-columns: minmax(0, 1fr); }
.hero-slim .hero-title { font-size: var(--s3); }

.split { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 3rem; align-items: start; }
.stack-lg { display: grid; gap: 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 2px solid var(--ink); padding-top: 0.8rem; margin-bottom: 0.5rem; }
.section-head h2 { margin: 0; }
.section-head a { font-size: var(--s-1); font-weight: 500; }
.side-block { border-top: 2px solid var(--ink); padding-top: 0.8rem; }

/* ---------------- Station clock (the one flourish) ---------------- */
.clock-wrap { display: grid; justify-items: center; gap: 0.6rem; }
.clock { width: 168px; height: 168px; }
.clock .face { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.clock .tick { stroke: var(--ink); }
.clock .hand { stroke: var(--ink); stroke-linecap: butt; }
.clock .sec { stroke: var(--red); fill: var(--red); }
.clock-caption { font-size: var(--s-1); color: var(--graphite); text-align: center; }
.clock-caption strong { display: block; color: var(--ink); font-size: var(--s0); font-weight: 600; }

/* ---------------- Job rows ---------------- */
.jobs { list-style: none; margin: 0; padding: 0; }
.job {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 1.25rem; align-items: center;
  padding: 1.1rem 0.75rem 1.1rem 0; border-bottom: 1px solid var(--rule); position: relative;
  transition: background-color 160ms var(--ease), opacity 240ms var(--ease), transform 240ms var(--ease);
}
.job:hover, .job.is-focused { background: var(--mist); }
.job.is-focused { box-shadow: inset 3px 0 0 var(--red); }
.job.is-leaving { opacity: 0; transform: translateX(24px); }
.score { display: grid; gap: 0.35rem; padding-left: 0.75rem; }
.score-num { font-size: var(--s2); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.score-bar { display: block; width: 100%; height: 3px; }
.score-bar .track { fill: var(--rule); }
.score-bar .fill { fill: var(--ink); }
.score-hi .score-num { color: var(--red); }
.score-hi .score-bar .fill { fill: var(--red); }
.score-lo .score-num { color: var(--ash); }
.score-lo .score-bar .fill { fill: var(--ash); }
.job-title { font-size: var(--s1); font-weight: 600; letter-spacing: -0.015em; text-decoration: none; line-height: 1.25; }
.job-meta { margin: 0.25rem 0 0; color: var(--graphite); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.9rem; }
.job-meta .co { color: var(--ink); font-weight: 500; }
.tag { font-size: var(--s-1); color: var(--graphite); }
.job-actions { display: flex; gap: 0.5rem; }

/* ---------------- Buttons ---------------- */
.btn {
  font: 600 0.9rem/1 var(--font); letter-spacing: -0.005em; padding: 0.7rem 1rem; border-radius: 2px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  transition: background-color 120ms var(--ease), color 120ms var(--ease), transform 80ms var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn-red:hover { background: var(--red-ink); border-color: var(--red-ink); color: var(--on-red); }
.btn-ghost { border-color: transparent; color: var(--graphite); }
.btn-ghost:hover { background: var(--mist); color: var(--ink); }
.btn-wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
kbd { font: 600 0.72rem/1 var(--font); border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; padding: 0.15rem 0.35rem; color: var(--graphite); }

/* ---------------- Forms ---------------- */
label { display: block; font-size: var(--s-1); font-weight: 600; margin-bottom: 1.1rem; }
label > input, label > select, label > textarea { display: block; margin-top: 0.4rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"],
input[type="date"], select, textarea {
  font: 400 var(--s0)/1.4 var(--font); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule); border-radius: 2px; padding: 0.65rem 0.75rem; width: 100%;
  transition: border-color 120ms var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--ash); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
textarea { resize: vertical; }
label.check { display: flex; gap: 0.55rem; align-items: center; font-weight: 400; }
label.check > input { margin: 0; accent-color: var(--red); width: 1rem; height: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.form-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--rule); }
.form-section:first-of-type { border-top: 2px solid var(--ink); }
.form-section p { color: var(--graphite); font-size: var(--s-1); max-width: 32ch; }
.form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.notice, .alert { padding: 0.9rem 1rem; background: var(--mist); border-left: 3px solid var(--ink); margin-bottom: 1.5rem; }
.alert { background: var(--red-tint); border-left-color: var(--red); }

/* ---------------- Tabs & filters ---------------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs a { padding: 0.75rem 1rem 0.7rem 0; margin-right: 1.25rem; text-decoration: none; color: var(--graphite); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.tabs .count { color: var(--ash); font-weight: 400; margin-left: 0.3rem; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.filters label { margin: 0; }
.shortcuts { font-size: var(--s-1); color: var(--ash); margin: 0 0 0.75rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------------- Pipeline summary ---------------- */
.stages { list-style: none; margin: 0 0 1rem; padding: 0; }
.stages a { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.stages .n { color: var(--ash); font-size: var(--s-1); }
.stages .c { font-size: var(--s1); font-weight: 700; }
.stages a:hover .c { color: var(--red); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; }
.plain li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.plain .sub { display: block; font-size: var(--s-1); color: var(--graphite); }

.pill { font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 2px; background: var(--mist); color: var(--graphite); white-space: nowrap; }
.pill-shortlisted, .pill-preparing { background: var(--ink); color: var(--paper); }
.pill-applied, .pill-interview { background: var(--red-tint); color: var(--red-ink); }
.pill-offer { background: var(--red); color: var(--on-red); }

/* ---------------- Board (drag and drop) ---------------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.col { border-top: 2px solid var(--ink); padding-top: 0.75rem; min-height: 14rem; display: flex; flex-direction: column; gap: 0.6rem; transition: background-color 120ms var(--ease); }
.col.is-over { background: var(--mist); box-shadow: inset 0 2px 0 var(--red); }
.col-head { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--s0); margin: 0 0 0.4rem; }
.col-head .n { color: var(--ash); font-weight: 500; margin-right: 0.4rem; }
.col-count { font-weight: 700; }
.card {
  display: grid; gap: 0.2rem; padding: 0.85rem 0.9rem; background: var(--paper); border: 1px solid var(--rule);
  text-decoration: none; cursor: grab; transition: box-shadow 150ms var(--ease), transform 150ms var(--ease), border-color 150ms;
}
.card:hover { border-color: var(--ink); color: inherit; }
.card.is-dragging { opacity: 0.4; }
.card.just-moved { animation: settle 420ms var(--ease); }
@keyframes settle { 0% { transform: scale(1.03); box-shadow: var(--shadow); border-color: var(--red); } 100% { transform: none; } }
.card-title { font-weight: 600; line-height: 1.25; }
.card-co { font-size: var(--s-1); color: var(--graphite); }
.card-due { font-size: var(--s-1); color: var(--red-ink); font-weight: 500; }
.col-empty { color: var(--ash); font-size: var(--s-1); padding: 0.5rem 0; }

/* ---------------- Job detail ---------------- */
.detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; align-items: start; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem; }
.detail-head .score { padding: 0; width: 5rem; }
.detail-head .score-num { font-size: var(--s4); }
.detail-title { font-size: var(--s3); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 22ch; }
.detail-meta { font-size: var(--s1); margin-top: 0.75rem; }
.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li { padding: 0.55rem 0 0.55rem 1.4rem; border-bottom: 1px solid var(--rule); position: relative; }
.reasons li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 8px; height: 2px; background: var(--red); }
.description { white-space: pre-line; max-width: 70ch; line-height: 1.65; }
.sources { margin-top: 1.25rem; color: var(--ash); font-size: var(--s-1); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.timeline .d { color: var(--graphite); font-size: var(--s-1); padding-top: 0.1rem; }

/* ---------------- Tables ---------------- */
.ledger { width: 100%; border-collapse: collapse; font-size: var(--s-1); }
.ledger th { text-align: left; font-weight: 600; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--rule); }
.ledger .num { text-align: right; }
.ok { color: var(--ink); }
h2.spaced { margin-top: 2.5rem; }
.bad { color: var(--red); font-weight: 600; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 0.8rem 0.9rem 0.8rem 1.1rem; display: flex; gap: 1rem; align-items: center;
  font-weight: 500; box-shadow: var(--shadow); transition: opacity 180ms var(--ease), transform 180ms var(--ease); z-index: 50; max-width: calc(100vw - 2rem);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { font: 600 0.9rem/1 var(--font); background: none; border: 0; color: var(--red); cursor: pointer; padding: 0.3rem 0.4rem; }
:root[data-theme="dark"] .toast button { color: var(--red-ink); }

/* ---------------- Sign-in ---------------- */
body.gate { background: var(--paper); }
.gate .page { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; align-items: center; min-height: 100vh; padding-top: 2rem; }
.gate-mark { display: grid; gap: 2rem; }
.gate-mark .cross { width: 72px; height: 72px; }
.gate-title { font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 800; letter-spacing: -0.055em; line-height: 0.9; }
.gate-sub { font-size: var(--s1); color: var(--graphite); max-width: 30ch; }
.gate-card { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.gate-switch { margin-top: 1.25rem; color: var(--graphite); }

/* ---------------- Footer ---------------- */
.colophon { max-width: 1240px; width: 100%; margin: 0 auto; padding: 1.25rem var(--gutter) 2rem; display: flex; justify-content: space-between; color: var(--ash); font-size: var(--s-1); border-top: 1px solid var(--rule); }

.empty { padding: 2rem 0; color: var(--graphite); }
.empty p { max-width: 48ch; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1000px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .split, .form-section, .gate .page { grid-template-columns: minmax(0, 1fr); }
  .gate .page { gap: 2rem; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .clock-wrap { justify-items: start; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; }
  .clock { width: 96px; height: 96px; }
  .clock-caption { text-align: left; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .grow { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --s4: 3rem; --s3: 2.1rem; }
  .page { padding-top: 1.75rem; }
  .masthead-inner { height: auto; flex-wrap: wrap; gap: 0.25rem 1rem; padding-top: 0.7rem; padding-bottom: 0.4rem; }
  .nav { margin-left: -0.8rem; width: calc(100% + 0.8rem); overflow-x: auto; scrollbar-width: none; }
  .nav a, .nav button { white-space: nowrap; }
  .job { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .job-actions { grid-column: 2; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .col { min-height: 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .shortcuts { display: none; }
  .detail-head .score-num { font-size: var(--s3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
