/*
 * remoty.work design system, v2 (2026-10-14).
 *
 * Built from scratch on the owner's say-so, from the project skill
 * .claude/skills/girth-frontend-design. Framework-agnostic on purpose: the
 * Laravel views and remoty-core's Rust templates load this same file.
 *
 * Design read: a trust-first job-search product for remote job seekers
 * worldwide, mostly on phones; calm, dense, data-forward. Density 6,
 * variance 4, motion 2.
 *
 * Rules this file keeps (and every page built on it must too):
 *  - One accent: green. Neutrals are one cool-grey family.
 *  - Shape: buttons and chips are pills; cards 14px; inputs 10px.
 *  - Numbers are tabular (scores, counts, pay).
 *  - Every interactive element has hover, :active and a visible focus ring.
 *  - Motion only on transform/opacity, and none under reduced motion.
 *
 * Loaded AFTER app.css. Its :root also re-points app.css's old tokens at the
 * new ones, so pages not yet rebuilt pick up the new type and palette. Dark
 * mode applies only where <html data-ds="2"> (rebuilt pages): app.css still
 * hard-codes light surfaces in places, and a half-dark page is worse than a
 * light one.
 */

@font-face {
    font-family: "Geist";
    src: url("/fonts/Geist-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Geist Mono";
    src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* neutrals: one cool grey family (hue 210) */
    --ds-bg: hsl(210 20% 98%);
    --ds-surface: hsl(0 0% 100%);
    --ds-sunken: hsl(210 16% 95%);
    --ds-ink: hsl(210 24% 10%);
    --ds-ink-2: hsl(210 10% 34%);     /* secondary text, AA on bg */
    --ds-ink-3: hsl(210 8% 46%);      /* meta, timestamps: AA at 14px+ */
    --ds-line: hsl(210 18% 88%);
    --ds-line-strong: hsl(210 14% 78%);

    /* the one accent */
    --ds-accent: hsl(158 72% 30%);        /* fills: buttons, score rings */
    --ds-accent-hover: hsl(158 72% 26%);
    --ds-accent-ink: hsl(158 74% 24%);    /* accent as text on light: 6.4:1 */
    --ds-accent-wash: hsl(158 60% 94%);
    --ds-accent-line: hsl(158 40% 78%);
    --ds-on-accent: hsl(0 0% 100%);

    /* score bands (same three everywhere) and flags */
    --ds-good: var(--ds-accent);
    --ds-mid: hsl(38 78% 46%);
    --ds-mid-ink: hsl(30 80% 28%);
    --ds-low: hsl(210 8% 46%);
    --ds-flag: hsl(4 64% 44%);
    --ds-flag-wash: hsl(4 80% 96%);

    /* type */
    --ds-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ds-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --ds-t-xs: 0.75rem;
    --ds-t-sm: 0.875rem;
    --ds-t-md: 1rem;
    --ds-t-lg: 1.125rem;
    --ds-t-xl: 1.375rem;
    --ds-t-2xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
    --ds-t-3xl: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);

    /* shape */
    --ds-r-input: 10px;
    --ds-r-card: 14px;
    --ds-r-pill: 999px;

    /* space */
    --ds-gutter: 16px;
    --ds-max: 1200px;

    /* depth: shadows tinted with the grey hue, one light from above */
    --ds-shadow-1: 0 1px 2px hsl(210 30% 20% / 0.06);
    --ds-shadow-2: 0 1px 2px hsl(210 30% 20% / 0.06), 0 8px 24px -12px hsl(210 30% 20% / 0.18);
    --ds-focus: 0 0 0 3px hsl(158 72% 30% / 0.35);

    /* z-index scale: the only values allowed */
    --ds-z-sticky: 20;
    --ds-z-menu: 30;
    --ds-z-banner: 40;

    --ds-ease: cubic-bezier(.2, .7, .2, 1);

    /* app.css tokens, re-pointed: every old page inherits the new system */
    --ink: var(--ds-ink);
    --paper: var(--ds-bg);
    --card: var(--ds-surface);
    --white: var(--ds-surface);
    --muted: var(--ds-ink-2);
    --ink-faint: var(--ds-ink-3);
    --line: var(--ds-line);
    --line-strong: var(--ds-line-strong);
    --olive: var(--ds-accent);
    --olive-ink: var(--ds-accent-ink);
    --olive-wash: var(--ds-accent-wash);
    --verified: var(--ds-accent);
    --grade-amber: var(--ds-mid);
    --flag: var(--ds-flag);
    --display: var(--ds-font);
    --body: var(--ds-font);
    --mono: var(--ds-mono);
    --accent-gradient: linear-gradient(120deg, var(--ds-accent), hsl(158 60% 40%));
}

/* Dark: rebuilt pages only (see header). Same hues, inverted lightness. */
@media (prefers-color-scheme: dark) {
    html[data-ds="2"] {
        --ds-bg: hsl(210 18% 7%);
        --ds-surface: hsl(210 16% 10%);
        --ds-sunken: hsl(210 16% 13%);
        --ds-ink: hsl(210 20% 94%);
        --ds-ink-2: hsl(210 10% 72%);
        --ds-ink-3: hsl(210 8% 60%);
        --ds-line: hsl(210 12% 20%);
        --ds-line-strong: hsl(210 10% 30%);
        --ds-accent: hsl(158 60% 42%);
        --ds-accent-hover: hsl(158 60% 48%);
        --ds-accent-ink: hsl(158 60% 62%);
        --ds-accent-wash: hsl(158 40% 14%);
        --ds-accent-line: hsl(158 30% 28%);
        --ds-on-accent: hsl(210 30% 6%);
        --ds-mid-ink: hsl(38 80% 66%);
        --ds-flag-wash: hsl(4 40% 14%);
        --ds-shadow-1: 0 1px 2px hsl(210 40% 2% / 0.5);
        --ds-shadow-2: 0 1px 2px hsl(210 40% 2% / 0.5), 0 8px 24px -12px hsl(210 40% 2% / 0.7);
        color-scheme: dark;
    }
}

/* --- base --------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--ds-font);
    color: var(--ds-ink);
    background: var(--ds-bg);
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.ds-num, .ds-score, .match-score, .stat-num, .num, .rw-stat-num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ds-focus); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.ds-skip {
    position: absolute; left: 12px; top: -48px; z-index: var(--ds-z-banner);
    padding: 0.5rem 0.9rem; border-radius: var(--ds-r-pill);
    background: var(--ds-ink); color: var(--ds-bg); font-weight: 600; text-decoration: none;
}
.ds-skip:focus { top: 12px; }

.ds-wrap { width: 100%; max-width: var(--ds-max); margin: 0 auto; padding: 0 var(--ds-gutter); box-sizing: border-box; }

/* --- buttons -------------------------------------------------------------- */
.ds-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    min-height: 44px; padding: 0 1.15rem; border-radius: var(--ds-r-pill);
    font: 600 var(--ds-t-sm)/1 var(--ds-font); white-space: nowrap; text-decoration: none; cursor: pointer;
    border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-ink);
    transition: background-color .2s var(--ds-ease), border-color .2s var(--ds-ease), transform .1s var(--ds-ease);
}
.ds-btn:hover { border-color: var(--ds-ink-3); }
.ds-btn:active { transform: translateY(1px); }
.ds-btn--primary { background: var(--ds-accent); border-color: var(--ds-accent); color: var(--ds-on-accent); }
.ds-btn--primary:hover { background: var(--ds-accent-hover); border-color: var(--ds-accent-hover); }
.ds-btn--quiet { border-color: transparent; background: transparent; }
.ds-btn--quiet:hover { background: var(--ds-sunken); border-color: transparent; }
.ds-btn--lg { min-height: 52px; padding: 0 1.5rem; font-size: var(--ds-t-md); }
.ds-btn--sm { min-height: 36px; padding: 0 0.85rem; font-size: var(--ds-t-xs); }

/* the old .btn family, onto the new shape and colours */
.btn { border-radius: var(--ds-r-pill); font-family: var(--ds-font); }
.btn--primary { background: var(--ds-accent); border-color: var(--ds-accent); color: var(--ds-on-accent); box-shadow: none; }
.btn--primary:hover { background: var(--ds-accent-hover); }

/* --- chips, inputs, cards ------------------------------------------------- */
.ds-chip {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.65rem; border-radius: var(--ds-r-pill);
    font-size: var(--ds-t-xs); font-weight: 500; line-height: 1.4;
    background: var(--ds-sunken); color: var(--ds-ink-2); border: 1px solid transparent;
}
.ds-chip--have { background: var(--ds-accent-wash); color: var(--ds-accent-ink); border-color: var(--ds-accent-line); }

.ds-input, .ds-select {
    width: 100%; min-height: 44px; box-sizing: border-box;
    padding: 0.55rem 0.85rem; border-radius: var(--ds-r-input);
    font: 400 var(--ds-t-md) var(--ds-font); color: var(--ds-ink);
    background: var(--ds-surface); border: 1px solid var(--ds-line-strong);
}
.ds-input::placeholder { color: var(--ds-ink-3); }
.ds-input:focus, .ds-select:focus { border-color: var(--ds-accent); box-shadow: var(--ds-focus); outline: none; }

.ds-card {
    background: var(--ds-surface); border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-card); box-shadow: var(--ds-shadow-1);
}

/* --- the shell ------------------------------------------------------------ */
.ds-header {
    position: sticky; top: 0; z-index: var(--ds-z-sticky);
    background: color-mix(in srgb, var(--ds-bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--ds-line);
}
.ds-header-in { display: flex; align-items: center; gap: 1.25rem; height: 64px; }
.ds-brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--ds-ink); flex: none; }
.ds-brand-mark {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
    background: var(--ds-ink); color: var(--ds-bg); font: 700 0.95rem/1 var(--ds-font);
}
.ds-brand-name { font-weight: 650; font-size: 1.02rem; letter-spacing: -0.02em; }
.ds-brand-name span { color: var(--ds-ink-3); font-weight: 500; }
.ds-nav { display: flex; gap: 0.15rem; }
.ds-nav a {
    padding: 0.45rem 0.75rem; border-radius: var(--ds-r-pill);
    color: var(--ds-ink-2); font-size: var(--ds-t-sm); font-weight: 500; text-decoration: none;
    transition: background-color .2s var(--ds-ease), color .2s var(--ds-ease);
}
.ds-nav a:hover { color: var(--ds-ink); background: var(--ds-sunken); }
.ds-nav a[aria-current="page"] { color: var(--ds-ink); background: var(--ds-sunken); font-weight: 600; }
.ds-nav a.ds-nav-you { color: var(--ds-accent-ink); }
.ds-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.ds-search { position: relative; }
.ds-search input, .ds-search input[type=search] {
    width: 15rem; min-height: 38px; padding: 0 0.85rem 0 2.1rem; box-sizing: border-box;
    border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line); background: var(--ds-surface);
    font: 400 var(--ds-t-sm) var(--ds-font); color: var(--ds-ink);
}
.ds-search input:focus { border-color: var(--ds-accent); box-shadow: var(--ds-focus); outline: none; }
.ds-search svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--ds-ink-3); pointer-events: none; }

.ds-menu { display: none; }
.ds-menu > summary {
    list-style: none; display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
    min-height: 40px; padding: 0 0.85rem; border-radius: var(--ds-r-pill);
    border: 1px solid var(--ds-line-strong); font-weight: 600; font-size: var(--ds-t-sm); color: var(--ds-ink);
}
.ds-menu > summary::-webkit-details-marker { display: none; }
.ds-menu-panel {
    position: absolute; left: 0; right: 0; top: 64px; z-index: var(--ds-z-menu);
    background: var(--ds-surface); border-bottom: 1px solid var(--ds-line); box-shadow: var(--ds-shadow-2);
    padding: 0.75rem var(--ds-gutter) 1.25rem; max-height: calc(100dvh - 64px); overflow-y: auto;
}
.ds-menu-panel form { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.ds-menu-panel nav { display: grid; }
.ds-menu-panel nav a {
    padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--ds-line);
    color: var(--ds-ink); font-weight: 500; text-decoration: none;
}
.ds-menu-panel nav a[aria-current="page"] { color: var(--ds-accent-ink); font-weight: 650; }

@media (max-width: 64rem) {
    .ds-search input { width: 11rem; }
}
@media (max-width: 56rem) {
    .ds-nav, .ds-search, .ds-actions .ds-employers { display: none; }
    .ds-menu { display: block; }
    .ds-header-in { gap: 0.75rem; }
}

.ds-footer { border-top: 1px solid var(--ds-line); margin-top: 4rem; padding: 2.5rem 0 3rem; color: var(--ds-ink-2); font-size: var(--ds-t-sm); }
.ds-footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
.ds-footer h2 { font-size: var(--ds-t-sm); color: var(--ds-ink); margin: 0 0 0.6rem; letter-spacing: 0; }
.ds-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.ds-footer a { color: var(--ds-ink-2); text-decoration: none; }
.ds-footer a:hover { color: var(--ds-ink); text-decoration: underline; }
.ds-footer-fine { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--ds-line); display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; color: var(--ds-ink-3); }
@media (max-width: 48rem) {
    .ds-footer-grid { grid-template-columns: 1fr 1fr; }
    .ds-footer-about { grid-column: 1 / -1; }
}

/* cookie banner: a slim bar, not a modal over the content */
.cookie-banner {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: var(--ds-z-banner);
    max-width: 34rem; margin: 0 auto;
    background: var(--ds-surface); color: var(--ds-ink);
    border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); box-shadow: var(--ds-shadow-2);
}
.cookie-banner.hidden { display: none; }
.cookie-banner-inner { display: flex; align-items: center; gap: 0.75rem 1rem; padding: 0.75rem 0.9rem; flex-wrap: wrap; }
.cookie-banner-inner p { margin: 0; flex: 1 1 16rem; font-size: var(--ds-t-xs); line-height: 1.5; color: var(--ds-ink-2); }
.cookie-banner-actions { display: flex; gap: 0.4rem; }
.cookie-banner-actions button {
    min-height: 36px; padding: 0 0.9rem; border-radius: var(--ds-r-pill); cursor: pointer;
    font: 600 var(--ds-t-xs) var(--ds-font); border: 1px solid var(--ds-line-strong);
    background: var(--ds-surface); color: var(--ds-ink); box-shadow: none;
}
.cookie-banner-actions .cookie-banner-accept { background: var(--ds-ink); border-color: var(--ds-ink); color: var(--ds-bg); }

/* --- match: score ring, pill, panel --------------------------------------- */
.ds-score {
    --pct: 0; --band: var(--ds-low);
    display: inline-grid; place-items: center; flex: none;
    width: 56px; height: 56px; border-radius: 50%;
    background:
        radial-gradient(closest-side, var(--ds-surface) 78%, transparent 80%),
        conic-gradient(var(--band) calc(var(--pct) * 1%), var(--ds-sunken) 0);
    font: 700 1.05rem/1 var(--ds-mono); color: var(--ds-ink);
}
.ds-score--good { --band: var(--ds-good); }
.ds-score--mid { --band: var(--ds-mid); }
.ds-score--unknown { --pct: 100; --band: var(--ds-accent-line); color: var(--ds-accent-ink); }
.ds-score--lg { width: 76px; height: 76px; font-size: 1.4rem; }

/* --- skeleton -------------------------------------------------------------- */
.ds-skel { background: linear-gradient(90deg, var(--ds-sunken), var(--ds-line), var(--ds-sunken)); background-size: 200% 100%; border-radius: 8px; animation: ds-shimmer 1.2s linear infinite; }
@keyframes ds-shimmer { to { background-position: -200% 0; } }

.ds-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* account control (rendered by public/js/account-menu.js) */
.ds-actions .account-signin {
    display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.95rem;
    border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line-strong);
    background: var(--ds-surface); color: var(--ds-ink);
    font: 600 var(--ds-t-xs) var(--ds-font); text-decoration: none; box-shadow: none;
}
.ds-actions .account-signin:hover { border-color: var(--ds-ink-3); }
.ds-score--low { --band: var(--ds-low); }

/* Rebuilt pages lay out their own sections (.ds-wrap); the old <main>
   column (max-width + padding, app.css) is for pages not yet rebuilt. */
html[data-ds="2"] main { max-width: none; padding: 0 0 1rem; }

/* --- home (views/home.blade.php) ------------------------------------------ */
.ds-home main { background: var(--ds-bg); }
.ds-hero { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--ds-line); }
.ds-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; }
.ds-hero h1 { font-size: var(--ds-t-3xl); line-height: 1.06; font-weight: 700; letter-spacing: -0.035em; margin: 0 0 0.85rem; max-width: 18ch; }
.ds-hero-sub { font-size: var(--ds-t-lg); line-height: 1.5; color: var(--ds-ink-2); margin: 0 0 1.5rem; max-width: 46ch; }
.ds-hero-preview { padding-top: 0.35rem; }
.ds-preview-head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; font-size: var(--ds-t-sm); font-weight: 600; color: var(--ds-ink-2); }
.ds-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-accent); box-shadow: 0 0 0 4px var(--ds-accent-wash); }
.ds-preview-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
.ds-preview-card { display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 0.9rem; transition: transform .2s var(--ds-ease), box-shadow .2s var(--ds-ease); }
.ds-preview-card:hover { transform: translateY(-1px); box-shadow: var(--ds-shadow-2); }
.ds-preview-card .ds-score { width: 46px; height: 46px; font-size: 0.95rem; }
.ds-preview-main { min-width: 0; flex: 1; }
.ds-preview-title { display: block; font-weight: 600; color: var(--ds-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-preview-title::after { content: ""; position: absolute; inset: 0; }
.ds-preview-card { position: relative; }
.ds-preview-meta { margin: 0.15rem 0 0; font-size: var(--ds-t-sm); color: var(--ds-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-preview-foot { margin: 0.75rem 0 0; font-size: var(--ds-t-xs); color: var(--ds-ink-3); }

.ds-facts { border-bottom: 1px solid var(--ds-line); background: var(--ds-surface); }
.ds-facts-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-facts-row a { padding: 1.1rem 1rem 1.1rem 0; color: var(--ds-ink-2); font-size: var(--ds-t-sm); text-decoration: none; }
.ds-facts-row a + a { padding-left: 1rem; border-left: 1px solid var(--ds-line); }
.ds-facts-row strong { display: block; font-size: var(--ds-t-xl); color: var(--ds-ink); letter-spacing: -0.02em; }
.ds-facts-row a:hover strong { color: var(--ds-accent-ink); }

.ds-section { padding: 2.75rem 0 0; }
.ds-section h2 { font-size: var(--ds-t-xl); font-weight: 650; margin: 0 0 1rem; }
.ds-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ds-section-head h2 { margin: 0; }
.ds-section-head a, .ds-more a { font-size: var(--ds-t-sm); font-weight: 600; color: var(--ds-accent-ink); text-decoration: none; white-space: nowrap; }
.ds-section-head a:hover, .ds-more a:hover { text-decoration: underline; }
.ds-browse, .ds-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.ds-link-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.ds-link-grid a { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--ds-line); color: var(--ds-ink); text-decoration: none; font-size: var(--ds-t-sm); }
.ds-link-grid a span:last-child { color: var(--ds-ink-3); }
.ds-link-grid a:hover span:first-child { color: var(--ds-accent-ink); }
.ds-more { margin: 0.75rem 0 0; }
.ds-tool-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ds-tool-list a { display: grid; gap: 0.15rem; padding: 0.75rem 0; border-bottom: 1px solid var(--ds-line); text-decoration: none; color: var(--ds-ink); }
.ds-tool-list span { color: var(--ds-ink-3); font-size: var(--ds-t-sm); }
.ds-tool-list a:hover strong { color: var(--ds-accent-ink); }
.ds-fine { font-size: var(--ds-t-sm); color: var(--ds-ink-3); }

@media (max-width: 56rem) {
    .ds-hero { padding: 1.5rem 0 1.5rem; }
    .ds-hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ds-facts-row { grid-template-columns: 1fr 1fr; }
    .ds-facts-row a:nth-child(3) { padding-left: 0; border-left: 0; }
    .ds-facts-row a:nth-child(n+3) { border-top: 1px solid var(--ds-line); }
    .ds-browse, .ds-split { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 30rem) {
    .ds-link-grid { grid-template-columns: 1fr; }
}

/* --- job card (components/job-row), on the new system --------------------- */
.job-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
/* grid items default to min-width:auto; a long unbroken title would widen the column */
.job-list > li, .ds-preview-list > li { min-width: 0; }
.job-list > li.job-card {
    background: var(--ds-surface); border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-card); box-shadow: var(--ds-shadow-1);
    padding: 0.85rem 1rem; gap: 0.85rem;
}
.job-list > li.job-card:hover { border-color: var(--ds-line-strong); box-shadow: var(--ds-shadow-2); }
.job-card .case-title { font-family: var(--ds-font); font-size: var(--ds-t-md); font-weight: 600; letter-spacing: -0.01em; }
.job-card .case-title a { color: var(--ds-ink); text-decoration: none; }
.job-card .case-title a:hover { color: var(--ds-accent-ink); }
.job-card .case-facts { font-family: var(--ds-font); font-size: var(--ds-t-sm); color: var(--ds-ink-3); }
.job-card .fact-company { color: var(--ds-ink-2); }
.job-card .fact-salary { color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.company-tile { border-radius: 9px; width: 2.1rem; height: 2.1rem; }

/* --- matches widget on the new inputs -------------------------------------- */
.matches-widget { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); box-shadow: var(--ds-shadow-2); }
.ds-home .matches-widget { margin-bottom: 0; }
.matches-field label { font-size: var(--ds-t-sm); font-weight: 600; color: var(--ds-ink); }
.matches-field input[type=number], .matches-field select, .matches-paste textarea {
    min-height: 44px; border-radius: var(--ds-r-input); border: 1px solid var(--ds-line-strong); box-shadow: none;
    background: var(--ds-surface); color: var(--ds-ink); font-family: var(--ds-font);
}
.matches-field input[type=file] {
    padding: 1.1rem; border-radius: var(--ds-r-input); border: 1.5px dashed var(--ds-accent-line); box-shadow: none;
    background: var(--ds-accent-wash); color: var(--ds-ink-2); cursor: pointer;
}
.matches-field input[type=file]::file-selector-button {
    margin-right: 0.75rem; min-height: 36px; padding: 0 0.9rem; border-radius: var(--ds-r-pill);
    border: 0; background: var(--ds-accent); color: var(--ds-on-accent); font: 600 var(--ds-t-xs) var(--ds-font); cursor: pointer;
}
.matches-field input:focus, .matches-field select:focus, .matches-paste textarea:focus { border-color: var(--ds-accent); box-shadow: var(--ds-focus); outline: none; }
.matches-privacy { color: var(--ds-ink-3); }
.match-card { border-radius: var(--ds-r-card); }

/* grades on the one palette: A/B pass, C mid, D-F flag, none neutral */
.grade-a, .grade-b { background: var(--ds-accent-wash); color: var(--ds-accent-ink); border-color: var(--ds-accent-line); }
.grade-c { background: hsl(38 80% 94%); color: var(--ds-mid-ink); border-color: hsl(38 60% 80%); }
.grade-d, .grade-e, .grade-f { background: var(--ds-flag-wash); color: var(--ds-flag); border-color: hsl(4 60% 84%); }
.grade-none { background: var(--ds-sunken); color: var(--ds-ink-3); border-color: var(--ds-line); }
@media (prefers-color-scheme: dark) {
    html[data-ds="2"] .grade-c { background: hsl(38 40% 14%); border-color: hsl(38 30% 28%); }
    html[data-ds="2"] .grade-d, html[data-ds="2"] .grade-e, html[data-ds="2"] .grade-f { border-color: hsl(4 30% 30%); }
}

.job-card .case-title { margin: 0; line-height: 1.35; }
.job-card .case-facts { margin: 0.2rem 0 0; line-height: 1.4; }
.job-card .case-facts > * { margin: 0; }
.job-list > li.job-card { padding: 0.75rem 1rem; align-items: center; }
.job-card-age { color: var(--ds-ink-3); font-size: var(--ds-t-xs); font-variant-numeric: tabular-nums; }
.ds-actions #account-menu a.account-signin { box-shadow: none; }
@media (max-width: 40rem) { .matches-form .ds-btn--lg { width: 100%; } }

/* --- job page (views/jobs/show.blade.php) --------------------------------- */
.ds-job { padding-top: 1.25rem; }
.ds-job .crumbs { font-size: var(--ds-t-sm); color: var(--ds-ink-3); margin: 0 0 1rem; }
.ds-job .crumbs a { color: var(--ds-ink-2); text-decoration: none; }
.ds-job .crumbs a:hover { color: var(--ds-ink); text-decoration: underline; }
.ds-job .case-file-header { border-bottom: 0; padding-bottom: 0; margin-bottom: 0.75rem; }
.ds-job .case-file-header h1 { font-size: var(--ds-t-2xl); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; max-width: 30ch; }
.ds-job .case-facts { font-size: var(--ds-t-sm); color: var(--ds-ink-2); }
.ds-job .case-facts a { color: var(--ds-ink); font-weight: 600; }
.ds-job .job-actions { margin: 0.5rem 0 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--ds-line); }
.ds-job .job-actions .btn { border-radius: var(--ds-r-pill); }

.ds-job-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 2.5rem; align-items: start; }
.ds-job-rail { grid-column: 2; grid-row: 1; display: grid; gap: 1rem; }
.ds-job-main { grid-column: 1; grid-row: 1; min-width: 0; }
.ds-job-rail > * { margin: 0; }

/* the match panel, vertical in the rail */
.ds-job-rail .your-match { grid-template-columns: auto 1fr; padding: 1rem; margin: 0; border-radius: var(--ds-r-card); }
.ds-job-rail .your-match .btn { width: 100%; border-radius: var(--ds-r-pill); }
.ds-job-rail .your-match-num { width: 3.5rem; height: 3.5rem; font-size: 1.15rem; }

/* the facts, as a two-column list in a card */
.ds-job-rail .case-dossier {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; padding: 1rem;
    background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card);
    border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line);
}
.ds-job-rail .dossier-label { font-family: var(--ds-font); font-size: var(--ds-t-xs); letter-spacing: 0; text-transform: none; color: var(--ds-ink-3); }
.ds-job-rail .dossier-value { font-family: var(--ds-font); font-size: var(--ds-t-sm); font-weight: 600; color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.ds-job-rail .grade-reason, .ds-job-rail .pay-band, .ds-job-rail .desc-review-teaser { border-radius: var(--ds-r-card); }

/* the listing itself: readable measure */
.ds-job .job-body { font-size: var(--ds-t-md); line-height: 1.7; color: var(--ds-ink); max-width: 68ch; }
.ds-job .job-body h2, .ds-job .job-body h3 { font-size: var(--ds-t-lg); margin: 1.5rem 0 0.5rem; }
.ds-job .job-body a { color: var(--ds-accent-ink); }
.ds-job .apply-block { margin: 2rem 0; }
.ds-job .apply-cta {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.4rem; border-radius: var(--ds-r-pill);
    background: var(--ds-accent); color: var(--ds-on-accent); font-weight: 650; text-decoration: none;
}
.ds-job .apply-cta:hover { background: var(--ds-accent-hover); }
.ds-job .apply-destination { display: block; margin-top: 0.5rem; font-size: var(--ds-t-sm); color: var(--ds-ink-3); }

@media (max-width: 60rem) {
    .ds-job-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .ds-job-rail, .ds-job-main { grid-column: 1; grid-row: auto; }
}

/* .card on rebuilt pages: the flat surface, not app.css's light gradient */
html[data-ds="2"] .card { background: var(--ds-surface); border: 1px solid var(--ds-line); box-shadow: var(--ds-shadow-1); }

/* a rebuilt page with a plain reading column (/matches/) */
.ds-page { max-width: 52rem; padding-top: 1.5rem; }
.ds-page .crumbs { font-size: var(--ds-t-sm); color: var(--ds-ink-3); }
.ds-page h1 { font-size: var(--ds-t-2xl); letter-spacing: -0.03em; }
.ds-page .lede { color: var(--ds-ink-2); font-size: var(--ds-t-lg); line-height: 1.55; }

@media (max-width: 34rem) {
    .ds-job-rail .your-match { grid-template-columns: 1fr; }
    .ds-job-rail .your-match-gauge { grid-auto-flow: column; justify-content: start; align-items: center; gap: 0.6rem; }
}

/* --- the board (views/hubs/jobs-index.blade.php) --------------------------- */
.ds-board { padding-top: 1.25rem; }
.ds-board .crumbs { font-size: var(--ds-t-sm); color: var(--ds-ink-3); }
.ds-board .crumbs a { color: var(--ds-ink-2); }
.ds-board-head h1 { font-size: var(--ds-t-2xl); letter-spacing: -0.03em; margin: 0.5rem 0 0.4rem; }
.ds-board-head .board-lede { color: var(--ds-ink-2); margin: 0 0 1.25rem; max-width: 70ch; }
.ds-nudge {
    display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
    margin: 0 0 1.5rem; padding: 0.75rem 1rem;
    background: var(--ds-accent-wash); border: 1px solid var(--ds-accent-line); border-radius: var(--ds-r-card);
    font-size: var(--ds-t-sm); color: var(--ds-ink);
}
.ds-nudge .ds-score { width: 38px; height: 38px; font-size: 0.85rem; }
.ds-nudge [data-nudge-text] { flex: 1 1 18rem; }
.ds-nudge.is-on .ds-score { display: none; }

.ds-board-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.ds-board-side h2 { font-size: var(--ds-t-sm); font-weight: 650; margin: 0 0 0.4rem; color: var(--ds-ink); letter-spacing: 0; }
.ds-board-side h2:not(:first-child) { margin-top: 1.5rem; }
.ds-side-list { list-style: none; margin: 0; padding: 0; }
.ds-side-list a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.4rem 0.6rem; margin: 0 -0.6rem;
    border-radius: 8px; color: var(--ds-ink-2); font-size: var(--ds-t-sm); text-decoration: none;
}
.ds-side-list a:hover { background: var(--ds-sunken); color: var(--ds-ink); }
.ds-side-list a span:last-child { color: var(--ds-ink-3); font-size: var(--ds-t-xs); }
.ds-board-main { min-width: 0; }
.ds-board .board-heading { font-size: var(--ds-t-lg); display: flex; align-items: baseline; gap: 0.6rem; margin: 1.25rem 0 0.75rem; }
.ds-board .board-heading small { font: 500 var(--ds-t-xs) var(--ds-font); color: var(--ds-ink-3); font-variant-numeric: tabular-nums; }
.ds-board .board-about { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--ds-line); color: var(--ds-ink-2); max-width: 70ch; }

/* the filter bar on the new inputs */
.ds-board .job-filters, html[data-ds="2"] .job-filters {
    background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); box-shadow: var(--ds-shadow-1);
}
html[data-ds="2"] .job-filters input[type=search], html[data-ds="2"] .job-filters select {
    min-height: 44px; border-radius: var(--ds-r-input); border: 1px solid var(--ds-line-strong); box-shadow: none;
    background: var(--ds-surface); color: var(--ds-ink); font-family: var(--ds-font);
}
html[data-ds="2"] .job-filters button[type=submit] {
    min-height: 44px; border-radius: var(--ds-r-pill); background: var(--ds-ink); color: var(--ds-bg); border: 0; padding: 0 1.1rem; font-weight: 600;
}
html[data-ds="2"] .job-filters label > span { font-family: var(--ds-font); letter-spacing: 0; text-transform: none; font-size: var(--ds-t-xs); color: var(--ds-ink-3); }

/* app.css components that live on rebuilt pages, on dark-aware tokens */
html[data-ds="2"] .alert-signup, html[data-ds="2"] .poll, html[data-ds="2"] .featured-jobs {
    background: var(--ds-surface); border-color: var(--ds-line); color: var(--ds-ink);
}

@media (max-width: 56rem) {
    .ds-board-grid { grid-template-columns: minmax(0, 1fr); }
    .ds-board-side { order: 2; }
}
