/* Planditor. Direction: a surveyor's night desk. Graphite surfaces, one phosphor green accent, mono figures.
   Spacing on a 4px grid, one easing curve, depth from surface steps and hairlines (unslop tokens, apple-design motion). */
:root {
  --deep: #0f0f10; --bg: #141415; --card: #19191b; --raised: #232325; --raised-2: #2a2a2d;
  --line: rgba(237, 237, 237, .08); --line-2: rgba(237, 237, 237, .05); --line-strong: rgba(237, 237, 237, .14);
  --text: #ededed; --text-2: #a1a1a6; --muted: #85858b;
  --accent: #3ecf8e; --accent-ink: #0b1a12; --accent-soft: rgba(62, 207, 142, .12); --accent-line: rgba(62, 207, 142, .32);
  --amber: #e5b454; --amber-soft: rgba(229, 180, 84, .12); --red: #e5484d; --red-soft: rgba(229, 72, 77, .12);
  --blue: #7aa7ff; --blue-soft: rgba(122, 167, 255, .12); --violet: #b59cff; --violet-soft: rgba(181, 156, 255, .12);
  --ease: cubic-bezier(.22, 1, .36, 1); --fast: 140ms; --mid: 200ms; --slow: 360ms;
  --r-sm: 6px; --r: 8px; --r-card: 12px; --r-panel: 16px;
  --sans: "Geist", "Segoe UI", system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/20px var(--sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
button, .btn, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* buttons */
button, .btn { height: 32px; border: 1px solid var(--line); background: var(--raised); border-radius: var(--r); padding: 0 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--text);
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
button:hover, .btn:hover { background: var(--raised-2); border-color: var(--line-strong); }
button:active, .btn:active { transform: scale(.98); }
button:focus-visible, .btn:focus-within, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 500; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
button.primary:hover { background: #52d89b; }
button:disabled { opacity: .4; cursor: default; transform: none; }
.ghost, button.ghost { background: transparent; }
.ghost:hover { background: var(--raised); }
.icon-btn { width: 32px; padding: 0; justify-content: center; }
button.wide { width: 100%; justify-content: center; height: 40px; }   /* the login button only: .modal.wide is a dialog size */
.muted { color: var(--muted); margin: 0; }
.err { color: var(--red); min-height: 20px; margin: 0; font-size: 13px; }
input, select, textarea { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); }
select { height: 32px; padding: 0 28px 0 10px; appearance: none; cursor: pointer;
  background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' stroke='%2385858b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") right 8px center/16px no-repeat; }
kbd { font: 11px/16px var(--mono); color: var(--muted); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; }

/* brand: the wordmark plus a flat contour mark */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand .mark { width: 24px; height: 24px; border-radius: 6px; background: url("/icon.svg?v=2") center/100% no-repeat; flex: none; }
.brand.big { font-size: 18px; } .brand.big .mark { width: 28px; height: 28px; }
.credit { display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 1.2; font-size: 15px; }
.credit a { color: var(--accent); text-decoration: none; }
.credit a:hover { text-decoration: underline; }
.credit small { font-size: 11px; line-height: 1.45; font-weight: 400; color: var(--text-2); letter-spacing: 0; }

/* auth */
#auth, #twofa { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--deep); }
.auth-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 32px; display: grid; gap: 16px; }
.auth-card label { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.auth-card input { height: 40px; padding: 0 12px; }
.switch { text-align: center; font-size: 13px; } .switch a { color: var(--accent); text-decoration: none; }

/* shell: sidebar + main */
.shell { height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.side { background: var(--deep); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side > .brand { padding: 20px 16px 18px; gap: 12px; flex: none; border-bottom: 1px solid var(--line); }
.side > .brand .mark { width: 32px; height: 32px; }
.pickers { padding: 14px 12px 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.pick { display: grid; gap: 4px; }
.pick-label { font-size: 12px; color: var(--muted); padding-left: 2px; }
.pick select { width: 100%; }
.pick-row { display: flex; gap: 4px; } .pick-row select { flex: 1; min-width: 0; }
#nav { flex: 1; overflow-y: auto; padding: 8px 8px 8px; }
.nav-label { font-size: 12px; color: var(--muted); padding: 0 8px; margin: 16px 0 4px; display: flex; align-items: center; width: 100%; height: 20px; border: 0; background: none; text-align: left; cursor: pointer; }
button.nav-label:hover { color: var(--text-2); background: none; border: 0; }
.nav-label .fold { margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.nav-label.folded .fold { transform: rotate(-45deg); }
.nav-label:first-child { margin-top: 8px; }
.nav-item { width: 100%; height: 32px; border: 0; background: transparent; border-radius: var(--r); padding: 0 8px; gap: 10px; color: var(--text-2); margin-bottom: 2px; }
.nav-item:hover { background: var(--card); border: 0; color: var(--text); }
.nav-item.active { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.nav-item.active svg.i { color: var(--accent); }
.nav-item .count { margin-left: auto; font: 12px/16px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.side-foot { position: relative; border-top: 1px solid var(--line); padding: 8px; }
.account { width: 100%; height: 48px; border: 0; background: transparent; padding: 0 8px; gap: 10px; text-align: left; }
.account:hover { background: var(--card); border: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--raised-2); display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: none; }
.who { display: grid; min-width: 0; line-height: 16px; } .who b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.menu { position: absolute; left: 8px; right: 8px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 4px; z-index: 20;
  box-shadow: 0 12px 32px rgba(0,0,0,.45); transform-origin: bottom left; animation: rise var(--mid) var(--ease); }
.menu.up { bottom: 60px; }
.menu button { width: 100%; height: 32px; border: 0; background: transparent; justify-content: flex-start; color: var(--text-2); }
.menu button:hover { background: var(--raised); color: var(--text); }
@keyframes rise { from { opacity: 0; transform: translateY(4px) scale(.98); } }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: 56px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.title h1 { margin: 0; font-size: 16px; font-weight: 500; white-space: nowrap; }
#crumb { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { flex: 1; max-width: 360px; margin-left: auto; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 10px; width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.5; stroke-linecap: round; }
.search input { width: 100%; height: 32px; padding: 0 32px 0 32px; }
.search kbd { position: absolute; right: 8px; }
.actions { display: flex; align-items: center; gap: 8px; }
.sync { font: 12px/16px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .9; }
.sync.off::before { background: var(--muted); }
.role { font-size: 12px; color: var(--text-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; text-transform: capitalize; }
.undo-group { display: flex; gap: 2px; }
.undo-group .icon-btn { border-color: transparent; background: transparent; }
.undo-group .icon-btn:hover:not(:disabled) { background: var(--raised); }

/* toolbar: figures + quick filters */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 16px 24px 0; flex-wrap: wrap; }
.toolbar:empty { display: none; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 132px; }
.kpi b { font: 500 22px/28px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi span { color: var(--muted); font-size: 12px; line-height: 16px; }
.kpi.g b { color: var(--accent); } .kpi.a b { color: var(--amber); } .kpi.r b { color: var(--red); }
.chips { display: inline-flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; }
.chip { height: 28px; border: 0; border-radius: var(--r-sm); padding: 0 10px; color: var(--text-2); background: transparent; font-size: 13px; }
.chip:hover { background: var(--raised); border: 0; color: var(--text); }
.chip.on { background: var(--raised-2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
label.chip { display: inline-flex; align-items: center; cursor: pointer; border: 1px solid var(--line); }
.toolbar input:not([type=checkbox]) { height: 32px; padding: 0 10px; }
.gsc-kpis { display: flex; gap: 8px; flex-basis: 100%; }
.gsc-kpis .kpi:first-child b { font-size: 28px; line-height: 32px; color: var(--accent); }

/* grid */
#gridWrap { flex: 1; overflow: auto; margin: 16px 24px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); position: relative; }
table { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
th, td { height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
th { position: sticky; top: 0; z-index: 3; background: var(--card); color: var(--muted); font-weight: 400; font-size: 12px; border-bottom: 1px solid var(--line); }
th.num, td.num { position: sticky; left: 0; z-index: 2; width: 48px; text-align: right; color: var(--muted); font: 12px var(--mono); font-variant-numeric: tabular-nums; padding-right: 12px; background: inherit; }
th.num { z-index: 4; background: var(--card); }
tbody tr { background: var(--card); transition: background-color var(--fast) var(--ease); }
tbody tr:hover { background: #1e1e20; }
tbody tr.wait { background: #1f1c15; } tbody tr.wait:hover { background: #24201a; }
tbody tr.done td:not(.num):not(.act) { color: var(--text-2); }
tbody tr.current td.open-site { box-shadow: inset 2px 0 0 var(--accent); }
td.edit { cursor: text; }
td.editing { padding: 0 4px; box-shadow: inset 0 0 0 1px var(--accent); background: var(--raised); overflow: visible; }
td input, td select { width: 100%; height: 28px; border: 0; padding: 0 8px; background: transparent; outline: none; }
td a, .lnk { color: var(--text); text-decoration: none; }
td a:hover { color: var(--accent); }
.lnk small { color: var(--muted); margin-right: 4px; }
.dom { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.dom img { width: 16px; height: 16px; border-radius: 4px; flex: none; }
td.open-site { cursor: pointer; } td.open-site:hover .dom { color: var(--accent); }
.numv { font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.quick, .quick { color: var(--accent); }   /* signature: positions 5-20, within reach */

/* pills: quiet, each colour means one thing */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; background: var(--raised); color: var(--text-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-done, .c-yes, .st-published, .k-micro { color: var(--accent); background: var(--accent-soft); }
.s-doing, .c-posted, .st-writing { color: var(--blue); background: var(--blue-soft); }
.c-wait, .c-warm, .st-review, .sv-medium { color: var(--amber); background: var(--amber-soft); }
.c-max, .c-join, .sv-high { color: var(--red); background: var(--red-soft); }
.sv-critical { color: #fff; background: var(--red); }
.st-update { color: var(--violet); background: var(--violet-soft); }
.s-skip { color: var(--muted); text-decoration: line-through; }
.prio { font: 500 11px/16px var(--mono); padding: 2px 6px; border-radius: 4px; margin-right: 8px; background: var(--raised); }
.p1 { color: var(--accent); } .p2 { color: var(--amber); } .p3 { color: var(--muted); }
.prio-note { color: var(--text-2); }
.reply-cell { color: var(--text-2); }
td.act { padding: 0 8px; text-align: right; }
td.act .mini { height: 26px; padding: 0 10px; font-size: 12px; }
td.act .mini.go { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
td.act .del { height: 26px; border: 0; background: none; color: var(--muted); padding: 0 6px; opacity: 0; }
tr:hover td.act .del { opacity: 1; } td.act .del:hover { color: var(--red); background: var(--red-soft); }
.empty { padding: 64px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-weight: 500; font-size: 15px; margin-bottom: 8px; }

/* modals, menus, toasts */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 30; padding: 24px; animation: fade var(--mid) var(--ease); }
.modal { width: min(760px, 100%); max-height: 86vh; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-panel); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5); animation: rise var(--slow) var(--ease); }
.modal.wide { width: min(980px, 100%); }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal header b { display: block; font-weight: 500; } .modal header a { font-size: 12px; color: var(--accent); word-break: break-all; }
.modal .body { padding: 16px 20px; overflow: auto; display: grid; gap: 12px; }
.modal textarea { flex: 1; min-height: 320px; border: 0; border-radius: 0; padding: 16px 20px; resize: none; outline: none; line-height: 22px; background: var(--card); }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.modal footer .muted { margin-right: auto; font-size: 12px; }
.users { width: 100%; } .users th, .users td { height: auto; padding: 12px 8px; white-space: normal; vertical-align: top; position: static; background: none; }
.site-checks { display: flex; flex-wrap: wrap; gap: 4px; }
.site-checks label { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; cursor: pointer; color: var(--text-2); }
.site-checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.site-checks input { margin: 0; accent-color: var(--accent); }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-row input, .form-row select, .users select { height: 32px; padding: 0 10px; }
.form-row select, .users select { padding-right: 28px; }
.section-title { font-weight: 500; margin: 8px 0 0; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } ul.plain li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 40; }
.toast { display: flex; align-items: center; gap: 16px; background: var(--raised); border: 1px solid var(--line-strong); color: var(--text); padding: 10px 16px; border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(0,0,0,.45); max-width: 520px; animation: rise var(--slow) var(--ease); }
.toast.bad { border-color: rgba(229,72,77,.4); }
.toast button { height: auto; background: transparent; border: 0; color: var(--accent); font-weight: 500; padding: 0; }
@keyframes fade { from { opacity: 0; } }

/* small screens: the sidebar folds into the top */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 100vh; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  #nav { max-height: 40vh; } .side-foot { display: none; }
  .top { flex-wrap: wrap; height: auto; padding: 12px 16px; } .search { order: 9; max-width: none; flex-basis: 100%; }
  #gridWrap { margin: 12px 16px 16px; } .toolbar { padding: 12px 16px 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
@media (prefers-contrast: more) { :root { --line: rgba(237,237,237,.22); --line-2: rgba(237,237,237,.14); --muted: #a1a1a6; } }
th.sortable { cursor: pointer; user-select: none; transition: color var(--fast) var(--ease); }
th.sortable:hover { color: var(--text); }
th.sorted { color: var(--text); }
th .arrow { margin-left: 4px; font-family: var(--mono); color: var(--accent); }

/* Search Console: range line, the metric cards + chart (the screen's one rich moment), the table's own controls */
.gsc-range { font: 12px/16px var(--mono); color: var(--muted); margin-left: auto; }
.gsc-range.busy { color: var(--accent); }
.gsc-panel { flex-basis: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; transition: opacity var(--mid) var(--ease); }
.gsc-panel.busy { opacity: .55; }
.gsc-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.metric { height: auto; border: 0; border-radius: 0; background: transparent; display: grid; gap: 4px; justify-items: start; padding: 16px 20px; border-right: 1px solid var(--line); box-shadow: inset 0 2px 0 transparent; }
.metric:last-child { border-right: 0; }
.metric:hover { background: var(--raised); border-color: var(--line); }
.metric:active { transform: none; }
.metric.on { box-shadow: inset 0 2px 0 var(--c); }
.metric-label { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.metric-label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--line-strong); }
.metric.on .metric-label::before { background: var(--c); border-color: var(--c); }
.metric b { font: 500 28px/32px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.metric:not(.on) b { color: var(--text-2); }
.gsc-chart { padding: 12px 20px 8px; }
.gsc-plot { position: relative; height: 212px; }
.gsc-plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gsc-chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gsc-chart .line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.gsc-x { position: relative; height: 20px; margin-top: 4px; }
.gsc-x span { position: absolute; transform: translateX(-50%); font: 11px/16px var(--mono); color: var(--muted); white-space: nowrap; }
.gsc-x span:first-child { transform: none; } .gsc-x span:last-child { transform: translateX(-100%); }
.gsc-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-strong); pointer-events: none; }
.gsc-tip { position: absolute; top: 8px; min-width: 176px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 12px; font-size: 12px; pointer-events: none; display: grid; gap: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.gsc-tip b { font-weight: 500; }
.gsc-tip div { display: flex; align-items: center; gap: 8px; color: var(--text-2); } .gsc-tip i { width: 8px; height: 8px; border-radius: 2px; }
.gsc-tip span { margin-left: auto; color: var(--text); font-family: var(--mono); }
.empty-chart { height: 240px; display: grid; place-items: center; color: var(--muted); }
.gsc-tablebar { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#gridWrap.loading { opacity: .55; transition: opacity var(--mid) var(--ease); }
@media (max-width: 860px) { .gsc-metrics { grid-template-columns: repeat(2, 1fr); } }

/* Inside the Windows app (body.desktop): the 56px header is the title bar. Drag the window by it; Windows puts its
   minimise / maximise / close buttons over its right end, so keep 144px free there. Controls inside stay clickable. */
body.desktop .top, body.desktop .side > .brand { -webkit-app-region: drag; user-select: none; }
body.desktop .top { padding-right: 152px; }
body.desktop .top :is(button, input, select, label, a, .search, kbd, #sync, .role), body.desktop .side > .brand * { -webkit-app-region: no-drag; }
body.desktop .side > .brand .mark, body.desktop .side > .brand span { -webkit-app-region: drag; }
body.desktop #auth::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 56px; -webkit-app-region: drag; }

/* Topical map picture */
#mapView { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 50%, #1b1b1e 0, var(--card) 60%); }
.map-svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; }
.map-svg.grabbing { cursor: grabbing; }
.map-svg text { font-family: var(--sans); }
.hub-ring { fill: none; stroke: var(--accent); stroke-opacity: .25; stroke-width: 1; }
.hub-core { fill: var(--raised-2); stroke: var(--line-strong); }
.hub-core.live { stroke: var(--accent); }
.hub-label { fill: var(--text); font-size: 14px; font-weight: 500; text-anchor: middle; }
.hub-sub { fill: var(--muted); font-size: 10px; text-anchor: middle; font-family: var(--mono) !important; }
.map-hub, .map-page, .topic-label { cursor: pointer; }
.map-topic .cloud { fill-opacity: .04; stroke-opacity: .12; stroke-width: 1; }
.map-topic.dim { opacity: .18; transition: opacity var(--mid) var(--ease); }
.map-page circle { transition: transform var(--fast) var(--ease); transform-box: fill-box; transform-origin: center; }
.map-page:hover circle { transform: scale(1.25); }
.map-page.sel circle:last-child { stroke: var(--text) !important; stroke-width: 2 !important; stroke-dasharray: none !important; }
.map-page .reach { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.topic-label text { font-size: 15px; text-anchor: middle; font-weight: 500; }
.map-legend { position: absolute; top: 12px; left: 12px; width: 240px; max-height: calc(100% - 72px); overflow: hidden auto; display: grid; gap: 2px; padding: 8px;
  background: rgba(15,15,16,.86); border: 1px solid var(--line); border-radius: var(--r-card); backdrop-filter: blur(8px); }
.leg { height: 28px; border: 0; background: transparent; justify-content: flex-start; gap: 8px; padding: 0 8px; color: var(--text-2); font-size: 13px; }
.leg:hover, .leg.on { background: var(--raised); border: 0; color: var(--text); }
.leg.dim { opacity: .45; }
.leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.leg span { overflow: hidden; text-overflow: ellipsis; }
.leg small { margin-left: auto; font: 11px var(--mono); color: var(--muted); }
.map-key { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 16px; align-items: center; padding: 8px 12px; font-size: 12px; color: var(--text-2);
  background: rgba(15,15,16,.86); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(8px); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-live { background: var(--text-2); } .k-part { background: rgba(161,161,166,.45); } .k-miss { border: 1.5px dashed var(--text-2); }
.k-reach { border: 1.5px solid var(--accent); }
.map-panel { position: absolute; top: 12px; right: 12px; width: 320px; max-height: calc(100% - 24px); overflow: auto; padding: 16px; display: grid; gap: 10px;
  background: rgba(25,25,27,.94); border: 1px solid var(--line-strong); border-radius: var(--r-card); backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: rise var(--slow) var(--ease); }
.map-panel header { display: flex; align-items: flex-start; gap: 8px; } .map-panel header b { font-weight: 500; font-size: 15px; flex: 1; }
.map-panel .miss { color: var(--amber); font-size: 13px; }
.map-panel .sec li { font-size: 13px; }
.map-tip { position: absolute; z-index: 5; max-width: 300px; padding: 10px 12px; display: grid; gap: 4px; font-size: 12px; pointer-events: none;
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.map-tip b { font-weight: 500; font-size: 13px; }
#gridWrap:has(#mapView) { overflow: hidden; }

/* The owner's Planditor card (BMS Promo plugin, "3. Planditor card"), at the foot of the left sidebar */
.promo-side { padding: 0 12px 12px; }
.promo-card { display: grid; gap: 10px; padding: 12px; border-radius: var(--r-card); border: 1px solid var(--line); }
.promo-card .promo-kicker { font: 10.5px var(--mono); opacity: .65; }
.promo-card img { width: 100%; height: auto; border-radius: var(--r); display: block; }
.promo-card h3 { font-size: 14px; font-weight: 600; line-height: 1.3; margin: 0; }
.promo-card p { font-size: 12.5px; line-height: 1.45; margin: 0; opacity: .85; }
.promo-card a.promo-btn { display: inline-flex; justify-content: center; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.promo-card a.promo-btn:hover { filter: brightness(1.1); }

/* Site audit */
.audit-progress { flex-basis: 100%; display: grid; gap: 8px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.audit-progress-top { display: flex; justify-content: space-between; gap: 12px; }
.audit-bar { height: 6px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.audit-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width var(--slow) var(--ease); }
.audit-current { font: 12px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-cards { flex-basis: 100%; display: grid; grid-template-columns: 120px repeat(7, minmax(0, 1fr)); gap: 8px; }
.audit-cards .kpi.click { cursor: pointer; } .audit-cards .kpi.click:hover { border-color: var(--line-strong); }
.audit-health { display: grid; place-content: center; text-align: center; border-radius: var(--r-card); border: 1px solid var(--line); background:
  conic-gradient(var(--accent) calc(var(--h) * 1%), var(--raised) 0) border-box; -webkit-mask: none; position: relative; }
.audit-health::before { content: ""; position: absolute; inset: 6px; background: var(--card); border-radius: 9px; }
.audit-health b, .audit-health span { position: relative; } .audit-health b { font: 600 28px var(--mono); } .audit-health span { font-size: 12px; color: var(--muted); }
.audit-level { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--raised); color: var(--text-2); }
.audit-level.r { background: var(--red-soft); color: var(--red); } .audit-level.a { background: var(--amber-soft); color: var(--amber); }
tr.audit-issue { cursor: pointer; } tr.audit-issue:hover td { background: var(--raised); } tr.audit-issue.open td { background: var(--card); }
.audit-caret { color: var(--muted); font-size: 11px; }
tr.audit-detail td { background: var(--card); white-space: normal; padding: 12px 16px 16px; }
.audit-why { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.audit-why b { font-size: 12px; color: var(--muted); font-weight: 500; } .audit-why p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.audit-items { display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.audit-item { display: flex; gap: 12px; align-items: baseline; font-size: 13px; min-width: 0; } .audit-item a { flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.bad { color: var(--red); }
.audit-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; font-size: 13px; } .audit-kv span:last-child { overflow-wrap: anywhere; }
.audit-kv ul { margin: 0; padding-left: 16px; }
@media (max-width: 1100px) { .audit-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } .audit-why { grid-template-columns: 1fr; } }
#auditPanel { position: fixed; top: 72px; right: 16px; z-index: 20; max-height: calc(100vh - 88px); }

/* two-factor set-up */
.twofa-card { width: min(440px, 100%); }
.twofa-title { margin: 0; font-size: 18px; font-weight: 600; }
.twofa-steps { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.twofa-qr { justify-self: center; width: 200px; background: #fff; border-radius: var(--r); padding: 8px; }
.twofa-qr svg { display: block; width: 100%; height: auto; }
.twofa-key summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.twofa-key code { display: block; margin-top: 8px; font: 14px var(--mono); letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }
.twofa-form { display: grid; gap: 12px; }
.twofa-form label { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.twofa-form input { height: 40px; padding: 0 12px; font: 16px var(--mono); letter-spacing: .2em; }
.twofa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.twofa-codes code { font: 15px var(--mono); padding: 8px 10px; background: var(--raised); border-radius: var(--r); text-align: center; user-select: all; }
.twofa-row { display: flex; gap: 8px; } .twofa-row button { flex: 1; }

/* My profile */
.profile-field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.profile-field input { height: 38px; padding: 0 12px; }
.profile-proof { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.profile-proof[hidden] { display: none; } .profile-proof p { margin: 0; }

/* Send to Claude: numbered setup steps */
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
ol.steps b { color: var(--text); font-weight: 500; }

/* sidebar: Niche Miner, above the account button */
.nm-side { width: 100%; height: 32px; margin-bottom: 6px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--text-2); font-size: 13px; cursor: pointer; }
.nm-side::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3, #666); flex: none; }
.nm-side.on::before { background: var(--accent); }
.nm-side:hover { color: var(--text); background: var(--raised); }

/* off-page Plan board: a column per week */
#boardView { position: absolute; inset: 0; overflow: auto; display: flex; gap: 12px; padding: 16px; align-items: flex-start; }
.bcol { flex: 0 0 280px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel, 12px); max-height: 100%; }
.bcol.now { border-color: var(--accent-line); }
.bcol.drop { background: var(--accent-soft); }
.bcol > header { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.bcol > header .muted { margin-left: auto; font: 12px var(--mono); }
.bnow { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.bbar { height: 3px; border-radius: 3px; background: var(--raised); overflow: hidden; } .bbar i { display: block; height: 100%; background: var(--accent); }
.blist { display: grid; gap: 8px; overflow: auto; min-height: 8px; }
.bcard { padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); display: grid; gap: 6px; cursor: grab; }
.bcard.done .btask { color: var(--text-2); text-decoration: line-through; } .bcard.skip { opacity: .5; }
.btop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.barea { font-size: 11px; padding: 1px 8px; border-radius: 999px; color: hsl(var(--h) 60% 72%); background: hsl(var(--h) 40% 22% / .6); }
.bdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-2); background: transparent; padding: 0; cursor: pointer; flex: none; }
.bdot.doing { border-color: var(--amber); background: linear-gradient(90deg, var(--amber) 50%, transparent 50%); }
.bdot.done { border-color: var(--accent); background: var(--accent); }
.bdot:disabled { cursor: default; }
.btask { margin: 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.bmeta { display: flex; gap: 10px; font-size: 12px; color: var(--text-2); } .bmeta span:last-child:not(:first-child) { margin-left: auto; }
.badd { border: 1px dashed var(--line); background: transparent; color: var(--text-2); border-radius: var(--r); height: 32px; cursor: pointer; font-size: 12.5px; }
.badd:hover { color: var(--text); border-color: var(--text-2); }
.bhint { align-self: center; }

/* smaller screens: shorter labels, slimmer sidebar, tighter rows */
.audit-cards .kpi.long b { font-size: 16px; line-height: 1.35; }
@media (max-width: 1400px) { .top .lg { display: none; } #roleBadge { display: none !important; } }
@media (max-width: 1200px) {
  .shell { grid-template-columns: 224px minmax(0, 1fr); }
  .top { gap: 10px; padding: 0 16px; }
  .search { max-width: 220px; min-width: 120px; }
  .top .actions { gap: 6px; }
}
@media (max-height: 960px) {
  .side > .brand { padding: 14px 16px 12px; }
  .pick-label { display: none; }
  .pickers { gap: 6px; padding: 2px 12px 10px; }
  .nav-item { height: 28px; margin-bottom: 1px; }
  .nav-label { margin: 12px 0 2px; }
  .side-foot { padding: 6px 8px; }
  .nm-side { height: 28px; margin-bottom: 4px; }
}

#launchBtn:disabled { opacity: .45; cursor: not-allowed; }

/* Planditor Control: the announcement bar, the right ad panel (wide screens only), the admin window */
.announce { display: flex; align-items: center; gap: 12px; padding: 8px 24px; font-size: 13px; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--text); }
.announce.warn { background: var(--amber-soft); }
.announce a { color: var(--accent); font-weight: 500; } .announce.warn a { color: var(--amber); }
.announce .icon-btn { margin-left: auto; width: 24px; height: 24px; font-size: 16px; line-height: 1; }
.ad-right { display: none; }
@media (min-width: 1680px) {
  .shell.with-ad { grid-template-columns: 260px minmax(0, 1fr) 260px; }
  .shell.with-ad .ad-right:not([hidden]) { display: block; padding: 16px 12px; border-left: 1px solid var(--line); background: var(--deep); overflow-y: auto; }
}
.pf { display: grid; gap: 12px; min-width: 0; }
.modal.wide:has(.pf) { width: min(1100px, 94vw); max-width: none; }
.pf-scroll { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.pf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pf-table th { position: sticky; top: 0; background: var(--card); text-align: left; font-weight: 500; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pf-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pf-table tr.blocked td { opacity: .55; }
.pf-table td.pf-acts { white-space: nowrap; max-width: none; overflow: visible; } .pf-acts .mini + .mini { margin-left: 6px; }
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }

td.act .mini.site-del { color: var(--text-2); } td.act .mini.site-del:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
/* the row actions stay in view on wide tables (Sites: Remove) */
#grid td.act, #grid thead th:last-child:empty { position: sticky; right: 0; background: var(--card); box-shadow: -8px 0 8px -8px rgba(0,0,0,.6); }
/* the left ad: title and button only on lower screens, gone on very low ones (the menu comes first) */
@media (max-height: 960px) { .promo-side .promo-card p, .promo-side .promo-card img { display: none; } .promo-side .promo-card { gap: 8px; padding: 10px; } }
@media (max-height: 820px) { .promo-side { display: none; } }

.pf .profile-field input, .pf .profile-field select, .pf .profile-field textarea { width: 100%; }
.pf-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.pf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 900px) { .pf-two { grid-template-columns: 1fr; } }
.pf-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card); }
.pf-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .pf-colors input[type=color] { height: 32px; padding: 2px; }
.pf textarea { height: 104px; min-height: 72px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); color: var(--text); font: 13px/1.5 var(--mono); }
.pf textarea:disabled { opacity: .6; }
.pf > .profile-field, .pf-card .profile-field { align-content: start; }

/* plans and payments */
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-card { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card); }
.plan-card.on { border-color: var(--accent-line); background: var(--accent-soft); }
.plan-card b { font-size: 15px; }
.pay-methods { display: grid; gap: 8px; }
.pay-method { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); }
.pay-method code { flex: 1; font: 13px var(--mono); user-select: all; overflow-wrap: anywhere; }
.pay-list { display: grid; gap: 10px; }
.pay-card { display: grid; grid-template-columns: 160px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); }
.pay-card:not(:has(img)) { grid-template-columns: 1fr; }
.pay-card img { width: 160px; max-height: 220px; object-fit: contain; border-radius: var(--r); background: var(--raised); }
.pay-info { display: grid; gap: 4px; align-content: start; font-size: 13px; }
