/* Doorway for contractors, calm version (2026-10-26).
   One work column, lines between rows instead of cards, one typeface (Archivo),
   headlines included.
   The logo is the brand artwork (../shared/logo.svg); never retype the wordmark.
   Crimson only for the main button on a row and for real gaps. Light-only. */
:root {
  --crimson: #AE042E;
  --crimson-deep: #7D0322;
  --tint: #FBF1F2;
  --ink: #160D08;
  --ink-2: #45362E;
  --ink-3: #6B5A51;
  --line: #C4B2A3;
  --ground: #FFFFFF;
  --panel: #FAF7F3;
  --good: #1F7A6A;
  --bar: #CBB8A9;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 15px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; border-radius: 6px; }
.num, td, .stat b { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; }
.logo { display: flex; align-items: center; padding: 0 8px; text-decoration: none; }
.logo img { display: block; width: 100px; height: auto; }
.co { padding: 0 8px; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.co b { display: block; color: var(--ink); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a.on { background: var(--tint); color: var(--crimson-deep); font-weight: 600; }
.nav .n { font-size: 12px; color: var(--crimson); font-weight: 600; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.proto { padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 4px; }
.proto b { font-weight: 600; color: var(--ink-2); }
.proto a { color: var(--ink-2); text-decoration: none; }
.proto a:hover { color: var(--crimson); }
.proto a.on { color: var(--crimson); font-weight: 600; }

main { padding-block: 32px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); min-width: 0; }
.col { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.col > section { min-width: 0; }

/* ---------- type ---------- */
.hello { display: flex; flex-direction: column; gap: 4px; }
.hello small { color: var(--ink-3); font-size: 13px; }
h1 { margin: 0; font: 700 27px/1.2 var(--display); letter-spacing: -.02em; text-wrap: balance; }
h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.link { color: var(--crimson); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cap { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.muted { color: var(--ink-2); }
p { margin: 0; }

/* ---------- numbers row ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 14px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat span { font-size: 12.5px; color: var(--ink-2); }
.stat b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.stat small { font-size: 12.5px; color: var(--ink-3); }

/* ---------- rows ---------- */
.list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.item { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 15px 0; }
.row.two { grid-template-columns: minmax(0, 1fr) auto; }
.row .t { font-weight: 600; font-size: 15.5px; }
.row .why { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.row .amt { font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; }
.row .amt small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.row .amt small.cost { color: var(--ink-2); }
.go { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.link-btn { background: none; border: 0; padding: 4px; font: inherit; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { color: var(--crimson); }
.detail .d-why { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.b-list { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.b-list li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.b-list li:last-child { border-bottom: 0; }
.b-list .b-amt { color: var(--ink-2); white-space: nowrap; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; background: var(--ground); }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn.primary:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); }
.detail { padding: 0 0 18px; display: flex; flex-direction: column; gap: 12px; }
.facts { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; background: var(--panel); padding: 14px 16px; border-radius: 10px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.done-msg { color: var(--good); font-weight: 600; font-size: 14px; margin-top: 2px; }
.amount-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.amount-edit input { width: 120px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
th:first-child, td:first-child { text-align: left; padding-left: 0; white-space: normal; }
td.hot { color: var(--crimson); font-weight: 600; }
td.dim, .dim { color: var(--ink-3); }
tr.total td { font-weight: 600; border-bottom: 0; }
tr.sub td { font-size: 13px; color: var(--ink-2); }
tr.sub td:first-child { padding-left: 14px; }
tr.toggle { cursor: pointer; }
tr.toggle td:first-child::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-3px) rotate(45deg); }
tr.toggle.open td:first-child::after { transform: translateY(0) rotate(-135deg); }
.tag { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }

/* ---------- tabs (only where a page has two views) ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-top: -12px; }
.tabs button { padding: 10px 0; font-size: 14.5px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--crimson); }

/* ---------- disclosure ---------- */
details.fold summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "Show"; color: var(--crimson); }
details.fold[open] summary::after { content: "Hide"; }
details.fold > div { margin-top: 8px; }

/* ---------- bars ---------- */
.bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; align-items: end; height: 150px; padding-top: 8px; }
.bars .b { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; font-size: 11.5px; color: var(--ink-2); min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 34px; background: var(--bar); border-radius: 4px 4px 0 0; }
.bars .b.hot i { background: var(--crimson); }
.bars .b.hot span:first-child { color: var(--crimson); font-weight: 600; }
.bar-labels { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; font-size: 11.5px; color: var(--ink-3); text-align: center; border-top: 1px solid var(--line); padding-top: 6px; }
.pair { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; align-items: end; height: 180px; }
.pair .m { display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: 100%; }
.pair .m i { display: block; width: 40%; max-width: 26px; border-radius: 4px 4px 0 0; }
.pair .m i.a { background: var(--crimson); }
.pair .m i.s { background: var(--bar); }
.key { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--bar); }
.key span.a::before { background: var(--crimson); }

/* ---------- settings ---------- */
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.kv .v { font-weight: 600; text-align: right; }
.kv small { display: block; color: var(--ink-2); font-size: 13px; font-weight: 400; }
.warn, .kv small.warn { color: var(--crimson); }
.choice { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.choice button { padding: 6px 10px; font-size: 13px; color: var(--ink-2); }
.choice button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- report sheet ---------- */
.report { display: flex; flex-direction: column; gap: 28px; }
.lead { font-size: 17px; line-height: 1.5; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 36px; align-items: start; }
.side-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.side-list button { display: flex; justify-content: space-between; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-list button small { color: var(--ink-3); font-size: 12.5px; }
.side-list button.on { color: var(--crimson); font-weight: 600; }

/* ---------- phone ---------- */
.tabbar, .sheet-back { display: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 400; max-width: calc(100% - 32px); }
.phone-co { display: none; }

@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .phone-co { display: block; font-size: 12.5px; color: var(--ink-3); }
  main { padding-block: 20px 110px; }
  h1 { font-size: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat b { font-size: 20px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row > .btn, .row > .acts, .row > .go { grid-column: 1 / -1; justify-self: start; }
  .go { flex-direction: row; align-items: center; gap: 12px; }
  .row.act { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .row.act > .amt { text-align: left; white-space: normal; }
  .row.act > .amt small { display: inline; margin-left: 6px; }
  .row.act > .amt small.cost::before { content: '· '; }
  .b-list li { flex-direction: column; gap: 2px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dt { margin-top: 8px; }
  .facts dt:first-child { margin-top: 0; }
  .bars .b span:first-child { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 300; background: var(--ground); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .tabbar a, .tabbar button { position: relative; font-size: 11.5px; color: var(--ink-2); padding: 8px 0; text-align: center; text-decoration: none; }
  .tabbar .on { color: var(--crimson); font-weight: 600; }
  .tabbar i { position: absolute; top: 2px; left: calc(50% + 16px); font-style: normal; font-size: 10px; font-weight: 600; color: var(--crimson); }
  .sheet-back:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 250; background: rgba(35, 23, 15, .3); }
  .sheet { position: absolute; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom, 0px)); background: var(--ground); border-radius: 14px 14px 0 0; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; }
  .sheet a { padding: 13px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 15.5px; }
  .sheet .proto { border-top: 0; padding: 14px 4px 0; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: no-preference) { .detail { animation: calm-in 160ms ease-out; } @keyframes calm-in { from { opacity: .5; } } }
.sheet .proto a { padding: 7px 4px; font-size: 13.5px; border: 0; }

/* ---------- Version A additions (Fill the Board) ---------- */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--ground); align-self: flex-start; }
.seg button { padding: 7px 12px; font-size: 13.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.brandbar { margin-top: -14px; }
.who { font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--crimson); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); animation: calm-pulse 1.6s ease-in-out infinite; }
@keyframes calm-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fstep { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) 110px; gap: 14px; align-items: center; font-size: 14px; }
.fstep .track { height: 10px; background: var(--panel); border-radius: 5px; overflow: hidden; }
.fstep .track i { display: block; height: 100%; background: var(--crimson); border-radius: 5px; }
.fstep b { text-align: right; font-weight: 600; }
.soon { font-size: 11.5px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; margin-left: 6px; }
.line-chart svg { width: 100%; height: auto; max-height: 200px; display: block; }
.tabbar a { line-height: 1.2; }
@media (max-width: 760px) {
  .fstep { grid-template-columns: minmax(0, 1fr) 90px; }
  .fstep .track { grid-column: 1 / -1; grid-row: 2; }
  .tabs { gap: 16px; overflow-x: auto; }
  .tabs button { white-space: nowrap; font-size: 14px; }
  .brandbar button { padding: 7px 10px; font-size: 13px; }
}

/* Version 14: live alert, To approve windows, Strategy rules */
.alert { border: 1px solid #EBC3CB; background: var(--tint); border-radius: 10px; padding: 10px 14px; margin-bottom: -12px; }
.alert-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alert-t { flex: 1 1 220px; font-size: 14px; color: var(--ink); min-width: 0; }
.alert-acts { display: flex; gap: 6px; }
.alert .list { margin-top: 8px; border-top: 1px solid #EBC3CB; }
.alert .item { border-color: #EBC3CB; }
.alert .stats { margin-top: 12px; border-color: #EBC3CB; }
.alert .stat + .stat { border-color: #EBC3CB; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); font-weight: 500; }
.nav .n.live { font-size: 11.5px; }
.tabbar i.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); top: 0; left: calc(50% - 4px); animation: calm-pulse 1.6s ease-in-out infinite; }
.rule-h { font-size: 14px; font-weight: 600; margin: 22px 0 2px; color: var(--ink); }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.rule-l small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.rule-c { display: flex; justify-content: flex-end; min-width: 0; }
.steps { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.step { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.step small { font-size: 11.5px; color: var(--ink-3); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { width: 32px; height: 32px; font-size: 17px; color: var(--ink-2); }
.stepper button:hover { background: var(--panel); }
.stepper b { min-width: 32px; text-align: center; font-weight: 600; font-size: 15px; }
.choice.wrap { flex-wrap: wrap; max-width: 420px; }
.field { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; width: 340px; max-width: 100%; background: var(--ground); color: var(--ink); }
.field.num { width: 130px; text-align: right; font-weight: 600; }
.plan-ok { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
td.wrap-cell { white-space: normal; text-align: left; color: var(--ink-2); min-width: 220px; }
@media (max-width: 760px) {
  .rule { grid-template-columns: 1fr; gap: 8px; }
  .rule-c { justify-content: flex-start; }
  .steps { justify-content: flex-start; }
  .field { width: 100%; }
  .alert { margin-bottom: -16px; }
}
@media (prefers-reduced-motion: reduce) { .tabbar i.dot { animation: none; } }
.rule.stack { grid-template-columns: 1fr; gap: 8px; }
.rule.stack .rule-c { justify-content: flex-start; }
.rule.stack .field { width: 100%; }
.rule.stack .choice.wrap { max-width: none; }

/* Version 15: auto-approve switch, weekly fill budget, who to offer a slot to, charts */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: -22px; position: relative; z-index: 50; }
.topbar .phone-co { margin: 0; }
.auto-wrap { position: relative; margin-left: auto; }
.auto-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--ground); white-space: nowrap; }
.auto-pill:hover { border-color: var(--ink-3); }
.auto-pill b { color: var(--ink); font-weight: 600; }
.sw { position: relative; width: 26px; height: 15px; border-radius: 999px; background: var(--bar); flex: 0 0 auto; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(35, 23, 15, .25); transition: left .15s; }
.auto-pill.on .sw { background: var(--good); }
.auto-pill.on .sw::after { left: 13px; }
.auto-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; background: var(--ground); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(35, 23, 15, .14); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ap-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.ap-label { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.auto-panel > .choice { align-self: flex-start; }
.ap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ap-row small { display: block; color: var(--ink-3); font-size: 12px; }
.ap-note { font-size: 13px; color: var(--ink-2); }
.ap-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.budget { border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; background: var(--panel); margin-bottom: -12px; }
.budget.on { background: var(--ground); }
.budget .row { padding: 14px 0; }
.tag-b { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--good); white-space: nowrap; }
.note-line { font-size: 13px; color: var(--ink-2); margin: -16px 0 -12px; }
.lede { font-size: 13.5px; color: var(--ink-2); margin: -4px 0 6px; max-width: 65ch; }
.rec { font-size: 15px; font-weight: 500; padding: 4px 0 0; max-width: 70ch; }
.rec small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-bottom: 2px; }
.cands { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin: 12px 0; }
.cand { display: grid; gap: 3px; text-align: left; padding: 12px 12px 12px 36px; border-bottom: 1px solid var(--line); position: relative; }
.cand::before { content: ""; position: absolute; left: 10px; top: 15px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: var(--ground); }
.cand.on { background: var(--panel); }
.cand.on::before { border: 4.5px solid var(--ink); }
.cand:hover { background: var(--panel); }
.c-name { font-weight: 600; font-size: 15px; }
.c-tag { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--good); }
.c-what, .c-board { font-size: 13.5px; color: var(--ink-2); }
.c-board b { font-weight: 600; color: var(--ink); }
.c-nums { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.c-nums b { color: var(--ink); font-weight: 600; }
.stat b .spark { display: inline-block; vertical-align: middle; width: 56px; height: 18px; margin-left: 8px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--c); margin-right: 6px; vertical-align: middle; }
.legend i.dash { border-top-style: dashed; }
@media (max-width: 760px) {
  .topbar { margin-bottom: -14px; }
  .auto-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-height: calc(100vh - 150px); overflow-y: auto; z-index: 400; }
  .budget { margin-bottom: -16px; }
  .note-line { margin: -20px 0 -16px; }
  .cand { padding-right: 4px; }
}
@media (max-width: 760px) {
  .tabbar a, .tabbar button { padding-top: 16px; }
  .tabbar i { top: 2px; left: 50%; transform: translateX(-50%); }
  .tabbar i.dot { top: 5px; }
}

/* Version 19: Q1 marks, the live schedule, brand and creative, My Jolly Home, the offer text */
.q1 { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: #F3E3C7; color: #5A3A12; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 2px; letter-spacing: 0; }
h1 .q1 { vertical-align: 5px; }
.nav a .q1 { margin-left: auto; margin-right: 6px; }
.note-line.partner { margin: -18px 0 0; }
.tl-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.seg.days button { min-width: 52px; }
.tl { display: flex; flex-direction: column; }
.tl-group { padding: 10px 0 6px; border-top: 1px solid var(--line); }
.tl-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 2px 0 8px; font-size: 14px; }
.tl-h span { font-size: 12.5px; color: var(--ink-2); }
.tl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 34px; }
.tl-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.tl-who b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-who small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 28px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), #F1E9E2 calc(100% / 12 - 1px) calc(100% / 12)); border-radius: 6px; }
.tl-axis { min-height: 20px; }
.tl-axis .tl-track { height: 18px; background: none; }
.tl-axis span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); }
.tl-axis span:first-child { transform: none; }
.tl-axis span:last-child { transform: translateX(-100%); }
.blk { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; font-size: 11.5px; line-height: 22px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.blk.job { background: #EDE4DC; color: var(--ink-2); }
.blk.job.past, .blk.gone { opacity: .45; }
.blk.gone { background: repeating-linear-gradient(135deg, #EFE7E0 0 4px, transparent 4px 8px); }
.blk.job.new { background: #DDEFEA; color: var(--good); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--good); }
.blk.open { background: var(--tint); color: var(--crimson-deep); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--crimson); cursor: pointer; border-radius: 99px; }
.blk.open:hover { background: #F7DDE2; }
.blk.now-b { background: var(--crimson); color: #fff; animation: dw-glow 2s ease-in-out infinite; }
@keyframes dw-glow { 50% { box-shadow: 0 0 0 4px rgba(174, 4, 46, .18); } }
.tl-past { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(250, 247, 243, .65); z-index: 2; pointer-events: none; border-radius: 6px 0 0 6px; }
.tl-now { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--crimson); z-index: 3; pointer-events: none; transition: left .6s; }
.tl-more { margin: 4px 0 2px 162px; }
.tl-legend .lg { display: inline-block; width: 16px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 0; }
.lg-open { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--crimson); border-radius: 99px !important; }
.lg-job { background: #EDE4DC; }
.lg-new { background: #DDEFEA; box-shadow: inset 0 0 0 1.5px var(--good); }
.lg-now { width: 2px !important; height: 12px !important; background: var(--crimson); border-radius: 0 !important; }
table.strip th { text-align: center; font-size: 11.5px; line-height: 1.2; padding: 6px 2px; }
table.strip td { text-align: center; padding: 4px 2px; }
table.strip td:first-child { text-align: left; padding-right: 10px; white-space: nowrap; }
.heat { width: 100%; min-width: 34px; padding: 6px 0; border-radius: 6px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.heat.h0 { color: var(--ink-3); font-weight: 400; }
.heat.h1 { background: #F7ECEE; color: var(--ink-2); }
.heat.h2 { background: #EFC9D1; color: var(--crimson-deep); }
.heat.h3 { background: var(--crimson); color: #fff; }
.heat[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
table.crew td { text-align: center; }
table.crew td:first-child { text-align: left; }
table.crew tr.grp td { font-weight: 600; font-size: 13px; color: var(--ink); padding-top: 14px; border-bottom: 0; }
.bub { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 99px; background: var(--tint); color: var(--crimson-deep); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--crimson); }
.co-logo { display: inline-block; padding: 3px 10px; border-radius: 6px; background: #1E2A44; color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
body[data-co="roof"] .co-logo { background: #2F3A45; }
.sw-c { display: inline-block; width: 18px; height: 18px; border-radius: 50%; margin-left: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); vertical-align: middle; }
.kv .v.ok { color: var(--good); }
.kv .v.warn { color: var(--crimson); }
.sms { position: fixed; right: 20px; bottom: 72px; width: 300px; max-width: calc(100% - 32px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(35, 23, 15, .18); padding: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 420; }
.sms[hidden] { display: none; }
.sms-h { display: grid; grid-template-columns: 1fr auto; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.sms-h small { grid-column: 1; font-size: 11.5px; color: var(--ink-3); }
.sms-x { grid-row: 1 / span 2; grid-column: 2; font-size: 20px; color: var(--ink-3); width: 28px; height: 28px; }
.sms-b { max-width: 85%; padding: 8px 11px; border-radius: 16px; font-size: 13.5px; line-height: 1.35; }
.sms-b.out { align-self: flex-end; background: var(--crimson); color: #fff; border-bottom-right-radius: 4px; }
.sms-b.in { align-self: flex-start; background: #EFE9E4; color: var(--ink); border-bottom-left-radius: 4px; }
.sms-b.typing { display: flex; gap: 4px; padding: 11px 12px; }
.sms-b.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: dw-dot 1s infinite; }
.sms-b.typing i:nth-child(2) { animation-delay: .15s; }
.sms-b.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dw-dot { 50% { opacity: .3; transform: translateY(-2px); } }
.sms-done { font-size: 13px; font-weight: 600; color: var(--good); text-align: center; padding-top: 2px; }
.sms-done a { color: var(--crimson); }
@media (prefers-reduced-motion: reduce) { .blk.now-b, .sms-b.typing i { animation: none; } .tl-now { transition: none; } }
@media (max-width: 760px) {
  .tl-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who chips" "track track"; gap: 5px 8px; padding: 6px 0 8px; min-height: 0; }
  .tl-row > .tl-who { grid-area: who; flex-direction: row; align-items: baseline; gap: 6px; }
  .tl-row > .tl-chips { grid-area: chips; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  .tl-row > .tl-track { grid-area: track; height: 12px; }
  .tl-axis { grid-template-areas: "track track"; padding: 0; }
  .tl-axis > .tl-who { display: none; }
  .tl-axis > .tl-track { height: 16px; }
  .tl-who small { font-size: 11px; }
  .tl-more { margin-left: 0; }
  .blk { font-size: 0; top: 2px; bottom: 2px; padding: 0; }
  .tl-axis span { font-size: 10px; }
  .seg.days { width: 100%; }
  .seg.days button { flex: 1 1 auto; min-width: 0; padding: 7px 6px; font-size: 12.5px; }
  .sms { right: 12px; left: 12px; width: auto; max-width: none; bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
  .note-line.partner { margin: -22px 0 0; }
}
.toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 760px) { main { padding-bottom: 170px; } }
.tl-chips { display: none; }
.chip { padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; background: var(--tint); color: var(--crimson-deep); box-shadow: inset 0 0 0 1.5px var(--crimson); }
.chip.now { background: var(--crimson); color: #fff; }
.chip.new { background: #DDEFEA; color: var(--good); box-shadow: inset 0 0 0 1.5px var(--good); }
/* After "See it": the booking catches the eye once */
@media (prefers-reduced-motion: no-preference) { .flash { animation: dw-flash 1.4s ease-out 2; } @keyframes dw-flash { 40% { box-shadow: inset 0 0 0 1.5px var(--good), 0 0 0 6px rgba(31, 122, 106, .22); } } }

/* My Jolly Home: the printed card, with a code a phone can scan */
.qrcard { display: flex; align-items: center; gap: 18px; margin: 10px 0 14px; }
.qrc-print { flex: 0 0 auto; width: 150px; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 10px 9px; border-radius: 12px; background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(35, 23, 15, .16); transform: rotate(-2deg); }
.qrc-co { font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.qrc-code { display: block; width: 100%; padding: 6px; background: #fff; border-radius: 6px; }
.qrc-cta { font-size: 11px; font-weight: 600; opacity: .9; }
.qrc-copy { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--ink-2); max-width: 34ch; }
.qrc-copy b { color: var(--ink); font-size: 14.5px; }
@media (max-width: 560px) { .qrc-print { width: 128px; } .qrcard { gap: 14px; } }
