/* Hallmark · shape: app screen · genre: modern-minimal · theme: Coral (deal 1/3, seed private-job-application-tracker-4238·bbde3803·2026-11-20·r0)
 * nav: top bar, wordmark + three tabs + countdown + one ink action · signature: each application filed as a cotton sheet, the offer pressed in coral · states: loading, empty, error, locked, full
 * axes: light/grotesk-sans/warm · posture: restrained · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H3 E4 S4 R4 V3 · weakest: H (no hero on an app screen), carried by the sheet panel as the one physical object */
/* Hallmark · answered: 11 (the 1px lift is the Coral control recipe, kept on pressed cards only) · F4 (ink is the one primary; card is the theme secondary; Table/Board is a groove, not two buttons) */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --topbar-h: 64px;
  --sheet-w: min(560px, 100%);
  --ctrl-h: 40px;
}

body { background-color: var(--color-desk); background-image: radial-gradient(90% 70% at 0% 0%, var(--color-cotton), transparent 60%), var(--tex-desk); background-attachment: fixed; min-height: 100vh; }
.muted { color: var(--color-muted); }
.fig { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; font-weight: 400; }
.notice { padding: var(--space-lg); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklab, var(--color-paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: var(--rule-hair) solid var(--color-rule); }
.topbar__row { display: flex; align-items: center; gap: var(--space-lg); min-height: var(--topbar-h); }
.wordmark { font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.02em; text-decoration: none; color: var(--color-ink); white-space: nowrap; }
.tabs { display: flex; gap: var(--space-2xs); overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: var(--ctrl-h); padding: 0 var(--space-sm); border-radius: var(--radius-input); color: var(--color-muted); text-decoration: none; font-weight: 500; white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.tab:hover { color: var(--color-ink); background: var(--color-paper-2); }
.tab[aria-current="page"] { color: var(--color-ink); background: var(--color-paper-3); }
.tab__count:empty { display: none; }
.tab__count { font-size: var(--text-xs); color: var(--color-accent-2); }
.countdown { margin-left: auto; color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.countdown .fig { color: var(--color-ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs); min-height: var(--ctrl-h); padding: 0 var(--space-md); border: 0; border-radius: var(--radius-stock); font-weight: 500; font-size: var(--text-sm); cursor: pointer; white-space: nowrap; transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.btn--card { background-color: var(--color-cotton); background-image: var(--tex-cotton); color: var(--color-print); text-shadow: 0.5px 0.75px 0 var(--color-cotton); box-shadow: var(--edge-stock), var(--cast-stock); }
.btn--ink { background: var(--color-board); color: var(--color-board-type); text-shadow: 0 -0.75px 0 var(--color-ink); box-shadow: var(--cast-stock); }
.btn--quiet { background: transparent; color: var(--color-muted); padding: 0 var(--space-sm); }
.btn--quiet:hover { color: var(--color-ink); background: var(--color-paper-2); }
.btn--card:hover, .btn--ink:hover { transform: translateY(-1px); box-shadow: var(--edge-stock), var(--cast-stock-lift); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--danger { color: var(--color-error); }

/* ---------- stats ---------- */
.main { padding-block: var(--space-xl) var(--space-4xl); }
.stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-sm); margin: 0 0 var(--space-xl); }
.stat { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); min-width: 0; }
.stat dt { font-size: var(--text-xs); color: var(--color-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat dd { margin: var(--space-3xs) 0 0; font-family: var(--font-outlier); font-size: var(--text-xl); color: var(--color-print); line-height: 1.1; }
.stat--due dd { color: var(--color-accent-2); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.search { flex: 1 1 240px; }
input, select, textarea { min-height: var(--ctrl-h); padding: 0 var(--space-sm); border: 1px solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-cotton); color: var(--color-ink); width: 100%; }
textarea { padding-block: var(--space-xs); min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; }
input::placeholder, textarea::placeholder { color: var(--color-muted); }
.select-wrap { flex: 0 0 auto; }
.select-wrap select { width: auto; }
.filters { display: flex; gap: var(--space-3xs); overflow-x: auto; scrollbar-width: thin; max-width: 100%; }
.chip { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 32px; padding: 0 var(--space-sm); border: 1px solid var(--color-rule-2); border-radius: var(--radius-input); background: transparent; color: var(--color-ink-2); font-size: var(--text-sm); cursor: pointer; white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.chip:hover { background: var(--color-paper-2); }
.chip[aria-pressed="true"] { background: var(--color-board); border-color: var(--color-board); color: var(--color-board-type); }
.chip .fig { font-size: var(--text-xs); opacity: 0.75; }
.groove { display: inline-flex; padding: var(--space-2xs); border-radius: 12px; background: var(--color-paper-2); box-shadow: var(--press-groove); }
.groove__opt { min-height: 34px; padding: 0 var(--space-md); border: 0; border-radius: 9px; background: transparent; color: var(--color-muted); font-weight: 500; font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.groove__opt[aria-pressed="true"] { background-color: var(--color-cotton); background-image: var(--tex-cotton); color: var(--color-print); box-shadow: var(--edge-stock), var(--cast-stock); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th { text-align: left; font-weight: 500; color: var(--color-muted); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); white-space: nowrap; }
td { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); vertical-align: top; color: var(--color-print); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
tbody tr:hover { background: color-mix(in oklab, var(--color-paper-2) 70%, transparent); }
.row-link { font: inherit; font-weight: 600; color: var(--color-print); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.row-link:hover { text-decoration: underline; text-decoration-color: var(--color-accent-2); }
.cell-sub { display: block; color: var(--color-muted); margin-top: var(--space-3xs); }
.cell-warn { display: block; color: var(--color-accent-2); margin-top: var(--space-3xs); font-weight: 500; }
td.num, .num { font-family: var(--font-outlier); white-space: nowrap; }
.num .muted { font-family: var(--font-body); }
.tier { display: inline-block; margin-left: var(--space-2xs); padding: 0 var(--space-2xs); border: 1px solid var(--color-rule-2); border-radius: 4px; font-size: var(--text-xs); color: var(--color-muted); font-weight: 500; vertical-align: 1px; }
.status { display: inline-block; padding: var(--space-3xs) var(--space-xs); border: 1px solid var(--color-ink-2); border-radius: 4px; font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-2); white-space: nowrap; }
.status--closed { border-color: var(--color-rule-2); color: var(--color-muted); }
.status--offer { border-color: var(--color-paid); color: var(--color-paid); }
.fit { display: inline-flex; align-items: baseline; gap: var(--space-2xs); white-space: nowrap; }
.fit__score { font-family: var(--font-outlier); font-weight: 500; }
.fit__word { color: var(--color-muted); font-size: var(--text-xs); }
.fit--skip .fit__score { color: var(--color-muted); }
.doc-tag { display: inline-block; margin: 0 var(--space-2xs) var(--space-2xs) 0; padding: 0 var(--space-2xs); border-radius: 4px; background: var(--color-paper-2); font-size: var(--text-xs); color: var(--color-ink-2); }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: var(--space-md); overflow-x: auto; padding-bottom: var(--space-md); }
.board__col { min-width: 0; }
.board__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--space-2xs) var(--space-xs); font-weight: 600; font-size: var(--text-sm); }
.board__head .fig { color: var(--color-muted); font-size: var(--text-xs); }
.board__list { display: grid; gap: var(--space-sm); min-height: 80px; padding: var(--space-xs); border-radius: var(--radius-card); background: color-mix(in oklab, var(--color-paper-3) 55%, transparent); }
.card { display: block; width: 100%; text-align: left; padding: var(--space-sm) var(--space-md); border: 0; border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); color: var(--color-print); box-shadow: var(--edge-stock), var(--cast-stock); cursor: pointer; font-size: var(--text-sm); transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.card:hover { transform: translateY(-1px); box-shadow: var(--edge-stock), var(--cast-stock-lift); }
.card__company { font-weight: 600; display: block; }
.card__meta { display: flex; justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-xs); color: var(--color-muted); font-size: var(--text-xs); }
.board__empty { color: var(--color-muted); font-size: var(--text-xs); padding: var(--space-xs); }

/* ---------- states ---------- */
.skeleton { display: grid; gap: var(--space-xs); padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-cotton); box-shadow: var(--edge-stock); }
.skeleton i { display: block; height: 18px; border-radius: 4px; background: linear-gradient(90deg, var(--color-paper-2), var(--color-paper-3), var(--color-paper-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i:nth-child(3n) { width: 72%; } .skeleton i:nth-child(3n+1) { width: 92%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.state { padding: var(--space-2xl) var(--space-xl); border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); display: grid; gap: var(--space-sm); justify-items: start; }
.state h2 { font-size: var(--text-title); }
.state p { color: var(--color-ink-2); max-width: 60ch; }
.state--error h2 { color: var(--color-error); }
.state code { font-family: var(--font-outlier); font-size: var(--text-sm); background: var(--color-paper-2); padding: 0 var(--space-2xs); border-radius: 4px; }

/* ---------- view heads, follow-ups, targets ---------- */
.view__head { display: grid; gap: var(--space-xs); margin-bottom: var(--space-lg); }
.view__head h1 { font-size: var(--text-section); }
.follow-list { display: grid; gap: var(--space-sm); }
.follow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding: var(--space-md) var(--space-lg); border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); }
.follow__why { color: var(--color-ink-2); font-size: var(--text-sm); margin-top: var(--space-3xs); }
.follow__when { font-family: var(--font-outlier); font-size: var(--text-sm); white-space: nowrap; }
.follow__when--late { color: var(--color-accent-2); }
.inline-add { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin-bottom: var(--space-lg); }
.inline-add label:first-child { flex: 1 1 240px; }
.inline-add select { width: auto; }
.form-msg { min-height: 1lh; font-size: var(--text-sm); color: var(--color-muted); flex-basis: 100%; }
.form-msg--error { color: var(--color-error); }
.dream { color: var(--color-accent-2); font-weight: 600; font-size: var(--text-xs); margin-left: var(--space-2xs); }

/* ---------- the sheet (signature) ---------- */
.scrim { position: fixed; inset: 0; z-index: var(--z-modal); background: color-mix(in oklab, var(--color-ink) 22%, transparent); }
.sheet-panel { position: fixed; z-index: calc(var(--z-modal) + 1); top: 0; right: 0; bottom: 0; width: var(--sheet-w); overflow-y: auto; padding: var(--space-lg); background: transparent; outline: none; animation: slide-in var(--dur-short) var(--ease-out); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet { position: relative; min-height: 100%; padding: var(--space-xl) var(--space-xl) var(--space-2xl); border-radius: var(--radius-stock); background-color: var(--color-cotton); background-image: linear-gradient(100deg, var(--color-cotton), transparent 45%), var(--tex-cotton); color: var(--color-print); box-shadow: var(--edge-stock), var(--cast-stock-lift); display: grid; gap: var(--space-lg); align-content: start; }
.sheet__top { display: flex; justify-content: space-between; align-items: start; gap: var(--space-md); }
.sheet__kicker { color: var(--color-muted); font-size: var(--text-sm); }
.sheet h2 { font-size: var(--text-2xl); max-width: 22ch; }
.sheet h3 { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.01em; margin-bottom: var(--space-xs); }
.sheet__close { flex: none; }
.sheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) var(--space-md); }
.sheet__grid .span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: var(--space-3xs); min-width: 0; }
.field > span { font-size: var(--text-xs); color: var(--color-muted); font-weight: 500; }
.sheet dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2xs) var(--space-md); margin: 0; font-size: var(--text-sm); }
.sheet dt { color: var(--color-muted); font-weight: 500; }
.sheet dd { margin: 0; overflow-wrap: anywhere; }
.sheet__rule { border: 0; border-top: 1px dashed var(--color-rule-2); margin: 0; }
.fit-block { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); align-items: start; }
.fit-block__score { font-family: var(--font-outlier); font-size: var(--text-3xl); line-height: 0.9; }
.fit-block__verdict { font-weight: 600; }
.prose-sm { font-size: var(--text-sm); color: var(--color-ink-2); white-space: pre-wrap; }
.kw { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.files { display: grid; gap: var(--space-2xs); }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xs); align-items: center; font-size: var(--text-sm); }
.file code { font-family: var(--font-outlier); font-size: var(--text-xs); color: var(--color-ink-2); overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); font-size: var(--text-sm); }
.timeline li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--space-sm); }
.timeline time { font-family: var(--font-outlier); font-size: var(--text-xs); color: var(--color-muted); padding-top: var(--space-3xs); }
.sheet__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
details summary { cursor: pointer; font-weight: 500; font-size: var(--text-sm); }
details[open] summary { margin-bottom: var(--space-xs); }

/* the settled state, pressed into the stock */
.pressed { position: absolute; top: calc(var(--space-4xl) + var(--space-md)); right: var(--space-xl); font-weight: 600; font-size: var(--text-2xl); letter-spacing: 0.02em; color: var(--color-paid); border: 2px solid currentColor; border-radius: 6px; padding: var(--space-3xs) var(--space-sm); transform: rotate(-7deg); filter: url(#press); opacity: 0.88; pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 75rem) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 60rem) {
  .countdown { display: none; }
  .topbar__row { gap: var(--space-sm); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab, .btn, .chip, input, select { font-size: var(--text-md); }
}
@media (max-width: 40rem) {
  .topbar__row { flex-wrap: wrap; padding-block: var(--space-xs); }
  .tabs { order: 3; flex-basis: 100%; }
  #new-app { margin-left: auto; }
  .sheet-panel { padding: 0; }
  .sheet { border-radius: 0; padding: var(--space-lg) var(--gutter) var(--space-2xl); }
  .sheet__grid { grid-template-columns: minmax(0, 1fr); }
  .pressed { right: var(--space-lg); top: var(--space-4xl); }
  /* table restacks: company and status stay in view */
  .apps-table thead { display: none; }
  .apps-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); }
  .apps-table td { border: 0; padding: var(--space-3xs) var(--space-md); }
  .apps-table td[data-col="status"] { grid-column: 2; grid-row: 1; }
  .apps-table td[data-col="salary"], .apps-table td[data-col="docs"] { display: none; }
}
