/* wretches-and-kings — warm off-white + burnt-orange theme */

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

:root {
  color-scheme: light;

  /* ── Palette ─────────────────────────────────────────────────────────── */
  --bg:           #F5F1E8;
  --surface:      #FBF8F1;
  --card:         #FBF8F1;
  --border:       #E3DDCE;
  --border-ui:    #EDE7D8;
  --text:         #15130F;
  --ink-2:        #3A362E;
  --muted:        #6B6659;

  --accent:       #C2532A;
  --accent-dark:  #8B3B1E;
  --accent-soft:  #F3DBC9;
  --accent-ink:   #FBF8F1;

  --secondary:      #2E7080;
  --secondary-dark: #1F5260;
  --secondary-soft: #D4EAF0;
  --secondary-ink:  #F5F1E8;

  --danger:       #8B2A1F;
  --danger-soft:  #F1CFC6;

  --success:      #2E5F3E;
  --success-soft: #D6E4D3;
  --success-text: #2E5F3E;

  --warn:         #8A6410;
  --warn-soft:    #F3E8C0;

  /* ── Shape / motion ──────────────────────────────────────────────────── */
  --radius:       12px;
  --radius-sm:    8px;
  --shadow-card:  0 1px 0 rgba(21,19,15,0.04), 0 18px 40px -24px rgba(21,19,15,0.18);
  --shadow-pop:   0 24px 60px -24px rgba(21,19,15,0.35);

  /* ── Type ────────────────────────────────────────────────────────────── */
  --font:         'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-heading: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif:   'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:         'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Layout ──────────────────────────────────────────────────────────── */
  --nav-w:        240px;
  --grain-opacity: 0.025;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  font-feature-settings: 'ss01', 'cv11';
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--text);
  background: var(--bg);
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono { font-family: var(--mono); }

/* ── Grain overlay ───────────────────────────────────────────────────── */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  filter: url(#grain-filter);
}

/* ── Typography ──────────────────────────────────────────────────────── */

h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 18px;
}

h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 12px;
}

h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Nav / sidebar ──────────────────────────────────────────────────── */

nav {
  width: var(--nav-w);
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  position: relative;
}

.nav-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.nav-mobile-current,
.nav-burger { display: none; }

.nav-tray {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 2px;
}

.nav-backdrop { display: none; }

nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

nav .logo::before {
  content: 'W';
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--text);
  color: var(--surface);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
}

nav .nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 14px 10px 6px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  transition: background 0.12s, color 0.12s;
}

nav a:hover {
  background: var(--border-ui);
  color: var(--text);
}

nav a.active {
  background: var(--text);
  color: var(--surface);
}

nav a.active svg { color: var(--surface); }

nav a .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

nav a.active .count { color: var(--surface); opacity: 0.7; }

nav .spacer { flex: 1; }

nav .sidebar-footer {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

nav .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0;
  flex-shrink: 0;
  text-transform: uppercase;
}

nav .who {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  min-width: 0;
  flex: 1;
}
nav .who small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

nav .logout-btn {
  all: unset;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, background 0.12s;
}
nav .logout-btn:hover { color: var(--text); background: var(--border-ui); }
nav .logout-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ── Main content ────────────────────────────────────────────────────── */

main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
}

/* ── Tables ──────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-ui);
  vertical-align: middle;
}

tbody tr:hover td { background: var(--border-ui); }

tbody tr:last-child td { border-bottom: none; }

/* ── Status badges (outlined pills) ───────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
}

.badge-new        { color: var(--accent-dark); }
.badge-pipeline   { color: var(--accent-dark); }
.badge-saved      { color: var(--success); }
.badge-evaluated  { color: var(--accent-dark); }
.badge-applied    { color: var(--success); }
.badge-responded  { color: var(--success); }
.badge-interview,
.badge-interviewing { color: var(--success); }
.badge-offer,
.badge-offered    { color: var(--accent-dark); }
.badge-accepted   { color: var(--success); }
.badge-rejected   { color: var(--danger); }
.badge-discarded  { color: var(--muted); }
.badge-skip,
.badge-skipped    { color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────────────────────── */

button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--text);
  color: var(--surface);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.12s;
}

button:hover, .btn:hover {
  background: var(--ink-2);
}

button:active, .btn:active { transform: translateY(1px); }

button.secondary, .btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

button.secondary:hover, .btn-secondary:hover {
  border-color: var(--ink-2);
  background: var(--surface);
}

button.ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border);
}
button.ghost:hover { color: var(--text); border-color: var(--ink-2); background: transparent; }

button.accent, .btn-accent {
  background: var(--accent);
  color: #ffffff;
}
button.accent:hover, .btn-accent:hover { background: var(--accent-dark); }

button.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-soft);
}
button.danger:hover { background: var(--danger); color: var(--surface); border-color: var(--danger); }

button.ghost-danger, .btn-ghost-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border);
}
button.ghost-danger:hover, .btn-ghost-danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

button.sm, .btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* `<label class="btn">` is used as a file-input proxy. The form `label { ... }`
   rule below sets uppercase / block / extra letter-spacing for field labels;
   override those four properties when the label is acting as a button. */
label.btn {
  display: inline-flex;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Chip (topbar filters, etc.) ─────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.12s, background 0.12s;
}
.chip:hover { border-color: var(--ink-2); color: var(--text); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip .k {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
}
.chip.active .k { color: var(--surface); opacity: 0.65; }

/* ── Forms ───────────────────────────────────────────────────────────── */

form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }

/* Buttons size to their content (label + padding), not the form's full width.
   The column-flex form's default align-items:stretch would otherwise blow
   submit buttons out to 480px — a mobile-app pattern that reads as heavy on a
   desktop form. Inputs/selects still stretch. */
form > button,
form > .btn,
form > label.btn { align-self: flex-start; }

label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.12s, box-shadow 0.12s;
}

select { padding-right: 28px; }

::placeholder { color: var(--muted); opacity: 0.7; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
}

/* ── Tag input ───────────────────────────────────────────────────────── */

.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: text;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.tag-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tag-input .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  cursor: default;
}

.tag-input .tag-remove {
  /* Reset the global `button, .btn` rule — this is a real <button> for
     keyboard a11y (A11Y-10), but must stay a bare × inside the chip, not
     balloon into a full app button. */
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  opacity: 0.5;
  font-size: 13px;
  line-height: 1;
  transition: opacity 0.15s;
}

.tag-input .tag-remove:hover { opacity: 1; }
.tag-input .tag-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; opacity: 1; }

.tag-input input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
  font-size: 13px;
  background: transparent;
  flex: 1;
  min-width: 120px;
}

/* ── Notification feed (legacy; /feed now redirects) ─────────────────── */

.feed { display: flex; flex-direction: column; gap: 10px; }

.feed-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  transition: border-color 0.15s;
}

.feed-item:hover { border-color: var(--ink-2); }

.feed-item.unread { border-left: 3px solid var(--accent); }

.feed-item-body { flex: 1; min-width: 0; }

.feed-item-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }

.feed-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

.feed-item.skeleton { pointer-events: none; }
.feed-item.skeleton:hover { border-color: var(--border); }

.feed-item.dismissed,
tr.dismissed td { pointer-events: none; }
.feed-item.dismissed .feed-item-title,
tr.dismissed .job-title { color: var(--muted); font-weight: 500; }
.feed-item.dismissed .feed-item-meta,
tr.dismissed .job-meta { color: var(--border); }

.skeleton-bar {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toolbar / filter bar ────────────────────────────────────────────── */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar input[type="text"] { max-width: 240px; }
.toolbar select { width: auto; max-width: 200px; }

select:not(form select) { width: auto; }

/* ── Utility ─────────────────────────────────────────────────────────── */

.muted   { color: var(--muted); }
.score   { font-family: var(--mono); font-weight: 500; color: var(--text); letter-spacing: -0.02em; }
.empty   { text-align: center; padding: 48px; color: var(--muted); }
.text-sm { font-size: 13px; }

.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-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  z-index: 10000;
}

/* ─── Score breakdown (Layer 2+3) ─────────────────────────────────── */

.score-breakdown {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.score-dimensions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dimension-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dimension-label {
  font-size: 12.5px;
  font-weight: 500;
  width: 90px;
  flex-shrink: 0;
  color: var(--ink-2);
}

.dimension-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border-ui);
  border-radius: 3px;
  overflow: hidden;
}

.dimension-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.dimension-value {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.confidence-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  flex-shrink: 0;
  min-width: 66px;
  text-align: center;
}

.confidence-high   { color: var(--success); }
.confidence-medium { color: var(--warn); }
.confidence-low    { color: var(--muted); }

.gap-factors {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.gap-factors-title {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.gap-factor-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
  color: var(--ink-2);
}

.gap-factor-impact {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid currentColor;
  flex-shrink: 0;
  min-width: 66px;
  text-align: center;
}

.gap-impact-high   { color: var(--danger); }
.gap-impact-medium { color: var(--warn); }
.gap-impact-low    { color: var(--muted); }

/* ── Optimize panel ──────────────────────────────────────────────────── */

.optimize-panel {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.optimize-panel h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.opt-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.opt-header h3 { margin-bottom: 0; }

.budget-chip {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
}

.opt-empty-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  max-width: 560px;
}

.optimize-panel details {
  margin-top: 16px;
  border-top: 1px solid var(--border-ui);
  padding-top: 12px;
}

.optimize-panel summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-2);
  padding: 4px 0;
  list-style: none;
  user-select: none;
}

.optimize-panel summary::-webkit-details-marker { display: none; }

.optimize-panel summary::before {
  content: '▶ ';
  font-size: 9px;
  opacity: 0.5;
  margin-right: 4px;
  transition: transform 0.15s;
  display: inline-block;
}

.optimize-panel details[open] > summary::before {
  transform: rotate(90deg);
}

/* Keyword pills */

.opt-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.kw-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}

.kw-freq {
  font-family: var(--mono);
  color: var(--muted);
}

.kw-importance.high   { color: var(--danger); }
.kw-importance.medium { color: var(--warn); }
.kw-importance.low    { color: var(--muted); }

/* Weak phrasing */

.weak-phrasing {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.weak-phrasing-card {
  padding: 10px 12px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
}

.weak-phrasing del {
  color: var(--muted);
  text-decoration: line-through;
}

.weak-phrasing ins {
  text-decoration: none;
  background: var(--success-soft);
  padding: 0 4px;
  border-radius: 4px;
}

.weak-phrasing-why {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  margin-top: 6px;
}

/* Gaps */

.opt-gaps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.opt-gap-item {
  padding: 10px 12px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.opt-gap-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.opt-gap-action {
  color: var(--ink-2);
  font-size: 13px;
}

.opt-impact-chip {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid currentColor;
  flex-shrink: 0;
}

.opt-impact-high   { color: var(--danger); }
.opt-impact-medium { color: var(--warn); }
.opt-impact-low    { color: var(--muted); }

/* Formatting flags */

.opt-flags-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.opt-flag-item {
  padding: 10px 12px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.opt-flag-issue {
  font-weight: 500;
  color: var(--text);
}

.opt-flag-fix {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 2px;
}

/* Assessment */

.opt-assessment {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Section blurb (intro line under each <summary>) */

.opt-section-blurb {
  margin: 6px 0 4px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* Searchable-term category chip on the keyword pill */

.kw-cat {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.kw-cat-role     { color: var(--accent-dark);  border-color: var(--accent-soft); background: var(--accent-soft); }
.kw-cat-tech     { color: var(--success); border-color: var(--success-soft); background: var(--success-soft); }
.kw-cat-industry { color: var(--ink-2); }
.kw-cat-tool     { color: var(--ink-2); }

/* Format-check category badge */

.opt-fc-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  flex-shrink: 0;
}
.opt-fc-cat-parsing      { color: var(--ink-2); }
.opt-fc-cat-bias_trigger { color: var(--warn); }
.opt-fc-cat-structure    { color: var(--accent-dark); }

/* Density block */

.opt-density {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.opt-density-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid currentColor;
  margin-left: 2px;
}

.opt-density-good     { color: var(--success); }
.opt-density-condense { color: var(--warn); }
.opt-density-expand   { color: var(--accent-dark); }

.opt-density-msg {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--mono);
  letter-spacing: -0.01em;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

/* ── Login / auth pages ──────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-card);
}

.login-card h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.login-card p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

/* Brand eyebrow above the purpose <h1> on every auth page (A11Y-18). */
.login-card .brand-line {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.error-msg { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* ── Landing page ────────────────────────────────────────────────────── */

body.landing {
  flex-direction: column;
  height: auto;
  min-height: 100%;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
}
.landing-logo::before {
  content: 'W';
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--text);
  color: var(--surface);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
}

.landing-login {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  transition: border-color 0.12s, background 0.12s;
  background: var(--surface);
}

.landing-login:hover {
  border-color: var(--ink-2);
  text-decoration: none;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 40px 48px;
  gap: 40px;
}

body.landing main { display: contents; }

.hero-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 680px;
}

/* CRT television (intentionally off-palette — industrial object) */

.crt {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 40%),
    linear-gradient(180deg, #2e2e32 0%, #252528 100%);
  border-radius: 22px;
  padding: 16px 16px 0;
  box-shadow:
    0 12px 48px rgba(0,0,0,0.35),
    0 4px 12px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  width: 100%;
}

.crt-body {
  display: flex;
  gap: 0;
  height: 0;
  padding-bottom: 62%;
  position: relative;
}

.crt-screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 78%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 50%, #1a1f2a 0%, #0e1218 55%, #06070b 100%);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    inset 0 0 50px 10px rgba(0,0,0,0.6),
    inset 0 0 100px 30px rgba(5,10,15,0.35),
    0 0 40px 8px rgba(140,160,200,0.15),
    0 0 80px 20px rgba(120,140,180,0.08),
    0 0 120px 40px rgba(100,120,160,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #111115;
}

.crt-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  animation: crt-flicker 0.08s infinite alternate;
}

.crt-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.45) 100%);
}

.crt-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: 22%;
  height: 100%;
  background: #1e1e22;
  border-left: 1px solid #3a3a3e;
  border-radius: 0 6px 6px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 12px;
  gap: 4px;
}

.crt-panel-label {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  /* #777 was 3.5:1 on the #1e1e22 panel (failed AA); #a0a0a0 = ~6.3:1. */
  color: #a0a0a0;
  margin-top: 3px;
}

.crt-knob {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #3a3a3e 0%, #252528 50%, #161618 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.06);
  position: relative;
  flex-shrink: 0;
}

.crt-knob::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 7px;
  background: rgba(255,255,255,0.15);
  border-radius: 1px;
}

.crt-pause-btn {
  appearance: none;
  padding: 0;
  border: none;
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
  transition: box-shadow 0.2s;
}
.crt-pause-btn:hover {
  /* re-assert the knob gradient — generic `button:hover { background: var(--ink-2) }`
     outranks `.crt-knob` on hover and would flatten the gradient to solid ink */
  background: radial-gradient(circle at 38% 35%, #3a3a3e 0%, #252528 50%, #161618 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.12), 0 0 8px rgba(0,204,68,0.3);
}
.crt-pause-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.crt-pause-btn::after { transform: translateX(-50%) rotate(135deg); transform-origin: center 11px; }
.crt-paused .crt-pause-btn::after { transform: translateX(-50%) rotate(0deg); }
.crt-paused .crt-headline,
.crt-paused .crt-static { animation-play-state: paused; }
.crt-paused .crt-led {
  background: #cc6600;
  box-shadow: 0 0 6px rgba(204,102,0,0.7), 0 0 12px rgba(204,102,0,0.3);
}

.crt-slider {
  width: 5px;
  height: 32px;
  background: #111;
  border-radius: 3px;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
  flex-shrink: 0;
  margin-top: 2px;
}
.crt-slider::after {
  content: '';
  position: absolute;
  top: 40%;
  left: -2px;
  width: 9px; height: 5px;
  background: #3a3a3e;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.crt-led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00cc44;
  box-shadow: 0 0 6px rgba(0,204,68,0.7), 0 0 12px rgba(0,204,68,0.3);
  margin-top: auto;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.crt-grille {
  height: 18px;
  margin: 0 8%;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 1px, #1a1a1e 1px, #1a1a1e 2.5px);
  border-radius: 0 0 10px 10px;
  margin-bottom: 16px;
  opacity: 0.7;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.crt-static {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, transparent 1px, transparent 2px);
  background-size: 150px 150px, 100% 3px;
  mix-blend-mode: screen;
  animation: crt-static 40s infinite;
}

.crt-headline {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  opacity: 0;
  animation: crt-cycle 40s infinite;
}

.crt-text {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #e8dcc8;
  text-align: center;
  text-shadow: 0 0 8px rgba(200,180,120,0.4);
}

.crt-source {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Full-opacity (was 0.5 alpha → 3.03:1, failed AA). Same amber hue, now
     legible on the dark screen (~8:1). Cycling effect unchanged. */
  color: #c8b478;
}

.crt-h1 { animation-delay: 0s; }
.crt-h2 { animation-delay: 5s; }
.crt-h3 { animation-delay: 10s; }
.crt-h4 { animation-delay: 15s; }
.crt-h5 { animation-delay: 20s; }
.crt-h6 { animation-delay: 25s; }
.crt-h7 { animation-delay: 30s; }
.crt-h8 { animation-delay: 35s; }

.hero-content {
  text-align: center;
  max-width: 620px;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 18px;
  text-wrap: balance;
}

.hero-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  /* Pure #fff (not the off-white --accent-ink) on --accent = 4.60:1, clears AA;
     keeps the brand orange bg untouched. --accent-ink (#fbf8f1) was 4.34:1. */
  color: #fff;
  background: var(--accent);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.12s;
}

.hero-cta:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

@keyframes crt-cycle {
  0%      { opacity: 0; }
  1.5%    { opacity: 1; }
  10.5%   { opacity: 1; }
  12.5%   { opacity: 0; }
  100%    { opacity: 0; }
}

@keyframes crt-static {
  0%      { opacity: 0.7;  background-position: 0 0, 0 0; }
  0.2%    { opacity: 0.2;  background-position: -40px -70px, 0 0; }
  0.4%    { opacity: 0.6;  background-position: -90px -30px, 0 0; }
  0.6%    { opacity: 0.15; background-position: -130px -100px, 0 0; }
  0.8%    { opacity: 0; }
  12.0%   { opacity: 0; }
  12.5%   { opacity: 0.7;  background-position: -30px -60px, 0 0; }
  12.7%   { opacity: 0.15; background-position: -100px -20px, 0 0; }
  12.9%   { opacity: 0.65; background-position: -55px -110px, 0 0; }
  13.1%   { opacity: 0.1;  background-position: -140px -50px, 0 0; }
  13.3%   { opacity: 0; }
  24.5%   { opacity: 0; }
  25.0%   { opacity: 0.7;  background-position: -80px -40px, 0 0; }
  25.2%   { opacity: 0.2;  background-position: -20px -90px, 0 0; }
  25.4%   { opacity: 0.6;  background-position: -110px -130px, 0 0; }
  25.6%   { opacity: 0.1;  background-position: -60px -20px, 0 0; }
  25.8%   { opacity: 0; }
  37.0%   { opacity: 0; }
  37.5%   { opacity: 0.7;  background-position: -60px -10px, 0 0; }
  37.7%   { opacity: 0.15; background-position: -110px -70px, 0 0; }
  37.9%   { opacity: 0.65; background-position: -25px -140px, 0 0; }
  38.1%   { opacity: 0.1;  background-position: -90px -45px, 0 0; }
  38.3%   { opacity: 0; }
  49.5%   { opacity: 0; }
  50.0%   { opacity: 0.7;  background-position: -40px -50px, 0 0; }
  50.2%   { opacity: 0.2;  background-position: -90px -30px, 0 0; }
  50.4%   { opacity: 0.6;  background-position: -145px -80px, 0 0; }
  50.6%   { opacity: 0.15; background-position: -35px -120px, 0 0; }
  50.8%   { opacity: 0; }
  62.0%   { opacity: 0; }
  62.5%   { opacity: 0.7;  background-position: -10px -100px, 0 0; }
  62.7%   { opacity: 0.15; background-position: -70px -60px, 0 0; }
  62.9%   { opacity: 0.65; background-position: -120px -25px, 0 0; }
  63.1%   { opacity: 0.1;  background-position: -50px -140px, 0 0; }
  63.3%   { opacity: 0; }
  74.5%   { opacity: 0; }
  75.0%   { opacity: 0.7;  background-position: -120px -40px, 0 0; }
  75.2%   { opacity: 0.2;  background-position: -30px -80px, 0 0; }
  75.4%   { opacity: 0.6;  background-position: -85px -135px, 0 0; }
  75.6%   { opacity: 0.15; background-position: -145px -15px, 0 0; }
  75.8%   { opacity: 0; }
  87.0%   { opacity: 0; }
  87.5%   { opacity: 0.7;  background-position: -50px -20px, 0 0; }
  87.7%   { opacity: 0.15; background-position: -80px -110px, 0 0; }
  87.9%   { opacity: 0.65; background-position: -20px -75px, 0 0; }
  88.1%   { opacity: 0.1;  background-position: -130px -90px, 0 0; }
  88.3%   { opacity: 0; }
  100%    { opacity: 0; }
}

@keyframes crt-flicker {
  from { opacity: 0.97; }
  to   { opacity: 1; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  main { padding: 20px 16px; }

  .dimension-label { width: 64px; }

  .landing-header { padding: 16px 20px; }
  .hero {
    padding: 32px 20px 24px;
    gap: 28px;
    text-align: center;
  }
  .hero-img-wrap { max-width: 100%; }
  .hero-headline { font-size: 32px; }
  .hero-body { font-size: 15px; }
  .hero-cta { font-size: 13px; padding: 10px 20px; }
  .crt { border-radius: 16px; padding: 12px 12px 0; }
  .crt-body { padding-bottom: 65%; }
  .crt-knob { width: 20px; height: 20px; }
  .crt-knob::after { height: 5px; top: 2px; }
  .crt-slider { height: 24px; width: 4px; }
  .crt-panel-label { font-size: 5px; margin-top: 2px; }
  .crt-panel { gap: 2px; padding: 10px 0 8px; }
  .crt-grille { height: 14px; margin-bottom: 12px; }
  .crt-text { font-size: 12px; line-height: 1.2; }
  .crt-source { font-size: 8px; margin-top: 6px; }
  .crt-headline { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .crt-screen::before { animation: none; opacity: 0.98; }
  .crt-static { animation: none; opacity: 0; }
  .crt-headline { animation: none; }
  .crt-h1 { opacity: 1; }
  .crt-h2, .crt-h3, .crt-h4, .crt-h5, .crt-h6, .crt-h7, .crt-h8 { opacity: 0; }
  .skeleton-bar { animation: none; }
}

/* ── Sidebar collapse → top bar + hamburger tray (mobile) ─────────── */

@media (max-width: 720px) {
  body { flex-direction: column; }
  nav {
    width: 100%;
    min-height: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    z-index: 5;
  }
  .nav-brand-row {
    width: 100%;
    padding: 12px 16px;
    height: 56px;
    box-sizing: border-box;
  }
  nav .logo { padding: 0; margin: 0; }
  .nav-mobile-current {
    display: inline-block;
    margin-left: auto;
    margin-right: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .nav-burger:hover { background: var(--border-ui); border-color: var(--ink-2); }
  .nav-burger .ic-close { display: none; }
  nav[data-mobile-open="1"] .nav-burger .ic-open { display: none; }
  nav[data-mobile-open="1"] .nav-burger .ic-close { display: inline-block; }

  .nav-tray {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(21,19,15,0.06);
    padding: 12px 16px 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.22s ease, visibility 0s linear 0.22s;
    gap: 4px;
    z-index: 5;
  }
  nav[data-mobile-open="1"] .nav-tray {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow: auto;
    transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.22s ease, visibility 0s linear 0s;
  }
  .nav-tray .nav-link {
    padding: 12px 12px;
    font-size: 15px;
  }
  .nav-tray .nav-link svg { width: 18px; height: 18px; }
  .nav-tray .spacer { display: none; }
  .nav-tray .sidebar-footer {
    margin-top: 8px;
    padding: 12px 4px 4px;
    border-top: 1px solid var(--border);
  }

  .nav-backdrop {
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(21,19,15,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
    z-index: 4;
  }
  nav[data-mobile-open="1"] .nav-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── Home (Status surface) ────────────────────────────────────────── */

.home-status {
  max-width: 1080px;
  display: flex;
  flex-direction: column;
}

.home-greet-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}

.home-h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
}

.home-stamp {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-sub {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 620px;
}

/* Urgency lozenge */

.home-loz {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 10px;
  background: var(--text);
  color: var(--surface);
  margin-bottom: 28px;
  text-decoration: none;
  transition: transform 0.12s;
}
.home-loz:hover { text-decoration: none; transform: translateY(-1px); }

.home-loz-num {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  min-width: 80px;
  text-align: center;
  color: var(--surface);
}

.home-loz-body { flex: 1; min-width: 0; }

.home-loz-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Gold on the near-black .home-loz background — keep the lighter --warn value;
     the darkened token (for chips on light surfaces) would LOWER contrast here. */
  color: #B88A1E;
  margin-bottom: 4px;
}

.home-loz-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 2px;
}

.home-loz-meta {
  font-size: 12.5px;
  color: rgba(251,248,241,0.6);
}

.home-loz-cta-wrap { flex-shrink: 0; }

.home-loz-cta {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Dispatcher cards */

.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.home-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, transform 0.12s;
}
.home-card:hover { border-color: var(--ink-2); text-decoration: none; transform: translateY(-1px); }

.home-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.home-card-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-card-arrow { color: var(--muted); font-size: 13px; }

.home-card-kpi-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.home-card-kpi {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.home-card-kpi-label { font-size: 11.5px; color: var(--muted); }

.home-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 14px;
}

.home-card-list {
  border-top: 1px solid var(--border);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
}

.home-card-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  border-top: 1px dashed var(--border);
}
.home-card-row:first-child { border-top: 0; }

.home-card-row-co {
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-card-row-tag {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-left: auto;
  white-space: nowrap;
}

.home-card-row-value {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 11px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-card-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

.home-card-cta {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-dark);
}

@media (max-width: 760px) {
  .home-h1 { font-size: 30px; }
  .home-greet-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-sub { font-size: 14px; margin-bottom: 22px; }
  .home-loz {
    padding: 16px 16px;
    gap: 14px;
    border-radius: 8px;
    flex-wrap: wrap;
  }
  .home-loz-num { font-size: 44px; min-width: 56px; text-align: left; }
  .home-loz-cta-wrap {
    flex-basis: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 4px;
  }
  .home-loz-cta {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 14px;
  }
  .home-cards { grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px; }
}

@media (max-width: 420px) {
  .home-h1 { font-size: 26px; letter-spacing: -0.02em; }
  .home-loz-num { font-size: 38px; }
}
