/* One look for every page: loaded last, so it is the single place that decides type sizes, control heights, card edges and touch sizes.
   A tool's own stylesheet may place things (columns, widths) but should not restyle these; change them here. */

/* Type scale */
h1 { font-size: clamp(1.8rem, 2.4vw + 1rem, 2.7rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 1vw + 1rem, 1.65rem); font-weight: 750; }
h3, .h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.012em; line-height: 1.3; }
h4 { font-size: .95rem; font-weight: 700; letter-spacing: -.005em; }
h2, h3, h4, .h3 { margin-top: 0; }

/* Controls: the same height and corners for inputs, drop-downs and buttons, so a row of them lines up */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]), select, .btn { min-height: 42px; border-radius: 12px; }
textarea { border-radius: 12px; min-height: 84px; }
.btn.small { min-height: 36px; border-radius: 10px; }
select { padding-right: 34px; }
.row-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.row-filters > h2, .row-filters > h3, .row-filters > .h3 { align-self: center; margin: 0; }
.row-filters > .btn { align-self: flex-end; }

/* Cards that carry a status: a straight coloured bar on the left edge (set with --bar), instead of a thick border that bent around the corners */
.cr-tile, .pd-card3, .pd-kpi, .pd-insight, .pd-headline, .pd-alert, .wk-kpi, .st-verdict, .alerts-banner { position: relative; }
.cr-tile::before, .pd-card3::before, .pd-kpi::before, .pd-insight::before, .pd-headline::before, .pd-alert::before, .wk-kpi::before, .st-verdict::before, .alerts-banner::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 4px 0 0 var(--bar, transparent); pointer-events: none; }
.cr-tile, .pd-card3, .pd-kpi, .pd-insight, .pd-headline, .pd-alert, .wk-kpi, .st-verdict, .alerts-banner, .tile { border: 1px solid var(--line); border-radius: 14px; }

/* Treemap tiles and labels inside bars sit on chart colours: dark text on the lighter night colours, white on the day colours */
:root[data-theme="dark"] .pd-tile-box, :root[data-theme="dark"] .pd-dl.pd-dl-in { color: #090c14; fill: #090c14; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pd-tile-box, :root:not([data-theme="light"]) .pd-dl.pd-dl-in { color: #090c14; fill: #090c14; } }

/* Phones: 44px touch targets and 16px text in fields (so the phone does not zoom in when a field is tapped) */
@media (max-width: 720px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]), select, textarea { font-size: 16px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]), select, .btn { min-height: 46px; }
  .btn.small { min-height: 42px; }
  summary { min-height: 44px; display: flex; align-items: center; }
  .pd-check, label.pd-check { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; flex: none; }
  .foot-site a { display: inline-block; padding: 10px 6px; }
  .tab, .pd-seg, .cr-tab, .ps-tab, .qc-btn { min-height: 44px; }
}

/* Tables inside a scroll box fill the box (they scroll sideways only when their content needs it) */
.scrollbox table, .scrollbox .mini { display: table; width: 100%; max-width: none; overflow: visible; }
.row-filters > h2, .row-filters > h3, .row-filters > .h3 { text-align: left; }
@media (max-width: 860px) {
  .row-filters { flex-direction: row; align-items: flex-end; }
  .row-filters > h2, .row-filters > h3, .row-filters > .h3 { flex: 1 1 100%; }
  .row-filters > .field { flex: 1 1 150px; }
  .row-filters > .btn { flex: none; }
}
.tile.kpi-switch { min-width: 0; }
.tile.kpi-switch span { overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 720px) { .tiles.kpi-switches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* The phone bar (nav.ts): the main tools one thumb-press away. The menu button in the header still opens everything. */
.bottom-bar { display: none; }
@media (max-width: 720px) {
  .bottom-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
  .bottom-bar a, .bottom-bar button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 650; line-height: 1.1; text-decoration: none; cursor: pointer; }
  .bottom-bar a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); }
  .bottom-bar a:focus-visible, .bottom-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* Find a tool (quicksearch.ts): the magnifier in the header, / or Ctrl+K */
.qs-btn { order: 79; margin-left: 8px; flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, color .15s; }
.qs-btn:hover { border-color: var(--accent); color: var(--accent); }
.qs-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.qs-open { overflow: hidden; }
.qs { position: fixed; inset: 0; z-index: 90; display: grid; align-items: start; justify-items: center; padding: min(12vh, 90px) 14px 14px; background: color-mix(in srgb, #05070d 62%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.qs-panel { width: min(640px, 100%); max-height: min(560px, calc(100vh - 28px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.qs-head { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.qs-head input { flex: 1; font-size: 1rem; }
.qs-close { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 8px 10px; border-radius: 10px; }
.qs-close:hover { background: var(--accent-soft); color: var(--accent-strong); }
.qs-list { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.qs-list li { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.qs-list li[aria-selected="true"] { background: var(--accent-soft); }
.qs-list li b { font-size: .98rem; }
.qs-list li span { color: var(--muted); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qs-list li small { color: var(--accent-strong); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.qs-list .qs-none { cursor: default; color: var(--muted); }
.qs-hint { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
@media (max-width: 720px) { .qs { padding-top: 12px; } .qs-panel { max-height: calc(100vh - 24px - 76px); } .qs-hint { display: none; } .qs-list li { min-height: 52px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Phone header: the menu, search and theme buttons sit together at the right */
@media (max-width: 720px) { .top-inner { column-gap: 8px; } .qs-btn, .theme-btn { margin-left: 0; } }

/* Recent addresses under an address box, and the first-time tip */
.recent-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 12px; font-size: .84rem; }
.recent-chip { max-width: 100%; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font: inherit; font-size: .84rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.recent-clear { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 5px 4px; }
.first-tip { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin: 0 0 16px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 14px; background: var(--accent-soft); }
.first-tip b { display: block; margin-bottom: 2px; color: var(--accent-strong); }
.first-tip p { margin: 0; font-size: .9rem; }
@media (max-width: 720px) {
  .first-tip { flex-direction: column; align-items: stretch; }
  .recent-chip, .recent-clear { min-height: 40px; display: inline-flex; align-items: center; }
  /* The copy / CSV / Excel buttons stay in view while a long table is scrolled */
  .pd-export { position: sticky; top: 68px; z-index: 6; padding: 8px 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}

/* Search on a phone sits at the top of the menu, not in the header */
.nav-find { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0 0 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.nav-find:hover, .nav-find:focus-visible { border-color: var(--accent); color: var(--ink); outline: none; }
@media (max-width: 720px) { .qs-btn { display: none; } }

/* Phones: wide tables scroll sideways but keep their first column (the name) in view, and the sticky export bar matches the card behind it */
@media (max-width: 720px) {
  .scrollbox table th:first-child, .scrollbox table td:first-child { position: sticky; left: 0; z-index: 2; max-width: 46vw; white-space: normal; overflow-wrap: anywhere; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
  .scrollbox thead th:first-child { z-index: 4; background: var(--surface-2); }
  .pd-export { background: color-mix(in srgb, var(--surface) 94%, transparent); }
}

/* Tab bars on a phone: one row you swipe sideways (not three wrapped rows); tabscroll.ts keeps the chosen tab in view */
@media (max-width: 720px) {
  .tabs, .cr-tabs, [role="tablist"] { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .tabs::-webkit-scrollbar, .cr-tabs::-webkit-scrollbar, [role="tablist"]::-webkit-scrollbar { display: none; }
  .tabs > *, .cr-tabs > *, [role="tablist"] > * { flex: none; white-space: nowrap; scroll-snap-align: center; }
  .tabs, .cr-tabs { padding: 6px; }
}

/* Phones, touch sizes found by measuring every tool page */
@media (max-width: 720px) {
  .bottom-bar a, .bottom-bar button { font-size: 11px; }
  .brand { min-height: 44px; }
  .crumb a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
  .gb-tabs button, .ps-tab, .ps-filter, .pd-seg, .pd-navitem, .pnav-item { min-height: 44px; }
  label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { min-height: 44px; display: flex; align-items: center; gap: 10px; }
}
.tag-you { font-size: max(.78rem, 11px); }

/* A row of fields: the tick box and the buttons line up with the bottom (the field box), not the middle of the label above it */
.use-gsc { align-self: end; min-height: 42px; }
.gsc-on .btn.small, .research-row > .btn.small { min-height: 42px; }

/* Phones: a field with flex-grow inside a column must not take its desktop width as a height (it left a 220 px gap above the Search Console box) */
@media (max-width: 860px) {
  .gsc-on .field.grow, .field.grow { flex: 0 0 auto; min-width: 0; }
  .gsc-on .use-gsc { align-self: flex-start; }
}

/* Phones: reading size. The fluid root size made body text about 13 px on a phone; phones get a 16 px root (body text 15 px, small notes 12.8 px) */
@media (max-width: 720px) { html { font-size: 16px; } }

/* When the phone keyboard opens the screen gets short: the bottom bar steps aside so it does not cover the field being typed in */
@media (max-height: 460px) { .bottom-bar { display: none; } body { padding-bottom: 0; } }

/* The Search Console / Analytics connection strip (connections.ts), the same on every tool: heading row, website list full width, buttons below */
.cx-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 560px)); gap: 12px; margin: 0 0 18px; }
.cx-chip { display: grid; gap: 10px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.cx-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chart-8); flex: none; }
.cx-chip.on .cx-dot { background: var(--cov-fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cov-fg) 22%, transparent); }
.cx-text { display: grid; line-height: 1.35; min-width: 0; }
.cx-text span { font-size: .86rem; color: var(--muted); }
.cx-list > summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--accent-strong); }
.cx-list ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cx-list li { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .86rem; overflow-wrap: anywhere; }
.cx-list li:last-child { border-bottom: 0; }
.cx-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .cx-actions > .btn { flex: 1 1 calc(50% - 6px); } }

/* Access levels and plans (accessplans.ts), and tools hidden by a person's access level (gate.ts) */
.vb-locked { display: none !important; }
#directory-panel:empty { display: none; }
.dir-editor { display: grid; gap: 14px; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.dir-editor .h4 { margin: 0; }
.dir-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 14px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.dir-tools[disabled] { opacity: .55; }
.dir-tools legend { padding: 0 6px; font-weight: 600; font-size: .9rem; }
.dir-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.dir-check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.dir-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-top: 10px; }
.dir-limits .field input { width: 100%; }
.dir-more > summary, .dir-levels > summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); min-height: 44px; display: flex; align-items: center; }
.dir-levels ul, .dir-mine { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.dir-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dir-used { font-size: .86rem; color: var(--muted); }
.dir-sub { display: block; font-size: .82rem; }
@media (max-width: 720px) { .dir-actions > .btn { flex: 1 1 calc(50% - 6px); } }

/* ---- App layout (appshell.ts, v0.65.0): left sidebar on wide screens, website switcher in the header ---- */
.side-nav { display: none; }
@media (min-width: 1200px) {
  body.has-side { padding-left: 256px; }
  body.has-side .top .brand { display: none; }
  body.has-side .top .nav-desk { display: none !important; }
  .side-nav { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 42; background: var(--surface); border-right: 1px solid var(--line); }
  .side-brand { padding: 16px 20px 14px; min-height: 68px; border-bottom: 1px solid var(--line); }
  .side-list { flex: 1; overflow-y: auto; padding: 12px 12px 24px; display: grid; align-content: start; gap: 4px; scrollbar-width: thin; }
  .side-group { padding-top: 6px; margin-top: 6px; border-top: 1px solid var(--line); }
  .side-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 10px; font-weight: 700; font-size: .92rem; color: var(--ink); cursor: pointer; }
  .side-group > summary::-webkit-details-marker { display: none; }
  .side-group > summary .ic { color: var(--muted); transition: transform .18s ease; }
  .side-group:not([open]) > summary .ic { transform: rotate(-90deg); }
  .side-group > summary:hover { background: var(--surface-2); }
  .side-item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: .92rem; font-weight: 550; text-decoration: none; }
  .side-item .ic { flex: none; opacity: .9; }
  .side-item:hover { background: var(--surface-2); color: var(--ink); }
  .side-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
  .side-sub { display: grid; gap: 2px; margin: 2px 0 4px 21px; padding-left: 12px; border-left: 1px solid var(--line); }
  .side-item.small { min-height: 36px; font-size: .86rem; padding: 0 10px; }
  .side-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  .side-foot:empty { display: none; }
  body.has-side .foot-site { margin-left: 0; }
}

.proj-switch { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 460px; }
.proj-switch[hidden] { display: none; }
.proj-btn { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.proj-btn:hover, .proj-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.proj-btn > .ic { margin-left: auto; flex: none; color: var(--muted); }
.proj-badge { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: .95rem; }
.proj-badge.has { background: var(--accent-soft); color: var(--accent-strong); }
.proj-text { display: grid; min-width: 0; line-height: 1.25; }
.proj-text b, .proj-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-text span { font-size: .8rem; color: var(--muted); }
.proj-open { flex: none; gap: 6px; }
.proj-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: min(440px, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); display: grid; gap: 8px; }
.proj-menu[hidden] { display: none; }
.proj-find { width: 100%; min-height: 44px; }
.proj-list { display: grid; gap: 2px; max-height: max(220px, 50vh); overflow-y: auto; }
.proj-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.proj-row:hover, .proj-row:focus-visible { background: var(--surface-2); }
.proj-row[aria-selected="true"] { background: var(--accent-soft); }
.proj-role { margin-left: auto; font-size: .78rem; color: var(--muted); flex: none; }
.proj-empty { margin: 6px 4px; color: var(--muted); font-size: .9rem; }
.proj-foot { display: flex; gap: 8px; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }
.proj-foot .btn { gap: 6px; }
.proj-add { flex: none; gap: 6px; }
@media (max-width: 1199px) { .proj-open, .proj-add { display: none; } }
@media (max-width: 1199px) {
  .top-inner { flex-wrap: wrap; }
  .proj-switch { order: 99; flex: 1 0 100%; padding-bottom: 8px; }
  .proj-btn { min-height: 46px; }
}

/* ---- Page header and summary cards used by the app pages (All websites first) ---- */
.app-page { padding-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; }
.page-head h1 { margin: 0 0 4px; }
.page-head .lede { margin: 0; max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-actions .btn { gap: 8px; }
.pj-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.pj-kpi { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.pj-kpi > div { display: grid; min-width: 0; }
.pj-kpi-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); }
.pj-kpi-label { font-size: .86rem; font-weight: 650; color: var(--muted); }
.pj-kpi-value { font-size: 1.7rem; line-height: 1.15; color: var(--ink); }
.pj-kpi-sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 14px; }
.pj-count { margin-left: auto; align-self: center; font-size: .88rem; }
.pj-site { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pj-site > div { display: grid; min-width: 0; }
.pj-url { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.pj-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pj-current { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; font-size: .84rem; font-weight: 700; color: var(--cov-fg); }
.btn.danger { color: var(--can-fg); }
.pj-add { display: grid; gap: 12px; }
.pj-add .h4 { margin: 6px 0 0; }
.pj-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2px 16px; margin-bottom: 10px; max-height: 320px; overflow: auto; }
.pj-connect { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pj-connect p { margin: 0; flex: 1 1 280px; }
.pj-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pj-members li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pj-members li > span:first-child { flex: 1 1 220px; overflow-wrap: anywhere; }
/* Sharing opens as a row right under the website it belongs to */
.pj-table-panel tr.pj-sharing > td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pj-share-row > td { padding: 0 10px 14px !important; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pj-share { margin-top: 0; max-width: 980px; background: var(--surface); }
.pj-share .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pj-share .h5 { margin: 4px 0 0; font-size: .9rem; }
.pj-share > p { margin: 0; }
.invite-note { display: grid; gap: 6px; }
.invite-note p { margin: 0; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-empty { display: grid; justify-items: start; gap: 10px; padding: 28px; }
.pj-empty p { margin: 0; max-width: 64ch; }
@media (max-width: 720px) {
  .pj-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pj-kpi { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .pj-kpi-ic { width: 36px; height: 36px; }
  .pj-kpi-value { font-size: 1.4rem; }
  .pj-kpi-sub { white-space: normal; }
  .pj-count { margin-left: 0; }
}
@media (min-width: 1200px) {
  body.has-side .proj-switch { flex: 1 1 auto; max-width: 820px; }
  body.has-side .proj-btn { flex: 0 1 440px; }
  body.has-side .proj-switch + .nav-desk + .nav-acct-slot { margin-left: auto; }
}

/* ---- Website overview (overview.ts, v0.66.0) ---- */
.ov-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ov-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 8px; }
.ov-sec-head h2 { margin: 0; }
.ov-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ov-note p { margin: 0; flex: 1 1 320px; }
.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.ov-kpi { display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.ov-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ov-kpi-label { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ov-kpi-value { font-size: 1.75rem; line-height: 1.1; color: var(--ink); }
.ov-spark { flex: none; overflow: visible; }
.ov-spark polyline { fill: none; stroke: var(--c, var(--accent)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.ov-chip.up { background: var(--cov-bg); color: var(--cov-fg); }
.ov-chip.down { background: var(--can-bg); color: var(--can-fg); }
.ov-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.ov-chart .h4 { margin: 0 0 6px; }
.ov-chart-box { min-height: 200px; }
.ov-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; font-size: .84rem; color: var(--muted); }
.ov-key::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; background: var(--c); vertical-align: -1px; }
.ov-url { overflow-wrap: anywhere; }
.ov-controls .research-row { align-items: end; }
.ov-small { font-size: .84rem; }
.ov-progress { display: grid; gap: 8px; }
.ov-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ov-bar > span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .4s ease; }
.ov-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ov-health { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; }
.ov-score { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.ov-score > div { display: grid; gap: 4px; min-width: 0; flex: 1 1 200px; }
.pd-arc.ov-d-great, .pd-arc.ov-d-good { stroke: var(--cov-fg); }
.pd-arc.ov-d-improve { stroke: var(--gap-fg); }
.pd-arc.ov-d-risk { stroke: var(--can-fg); }
.pd-arc.ov-d-rest { stroke: var(--surface-2); }
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.ov-stat { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ov-stat b { font-size: 1.35rem; color: var(--ink); }
.ov-stat span { font-size: .82rem; color: var(--muted); }
.ov-stat.good { --bar: var(--cov-fg); }
.ov-stat.bad { --bar: var(--can-fg); }
.ov-stat.bad b { color: var(--can-fg); }
.ov-changes { display: grid; gap: 8px; }
.ov-change > summary { cursor: pointer; font-weight: 650; min-height: 40px; display: flex; align-items: center; }
.ov-change.bad > summary { color: var(--can-fg); }
.ov-change.good > summary { color: var(--cov-fg); }
.ov-change ul, .ov-items { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: .88rem; overflow-wrap: anywhere; }
.ov-issues { display: grid; gap: 6px; }
.ov-issue { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--surface); }
.ov-issue[open] { padding-bottom: 12px; }
.ov-issue > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; }
.ov-issue-title { flex: 1 1 auto; min-width: 0; }
.ov-issue-count { flex: none; font-size: .9rem; }
.ov-issue p { margin: 6px 0; }
@media (max-width: 860px) { .ov-health { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ov-kpi { padding: 12px; }
  .ov-kpi-value { font-size: 1.35rem; }
  .ov-kpi { overflow: hidden; }
  .ov-kpi-top { flex-wrap: wrap; }
  .ov-spark { width: 72px; height: 22px; }
  .ov-issue > summary { flex-wrap: wrap; padding: 8px 0; }
}
.ov-track { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ov-track > div:nth-child(2) { display: grid; gap: 2px; flex: 1 1 300px; min-width: 0; }
.ov-track-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--cov-fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cov-fg) 22%, transparent); }
.ov-track-dot.off { background: var(--gap-fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gap-fg) 22%, transparent); }
.ov-track.warn { --bar: var(--gap-fg); }
.ov-track-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Admin console (admin.ts, v0.67.0) ---- */
.ad-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scrollbar-width: none; margin-bottom: 16px; }
.ad-tabs::-webkit-scrollbar { display: none; }
.ad-tab { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.ad-tab:hover { color: var(--ink); background: var(--surface-2); }
.ad-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.ad-badge { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .76rem; text-align: center; }
.ad-tab[aria-selected="true"] .ad-badge { background: var(--surface); color: var(--accent-strong); }
.ad-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.ad-grid .h4 { margin: 0 0 8px; }
.ad-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.linkish { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; min-height: 0; }
.ad-meters { display: grid; gap: 10px; }
.ad-meter-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: .9rem; }
.ad-meter-row b { font-size: .84rem; white-space: nowrap; }
.ad-meter { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.ad-meter > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--cov-fg); }
.ad-meter.near > i { background: var(--gap-fg); }
.ad-meter.full > i { background: var(--can-fg); }
.ad-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.ad-tools .field { min-width: 150px; }
.ad-tool-actions { display: flex; gap: 10px; margin-left: auto; }
.ad-tool-actions .btn { gap: 8px; }
.ad-bulk { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 14px; background: var(--accent-soft); }
.ad-bulk select { min-height: 40px; }
.ad-count { margin: 0 0 10px; font-size: .88rem; }
.ad-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-who > div { display: grid; min-width: 0; }
.ad-who b { overflow-wrap: anywhere; }
.ad-who .muted { font-size: .8rem; }
.nav-avatar.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cov-fg) 55%, transparent); }
.ad-use { display: grid; grid-template-columns: minmax(60px, 1fr) auto; align-items: center; gap: 8px; min-width: 110px; }
.ad-use span { font-size: .82rem; color: var(--muted); }
.ad-detail { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.ad-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.ad-plan { display: grid; gap: 12px; align-content: start; }
.ad-plan-head { display: flex; justify-content: space-between; gap: 10px; }
.ad-plan-head .h4 { margin: 0; }
.ad-plan-head > div { display: grid; gap: 2px; }
.ad-plan-people { flex: none; font-size: .84rem; color: var(--accent-strong); }
.ad-limits { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 0; font-size: .88rem; }
.ad-limits dt { color: var(--muted); }
.ad-limits dd { margin: 0; font-weight: 700; text-align: right; }
.ad-plan-new { place-items: center; place-content: center; min-height: 220px; border-style: dashed; color: var(--muted); font: inherit; cursor: pointer; text-align: center; }
.ad-plan-new:hover { color: var(--accent-strong); border-color: var(--accent); }
.ad-setups { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ad-setup { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ad-setup > div { display: grid; gap: 2px; }
.ad-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; flex: none; background: var(--gap-fg); }
.ad-setup.on .ad-dot { background: var(--cov-fg); }

/* Side panel */
.dw-back { position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--ink) 35%, transparent); }
.dw { position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; width: min(560px, 100vw); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.dw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dw-head .h3 { margin: 0; overflow-wrap: anywhere; }
.dw-head > div { display: grid; gap: 2px; min-width: 0; }
.dw-body { overflow-y: auto; padding: 16px 20px; display: grid; gap: 18px; align-content: start; }
.dw-sec { display: grid; gap: 12px; }
.dw-sec .h4 { margin: 0; }
.dw-body .field { display: grid; gap: 6px; }
.dw-body .field > select, .dw-body .field > input { width: 100%; }
.dw-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
html.dw-open { overflow: hidden; }
@media (max-width: 720px) {
  .ad-tool-actions { margin-left: 0; width: 100%; }
  .ad-tool-actions .btn { flex: 1 1 0; }
  .ad-tools .field { min-width: 0; flex: 1 1 calc(50% - 6px); }
  .ad-tools .field.grow { flex-basis: 100%; }
  .ad-bulk { top: 112px; }
  .ad-meter-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ad-meter-row .ad-meter { grid-column: 1 / -1; grid-row: 2; }
  .dw { width: 100vw; }
}

/* ---- One check box and one radio button for every page (v0.67.0): drawn the same in every browser, day and night ---- */
input[type="checkbox"], input[type="radio"] { -webkit-appearance: none; appearance: none; display: inline-grid; place-content: center; box-sizing: border-box; border: 1.5px solid color-mix(in srgb, var(--muted) 70%, var(--line)); background: var(--surface); cursor: pointer; transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease; vertical-align: middle; }
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before { content: ""; width: 10px; height: 5px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .12s ease; }
input[type="radio"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); transform: scale(0); transition: transform .12s ease; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:indeterminate { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:indeterminate::before { width: 10px; height: 0; border-left: 0; transform: none; }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--accent); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; opacity: .45; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { cursor: pointer; }
label:has(> input:disabled) { cursor: not-allowed; color: var(--muted); }

/* Sidebar header with the fold arrow, and the folded (icons only) sidebar */
.render-off { margin: 4px 0 0 30px; font-size: .84rem; }
@media (min-width: 1200px) {
  /* Only when the person folds or opens the menu: never on page load (the page used to slide in from the left on every visit) */
  body.side-anim .side-nav { transition: width .18s ease; }
  body.has-side.side-anim { transition: padding-left .18s ease; }
  .side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 68px; padding: 0 10px 0 20px; border-bottom: 1px solid var(--line); }
  .side-top .side-brand { padding: 0; min-height: 0; border: 0; min-width: 0; overflow: hidden; }
  .side-fold { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; }
  .side-fold:hover { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
  .side-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .side-fold .ic { transform: rotate(90deg); transition: transform .18s ease; }
  body.side-slim .side-fold .ic { transform: rotate(-90deg); }
  body.has-side.side-slim { padding-left: 76px; }
  body.side-slim .side-nav { width: 76px; }
  body.side-slim .side-top { flex-direction: column; justify-content: center; gap: 8px; padding: 10px 0; min-height: 108px; }
  body.side-slim .side-brand .brand-text { display: none; }
  body.side-slim .side-list { padding: 10px 8px 24px; }
  body.side-slim .side-item { justify-content: center; padding: 0; min-height: 44px; }
  body.side-slim .side-item > span, body.side-slim .side-sub { display: none; }
  body.side-slim .side-group > summary { min-height: 10px; padding: 0; pointer-events: none; }
  body.side-slim .side-group > summary > * { display: none; }
  body.side-slim .side-group:not([open]) > .side-item { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .side-nav, body.has-side, body.side-anim .side-nav, body.has-side.side-anim, .side-fold .ic { transition: none; } }

/* QA fixes (v0.67.0): smallest text is 12px, touch-size header buttons on phones, four AI fields in one row, dashboard controls fit a phone */
.tag, .pd-navhead, .pd-pill { font-size: max(12px, .75rem); }
.research-row.lt-four { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: end; }
@media (max-width: 720px) {
  .theme-btn, .qs-btn { width: 44px; height: 44px; }
  .pd-controls > .field, .pd-controls > label.field.grow { flex: 1 1 100%; min-width: 0; }
  .pd-controls .field input, .pd-controls .field select { width: 100%; min-width: 0; }
}
@media (max-width: 720px) { .linkish { display: inline-flex; align-items: center; min-height: 44px; } }
/* Change labels sit on the tinted metric cards: a touch deeper so they stay readable (4.5:1) */
.pd-kpi .pd-chg.up { color: color-mix(in srgb, var(--cov-fg) 82%, var(--ink)); }
.pd-kpi .pd-chg.down { color: color-mix(in srgb, var(--can-fg) 82%, var(--ink)); }

/* "How this works": the same closed card at the bottom of every tool's start screen (v0.68.0) */
details.how { max-width: none; margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 2px 18px; }
details.how > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
details.how[open] { padding-bottom: 14px; }
details.how > ul, details.how > .how-body { margin: 4px 0 0; padding-left: 20px; color: var(--muted); }
details.how li { margin: 6px 0; }

/* Plan limit notice (src/client/limitnotice.ts) */
.vb-limit { position: fixed; z-index: 90; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--gap-bd); box-shadow: var(--shadow-lg); }
.vb-limit p { margin: 0; flex: 1 1 260px; line-height: 1.45; }
@media (max-width: 720px) { .vb-limit { bottom: 84px; } }

/* The plan bar under each tool's heading (src/client/planwidget.ts) and the shared plan pieces */
.plan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; }
.plan-chip { display: inline-block; padding: 3px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .8rem; letter-spacing: .02em; white-space: nowrap; }
.plan-item { display: inline-flex; flex-direction: column; gap: 4px; min-width: 190px; }
.plan-item.near > span:first-child { color: var(--gap-fg); font-weight: 700; }
.plan-item.out > span:first-child { color: var(--can-fg); font-weight: 700; }
.plan-meter { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.plan-meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.plan-item.near .plan-meter i, .pl-row.near .plan-meter i { background: var(--gap-fg); }
.plan-item.out .plan-meter i, .pl-row.out .plan-meter i { background: var(--can-fg); }
.plan-text { color: var(--muted); }
.plan-links { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.plan-links a:not(.btn) { color: var(--accent); font-weight: 600; }
@media (max-width: 720px) { .plan-links { margin-left: 0; } .plan-item { min-width: 100%; } }

/* Phones: every sortable table (class st-cards, added by sortableTable) is a stack of cards. The first cell is the title of the card, the others sit under their
   labels in two columns, so a column can never be squeezed to one letter per line. Tables with their own card layout (.tbl, .cl-table, .tm-table) keep it. */
@media (max-width: 720px) {
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) { display: block; width: 100%; min-width: 0; max-width: 100%; overflow: visible; border: 0; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > thead { display: none; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > tbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > tbody > tr > td { display: block; width: auto !important; min-width: 0 !important; max-width: none; padding: 0; border: 0; white-space: normal !important; text-align: left; overflow-wrap: anywhere; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > tbody > tr > td:first-child { grid-column: 1 / -1; font-weight: 650; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > tbody > tr > td:empty { display: none; }
  table.st-cards:not(.tbl):not(.cl-table):not(.tm-table):not(.wr-qa) > tbody > tr > td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
  .scrollbox:has(table.st-cards) { max-height: none; overflow: visible; border: 0; background: none; }
}
@media (max-width: 720px) { .pd-link-btn { padding-block: 8px; min-height: 36px; display: inline-flex; align-items: center; } }

/* Shared by several tools (they used to live in one tool's stylesheet, so other pages showed them unstyled) */
.volbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 10px 0 14px; }
.volbar-t { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); align-self: center; flex: 1 1 100%; }
.volbar .field { flex: 0 1 190px; min-width: 0; }
.volbar .field select { width: 100%; }
.volbar > .btn { flex: none; }
.volbar > .muted { flex: 1 1 100%; }
.wr-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.wr-actions > a:not(.btn) { margin-left: 4px; }
@media (max-width: 720px) { .volbar .field { flex: 1 1 100%; } .volbar > .btn { flex: 1 1 100%; } }

/* Sign-in popup (gate.ts): the page stays visible behind a soft veil */
.gate.gate-modal { background: color-mix(in srgb, var(--ink) 48%, transparent); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.gate-card { position: relative; }
.gate-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.gate-close:hover { background: var(--surface-2); color: var(--ink); }
.gate-later { justify-self: center; }
