/* up-app visual system. Palette and type deliberately match tdy-tech-signals
   (a sibling Today's product) — internal tools in the same suite read as one
   family, not as unrelated one-offs. Self-hosted font, same reasoning as
   signals: an external font CDN is a dependency that fails silently (the
   page stays legible but looks different, and the gap only shows on a
   screen nobody reports). 79K total, once. */

@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green: #1c4a3a;
  --green-bright: #2d6b52;
  --green-pale: #eef4f0;
  --paper: #f7faf8;
  --card: #ffffff;
  --ink: #14241d;
  --ink-soft: #5d6b64;
  --line: #e2e9e4;
  --amber: #a8560f;
  --danger: #dc2626;
  --danger-pale: #fee2e2;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI Variable Text",
          "Segoe UI", Inter, "Noto Sans", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

/* --- generic element baseline ---------------------------------------------
   Most pages in this app don't have a bespoke layout yet (they're plain
   forms/tables built before this stylesheet existed) — these rules give
   every one of them a coherent floor without rewriting each template.
   Deliberately BARE element selectors (lowest possible specificity, no
   :not()/attribute chains) so every class-based rule below wins the
   cascade unconditionally, regardless of source order — seen a real
   specificity fight here once already (input:not([type=hidden]):not(...)
   was, by CSS's own rules, MORE specific than .field input, not less). */
label { display: block; margin: 0 0 .85rem; font-size: .88rem; color: var(--ink-soft); }
input, select, textarea {
  display: block; margin-top: .3rem; width: 100%; max-width: 26rem;
  padding: .65rem .8rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; color: var(--ink);
}
input[type=checkbox], input[type=radio] {
  display: inline-block; width: auto; max-width: none; padding: 0; border: 0; background: none;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
button {
  padding: .7rem 1.2rem; border: 0; border-radius: 9px; background: var(--green);
  color: #fff; font-weight: 600; font-size: .92rem; cursor: pointer; font-family: inherit;
}
button:hover { background: var(--green-bright); }
table {
  width: 100%; border-collapse: collapse; font-size: .9rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
th {
  text-align: left; font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .04em; padding: .6rem .85rem;
  border-bottom: 1px solid var(--line); background: #fbfdfc;
}
td { padding: .6rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fbfdfc; }
.page-title { margin: 1.75rem 0 .3rem; font-size: 1.5rem; }
.page-subtitle { color: var(--ink-soft); margin: 0 0 1.25rem; }
.section-title { margin: 2.25rem 0 .5rem; font-size: 1.05rem; }
/* A known section with zero opens is the signal M asked for explicitly ("what does nobody
   open") — muted, not hidden, so it reads as "real zero", not "missing row". */
.usage-zero td { color: var(--ink-soft); }
main.wrap { padding-top: .25rem; padding-bottom: 3rem; }

body {
  margin: 0;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background:
    radial-gradient(60rem 30rem at 12% -8%, #e4f0e9 0%, transparent 60%),
    radial-gradient(50rem 26rem at 92% 0%, #e8f1ec 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--green); }
h1, h2, h3 { letter-spacing: -.01em; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* --- authenticated shell header --- */
.shell-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand {
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .02em; color: var(--green); text-decoration: none;
}
.brand span { color: var(--ink-soft); font-weight: 400; }
.shell-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; font-size: .9rem; }
.shell-nav a { color: var(--ink-soft); text-decoration: none; }
.shell-nav a:hover { color: var(--green); }
.shell-nav form { margin: 0; }

/* --- buttons, inputs, cards: the primitives every page below reuses --- */
.button {
  padding: .7rem 1.2rem; border: 0; border-radius: 9px; background: var(--green);
  color: #fff; font-weight: 600; font-size: .92rem; cursor: pointer;
  font-family: inherit; text-decoration: none; display: inline-flex; align-items: center;
}
.button:hover { background: var(--green-bright); }
.button-quiet {
  background: none; color: var(--ink-soft); border: 1px solid var(--line);
}
.button-quiet:hover { background: var(--card); color: var(--ink); border-color: var(--ink-soft); }

.field { display: flex; flex-direction: column; gap: .35rem; text-align: left; margin-bottom: 1rem; }
.field label { font-size: .82rem; color: var(--ink-soft); }
.field input {
  padding: .7rem .85rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc;
  color: var(--ink);
}
.field input:focus { outline: 2px solid var(--green); outline-offset: 1px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20,36,29,.04), 0 12px 32px -12px rgba(20,36,29,.10);
}

.error-banner, .error {
  background: var(--danger-pale); border: 1px solid #fecaca; color: #991b1b;
  border-radius: 9px; padding: .6rem .85rem; font-size: .88rem; margin: 0 0 1rem;
}

/* --- login --- */
.login-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2rem 1.25rem;
}
.login-mark { text-align: center; margin-bottom: 1.75rem; }
.login-mark .name {
  font-weight: 600; font-size: 1.05rem; color: var(--green); letter-spacing: .02em;
}
.login-mark .tagline { color: var(--ink-soft); font-size: .88rem; margin-top: .3rem; }
.login-card { width: 100%; max-width: 340px; padding: 1.75rem; }
.login-card .button { justify-content: center; margin-top: .25rem; }
.login-divider {
  display: flex; align-items: center; gap: .75rem; color: var(--ink-soft);
  font-size: .78rem; margin: 1.1rem 0;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* --- dashboard --- */
.dashboard-hero { padding: 2rem 0 .5rem; }
.dashboard-hero h1 { font-size: 1.6rem; margin: 0 0 .3rem; }
.dashboard-hero p { color: var(--ink-soft); margin: 0; }
.dashboard-links {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem; margin: 1.75rem 0;
}
.dashboard-links a {
  display: block; padding: 1rem 1.1rem; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .95rem;
}
.dashboard-links a:hover { border-color: var(--green); }
.dashboard-links a .desc {
  display: block; font-weight: 400; color: var(--ink-soft); font-size: .82rem; margin-top: .25rem;
}

/* --- impersonation banner (up_app/web/templates/base.html) --- */
.impersonation-banner {
  background: var(--danger-pale); border-bottom: 2px solid var(--danger);
  padding: .6rem 1.25rem; font-size: .88rem; color: #7f1d1d;
  display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap;
}
.impersonation-banner form { margin: 0; }
.impersonation-banner .button-quiet {
  padding: .3rem .7rem; font-size: .8rem; border-color: #fca5a5; color: #7f1d1d;
}

/* --- filter_rule flags in the Job Inbox (jobs.html) --- */
.flag-badge {
  display: inline-block; padding: .05rem .45rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  background: var(--amber); color: #fff; white-space: nowrap;
}

/* --- field hints under inputs (filter_rule_form.html) --- */
.hint {
  display: block; color: var(--ink-soft); font-size: .8rem; line-height: 1.5;
  margin-top: .25rem;
}
.hint code { font-size: .78rem; }

@media (max-width: 640px) {
  .shell-header { padding: .9rem 0; }
  .dashboard-links { grid-template-columns: 1fr 1fr; }
  /* Simple horizontal scroll on the table itself, not a card-ification —
     that would need a data-label on every <td> in every existing template,
     which nothing here provides yet; an unlabelled stacked row would be
     harder to read than a table that just scrolls. */
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Long unbroken text (a pasted URL, a reply body) wraps inside the page instead of widening it
   (UI/UX review 29 oct 2026, 3.1). */
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The funnel tables have one column per state; they scroll inside their own box instead of widening
   the page (UI/UX review 29 oct 2026, 3.3). */
.table-scroll { overflow-x: auto; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Navigation state and the opportunity breadcrumb/section nav (UI/UX audit 28 oct 2026) */
.shell-nav a[aria-current="page"] { color: var(--green); font-weight: 600; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin: .75rem 0 .25rem; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb [aria-current="page"] { color: var(--ink); }
/* UI/UX review 31 Oct 2026, R3: a title with no spaces (a pasted URL) made the page 2400-5300px wide.
   Headings and the breadcrumb break anywhere; every table sits in a .table-scroll box, so a cell that cannot
   break makes the table scroll inside its box instead of widening the page. Cells are NOT given "anywhere":
   it lowers their minimum width to one letter and one long cell squeezes the rest ("FIXE/D", "Ap/pro/ve"). */
h1, h2, h3, .breadcrumb { overflow-wrap: anywhere; }
.opp-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: .25rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line, #ddd); }
.opp-nav a { text-decoration: none; color: var(--ink-soft); }
.opp-nav a[aria-current="page"] { color: var(--green); font-weight: 600; border-bottom: 2px solid var(--green); }

.job-banner { margin: 0 0 1rem; padding: .6rem .8rem; border-left: 4px solid #888; background: rgba(128,128,128,.12); }
.job-banner-failed, .job-banner-stalled { border-left-color: #c0392b; }
.job-banner-running, .job-banner-queued, .job-banner-retrying { border-left-color: #2980b9; }
.apply-steps { margin: 0 0 1rem; }
.copy-btn { margin: 0 .5rem .25rem 0; }

/* Job Inbox bulk feedback (SPEC-273-val1) */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0; }
.job-banner-done { border-left-color: #27ae60; }
/* Job Inbox filters: a grid instead of one tall column (twelve filters since SPEC-273-val1) */
.filter-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem 1rem; align-items: end; margin-bottom: 1rem; }
.filter-form .filter-actions { display: flex; gap: .75rem; align-items: center; }
/* The eight less-used filters fold away; the row above keeps the four everyday ones
   (UI review 29 oct 2026, M 473). */
.filter-more { grid-column: 1 / -1; }
.filter-more summary { cursor: pointer; font-size: .9rem; color: var(--ink-soft); }
.filter-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem 1rem; align-items: end; margin-top: .5rem; }
.band-reason { cursor: help; border-bottom: 1px dotted var(--ink-soft); }

/* Today sections and Pipeline kanban (SPEC-wave2) */
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.today-section { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.today-section h2 { font-size: 1rem; margin: 0 0 8px; }
/* A job title with no spaces ran out of its card (grid items default to min-width:auto). */
.today-section { min-width: 0; }
.today-list a { overflow-wrap: anywhere; }
.kanban-col h2 { font-size: .8rem; margin: -10px -10px 10px; padding: 8px 10px; background: var(--green-pale);
  border-bottom: 1px solid var(--line); border-radius: 7px 7px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.count { font-weight: normal; opacity: .7; }
.kanban-col .count { opacity: 1; font-weight: 600; min-width: 1.6em; text-align: center; padding: 0 6px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li { padding: 4px 0; }
.meta { opacity: .7; font-size: .85rem; margin: 2px 0 0; }
.meta.overdue { color: var(--danger); opacity: 1; font-weight: 600; }
.today-empty, .today-more, .kanban-more { opacity: .7; font-size: .9rem; margin: 4px 0 0; }
/* nine columns do not fit the 920px page wrap: break out to the viewport, scroll if still short */
.kanban { display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px;
  width: min(1500px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%); }
.kanban-col { flex: 1 0 120px; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.kanban-col { border-top: 4px solid var(--line); }
.kanban-col[data-stage="FOUND"] { border-top-color: var(--ink-soft); }
.kanban-col[data-stage="APPLIED"], .kanban-col[data-stage="REPLIED"], .kanban-col[data-stage="CONVERSATION_CALL"] { border-top-color: var(--green-bright); }
.kanban-col[data-stage="AUDIT_PROPOSED"], .kanban-col[data-stage="AUDIT_PRESENTED"], .kanban-col[data-stage="NEGOTIATION"] { border-top-color: var(--amber); }
.kanban-col[data-stage="WON"] { border-top-color: var(--green); }
.kanban-col[data-stage="LOST"] { border-top-color: var(--danger); }
.kanban-card { border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-bottom: 8px; }
.kanban-card p { margin: 2px 0 0; }

/* Job Inbox pagination bar (SPEC-paginare-321): above and below the table */
.page-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 1rem 0; }
.page-bar .page-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.page-bar a, .page-bar .disabled { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.page-bar .disabled { color: var(--ink-soft); background: transparent; }
.page-bar .page-of, .page-bar .page-range { color: var(--ink-soft); }
.empty-state { color: var(--ink-soft); margin: 1.5rem 0; }
@media (max-width: 640px) {
  .page-bar { flex-direction: column; align-items: stretch; }
  .page-bar .page-links { justify-content: space-between; flex-wrap: nowrap; }
  .page-bar a, .page-bar .disabled { min-height: 2.75rem; }
}

/* --- Searches list (M 483): one compact actions group, a pill for on/off, a readable query --- */
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; width: 15rem; }
.row-actions form { margin: 0; }
.row-actions .button-quiet { padding: .3rem .7rem; }
.query-summary { min-width: 14rem; color: var(--ink-soft); }
.searches-table .sub { color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }
.searches-table .sub-bad { color: var(--danger); font-weight: 600; }
.searches-table td:first-child { min-width: 8.5rem; }
.searches-table th { white-space: nowrap; }
.pill { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .78rem;
  font-weight: 600; border: 1px solid var(--line); }
.pill-on { background: var(--green-pale); color: var(--green); border-color: var(--green-bright); }
.pill-off { background: var(--card); color: var(--ink-soft); }

/* Quick-feedback choices (Great fit / Maybe / Skip) sit on one row instead of three stacked lines. */
.choice-row { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0 0 .85rem; }
.choice-row label { margin: 0; }

/* Job Inbox (M, 30 Oct 2026): the bulk actions stay on screen while the list scrolls (they were
   only reachable in the footer), and the title gets the room the empty columns were taking. */
.jobs-scroll + .bulk-bar { position: sticky; bottom: 0; z-index: 5; margin: 0; padding: .7rem .85rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
@media (min-width: 900px) { .jobs-table td:nth-child(2) { min-width: 11rem; width: 24%; } }
.jobs-table th, .jobs-table td { padding-left: .35rem; padding-right: .35rem; }

/* Evidence Library (M review, 30 Oct 2026): the visibility select was cut to "INTERN" by the global
   100% width, and the two buttons stacked at full size. */
.evidence-table select { width: auto; min-width: 7.5rem; margin-top: 0; padding: .45rem .6rem; font-size: .88rem; }
/* UI/UX review 31 Oct 2026, R4: the inline #090 was 3.78:1 on white; the + / - signs carry the meaning too. */
/* UI/UX review 31 Oct 2026, R4: keyboard users had to Tab through the whole menu on every page. */
.skip-link { position: absolute; left: -9999px; top: .5rem; }
.skip-link:focus { left: 1rem; z-index: 100; background: var(--green); color: #fff; padding: .5rem .85rem; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; }
.diff-add { color: #0b6b2e; }
.diff-del { color: #990000; }
.evidence-table td form button { padding: .45rem .85rem; }

/* Pipeline (M, 30 Oct 2026): "stretched vertically, one row per job". Titles stop at three lines,
   the meta is one small paragraph with the Upwork link inline, cards sit closer together. */
.kanban-card { padding: 6px 8px; margin-bottom: 6px; }
.kanban-card .kanban-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  font-size: .85rem; line-height: 1.25; }
.kanban-card .meta { font-size: .72rem; line-height: 1.3; margin-top: 3px; }
.evidence-table td:first-child { min-width: 9rem; }
/* UI/UX review 31 Oct 2026, R2: the nine-column table was 47px wider than the page at 1440 and, on a
   phone, Approve/Reject sat past the right edge with nothing to say so. The table scrolls inside its
   own box and the action column stays in view. The table's own overflow:hidden would make it the
   sticky container (and it never scrolls), so it is lifted here and the wrapper carries the corners. */
.evidence-scroll { border-radius: 12px; }
.evidence-table th, .evidence-table td { padding-left: .6rem; padding-right: .6rem; }
.evidence-table { overflow: visible; }
.evidence-table th:last-child, .evidence-table td:last-child { position: sticky; right: 0; background: var(--card);
  box-shadow: -6px 0 8px -6px rgba(0,0,0,.14); }

/* Job Inbox: quick views and the per-page control (SPEC-jobs-prefiltre.md §1, §2) */
.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.presets a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; }
.presets a:hover { border-color: var(--green-bright); }
.presets a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.page-bar .page-size { color: var(--ink-soft); display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.page-bar .page-size a.per-page { min-height: 2rem; padding: 0 .5rem; }
.page-bar .page-size .per-page[aria-current="true"] { font-weight: 700; color: var(--ink); padding: 0 .5rem; }
@media (max-width: 640px) {
  .presets a { min-height: 2.75rem; }
  .page-bar .page-size a.per-page { min-height: 2.75rem; }
}

/* Generate proposals (SPEC-jobs-prefiltre.md §3): spends AI money, so it sits apart from the free marks */
.bulk-bar .bulk-sep { align-self: stretch; width: 1px; margin: 0 .4rem; background: currentColor; opacity: .25; }
.bulk-bar .bulk-generate { font-weight: 600; }
.proposal-list { margin: .3rem 0 1rem; padding-left: 1.2rem; }
.proposal-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }

/* Opportunity tabs, score table, evidence and activity (SPEC-scor-taburi.md). Seven tabs do not
   fit a phone: the bar scrolls sideways instead of wrapping onto a second row. */
@media (max-width: 640px) {
  .opp-nav { flex-wrap: nowrap; overflow-x: auto; gap: .9rem; white-space: nowrap; }
  .opp-nav a { flex: 0 0 auto; padding: .4rem 0; }
}
.score-table { width: 100%; }
.score-table th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.score-table td.why { white-space: normal; min-width: 18rem; overflow-wrap: anywhere; }
.score-table ul.factors { margin: 0; padding-left: 1rem; }
.score-table .effect { font-variant-numeric: tabular-nums; font-weight: 600; }
.score-table .effect.negative { color: #c0392b; }
ul.evidence-cards, ul.activity { list-style: none; margin: 0; padding: 0; }
.evidence-card { border: 1px solid var(--line, #ddd); border-radius: 6px; padding: .6rem .8rem; margin: 0 0 .75rem; overflow-wrap: anywhere; }
.evidence-card h2 { font-size: 1.05rem; margin: 0 0 .25rem; }
.evidence-card ul { margin: .25rem 0 0; padding-left: 1rem; }
.activity-entry { padding: .45rem 0; border-bottom: 1px solid var(--line, #ddd); overflow-wrap: anywhere; }
.activity-entry time { color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: .4rem; }
/* On a phone the score table stacks: the dimension is a heading, each value carries its label, and
   the reasons (the point of the table) are not hidden behind a sideways scroll. */
@media (max-width: 640px) {
  .score-table, .score-table tbody, .score-table tr, .score-table th, .score-table td { display: block; white-space: normal; }
  .score-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .score-table tr { padding: .5rem .6rem; border-bottom: 1px solid var(--line, #ddd); }
  .score-table td { padding: .1rem 0; border: 0; }
  .score-table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-soft); font-size: .8rem; }
  .score-table td.why { min-width: 0; }
  .score-table td.why::before { display: block; }
}
