/* Tracker, changes and notes pages. Rules from docs/reference/tracker-mock.html, then additions built from the
   same tokens (marked below). See docs/DESIGN.md. */
  body.trk { font-size: 16px; }
  h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; font-size: clamp(2.4rem, 6vw, 4.5rem); margin: 0; overflow-wrap: break-word; }
  h2 { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; margin: 0; }
  .sub { display: block; font-size: 0.8rem; color: var(--fg-3); }

  .crumbs { border-bottom: 1px solid var(--line); }
  .crumbs .wrap { display: flex; justify-content: space-between; padding-block: 0.8rem; }
  .crumbs a { color: var(--fg-2); text-decoration: none; } .crumbs a:hover { color: var(--fg); }

  .head .wrap { padding-block: 2.5rem 1.5rem; display: grid; gap: 1.5rem; }
  .kpis { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
  .kpi { padding: 1rem 1.25rem 1rem 0; border-right: 1px solid var(--line-soft); min-width: 0; }
  .kpi + .kpi { padding-left: 1.25rem; } .kpi:last-child { border-right: 0; }
  .kpi b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.03em; line-height: 1; }
  .kpi span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
  @media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi { border-right: 0; padding-left: 0; } }

  /* comparables panel: pick a state and a size band, get the number */
  .cmp { border: 1px solid var(--line); padding: 1.2rem 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .cmp .pick { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
  .cmp .out { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem 2rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
  .cmp .out div b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1; }
  .cmp .out div span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
  @media (max-width: 860px) { .cmp .out { grid-template-columns: 1fr 1fr; } }

  /* segmented buttons (views, grouping) and chips */
  .views { display: flex; gap: 0; border: 1px solid var(--line); }
  .views button { font-family: var(--mono); font-size: 0.76rem; padding: 0.5em 1em; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--fg-2); cursor: pointer; }
  .views button:last-child { border-right: 0; }
  .views button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
  .chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .chip { font-family: var(--mono); font-size: 0.74rem; padding: 0.3em 0.75em; border: 1px solid var(--line-soft); border-radius: 999px; background: transparent; color: var(--fg-2); cursor: pointer; }
  .chip[aria-pressed="true"] { border-color: var(--fg); color: var(--fg); }

  /* table */
  .tbl { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; margin-top: 1rem; }
  th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2); padding: 0.8rem 0.65rem 0.8rem 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
  tr:last-child td { border-bottom: 0; }
  tr:hover td { background: var(--bg-2); }
  td.name a:hover { border-bottom: 2px solid var(--accent); }
  td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
  td.num .sub { font-family: var(--mono); }
  .st { font-family: var(--mono); font-size: 0.76rem; display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap; }
  .st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); flex: none; box-sizing: border-box; }
  .st.offered::before, .st.construction_started::before, .st.resumed::before { background: var(--fg); }
  .st.energising::before, .st.energised::before { background: var(--good); }
  .st.delayed::before { background: var(--accent); }
  .st.contested::before, .st.paused::before { background: transparent; border: 1.5px solid var(--accent); }
  .st.cancelled { color: var(--fg-3); } .st.cancelled::before { background: transparent; border: 1.5px solid var(--fg-3); }
  /* milestones: a square, not a dot; they never change the stage */
  .st.expanded::before, .st.ownership_changed::before, .st.renamed::before { border-radius: 1px; background: var(--fg-2); }
  .st.decommissioned { color: var(--fg-3); } .st.decommissioned::before { border-radius: 1px; background: transparent; border: 1.5px solid var(--fg-3); }
  .fresh { color: var(--accent); }
  .conf { font-family: var(--mono); font-size: 0.72rem; color: var(--fg-3); display: block; margin-top: 0.2rem; }
  .conf.high { color: var(--fg-2); }
  a.src { font-family: var(--mono); font-size: 0.78rem; color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--accent); white-space: nowrap; }
  /* A long source title (an article's full headline) wraps rather than widening the page on a phone. */
  a.src[title], .srcs a.src, .srcs-inline a.src, .sig-src a.src { white-space: normal; overflow-wrap: break-word; }
  @media (max-width: 760px) { a.src { white-space: normal; overflow-wrap: anywhere; } }   /* a long host name never widens a phone page */

  /* timeline: one bar per row on a shared axis, drawn from the history */
  .tl { position: relative; height: 14px; min-width: 138px; margin-top: 0.45rem; }
  .tl::before { content: ""; position: absolute; inset: 6px 0 auto 0; height: 1px; background: var(--line-soft); }
  .tl .bar { position: absolute; top: 4px; height: 6px; background: var(--fg); }
  .tl .bar.queue { background: repeating-linear-gradient(90deg, var(--fg-3) 0 4px, transparent 4px 7px); }
  .tl .bar.live { background: var(--good); }
  .tl .bar.stop { background: var(--accent); }
  .tl .tick { position: absolute; top: 0; width: 2px; height: 14px; background: var(--fg); }
  .tl .now { position: absolute; top: -2px; width: 1px; height: 18px; background: var(--accent); }
  .axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.66rem; color: var(--fg-3); }
  .legend { display: flex; flex-wrap: wrap; gap: 1.2rem; font-family: var(--mono); font-size: 0.72rem; color: var(--fg-2); padding-block: 0.8rem 0; }
  .legend i { display: inline-block; width: 18px; height: 6px; vertical-align: middle; margin-right: 0.5em; background: var(--fg); }
  .legend i.q { background: repeating-linear-gradient(90deg, var(--fg-3) 0 4px, transparent 4px 7px); } .legend i.l { background: var(--good); } .legend i.s { background: var(--accent); }
  .note { font-family: var(--mono); font-size: 0.74rem; color: var(--fg-3); padding-block: 1rem 3rem; }

  /* ---- additions, same tokens ------------------------------------------------------------------- */
  /* inline styles in the mock, as classes */
  .tl .tick.live { background: var(--good); }
  .tl .tick.stop { background: var(--accent); }
  .tl .tick.ms { top: 7px; height: 7px; background: var(--fg-2); }
  .legend .today { color: var(--accent); }
  .cmp-in { display: grid; gap: 0.6rem; }

  /* nothing pushes the page wider than a phone; the table scrolls inside .tbl */
  .crumbs .wrap { flex-wrap: wrap; gap: 0.3rem 1rem; }
  .views { max-width: 100%; overflow-x: auto; }
  .views button { white-space: nowrap; }
  @media (max-width: 760px) {   /* the three views side by side do not fit a phone: they share two rows instead */
    .views { flex-wrap: wrap; overflow: visible; border: 0; gap: 0; }
    .views button { flex: 1 1 auto; border: 1px solid var(--line); margin: 0 -1px -1px 0; }
  }
  @media (max-width: 860px) { .kpi + .kpi { padding-left: 0; } }
  .head .wrap > * { min-width: 0; }
  tr.empty td { color: var(--fg-3); font-family: var(--mono); font-size: 0.8rem; }

  /* stage with the condition in force underneath (table rows, project head) */
  .stand { display: grid; gap: 0.25rem; justify-items: start; }

  .mkts .grid { font-family: var(--mono); font-size: 0.78rem; color: var(--fg-2); }
  .mkts .grid b { font-weight: 500; color: var(--fg); }

  #viewnote { padding-bottom: 0.4rem; }
  .note.missing { padding-top: 0; }
  .note a.src { white-space: normal; }
  .rep { font-family: var(--mono); font-size: 0.76rem; color: var(--fg-3); }

  /* ---- tracker list pages: the table comes first ------------------------------------------------------ */
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* compact head: title, market tabs, one line of numbers */
  .head.tight .wrap { padding-block: 1.3rem 0.2rem; gap: 0.8rem; }
  .head.tight h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.05; letter-spacing: -0.03em; }
  .title { display: grid; gap: 0.4rem; }
  .tabs { display: flex; flex-wrap: wrap; gap: 0 1.5rem; border-bottom: 1px solid var(--line-soft); }
  .tabs a { font-family: var(--mono); font-size: 0.8rem; color: var(--fg-2); text-decoration: none; padding: 0.5rem 0; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
  .tabs a b { font-weight: 400; color: var(--fg-3); margin-left: 0.45em; }
  .tabs a:hover { color: var(--fg); }
  .tabs a[aria-current] { color: var(--fg); border-bottom-color: var(--fg); }
  .tabs.sub { gap: 0 1.1rem; border-bottom: 0; }
  .tabs.sub a { font-size: 0.74rem; padding: 0.4rem 0; }
  .tabs a.jump { margin-left: auto; color: var(--fg-3); }
  .tabs a.jump + a.jump { margin-left: 0; }
  .stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1.7rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--fg-3); }
  .stats b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--fg); margin-right: 0.45em; }

  /* search and filters */
  .bar { position: relative; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding-top: 1rem; }
  .search { position: relative; flex: 1 1 15rem; max-width: 24rem; }
  .search input { width: 100%; font: inherit; font-family: var(--mono); font-size: 0.8rem; padding: 0.55em 2.4em 0.55em 0.8em; border: 1px solid var(--line); border-radius: 0; background: var(--bg); color: var(--fg); -webkit-appearance: none; appearance: none; }
  .search input::placeholder { color: var(--fg-3); }
  .search kbd { position: absolute; right: 0.6em; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 0.66rem; color: var(--fg-3); border: 1px solid var(--line-soft); padding: 0 0.45em; pointer-events: none; }
  .facets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  /* on a phone, with the script: the filters and views fold behind one button (assets/js/tracker.js) */
  .fbtn { display: none; font-family: var(--mono); font-size: 0.78rem; padding: 0.55em 0.9em; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
  .fbtn::after { content: " ▾"; color: var(--fg-3); }
  .fopen .fbtn::after { content: " ▴"; }
  @media (max-width: 760px) {
    .js .fbtn { display: inline-block; }
    .js:not(.fopen) #facets, .js:not(.fopen) #views, .js:not(.fopen) #group { display: none; }
  }
  .facet { position: relative; }
  .facet summary { list-style: none; cursor: pointer; user-select: none; font-family: var(--mono); font-size: 0.76rem; padding: 0.55em 0.85em; border: 1px solid var(--line-soft); color: var(--fg-2); white-space: nowrap; }
  .facet summary::-webkit-details-marker { display: none; }
  .facet summary::after { content: "▾"; margin-left: 0.5em; color: var(--fg-3); }
  .facet[open] summary, .facet.on summary { border-color: var(--fg); color: var(--fg); }
  .facet .fn:not(:empty) { margin-left: 0.45em; }
  .opts { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 15rem; max-width: min(24rem, 90vw); max-height: 21rem; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); padding: 0.35rem 0; }
  .facet:nth-last-child(-n+2) .opts { left: auto; right: 0; }   /* the last two open leftwards, inside the page */
  .opts label { display: flex; gap: 0.6em; align-items: baseline; padding: 0.32rem 0.8rem; font-size: 0.86rem; cursor: pointer; }
  .opts label:hover { background: var(--bg-2); }
  .opts label span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .opts label.zero { color: var(--fg-3); }
  .opts label[hidden] { display: none; }
  .opts .n { font-family: var(--mono); font-size: 0.72rem; color: var(--fg-3); }
  .opts .cap { font-family: var(--mono); font-size: 0.68rem; color: var(--fg-3); padding: 0.3rem 0.8rem; }
  .opts .fq { display: block; width: calc(100% - 1.6rem); margin: 0.3rem 0.8rem 0.4rem; font: inherit; font-family: var(--mono); font-size: 0.76rem; padding: 0.4em 0.6em; border: 1px solid var(--line-soft); border-radius: 0; background: var(--bg); color: var(--fg); -webkit-appearance: none; appearance: none; }
  .opts input[type="checkbox"] { accent-color: var(--fg); margin: 0; flex: none; transform: translateY(0.1em); }
  .bar2 { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin-top: 0.7rem; }
  .count { font-family: var(--mono); font-size: 0.76rem; color: var(--fg-2); margin-left: auto; }
  .lnk { font: inherit; font-family: var(--mono); font-size: 0.76rem; padding: 0; border: 0; border-bottom: 1px solid var(--accent); background: none; color: var(--fg-2); cursor: pointer; }
  .lnk[hidden] { display: none; }
  .toks { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-top: 0.6rem; }
  .toks:has(#tokens:empty) { display: none; }
  .tok::after { content: "×"; margin-left: 0.5em; color: var(--fg-3); }

  /* the list: one line per project; a row opens in place for the rest */
  table { border-collapse: collapse; width: 100%; }
  td { padding: 0.62rem 0.8rem 0.62rem 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 0.88rem; }
  .tbl.list { position: relative; }   /* holds the visually hidden labels inside the scrolling box */
  .list table { table-layout: fixed; min-width: 1120px; }
  .c-ev { width: 1.4%; } .c-name { width: 26%; } .c-own { width: 10%; } .c-place { width: 9.5%; } .c-mk { width: 5%; } .c-mw { width: 5.2%; }
  .c-stat { width: 19.5%; } .c-chg { width: 7.6%; } .c-tl { width: 7.8%; } .c-src { width: 6.4%; } .c-tg { width: 1.6%; }
  .list th, .list td { overflow: hidden; }
  th.num { text-align: left; }
  .sort { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; padding: 0; border: 0; background: none; cursor: pointer; }
  .sort::after { content: "↕"; margin-left: 0.4em; color: var(--fg-3); }
  th[aria-sort="ascending"] .sort::after { content: "↑"; color: var(--fg); }
  th[aria-sort="descending"] .sort::after { content: "↓"; color: var(--fg); }
  .list td.ev, .list td.tg { position: relative; padding-right: 0; text-overflow: clip; }
  td.tg { text-align: right; }
  .ok::before { content: "✓"; color: var(--good); font-weight: 700; font-size: 0.95rem; line-height: 1; }
  td.name a, .lname { font-family: var(--display); font-weight: 700; font-size: 0.92rem; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
  td.name a:hover { border-bottom: 2px solid var(--accent); }
  td.name a.lname, .lname { color: var(--fg-2); }
  /* phase mark: a green dot "Operating", or a small "In development" tag (assets/js/rows.js phaseTag), in a slot of
     its own after the name, so every mark starts on one line down the list; on a phone it follows the name */
  .nmw { display: grid; grid-template-columns: minmax(0, 1fr) 9.25rem; column-gap: 0.7em; align-items: baseline; min-width: 0; }
  .nmw > a, .nmw > .lname { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .ph { flex: none; justify-self: start; font-family: var(--mono); font-size: 0.68rem; white-space: nowrap; }
  .ph.op { color: var(--fg-2); }
  .ph.op::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 0.4em; }
  .ph.dev { color: var(--fg-3); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line-soft); border-radius: 999px; padding: 0.1em 0.6em; }
  .row.open .nmw { flex-wrap: wrap; }
  td.own, td.place { color: var(--fg-2); }
  .ownb { font: inherit; color: inherit; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
  .ownb:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
  td.mk { font-family: var(--mono); font-size: 0.76rem; color: var(--fg-2); }
  .u { display: none; }
  .list .stand { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
  td.chg { font-size: 0.78rem; color: var(--fg-2); }
  .chg .fresh { color: var(--accent); }
  .wait { display: none; }
  .v-stuck .when { display: none; } .v-stuck .wait { display: inline; }
  .list .tl { min-width: 0; margin-top: 0.3rem; }
  .list .axis span:not(:first-child):not(:last-child) { display: none; }   /* a narrow column: first and last year only */
  td.srcs-cell a.src { white-space: inherit; overflow-wrap: anywhere; }
  .tog { width: 20px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--mono); font-size: 0.95rem; line-height: 1; color: var(--fg-3); }
  .tog::before { content: "+"; } .open .tog::before { content: "−"; }
  html:not(.js) .tog { display: none; }
  /* with the script: rows are one line until opened */
  .js .row { cursor: pointer; }
  .js .row:not(.open) td { white-space: nowrap; text-overflow: ellipsis; }
  .js .row:not(.open) .sub, .js .row:not(.open) .conf { display: none; }
  .js .row:not(.open) .stand { display: block; }
  .js .row:not(.open) .stand .st { margin-right: 0.9rem; vertical-align: top; }
  .tbl.loading tbody { opacity: 0.35; }   /* a filtered link: the first rows stand in until the data file is in */
  .row.open td { background: var(--bg-2); }
  .row.open td.name a, .row.open .lname, .row.open .ownb { overflow-wrap: anywhere; white-space: normal; }
  /* group heading on /tracker: one per market, with its count and a link to the country page */
  .grp th { padding: 1.3rem 0 0.55rem; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; text-transform: none; color: var(--fg); }
  .grp th a { color: var(--fg); text-decoration: none; } .grp th a:hover { border-bottom: 2px solid var(--accent); }
  .grp th span { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--fg-3); margin-left: 0.9em; }
  .grp:hover th, .gmore:hover td, tr.empty:hover td { background: transparent; }
  .gmore td { padding: 0.55rem 0 0.4rem; border-bottom: 0; }
  .gmore .left { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--fg-3); margin-left: 0.9em; }
  .morebar { padding-top: 0.8rem; }
  .morebar .chip[hidden] { display: none; }
  .cmp-wrap { padding-block: 0 3rem; }

  /* below 1000px the filter panels open across the whole bar; below 760px every row is a card */
  @media (max-width: 1000px) {
    .facet { position: static; }
    .opts, .facet:nth-last-child(-n+2) .opts { left: 0; right: 0; top: calc(100% + 4px); min-width: 0; max-width: none; }
  }
  @media (max-width: 760px) {
    .search { max-width: none; flex-basis: 100%; }
    .search kbd { display: none; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
    .tabs a.jump { margin-left: 0; }
    .stats { gap: 0.1rem 1.2rem; }
    .count { margin-left: 0; flex-basis: 100%; }
    .tbl.list { overflow-x: visible; }
    .list table { min-width: 0; table-layout: auto; }
    .list table, .list tbody, .list tr, .list td, .list tr.grp th { display: block; }
    .list colgroup, .list thead { display: none; }
    .list tr[hidden] { display: none; }
    .list .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name mw" "own mk" "stat chg"; gap: 0.2rem 0.9rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line-soft); }
    .list .row.open { grid-template-areas: "name mw" "own mk" "stat chg" "place place" "tl tl" "src src"; background: var(--bg-2); padding-inline: 0.6rem; margin-inline: -0.6rem; }
    .list .row td { padding: 0; border: 0; background: none; min-width: 0; }
    .row td.name { grid-area: name; } .row td.mw { grid-area: mw; text-align: right; } .row td.own { grid-area: own; } .row td.mk { grid-area: mk; text-align: right; }
    .row td.stat { grid-area: stat; } .row td.chg { grid-area: chg; text-align: right; } .row td.place { grid-area: place; } .row td.tlc { grid-area: tl; } .row td.srcs-cell { grid-area: src; }
    .row td.ev, .row td.tg, .row td.place, .row td.tlc, .row td.srcs-cell { display: none; }
    .nmw { display: flex; gap: 0.6em; }
    .row.open td.place, .row.open td.tlc:not(:empty), .row.open td.srcs-cell { display: block; }
    .u { display: inline; }
    .row .tl { max-width: 20rem; }
    .gmore td, tr.empty td { padding: 0.6rem 0; }
    /* a phone shows less per row: the full name (it wraps), only the phase marks that are news (operating), and no
       country code under a heading that already names the country */
    .js .row:not(.open) td.name { white-space: normal; }
    .nmw { flex-wrap: wrap; row-gap: 0.15rem; }
    .nmw > a, .nmw > .lname { overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
    .ph.dev { display: none; }
    .list table:has(tr.grp) .row:not(.open) td.mk { display: none; }
    /* the head: the tabs, one line of numbers, then search */
    .head.tight .title .label { display: none; }
    .head.tight .stats > span:nth-child(n+3) { display: none; }
  }

  /* market links under the tracker heading, changefeed links */
  .mkts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.4rem; }
  .line { max-width: 40em; }

  /* project page */
  .now-status { display: grid; gap: 0.15rem; }
  .facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 2rem; margin: 0; }
  .facts div { border-top: 1px solid var(--line-soft); padding: 0.7rem 0; min-width: 0; }
  .facts dd { margin: 0.2rem 0 0; font-family: var(--mono); font-size: 0.9rem; overflow-wrap: anywhere; }
  .tl-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); padding-block: 1rem 1.2rem; margin-top: 0.8rem; }
  .tl.lg { height: 28px; min-width: 0; }
  .tl.lg::before { inset: 13px 0 auto 0; }
  .tl.lg .bar { top: 9px; height: 10px; }
  .tl.lg .tick { height: 28px; width: 3px; }
  .tl.lg .tick.ms { top: 14px; height: 14px; }
  .tl.lg .now { top: -3px; height: 34px; width: 2px; }
  h2.sec { margin-top: 2.5rem; }
  .hist, .changes { list-style: none; margin: 0.8rem 0 0; padding: 0; border-top: 1px solid var(--line); }
  .hist > li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.4rem 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); }
  .hist .date { font-size: 0.85rem; padding-top: 0.05rem; }
  .hist .from, .changes .from { font-family: var(--mono); font-size: 0.76rem; color: var(--fg-3); margin-right: 0.5em; }
  .srcs { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
  .srcs .type { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
  .hist .evm { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); margin-left: 0.6em; }
  .hist .evm.confirmed { color: var(--good); }
  .facts.first { margin-top: 0.4rem; }
  @media (max-width: 600px) { .hist > li { grid-template-columns: 1fr; } }

  /* changefeed */
  .changes li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); }
  .changes .pname { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
  .changes .pname:hover { border-bottom: 2px solid var(--accent); }
  .changes .sep { color: var(--fg-3); }
  .changes .sub { display: inline; }
  .changes .date { font-size: 0.85rem; }
  .srcs-inline { display: inline-flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }

  /* weekly notes */
  .prose { max-width: 40em; padding-block: 0.5rem 3rem; font-size: 1.05rem; line-height: 1.6; color: var(--fg-2); }
  .prose > * + * { margin-top: 1rem; }
  .prose h2 { font-size: 1.3rem; color: var(--fg); margin-top: 2rem; }
  .prose a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); }
  .prose ul, .prose ol { padding-left: 1.2rem; }

  /* quotes and automation tags (project pages, changefeed, signals) */
  .quote { margin: 0.4rem 0 0.2rem; padding-left: 0.8rem; border-left: 2px solid var(--line-soft); color: var(--fg-2); font-size: 0.9rem; max-width: 46em; overflow-wrap: anywhere; }
  .tag { display: inline-block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 0.05em 0.6em; margin-left: 0.5em; white-space: nowrap; }
  .tag.review-auto-applied, .tag.lane-review { border-color: var(--accent); }
  .signals { list-style: none; margin: 0.8rem 0 0; padding: 0; border-top: 1px solid var(--line); }
  .signals > li { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); display: grid; gap: 0.35rem; min-width: 0; }
  .signals .pname { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; margin-right: 0.6rem; }
  a.pname:hover { border-bottom: 2px solid var(--accent); }
  .signals .sub, .sig-src .sub { display: inline; margin-left: 0.6rem; }
  .sig-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.4rem; }
  .sig-src .tag { margin-left: 0; }
  .srcs .type, .sig-src .type { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }

  /* /news: the filters and the items (the list reuses .signals) */
  .nfs { display: grid; gap: 0.8rem; margin: 0.4rem 0 0.2rem; }
  .nf { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: baseline; gap: 0.6rem; }
  .nf .label { font-size: 0.66rem; }
  .nf[hidden], .nf .chip[hidden] { display: none; }
  .chip .n { color: var(--fg-3); margin-left: 0.2em; }
  .news .n-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; font-family: var(--mono); font-size: 0.72rem; color: var(--fg-3); }
  .news .n-meta .st { margin: 0; }
  .news .n-c { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
  .news .n-head { font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
  .news .n-head:hover { border-bottom: 2px solid var(--accent); }
  .news .n-sum { color: var(--fg-2); overflow-wrap: anywhere; }
  .news .n-sum .pname { font-size: inherit; font-family: inherit; font-weight: 600; margin: 0; }
  .news .quote { font-size: 0.84rem; }
  .tag.on { border-color: var(--accent); }
  .news li.empty { color: var(--fg-3); }
  .nrow { display: flex; gap: 0.6rem; align-items: stretch; }
  .nfbtn { display: none; }
  @media (max-width: 760px) {
    .nf { grid-template-columns: 1fr; gap: 0.35rem; }
    .nfbtn { display: inline-block; }
    .nfs:not(.open) .nf { display: none; }
  }
