/* WorkFromAsia: "soft & friendly": warm grey page, white rounded rows, a soft
   gradient behind the headline and colour-coded category tags.
   System fonts only, one accent colour (PLAN.md §6). Text meets WCAG AA in both themes. */
:root {
  --page: #f6f5f2;
  --surface: #ffffff;
  --fg: #1c1b1a;
  --muted: #57534e;
  --faint: #6b665f;
  --line: #e8e5df;
  --soft: #f1efeb;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --accent-line: #cfd3fb;
  --on-accent: #ffffff;
  --new: #047857;
  --new-soft: #e3f6ec;
  --tip-bg: #1c1b1a;
  --tip-fg: #ffffff;
  --logo-bg: #ffffff;
  --mark-1: #6366f1; --mark-2: #a855f7; --mark-3: #ec4899;
  --mark-inner: rgb(255 255 255 / 0.92);
  --mark-shadow: 0 2px 6px rgb(99 102 241 / 0.35);
  --shadow: 0 1px 2px rgb(28 25 23 / 0.04), 0 2px 8px rgb(28 25 23 / 0.04);
  --shadow-lift: 0 2px 4px rgb(28 25 23 / 0.04), 0 10px 24px rgb(28 25 23 / 0.08);
  --shadow-accent: 0 2px 6px rgb(79 70 229 / 0.25);
  --shadow-tip: 0 12px 32px rgb(0 0 0 / 0.22);
  --shadow-pressed: 0 1px 3px rgb(0 0 0 / 0.1);
  --glow-1: rgb(99 102 241 / 0.16);
  --glow-2: rgb(236 72 153 / 0.12);
  --glow-3: rgb(245 158 11 / 0.12);
  /* Category tags: background / text */
  --t-engineering: #e8f0fe; --t-engineering-fg: #1d4ed8;
  --t-design: #fde8f1; --t-design-fg: #be185d;
  --t-product: #f1e9fe; --t-product-fg: #6d28d9;
  --t-marketing: #fff1e0; --t-marketing-fg: #a2490a;
  --t-sales: #e3f5ec; --t-sales-fg: #047857;
  --t-support: #e1f3f8; --t-support-fg: #0e7490;
  --t-data: #ebf6e1; --t-data-fg: #3f6212;
  --t-ops: #f1efeb; --t-ops-fg: #57534e;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #131211;
  --surface: #1c1b19;
  --fg: #eeece9;
  --muted: #b3ada6;
  --faint: #9a948c;
  --line: #2d2b28;
  --soft: #252320;
  --accent: #a5b4fc;
  --accent-soft: #23253f;
  --accent-line: #3b3f6e;
  --on-accent: #15142a;
  --new: #6ee7b0;
  --new-soft: #14302a;
  --tip-bg: #eeece9;
  --tip-fg: #131211;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-lift: 0 10px 28px rgb(0 0 0 / 0.45);
  --shadow-accent: none;
  --shadow-tip: 0 12px 32px rgb(0 0 0 / 0.5);
  --shadow-pressed: 0 1px 3px rgb(0 0 0 / 0.4);
  --glow-1: rgb(99 102 241 / 0.22);
  --glow-2: rgb(236 72 153 / 0.12);
  --glow-3: rgb(245 158 11 / 0.08);
  --t-engineering: #1b2742; --t-engineering-fg: #a4c4ff;
  --t-design: #3a1b2a; --t-design-fg: #f9a8cf;
  --t-product: #2a1f45; --t-product-fg: #c8b5ff;
  --t-marketing: #3a2a14; --t-marketing-fg: #fcc58a;
  --t-sales: #143126; --t-sales-fg: #86e0b8;
  --t-support: #12303a; --t-support-fg: #86d6e8;
  --t-data: #1f3014; --t-data-fg: #bde394;
  --t-ops: #2a2825; --t-ops-fg: #cdc7bf;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body {
  margin: 0 auto;
  max-width: 1080px;
  padding: 0 24px;
  background: var(--page);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* Header: the wordmark and the theme toggle, nothing else (PLAN.md §6.2 step 1). */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em; text-decoration: none;
}
.mark {
  position: relative; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--mark-1) 0%, var(--mark-2) 55%, var(--mark-3) 100%);
  box-shadow: var(--mark-shadow);
}
.mark::after { content: ""; position: absolute; inset: 8px; border-radius: 3px; background: var(--mark-inner); }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 12px;
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
}
.topnav a:hover { color: var(--accent); background: var(--accent-soft); }
.theme {
  display: grid; place-items: center; width: 40px; height: 40px; margin-left: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); cursor: pointer;
  box-shadow: var(--shadow);
}
.theme:hover { color: var(--fg); }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

/* Intro: a soft gradient panel */
.hero {
  position: relative; overflow: hidden; margin: 8px 0 20px; padding: 36px 36px 34px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 120% at 0% 0%, var(--glow-1), transparent 60%),
    radial-gradient(50% 120% at 100% 0%, var(--glow-2), transparent 60%),
    radial-gradient(60% 90% at 70% 120%, var(--glow-3), transparent 60%);
}
.hero > * { position: relative; }
h1 {
  font-size: 32px; line-height: 1.18; font-weight: 750; letter-spacing: -0.025em;
  margin: 0 0 10px; max-width: 20em; text-wrap: balance;
}
.lede { margin: 0; max-width: 38em; color: var(--muted); font-size: 16px; }

/* Search: a large box in the hero, with a send button (PLAN.md §6.2 step 3). */
.search { position: relative; display: block; max-width: 640px; margin: 16px 0 0; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
#q {
  width: 100%; height: 52px; padding: 0 92px 0 46px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); font: inherit; font-size: 16px;
  box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s;
}
.send {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); cursor: pointer;
}
.send:hover { filter: brightness(1.08); }
#q::placeholder { color: var(--faint); }
#q:hover { border-color: var(--accent-line); }
#q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#q::-webkit-search-cancel-button { cursor: pointer; }
kbd {
  display: inline-block; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--soft); color: var(--faint); font: 12px/20px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center;
}
.search kbd { position: absolute; right: 54px; top: 50%; transform: translateY(-50%); }
.search:focus-within kbd { display: none; }

/* Suggested searches and hero pills ("Fullscreen S") */
.suggest, .pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer;
}
.pill:hover { border-color: var(--accent-line); color: var(--accent); }
.pill kbd { height: 20px; min-width: 20px; line-height: 18px; font-size: 11px; }
.hero .qchips { margin: 12px 0 0; }
.hero .note { margin: 10px 0 0; }

/* Bar: view tabs and the count on the left, the Filters button on the right (PLAN.md §6.2 step 4). */
.bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 0 8px; }
.fwrap { position: relative; margin-left: auto; }
.f-btn {
  position: relative; height: 38px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--fg); font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: var(--shadow);
}
.f-btn::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); color: var(--faint);
}
.f-btn:hover { border-color: var(--accent-line); }
.f-btn[data-active] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.f-btn[data-active]::after { color: var(--accent); }

/* The Filters panel: chip groups for Posted within, Experience, Category and Can work from (step 5). */
.fpanel {
  position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(34rem, calc(100vw - 32px)); max-height: min(70vh, 40rem); overflow-y: auto;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lift);
}
.fpanel fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.fpanel legend { margin: 0 0 8px; padding: 0; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.fpanel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fpanel .n { color: var(--faint); font-weight: 600; }
.fpanel .cchip[aria-pressed="true"] .n { color: inherit; }
.fpanel input[type="search"] {
  width: 100%; height: 36px; padding: 0 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--page); color: var(--fg); font: inherit; font-size: 14px;
}
.custom { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.custom input { width: 64px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); color: var(--fg); font: inherit; font-size: 13px; }
.cchips { max-height: 12rem; overflow-y: auto; }
.fpanel-end { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.done { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; cursor: pointer; }
.cchip {
  height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cchip:hover { border-color: var(--accent-line); }
.cchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Chips for the words search recognised ("SENIOR" "FRONTEND" "INDONESIA"); click to remove one. */
.qchips { display: flex; flex-wrap: wrap; gap: 6px; }
.qchip {
  height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
}
.qchip::after { content: " ×"; font-weight: 500; }
.qchip:hover { box-shadow: inset 0 0 0 1px var(--accent-line); }
.note { color: var(--muted); font-size: 14px; }
.linkish { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.empty a { color: var(--accent); }
.count { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); }
.seg button {
  height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-pressed); }

/* Table (default view): each row is a white rounded strip */
.jobs { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-top: -4px; }
/* The header row stays visible while the page scrolls; Company, Role and Posted sort (app.js). */
.jobs th {
  position: sticky; top: 0; z-index: 2; background: var(--page);
  text-align: left; font-size: 12px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 16px 6px;
}
.sort {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
.sort:hover { color: var(--fg); }
.sort .arrow::after { content: "↕"; opacity: 0.5; }
th[aria-sort="ascending"] .sort, th[aria-sort="descending"] .sort { color: var(--accent); }
th[aria-sort="ascending"] .arrow::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .arrow::after { content: "↓"; opacity: 1; }
.jobs td {
  padding: 9px 16px; vertical-align: middle; background: var(--surface);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: border-color 0.12s;
}
.jobs td:first-child { border-left: 1px solid var(--line); border-radius: 14px 0 0 14px; }
.jobs td:last-child { border-right: 1px solid var(--line); border-radius: 0 14px 14px 0; }
.jobs tbody tr:hover td, .jobs tbody tr.open td { border-color: var(--accent-line); }
.co { white-space: nowrap; width: 24%; max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 14px; font-weight: 500; }
.co .name { display: inline-block; vertical-align: middle; color: var(--fg); }
.co .domain { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.logo {
  display: inline-block; width: 28px; height: 28px; margin-right: 12px; padding: 4px; vertical-align: middle;
  border-radius: 9px; background: var(--logo-bg); box-shadow: 0 0 0 1px var(--line);
}
.badge { padding: 0; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 28px; font-weight: 700; text-align: center; }
.role { position: relative; }
/* Role takes the leftover width, so a long title is cut instead of widening the table. */
.jobs td.role { width: 100%; max-width: 0; }
/* Title line: the title (cut with "…", full title on hover) and the JUNIOR / WORLDWIDE badges. */
.tline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.role .t { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: 15px; line-height: 1.35; }
.badge-hi {
  flex: none; padding: 1px 7px; border-radius: 6px; background: var(--new-soft); color: var(--new);
  font-size: 11px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-hi.ww { background: var(--accent-soft); color: var(--accent); }
/* Category · level in one quiet line, with a dot in the category's colour. */
.meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.3; }
.meta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--t-ops-fg); }
.meta[data-cat="engineering"]::before { background: var(--t-engineering-fg); }
.meta[data-cat="design"]::before { background: var(--t-design-fg); }
.meta[data-cat="product"]::before { background: var(--t-product-fg); }
.meta[data-cat="marketing"]::before { background: var(--t-marketing-fg); }
.meta[data-cat="sales"]::before { background: var(--t-sales-fg); }
.meta[data-cat="support"]::before { background: var(--t-support-fg); }
.meta[data-cat="data"]::before { background: var(--t-data-fg); }
.age { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--soft); color: var(--faint); font-size: 11px; font-weight: 600; }
/* The title links to the job page; the whole row is clickable (app.js). */
.role a.t { color: var(--fg); text-decoration: none; }
.role a.t:hover, .role a.t:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.jobs tbody tr { cursor: pointer; }
.more.off { display: none !important; }
.when { width: 1%; color: var(--faint); font-size: 13px; white-space: nowrap; }
.new {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--new-soft); color: var(--new); font-size: 12px; font-weight: 700;
}
.go { width: 1%; text-align: right; white-space: nowrap; }
.go > a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 650; text-decoration: none;
  box-shadow: var(--shadow-accent); transition: filter 0.12s, transform 0.12s;
}
.go > a:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* "N openings": the same role posted several times (FIXES.md Fix 1). The
   summary is an outlined pill; the popover lists one Apply link per posting. */
.openings { position: relative; display: inline-block; text-align: left; }
.openings summary {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 13px; font-weight: 650; cursor: pointer; list-style: none; user-select: none;
}
.openings summary::-webkit-details-marker { display: none; }
.openings summary::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform 0.12s;
}
.openings[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.openings summary:hover { filter: brightness(1.04); }
.openings .pop {
  position: absolute; z-index: 10; top: calc(100% + 6px); right: 0; min-width: 220px; max-width: min(20rem, 86vw);
  padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lift);
}
.openings .pop p { margin: 4px 8px 6px; color: var(--faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.openings ul { margin: 0; padding: 0; list-style: none; max-height: 16rem; overflow-y: auto; }
.openings li a {
  display: block; padding: 8px 10px; border-radius: 9px; color: var(--fg); font-size: 14px; text-decoration: none;
  white-space: normal; overflow-wrap: anywhere;
}
.openings li a:hover, .openings li a:focus-visible { background: var(--accent-soft); color: var(--accent); }
/* An open popover sits above the next rows and hides the "Why APAC" tooltip. */
.jobs tr:has(.openings[open]) { position: relative; z-index: 6; }
.jobs tr:has(.openings[open]) .why { display: none; }

/* "Why APAC" tooltip: shown on hover, or on tap (app.js toggles .open). */
.why, .sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.jobs tr:hover .why, .jobs tr.open .why {
  z-index: 5; top: calc(100% + 6px); left: 16px; width: max-content; max-width: min(36rem, 86vw); height: auto;
  overflow: visible; clip: auto; clip-path: none; white-space: normal;
  padding: 10px 13px; border-radius: 12px; background: var(--tip-bg); color: var(--tip-fg);
  font-size: 13px; font-weight: 400; line-height: 1.45; box-shadow: var(--shadow-tip); pointer-events: none;
}

/* Fullscreen (S / Esc, PLAN.md §6.2 step 8): only the table, with the count and Filters on top. */
.fs-hint { display: none; margin: 0; color: var(--faint); font-size: 13px; }
:root.fs .top, :root.fs .hero, :root.fs .foot, :root.fs .seg { display: none; }
:root.fs body { max-width: none; padding-top: 12px; }
:root.fs .fs-hint { display: block; }
:root.fs .count::after { content: " ·"; }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.more {
  display: block; margin: 24px auto 0; height: 44px; padding: 0 26px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg);
  font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}
.more:hover { border-color: var(--accent-line); color: var(--accent); }
[hidden] { display: none !important; }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; gap: 24px 64px;
  margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.fcol.wide { flex: 1 1 360px; }
.foot h2 { font-size: 12px; font-weight: 600; color: var(--faint); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.links { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0; }
.links a { display: inline-block; padding: 4px 0; color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--accent); }
.copy { flex: 1 0 100%; margin: 0; color: var(--faint); font-size: 13px; }

/* Home page "/" (DESIGN.md "Home page"): the company page in front of the job board. */
.landing section { margin: 0 0 56px; }
.landing h2 { margin: 0 0 18px; font-size: 24px; line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; }
.landing h3 { margin: 0 0 6px; font-size: 16px; }
.landing p { color: var(--muted); }
.landing a:not(.btn):not(.cat) { color: var(--accent); }
.h-hero {
  position: relative; overflow: hidden; margin: 8px 0 56px; padding: 64px 48px 48px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: center;
}
.h-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 90% at 10% 0%, var(--glow-1), transparent 65%),
    radial-gradient(45% 90% at 95% 10%, var(--glow-2), transparent 65%),
    radial-gradient(60% 70% at 50% 120%, var(--glow-3), transparent 65%);
}
.h-hero > * { position: relative; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 4px 12px; border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent) !important; font-size: 13px; font-weight: 650;
}
.h-hero h1 { margin: 0 auto 14px; max-width: 16em; font-size: 44px; line-height: 1.1; }
.h-lede { max-width: 38em; margin: 0 auto; font-size: 17px; line-height: 1.6; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0 0; }
.final .ctas, .final p { justify-content: center; text-align: center; }
.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 650; text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover { border-color: var(--accent-line); color: var(--accent); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn.primary:hover { filter: brightness(1.08); color: var(--on-accent); }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 48px; margin: 40px 0 0; }
.stats dt { order: 2; color: var(--muted); font-size: 13px; }
.stats div { display: flex; flex-direction: column; }
.stats dd { margin: 0; font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.band { padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--soft); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 32px; }
.cols p { margin: 0; line-height: 1.6; }
.cards { display: grid; gap: 14px; }
.cards.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.card p { margin: 0; font-size: 14px; line-height: 1.6; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.steps .n {
  display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 750;
}
.steps p { margin: 0; font-size: 14px; }
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cat {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--fg); text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s;
}
.cat:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lift); }
.cat-name { font-weight: 700; }
.cat-blurb { color: var(--muted); font-size: 14px; }
.cat-n { margin-top: 6px; color: var(--accent); font-size: 14px; font-weight: 650; }
.more-link { margin: 16px 0 0; font-size: 14px; }
.final {
  position: relative; overflow: hidden; padding: 48px 32px; border-radius: 22px; text-align: center;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
}
.final h2 { margin-bottom: 8px; }
.final p { margin: 0 auto; max-width: 36em; }
.final p.ctas { margin-top: 24px; max-width: none; }
@media (max-width: 860px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Companies view (PLAN.md §6.2 step 7): a grid of company cards. */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 8px; }
.ccard {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; min-width: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow);
}
.ccard:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lift); }
.ccover { display: grid; place-items: center; height: 72px; border-radius: 12px; background: var(--accent-soft); }
.ccover img { width: 32px; height: 32px; border-radius: 8px; background: var(--logo-bg); padding: 3px; }
.ccover .badge { width: 32px; height: 32px; border-radius: 8px; line-height: 32px; }
.ccard h3 { margin: 4px 0 0; font-size: 16px; }
/* The company name's link covers the card; the role links sit above it. */
.cname { color: var(--fg); text-decoration: none; }
.cname::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.croles { margin: 0; color: var(--muted); font-size: 13px; }
.ccard ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ccard li { display: flex; justify-content: space-between; gap: 10px; min-width: 0; font-size: 14px; }
.ccard li a, .cmore { position: relative; z-index: 1; color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard li a { flex: 1 1 auto; min-width: 0; } /* lets a long title shrink and end in "…" */
.ccard li a:hover, .cmore:hover { color: var(--accent); text-decoration: underline; }
.ccard li time { flex: none; color: var(--faint); font-size: 12px; }
.cmore { color: var(--accent); font-size: 13px; font-weight: 600; }

/* Job pages and company pages (PLAN.md §6.3–§6.4). */
.page { max-width: 860px; margin: 8px auto 0; }
.crumbs { margin: 8px 0 18px; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-head .logo { width: 48px; height: 48px; margin: 0; padding: 6px; border-radius: 12px; flex: none; }
.page-head .badge { line-height: 48px; font-size: 18px; }
.page-head h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; }
.page-head .sub { margin: 0; color: var(--muted); font-size: 15px; }
.page-head .sub a { color: var(--muted); }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 20px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.facts dt { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.why-box { margin: 0 0 20px; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.why-box h2, .details h2, .more-roles h2 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.why-box blockquote { margin: 0; font-size: 16px; line-height: 1.5; }
.why-box .tz { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.intro { color: var(--muted); line-height: 1.6; }
.apply {
  display: inline-flex; align-items: center; height: 46px; padding: 0 22px; margin: 4px 0 28px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; box-shadow: var(--shadow);
}
.apply:hover { filter: brightness(1.08); }
.apply-many { margin: 4px 0 28px; }
.apply-many p { margin: 0 0 8px; color: var(--muted); }
.details { margin: 0 0 28px; }
.details p { line-height: 1.6; }
.details a, .back a, .intro a { color: var(--accent); }
.more-roles { margin: 0 0 20px; }
.countchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.countchips .n { color: var(--faint); font-weight: 600; }
.countchips .cchip[aria-pressed="true"] .n { color: inherit; }
.countchips .cchip:disabled { opacity: 0.5; cursor: default; }
.closed-banner {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--soft); color: var(--fg); font-weight: 600;
}
.back { margin: 24px 0 0; }

/* About / crawler pages */
.prose {
  max-width: 720px; margin: 8px 0 0; padding: 36px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
}
.prose h1 { margin-bottom: 18px; }
.prose p { margin: 0 0 14px; color: var(--muted); }
.prose p b { color: var(--fg); }
.prose a { color: var(--accent); }
code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .go > a:hover { transform: none; }
}

/* Phones (PLAN.md §6.6): each job a white card; the Filters panel opens as a sheet from the bottom. */
@media (max-width: 640px) {
  body { padding: 0 14px; }
  .top { min-height: 60px; }
  .hero { padding: 24px 18px; border-radius: 18px; margin-bottom: 14px; }
  h1 { font-size: 24px; }
  h1 br { display: none; }
  .lede { font-size: 14px; }
  kbd, .pills { display: none; }
  #q { height: 48px; padding-right: 54px; }
  .suggest { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .suggest::-webkit-scrollbar { display: none; }
  .pill { flex: none; }
  /* View tabs and Filters on one row, like the reference structure; the count shows in fullscreen. */
  .bar { gap: 10px; flex-wrap: nowrap; }
  .bar .count { display: none; }
  :root.fs .bar .count { display: block; }
  .f-btn { padding: 0 30px 0 12px; font-size: 13px; white-space: nowrap; }
  .fpanel { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 80vh; border-radius: 18px 18px 0 0; padding: 16px 16px 24px; }
  .prose { padding: 24px 20px; border-radius: 18px; }
  .topnav a { padding: 0 8px; }
  .h-hero { padding: 40px 20px 32px; margin-bottom: 40px; border-radius: 18px; }
  .h-hero h1 { font-size: 30px; }
  .h-lede { font-size: 15px; }
  .landing section { margin-bottom: 40px; }
  .landing h2 { font-size: 21px; }
  .band { padding: 22px 18px; border-radius: 18px; }
  .stats { gap: 12px 28px; }
  .stats dd { font-size: 24px; }
  .final { padding: 32px 18px; border-radius: 18px; }
  .cards.two, .cats { grid-template-columns: minmax(0, 1fr); }
  .btn { height: 46px; padding: 0 20px; }

  .jobs[data-view="table"], .jobs[data-view="table"] tbody { display: block; }
  .jobs[data-view="table"] thead { display: none; }
  .jobs[data-view="table"] tr {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "co go" "role role"; column-gap: 12px; row-gap: 8px;
    margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  }
  .jobs[data-view="table"] tbody tr:hover, .jobs[data-view="table"] tbody tr.open { border-color: var(--accent-line); }
  .jobs[data-view="table"] td { padding: 0; border: 0; border-radius: 0; background: none; width: auto; max-width: none; }
  .jobs[data-view="table"] .co { grid-area: co; max-width: none; align-self: center; font-size: 13px; }
  .jobs[data-view="table"] .logo { width: 24px; height: 24px; margin-right: 10px; padding: 3px; border-radius: 7px; }
  .jobs[data-view="table"] .badge { line-height: 24px; }
  .jobs[data-view="table"] .role { grid-area: role; position: static; }
  /* One muted meta line on phones: category · level on the left, the date on the right (PLAN.md §6.6). */
  .jobs[data-view="table"] .when { grid-area: role; align-self: end; justify-self: end; font-size: 12px; }
  .jobs[data-view="table"] .meta { padding-right: 88px; }
  .jobs[data-view="table"] .go { grid-area: go; align-self: center; }
  .jobs[data-view="table"] .go > a, .jobs[data-view="table"] .openings summary { height: 32px; padding: 0 14px; }
  .jobs[data-view="table"] tr:hover .why, .jobs[data-view="table"] tr.open .why { left: 0; top: calc(100% + 4px); }
}
