/* Thymebridge Ops. Phone first: one column, brand bar on top, tabs along the bottom.
   Colours are themes (set on <html data-theme="...">) so the look can change in one place. */
:root {
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* Default theme: Night shift (navy + amber, sage logo tile) */
  --bg: #0E1422; --bg-deep: #090E18; --surface: #172033; --raised: #1D2840; --line: #2A3652;
  --ink: #F2F5FA; --muted: #BAC4D6; --quiet: #8F9BB3;
  --bar-bg: #090E18; --bar-ink: #FFFFFF; --bar-accent: #F5B23D;
  --btn-bg: #F5B23D; --btn-ink: #1A1406;
  --tab-bg: #090E18; --tab-ink: #BAC4D6; --tab-on-bg: #F5B23D; --tab-on-ink: #1A1406;
  --login-bg: #0E1422; --login-ink: #FFFFFF; --login-accent: #F5B23D; --login-btn-bg: #F5B23D; --login-btn-ink: #1A1406;
  --tick: #F5B23D; --first: #F5B23D;
  --go: #86E0AE; --go-bg: #153527; --go-solid: #2E8B57;
  --warn: #F5C46B; --warn-bg: #3A2E12; --bad: #FFB0A6; --bad-bg: #47201C; --bad-line: #E0604F;
  --info: #BFD0F5; --info-bg: #22304A; --top-bg: #3A2E12; --top-ink: #F5C96E;
  color-scheme: dark;
}
/* Daylight: white and dark green, sage touches. Easiest to read outside. */
[data-theme="daylight"] {
  --bg: #F3F5F1; --bg-deep: #FFFFFF; --surface: #FFFFFF; --raised: #EEF2EA; --line: #D3DBCD;
  --ink: #0A2B1F; --muted: #3F5347; --quiet: #5E6E63;
  --bar-bg: #0A2B1F; --bar-ink: #FFFFFF; --bar-accent: #A8C495;
  --btn-bg: #0A2B1F; --btn-ink: #FFFFFF;
  --tab-bg: #FFFFFF; --tab-ink: #3F5347; --tab-on-bg: #0A2B1F; --tab-on-ink: #FFFFFF;
  --login-bg: #0A2B1F; --login-ink: #FFFFFF; --login-accent: #A8C495; --login-btn-bg: #A8C495; --login-btn-ink: #0A2B1F;
  --tick: #B45309; --first: #0A2B1F;
  --go: #1F7A4D; --go-bg: #DDF0E4; --go-solid: #1F7A4D;
  --warn: #8A4B00; --warn-bg: #FCEBD3; --bad: #B3261E; --bad-bg: #FBE3E1; --bad-line: #C83A2E;
  --info: #2D4F86; --info-bg: #E2E9F6; --top-bg: #FFF0CC; --top-ink: #6E4A00;
  color-scheme: light;
}
/* Black + bright sage: Virgin-style punch in our colours */
[data-theme="black"] {
  --bg: #0B0D0A; --bg-deep: #000000; --surface: #171B15; --raised: #1E241B; --line: #2C3428;
  --ink: #FFFFFF; --muted: #CBD4C4; --quiet: #9CA894;
  --bar-bg: #000000; --bar-ink: #FFFFFF; --bar-accent: #B7D49C;
  --btn-bg: #B7D49C; --btn-ink: #0A2B1F;
  --tab-bg: #000000; --tab-ink: #CBD4C4; --tab-on-bg: #B7D49C; --tab-on-ink: #0A2B1F;
  --login-bg: #000000; --login-ink: #FFFFFF; --login-accent: #B7D49C; --login-btn-bg: #B7D49C; --login-btn-ink: #0A2B1F;
  --tick: #F5C46B; --first: #B7D49C;
}
/* Olive + gold: matches the website */
[data-theme="olive"] {
  --bg: #1E2B12; --bg-deep: #141D0C; --surface: #27371A; --raised: #2F4120; --line: #3D5030;
  --ink: #F3F6F1; --muted: #CBD5C3; --quiet: #ADBAA0;
  --bar-bg: #141D0C; --bar-ink: #FFFFFF; --bar-accent: #E0B45C;
  --btn-bg: #E0B45C; --btn-ink: #19250E;
  --tab-bg: #141D0C; --tab-ink: #CBD5C3; --tab-on-bg: #E0B45C; --tab-on-ink: #19250E;
  --login-bg: #1E2B12; --login-ink: #FFFFFF; --login-accent: #E0B45C; --login-btn-bg: #E0B45C; --login-btn-ink: #19250E;
  --tick: #F4C870; --first: #E0B45C;
}
/* Sage: the logo colour everywhere */
[data-theme="sage"] {
  --bg: #1E2B12; --bg-deep: #141D0C; --surface: #27371A; --raised: #2F4120; --line: #3D5030;
  --ink: #F3F6F1; --muted: #CBD5C3; --quiet: #ADBAA0;
  --bar-bg: #83986F; --bar-ink: #FFFFFF; --bar-accent: #0A2B1F;
  --btn-bg: #93A880; --btn-ink: #0A2B1F;
  --tab-bg: #141D0C; --tab-ink: #CBD5C3; --tab-on-bg: #83986F; --tab-on-ink: #0A2B1F;
  --login-bg: #83986F; --login-ink: #FFFFFF; --login-accent: #0A2B1F; --login-btn-bg: #0A2B1F; --login-btn-ink: #FFFFFF;
  --tick: #F4C870; --first: #93A880;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html, body, body * { touch-action: manipulation; } /* no double-tap zoom; pinch and scroll still work */
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bar-bg); z-index: 30; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--tick); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Brand bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bar-bg); color: var(--bar-ink); border-bottom: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.bar-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--bar-ink); white-space: nowrap; }
.brand img { width: 46px; height: auto; }
.brand span { color: var(--bar-accent); }
.linkbtn { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--bar-ink); background: transparent; color: var(--bar-ink); font-weight: 700; font-size: 14px; white-space: nowrap; }

.wrap { max-width: 640px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 100px) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.head h1, h1.page { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 15px; margin: 0; }
.lbl { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--quiet); text-transform: uppercase; letter-spacing: 0.08em; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.red { border: 2px solid var(--bad-line); }
.card.amber { border: 2px solid var(--tick); }
.card.first { border: 2px solid var(--first); }
.card.dim { opacity: 0.6; }
.card.form { background: var(--raised); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.title { font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.big { font-family: var(--display); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.p-go { background: var(--go-bg); color: var(--go); } .p-warn { background: var(--warn-bg); color: var(--warn); }
.p-bad { background: var(--bad-bg); color: var(--bad); } .p-info { background: var(--info-bg); color: var(--info); }
.p-top { background: var(--top-bg); color: var(--top-ink); } .p-sage { background: var(--btn-bg); color: var(--btn-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Buttons: filled = do it, outline = other choice, red outline = remove/decline, green = call */
.btn { min-height: 52px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--btn-bg); color: var(--btn-ink); font-weight: 800; font-size: 17px; }
.btn:active { transform: translateY(1px); filter: brightness(0.95); }
.btn.ghost { background: transparent; border: 2px solid var(--muted); color: var(--ink); font-weight: 700; }
.btn.danger { background: transparent; border: 2px solid var(--bad-line); color: var(--bad); font-weight: 700; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn.wide { width: 100%; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btns > .btn, .btns > a.call { flex: 1 1 140px; }
a.call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 14px; background: var(--go-solid); color: #fff; font-weight: 800; text-decoration: none; font-variant-numeric: tabular-nums; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .search input { min-height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-deep); font-size: 17px; width: 100%; }
.field input::placeholder, .search input::placeholder { color: var(--quiet); }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { border-color: var(--btn-bg); outline: none; }
.field textarea { padding: 12px 14px; min-height: 80px; resize: vertical; }
.check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-deep); font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--btn-bg); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.search { display: flex; gap: 10px; }
.search input { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 20px; text-transform: uppercase; }
.search input::placeholder { text-transform: none; font-weight: 500; font-size: 16px; }

.empty { border: 2px dashed var(--line); border-radius: 16px; padding: 20px; color: var(--muted); }
.empty strong { color: var(--ink); }
.notice { border-radius: 16px; padding: 14px 16px; background: var(--warn-bg); color: var(--ink); border: 1px solid var(--warn); }
.notice .btn { margin-top: 10px; display: inline-flex; }
.err { color: var(--bad); font-weight: 700; margin: 0; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.hist { font-size: 14px; color: var(--quiet); margin: 6px 0 0; padding-left: 18px; }
details summary { cursor: pointer; color: var(--muted); font-weight: 700; min-height: 36px; display: flex; align-items: center; }

/* Bottom tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--tab-bg); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0px, env(safe-area-inset-left)); }
.tabs button { min-height: 64px; background: transparent; border: 0; color: var(--tab-ink); font-size: 12px; padding: 0; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; }
.tabs button[aria-current="page"] { color: var(--tab-on-ink); font-weight: 800; background: var(--tab-on-bg); }
.tabs .dot { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 20px; height: 20px; border-radius: 10px; background: #D9453A; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 84px); background: var(--ink); color: var(--bg-deep); padding: 12px 18px; border-radius: 999px; font-weight: 700; z-index: 40; max-width: calc(100vw - 32px); }

/* Splash + login: bold full-screen brand colour, white bridge */
body.brand-bg, body.brand-bg::before { background: var(--login-bg); }
.splash, .login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; background: var(--login-bg); color: var(--login-ink);
  padding: calc(env(safe-area-inset-top) + 24px) max(20px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 24px) max(20px, env(safe-area-inset-left)); }
.splash { align-items: center; gap: 14px; }
.mark { width: 190px; max-width: 60vw; height: auto; }
.word { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; line-height: 1; }
.word span { color: var(--login-accent); }
.login-in { width: 100%; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center; }
.login form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login .sub { color: var(--login-ink); opacity: 0.92; font-size: 16px; text-align: center; }
.login .sub strong { color: var(--login-ink); }
.login .field label { color: var(--login-ink); }
.login .field input { background: #fff; color: #0A2B1F; border: 2px solid #fff; font-weight: 700; }
.login .field input::placeholder { color: #6B7A62; font-weight: 500; }
.login .field input:focus { border-color: var(--login-btn-bg); }
.login .btn { background: var(--login-btn-bg); color: var(--login-btn-ink); }
.login .btn.ghost { background: transparent; border: 2px solid var(--login-ink); color: var(--login-ink); }
.login .err { color: #5C0F0A; background: #FBE3E1; border-radius: 10px; padding: 10px 12px; }
.login .notice { background: #FBF3DD; color: #2B2410; border-color: #E0B45C; text-align: left; }
.foot { color: var(--login-ink); opacity: 0.85; font-size: 14px; font-weight: 600; text-align: center; margin: 0; }

/* Emergency / Quotes switch */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg button { min-height: 48px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 700; font-size: 16px; }
.seg button[aria-selected="true"] { background: var(--tab-on-bg); color: var(--tab-on-ink); font-weight: 800; }
/* Job details */
.kv { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--raised); }
.kv div { display: flex; flex-direction: column; gap: 1px; }
.kv span { font-size: 13px; color: var(--quiet); font-weight: 700; }
.kv strong { font-weight: 600; overflow-wrap: anywhere; }

/* Job board: stages as columns, swipe left/right */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); padding: 8px max(16px, env(safe-area-inset-left)); scrollbar-width: none; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--barh, 64px)); z-index: 15; background: var(--bg); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.chip b { color: var(--ink); margin-left: 2px; }
.chip.hot { border: 2px solid var(--bad-line); color: var(--bad); }
.chip.hot b { color: var(--bad); }
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); padding: 2px max(16px, env(safe-area-inset-left)) 8px; scroll-padding: 0 max(16px, env(safe-area-inset-left)); align-items: flex-start; }
.col { flex: 0 0 min(86vw, 340px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; background: var(--raised); border-radius: 16px; padding: 10px; border: 1px solid var(--line); min-width: 0; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.col-head b { min-width: 28px; height: 28px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--tab-on-bg); color: var(--tab-on-ink); font-size: 14px; padding: 0 8px; }
.col-empty { margin: 0; padding: 14px 6px; color: var(--quiet); font-size: 14px; }
.col .card { padding: 14px; }
.col-shut summary { font-size: 14px; }
.col-shut .card { opacity: 0.7; margin-top: 8px; }
.col .btns > .btn, .col .btns > a.call { flex: 1 1 90px; min-height: 48px; }
/* Wide screens: let the board use the whole window, not the narrow phone column */
@media (min-width: 720px) {
  .board { width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; padding: 2px 24px 12px; scroll-padding: 0 24px; }
  .col { flex-basis: 320px; }
}
.card .pill { white-space: normal; line-height: 1.3; }

/* Billing panel on a job card */
.bill { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.bill .ok { font-weight: 800; }
/* Money */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 700; }
.stat b { font-size: 28px; font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.02em; }
.stat small { font-size: 12px; color: var(--muted); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Chat */
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; line-height: 1.4; font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--btn-bg); color: var(--btn-ink); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.dim { opacity: .6; }
.card.confirm { border: 2px solid var(--btn-bg); }
.chat-in { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 72px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; background: var(--bg); padding: 8px 0; }
.chat-in textarea { min-height: 52px; max-height: 140px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-deep); font-size: 16px; width: 100%; resize: none; }
.chat-in textarea:focus { border-color: var(--btn-bg); outline: none; }
/* Picking engineers in order */
.li.pick { width: 100%; display: flex; align-items: center; gap: 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.li.pick:last-child { border-bottom: 0; }
.li.pick .num { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; }
.li.pick.on .num { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.li.pick .who { min-width: 0; flex: 1; display: flex; flex-direction: column; }

/* Today list + job photos */
.why { margin: 0 0 6px; font-weight: 800; font-size: 15px; color: var(--ink, inherit); }
.card.red .why { color: var(--bad); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.seg button { font-size: 14px; padding: 0 4px; white-space: nowrap; }
.manual { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 12px; }
.headbtns { display: flex; gap: 8px; }
.small-rm { background: none; border: 0; padding: 4px 0 0; color: var(--bad); font-weight: 700; font-size: 14px; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.card .linkbtn.more { min-height: 40px; border: 0; color: var(--muted, #5b6470); text-decoration: underline; padding: 0 8px; }
.wrap .linkbtn[data-act="find-clear"] { border: 0; padding: 0; min-height: 0; color: inherit; text-decoration: underline; font-weight: 600; }
.aq { border: 2px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--raised); }
.aqh { margin: 0; font-weight: 800; }
.aqp { text-align: left; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px; }
.aqp.on { border-color: var(--btn-bg); box-shadow: inset 0 0 0 1px var(--btn-bg); }
.aq .linkbtn.more { align-self: flex-start; border: 0; color: var(--muted); text-decoration: underline; padding: 0; min-height: 36px; }

.card .row .xbtn { margin-left: auto; min-width: 40px; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted, #5b6470); font-size: 26px; line-height: 1; font-weight: 400; padding: 0 8px; }
.card .row .xbtn.sure { background: var(--bad, #b3261e); color: #fff; font-size: 14px; font-weight: 700; }

.chip.on { background: var(--tab-on-bg); color: var(--tab-on-ink); border-color: var(--tab-on-bg); }
.chip.on b { color: var(--tab-on-ink); }
.chip.hot.on { border: 3px solid var(--bad-line); }

.jsearch { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.jsearch input { flex: 1; min-height: 48px; font-size: 17px; text-transform: none; }
.outcomes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px dashed var(--line); padding-top: 10px; }
.outcomes .sub { width: 100%; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.outcomes .btn { flex: 1 1 auto; font-size: 14px; padding: 0 12px; white-space: nowrap; }
.tl { list-style: none; margin: 4px 0 8px; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.tl li { font-size: 15px; line-height: 1.35; word-break: break-word; }
.tl li.in { color: var(--ink); font-weight: 600; }
.tl li.tl-stage, .tl li.tl-call { color: var(--muted); }
.tl-when { display: block; font-size: 12px; font-weight: 700; color: var(--quiet); text-transform: uppercase; letter-spacing: .04em; }

.board { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.card .why.next { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.card .why.next.p1 { color: var(--bad); }

.card.amber { border: 2px solid var(--tick); }
.card.green { border-left: 6px solid var(--go-solid); }
.card.amber .why.next.p2, .card.amber .why.next.p3 { color: var(--ink); }
.helpbtn { margin-left: 10px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: transparent; color: var(--muted); font: 700 16px/1 inherit; vertical-align: middle; position: relative; top: -4px; }
.namerow { display: flex; gap: 8px; margin-top: 10px; }
.namerow input { flex: 1; min-width: 0; min-height: 44px; font-size: 17px; border: 2px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--card, #fff); color: var(--ink); }
.namerow .btn { flex: none; white-space: nowrap; }
#toast { white-space: normal; max-width: min(92vw, 520px); line-height: 1.35; border-radius: 18px; text-align: center; }
#toast.ok { background: var(--go-solid); color: #fff; }

@media (max-width: 700px) { .col { scroll-snap-stop: always; } }
@media (min-width: 701px) { .board { scroll-snap-type: none; } }

/* Wide screens: show every stage button, wrapping onto a second line if needed */
@media (min-width: 701px) { .chips { flex-wrap: wrap; overflow-x: visible; } }
