/* Discover on desktop. Values follow the approved mockup (mockup/desktop-overhaul);
   tests/browser/discover_matches_mockup.py checks them element by element. */
:root {
  --paper: #FFFFFF; --ground: #F5F6F3; --hover: #F8F9F7; --sel: #F0F5F1;
  --ink: #141816; --ink-2: #2D3330; --muted: #59615C; --faint: #858C87; --ghost: #B4BAB5;
  --line: #E7E9E6; --line-strong: #D6DAD5; --nav: #15251E;
  --green: #1E5C42; --green-press: #174A35; --green-soft: #EAF2EC; --green-line: #CFE0D4;
  --amber: #9A6208; --amber-soft: #FBF1DE; --red: #B23A2E; --red-soft: #FBEDEA;
  --sans: 'IBM Plex Sans', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'IBM Plex Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 32px; --discover-max: var(--app-workspace-max); --pop-shadow: 0 2px 6px rgb(20 24 22 / 8%), 0 16px 40px rgb(20 24 22 / 14%);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #FFFFFF; }
body { margin: 0; background: #FFFFFF; color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-180%); border-radius: 7px; background: var(--ink); padding: 8px 12px; color: white; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.opportunities-app .app-shell { height: calc(100vh - var(--app-header-height)); min-height: 496px; }
.main { min-width: 0; min-height: 0; }
.view { width: 100%; height: 100%; margin: 0; padding: 0; }
.view:has(> .loading) { display: grid; place-items: center; }
.view > .loading { width: 100%; }
.discover-page { height: 100%; display: flex; flex-direction: column; }

/* ───────────── Messages ───────────── */
.flash { position: fixed; left: calc(76px + 24px); bottom: 24px; z-index: 25; width: max-content; min-height: 44px; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--ink); color: #FFFFFF; box-shadow: var(--pop-shadow); font-size: 13.5px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .16s, transform .16s, visibility .16s; pointer-events: none; }
.flash.show { opacity: 1; visibility: visible; transform: none; }
.flash.has-action { pointer-events: auto; }
.flash button { height: 30px; border: 0; border-radius: 7px; padding: 0 10px; background: transparent; color: #FFFFFF; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 40%); text-underline-offset: 3px; cursor: pointer; }
.flash button:hover { background: rgb(255 255 255 / 8%); }
.flash button:focus-visible { outline-color: #BAC6BE; }
.flash button:disabled { cursor: default; opacity: .5; }
.flash-copy { min-width: 0; overflow-wrap: anywhere; }
.flash-copy small { display: block; color: #BAC6BE; font-size: 12px; }
.flash-copy small b { color: #FFFFFF; font-family: var(--mono); }
.flash .flash-undo { flex: none; }

/* ───────────── Shortcut sheet ───────────── */
.keys-button { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); }
.keys-button:hover { border-color: var(--ink); color: var(--ink); }
.keys-button svg { width: 17px; height: 17px; }
.sheet-scrim { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgb(24 33 27 / 28%); padding: 16px; }
.sheet { width: min(400px, 100%); border-radius: 14px; background: var(--paper); padding: 18px 18px 12px; box-shadow: 0 24px 60px rgb(0 0 0 / 22%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head strong { font-size: 15px; }
.sheet dl { display: grid; grid-template-columns: 88px 1fr; margin: 0; }
.sheet dt, .sheet dd { margin: 0; border-top: 1px solid var(--line); padding: 8px 0; }
.sheet dt { display: flex; gap: 4px; }
.sheet dd { color: var(--ink-2); font-size: 13px; }
.sheet kbd { min-width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--ground); padding: 0 5px; color: var(--muted); font: 600 11px/1 var(--mono); }
.text-button { border: 0; background: none; padding: 2px 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.text-button:hover { color: var(--ink); }

/* ───────────── Menus (Fields, Sort, Skip, links, places) ───────────── */
.pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 220px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); box-shadow: var(--pop-shadow); white-space: normal; cursor: default; }
.pop > p { margin: 0; padding: 8px 10px 4px; color: var(--faint); font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.pop hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--line); }
.opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: inherit; font-size: 13.5px; text-align: left; white-space: nowrap; }
.opt:hover, .opt:focus-visible { background: var(--ground); outline: none; }
.opt .box { width: 16px; height: 16px; display: grid; place-items: center; flex: none; border: 1.5px solid #B9BFB8; border-radius: 4px; color: transparent; }
.opt .box svg { width: 12px; height: 12px; stroke-width: 2.6; }
.opt[aria-checked="true"] .box { border-color: var(--green); background: var(--green); color: #FFFFFF; }
.opt.radio .box { border-radius: 50%; }
.opt.radio[aria-checked="true"] .box { background: var(--paper); box-shadow: inset 0 0 0 3.5px var(--green); }
.pop .foot-link { width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 13px; text-align: left; }
.pop .foot-link:hover { background: var(--ground); color: var(--ink); }
.place-menu { top: 26px; }
.place-menu ul { margin: 0; padding: 0; list-style: none; }
.place-menu li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; white-space: nowrap; }
.place-menu svg { width: 16px; height: 16px; color: var(--muted); }
.link-menu { top: 46px; min-width: 300px; }
.link-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; }
.link-item:hover, .link-item:focus-visible { background: var(--ground); outline: 0; }
.link-item span { flex: 1; min-width: 0; }
.link-item b { display: block; font-weight: 600; }
.link-item small { display: block; overflow: hidden; color: var(--faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.link-item svg { width: 16px; height: 16px; color: var(--muted); }

/* ───────────── Filter bar ───────────── */
.discover-controls-pane { position: relative; z-index: 5; flex: none; display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 var(--gutter) 0 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.discover-filterbar { display: flex; flex: 1 1 auto; align-self: stretch; align-items: stretch; gap: 26px; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.discover-filterbar::-webkit-scrollbar { display: none; }
.discover-filterbar.fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.filter { position: relative; flex: none; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.filter:hover { color: var(--ink); }
.filter.active { color: var(--ink); font-weight: 600; }
.filter.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--green); content: ''; }
.filter-count, .hidden-count { min-width: 22px; padding: 3px 7px; border-radius: 20px; background: #EEF0ED; color: var(--muted); font: 500 11.5px/1 var(--sans); font-variant-numeric: tabular-nums; text-align: center; }
.filter.active .filter-count { background: #DCE9E0; color: var(--green); }
.hidden-count { padding: 2px 6px; }
.list-tools { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.focus-menu, .sort-menu { position: relative; }
.field-trigger, .sort-trigger, .hidden-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
.field-trigger:hover, .sort-trigger:hover, .hidden-toggle:hover { border-color: #BFC5BE; }
.field-trigger[aria-expanded="true"], .sort-trigger[aria-expanded="true"] { border-color: var(--green); box-shadow: 0 0 0 3px rgb(30 92 66 / 10%); }
.field-trigger > svg:last-child, .sort-trigger > svg:last-child { width: 14px; height: 14px; color: var(--faint); }
.sort-trigger .sort-icon, .hidden-toggle > svg { width: 15px; height: 15px; color: var(--muted); }
.hidden-toggle[aria-pressed="true"] { border-color: var(--green-line); background: var(--green-soft); color: var(--green); }
.hidden-toggle[aria-pressed="true"] > svg { color: var(--green); }
.field-options, .sort-options { top: 40px; right: 0; left: auto; }

/* ───────────── List ───────────── */
.discover-grid { display: flex; flex: 1; min-height: 0; }
.opportunity-list { position: relative; flex: none; width: clamp(360px, 33vw, 460px); overflow-y: auto; border-right: 1px solid var(--line); background: var(--paper); scrollbar-width: thin; scrollbar-color: #D5D9D5 transparent; }
.recency-bucket { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; height: 34px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); backdrop-filter: blur(6px); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.group-count { color: var(--faint); font-size: smaller; font-weight: 500; font-variant-numeric: tabular-nums; }
.opportunity { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) 64px; gap: 12px; align-items: start; width: 100%; margin: 0; padding: 14px 16px 14px 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; }
.opportunity:hover { background: var(--hover); }
.opportunity.selected { background: var(--sel); }
.opportunity:focus-visible { outline-offset: -2px; }
.job-logo { width: 32px; height: 32px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #F1F3F0; color: #5D655F; font: 600 11.5px/1 var(--sans); letter-spacing: .02em; }
.job-logo-mark { width: 100%; height: 100%; padding: 2px; object-fit: contain; }
.job-logo .company-logo-fallback { width: 18px; height: 18px; stroke-width: 1.65; }
.opportunity-main { min-width: 0; }
.opportunity-main h3 { display: -webkit-box; overflow: hidden; margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.job-subline { display: flex; align-items: baseline; min-width: 0; margin-top: 2px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.job-company { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--ink-2); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; flex: 1; align-items: baseline; min-width: 0; overflow: hidden; white-space: nowrap; }
/* " · " between parts, spaced like the mockup's plain text. */
.card-meta::before, .card-meta > * + *::before { flex: none; content: '\a0·\a0'; }
.card-meta > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.workplace-cue { flex: none; }
.workplace-cue svg { display: none; }
.tags, .skill-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tags { margin-top: 8px; }
.tag, .skill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 0; border-radius: 5px; background: var(--green-soft); color: var(--green); font: 500 12px/1 var(--sans); white-space: nowrap; }
.tag-more { background: none; color: var(--faint); padding: 0 2px; }
.row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-deadline { color: var(--amber); font-weight: 500; }
.row-actions { position: absolute; top: 14px; right: 16px; display: flex; gap: 4px; opacity: 0; pointer-events: none; }
/* Shown on hover, or when the keyboard is on the row; a mouse click alone leaves the time showing. */
.opportunity:hover .row-actions, .opportunity:focus-visible .row-actions, .opportunity:has(:focus-visible) .row-actions, .opportunity.menu-open .row-actions { opacity: 1; pointer-events: auto; }
.opportunity:hover .row-meta, .opportunity:focus-visible .row-meta, .opportunity:has(:focus-visible) .row-meta, .opportunity.menu-open .row-meta { visibility: hidden; }
.opportunity.menu-open { z-index: 5; }
.card-add, .card-skip { position: relative; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); color: var(--muted); }
.card-add svg, .card-skip svg { width: 15px; height: 15px; }
.card-add:hover { border-color: var(--green); color: var(--green); }
.card-skip:hover, .card-skip[aria-expanded="true"] { border-color: var(--ink-2); color: var(--ink); }
.card-restore { position: absolute; top: 14px; right: 16px; height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.opportunity:has(.card-restore) .row-meta { visibility: hidden; }
.hidden-reason { display: block; margin-top: 6px; color: var(--amber); font-size: 12.5px; }
.hidden-intro { margin: 0; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--ground); color: var(--muted); font-size: 13px; }
.list-pager { display: flex; justify-content: center; align-items: center; column-gap: 12px; padding: 18px 20px 28px; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ───────────── Buttons ───────────── */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.button:hover { border-color: #BFC5BE; background: var(--hover); }
.button.primary { border-color: var(--green); background: var(--green); color: #FFFFFF; }
.button.primary:hover { background: var(--green-press); }
.button svg { width: 16px; height: 16px; }

/* ───────────── Job card ───────────── */
.detail { position: static; align-self: stretch; flex: 1; min-width: 0; overflow-y: auto; margin: 0; padding: 12px; border: 0; background: var(--ground); scrollbar-width: thin; scrollbar-color: #D5D9D5 transparent; }
.detail-inner { max-width: 752px; margin: 0; padding: 24px 36px 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.detail-head { display: block; }
.detail-line { min-width: 0; }
.detail-company-row { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.detail-logo { flex: none; width: 24px; height: 24px; display: grid; place-items: center; overflow: hidden; border: 1px solid transparent; border-radius: 6px; background: var(--ground); color: var(--faint); font: 600 9.5px/1 var(--sans); letter-spacing: .02em; }
.detail-logo .job-logo-mark { padding: 1px; border-radius: 5px; }
.detail-logo .company-logo-fallback { width: 14px; height: 14px; stroke-width: 1.65; }
.detail-company { flex: 1; min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.detail-flag { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.detail-flag:hover, .detail-flag[aria-expanded="true"] { background: var(--ground); color: var(--ink); }
.detail-flag svg { width: 15px; height: 15px; }
.detail-head h2 { margin: 10px 0 0; color: var(--ink); font: 600 22px/1.3 var(--serif); letter-spacing: -.005em; text-wrap: balance; overflow-wrap: anywhere; }
.detail-metadata { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 10px; color: var(--muted); font-size: 13.5px; }
.detail-metadata > span, .detail-place { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.detail-metadata svg { flex: none; width: 15px; height: 15px; color: var(--faint); }
.detail-place > span { overflow-wrap: anywhere; }
.place-more { flex: none; height: 20px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 600; }
.detail-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.detail-actions .button { height: 40px; padding: 0 18px; font-size: 14px; }
.detail-actions svg { flex: none; width: 16px; height: 16px; }
.open-link svg { color: var(--ink); }
.open-split { position: relative; display: inline-flex; min-width: 0; }
.open-split .open-link { border-radius: 8px 0 0 8px; }
.detail .open-more { width: 32px; margin-left: -1px; padding: 0; border-radius: 0 8px 8px 0; }
.applied-notice { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.applied-notice button, .skip-notice button { height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--green); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--green-line); text-underline-offset: 3px; }
.applied-notice button:hover, .skip-notice button:hover { background: var(--green-soft); text-decoration-color: var(--green); }
.empty-detail-feedback { margin: 16px 0; }
.action-divider { width: 1px; height: 22px; background: var(--line-strong); }
.skip-wrap { position: relative; display: inline-flex; }
.detail-actions .skip { border-color: transparent; background: none; color: var(--muted); }
.detail-actions .skip:hover, .detail-actions .skip[aria-expanded="true"] { background: var(--ground); color: var(--ink); }
.detail-actions .skip svg:last-child { width: 14px; height: 14px; margin-left: -2px; color: var(--faint); }

/* Skip reasons: picking one is the skip. */
.skip-menu { min-width: 180px; }
.skip-menu.at-pane { left: 0; }
.skip-menu.at-row { right: 0; left: auto; }
.skip-menu.above { top: auto; bottom: calc(100% + 6px); }
.skip-menu .opt { justify-content: space-between; }
.skip-menu kbd { min-width: 18px; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--ground); color: var(--faint); font: 500 11px/1.4 var(--sans); text-align: center; }
.skip-notice { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }

.detail-rule { margin: 20px 0 18px; border: 0; border-top: 1px solid var(--line); }
.detail-body h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.role-summary, .summary-missing { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.detail-facts > h3 { margin-top: 22px; }
.detail-facts dl { margin: 8px 0 0; }
.detail-fact { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.detail-facts .detail-fact:first-child { border-top: 0; }
.detail-fact dt { padding-top: 1px; color: var(--muted); }
.detail-fact dd { min-width: 0; margin: 0; }
.detail-facts .expertise-term { border-color: var(--line); background: var(--hover); }
.detail-footer dl { margin: 0; }
.section-kicker { display: none; margin: 2px 0 5px; color: var(--faint); font-size: 11.5px; font-weight: 600; }
.detail-fact dd:has(> .detail-skill-section + .detail-skill-section) .section-kicker { display: block; }
.detail-skill-section + .detail-skill-section .section-kicker { margin-top: 10px; }
.expertise-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.expertise-term { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.expertise-term.common { border-style: dashed; color: var(--muted); }
.more-link { padding: 0; border: 0; background: none; color: var(--green); font-size: 13px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--green-line); text-underline-offset: 3px; }
.more-link:hover, .more-link[aria-expanded="true"] { text-decoration-color: var(--green); }
.hidden-banner { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: 13.5px; }
.hidden-banner p { flex: 1; margin: 0; font-weight: 500; }
.detail > .section-kicker, .detail > h2, .detail > p { display: block; margin-left: 24px; margin-right: 24px; }
.detail > .section-kicker { margin-top: 36px; }

/* ───────────── Report ───────────── */
html:has(.report-dialog[open]) { overflow: hidden; }
.report-dialog { width: min(560px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 9vh - 20px); margin: 9vh auto auto; padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: var(--pop-shadow); }
.report-dialog::backdrop { background: rgb(20 24 22 / 28%); }
.report-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 9vh - 20px); }
.report-head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 4px; }
.report-head > div { flex: 1; min-width: 0; }
.report-head h2 { margin: 0; font: 600 20px/1.3 var(--serif); }
.report-context { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.report-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.report-close:hover { background: var(--ground); color: var(--ink); }
.report-close svg { width: 18px; height: 18px; }
.report-body { min-height: 0; overflow-y: auto; padding: 8px 24px 20px; }
.report-body fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.report-row { padding: 10px 0; border-top: 1px solid var(--line); }
.report-row:first-of-type { border-top: 0; }
.report-check { display: grid; grid-template-columns: 18px 100px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 13.5px; cursor: pointer; }
.report-check .tick { appearance: none; width: 18px; height: 18px; margin: 0; padding: 0; border: 1.5px solid #B9BFB8; border-radius: 5px; background: var(--paper) no-repeat center / 12px; color: transparent; cursor: pointer; }
.report-check .tick:hover { border-color: var(--green); }
.report-check .tick:checked { border-color: var(--green); background-color: var(--green); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.report-key { font-weight: 600; }
.report-value { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.report-fix { margin: 8px 0 0 130px; }
.report-fix select, .report-fix input { display: block; width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); font-size: 14px; }
.report-fix select { appearance: none; padding-right: 32px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2359615C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
.report-fix select:hover, .report-fix input:hover { border-color: #C2C8C1; }
.report-fix select:focus, .report-fix input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgb(30 92 66 / 12%); }
.report-fix input::placeholder { color: var(--ghost); }
.report-fix p { margin: 0; color: var(--muted); font-size: 13px; }
.report-error { margin: 12px 0 0; color: var(--red); font-size: 12.5px; line-height: 1.5; }
.report-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); }
.report-foot > p { margin: 0 auto 0 0; color: var(--muted); font-size: 12.5px; }
.report-foot > div { display: flex; gap: 8px; }
.report-dialog button:disabled { opacity: .45; cursor: default; }

/* ───────────── Hints, empty and loading ───────────── */
/* Hover hints: the action and its key, after a short delay so passing over a
   button doesn't flash one. */
[data-tip]::after { position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 10; border-radius: 7px; background: var(--ink); padding: 6px 9px; color: #f2f5f1; font: 600 12px/1.2 var(--sans); white-space: nowrap; content: attr(data-tip) "   " attr(data-key); opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .12s, transform .12s; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
[data-tip-below]::after, .card-skip[data-tip]::after { top: calc(100% + 8px); right: 0; bottom: auto; left: auto; transform: translateY(-4px); }
[data-tip-below]:hover::after, [data-tip-below]:focus-visible::after, .card-skip[data-tip]:hover::after, .card-skip[data-tip]:focus-visible::after { transform: none; }
.empty { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 220px; padding: 32px; color: var(--muted); text-align: center; }
.empty h2 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.empty p { margin: 0; max-width: 36ch; font-size: 13.5px; }
.state { padding: 55px 20px; text-align: center; }
.state h1 { margin: 7px 0; font-size: 18px; }
.state p { margin: 0; color: var(--muted); }
.state .button { margin-top: 16px; }
.loading i { width: 20px; height: 20px; display: inline-block; border: 2px solid var(--line-strong); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* Discover content follows the shared desktop frame. */
@media (min-width: 761px) {
 .opportunities-app { --gutter: 12px; }
 .opportunities-app .app-topbar { padding-right: var(--gutter); }
 .discover-controls-pane { padding-right: var(--gutter); }
 .opportunities-app .main, .discover-page { background: var(--ground); }
 .discover-grid { width: 100%; max-width: var(--discover-max); }
 .detail { padding-right: var(--gutter); }
 .detail-inner { width: 100%; max-width: none; box-shadow: 0 1px 2px rgb(20 24 22 / 3%), 0 6px 20px rgb(20 24 22 / 2%); }
 .detail-facts { max-width: 960px; }
 .opportunity-main h3 { text-wrap: balance; }
 .tags { flex-wrap: nowrap; }
 .tags > .tag { flex: none; }
 .tags > [hidden] { display: none; }
}

/* Narrower desktops, as in the mockup. */
@media (max-width: 1199px) {
 :root { --gutter: 24px; }
 .discover-filterbar { gap: 20px; }
 .detail-inner { padding: 22px 28px 32px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
 .detail-inner { padding-right: 20px; padding-left: 20px; }
 .detail-flag span { display: none; }
 .detail-fact { grid-template-columns: 90px minmax(0, 1fr); }
}
@media (min-width: 761px) and (max-width: 850px) {
 .detail-fact { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@media (max-width: 760px) {
 .opportunities-app { --mobile-nav-height: 64px; padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px)); }
 .opportunities-app .app-topbar { min-height: 0; padding: 0 12px 8px 0; row-gap: 0; }
 .opportunities-app .app-topbar .brand-cell { height: 48px; padding-left: 12px; }
 .opportunities-app .topbar-search { flex-basis: calc(100% - 12px); height: 40px; margin-left: 12px; }
 .opportunities-app .topbar-search input { height: 38px; font-size: 16px; }
 .opportunities-app .app-shell > .sidebar { position: fixed; inset: auto 0 0; z-index: 20; height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px)); padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px)); }
 .opportunities-app .app-shell .side-nav a { min-height: 52px; gap: 2px; padding: 6px 0; }
 .opportunities-app:has(.view > .loading) { display: flex; flex-direction: column; min-height: 100dvh; }
 .opportunities-app:has(.view > .loading) .app-topbar { flex: none; }
 .opportunities-app:has(.view > .loading) .app-shell { flex: 1; }
 .main:has(.view > .loading) { display: grid; flex: 1; }
 .opportunities-app .app-shell { height: auto; min-height: 0; }
 .view, .discover-page { height: auto; }
 .discover-controls-pane { min-width: 0; flex-wrap: wrap; height: auto; padding: 0 16px 10px; row-gap: 10px; }
 .discover-filterbar { flex: 1 1 100%; min-width: 0; height: 44px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
 .discover-filterbar::-webkit-scrollbar { display: none; }
 .discover-filterbar .filter { flex: none; }
 .list-tools { margin-left: 0; flex-wrap: wrap; }
 .discover-grid { flex-direction: column; }
 .opportunity-list { width: auto; overflow: visible; border-right: 0; }
 .opportunity-main h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
 .detail { overflow: visible; border-top: 1px solid #E7E9E6; }
 .detail-inner { padding: 24px 16px 40px; }
 .empty-detail-feedback { margin-right: 16px; margin-left: 16px; }
 .detail-fact { grid-template-columns: 110px minmax(0, 1fr); }
 .detail > .section-kicker, .detail > h2, .detail > p { margin-left: 16px; margin-right: 16px; }
 .flash { left: 50%; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 16px); max-width: calc(100vw - 24px); gap: 20px; padding: 6px 14px; }
 .report-dialog { max-height: calc(100dvh - 24px); }
 .report-dialog form { max-height: calc(100dvh - 26px); }
 .report-head { padding: 22px 20px 0; }
 .report-body { padding: 16px 20px; }
 .report-check { grid-template-columns: 14px 67px minmax(0, 1fr); min-height: 44px; }
 .report-foot { padding: 14px 20px 18px; gap: 14px; }
}
@media (max-width: 480px) {
 .detail-head { row-gap: 0; }
 .detail-line { display: contents; }
 .detail-company-row { grid-column: 2; min-height: 44px; }
 .detail-head h2 { grid-column: 1 / -1; margin-top: 14px; line-height: 1.28; }
 .detail-head .detail-metadata { grid-column: 1 / -1; margin-top: 10px; }
}
@media (hover: none) {
 .row-actions { opacity: 1; pointer-events: auto; }
 .row-meta { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
