/* Concord — design system.
 *
 * Tokens are copied from the EA Opportunities Board's own CSS custom properties
 * (retrieved 2026-11-10): the sand scale for surfaces, the teal scale for accent.
 * Fonts: the board uses Inter + EB Garamond. Those are loaded from the board's
 * next/font build, which we cannot reference offline, so the stack falls back to
 * the closest system faces — Segoe UI and Georgia — and nothing shifts layout if
 * they are absent.
 */

:root {
  /* sand — surfaces */
  --sand-1: #fcf8f4;
  --sand-2: #f8f3ef;
  --sand-3: #efeae6;
  --sand-4: #e7e3de;
  --sand-5: #e0dbd7;
  --sand-6: #d7d2ce;
  --sand-7: #cdc8c3;
  --sand-8: #b9b4af;
  --sand-9: #8c8681;
  --sand-10: #817c77;
  --sand-11: #625d59;
  --sand-12: #231f1b;

  /* teal — accent */
  --teal-1: #f2f8f7;
  --teal-2: #e9f4f3;
  --teal-3: #d1f2f0;
  --teal-4: #b9edeb;
  --teal-5: #9fe4e2;
  --teal-6: #84d8d5;
  --teal-7: #5ec7c4;
  --teal-8: #00b3b0;
  --teal-9: #00bebb;
  --teal-10: #00b2b0;
  --teal-11: #007573;
  --teal-12: #003f3e;

  --ink: var(--sand-12);
  --muted: var(--sand-11);
  --faint: var(--sand-9);
  --line: var(--sand-3);
  --line-strong: var(--sand-7);
  --surface: #ffffff;
  --page: var(--sand-1);

  --good: #0f6b4f;
  --good-bg: #e6f2ec;
  --warn: #925c12;
  --warn-bg: #f8efe0;
  --bad: #9b2c2c;
  --bad-bg: #f7e7e6;
  --info: var(--teal-11);
  --info-bg: var(--teal-2);

  --sans: Inter, "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(35, 31, 27, 0.06);
  --shadow: 0 2px 8px rgba(35, 31, 27, 0.08);
  --shadow-lg: 0 12px 32px rgba(35, 31, 27, 0.16);
  --max: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-11); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.011em; }
h1 { font-size: 1.9rem; }
.page-title { font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }

.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.82rem; }
.tiny { font-size: 0.74rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.split { display: grid; grid-template-columns: var(--split, minmax(0, 1fr) 340px); gap: 22px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(252, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: 14px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.brand img { width: 26px; height: 26px; }
.brand:hover { text-decoration: none; }
.brand .ea { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.01em; }
.brand .concord { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--teal-11); background: var(--teal-2); padding: 2px 7px; border-radius: 99px; border: 1px solid var(--teal-4); }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 7px 11px; border-radius: var(--radius); font-size: 0.88rem; font-weight: 500; }
.nav a:hover { background: var(--sand-3); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--sand-4); color: var(--ink); }
.header-note { font-size: 0.72rem; color: var(--faint); border-left: 1px solid var(--line-strong); padding-left: 12px; max-width: 210px; line-height: 1.35; }
@media (max-width: 1080px) { .header-note { display: none; } }

/* ---------- hero (board) ---------- */
.board-hero { padding: 34px 0 16px; }
.board-hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; font-weight: 500; }
.board-hero .lede { color: var(--muted); max-width: 58ch; margin-top: 10px; }
.hero-links { display: flex; gap: 18px; margin-top: 14px; font-size: 0.88rem; flex-wrap: wrap; }
.hero-links a { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 0.86rem; font-weight: 550;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--sand-2); border-color: var(--sand-8); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal-11); border-color: var(--teal-11); color: #fff; }
.btn-primary:hover { background: var(--teal-12); border-color: var(--teal-12); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--sand-3); color: var(--ink); }
.btn-sm { padding: 5px 10px; font-size: 0.79rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { color: var(--bad); border-color: #e3c4c2; }
.btn-danger:hover { background: var(--bad-bg); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card-tight { padding: 14px; }
.card-flush { padding: 0; overflow: hidden; }
.card-hover { transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.card-hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.panel { background: var(--sand-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel-white { background: var(--surface); }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; margin-bottom: 8px; }

/* ---------- opportunity cards (the board) ---------- */
.opp-list { display: flex; flex-direction: column; gap: 10px; }
.opp-card {
  position: relative;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.opp-card:hover { background: #fff; border-color: var(--line-strong); }
.opp-card .chev { position: absolute; top: 16px; right: 16px; color: var(--faint); }
.opp-head { display: flex; gap: 16px; }
.opp-logo {
  width: 64px; height: 64px; min-width: 64px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand-2); border: 1px solid var(--line);
}
.opp-logo img { max-width: 52px; max-height: 52px; object-fit: contain; }
.opp-logo .mono-badge { font-family: var(--serif); font-size: 1.4rem; color: var(--muted); }
.opp-title { font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.opp-title a { color: var(--ink); }
.opp-org { font-size: 0.86rem; color: var(--muted); margin-top: 1px; }
.opp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.opp-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.opp-body p { font-size: 0.9rem; color: var(--sand-12); max-width: 78ch; }
.opp-desc { white-space: pre-wrap; }
.opp-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 0.78rem; color: var(--muted); }
.opp-foot .sep { width: 1px; height: 12px; background: var(--line-strong); }

/* ---------- badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 2px 8px; border-radius: 99px;
  background: var(--sand-3); color: var(--sand-11); border: 1px solid transparent;
  white-space: nowrap;
}
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--teal-12); }
.badge-teal { background: var(--teal-9); color: #05302f; }
.badge-outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.badge-lg { font-size: 0.79rem; padding: 3px 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 0.8rem; color: var(--muted); cursor: pointer;
  transition: all 0.1s ease;
}
.chip:hover { border-color: var(--teal-7); color: var(--ink); }
.chip.on { background: var(--teal-2); border-color: var(--teal-8); color: var(--teal-12); font-weight: 550; }
.chip .n { color: var(--faint); font-size: 0.72rem; }
.chip.on .n { color: var(--teal-11); }

/* ---------- filters ---------- */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.filter-group + .filter-group { margin-top: 14px; }
.filter-group > summary { cursor: pointer; font-size: 0.84rem; font-weight: 600; padding: 4px 0; list-style: none; display: flex; justify-content: space-between; }
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after { content: '+'; color: var(--faint); font-weight: 400; }
.filter-group[open] > summary::after { content: '−'; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 168px; overflow-y: auto; padding-right: 4px; }
.range { width: 100%; accent-color: var(--teal-9); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.search-box input:focus { outline: 2px solid var(--teal-5); border-color: var(--teal-8); }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
select.control, input.control, textarea.control {
  padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); width: 100%;
}
select.control:focus, input.control:focus, textarea.control:focus { outline: 2px solid var(--teal-5); border-color: var(--teal-8); }
textarea.control { resize: vertical; min-height: 90px; line-height: 1.5; }
label.field { display: block; margin-bottom: 10px; }
label.field > span.lbl { display: block; font-size: 0.79rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

/* ---------- score visuals ---------- */
.score { display: inline-flex; align-items: baseline; gap: 3px; font-variant-numeric: tabular-nums; }
.score .n { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.score .d { font-size: 0.75rem; color: var(--faint); }
.score.sm .n { font-size: 1rem; }
.bar { height: 7px; border-radius: 99px; background: var(--sand-4); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal-9); border-radius: 99px; }
.bar.tall { height: 10px; }
.bar > i.good { background: var(--good); }
.bar > i.warn { background: #c08a2e; }
.bar > i.bad { background: #b4534f; }
.bar > i.muted { background: var(--sand-8); }
.component { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.component .detail { grid-column: 1 / -1; font-size: 0.75rem; color: var(--faint); }

/* ---------- negotiation band ---------- */
.band { position: relative; height: 42px; margin: 22px 0 30px; }
.band .rail { position: absolute; left: 0; right: 0; top: 14px; height: 12px; background: var(--sand-4); border-radius: 99px; }
.band .agree { position: absolute; top: 14px; height: 12px; background: linear-gradient(90deg, var(--teal-5), var(--teal-9)); border-radius: 99px; }
.band .mark { position: absolute; top: 4px; width: 2px; height: 32px; background: var(--sand-12); }
.band .mark.settle { width: 3px; background: var(--teal-12); }
.band .lbl { position: absolute; top: 32px; font-size: 0.68rem; color: var(--faint); transform: translateX(-50%); white-space: nowrap; }
.band .flag { position: absolute; top: -4px; font-size: 0.68rem; font-weight: 600; color: var(--teal-12); transform: translateX(-50%); }

/* ---------- tables (tracker) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.grid { width: 100%; border-collapse: collapse; min-width: 900px; }
table.grid th, table.grid td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid thead th { position: sticky; top: 0; background: var(--sand-2); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); font-weight: 600; z-index: 1; }
table.grid tbody tr:hover { background: var(--sand-1); }
table.grid tbody tr:last-child td { border-bottom: 0; }
.cell-input { width: 100%; min-width: 104px; border: 1px solid transparent; background: transparent; padding: 3px 5px; border-radius: 4px; font-size: 0.84rem; }
.cell-input[data-field="interview_date"], .cell-input[data-field="start_date"], .cell-input[data-field="applied_on"] { min-width: 118px; }
.cell-input[type="number"] { min-width: 110px; }
.cell-input:hover { border-color: var(--line-strong); }
.cell-input:focus { border-color: var(--teal-8); background: #fff; outline: none; }
.auth { display: inline-flex; align-items: center; gap: 4px; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.auth-candidate { background: var(--sand-3); color: var(--sand-11); }
.auth-board { background: var(--info-bg); color: var(--teal-12); }
.auth-employer { background: #ece7f7; color: #4b3b7a; }

/* ---------- CV highlighting ---------- */
.cv-mark { background: var(--teal-3); border-bottom: 2px solid var(--teal-8); border-radius: 2px; padding: 0 1px; }
.cv-text { white-space: pre-wrap; font-family: var(--mono); font-size: 0.82rem; line-height: 1.6; }
.cv-gap { color: var(--muted); }
.cv-drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); background: var(--sand-2); }
.cv-drop.hot { border-color: var(--teal-8); background: var(--teal-1); color: var(--teal-12); }

/* ---------- bento (organisations) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.tile { grid-column: span 4; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tile.wide { grid-column: span 6; }
.tile.full { grid-column: span 12; }
.tile .tile-head { display: flex; gap: 12px; align-items: center; }
.tile .tile-logo { width: 44px; height: 44px; border-radius: 8px; background: var(--sand-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tile .tile-logo img { max-width: 34px; max-height: 34px; object-fit: contain; }
@media (max-width: 780px) { .tile, .tile.wide { grid-column: span 12; } }

/* ---------- misc ---------- */
.toast-stack { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--sand-12); color: var(--sand-1); padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 0.86rem; max-width: 360px; animation: slide-in 0.16s ease; }
.toast.bad { background: var(--bad); }
.toast.good { background: var(--good); }
@keyframes slide-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

.demo-banner { background: var(--warn-bg); color: var(--warn); border: 1px solid #e8d5b0; border-radius: var(--radius); padding: 9px 13px; font-size: 0.8rem; }
.sync-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.sync-dot.stale { background: #c08a2e; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h3 { margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--sand-2), var(--sand-3), var(--sand-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 96px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.hr-list > * + * { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 0.85rem; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 9px 13px; font-size: 0.88rem; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 550; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--teal-9); }
.tabs button:hover { color: var(--ink); }
.side-note { font-size: 0.78rem; color: var(--faint); line-height: 1.5; }
.flag { display: inline-block; font-size: 0.7rem; padding: 1px 6px; border-radius: 3px; background: var(--sand-3); color: var(--muted); }
.flag.derived { background: #f3eee4; color: #7a6a3f; }
.flag.board { background: var(--teal-2); color: var(--teal-12); }
.progress-ring { width: 54px; height: 54px; }

.brand .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-2); border: 1px solid var(--teal-4);
  color: var(--teal-11); font-family: var(--serif); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---- tracker table: fixed columns, consistent cell heights ---- */
table.grid.tracker { table-layout: fixed; }
table.grid.tracker th { vertical-align: bottom; white-space: nowrap; }
table.grid.tracker th .col-owner {
  text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); font-size: 0.68rem;
}
table.grid.tracker td { vertical-align: top; padding: 10px 12px; }
table.grid.tracker td .cell-input { margin: 0; height: 30px; }
table.grid.tracker td select.cell-input { height: 30px; padding: 2px 6px; }
table.grid.tracker td .auth { margin-top: 2px; }

table.grid.tracker { min-width: 0; width: 100%; }
table.grid.tracker td .cell-input::placeholder { color: var(--sand-8); }
table.grid.tracker tbody td { font-size: 0.84rem; }

/* ---- job description workspace ---- */
#jd-causes { gap: 5px; }
#jd-causes .chip { white-space: nowrap; font-size: 0.74rem; padding: 3px 8px; }
.card .component .detail { color: var(--sand-11); font-size: 0.8rem; line-height: 1.45; margin-top: 4px; }




/* Touch devices: an iPad is not a small desktop. Controls get finger-sized and text
   fields reach 16px so iOS does not zoom the page when one focuses — regardless of
   viewport width. Layout changes stay on the width breakpoints above. */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .chip { min-height: 40px; padding: 8px 12px; }
  .tabs button { min-height: 44px; }
  .nav a { min-height: 40px; display: inline-flex; align-items: center; }
  .filter-group > summary { min-height: 44px; align-items: center; }
  .range { height: 44px; margin: 0; }
  select.control, input.control, textarea.control, .search-box input, .cell-input { font-size: 16px; }
  table.grid.tracker td .cell-input, table.grid.tracker td select.cell-input { height: 40px; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
  label.row:has(input[type="checkbox"]) { min-height: 44px; }
}

/* ==========================================================================
   Phone layout
   --------------------------------------------------------------------------
   Measured, not guessed: tools/mobile-audit.mjs drives a 390x844 viewport over
   every surface and reports horizontal overflow, tap targets under 40px, inputs
   under 16px (iOS zooms the page when one focuses) and the header height.
   ========================================================================== */

img, svg { max-width: 100%; }
body { overflow-wrap: break-word; }

.tracker-cards { display: none; }
.tracker-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tracker-card + .tracker-card { margin-top: 10px; }
.tracker-card .tc-head { display: flex; gap: 10px; align-items: flex-start; }
.tracker-card .tc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tracker-card .tc-field { min-width: 0; }
.tracker-card .tc-field .lbl { display: flex; align-items: center; gap: 6px; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 600; margin-bottom: 4px; }
.tracker-card .tc-field .lbl .auth { text-transform: none; letter-spacing: 0.02em; }
.tracker-card .tc-field.is-mine .lbl { color: var(--teal-11); }

@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }
  .wrap { padding: 0 14px; }

  /* ---- header: brand row, then a nav that scrolls instead of wrapping ---- */
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-header .bar { height: auto; min-height: 54px; flex-wrap: wrap; row-gap: 2px; padding: 8px 0 2px; }
  .brand .ea { font-size: 1rem; }
  .brand { gap: 8px; }
  .brand .concord { font-size: 0.62rem; padding: 2px 6px; }
  .nav {
    order: 3; width: 100%; margin-left: 0; gap: 2px;
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    padding: 2px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; padding: 8px 11px; }

  /* ---- type scale ---- */
  h1 { font-size: 1.5rem; }
  .page-title { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; }
  .board-hero { padding: 18px 0 10px; }
  .board-hero h1 { font-size: clamp(1.7rem, 8.5vw, 2.3rem); }
  .board-hero .lede { margin-top: 8px; }

  /* ---- cards ---- */
  /* Grid and flex children default to min-width:auto, so one long value can make a
     card wider than the phone and clip everything beside it. */
  .split > *, .card, .panel, .opp-head > *, .row > * { min-width: 0; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 8px; }
  .kv dt:first-child { margin-top: 0; }
  .kv dd, .opp-desc, .card p, .small, td { overflow-wrap: anywhere; }
  .card, .panel { padding: 14px; }
  .opp-card { padding: 13px 14px; }
  .opp-head { gap: 12px; }
  .opp-logo { width: 46px; height: 46px; min-width: 46px; border-radius: 7px; }
  .opp-logo img { max-width: 38px; max-height: 38px; }
  .opp-logo .mono-badge { font-size: 1.05rem; }
  .opp-title { font-size: 0.97rem; padding-right: 16px; }
  .opp-card .chev { top: 12px; right: 10px; }
  .opp-tags { gap: 5px; margin-top: 6px; }
  .badge { font-size: 0.68rem; padding: 3px 8px; white-space: normal; text-align: left; }
  .opp-foot { gap: 7px; font-size: 0.75rem; margin-top: 10px; }
  .opp-foot .sep { display: none; }
  .section-title { font-size: 0.68rem; }

  /* ---- controls: 44px targets, 16px text ---- */
  .btn { min-height: 44px; padding: 10px 14px; font-size: 0.9rem; }
  .btn-sm { min-height: 40px; padding: 8px 12px; font-size: 0.84rem; }
  .chip { min-height: 40px; padding: 9px 13px; font-size: 0.84rem; }
  #jd-causes .chip { min-height: 40px; padding: 9px 12px; font-size: 0.8rem; }
  .tabs button { min-height: 44px; }
  select.control, input.control, textarea.control, .search-box input { font-size: 16px; min-height: 44px; }
  textarea.control { min-height: 120px; }
  .cell-input { font-size: 16px; min-width: 0; width: 100%; height: 40px; }
  .filter-group > summary { min-height: 44px; align-items: center; }
  /* A slider is a thumb, not a paragraph: give it a finger-sized track. */
  .range { height: 44px; margin: 0; }
  .chips { max-height: 200px; }

  /* ---- tables scroll rather than squeeze ---- */
  table.grid { min-width: 620px; }
  table.grid.tracker { min-width: 0; }

  /* ---- the tracker becomes cards ---- */
  .tracker-table { display: none; }
  .tracker-cards { display: block; margin-top: 4px; }

  /* ---- negotiation band: labels crowd a phone ---- */
  .band { margin: 16px 0 26px; }
  .band .lbl { font-size: 0.62rem; }
  .band .lbl:not(.settle) { display: none; }

  /* ---- toasts and modal ---- */
  .toast-stack { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .toast { max-width: none; }

  /* ---- footer ---- */
  footer.wrap { padding: 20px 14px 30px !important; }
  footer .row-between { display: block; }
  footer .row-between > * + * { margin-top: 10px; }
  footer a { white-space: nowrap; }

  /* ---- grids ---- */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  /* Stat rows read better as a 2×2 block than as four full-width cards. */
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .empty { padding: 28px 12px; }
  /* Counters and card headers should not break mid-word when a button sits beside them. */
  #cv-count { white-space: nowrap; }
  .card > .row-between { flex-wrap: wrap; row-gap: 8px; }

  /* Data tables inside admin/employer views keep their scroll container but start
     narrower so the first columns are reachable without a long pan. */
  .table-wrap { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 12px; }
  .board-hero h1 { font-size: 1.6rem; }
}

@media (min-width: 701px) {
  .tracker-cards { display: none; }
}
