:root {
  --bg: #0a0c0f;
  --surface: #111418;
  --surface-2: #171b21;
  --surface-3: #1e232b;
  --border: #242a33;
  --border-strong: #323a46;
  --text: #e7e9ec;
  --text-2: #b4bac4;
  --muted: #7d8592;
  --accent: #5ec8b8;
  --accent-ink: #062521;
  --accent-soft: rgba(94, 200, 184, .12);
  --entry: #4ccf8f;
  --mid: #e9b44c;
  --senior: #9b8cf2;
  --danger: #ef6b6b;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --header-h: 56px;
  --nav-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.num { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------------- header */
header.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px;
  background: rgba(10, 12, 15, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand .mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-size: 12px; font-weight: 800; }
nav.tabs { display: flex; gap: 2px; }
nav.tabs button {
  background: none; border: 0; padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 7px;
}
nav.tabs button:hover { background: var(--surface-2); color: var(--text); }
nav.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
nav.tabs svg { width: 16px; height: 16px; }
.top .meta { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------------- layout */
main { min-height: calc(100vh - var(--header-h)); }
.view { display: none; }
.view.active { display: block; }
.jobs-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - var(--header-h)); }

/* ---------------- filters */
aside.filters {
  border-right: 1px solid var(--border);
  padding: 18px 18px 40px;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  scrollbar-width: thin;
}
.fgroup { margin-bottom: 20px; }
.fgroup h4 {
  margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between;
}
.fgroup h4 button { background: none; border: 0; color: var(--muted); font-size: 11px; cursor: pointer; text-transform: none; letter-spacing: 0; padding: 0; }
.fgroup h4 button:hover { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(94, 200, 184, .5); color: var(--text); }
.chip .ct { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.checklist { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; scrollbar-width: thin; }
.checklist label {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-2); font-size: 13px;
}
.checklist label:hover { background: var(--surface-2); color: var(--text); }
.checklist label .ct { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; }
input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.search {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 10px 8px 32px; font: inherit; outline: none;
}
.search:focus { border-color: var(--accent); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 8px; font: inherit; outline: none;
}
.toggle-row { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; padding: 3px 0; cursor: pointer; }

/* ---------------- list */
section.list-pane { padding: 18px 24px 60px; min-width: 0; }
.list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.list-head .count { font-size: 15px; font-weight: 600; }
.list-head .count .muted { font-weight: 400; }
.list-head .spacer { flex: 1; }
.list-head .mobile-filter-btn { display: none; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat .k { font-size: 11.5px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 600; margin-top: 2px; }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

.job {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 8px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.job:hover { border-color: var(--border-strong); background: var(--surface-2); }
.job.applied { opacity: .55; }
.job .title { font-weight: 600; font-size: 14.5px; letter-spacing: -.005em; }
.job .sub { color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.job .sub .sep { color: var(--border-strong); }
.job .sum { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin-top: 2px; }
.job .tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.job .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.job .salary { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.job .salary.none { color: var(--muted); font-family: var(--font); font-size: 12px; }
.actions { display: flex; gap: 6px; align-items: center; }

.tag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-2); background: var(--surface-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
}
.tag.level-entry { color: var(--entry); border-color: rgba(76, 207, 143, .35); background: rgba(76, 207, 143, .08); }
.tag.level-mid { color: var(--mid); border-color: rgba(233, 180, 76, .35); background: rgba(233, 180, 76, .08); }
.tag.level-senior { color: var(--senior); border-color: rgba(155, 140, 242, .35); background: rgba(155, 140, 242, .08); }
.tag.reach { color: #f0a07a; border-color: rgba(240, 160, 122, .35); background: rgba(240, 160, 122, .07); }
.tag.visa { color: var(--accent); border-color: rgba(94, 200, 184, .35); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.icon { padding: 6px; width: 32px; height: 32px; }
.btn.icon svg { width: 16px; height: 16px; }
.btn.on { color: var(--accent); border-color: rgba(94, 200, 184, .5); }
.btn svg { width: 14px; height: 14px; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------------- drawer */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .15s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); z-index: 70;
  background: var(--surface); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer .dh { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.drawer .dh h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; line-height: 1.3; padding-right: 36px; }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.drawer .db { padding: 18px 22px 40px; overflow-y: auto; flex: 1; }
.drawer .dfoot { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 13px; margin: 0 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.drawer h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }
.drawer ul.plain { margin: 0; padding-left: 18px; color: var(--text-2); }
.drawer ul.plain li { margin: 3px 0; }
.desc { white-space: pre-wrap; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }

/* ---------------- map */
.map-layout { display: grid; grid-template-columns: 280px 1fr 340px; height: calc(100vh - var(--header-h)); }
.map-layout aside.filters { position: static; height: auto; }
#map { height: 100%; background: #0d1014; position: relative; z-index: 0; isolation: isolate; } /* keep Leaflet's z-indexes (400-1000) under the drawer */
.map-side { border-left: 1px solid var(--border); overflow-y: auto; padding: 16px; }
.map-side h3 { margin: 0 0 4px; font-size: 15px; }
.mini-job { padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.mini-job:hover .t { color: var(--accent); }
.mini-job .t { font-weight: 550; font-size: 13.5px; }
.mini-job .s { color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.legend { position: absolute; z-index: 500; left: 12px; bottom: 12px; background: rgba(17, 20, 24, .92); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; color: var(--text-2); }
.legend div { display: flex; align-items: center; gap: 7px; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; }
.leaflet-container { font-family: var(--font); }
.leaflet-tooltip.city-tip { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; font-size: 12px; }
.leaflet-tooltip.city-tip::before { display: none; }
.leaflet-control-zoom a { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-control-attribution { background: rgba(10, 12, 15, .7) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }

/* ---------------- profile / prose pages */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
.page h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
.page h2 { font-size: 16px; margin: 34px 0 12px; letter-spacing: -.01em; }
.page .lede { color: var(--text-2); max-width: 760px; font-size: 15px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 54px; align-items: center; gap: 12px; font-size: 13px; }
.bar .lbl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 4px; }
.bar .val { text-align: right; color: var(--muted); font-family: var(--mono); font-size: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
table.tbl td:first-child { color: var(--text); }
.track-card h3 { margin: 0 0 6px; font-size: 15px; }
.track-card p { margin: 0 0 10px; color: var(--text-2); font-size: 13.5px; }
.track-card h4 { margin: 12px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.track-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.project { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; font-size: 13.5px; }
.project b { color: var(--text); font-weight: 600; }
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline .step { position: relative; padding: 0 0 18px 20px; }
.timeline .step::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .phase { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.timeline .focus { font-weight: 600; margin: 2px 0 4px; }
.timeline ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.notice { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius); padding: 14px 16px; color: var(--text-2); }
.notice code, .page code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 4px; color: var(--text); }
.sev { font-size: 11px; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sev.critical { color: var(--danger); background: rgba(239, 107, 107, .1); }
.sev.important { color: var(--mid); background: rgba(233, 180, 76, .1); }
.sev.nice { color: var(--muted); background: var(--surface-3); }
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.linkcard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: var(--text); }
.linkcard:hover { border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.linkcard .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------------- mobile */
.bottom-nav { display: none; }
@media (max-width: 1100px) {
  .map-layout { grid-template-columns: 1fr 320px; }
  .map-layout aside.filters { display: none; }
}
@media (max-width: 860px) {
  :root { --nav-h: 62px; --header-h: 52px; }
  header.top { padding: 0 16px; }
  header.top nav.tabs { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(17, 20, 24, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
  }
  .bottom-nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); cursor: pointer; }
  .bottom-nav button svg { width: 20px; height: 20px; }
  .bottom-nav button[aria-selected="true"] { color: var(--accent); }
  main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }

  .jobs-layout { grid-template-columns: 1fr; }
  aside.filters {
    position: fixed; inset: auto 0 0 0; top: auto; height: 82vh; z-index: 75;
    background: var(--surface); border: 0; border-top: 1px solid var(--border-strong);
    border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform .2s ease;
    padding-bottom: 90px;
  }
  aside.filters.open { transform: none; }
  .sheet-head { display: flex !important; }
  section.list-pane { padding: 14px 16px 30px; }
  .list-head .mobile-filter-btn { display: inline-flex; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job { grid-template-columns: 1fr; padding: 13px 14px; }
  .job .right { flex-direction: row; align-items: center; justify-content: space-between; grid-row: auto; }
  .map-layout { grid-template-columns: 1fr; grid-template-rows: 58vh auto; height: auto; }
  #map { height: 58vh; }
  .map-side { border-left: 0; border-top: 1px solid var(--border); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: minmax(110px, 44%) 1fr 44px; }
  .page { padding: 20px 16px 40px; }
  .kv { grid-template-columns: 110px 1fr; }
  .drawer { width: 100vw; }
  .top .meta { font-size: 11px; }
  table.tbl.stack thead { display: none; }
  table.tbl.stack tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  table.tbl.stack td { display: block; border: 0; padding: 3px 0; }
}
.sheet-head { display: none; align-items: center; justify-content: space-between; margin-bottom: 14px; position: sticky; top: -18px; background: var(--surface); padding: 12px 0 8px; z-index: 2; }
.sheet-head b { font-size: 16px; }
@media (max-width: 1100px) { #filters-slot-map { display: none; } }
.sheet-done { display: none; }
@media (max-width: 860px) {
  .sheet-done { display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; padding: 12px; font-size: 14px; z-index: 3; }
  .job .sub .sep { display: none; }
  .job .sub { flex-direction: column; gap: 0; }
}
.plainlist { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.plainlist li { margin: 4px 0; }
h3.ch { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tag.src { color: var(--muted); background: transparent; }
.prose p { margin: 0 0 10px; } .prose ol { margin: 0 0 10px; font-size: 14.5px; } .prose b { color: var(--text); }

.tag.offsec { color: #f0907a; border-color: rgba(240,144,122,.35); background: rgba(240,144,122,.08); }
.co-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: pointer; }
.co-link:hover { color: var(--accent, #4ccf8f); border-bottom-color: currentColor; }
.co-hint { font-size: 12px; opacity: .7; }
a.job-link { color: inherit; text-decoration: none; }
a.job-link:hover { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.tag.degree { color: #c9a7f5; border-color: rgba(201,167,245,.35); background: rgba(201,167,245,.08); }
/* tables never push past their card: long words wrap; anything still too wide scrolls inside the card */
.card:has(> table.tbl) { overflow-x: auto; }
table.tbl td { overflow-wrap: break-word; }
table.tbl.stack td:first-child { min-width: 150px; }
.prose p { margin: 0 0 10px; }
.prose p:last-child { margin-bottom: 0; }

/* search suggestions: companies first */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface-2, #161a20); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 4px; }
.sug { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.sug b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug .sug-t { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.sug.on, .sug:hover { background: rgba(94, 200, 184, .12); }
.sug-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sug:first-child .sug-k { color: var(--accent); }
/* company page header */
.co-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--surface); }
.co-banner .co-name { font-size: 18px; font-weight: 650; color: var(--text); margin-bottom: 2px; }
.co-banner .co-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag.type-internship { color: #7fc4f5; border-color: rgba(127,196,245,.35); background: rgba(127,196,245,.08); }
.tag.type-fellowship { color: #f5d17f; border-color: rgba(245,209,127,.35); background: rgba(245,209,127,.08); }
.tag.type-part-time { color: #f59fd0; border-color: rgba(245,159,208,.35); background: rgba(245,159,208,.08); }
aside.filters[hidden] { display: none !important; }

/* keyword clouds */
.wcloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; padding: 8px 4px 4px; line-height: 1.15; }
.wcloud .w { position: relative; font-weight: 600; letter-spacing: -.01em; cursor: default; white-space: nowrap; border-radius: 4px; outline: none; }
.wcloud .w:hover, .wcloud .w:focus-visible { color: var(--text) !important; }
.wcloud .w:hover::after, .wcloud .w:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 5;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 500; letter-spacing: 0; white-space: nowrap; pointer-events: none; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 500; padding: 4px 10px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.seg button[aria-pressed="true"] { background: rgba(94, 200, 184, .14); color: var(--text); }
.minibar { height: 4px; width: 80px; background: var(--surface-3); border-radius: 2px; margin-bottom: 5px; }
.minibar span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.quote { color: var(--text-2); margin-bottom: 8px; font-size: 13px; }
.quote:last-child { margin-bottom: 0; }

/* signal playbooks */
details.pb { border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--surface); margin-bottom: 10px; }
details.pb > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
details.pb > summary::-webkit-details-marker { display: none; }
details.pb > summary::before { content: "›"; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .15s; }
details.pb[open] > summary::before { transform: rotate(90deg); }
.pb-title { font-weight: 650; color: var(--text); }
.pb-why { flex-basis: 100%; font-size: 13px; padding-left: 18px; }
.pb-body { padding: 0 16px 14px 34px; }
.pb-kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 6px 0; font-size: 13.5px; color: var(--text-2); }
.pb-kv .tag { margin: 0 4px 4px 0; }
.pb-projs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin: 8px 0; }
.pb-proj { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--surface-2); font-size: 13.5px; }
.pb-proj-h { display: flex; justify-content: space-between; gap: 8px; color: var(--text); }
.pb-proj .pb-kv { grid-template-columns: 90px 1fr; }
.pb-steps { margin: 0 0 6px; padding-left: 18px; color: var(--text-2); }
.pb-steps li { margin: 2px 0; }
.tag.pri-high { color: #8fe3d6; border-color: rgba(143,227,214,.4); }
.tag.pri-medium { color: var(--text-2); }
.tag.pri-low { color: var(--muted); }
@media (max-width: 860px) { .pb-kv, .pb-proj .pb-kv { grid-template-columns: 1fr; gap: 2px; } .pb-body { padding-left: 16px; } .pb-why { padding-left: 0; } }
