:root {
  color-scheme: light;
  --ink: #1C1B19;
  --ink-2: #5F5B53;               /* secondary text (≥ 4.5:1 on surface) */
  --line: #E6E2DA;
  --line-strong: #CFCAC0;
  --paper: #F7F5F0;
  --surface: #FFFFFF;
  --sunk: #F1EEE8;
  --accent: #0F766E;
  --accent-strong: #0B5A54;
  --accent-soft: #E3F1EE;
  --ok: #067647;      --ok-soft: #E7F6EC;
  --warn: #B54708;    --warn-soft: #FEF4E6;
  --bad: #B42318;     --bad-soft: #FDECEA;
  --info: #175CD3;    --info-soft: #EAF1FD;
  --off: #EDEAE4;     --off-ink: #9A958B;
  --brand: #0C2624;   --brand-2: #FFC83D;   /* Travel Factory mark only */
  /* Derived (documented) */
  --scrim: color-mix(in srgb, var(--ink) 45%, transparent);
  --dot: color-mix(in srgb, var(--ink) 13%, transparent);
  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent), 0 18px 40px -14px color-mix(in srgb, var(--ink) 22%, transparent);
  --curve: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 12px;
  --sans: Geist, "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; }

.pn { position: relative; }
/* ── Fernhill product UI (desktop) ──────────────────────────────────────── */
.ui { width: 1200px; height: 760px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; position: relative; font-size: 13px; color: var(--ink); }
.topnav { height: 52px; display: flex; align-items: center; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.logo i { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); display: block; }
.ops .logo i { background: var(--ink); }
.navlinks { display: flex; gap: 2px; }
.navlinks span { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.navlinks span.on { color: var(--ink); background: var(--sunk); }
.navlinks em { font: normal 500 11px var(--mono); color: var(--accent); margin-left: 5px; }
.grow { flex: 1; }
.envwrap { position: relative; }
.envpill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px 6px 12px; font: 500 13px var(--sans); color: var(--ink); background: var(--surface); cursor: pointer; max-width: 460px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.envpill:hover { border-color: var(--line-strong); }
.envpill svg { width: 14px; height: 14px; color: var(--ink-2); transform: rotate(90deg); flex: none; }
.envpill.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.envpill.run { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.envpill.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.envpill.bad i { background: var(--bad); }
.envpill.run i { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.envcard { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 420px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 13px; }
.envcard .kv { margin: 0; }
.envcard a { color: var(--accent-strong); }
.envprob { display: flex; flex-direction: column; gap: 6px; }
.envprob a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); text-decoration: none; font-weight: 500; }
.envprob a span { flex: 1; }
.envprob svg { width: 15px; height: 15px; }
.cn { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; white-space: nowrap; }
.cn i { width: 7px; height: 7px; border-radius: 50%; background: var(--off-ink); }
.cn.on i { background: var(--ok); }
.cn small { color: var(--ink-2); }
.envpill i, .strip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.me { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.page { flex: 1; min-height: 0; padding: 20px 28px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.crumbs { font-size: 12px; color: var(--ink-2); }
.crumbs b { color: var(--ink); font-weight: 500; }
.title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.title-row h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui h1 { font-size: 24px; line-height: 30px; letter-spacing: -0.02em; margin: 0; font-weight: 650; }
.sub { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; }
.s-wait { color: var(--warn); } .s-wait i { background: var(--warn); }
.s-live { color: var(--ok); } .s-live i { background: var(--ok); }
.s-stop { color: var(--bad); } .s-stop i { background: var(--bad); }
.s-info { color: var(--info); } .s-info i { background: var(--info); }
.s-muted { color: var(--ink-2); } .s-muted i { background: var(--off-ink); }

.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stage { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; background: var(--surface); }
.stage b { font: 600 15px var(--mono); }
.stage { min-width: 0; }
.stage span { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.stage.done { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, var(--surface)); }
.stage.now { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stage.blocked { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, var(--surface)); }
.stage.held { background: var(--sunk); }
.cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; min-height: 0; flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; display: flex; flex-direction: column; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 16px 0; }
.panel-h h3 { margin: 0; font-size: 13px; font-weight: 600; }
.panel-h small { font-size: 12px; color: var(--ink-2); }
.panel-b { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 9px; }
.panel-b > .btn { align-self: flex-start; }
.kv { display: grid; grid-template-columns: 104px 1fr; gap: 6px 12px; margin: 0; font-size: 13px; line-height: 19px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.chg { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; font-size: 13px; line-height: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.chg:first-child { border-top: 0; padding-top: 0; }
.chg .id, .chg .diff { font: 12px var(--mono); color: var(--ink-2); }
.chg small { display: block; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg .t { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; max-width: 100%; overflow-wrap: anywhere; font: 12px var(--mono); color: var(--ink-2); background: var(--sunk); border-radius: 999px; padding: 3px 10px; }
.event svg { width: 13px; height: 13px; stroke: var(--ink-2); }
.more { font-weight: 600; font-size: 12px; }
.ck { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.ck svg { width: 17px; height: 17px; margin-top: 1px; }
.ck.pass svg { stroke: var(--ok); } .ck.fail svg { stroke: var(--bad); } .ck.pend svg { stroke: var(--warn); }
.ck small { display: block; font-size: 12px; color: var(--ink-2); }
.stamp { font: 500 11px var(--mono); color: var(--ink-2); }
.notice { border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 19px; border: 1px solid; position: relative; }
.notice b { display: block; margin-bottom: 2px; }
.notice.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, var(--surface)); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, var(--surface)); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, var(--surface)); }
.notice.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, var(--surface)); }
.versus { display: grid; grid-template-columns: 1fr 20px 1fr; align-items: center; gap: 6px; }
.versus svg { width: 18px; height: 18px; stroke: var(--ink-2); }
.v { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.v small { display: block; font-size: 11px; color: var(--ink-2); }
.v { min-width: 0; }
.v b { font: 600 15px var(--mono); display: block; overflow-wrap: anywhere; }
.v.old b { text-decoration: line-through; color: var(--ink-2); }
.big-num { font: 650 26px var(--mono); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.big-num small { font: 500 12px var(--sans); color: var(--ink-2); letter-spacing: 0; }

.dock { flex: none; border-top: 1px solid var(--line); background: var(--paper); padding: 12px 28px; display: flex; align-items: center; gap: 12px; }
.dock p { min-width: 0; overflow-wrap: anywhere; margin: 0 auto 0 0; flex: 0 1 auto; font-size: 13px; line-height: 19px; color: var(--ink-2); max-width: 70ch; }
.dock p b { color: var(--ink); font-weight: 600; }
.btn { height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; white-space: nowrap; position: relative; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; }
.solid { background: var(--accent); color: var(--surface); }
.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.quiet { background: transparent; color: var(--bad); padding: 0 8px; }
.danger { background: var(--bad); color: var(--surface); }
.off { background: var(--off); color: var(--off-ink); cursor: not-allowed; }

.seg { display: inline-flex; background: var(--sunk); border-radius: 999px; padding: 3px; gap: 2px; position: relative; }
.seg span { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg span.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent); }
.tbl { border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.tr { display: grid; grid-template-columns: 170px minmax(0, 1fr) 140px 150px 100px 14px; gap: 14px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.tr.th { border-top: 0; font: 500 11px var(--mono); color: var(--ink-2); padding: 9px 16px; background: var(--sunk); border-radius: var(--radius) var(--radius) 0 0; }
.tgroup { padding: 8px 16px; font: 500 11px var(--mono); color: var(--ink-2); border-top: 1px solid var(--line); background: var(--paper); }
.tr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr > span.pn { overflow: visible; }
.tr .rel { font-family: var(--mono); font-weight: 600; }
.tr .muted { color: var(--ink-2); }
.tr svg { width: 14px; height: 14px; stroke: var(--ink-2); }
.tr.hot { box-shadow: inset 3px 0 0 var(--warn); }
.tr.hot.bad { box-shadow: inset 3px 0 0 var(--bad); }
.box { border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; font-size: 13px; min-height: 38px; display: flex; align-items: center; gap: 8px; background: var(--surface); }
.box svg { width: 15px; height: 15px; stroke: var(--ink-2); }
.box.tall { min-height: 72px; align-items: flex-start; }
.hint { font-size: 12px; line-height: 17px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field > label { font-size: 12px; font-weight: 600; }
.choices { display: flex; flex-direction: column; gap: 6px; position: relative; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 18px; }
.choice .r { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; margin-top: 1px; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice.on .r { border: 5px solid var(--accent); }
.choice.locked { background: var(--sunk); }
.choice small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 1px; }
.lockline { display: inline-flex; gap: 5px; align-items: center; color: var(--warn); font-size: 12px; font-weight: 500; margin-top: 4px; }
.lockline svg { width: 13px; height: 13px; stroke: currentColor; }
.void { flex: none; height: 200px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2); position: relative; line-height: 20px; }
.void b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.scrim { position: absolute; inset: 0; background: var(--scrim); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 430px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.drawer-h { padding: 22px 24px 14px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-h h2 { font-size: 18px; margin: 0 0 4px; font-weight: 650; }
.drawer-h p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 19px; }
.drawer-b { padding: 18px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.drawer-f { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.setrow { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 16px 0; border-top: 1px solid var(--line); }
.setrow h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.setrow p { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 18px; }
.lims { position: relative; }
.lim { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.lim span { color: var(--ink-2); }
.tl { display: flex; flex-direction: column; }
.tle { display: grid; grid-template-columns: 28px minmax(0, 1fr) 64px; gap: 12px; padding-bottom: 16px; position: relative; }
.tle::before { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: var(--line); }
.tle:last-child::before { display: none; }
.tle .n { width: 28px; height: 28px; border-radius: 50%; background: var(--sunk); border: 1px solid var(--line); display: grid; place-items: center; }
.tle .n svg { width: 14px; height: 14px; stroke: var(--ink-2); }
.tle.bad .n { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, var(--surface)); }
.tle.bad .n svg { stroke: var(--bad); }
.tle.good .n { background: var(--ok-soft); }
.tle.good .n svg { stroke: var(--ok); }
.tle > span { min-width: 0; overflow-wrap: anywhere; }
.tle b { display: block; font-size: 13px; font-weight: 600; padding-top: 4px; }
.tle span { font-size: 12px; color: var(--ink-2); }
.tle time { font: 12px var(--mono); color: var(--ink-2); text-align: right; padding-top: 5px; }

/* ── Fernhill product UI (phone) ────────────────────────────────────────── */
.mob { width: 360px; height: 740px; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line-strong); display: flex; flex-direction: column; overflow: hidden; position: relative; font-size: 14px; flex: none; }
.mob-head { padding: 20px 16px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.mob-head .t { flex: 1; min-width: 0; }
.mob-head b { display: block; font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob-head .t > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob-head span { font-size: 12px; color: var(--ink-2); }
.round { width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; flex: none; }
.round svg { width: 17px; height: 17px; stroke: var(--ink); }
.mob-body { flex: 1; overflow: hidden; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.mob-foot { padding: 12px 16px 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; background: var(--surface); position: relative; }
.pair { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }
.mob-foot .btn, .sheetm .btn { height: 46px; font-size: 14px; }
.strip { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); background: var(--sunk); border-radius: 999px; padding: 6px 12px; }
.mrow { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.mrow.hot { box-shadow: inset 3px 0 0 var(--warn); }
.mrow.hot.bad { box-shadow: inset 3px 0 0 var(--bad); }
.mrow .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mrow .top b { font: 600 14px var(--mono); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 18px; }
.mlabel { font: 500 11px var(--mono); color: var(--ink-2); display: flex; justify-content: space-between; }
.hero { background: var(--accent-soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.hero.bad { background: var(--bad-soft); }
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.minis div { background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.minis span { display: block; font-size: 11px; color: var(--ink-2); }
.minis div { min-width: 0; }
.minis b { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callrow { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.callrow .t { flex: 1; }
.callrow .t { min-width: 0; }
.callrow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callrow > svg { width: 16px; height: 16px; stroke: var(--ink-2); }
.fold { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.fold svg { width: 16px; height: 16px; stroke: var(--ink-2); }
.recheck { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); }
.recheck svg { width: 14px; height: 14px; stroke: var(--ok); flex: none; }
.sheetm { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 16px 22px; display: flex; flex-direction: column; gap: 12px; }
.sheetm .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); align-self: center; }
.sheetm h3 { margin: 0; font-size: 18px; font-weight: 650; }
.sheetm p { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.toastm { position: absolute; left: 12px; right: 12px; bottom: 100px; background: var(--ink); color: var(--surface); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.toastm svg { width: 18px; height: 18px; stroke: var(--ok-soft); flex: none; }


/* ── Travel Factory Studio pieces ───────────────────────────────────────── */
.logo svg.mark { width: 24px; height: 24px; }
.logo svg.mark circle { fill: var(--brand); }
.logo svg.mark path { fill: var(--brand-2); }
.thumb { width: 30px; height: 52px; border-radius: 6px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--paper) 6px 12px); flex: none; display: grid; place-items: center; position: relative; }
.thumb svg { width: 28px; height: 28px; stroke: var(--ink-2); }
.thumb.big { width: 176px; height: 313px; border-radius: 12px; align-content: center; gap: 8px; }
.thumb.big small { font-size: 11px; color: var(--ink-2); text-align: center; padding: 0 8px; overflow-wrap: anywhere; }
.thumb.wide { width: 100%; height: 120px; }
.thumb.phonevid { width: 100%; height: 400px; border-radius: 14px; }
.tt { min-width: 0; display: flex; flex-direction: column; }
.tt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt small { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr { display: grid; grid-template-columns: 30px minmax(0, 1fr) 190px 170px 64px 14px; gap: 14px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.vr.c { grid-template-columns: 30px minmax(0, 1fr) 150px 14px; }
.tbl > .vr.c:first-child { border-top: 0; }
.vr.th { border-top: 0; font: 500 11px var(--mono); color: var(--ink-2); padding: 9px 16px; background: var(--sunk); border-radius: var(--radius) var(--radius) 0 0; }
.vr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr > span.thumb { overflow: visible; }
.vr .muted { color: var(--ink-2); }
.vr svg { width: 14px; height: 14px; stroke: var(--ink-2); }
.vr.hot { box-shadow: inset 3px 0 0 var(--warn); }
.vr.hot.bad { box-shadow: inset 3px 0 0 var(--bad); }
.vidrow { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 14px; align-items: start; }
.cap > span { white-space: pre-line; font-size: 12px; line-height: 18px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; position: relative; }
.kpis + .kpis { margin-top: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.kpi span { display: block; font-size: 12px; color: var(--ink-2); }
.kpi b { display: block; font: 650 22px var(--mono); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.kpi small { font-size: 11px; color: var(--ink-2); }
.rt { display: grid; grid-template-columns: minmax(0, 1fr) repeat(7, 58px); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.rt.th { border-top: 0; font: 500 11px var(--mono); color: var(--ink-2); padding-top: 0; }
.rt > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 13px; }
.barrow .mono { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 10px; border-radius: 5px; background: var(--sunk); overflow: hidden; }
.track i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; position: relative; }
.day { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-height: 300px; background: var(--surface); min-width: 0; }
.day.free { border-style: dashed; background: var(--paper); }
.day > b { font-size: 13px; }
.day > small { font-size: 12px; color: var(--ink-2); }
.day .status { white-space: normal; }
.qr { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.qr:first-child { border-top: 0; }
.muted { color: var(--ink-2); }
.srcchip { font: 500 11px var(--mono); padding: 3px 9px; border-radius: 999px; background: var(--info-soft); color: var(--info); white-space: nowrap; }
.srcchip.auto { background: var(--sunk); color: var(--ink-2); }
.setline { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13px; }
.toggle { width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 16px; }
.setval { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.bad-t { color: var(--bad); }
.panel-h small a, .panel-b a { cursor: pointer; font-weight: 600; }
.mrow .top b { font: 600 14px var(--sans); }
.choice.act { align-items: center; cursor: pointer; }
.choice.act > span { flex: 1; min-width: 0; }
.choice.act b { font-weight: 600; }
.choice.act svg { width: 16px; height: 16px; stroke: var(--ink-2); flex: none; }
.choice.act:first-child { border-color: var(--accent); background: var(--accent-soft); }
/* Phone pieces */
.mtabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; position: relative; background: var(--surface); }
.mtabs > span { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.mtabs .ic { width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; position: relative; }
.mtabs .ic svg { width: 20px; height: 20px; stroke: currentColor; }
.mtabs > span.on { color: var(--accent-strong); }
.mtabs > span.on .ic { background: var(--accent-soft); }
.mtabs .ic em { position: absolute; top: -2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: var(--surface); font: normal 600 11px/18px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.mob-foot:has(.mtabs) { padding: 6px 8px 14px; }
.mtabs > .pin { top: -6px; left: -4px; }
.round.gear svg { width: 18px; height: 18px; stroke: var(--ink-2); }
.mob-foot:has(.mtabs) > .btn { margin: 4px 8px 6px; }
.backpill { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--sunk); font-size: 13px; font-weight: 600; color: var(--ink); flex: none; }
.backpill svg { width: 17px; height: 17px; stroke: var(--ink); }
.round.brand { background: transparent; }
.round.brand .mark { width: 30px; height: 30px; }
.round.brand .mark circle { fill: var(--brand); }
.round.brand .mark path { fill: var(--brand-2); }
.hero-t { font-size: 15px; font-weight: 650; line-height: 20px; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; overflow: hidden; position: relative; flex: none; }
.chips span { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chips span.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.void.m { height: 170px; padding: 0 16px; font-size: 13px; }
.versus.m { grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); }
.versus.m .v { background: var(--surface); }
.thumb.phonevid.short { height: 230px; }
.tl.m .tle { grid-template-columns: 28px minmax(0, 1fr) auto; padding-bottom: 12px; }
.tl.m .tle time { white-space: nowrap; }
.mkpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; position: relative; }
.mkpis .kpi b { font-size: 20px; }
.steps { display: flex; flex-direction: column; gap: 8px; position: relative; }
.stp { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.stp > b { width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; font: 600 12px var(--mono); }
.stp .btn { height: 36px; }
.bars { display: flex; flex-direction: column; gap: 10px; position: relative; }
.barrow.m { grid-template-columns: 96px minmax(0, 1fr) 64px; }
.mdays, .mq, .mset { display: flex; flex-direction: column; gap: 8px; position: relative; }
.mday { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-height: 64px; }
.mday.free { border-style: dashed; }
.mday > b { font-size: 13px; }
.mday .tt small .status { font-size: 12px; }
.mset .setline { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; gap: 10px; }
.mset .setline > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.mset .setline small { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mset .setline svg { width: 16px; height: 16px; stroke: var(--ink-2); flex: none; }
.sheetm .setline { padding: 4px 0; position: relative; }
.mob-foot > .btn + .mtabs { margin-top: 2px; }
.toastm.tabs { bottom: 96px; }
.chipwrap { position: relative; padding: 6px; flex: none; background: var(--sunk); border-radius: 999px; }
.chipwrap .chips span { border-color: transparent; padding: 6px 11px; }
.hero .hint { overflow-wrap: anywhere; }

/* ── The real app (the storyboard drew fixed-size frames; here they fill the window) ── */
html, body { height: 100%; }
body { overflow: hidden; }
#app { height: 100%; }
.ui { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
.page { overflow-y: auto; }
.page > .cols { flex: none; }
.dock { padding: 12px 28px calc(12px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
button.btn, button.choice, button.ghostlink { cursor: pointer; }
button.btn { font-size: 13px; font-weight: 600; }
.btn.off { cursor: not-allowed; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
a.btn { text-decoration: none; }
.solid { color: var(--surface); }
button.choice { width: 100%; text-align: left; background: var(--surface); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent); }
.navlinks a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.navlinks a.on { color: var(--ink); background: var(--sunk); }
.navlinks a:hover { color: var(--ink); }
.envpill.run i { background: var(--info); }
.envpill.ok i { background: var(--ok); }
.me { cursor: default; }
input.box, select.box, textarea.box { width: 100%; outline: none; }
input.box:focus, select.box:focus, textarea.box:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
textarea.box { resize: vertical; min-height: 150px; line-height: 18px; font-size: 12px; white-space: pre-wrap; }
.thumb { background-size: cover; background-position: center; }
.thumb.img svg { display: none; }
.vplayer { width: 176px; aspect-ratio: 9 / 16; border-radius: 12px; background: var(--ink); display: block; object-fit: contain; }
.vplayer.m { width: 100%; height: auto; max-height: 62dvh; aspect-ratio: 9 / 16; border-radius: 14px; }
.vplayer.m.short { max-height: 40dvh; }
.vcap { font-size: 11px; color: var(--ink-2); text-align: center; margin-top: 6px; }
.vr, .mrow, .qr.link, .rt.link { cursor: pointer; }
.vr:hover, .rt.link:hover { background: var(--paper); }
.rt.th button { all: unset; cursor: pointer; }
.rt.th button.on { color: var(--ink); font-weight: 600; }
.toggle { cursor: pointer; border: 0; padding: 0; }
.day.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
.day [draggable="true"] { cursor: grab; }
.day select.box { font-size: 12px; padding: 6px 8px; min-height: 32px; margin-top: auto; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--surface); border-radius: 12px; padding: 11px 16px; font-size: 13px; display: flex; gap: 10px; align-items: center; z-index: 60; max-width: min(560px, calc(100vw - 24px)); box-shadow: var(--shadow); }
.toast svg { width: 17px; height: 17px; stroke: var(--ok-soft); flex: none; }
.toast.bad svg { stroke: #FDB3AE; }
.err-t { color: var(--bad); font-size: 12px; }
.panel-b details summary { cursor: pointer; font-weight: 600; font-size: 12px; }
.ck a { font-size: 12px; }
.fieldrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.timepair { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.timepair input { width: 120px; }
.scrim { z-index: 20; }
.drawer, .sheetm { z-index: 21; }
.signout { font-size: 12px; color: var(--ink-2); }

/* Phone: the same app below 760 px */
.mob { width: 100%; height: 100dvh; border-radius: 0; border: 0; box-shadow: none; }
.mob-head { padding-top: calc(14px + env(safe-area-inset-top)); }
.mob-body { overflow-y: auto; }
.mob-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.mob-foot:has(.mtabs) { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.mtabs a { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.mtabs a.on { color: var(--accent-strong); }
.mtabs a.on .ic { background: var(--accent-soft); }
.mob .btn { height: 46px; font-size: 14px; }
.mob .stp .btn { height: 36px; font-size: 13px; }
.backpill, .round.gear { cursor: pointer; border: 0; }
details.fold { display: block; }
details.fold > summary { display: flex; justify-content: space-between; align-items: center; list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary svg { transform: rotate(90deg); }
details.fold > div { padding-top: 10px; font-weight: 400; display: flex; flex-direction: column; gap: 8px; }
.sheetm { max-height: 85dvh; overflow-y: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.sheetm .choices { max-height: 50dvh; overflow-y: auto; }
.mob .scrim, .mob .sheetm { position: fixed; }
.toastm { position: fixed; z-index: 60; }
.chips button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid transparent; font-size: 13px; font-weight: 500; color: var(--ink-2); background: none; white-space: nowrap; cursor: pointer; }
.chips button.on { background: var(--ink); color: var(--surface); }
.chipwrap .chips { overflow-x: auto; }
.mob .kv { grid-template-columns: 92px 1fr; }
.mob .versus.m .v b { font-size: 14px; }

@media (max-width: 1100px) {
  .cols { grid-template-columns: 1fr; }
  .cal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .navlinks a { padding: 6px 7px; }
  .envpill { display: none; }
}

/* ── v2: topics, suggestions, making, settings tabs, several posts a day ── */
.hint > svg { width: 13px; height: 13px; stroke: currentColor; vertical-align: -2px; margin-right: 4px; }
.qr.q2 { grid-template-columns: 16px 22px minmax(0, 1fr) auto auto; }
.qr.q2[draggable="true"] { cursor: grab; }
.qr.drop { box-shadow: inset 0 2px 0 var(--accent); }
.qr.q3 { grid-template-columns: 22px minmax(0, 1fr) auto; }
.grip svg { width: 16px; height: 16px; stroke: var(--ink-2); }
.rowacts, .updown { display: flex; gap: 2px; }
.btn.quiet2 { background: transparent; color: var(--accent-strong); padding: 0 8px; height: 28px; font-size: 12px; }
.divider { display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--accent-strong); border-top: 2px dashed var(--accent); padding-top: 6px; margin: 4px 0; }
.sugs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sug { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); min-width: 0; }
.sug-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.sug-t { font-size: 14px; line-height: 19px; font-weight: 600; overflow-wrap: anywhere; }
.sug .hint { display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.sug .hint svg { margin-top: 2px; flex: none; }
.sug .row .btn { height: 32px; padding: 0 12px; }
.srcchip.trend { background: var(--warn-soft); color: var(--warn); }
.srcchip.win { background: var(--ok-soft); color: var(--ok); }
.srcchip.season { background: var(--accent-soft); color: var(--accent-strong); }
.chg2 { font: 500 11px var(--mono); color: var(--info); background: var(--info-soft); border-radius: 999px; padding: 1px 7px; }
.seg.sm button { padding: 3px 10px; font-size: 12px; }
.mix { gap: 6px; }
.mixrow { display: grid; grid-template-columns: 150px auto; gap: 12px; align-items: center; font-size: 13px; }
.setgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.setcell { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.setcell h3 { margin: 0; font-size: 13px; font-weight: 600; }
.setcell .choices, .setcell .setline, .setcell textarea { width: 100%; }
.setcell .choice { padding: 6px 10px; }
.setval textarea.box { min-height: 70px; }
.slotline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.slotline > b { width: 64px; font-size: 13px; }
.box.tm { min-height: 32px; padding: 4px 10px; font-family: var(--mono); }
.vr.h2 { grid-template-columns: minmax(0, 1fr) 150px 260px 90px; }
.day.c2 { min-height: 0; gap: 8px; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; }
.slot.free { border-style: dashed; background: var(--paper); cursor: default; }
.slot.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
.slot > small { font: 500 11px var(--mono); color: var(--ink-2); }
.slot .status { white-space: normal; }
.slot .thumb.wide { height: 72px; }
.mrow .mt { font-size: 14px; line-height: 19px; overflow-wrap: anywhere; }
.drawer-f .grow { flex: 1; }
.stepper.s4 { grid-template-columns: repeat(4, 1fr); }
.stepper.s5 { grid-template-columns: repeat(5, 1fr); }
.ytmark { color: #c4302b; font-weight: 600; }
.mslots { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mob .hero .btn.quiet { align-self: flex-start; height: 32px; }
.mob .chipwrap .chips button { cursor: pointer; }
@media (max-width: 1100px) { .sugs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .setgrid { grid-template-columns: 1fr; } }
.kv dd select.box { width: auto; min-width: 240px; max-width: 100%; }

/* Anything clickable says so: iPhone Safari only sends taps to elements marked clickable. */
[data-href], [data-act] { cursor: pointer; -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 15%, transparent); }
select[data-act] { cursor: default; }
.btn.pending { opacity: 0.6; pointer-events: none; }

/* Working on now: render progress */
.prog { display: flex; flex-direction: column; gap: 6px; }
.prog-bar { height: 6px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--accent); }

/* Bulk: ticks on rows while selecting, the action bar and the confirm box */
.selecting .selectable { position: relative; padding-left: 44px !important; cursor: pointer; user-select: none; }
.selectable > .tick { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface); display: grid; place-items: center; color: var(--surface); }
.sug.selectable > .tick { top: 18px; transform: none; }
.selectable > .tick svg { width: 13px; height: 13px; opacity: 0; }
.selectable.picked { background: var(--accent-soft); }
.selectable.picked > .tick { background: var(--accent); border-color: var(--accent); }
.selectable.picked > .tick svg { opacity: 1; }
.selecting .selectable .rowacts, .selecting .selectable .grip { visibility: hidden; }
.selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; display: flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: 8px; padding: 10px 14px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.selbar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.bulkscrim { position: fixed; z-index: 80; }
.bulkm { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 90; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 80px); display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.bulkm h3 { margin: 0; }
.bulkm p { margin: 0; }
.bulkm-b { overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.bulkm .setline b { white-space: nowrap; }
@media (max-width: 760px) {
  .selbar { left: 10px; right: 10px; transform: none; bottom: 72px; max-width: none; flex-wrap: wrap; white-space: normal; }
  .selbar .btn { padding-left: 10px; padding-right: 10px; }
}
.envpill svg, .envprob svg, .selectable > .tick svg { stroke: currentColor; }
.selectable.picked > .tick { color: #fff; }
