:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #efe8dc;
  --bg-2: #e7dfd1;
  --ink: #1c1914;
  --muted: #6d655b;
  --line: #d8d0c3;
  --card: #fbf7f0;
  --col: #e6ddd0;
  --accent: #9a3412;
  --accent-ink: #fffaf5;
  --good: #1f6b45;
  --bad: #9f2d2d;
  --offer: #1d4e89;
  --interview: #1d4e89;
  --shadow: 0 1px 0 rgba(28, 25, 20, 0.04), 0 10px 28px rgba(28, 25, 20, 0.06);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --bg-2: #1c1a17;
  --ink: #f3ece2;
  --muted: #a89f92;
  --line: #322e28;
  --card: #211e1a;
  --col: #1a1815;
  --accent: #e8a15a;
  --accent-ink: #1c140c;
  --good: #8dcea8;
  --bad: #f0a3a0;
  --offer: #9ec0ea;
  --interview: #9ec0ea;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.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;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 5;
}
.skip:focus { top: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 20px 48px; }
.top { display: grid; gap: 16px; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--ink); }
.mark { width: 40px; height: 40px; flex: none; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.lede { max-width: 62ch; color: var(--muted); }
.toolbar, .actions, .empty-actions, .dialog-actions, .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.movers { display: flex; gap: 4px; align-items: center; }
.toolbar { justify-content: space-between; }
.views {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--col);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.views a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 14px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}
.views a[aria-current="page"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn, .icon, .text-btn {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.btn { padding: 0 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.file { display: inline-flex; align-items: center; }
.btn:hover, .icon:hover, .text-btn:hover, .views a:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.filters { margin-top: 18px; }
.search input, .field input, .field select, .field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 44px;
}
.search input { background: var(--card); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field textarea { resize: vertical; min-height: 96px; }
.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.tile {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.tile-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile-value {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.tile-detail { color: var(--muted); font-size: 13px; }
.status { min-height: 1.4em; margin: 10px 0 0; color: var(--muted); }
main { margin-top: 8px; }
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px 16px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.col {
  background: var(--col);
  border-radius: 16px;
  min-height: 280px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}
.col.drop { border-color: var(--accent); }
.col-head, .hint, .cards { padding-left: 12px; padding-right: 12px; }
.col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
}
.col h2 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.count {
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  border-radius: 999px;
  min-width: 1.6em;
  text-align: center;
  padding: 2px 8px;
  font-size: 12px;
}
.cards { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; flex: 1; }
.drop-hint { color: var(--muted); font-size: 13px; margin: 8px 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 8px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--stage, var(--line));
  cursor: grab;
}
.stage-saved { --stage: var(--muted); }
.stage-applied { --stage: var(--ink); }
.stage-interview { --stage: var(--interview); }
.stage-offer { --stage: var(--good); }
.stage-decided { --stage: var(--accent); }
.card-top { position: relative; min-height: 28px; }
.card-title, .text-btn, .card-actions a, .follow-item {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.card-title {
  display: block;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding-right: 62px;
}
.movers { position: absolute; top: 0; right: 0; }
.role { margin-top: 2px; }
.meta, .snippet, .foot, .noscript { color: var(--muted); font-size: 13px; }
.follow, .badge { margin-top: 8px; font-size: 13px; }
.when {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-2);
}
.follow.overdue .when, .when.overdue { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.follow.today .when, .when.today { color: var(--accent-ink); background: var(--accent); }
.follow.soon .when, .when.soon { color: var(--interview); background: color-mix(in srgb, var(--interview) 14%, transparent); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-2);
}
.outcome-accepted { color: var(--good); }
.outcome-rejected { color: var(--bad); }
.card-actions { margin-top: 8px; }
.card-actions a { text-decoration: underline; text-underline-offset: 2px; }
.icon {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
}
.icon:disabled { opacity: 0.35; cursor: default; }
.snippet {
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty-desk, .filter-note, .empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 28px 20px;
}
.empty-desk h2, .pulse-copy h2, .follow-list h2 {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.empty-desk p { margin: 8px 0 16px; color: var(--muted); max-width: 52ch; }
.filter-note, .empty { margin-bottom: 12px; }
.stage-jump { display: none; }
.pulse-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  margin-top: 8px;
}
.pulse-copy, .funnel, .follow-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.pulse-copy p { margin-top: 8px; }
.outcomes { color: var(--muted); }
.funnel { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 28px; gap: 8px; align-items: center; }
.funnel-label, .funnel-n { font-size: 13px; }
.funnel-n { font-variant-numeric: tabular-nums; text-align: right; }
.bar { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.follow-list { margin-top: 16px; }
.follow-list ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.follow-item {
  width: 100%;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 4px 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.follow-item:hover { border-color: var(--line); background: var(--bg); }
.follow-item .step { grid-column: 2; color: var(--muted); }
.foot { margin-top: 22px; }
.noscript { padding: 16px 20px; }
dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20, 19, 17, 0.48); }
form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.dialog-head, .dialog-actions { display: flex; align-items: center; gap: 8px; }
.dialog-head h2 {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 28px;
  font-weight: 500;
  flex: 1;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stage-row:has(#outcome-field[hidden]) { grid-template-columns: 1fr; }
.grow { flex: 1; }
.error {
  margin: 0;
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  border-radius: 10px;
  padding: 8px 10px;
}
.dragging { opacity: 0.55; }

@media (min-width: 1180px) {
  .board {
    grid-auto-flow: unset;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: visible;
  }
}
@media (max-width: 800px) {
  .strip, .pulse-grid { grid-template-columns: 1fr 1fr; }
  .pulse-grid { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
}
@media (max-width: 720px) {
  .board { grid-auto-columns: 100%; }
  .stage-jump {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 0 0 8px;
    padding-bottom: 2px;
  }
  .stage-jump button {
    flex: 1 1 0;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    font-size: 12px;
    white-space: nowrap;
  }
}
@media (max-width: 640px) {
  .wrap { padding: 18px 14px 36px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr 1fr; width: 100%; }
  #add { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .stage-row { grid-template-columns: 1fr; }
  .tile-value { font-size: 28px; }
  .follow-item { grid-template-columns: 1fr; }
  .follow-item .step { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
