/* RIVISION MEDIA — Ops.
   White ground, black type, royal blue accent. Roboto throughout.
   Light is the DEFAULT (this is an admin surface); dark is the alternate.
   Structure and component names are inherited from LZ Team Ops so the
   outreach module could be copied across unchanged -- only the token
   VALUES differ, plus the gold->accent / brake->alert rename. */

:root {
  --ink:        #FFFFFF;   /* page ground */
  --carbon:     #FAFAFB;   /* recessed panels, table bodies */
  --panel:      #FFFFFF;
  --panel-2:    #F1F3F6;
  --rule:       #E3E7EC;
  --bone:       #0B0B0C;   /* primary type */
  --steel:      #5C6672;
  --graphite:   #6B7280;
  --alert:      #D92D20;
  --alert-glow: #B42318;
  --accent:     #1D4ED8;   /* royal blue */
  --accent-deep:#1E3A8A;
  --accent-hair:rgba(29,78,216,0.28);
  --warn:       #B54708;
  --signal:     #1D4ED8;
  --go:         #12805C;

  --f-display: "Roboto Condensed", "Roboto", Arial, sans-serif;
  --f-body:    "Roboto", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-italic:  "Roboto Condensed", "Roboto", Arial, sans-serif;

  /* Roboto's letterforms are wider than Antonio's, so LZ's 0.22em label
     tracking reads as broken-apart here. 0.14em keeps the same rhythm. */
  --tr-label: 0.14em;
  --tr-disp:  -0.01em;
  --on-accent:  #FFFFFF;
  --topbar-bg:  rgba(255,255,255,0.92);
  color-scheme: light;
}

html[data-theme="dark"] {
  --ink:        #0B0B0C;
  --carbon:     #101114;
  --panel:      #15171A;
  --panel-2:    #1B1E22;
  --rule:       #2A2E34;
  --bone:       #F5F6F8;
  --steel:      #9BA4AF;
  --graphite:   #7F8894;
  --alert:      #F97066;
  --alert-glow: #FDA29B;
  --accent:     #6E9BFF;
  --accent-deep:#3B6FE0;
  --accent-hair:rgba(110,155,255,0.34);
  --warn:       #F79009;
  --signal:     #6E9BFF;
  --go:         #47C79A;
  --on-accent:  #0B0B0C;
  --topbar-bg:  rgba(11,11,12,0.92);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--ink); }
body {
  font-family: var(--f-body);
  color: var(--bone);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(29,78,216,0.045), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(29,78,216,0.03), transparent 60%),
    var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.mono-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--steel);
}
.dim { color: var(--graphite); }

h1, h2, h3 { font-family: var(--f-display); letter-spacing: var(--tr-disp); font-weight: 700; }

a { color: inherit; }
/* ---------- LOGIN ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(400px, 100%);
  border: 1px solid var(--rule);
  background: linear-gradient(160deg, var(--panel) 0%, var(--carbon) 100%);
  padding: 44px 40px 32px;
  position: relative;
}
.login-panel::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 3px; background: var(--accent);
}
.login-mark h1 {
  font-size: 4.2rem; line-height: 0.92; margin: 10px 0 12px;
}
.login-mark { margin-bottom: 34px; display: flex; flex-direction: column; }
#login-form { display: flex; flex-direction: column; gap: 8px; }
#login-form label { margin-top: 10px; }
#login-form input {
  background: var(--ink);
  border: 1px solid var(--rule);
  color: var(--bone);
  font-family: var(--f-mono);
  font-size: 0.9rem;
  padding: 11px 12px;
  outline: none;
}
#login-form input:focus { border-color: var(--steel); }
.login-error { color: var(--alert-glow); font-family: var(--f-mono); font-size: 0.75rem; margin-top: 10px; }
.login-foot { margin-top: 28px; text-align: center; }

/* ---------- BUTTONS ---------- */
.btn {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn:hover { border-color: var(--steel); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; margin-top: 18px; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn[disabled], .btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
a.btn { text-decoration: none; display: inline-block; }
.rec-link { color: var(--accent); border-color: var(--accent-hair); }
.rec-link:hover { border-color: var(--accent); }
.btn-ghost { border-color: transparent; color: var(--steel); padding: 8px 10px; }
.btn-ghost:hover { color: var(--bone); border-color: var(--rule); }
#theme-toggle, #theme-toggle-login { font-size: 1.05rem; letter-spacing: 0; line-height: 1; }

/* ---------- TOPBAR ---------- */
.topbar {
  display: flex; align-items: center; gap: 32px;
  padding: 0 28px;
  height: 64px;
  border-bottom: 1px solid var(--rule);
  background: var(--topbar-bg);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.topbar-brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word { font-family: var(--f-display); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; }
.brand-sub { font-size: 0.55rem; color: var(--accent); }
/* min-width:0 lets the nav shrink rather than shoving the user chip off the right
   edge. Below 860px the nav stops fitting and becomes a
   hamburger panel instead (see RESPONSIVE) — a nav you have to scroll blind is
   not a nav you can use. */
.topnav { display: flex; gap: 4px; flex: 1; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }

/* Hamburger. Hidden on wide screens; the real nav is visible there. */
.nav-toggle {
  display: none; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--rule); color: var(--bone);
  padding: 8px 14px; cursor: pointer; font-family: var(--f-mono);
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-burger { position: relative; width: 16px; height: 2px; background: var(--accent); display: block; }
.nav-burger::before, .nav-burger::after {
  content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: var(--accent);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-burger::before { top: -5px; }
.nav-burger::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-burger::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-burger::after { transform: translateY(-5px) rotate(-45deg); }
.nav-current { color: var(--steel); }
.topnav a {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-decoration: none; color: var(--steel);
  display: flex; align-items: center; gap: 7px;
  padding: 0 16px; height: 100%; flex: 0 0 auto;
  border-bottom: 2px solid transparent;
}
.topnav a .nav-num { color: var(--graphite); font-size: 0.6rem; }
.topnav a:hover { color: var(--bone); }
.topnav a.active { color: var(--bone); border-bottom-color: var(--accent); }
.topnav a.active .nav-num { color: var(--accent); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user .who { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- LAYOUT ---------- */
/* Fluid: the app stretches with the window (was capped at 1280px until 2026-08-11).
   Side padding scales up gently on wide monitors so full-bleed doesn't feel cramped. */
.view { margin: 0 auto; padding: 40px clamp(28px, 3vw, 72px) 80px; }
.foot { text-align: center; padding: 24px; border-top: 1px solid var(--rule); }

.screen-head { margin-bottom: 34px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.screen-head h2 { font-size: 2.6rem; text-transform: uppercase; }
.screen-head .screen-num { font-family: var(--f-mono); color: var(--accent); font-size: 0.8rem; letter-spacing: var(--tr-label); }
.screen-head .screen-sub { color: var(--steel); font-size: 0.85rem; max-width: 520px; }

/* ---------- AVATARS ---------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 45%; /* headshots are pre-cropped square + face-aligned (Vision) */
  border: 2px solid var(--rule);
  background: var(--panel-2);
  display: block;
}
.avatar.sm { width: 26px; height: 26px; }
.avatar.md { width: 44px; height: 44px; }
.avatar.lg { width: 72px; height: 72px; }
.avatar.ok { border-color: var(--go); }
.avatar.wait { opacity: 0.35; }

/* ---------- TABLES / SCORECARD ---------- */
.table-scroll { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--rule); }
table.score { border-collapse: collapse; width: 100%; min-width: 1080px; background: var(--carbon); }
table.score th, table.score td {
  border-bottom: 1px solid var(--rule);
  padding: 9px 10px;
  font-size: 0.8rem;
  text-align: left;
  white-space: nowrap;
}
table.score thead th {
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--graphite);
  position: sticky; top: 0; background: var(--ink); z-index: 5;
}
table.score .group-row td {
  background: var(--panel);
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--steel);
  padding: 7px 10px;
}
table.score td.metric { white-space: normal; min-width: 210px; color: var(--bone); }
table.score td.goal { font-family: var(--f-mono); font-size: 0.7rem; color: var(--steel); }
table.score .star { color: var(--accent); margin-right: 6px; }
table.score td.wk { font-family: var(--f-mono); font-size: 0.74rem; text-align: center; color: var(--steel); min-width: 58px; }
table.score td.wk.now { background: rgba(214,195,157,0.06); }
table.score td.wk input {
  width: 62px; background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-mono); font-size: 0.74rem;
  padding: 5px 6px; text-align: center; outline: none;
}
table.score td.wk input:focus { border-color: var(--accent); }
.pill-green { color: var(--go); }
.pill-red { color: var(--alert-glow); }

/* scorecard toolbar + inline editing */
.score-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.score-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.metric-edit { display: flex; align-items: center; gap: 6px; min-width: 260px; }

/* week fill meter */
.fill-meter { display: flex; align-items: center; gap: 12px; }
.fm-track { width: 120px; height: 4px; background: var(--rule); overflow: hidden; }
.fm-bar { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }
.fm-count { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--bone); }

/* ---------- SCOREBOARD (my numbers + team board) ---------- */
.board-sect { margin-bottom: 30px; }
.board-title { display: block; margin-bottom: 12px; color: var(--accent); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.view-switch { display: flex; gap: 2px; margin-bottom: 12px; border: 1px solid var(--rule); }
.vs-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em;
  color: var(--steel); padding: 7px 12px; text-transform: uppercase;
}
.vs-btn:hover { color: var(--bone); }
.vs-btn.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.grid-pager { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }

/* personal gauge tiles */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.stat-tile {
  border: 1px solid var(--rule);
  background: linear-gradient(170deg, var(--panel) 0%, var(--carbon) 100%);
  padding: 16px 16px 14px;
  position: relative;
}
.stat-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--graphite); transition: background 0.2s; }
.stat-tile.led-go::before { background: var(--go); }
.stat-tile.led-brake::before { background: var(--alert-glow); }
.stat-tile.saved { box-shadow: 0 0 0 1px var(--go); }
.stat-tile.save-failed { box-shadow: 0 0 0 1px var(--alert-glow); }
.st-label { font-size: 0.82rem; color: var(--bone); margin-bottom: 10px; min-height: 2.2em; }
.st-star { margin-right: 5px; font-size: 0.75rem; }
.st-input {
  width: 100%; background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-display); font-size: 1.9rem;
  padding: 6px 12px; outline: none; letter-spacing: 0.02em;
}
.st-input::placeholder { color: var(--graphite); }
.st-input:focus { border-color: var(--accent); }
.st-meta {
  display: flex; align-items: center; gap: 14px; margin-top: 10px;
  font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.1em; color: var(--graphite);
}
.st-meta b { color: var(--steel); font-weight: 500; margin-left: 3px; }
.st-meta .spark { margin-left: auto; }

/* sparkline */
.spark { width: 60px; height: 18px; flex: none; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); }
.spark .spark-flat { stroke: var(--rule); stroke-width: 1.5; stroke-dasharray: 2 3; }

/* team board */
.team-board { border: 1px solid var(--rule); background: var(--carbon); }
.team-group {
  background: var(--panel); padding: 8px 14px;
  border-bottom: 1px solid var(--rule); color: var(--steel);
}
.team-group:not(:first-child) { border-top: 1px solid var(--rule); }
.team-row {
  display: grid; grid-template-columns: 14px 1fr 130px 110px 60px 110px;
  gap: 12px; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--rule);
  cursor: pointer; font-size: 0.84rem;
}
.team-row:last-child { border-bottom: none; }
.team-row:hover, .team-row:focus-visible { background: rgba(214,195,157,0.05); outline: none; }
.team-row .tr-name { color: var(--bone); }
.team-row .tr-owner { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; color: var(--steel); }
.team-row .tr-goal { font-family: var(--f-mono); font-size: 0.68rem; color: var(--steel); }
.team-row .tr-latest { font-family: var(--f-mono); font-size: 0.78rem; text-align: right; color: var(--steel); white-space: nowrap; }
.team-row .tr-latest i { font-style: normal; font-size: 0.52rem; letter-spacing: 0.1em; color: var(--graphite); display: block; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--graphite); flex: none; }
.led.led-go { background: var(--go); box-shadow: 0 0 6px rgba(61,163,93,0.5); }
.led.led-brake { background: var(--alert-glow); box-shadow: 0 0 6px rgba(255,70,36,0.5); }

/* team board — edit mode */
.team-row.editing { grid-template-columns: 24px 1fr 130px 110px 24px; cursor: default; }
.team-row.editing:hover { background: none; }
.team-row.editing .kpi-del { opacity: 1; }
.team-add { padding: 4px 10px 10px; border-bottom: 1px solid var(--rule); }
.team-add .btn { font-size: 0.6rem; margin: 0; }
.no-metrics { color: var(--steel); font-size: 0.85rem; border: 1px dashed var(--rule); padding: 14px 16px; }

/* history modal */
.hist-modal { max-width: 460px; position: relative; }
.hist-head h3 { font-size: 1.5rem; text-transform: uppercase; padding-right: 40px; }
.hist-sub { margin: 6px 0 14px; color: var(--accent); }
.hist-scroll { max-height: 55vh; overflow: auto; border: 1px solid var(--rule); }
table.hist { width: 100%; border-collapse: collapse; background: var(--carbon); }
table.hist td { padding: 8px 12px; border-bottom: 1px solid var(--rule); font-family: var(--f-mono); font-size: 0.78rem; color: var(--steel); }
table.hist td:first-child i { font-style: normal; font-size: 0.55rem; letter-spacing: 0.12em; color: var(--accent); margin-left: 8px; }
table.hist td.hist-v { text-align: right; color: var(--bone); }
table.hist tr.hist-now td { background: rgba(214,195,157,0.06); }
table.hist input {
  width: 90px; background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-mono); font-size: 0.78rem;
  padding: 5px 8px; text-align: right; outline: none;
}
table.hist input:focus { border-color: var(--accent); }

/* scoreboard mobile */
@media (max-width: 720px) {
  .team-row { grid-template-columns: 10px 1fr 84px; grid-template-rows: auto auto; row-gap: 4px; }
  .team-row .tr-owner { grid-column: 2; grid-row: 2; }
  .team-row .tr-goal { display: none; }
  .team-row .spark { grid-column: 3; grid-row: 2; justify-self: end; }
  .team-row .tr-latest { grid-column: 3; grid-row: 1; }
  .team-row.editing { grid-template-columns: 24px 1fr 24px; }
  .team-row.editing .tr-owner { grid-column: 2; }
  .team-row.editing .goal-in { grid-column: 2; grid-row: 3; width: 100%; }
}
.metric-in {
  flex: 1; background: transparent; border: 1px solid transparent; color: var(--bone);
  font-family: var(--f-body); font-size: 0.85rem; padding: 5px 7px; outline: none; border-radius: 2px;
}
.metric-in:hover { border-color: var(--rule); }
.metric-in:focus { border-color: var(--accent); background: var(--ink); }
.goal-in {
  width: 84px; background: transparent; border: 1px solid transparent; color: var(--steel);
  font-family: var(--f-mono); font-size: 0.74rem; padding: 5px 7px; outline: none; border-radius: 2px;
}
.goal-in:hover { border-color: var(--rule); }
.goal-in:focus { border-color: var(--accent); background: var(--ink); color: var(--bone); }
.star-btn { background: none; border: none; cursor: pointer; font-size: 0.95rem; filter: grayscale(1) opacity(0.35); transition: filter 0.12s; padding: 0; flex: none; }
.star-btn.on { filter: none; }
.kpi-del { background: none; border: none; color: var(--graphite); cursor: pointer; font-size: 0.75rem; flex: none; opacity: 0; transition: opacity 0.12s; }
tr:hover .kpi-del { opacity: 1; }
.kpi-del:hover { color: var(--alert); }
.add-row td { padding: 4px 8px 14px; border-bottom: 1px solid var(--rule); }
.add-row .btn { font-size: 0.6rem; }
.owner-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; color: var(--steel); }

.notice {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: var(--panel); padding: 12px 16px; margin-bottom: 20px;
  font-size: 0.82rem; color: var(--steel);
}

/* ---------- BOARD SECTIONS (generic; used by pipeline + pitch assets) ---------- */
.pb-cat { margin-bottom: 34px; }
.pb-cat-head { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.pb-cat-head h3 { font-size: 1.3rem; text-transform: uppercase; }
.pb-cat-head .count { font-family: var(--f-mono); font-size: 0.62rem; color: var(--graphite); letter-spacing: 0.15em; }
.pb-cat-head .spacer { flex: 1; }
.pb-cat-head .btn { margin-top: 0; }
.pb-empty { color: var(--graphite); font-size: 0.8rem; padding: 14px 6px; font-style: italic; }
/* ---------- MODAL ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(20,18,14,0.65); z-index: 100;
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: var(--panel); border: 1px solid var(--rule);
  max-width: 720px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 28px;
}
.modal h3 { text-transform: uppercase; margin-bottom: 14px; font-size: 1.4rem; }

/* ---------- HUB DASHBOARD ---------- */

.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { border: 1px solid var(--rule); background: linear-gradient(170deg, var(--panel) 0%, var(--carbon) 100%); padding: 18px; }
.tile-v { font-family: var(--f-display); font-size: 2.3rem; line-height: 1; margin-bottom: 8px; }
.tile-k { font-size: 0.58rem; }

/* goals + health band */
.goal-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 28px; }
.goal-card { border: 1px solid var(--rule); border-top: 2px solid var(--accent); background: var(--carbon); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.goal-card-head .mono-label { color: var(--steel); font-size: 0.56rem; }
.goal-big { font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--bone); }
.goal-big.good { color: var(--go); }
.goal-big.bad { color: var(--alert-glow); }
.goal-big.dim { color: var(--graphite); }
.goal-of { font-family: var(--f-mono); font-size: 0.7rem; color: var(--steel); }
.gauge { height: 10px; background: var(--panel-2); border: 1px solid var(--rule); }
.gauge-fill { height: 100%; background: var(--accent); }
/* 20 dots laid out as a deliberate 2 × 10 grid — an even wrap reads as
   "two rows of ten" instead of an arbitrary break at whatever width fits. */
.northstar { display: grid; grid-template-columns: repeat(10, 14px); gap: 5px; justify-content: start; }

.hub-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

@media (max-width: 960px) {
  .hub-split { grid-template-columns: 1fr; }
}

/* Phones: section heads wrap instead of crushing the title one word per line,
   and the chart becomes a swipeable 12-month strip instead of a cramped 6x2. */
@media (max-width: 600px) {
  .pb-cat-head { flex-wrap: wrap; row-gap: 8px; }
  .pb-cat-head h3 { white-space: nowrap; font-size: 1.15rem; }
  /* topbar: everything must fit 390px — tighter gaps, avatar without the name */
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-word { font-size: 1.05rem; }
  .topbar-user { gap: 8px; }
  .topbar-user .who-name { display: none; }
  .topbar-user .btn { padding: 6px 10px; font-size: 0.58rem; }
}

/* ---------- IMPORTANT DATES / CALENDAR ---------- */
.cal-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-type { font-family: var(--f-mono); font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--rule); }
.cal-type.holiday { color: var(--go); border-color: rgba(61,163,93,0.5); }
.cal-type.leave { color: var(--warn); border-color: rgba(255,122,31,0.5); }
.cal-type.event { color: var(--alert-glow); border-color: rgba(224,48,30,0.5); }
html[data-theme="light"] .cal-type.holiday { color: #2E7D46; }
html[data-theme="light"] .cal-type.leave { color: #C07A2A; }
html[data-theme="light"] .cal-type.event { color: #C8281C; }

.cal-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border: 1px solid var(--rule); background: var(--carbon); padding: 14px; margin: 14px 0 6px; }
.cal-form select, .cal-form input[type="text"], .cal-form input:not([type]) { background: var(--ink); border: 1px solid var(--rule); color: var(--bone); font-family: var(--f-body); font-size: 0.85rem; padding: 9px 11px; outline: none; }
.cal-form input[name="title"] { flex: 1; min-width: 200px; }
.cal-date-lbl { display: inline-flex; align-items: center; gap: 8px; color: var(--steel); }
.cal-date-lbl input { background: var(--ink); border: 1px solid var(--rule); color: var(--bone); font-family: var(--f-mono); font-size: 0.72rem; padding: 7px 9px; outline: none; color-scheme: light; }
html[data-theme="dark"] .cal-date-lbl input, html[data-theme="dark"] .cal-form input { color-scheme: dark; }

.cal-sect-head { margin: 22px 0 12px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.cal-list { display: flex; flex-direction: column; gap: 8px; }
.cal-list.past { opacity: 0.6; }
.cal-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--rule); border-left: 3px solid var(--rule); background: var(--carbon); padding: 10px 14px; }
.cal-row.holiday { border-left-color: var(--go); }
.cal-row.leave { border-left-color: var(--warn); }
.cal-row.event { border-left-color: var(--alert-glow); }
.cal-body { display: flex; flex-direction: column; gap: 2px; }
.cal-title { font-size: 0.9rem; color: var(--bone); }
.cal-row .btn { margin-top: 0; }
@media (max-width: 720px) { .cal-row { grid-template-columns: auto 1fr auto; } .cal-type { font-size: 0.5rem; } }

/* ---------- RESPONSIVE ---------- */

/* Below 860px the 3 nav items no longer fit alongside the brand and user chip,
   so the nav collapses into a hamburger panel that drops out of the topbar.
   The button names the current section, so you can see where you are without
   opening it. */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  #theme-toggle { margin-left: auto; }
  .topnav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; height: auto; overflow: visible;
    background: var(--carbon); border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  .topnav.open { display: flex; }
  .topnav a {
    height: auto; padding: 15px 22px; gap: 12px;
    border-bottom: 1px solid var(--rule);
    border-left: 3px solid transparent;
  }
  .topnav a:last-child { border-bottom: none; }
  .topnav a.active { border-bottom-color: var(--rule); border-left-color: var(--accent); background: var(--panel); }
}

@media (max-width: 960px) {
  .topbar { height: 56px; padding: 0 16px; gap: 14px; }
  .topbar-brand .brand-sub { display: none; }
  table.score thead th { top: 0; }
  .view { padding: 24px 16px 60px; }
  .screen-head h2 { font-size: 1.9rem; }
  .pb-row { grid-template-columns: 74px 1fr; }
  .pb-row .pb-own, .pb-row .pb-edit { grid-column: 2; }
  .dash-form .selects { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- OUTREACH ---------- */
.or-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 14px; align-items: end;
  border: 1px solid var(--rule); background: var(--carbon); padding: 18px; margin-top: 14px; }
.or-form label { display: flex; flex-direction: column; gap: 6px; color: var(--steel); }
.or-form input, .or-form select { background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-body); font-size: 0.9rem; padding: 9px 11px; outline: none; }
.or-form input[type="date"], .or-form input[type="number"] { font-family: var(--f-mono); font-size: 0.82rem; }
.or-form input:focus, .or-form select:focus { border-color: var(--accent); }
.or-form button[type="submit"] { grid-column: 1 / -1; justify-self: start; }
#or-form-hint { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 0.68rem;
  letter-spacing: 0.08em; color: var(--accent); }
#or-form-err { grid-column: 1 / -1; font-size: 0.8rem; color: var(--alert-glow); }

.or-proj-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.or-proj-form input { flex: 1; min-width: 220px; background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-body); font-size: 0.9rem; padding: 9px 11px; outline: none; }
.or-proj-form input:focus { border-color: var(--accent); }

.or-breakdowns { margin-bottom: 8px; }

.rate-pill { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  padding: 3px 8px; border: 1px solid var(--rule); white-space: nowrap; }

.or-table-wrap { overflow-x: auto; }
.or-table { width: 100%; border-collapse: collapse; background: var(--carbon); margin-top: 12px; }
.or-table th { font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: var(--tr-label);
  color: var(--graphite); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.or-table td { padding: 8px 12px; border-bottom: 1px solid var(--rule);
  font-size: 0.82rem; color: var(--steel); }
.or-table td.or-num { font-family: var(--f-mono); text-align: right; color: var(--bone); }
.or-table td.or-num input { width: 68px; background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-mono); font-size: 0.78rem; padding: 5px 7px;
  text-align: right; outline: none; }
.or-table td.or-num input:focus { border-color: var(--accent); }
.or-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.or-table .btn { margin-top: 0; padding: 4px 9px; font-size: 0.58rem; }

.or-print-head { display: none; }

@media (max-width: 720px) {
  .or-form { grid-template-columns: 1fr 1fr; }
}

/* ---------- SALES PULSE (hub CRM hot list) ---------- */
#hub-pipeline { margin-top: 34px; }
#hub-pipeline .pb-cat-head { align-items: center; }
#hub-pipeline .pb-cat-head .btn { margin-top: 0; white-space: nowrap; }
.pl-tiles { margin-top: 16px; grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1100px) { .pl-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .pl-tiles { grid-template-columns: repeat(2, 1fr); } }

/* Fixed layout + proportional col widths; text cells WRAP (auto-growing
   textareas) so long emails and notes are always fully visible. */
.pl-table { table-layout: fixed; width: 100%; min-width: 880px; }
.pl-table td { vertical-align: top; }

textarea.pl-wrap {
  display: block; resize: none; overflow: hidden; min-height: 28px;
  line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere;
}
.pl-table .metric-in { width: 100%; min-width: 100px; font-size: 0.8rem; }
.pl-table .pl-notes .metric-in { min-width: 170px; }
.pl-table .pl-sub { font-family: var(--f-mono); font-size: 0.66rem; color: var(--steel); margin-top: 2px; }
.pl-date { color-scheme: light; }
html[data-theme="dark"] .pl-date { color-scheme: dark; }
.pl-date.overdue { color: var(--alert-glow); }

/* ghost select — same affordance language as .metric-in */
.pl-sel {
  background: transparent; border: 1px solid transparent; color: var(--bone);
  font-family: var(--f-body); font-size: 0.8rem; padding: 5px 7px;
  border-radius: 2px; outline: none; cursor: pointer; max-width: 130px;
}
.pl-sel:hover { border-color: var(--rule); }
.pl-sel:focus { border-color: var(--accent); background: var(--ink); }
.pl-sel option { background: var(--panel); color: var(--bone); }

.pl-owner { display: flex; align-items: center; gap: 7px; }
.pl-noimg { display: inline-block; width: 24px; height: 24px; flex: none; background: var(--panel-2); border: 1px solid var(--rule); border-radius: 50%; }

/* beat `.or-table td.or-num input`'s boxed style — value cells stay ghost like the rest */
.pl-table td.or-num input.pl-val {
  width: 90px; min-width: 70px; text-align: right; font-family: var(--f-mono);
  background: transparent; border: 1px solid transparent;
  appearance: textfield; -moz-appearance: textfield;
}
.pl-table td.or-num input.pl-val:hover { border-color: var(--rule); }
.pl-table td.or-num input.pl-val:focus { border-color: var(--accent); background: var(--ink); }
.pl-val::-webkit-outer-spin-button, .pl-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pl-del { background: none; border: none; color: var(--graphite); cursor: pointer; font-size: 0.78rem; padding: 6px 4px; }
.pl-del:hover { color: var(--warn); }
.pl-row.closed { opacity: 0.55; }

/* ---------- HUB QUICK LINKS + OFFERS ---------- */
.hub-links { margin-top: 34px; }
.link-tiles { margin-top: 16px; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .link-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .link-tiles { grid-template-columns: repeat(2, 1fr); } }
a.tile { display: block; color: inherit; text-decoration: none; }
.tile-link, .tile-link-multi { transition: border-color 0.15s ease; }
.tile-link { cursor: pointer; }
.tile-link:hover, .tile-link-multi:hover { border-color: var(--accent); }
.link-tiles .tile-v { font-size: 1rem; letter-spacing: 0.04em; line-height: 1.3; }
.tile-ext { color: var(--accent); font-size: 0.75em; }
.tile-multi { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tile-multi a { color: var(--accent); font-family: var(--f-mono); font-size: 0.6rem;
  letter-spacing: 0.1em; text-decoration: none; }
.tile-multi a:hover { text-decoration: underline; }

.offers-sect { margin-top: 34px; }
.offers-table { min-width: 640px; }
.offers-table td:first-child .metric-in { color: var(--bone); font-weight: 600; }
.offers-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; margin-top: 6px; }
@media (max-width: 720px) { .offers-notes { grid-template-columns: 1fr; } }
.offers-note-block .cal-sect-head { margin-top: 14px; }
.offers-note { margin-top: 10px; width: 100%; }


/* ---------- KIND / SIDE CHIPS ---------- */
.kind-chip {
  font-family: var(--f-mono); font-size: 0.55rem; letter-spacing: 0.12em;
  padding: 3px 8px; border: 1px solid var(--rule); white-space: nowrap;
  color: var(--steel); text-transform: uppercase;
}
.kind-commercial { color: var(--accent); border-color: var(--accent-hair); }
.kind-activation { color: var(--warn); border-color: rgba(181,71,8,0.35); }
html[data-theme="dark"] .kind-activation { border-color: rgba(247,144,9,0.38); }
.kind-podcast { color: var(--go); border-color: rgba(18,128,92,0.35); }
html[data-theme="dark"] .kind-podcast { border-color: rgba(71,199,154,0.38); }
.side-chip { font-family: var(--f-mono); font-size: 0.55rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--steel); }

/* Stage pills on the pipeline board. Colour carries meaning only at the two
   ends -- won money and lost work -- so the middle of the funnel stays quiet. */
.stage-paid          { color: var(--go); border-color: rgba(18,128,92,0.4); }
.stage-lost          { color: var(--graphite); }
.stage-booked,
.stage-in_production { color: var(--accent); border-color: var(--accent-hair); }


/* ---------- HOT LIST + PIPELINE BOARDS ---------- */
/* The first pass ran shoot and delivery as inline columns and the board came
   out cramped -- scope wrapped to two lines at 1440px. Dates now live in the
   details lightbox, and what stays gets real room. */
.hl-tiles { margin-top: 16px; grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .hl-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .hl-tiles { grid-template-columns: repeat(2, 1fr); } }
.hl-tiles .tile { padding: 14px; }
.hl-tiles .tile-v { font-size: 1.6rem; }

.pl-table { min-width: 900px; }
.pl-table td { padding: 10px 14px; }
.pl-table th { padding: 9px 14px; }
/* A second line under the main cell -- the job name under the client, the due
   date under the next action. Quieter than the field above it. */
.pl-sub-in {
  width: 100%; margin-top: 4px; background: transparent; border: 1px solid transparent;
  color: var(--steel); font-family: var(--f-body); font-size: 0.72rem; padding: 3px 5px; outline: none;
}
.pl-sub-in:hover { border-color: var(--rule); }
.pl-sub-in:focus { border-color: var(--accent); background: var(--ink); color: var(--bone); }
input.pl-date.overdue, .pl-when.overdue { color: var(--alert); }

.pl-actions { white-space: nowrap; text-align: right; }
.pl-when { display: block; font-family: var(--f-mono); font-size: 0.68rem; color: var(--steel); margin-bottom: 4px; }
.pl-more { margin: 0; padding: 4px 9px; font-size: 0.54rem; }

/* ---------- DETAILS LIGHTBOX ---------- */
.pl-modal { position: relative; max-width: 640px; }
.dt-close { position: absolute; top: 14px; right: 14px; margin: 0; padding: 5px 10px; }
.pl-modal h3 { padding-right: 46px; margin-bottom: 4px; }
.dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.dt-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--steel); }
.dt-grid .dt-wide { grid-column: 1 / -1; }
.dt-grid .metric-in, .dt-grid .pl-sel {
  width: 100%; background: var(--ink); border: 1px solid var(--rule); color: var(--bone);
  font-family: var(--f-body); font-size: 0.88rem; padding: 8px 10px;
}
.dt-grid textarea.metric-in { resize: vertical; }
.dt-grid input[type="date"] { font-family: var(--f-mono); font-size: 0.8rem; }
#dt-status { padding: 14px 0 0; }
@media (max-width: 560px) { .dt-grid { grid-template-columns: 1fr; } }


/* ---------- OFFERS ---------- */
/* auto-FIT on purpose: it collapses the empty tracks so a group of two cards
   stretches across the full width. Tried auto-fill, which keeps the empty
   tracks and left four skinny columns -- Monique wanted the full-width boxes
   back. Text inside is capped separately so the measure stays readable. */
.offer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px; margin-top: 16px; align-items: start;
}
.offer-card {
  border: 1px solid var(--rule); border-top: 2px solid var(--accent);
  background: linear-gradient(170deg, var(--panel) 0%, var(--carbon) 100%);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
/* A draft is visibly unfinished, so nobody pitches it as settled. */
.offer-card.is-draft { border-top-color: var(--warn); }
.offer-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offer-draft { color: var(--warn); border-color: rgba(181,71,8,0.35); }
html[data-theme="dark"] .offer-draft { border-color: rgba(247,144,9,0.38); }

/* The tier is what separates cards inside a group, so it leads. */
.offer-tier-label {
  font-family: var(--f-display); font-size: 1.5rem; text-transform: uppercase;
  letter-spacing: var(--tr-disp); line-height: 1;
}
.offer-price {
  margin-left: auto; color: var(--bone); font-size: 0.7rem;
  white-space: nowrap; text-align: right;
}
.offer-name { font-family: var(--f-body); font-size: 0.78rem; color: var(--steel);
  text-transform: uppercase; letter-spacing: 0.1em; }
.offer-line { font-size: 0.95rem; color: var(--bone); max-width: 68ch; }
.offer-field { display: flex; flex-direction: column; gap: 3px; }
.offer-field p { font-size: 0.85rem; color: var(--steel); max-width: 78ch; }
.offer-internal, .offer-card textarea.offer-internal-in {
  border-left: 2px solid var(--rule); padding-left: 10px; color: var(--graphite);
}
.offer-card textarea.offer-internal-in { color: var(--steel); }

/* These auto-grow, so the drag handle is dead weight and reads as clutter. */
.offer-card textarea.metric-in { resize: none; overflow: hidden; min-height: 2.4em; line-height: 1.45; }
/* THE reason the internal copy was clipping. `.metric-in` carries `flex: 1`,
   which is right in a row, but `.offer-field` is a COLUMN flex container -- so
   flex-basis:0 + grow made the flex algorithm own the height and autosize's
   inline style.height was simply ignored. flex:none hands height back. */
.offer-card .metric-in { flex: none; }
.offer-card textarea.metric-in,
.offer-card input.metric-in { width: 100%; font-size: 0.85rem; }
.offer-card .offer-name-in { font-size: 0.8rem; color: var(--steel); }
.offer-card input.offer-tier { width: 92px; flex: none; font-family: var(--f-mono); font-size: 0.72rem; }
/* Sized to hold "Monthly retainer" without clipping -- the first pass capped
   this at 130px and cut it to "Monthly retain". */
.offer-card input.offer-price-in {
  margin-left: auto; width: 170px; flex: none; text-align: right;
  font-family: var(--f-mono); font-size: 0.72rem;
}
.offer-card .offer-top .pl-sel { flex: none; min-width: 118px; }
.offer-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px;
  padding-top: 10px; border-top: 1px solid var(--rule); }
.offer-actions .btn { margin: 0; }
.offer-actions .pl-del { margin-left: auto; }
@media (max-width: 700px) {
  .offer-grid { grid-template-columns: 1fr; }
  .offer-card input.offer-price-in { width: 130px; }
}


/* ---------- OFFERS: card affordance + lightbox ---------- */
.offer-line-in { font-size: 0.95rem; }
button.offer-open {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--f-mono); letter-spacing: var(--tr-label); text-transform: uppercase;
  font-size: 0.62rem;
}
button.offer-open:hover { text-decoration: underline; }
.offer-cardfoot {
  display: flex; align-items: center; gap: 10px; margin-top: auto;
  padding-top: 10px; border-top: 1px solid var(--rule);
}
.offer-open { margin-left: auto; color: var(--accent); }
.offer-locked { color: var(--steel); }

.offer-modal { position: relative; max-width: 760px; }
.offer-modal h3 { padding-right: 46px; margin-bottom: 10px; }
.offer-modal .dt-grid { margin-bottom: 4px; }
.offer-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); }
.offer-section-head {
  font-family: var(--f-display); font-size: 1.15rem; text-transform: uppercase;
  letter-spacing: var(--tr-disp); margin-bottom: 4px;
}
.offer-modal .metric-in {
  flex: none; width: 100%; background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-size: 0.88rem; padding: 8px 10px;
}
.offer-modal textarea.metric-in { resize: none; overflow: hidden; line-height: 1.5; }
.offer-checklist-in { font-family: var(--f-mono); font-size: 0.8rem; }
.offer-checklist { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.offer-checklist li {
  font-size: 0.88rem; color: var(--steel); padding-left: 20px; position: relative;
}
/* An open box, not a tick: this is a list of what to gather, not per-deal state. */
.offer-checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em;
  width: 10px; height: 10px; border: 1px solid var(--accent-hair);
}
.offer-pricing p { font-size: 0.88rem; color: var(--steel); margin-bottom: 8px; }
.offer-modal .offer-actions { margin-top: 20px; }


/* ---------- CHECKLIST EDITOR ---------- */
.check-editor { display: flex; flex-direction: column; gap: 8px; }
.check-rows { display: flex; flex-direction: column; gap: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; }
/* A marker, not a control. See wireChecklist() for why these do not tick: the
   offer is a template shared across every deal, so a tick here would be true
   for all of them at once. */
.check-box {
  width: 14px; height: 14px; flex: none; border: 1px solid var(--accent-hair);
  background: var(--ink);
}
.offer-modal .check-row .metric-in { flex: 1; width: auto; font-size: 0.86rem; }
.check-del {
  background: none; border: none; color: var(--graphite); cursor: pointer;
  font-size: 0.72rem; padding: 4px 6px; flex: none;
}
.check-del:hover { color: var(--alert); }
.check-add { margin: 6px 0 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; }
.check-plus { font-size: 0.95rem; line-height: 1; color: var(--accent); }

/* ---------- PRINT ----------
   Drives Print / Save PDF. The app is entirely CSS-variable-driven and --carbon /
   --panel are near-black, so without forcing colours a dark-theme user prints a
   solid black page. Hence the !important run. */
@media print {
  @page { margin: 14mm; }
  .topbar, .foot, #modal-root, #login,
  .score-actions, .view-switch, .or-form, .or-proj-form,
  .or-row-actions, #or-init-toggle,
  .pl-del, .pl-more, .offer-actions, #hub-pipeline .btn, #hot-list .btn, .offers-add, .hub-month-switch { display: none !important; }
  .pl-table .metric-in, .pl-table .pl-sel {
    color: #000 !important; background: #fff !important; border: none !important;
    -webkit-appearance: none; appearance: none; }
  .view { padding: 0 !important; max-width: 100% !important; }
  html, body, .app, .view { background: #fff !important; color: #000 !important; }
  .tile, .goal-card, .or-table, .or-table th, .or-table td, .cal-row, .hub-chart, .notice {
    background: #fff !important; color: #000 !important; border-color: #999 !important; }
  .screen-head h2, .tile-v, .goal-big, .or-table td.or-num, .goal-line b, .goal-line > span:first-child {
    color: #000 !important; }
  .mono-label, .dim, .screen-sub, .count, .pb-empty, .goal-pct { color: #444 !important; }
  .goal-fill, .gauge-fill { background: #666 !important; }
  .goal-bar { background: #eee !important; border-color: #999 !important; }
  .rate-pill, .pill-green, .pill-red { color: #000 !important; border-color: #999 !important; }
  .or-print-head { display: block; font-family: var(--f-mono); font-size: 9pt;
    letter-spacing: 0.14em; color: #000; margin-bottom: 8mm; }
  .tile-row { grid-template-columns: repeat(3, 1fr) !important; break-inside: avoid; }
  .hub-split { grid-template-columns: 1fr 1fr !important; }
  .or-table thead { display: table-header-group; }   /* repeat the header on every page */
  .or-table tr, .goal-line { break-inside: avoid; }
  .pb-cat-head { break-after: avoid; }
  a[href^="#"]::after { content: ""; }               /* don't print hash-route URLs */
}

