/* Hotwire: one stylesheet, light only, no build step. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --sunken: #f8f9fa;
  --fg: #15171a;
  --muted: #5d6470;
  --faint: #8a909a;
  --line: #e2e5ea;
  --line-strong: #cfd4db;
  --hot: #ec4f17;
  --hot-hover: #d6440f;
  --hot-ink: #ffffff;
  --hot-soft: #fff0e9;
  --ok: #157a45;
  --ok-soft: #e6f4ec;
  --warn: #9a5b00;
  --warn-soft: #fff3dc;
  --danger: #c0311a;
  --danger-soft: #fdecea;
  --focus: color-mix(in srgb, var(--hot) 35%, transparent);
  --radius: 10px;
  --shadow: 0 1px 2px rgb(16 20 26 / 0.05), 0 2px 8px rgb(16 20 26 / 0.04);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--hot-soft); color: var(--fg); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--hot); }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
ul, ol { list-style: none; margin: 0; padding: 0; }
table { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap { gap: 12px; }
.gap-sm { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.85rem; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 0.9em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot { color: var(--hot); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 0.9rem; font-weight: 550;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { color: var(--fg); background: var(--sunken); border-color: var(--faint); }
.btn-hot { background: var(--hot); border-color: var(--hot); color: var(--hot-ink); }
.btn-hot:hover { background: var(--hot-hover); border-color: var(--hot-hover); color: var(--hot-ink); }
.btn-quiet { border-color: transparent; background: none; color: var(--muted); }
.btn-quiet:hover { background: var(--sunken); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm { min-height: 30px; padding: 0 11px; font-size: 0.82rem; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Forms: Django renders label, help text, errors and widget per field. */
label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; }
.helptext { display: block; margin: -2px 0 6px; color: var(--muted); font-size: 0.82rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--fg); font: inherit; font-size: 0.95rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235d6470' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--hot); box-shadow: 0 0 0 3px var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--hot); }
.errorlist { margin: 6px 0 0; color: var(--danger); font-size: 0.85rem; }
.errorlist + input, .errorlist + select { border-color: var(--danger); }
.field { display: flex; flex-direction: column; }
.field > div { display: flex; flex-direction: column; }
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.check > div { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.check label { order: 2; margin: 0; }
.check input { order: 1; }
.check .helptext { order: 3; flex-basis: 100%; margin: 0 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 4px; }
.alert { padding: 10px 14px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 0.9rem; }
.notice { margin-bottom: 20px; padding: 11px 14px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 0.9rem; font-weight: 500; }
.notice.error { background: var(--danger-soft); color: var(--danger); }

/* Advanced: details that hold the tracking tags and other rarely-needed fields. */
.advanced { border-top: 1px solid var(--line); padding-top: 16px; }
.advanced > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: 0.9rem; font-weight: 550; list-style: none; }
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.advanced[open] > summary::before { transform: rotate(45deg); }
.advanced > summary:hover { color: var(--fg); }
.advanced > .form, .advanced > .form-row, .advanced > p { margin-top: 16px; }

/* App shell */
.appbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.appbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.logo:hover { color: var(--fg); }
.logo-mark { color: var(--hot); display: inline-flex; }
.nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.nav a { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 550; font-size: 0.93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav a:hover { color: var(--fg); }
.nav a.on { color: var(--fg); border-bottom-color: var(--hot); }
.appbar .end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 0.9rem; color: var(--muted); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--sunken); color: var(--fg); }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: var(--hot-soft); color: var(--hot); font-weight: 700; font-size: 0.85rem; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(16 20 26 / 0.12); }
.menu-list a, .menu-list button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 0.9rem; text-align: left; color: var(--fg); cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--sunken); color: var(--fg); }
.menu-list .current { font-weight: 600; }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-list .menu-note { padding: 6px 10px; color: var(--muted); font-size: 0.8rem; }
.page { padding-top: 32px; padding-bottom: 96px; }
.back { display: inline-flex; margin-bottom: 14px; color: var(--muted); font-size: 0.9rem; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.page-head p { margin-top: 6px; color: var(--muted); max-width: 60ch; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 0.9rem; }

/* Segmented control (periods, team/channel view) */
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; gap: 2px; border-radius: 9px; background: #e9ebef; }
.seg::-webkit-scrollbar { display: none; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--muted); font-size: 0.85rem; font-weight: 550; white-space: nowrap; }
.seg a:hover { color: var(--fg); }
.seg a.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgb(16 20 26 / 0.12); }

/* Tabs (campaign sections) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: var(--fg); border-bottom-color: var(--hot); }
.tabs .count { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #e9ebef; color: var(--muted); font-size: 0.75rem; font-weight: 600; }

/* Status */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 99px; font-size: 0.8rem; font-weight: 600; background: #eceef1; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.status-active { background: var(--ok-soft); color: var(--ok); }
.status-paused { background: var(--warn-soft); color: var(--warn); }
.status-select { width: auto !important; min-height: 32px !important; padding: 4px 30px 4px 10px !important; font-size: 0.85rem !important; font-weight: 600; background-position: right 9px center !important; }

/* Numbers */
.numbers { display: flex; flex-wrap: wrap; gap: 12px 48px; margin-bottom: 20px; }
.number b { display: block; font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.number span { color: var(--muted); }

/* Clicks per day */
.chart { padding: 18px 20px 14px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.bar { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: var(--hot); opacity: .9; }
.bar:hover { opacity: 1; }
.bar.zero { background: var(--line-strong); opacity: .6; }
.axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); font-size: 0.8rem; }

/* Ranked lists: "best first" */
.rankings { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ranking { padding: 18px 20px; }
.ranking h3 { margin-bottom: 14px; }
.ranking ol { display: grid; gap: 12px; }
.ranking li .row { flex-wrap: nowrap; gap: 12px; }
.ranking .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking a.name:hover { color: var(--hot); }
.track { height: 6px; margin-top: 6px; border-radius: 99px; background: #eceef1; overflow: hidden; }
.track div { height: 100%; border-radius: 99px; background: var(--hot); }
.ranking li:not(:first-child) .track div { background: color-mix(in srgb, var(--hot) 55%, #f6c3ae); }

/* Lists of rows (campaigns, tactics, links, programs) */
.rows { overflow: hidden; }
.rows > li, .rows > a, .rows > div.item { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.rows > :first-child { border-top: 0; }
.rows > a:hover { background: var(--sunken); color: inherit; }
.rows .title { font-weight: 600; }
.rows .sub { margin-top: 2px; color: var(--muted); font-size: 0.87rem; }
.rows .meter { width: 160px; flex: none; }
.rows .meter .row { justify-content: flex-end; gap: 6px; }
.rows .big { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rows .side { display: flex; align-items: center; gap: 8px; flex: none; }
.rows .dim { opacity: .55; }

/* Empty states and first steps */
.empty { padding: 44px 24px; text-align: center; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.empty .actions { justify-content: center; margin-top: 18px; }
.steps { padding: 8px 0; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps .tick { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 99px; border: 2px solid var(--line-strong); color: var(--faint); font-weight: 700; font-size: 0.85rem; }
.steps .done .tick { border-color: var(--ok); background: var(--ok); color: #fff; }
.steps .done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.steps .title { font-weight: 600; }

/* Link ready */
.ready { padding: 28px; text-align: center; }
.ready .short { display: block; margin: 10px 0 18px; font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; color: var(--hot); word-break: break-all; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; padding: 20px; font-size: 0.93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.longurl { padding: 12px 14px; border-radius: 8px; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); font: 0.82rem/1.5 var(--mono); word-break: break-all; }
.preview { margin-top: 8px; }

/* Teams */
.team { margin-left: calc(var(--depth, 0) * 28px); }
.team + .team { margin-top: 12px; }
.team-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 20px; }
.team .rows { border-top: 1px solid var(--line); }
.team .rows > li { padding-top: 11px; padding-bottom: 11px; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; background: #eceef1; color: var(--muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.inline-add { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-add input { flex: 1; min-width: 200px; }
.danger-zone { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Landing and sign-in */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.hero { padding-top: 64px; padding-bottom: 72px; }
.hero h1 { max-width: 15ch; font-size: clamp(2.5rem, 6.5vw, 4.4rem); line-height: 1.04; letter-spacing: -0.035em; }
.lede { max-width: 38rem; margin: 22px 0 30px; color: var(--muted); font-size: 1.15rem; }
.demo { margin-top: 56px; overflow: hidden; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.demo .ranking { box-shadow: none; border: 0; }
.band { border-top: 1px solid var(--line); background: var(--surface); }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; padding-top: 64px; padding-bottom: 64px; }
.features p { margin-top: 8px; color: var(--muted); }
.footer { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.auth { display: flex; flex-direction: column; align-items: center; gap: 24px; min-height: 100vh; padding: 64px 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 28px; }
.auth-card h1 { margin-bottom: 20px; font-size: 1.4rem; }
.auth a { color: var(--hot); font-weight: 550; }

@media (max-width: 760px) {
  .appbar .wrap { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav a { padding: 12px 10px; }
  .appbar .end .who { display: none; }
  .page { padding-top: 22px; }
  h1 { font-size: 1.45rem; }
  .number b { font-size: 2rem; }
  .numbers { gap: 12px 32px; }
  .rows > li, .rows > a, .rows > div.item { flex-wrap: wrap; padding: 14px 16px; }
  .rows .meter { width: 100%; }
  .rows .meter .row { justify-content: flex-start; }
  .team { margin-left: calc(var(--depth, 0) * 12px); }
  .features { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .hero { padding-top: 36px; }
}
summary.btn { list-style: none; width: auto; }
summary.btn::-webkit-details-marker { display: none; }
details.add[open] > summary { display: none; }
.nav, .tabs { scrollbar-width: none; }
.nav::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
.rows > details.item, .rows > form.item { padding: 14px 20px; border-top: 1px solid var(--line); }
.rows > details.item:first-child, .rows > form.item:first-child { border-top: 0; }
.facts { margin: 0; }
@media (max-width: 760px) {
  .rows > div.item .grow, .rows > li .grow { flex-basis: 100%; }
  .rows > details.item, .rows > form.item { padding: 14px 16px; }
  .ready { padding: 22px 16px; }
}

/* Journeys: health states */
.state { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 99px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; background: #eceef1; color: var(--muted); }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.state-working { background: var(--ok-soft); color: var(--ok); }
.state-broken { background: var(--danger-soft); color: var(--danger); }
.state-blocked { background: var(--warn-soft); color: var(--warn); }
.state-na { background: none; color: var(--faint); }
:root { --st-working: var(--ok); --st-broken: var(--danger); --st-blocked: #d48806; --st-unchecked: #b8bec7; --st-na: #dfe3e8; }

/* The line of dots */
.mini-line { display: flex; align-items: center; margin-top: 10px; overflow: hidden; }
.mini-line li { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.mini-line li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mini-line li::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 99px; background: var(--st-unchecked); box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.mini-line li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line-strong); }
.mini-line li:last-child { flex: none; }
.mini-line .dot-working::before { background: var(--st-working); }
.mini-line .dot-broken::before { background: var(--st-broken); }
.mini-line .dot-blocked::before { background: var(--st-blocked); }

.line { position: relative; display: grid; gap: 0; }
.stop { position: relative; display: flex; gap: 18px; padding-bottom: 22px; }
.stop:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line-strong); }
.stop .node { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; background: var(--surface); border: 3px solid var(--st-unchecked); font-weight: 700; color: var(--muted); z-index: 1; }
.stop.dot-working .node { border-color: var(--st-working); color: var(--ok); }
.stop.dot-broken .node { border-color: var(--st-broken); background: var(--danger-soft); color: var(--danger); }
.stop.dot-blocked .node { border-color: var(--st-blocked); color: var(--warn); }
.stop-body { flex: 1; min-width: 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stop-body .title { font-size: 1.05rem; font-weight: 650; }
.lights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.light { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 99px; border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
.light::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--st-unchecked); }
.light-working::before { background: var(--st-working); }
.light-broken { border-color: var(--danger); color: var(--danger); }
.light-broken::before { background: var(--st-broken); }
.light-blocked::before { background: var(--st-blocked); }
.light-na { opacity: .5; text-decoration: line-through; }
.stop-tools { display: flex; flex-wrap: wrap; gap: 2px; margin: 8px -8px -4px; }

/* Step page */
.check-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.check-app { display: flex; align-items: center; gap: 10px; min-width: 200px; flex: 1; }
.check-fields { display: flex; gap: 8px; flex-wrap: wrap; flex: 2; min-width: 280px; }
.check-fields select { width: auto; min-height: 34px; padding-top: 4px; padding-bottom: 4px; }
.check-fields input { flex: 1; min-width: 140px; min-height: 34px !important; padding-top: 4px !important; padding-bottom: 4px !important; }
.needs-list > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.needs-list label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }

/* Map */
.map-wrap { overflow: auto; }
.map { position: relative; }
.map-edges { position: absolute; inset: 0; }
.map-node { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-left-width: 1px; border-radius: 10px; box-shadow: var(--shadow); }
.map-node:hover { border-color: var(--hot); color: inherit; }
.map-node .title { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.map-node.dot-broken { border-color: var(--danger); background: var(--danger-soft); }
.map-node.dot-blocked { border-color: var(--st-blocked); }

/* Setup */
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 500; cursor: pointer; }
.quick-pick:has(input:checked) { border-color: var(--hot); background: var(--hot-soft); }
@media (max-width: 760px) {
  .nav { gap: 0; }
  .nav a { padding: 12px 9px; font-size: 0.9rem; }
  .nav a:first-child { padding-left: 0; }
}

/* Recorder */
.how { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.how .title { margin-bottom: 6px; font-weight: 650; }
.how p + p { margin-top: 8px; }
.how code, .recorder-connect code { font-family: var(--mono); font-size: 0.85em; background: var(--sunken); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.recorder-connect { margin-bottom: 16px; border-color: var(--hot); background: var(--hot-soft); }
.recorder-connect.connected { border-color: var(--ok); background: var(--ok-soft); }
.recorder-connect p + * { margin-top: 8px; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row .key { word-break: break-all; }
.recorded { margin-top: 10px; }
.recorded summary { cursor: pointer; }
.recorded ol { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.88rem; }
.recorded li + li { margin-top: 2px; }

/* Robot */
.section-first { margin-bottom: 8px; }
.section-first .title { font-weight: 650; margin-bottom: 4px; }
.robot-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.robot-now .title { font-weight: 650; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 8px; }
.run-results { list-style: none; margin: 0; padding: 0; }
.run-results .item p { margin-top: 4px; }
.shot { display: block; margin-top: 10px; width: 100%; max-width: 560px; max-height: 320px; object-fit: cover; object-position: top left; border: 1px solid var(--line); border-radius: 8px; }
.vary { margin-left: 8px; font-size: 0.8rem; padding: 1px 6px; width: auto; min-height: 0; }
