/* ============================================================
   CORE design tokens.

   The source of truth is the Figma file "CORE Design System"
   (JxHUmqPvrJRnoJD6UkjWyr) — primitives on the Primitives page, component
   values on Buttons & Badges. Values here are copied from it verbatim; when
   they disagree, Figma wins and this file is what gets corrected.

   Before this existed, dashboard.css and style.css each carried their own
   palette. They agreed on brand yellow and almost nothing else: the media
   dashboard's "muted" text was #6B6560 against CORE's #827f7d, its green was
   #2D8C56 against CORE's #007752, and it used a purple that CORE does not
   contain. Neither page loaded Antarctica at all, so the whole product
   rendered in system fonts while bandana.com did not.

   Legacy variable names are aliased at the bottom rather than renamed
   everywhere at once — the alias moves several hundred usages onto CORE
   values in one step, and the names can be retired file by file after.
   ============================================================ */

/* ---------- Antarctica ----------
   Served from /fonts (see src/public/fonts/), 83 KB for six weights. This is
   what bandana.com renders in, so the dashboard does too — the system stack
   below it is the fallback, not the default. Drop "Antarctica" from the two
   --core-font lines to go back to system faces. Proposals are unaffected:
   build-proposal.py inlines the faces as data URIs and never reads this file. */
@font-face {
  font-family: "Antarctica";
  src: url("/fonts/Antarctica-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antarctica";
  src: url("/fonts/Antarctica-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antarctica";
  src: url("/fonts/Antarctica-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antarctica";
  src: url("/fonts/Antarctica-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antarctica";
  src: url("/fonts/Antarctica-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antarctica Cond";
  src: url("/fonts/Antarctica-Condensed.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Primitives — Figma "Primitives / Colors" ---------- */
  --grey-1000: #0c0b0b;
  --grey-900: #2b2a2a;
  --grey-800: #454343;
  --grey-700: #827f7d;
  --grey-500: #d9d3d1;
  --grey-600: #aea9a7;
  --grey-400: #e1dcda;
  --grey-300: #e8e5e3;
  --grey-200: #f0eded;
  --grey-100: #f7f6f6;
  --grey-0: #ffffff;

  --yellow-900: #463a1e;
  --yellow-800: #715a1e;
  --yellow-700: #9e871e;
  --yellow-600: #dfc654;
  --yellow-500: #fce776;
  --yellow-400: #fdec91;
  --yellow-300: #fdf1ad;
  --yellow-200: #fef5c8;
  --yellow-100: #fefae4;

  --blue-900: #162435;
  --blue-800: #163172;
  --blue-700: #1c5191;
  --blue-600: #3d70b1;
  --blue-500: #5991d3;
  --blue-300: #9bbde5;
  --blue-400: #7aa7dc;
  --blue-200: #bdd3ed;
  --blue-100: #dee9f6;

  --green-900: #002e25;
  --green-800: #005733;
  --green-700: #007752;
  --green-600: #009672;
  --green-500: #00b794;
  --green-300: #66d4bf;
  --green-400: #33c5a9;
  --green-200: #99e2d4;
  --green-100: #ccf1ea;

  --taupe-900: #4e462e;
  --taupe-700: #9c9277;
  --taupe-600: #bdb297;
  --taupe-800: #7b7358;
  --taupe-500: #d9d3b9;
  --taupe-300: #e8e4d5;
  --taupe-400: #e1dcc7;
  --taupe-200: #f0ede3;
  --taupe-100: #f7f6f1;
  --taupe-50: #fbfaf8;

  --red-900: #4e2015;
  --red-800: #622015;
  --red-700: #8f2015;
  --red-600: #d15e32;
  --red-500: #ed7f54;
  --red-300: #f4b298;
  --red-400: #f19976;
  --red-200: #f8ccbb;
  --red-100: #fbe5dd;

  --brown-900: #2c1f14;
  --brown-700: #723c14;
  --brown-600: #935b2d;
  --brown-800: #511f14;
  --brown-500: #af7c4f;
  --brown-400: #bf9672;
  --brown-300: #cfb095;
  --brown-200: #dfcbb9;
  --brown-100: #efe5dc;

  --gold-700: #b27711;
  --gold-600: #d39622;
  --gold-800: #915711;
  --gold-900: #502e11;
  --gold-500: #efb745;
  --gold-400: #f2c56a;
  --gold-300: #f5d48f;
  --gold-200: #f9e2b5;
  --gold-100: #fcf1da;

  /* The brand brown, used for ink on yellow. Figma "Primary/Brown". */
  --core-brown: #231c16;

  /* Named brand accents, straight off bandana.com's own token layer. Sand and
     taupe are what its tooltips and popovers are built from; sky and the yellow
     tint are its two soft fills. Kept under their brand names rather than
     folded into a ramp, because that is how the site refers to them. */
  --primary-sand: #f7f5ef;
  --primary-taupe: #bcb69e;
  --primary-sky: #c5daf2;
  --secondary-lime: #68c35a;
  --secondary-mint: #dcf4ef;
  --secondary-pink: #e158a8;
  --tint-primary-sky: #e2edf9;
  --tint-primary-yellow: #fff9d6;

  /* ---------- Semantic surfaces and ink ---------- */
  /* Two hover fills, because "off-white" depends on what is underneath. A white
     row lifts to taupe-50; a stat card that already sits on taupe-50 has to go a
     step further or the hover is invisible. Colour-carrying controls (primary,
     danger, approve) keep their own hover from the CORE button spec — an off-white
     hover on a yellow button would read as the button switching off. */
  --core-surface-hover: var(--taupe-50);
  --core-surface-hover-strong: var(--taupe-100);

  /* Stat and highlight cards. The page ground is white, so these tiles carry a
     faint warm fill to separate from it — the same relationship the ATS screen
     uses, where the tiles are filled and only the selected one goes white. */
  --core-surface-stat: var(--taupe-50);

  --core-surface-page: var(--grey-0);
  --core-surface-card: var(--grey-0);
  --core-surface-sunk: var(--taupe-100);
  /* The app ground is white, matching bandana.com and the rest of the estate.
     It was taupe-50, which gave white cards a free edge; with both white, a
     card has to earn its edge from a border. See the card rules below. */
  --core-surface-app: var(--grey-0);
  /* bandana.com: --surface-nav. Its nav sits on taupe, not on the page white. */
  --core-surface-nav: var(--taupe-100);
  --core-border: var(--grey-200);
  --core-border-strong: var(--grey-300);
  --core-border-input-focused: var(--grey-900);

  --core-text-primary: var(--grey-900);
  --core-text-secondary: var(--grey-700);
  --core-text-disabled: var(--grey-500);
  --core-text-placeholder: var(--grey-600);
  --core-text-link: var(--blue-500);

  /* Status. Reserved — never reused as a decorative accent. */
  --core-good: var(--green-700);
  --core-good-bg: var(--green-100);
  --core-warning: var(--gold-700);
  --core-warning-bg: var(--gold-100);
  --core-critical: var(--red-700);
  --core-critical-bg: var(--red-100);
  --core-info: var(--blue-700);
  --core-info-bg: var(--blue-100);

  /* ---------- Buttons — Figma "Buttons & Badges" ---------- */
  --core-btn-primary-bg: var(--yellow-500);
  --core-btn-primary-bg-hover: var(--yellow-400);
  --core-btn-primary-text: var(--grey-900);
  --core-btn-secondary-bg: var(--grey-900);
  --core-btn-secondary-bg-hover: var(--grey-800);
  --core-btn-secondary-text: var(--grey-0);
  --core-btn-tertiary-bg: var(--grey-0);
  --core-btn-tertiary-bg-hover: var(--core-surface-hover);
  --core-btn-tertiary-border: var(--grey-200);
  --core-btn-tertiary-text: var(--grey-900);
  --core-btn-disabled-bg: var(--grey-100);
  --core-btn-disabled-text: var(--grey-500);

  /* ---------- Type ----------
     Four roles, exactly as the Primitives page defines them.
       Headers    Antarctica Medium 500, tracking -4%, line-height 100%
       Body       Antarctica Light 300, tracking 1%,   line-height 140%
       Subheaders Condensed 400,        tracking 8%,   line-height 130%
       Labels     Condensed 600,        tracking 8%,   line-height 130%  */
  /* System grotesques, chosen to sit as close to Antarctica as the platform
     faces get: SF Pro on Apple, Segoe UI on Windows, Roboto on Android — all
     neo-grotesques with a large x-height, like Antarctica. Nothing downloads,
     so text paints on first frame with no swap.

     To go back to Antarctica, put "Antarctica" / "Antarctica Cond" at the
     front of these two lines. The @font-face rules above stay in place and
     cost nothing while unreferenced — a browser only fetches a face that a
     rule actually uses. */
  --core-font: "Antarctica", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* The condensed role is where the system stack genuinely loses something:
     no platform ships a condensed grotesque that is reliably addressable.
     Arial Narrow is the one face present on both macOS and Windows, and the
     width request below picks up a narrow cut where the family has one. At
     12-14px, uppercase, tracked 8%, the labels still read as labels. */
  --core-font-cond: "Antarctica Cond", "Arial Narrow", system-ui, -apple-system,
                    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --core-h1: 32px;
  --core-h2: 24px;
  --core-h3: 20px;
  --core-h4: 16px;
  --core-h5: 14px;
  --core-h6: 12px;
  --core-body-1: 16px;
  --core-body-2: 14px;
  --core-body-3: 12px;

  /* ---------- Shape and elevation ----------
     Buttons on bandana.com are full pills; cards keep a soft corner. */
  --core-radius-pill: 999px;
  --core-radius-card: 12px;
  --core-radius-sm: 8px;
  --core-shadow-blur: 0 2px 16px rgba(34, 34, 34, 0.12);
  --core-shadow-emphasis: 0 2px 16px rgba(34, 34, 34, 0.2);
}

/* ============================================================
   Type roles as classes, for markup that opts in directly.
   ============================================================ */
.core-h1, .core-h2, .core-h3, .core-h4, .core-h5, .core-h6 {
  font-family: var(--core-font);
  font-weight: 500;
  color: var(--core-text-primary);
}

/* Display sizes take the Primitives page's header rule: tight tracking, set
   solid. At 32px and up the -4% reads as confident; at 14px it reads broken. */
.core-h1, .core-h2, .core-h3 {
  letter-spacing: -0.04em;
  line-height: 1;
}
.core-h1 { font-size: var(--core-h1); }
.core-h2 { font-size: var(--core-h2); }
.core-h3 { font-size: var(--core-h3); }

/* H4-H6 are UI headers - a row title, a card heading - and the named Figma
   styles set them to +1% tracking on 1.4 leading, the same metrics as body.
   Verbatim from Header/H4 and Header/H5 on the Applications screen
   (oCm1c75iXEvENjLADISPT0, node 7:14668). The blanket -4%/lh-1 rule this file
   shipped with was wrong for these three. */
.core-h4, .core-h5, .core-h6 {
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.core-h4 { font-size: var(--core-h4); }
.core-h5 { font-size: var(--core-h5); }
.core-h6 { font-size: var(--core-h6); }

.core-body-1, .core-body-2, .core-body-3 {
  font-family: var(--core-font);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.core-body-1 { font-size: var(--core-body-1); }
.core-body-2 { font-size: var(--core-body-2); }
.core-body-3 { font-size: var(--core-body-3); }

/* Subheaders and labels share the condensed cut and 8% tracking; only the
   weight separates them. */
.core-subheader, .core-label {
  font-family: var(--core-font-cond);
  font-stretch: 87.5%;
  letter-spacing: 0.08em;
  line-height: 1.3;
}
.core-subheader { font-weight: 400; }
.core-label { font-weight: 600; text-transform: uppercase; }

/* ============================================================
   Legacy aliases.

   Every variable the two stylesheets already use, repointed at CORE. This is
   what moves the existing UI onto the system without touching several hundred
   call sites. Retire a name by replacing its uses, not by editing this block.
   ============================================================ */
:root {
  --bg: var(--core-surface-app);
  --bg-card: var(--core-surface-card);
  --bg-card-hover: var(--core-surface-hover);
  --bg-warm: var(--core-surface-sunk);
  --card-bg: var(--core-surface-card);
  --surface: var(--core-surface-card);
  --surface-2: var(--core-surface-sunk);
  --surface-alt: var(--core-surface-sunk);

  --text: var(--core-text-primary);
  --text-primary: var(--core-text-primary);
  --text-muted: var(--core-text-secondary);
  --text-dim: var(--grey-500);
  --border: var(--core-border);

  --accent-brand: var(--yellow-500);
  --accent-brand-dark: var(--yellow-600);
  --main-yellow: var(--yellow-500);
  --accent: var(--yellow-500);

  /* CORE has no purple. The three decorative accents map onto the nearest
     CORE ramps, which is why video badges shifted from purple to blue. */
  --accent-green: var(--core-good);
  --accent-purple: var(--blue-700);
  --accent-orange: var(--gold-700);
  --accent-red: var(--core-critical);

  --accent-ig: #e1306c;
  --accent-ig-light: rgba(225, 48, 108, 0.12);
  --accent-fb: #1877f2;
  --accent-fb-light: rgba(24, 119, 242, 0.12);

  --primary: var(--core-text-primary);
  --primary-hover: var(--grey-800);
  --danger: var(--core-critical);
  --success: var(--core-good);
  --warning: var(--core-warning);

  --sidebar-bg: var(--core-surface-sunk);
  --sidebar-text: var(--core-text-secondary);
  --sidebar-active: var(--yellow-500);

  --radius: var(--core-radius-card);
  --radius-sm: var(--core-radius-sm);
}

/* The hidden attribute loses to any rule that sets display, which is most
   components — .core-search is display:flex, so hiding it did nothing at all.
   Anything marked hidden should be hidden, so say so once here rather than
   remembering a [hidden] variant per component. */
[hidden] {
  display: none !important;
}

/* Antarctica everywhere, which neither page had.
   Light 300 is CORE's Body role and what bandana.com sets — the browser default
   of 400 is already a step heavier than the brand reads. */
body {
  font-family: var(--core-font);
  font-weight: 300;
}

/* <strong> and <b> default to 700, which in Antarctica is genuinely bold and is
   most of why headings and card titles looked thick: the markup leans on
   <strong> for emphasis and nothing was resetting it. Medium is the Header
   role. */
strong, b {
  font-weight: 500;
}

/* Buttons are pills on bandana.com; they were 8px rectangles here. */
.btn,
.dashboard-nav-tab,
.del-approve-btn,
.del-changes-btn,
.prop-dialog-cancel,
.text-link-button {
  font-family: var(--core-font);
}

.btn {
  border-radius: var(--core-radius-pill);
  font-weight: 600;
}
.btn-primary {
  background: var(--core-btn-primary-bg);
  color: var(--core-btn-primary-text);
  border-color: transparent;
}
.btn-primary:hover { background: var(--core-btn-primary-bg-hover); }
.btn-secondary {
  background: var(--core-btn-tertiary-bg);
  color: var(--core-btn-tertiary-text);
  border: 1px solid var(--core-btn-tertiary-border);
}
.btn-secondary:hover { background: var(--core-btn-tertiary-bg-hover); }
.btn-danger {
  background: var(--core-critical-bg);
  color: var(--core-critical);
  border-color: transparent;
}
.btn:disabled {
  background: var(--core-btn-disabled-bg);
  color: var(--core-btn-disabled-text);
  border-color: transparent;
  cursor: not-allowed;
}

/* ============================================================
   Components, measured from the job-seeker Applications screen
   (Figma oCm1c75iXEvENjLADISPT0, node 7:12373). Every number below is
   copied from that file rather than chosen here.
   ============================================================ */

/* Status chip — node 7:13270 (".Saved statuses/List").
   Tinted surface with the matching accent as ink. Note the 8px corner: the
   chip is deliberately NOT a pill, which is what separates it from a button. */
.core-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 4px 10px;
  border-radius: var(--core-radius-sm);
  font-family: var(--core-font);
  font-size: var(--core-body-2);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
}
.core-status--info    { background: var(--blue-100);  color: var(--blue-500); }
.core-status--good    { background: var(--green-100); color: var(--green-700); }
.core-status--warning { background: var(--gold-100);  color: var(--gold-700); }
.core-status--critical{ background: var(--red-100);   color: var(--red-700); }
.core-status--neutral { background: var(--grey-200);  color: var(--grey-700); }
/* The seeker "Offer" chip, which uses the brown ramp rather than a status hue. */
.core-status--offer   { background: var(--brown-100); color: var(--brown-700); }

/* Filter pill — node 679:30410. 24px radius, not the 999px of a button, and
   the condensed uppercase label is what marks it as a filter rather than an
   action. */
.core-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 14px 16px;
  border: 1px solid var(--core-border);
  border-radius: 24px;
  background: var(--core-surface-card);
  color: var(--core-text-primary);
  font-family: var(--core-font-cond);
  font-stretch: 87.5%;
  font-size: var(--core-body-2);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  cursor: pointer;
}
.core-filter:hover { background: var(--core-surface-hover); }
.core-filter[aria-pressed="true"] {
  background: var(--core-text-primary);
  border-color: var(--core-text-primary);
  color: var(--grey-0);
}

/* Search field — node 679:30173. Full width, full pill, sits directly above
   the list it filters. */
.core-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 16px;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-pill);
  background: var(--core-surface-card);
}
.core-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--core-font);
  font-size: var(--core-body-2);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--core-text-primary);
}
.core-search input::placeholder { color: var(--core-text-placeholder); }
.core-search input:focus { outline: none; }
.core-search:focus-within { border-color: var(--core-border-strong); }

/* List row — node 7:14668. One fixed height for every row, with each cell
   clipping rather than wrapping, so a long title never changes the rhythm.
   This is the piece that replaces the deliverable/document cards. */
.core-row {
  display: flex;
  align-items: flex-start;
  padding: 4px 16px;
  background: var(--core-surface-card);
  border-bottom: 1px solid var(--core-border);
}
.core-row__cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  align-self: stretch;
  min-width: 0;
}
.core-row__cell--grow { flex: 1 0 0; }
.core-row__title {
  font-size: var(--core-h4);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--core-text-primary);
}
.core-row__sub {
  font-size: var(--core-body-2);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--core-text-secondary);
}
.core-row__title, .core-row__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Phase 4 — components from the CORE library itself
   (Figma JxHUmqPvrJRnoJD6UkjWyr). Measured, not invented.
   ============================================================ */

/* Badge — node 22:1384. Two tones and three sizes. Note this is NOT the status
   chip: a badge labels a thing (a type, a count), a status says where that
   thing is. They share an 8px corner and nothing else. */
.core-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--core-radius-sm);
  font-family: var(--core-font);
  font-size: var(--core-h4);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--yellow-500);
  color: var(--grey-900);
}
.core-badge:hover { background: var(--yellow-600); }
/* Secondary reads as a resting label rather than an emphasis. */
.core-badge--secondary {
  background: var(--taupe-100);
  color: var(--core-text-placeholder);
  font-weight: 300;
}
.core-badge--secondary:hover { background: var(--taupe-200); }
.core-badge--med { font-size: var(--core-h5); }
.core-badge--sm  { font-size: var(--core-h6); padding: 4px; }

/* Status — node 15:2411. CORE's own status treatment is a SATURATED fill with
   dark ink, which is a different object from the seeker screen's light-tinted
   chip (.core-status above). Both are in the system and they are not
   interchangeable: this one is for the business/ATS surfaces where a status is
   a control you change, hence the chevron; the tinted chip is for a dashboard
   where a status is something you read. */
.core-status-solid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--core-radius-sm);
  font-family: var(--core-font-cond);
  font-stretch: 87.5%;
  font-size: var(--core-body-2);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--grey-900);
  white-space: nowrap;
}
.core-status-solid--pending  { background: var(--gold-500); }
.core-status-solid--critical { background: var(--red-500); }
.core-status-solid--info     { background: var(--blue-100); }
.core-status-solid--good     { background: var(--green-500); }

/* Icon button — node 1630:18104. A circle, not a rounded square: 40px for a
   menu affordance, 28px for a close. */
.core-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--core-radius-pill);
  background: var(--taupe-200);
  color: var(--core-text-primary);
  cursor: pointer;
}
.core-icon-btn:hover { background: var(--taupe-300); }
.core-icon-btn--sm { width: 28px; height: 28px; }


/* Checkbox and radio — CORE nodes 5:1604 and 22:1315.
   CORE draws these as a 16px icon pair (blank/filled), which is a Figma
   convenience; on the web the native control with accent-color gives the same
   mark and keeps the keyboard and screen-reader behaviour that redrawing it
   would throw away. bandana.com does exactly this: accent-color:
   var(--secondary-blue), which is blue-500. */
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-500);
  cursor: pointer;
}

/* A focused field takes a dark border, matching --border-input-focused. There
   was no focus treatment on inputs before this, which is an accessibility gap
   as much as a brand one. */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.core-search:focus-within {
  outline: none;
  border-color: var(--core-border-input-focused);
}
