/* Harmony House team app, v2.0. One big button to talk to Sal; everything else behind the menu, top left.
   Same world as the Mac app: deep harbour night, brass light, glass. Light mode is morning on the island. */
:root {
  /* every colour comes from brand.css, shared with the Mac and Windows app. Dark everywhere, like the desktop app. */
  --bg: var(--hh-night); --bg2: var(--hh-deep); --card: var(--hh-glass); --card-solid: var(--hh-raise); --line: var(--hh-line); --line2: var(--hh-line2);
  --ink: var(--hh-ink); --ink2: var(--hh-ink2); --ink3: var(--hh-ink3);
  --terra: var(--hh-brass); --terra-ink: var(--hh-brass-ink); --gold: var(--hh-brass); --gold2: var(--hh-brass-hi); --sea: var(--hh-info); --sea-soft: color-mix(in srgb, var(--hh-info) 12%, transparent);
  --go: var(--hh-go); --go2: var(--hh-go-hi); --go-deep: var(--hh-go-deep);
  --ok: var(--hh-ok); --warn: var(--hh-warn); --bad: var(--hh-bad);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -18px rgba(0, 0, 0, .7);
  --glass: blur(20px) saturate(1.4);
  --sans: var(--hh-ui); --display: var(--hh-display); --serif: var(--hh-display); --mono: var(--hh-mono);
  --r: 18px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; background: radial-gradient(900px 520px at 50% 108%, color-mix(in srgb, var(--go) 9%, transparent), transparent 70%), radial-gradient(1100px 600px at 80% -20%, color-mix(in srgb, var(--gold) 8%, transparent), transparent 60%), var(--bg); background-attachment: fixed; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--sea); }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
h1 { font-size: 30px; line-height: 1.1; letter-spacing: -.025em; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.boot { display: grid; place-items: center; min-height: 80vh; font: 600 13px var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--ink3); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- shell: top bar with the menu, top left ---------- */
.shell { min-height: 100vh; }
main { min-width: 0; }
.side, .tabs { display: none !important; }
.top { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-bottom: 1px solid var(--line); }
.top.clear { background: none; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; position: absolute; left: 0; right: 0; }
.menubtn { position: relative; flex: none; width: 46px; height: 46px; border-radius: 15px; border: 1px solid var(--line2); background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.menubtn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.menubtn span:nth-child(2) { width: 13px; margin-right: 5px; }
.menubtn .mdot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.top .back { border: 0; background: none; padding: 8px 6px; color: var(--gold); font-weight: 600; cursor: pointer; font-size: 15px; }
.top .ttl { font: 650 18px var(--display); letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--ink2); font-size: 13.5px; font-weight: 600; }
.page { padding: 22px max(18px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

/* the menu drawer */
.drawer-bg { position: fixed; inset: 0; z-index: 40; background: rgba(2, 4, 8, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-bg.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 41; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); display: flex; flex-direction: column; gap: 2px; padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg2) 86%, transparent); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-right: 1px solid var(--line2); transform: translateX(-104%); visibility: hidden; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s .32s; overflow-y: auto; }
.drawer.on { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .6); }
.dr-head { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.dr-head b { font: 650 17px var(--display); display: block; } .dr-head small { color: var(--ink3); font-size: 12.5px; }
.dr-logo { flex: none; width: 40px; height: 40px; border-radius: 11px; background: url(/icon-180.png) center/cover, var(--card-solid); box-shadow: 0 0 0 1px var(--line2); }
.nav { position: relative; display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 0 12px; border-radius: 14px; color: var(--ink2); text-decoration: none; font-weight: 550; font-size: 15.5px; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.nav:hover { background: var(--card); color: var(--ink); }
.nav.on { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--ink); }
.nav.on svg { stroke: var(--gold); }
.nav svg, .tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav .ct { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--bad); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 700; }
.drawer .spacer { flex: 1; min-height: 16px; }

/* ---------- home: the big green button ---------- */
.page.home { min-height: 100vh; justify-content: center; padding-top: calc(76px + env(safe-area-inset-top, 0px)); }
.hero-sal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.hs-greet { font: 650 clamp(30px, 5vw, 44px)/1.08 var(--display); letter-spacing: -.03em; }
.hs-sub { color: var(--ink3); font-size: 15px; }
.orb { position: relative; width: min(58vw, 290px); aspect-ratio: 1; margin: clamp(26px, 6vh, 56px) 0 10px; border: 0; padding: 0; border-radius: 50%; cursor: pointer; background: none; display: grid; place-items: center; -webkit-touch-callout: none; user-select: none; }
.orb-core { position: relative; z-index: 2; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: var(--hh-orb);
  box-shadow: inset 0 3px 10px rgba(255, 255, 255, .45), inset 0 -18px 36px rgba(0, 40, 20, .55), 0 0 0 1px rgba(255, 255, 255, .18), 0 30px 70px -18px color-mix(in srgb, var(--go) 75%, transparent);
  transition: transform .18s cubic-bezier(.3, .7, .3, 1.4); }
.orb-core::before { content: ""; position: absolute; top: 8%; left: 18%; width: 46%; height: 26%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); filter: blur(1px); }
.orb-core svg { position: relative; width: 30%; height: 30%; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; filter: drop-shadow(0 2px 6px rgba(0, 50, 25, .5)); }
.orb:active .orb-core { transform: scale(.94); }
.orb-glow { position: absolute; inset: -22%; z-index: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--go) 42%, transparent) 0%, transparent 62%); filter: blur(10px); }
.orb-ring { position: absolute; inset: -2%; z-index: 1; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--go) 55%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .orb-glow { animation: breathe 4.2s ease-in-out infinite; }
  .orb-ring { animation: ripple 3.4s cubic-bezier(.2, .6, .3, 1) infinite; } .orb-ring.r2 { animation-delay: 1.7s; }
  .orb-core { animation: float 6s ease-in-out infinite; }
}
@keyframes breathe { 50% { opacity: .55; transform: scale(.94); } }
@keyframes ripple { from { transform: scale(.96); opacity: .9; } to { transform: scale(1.38); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-4px); } }
.orb-label { font: 650 20px var(--display); letter-spacing: -.01em; }
.hs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.hs-chip { display: inline-flex; align-items: baseline; gap: 5px; min-height: 40px; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line2); color: var(--ink2); text-decoration: none; font-size: 14px; backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); }
.hs-chip b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.hs-chip.hot b { color: var(--gold); } .hs-chip.bad b { color: var(--bad); }
.hs-quiet { color: var(--ink3); font-size: 14px; }
.hs-last { margin-top: 22px; max-width: 520px; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--ink); }
.hs-last small { color: var(--ink3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; } .hs-last span { color: var(--ink2); font-size: 14.5px; }

/* ---------- talking to Sal ---------- */
.talk { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); background: radial-gradient(700px 500px at 50% 40%, rgba(34, 216, 119, .16), transparent 70%), rgba(3, 5, 9, .9); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3); color: #eef0f4; color-scheme: dark; animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.talk-x { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #eef0f4; font-size: 18px; cursor: pointer; }
.talk-in { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.talk-orb { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: var(--hh-orb); box-shadow: inset 0 3px 10px rgba(255, 255, 255, .4), inset 0 -12px 26px rgba(0, 40, 20, .55), 0 0 80px 10px rgba(34, 216, 119, .35); }
.talk-orb svg { width: 40px; height: 40px; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .talk-orb.listening { animation: listen 1.1s ease-in-out infinite; }
  .talk-orb.thinking { animation: think 1.6s linear infinite; }
}
@keyframes listen { 50% { transform: scale(1.08); box-shadow: inset 0 3px 10px rgba(255, 255, 255, .4), inset 0 -12px 26px rgba(0, 40, 20, .55), 0 0 120px 24px rgba(34, 216, 119, .45); } }
@keyframes think { 0% { filter: hue-rotate(0deg) brightness(1); } 50% { filter: hue-rotate(-30deg) brightness(1.15); } 100% { filter: hue-rotate(0deg) brightness(1); } }
.talk-said { font: 600 22px/1.35 var(--display); letter-spacing: -.01em; color: #eef0f4; min-height: 1.4em; }
.talk-q { color: #a3a9b6; font-size: 16px; font-style: italic; }
.talk-reply { font: 600 clamp(20px, 3vw, 26px)/1.35 var(--display); letter-spacing: -.015em; color: #fff; }
.talk-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.talk-form textarea { width: 100%; min-height: 96px; font-size: 19px; padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: #fff; }
.talk-form textarea:focus { border-color: #22d877; box-shadow: 0 0 0 4px rgba(34, 216, 119, .18); }
.talk-hint { color: #8b92a1; font-size: 13.5px; max-width: 420px; }
.talk-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.talk .btn.pri { background: linear-gradient(180deg, var(--hh-go-hi), var(--hh-go)); color: var(--hh-go-ink); box-shadow: 0 10px 26px -10px rgba(34, 216, 119, .8); min-width: 170px; }
.talk .btn.ghost { color: #c7ccd6; border-color: rgba(255, 255, 255, .18); }
.talk-job { width: 100%; text-align: left; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.talk-job .job { border: 0; } .talk-job .a { color: #c7ccd6; }

/* ---------- the house header (My day, Louie's week, guest) ---------- */
.house { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; padding: 22px; color: #fbf6ec; background: var(--house-bg, linear-gradient(170deg, #0d1a2e 0%, #23314d 45%, #6a4b3a 100%)); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.house::after { content: ""; position: absolute; z-index: -1; inset: auto -10% -40px -10%; height: 90px; background: radial-gradient(ellipse at 50% 0, rgba(217, 178, 111, .3), transparent 70%); }
.house .res { font: 600 11.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.house h1 { color: #fffaf1; margin-top: 6px; }
.house .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 252, 245, .13); color: inherit; border: 1px solid rgba(255, 252, 245, .22); text-decoration: none; }
.pill.in::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6cf0a6; box-shadow: 0 0 0 3px rgba(108, 240, 166, .25); }
button.pill { cursor: pointer; }

/* ---------- cards and lists ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); overflow: hidden; }
.card > .hd { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px 8px; }
.card > .hd h2 { flex: 1; font-size: 12.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--ink2); }
.card > .hd .sub { color: var(--ink3); font-size: 12.5px; }
.card > .bd { padding: 6px 18px 18px; }
.empty { color: var(--ink3); padding: 4px 18px 18px; font-size: 14px; }
.list { display: flex; flex-direction: column; }
.row { display: flex; gap: 14px; align-items: center; min-height: 56px; padding: 10px 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.row:first-child { border-top: 0; }
a.row:hover, button.row:hover { background: color-mix(in srgb, var(--gold) 6%, transparent); }
button.row { width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; background: none; cursor: pointer; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow-wrap: anywhere; }
.row .s { color: var(--ink3); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.row .chev { color: var(--ink3); font-size: 20px; line-height: 1; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--card); color: var(--ink2); border: 1px solid var(--line2); white-space: nowrap; }
.tag.late, .tag.failed, .tag.blocked { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: transparent; }
.tag.in_progress, .tag.running, .tag.queued { background: var(--sea-soft); color: var(--sea); border-color: transparent; }
.tag.done, .tag.completed { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); border-color: transparent; }
.tag.waiting, .tag.waiting_approval, .tag.needs_clarification, .tag.expired, .tag.saved_on_device { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); border-color: transparent; }
.check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line2); background: none; cursor: pointer; position: relative; }
.check::after { content: ""; position: absolute; inset: -9px; }
.check:hover { border-color: var(--go); }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on::before { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.grid2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 > * { min-width: 0; }

/* ---------- forms ---------- */
.f { display: flex; flex-direction: column; gap: 6px; }
.f > span { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
input, textarea, select { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 13px; border: 1px solid var(--line2); background: color-mix(in srgb, var(--bg) 60%, transparent); outline: none; font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--ink3); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--gold); }   /* v2.24: checkboxes no longer stretch across the form */
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 16%, transparent); }
.form { display: flex; flex-direction: column; gap: 14px; }
.fr { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .fr { grid-template-columns: 1fr 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); font-weight: 650; font-size: 15px; cursor: pointer; color: var(--ink); text-decoration: none; transition: transform .08s; }
.btn:active { transform: scale(.98); }
.btn.pri { background: linear-gradient(180deg, var(--gold2), var(--gold)); border-color: transparent; color: var(--terra-ink); }
.btn.sea { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn.ghost { background: none; }
.btn.sm { min-height: 38px; padding: 0 15px; font-size: 13.5px; }
.btn.bad { color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; min-height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600; color: var(--ink2); cursor: pointer; font-size: 13.5px; }
.seg button.on { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--ink); }
.capture textarea { min-height: 56px; font-size: 17px; }
.capture .btns { margin-top: 12px; }
.hint { color: var(--ink3); font-size: 12.5px; }

/* Sal history */
.sal-head { display: flex; gap: 14px; align-items: center; }
.sal-av { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--hh-orb); display: grid; place-items: center; color: #fff; font: 700 19px var(--display); box-shadow: 0 0 24px -4px rgba(34, 216, 119, .6); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line2); background: var(--card); color: var(--ink2); min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer; }
.job { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.job:first-child { border-top: 0; }
.job .q { font-weight: 600; overflow-wrap: anywhere; }
.job .a { color: var(--ink2); font-size: 14.5px; overflow-wrap: anywhere; }
.steps { margin: 2px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink3); display: flex; flex-direction: column; gap: 2px; }
.files { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); overflow-wrap: anywhere; }
.receipt { font-size: 12.5px; color: var(--ink2); border: 1px dashed var(--line2); border-radius: 12px; padding: 9px 12px; }

/* status */
.lights { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .lights { grid-template-columns: repeat(3, 1fr); } }
.light { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; }
.light i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink3); }
.light.ok i { background: var(--ok); box-shadow: 0 0 10px var(--ok); } .light.bad i { background: var(--bad); } .light.setup i { background: var(--warn); }
.mode { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.mode.on { background: color-mix(in srgb, var(--bad) 12%, var(--card)); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.mode .rec { width: 12px; height: 12px; border-radius: 50%; background: var(--ink3); flex: none; }
.mode.on .rec { background: var(--bad); box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 22%, transparent); }
.banner { padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--bad) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); font-size: 14px; font-weight: 600; }
.banner.info { background: var(--sea-soft); border-color: transparent; }
.banner.warn { background: color-mix(in srgb, var(--warn) 13%, var(--card)); border-color: transparent; }
.leftoff { box-shadow: inset 3px 0 0 var(--gold), var(--shadow); }
.leftoff dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14.5px; }
.leftoff dt { color: var(--ink3); font-weight: 600; font-size: 12.5px; padding-top: 2px; }
.leftoff dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.update { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14.5px; }
.update .who { font-weight: 650; } .update .when { color: var(--ink3); font-size: 12px; margin-left: 6px; }
.update .ch { color: var(--ink3); font-size: 12.5px; }
.notetext { white-space: pre-wrap; border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 14.5px; overflow-wrap: anywhere; }

/* ---------- sign in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(18px, env(safe-area-inset-right, 0px)) 24px max(18px, env(safe-area-inset-left, 0px)); background: radial-gradient(70% 50% at 50% 100%, rgba(34, 216, 119, .14), transparent 65%), linear-gradient(180deg, #03060d 0%, #0a1222 60%, #111a2a 100%); color: #eef0f4; color-scheme: dark; }
.login .box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.login .box::before { content: ""; align-self: center; width: 76px; height: 76px; border-radius: 20px; background: url(/icon-180.png) center/cover, #10141c; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 50px -20px rgba(34, 216, 119, .45); }
.login h1 { font-size: 32px; text-align: center; color: #fff; }
.login .tagline { text-align: center; color: #a3a9b6; margin-top: -10px; }
.login .card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.login input { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .14); color: #eef0f4; }
.login .f > span, .login .hint { color: #a3a9b6; }
.login .btn.pri { background: linear-gradient(180deg, var(--hh-brass-hi), var(--hh-brass)); color: var(--hh-brass-ink); }
.login .btn.ghost { color: #a3a9b6; border-color: rgba(255, 255, 255, .14); }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.who button { border: 1px solid var(--line2); background: var(--card); border-radius: 14px; padding: 12px 6px; min-height: 52px; cursor: pointer; font-weight: 650; }
.who button.on { border-color: var(--go); }
.who button small { display: block; color: var(--ink3); font-weight: 500; font-size: 11.5px; }
.err { color: var(--bad); font-size: 13.5px; font-weight: 600; }

/* ---------- sheets and toast ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 45; background: rgba(3, 5, 10, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } }
.sheet { width: 100%; max-width: 580px; max-height: 88vh; overflow: auto; background: var(--card-solid); border: 1px solid var(--line2); border-radius: 26px 26px 0 0; padding: 20px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .sheet { border-radius: 26px; } }
.sheet .x { align-self: flex-end; }
.results .row { padding: 10px 4px; }
#toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--card-solid); color: var(--ink); border: 1px solid var(--line2); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .55); }
.kbd { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; border: 1px dashed var(--line2); padding: 8px 12px; border-radius: 10px; display: inline-block; user-select: all; }
@media (prefers-reduced-motion: no-preference) { .card, .house, .hero-sal { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; } @keyframes rise { from { opacity: 0; transform: translateY(10px); } } }

/* v2.10 Command Center (Mode B): one fast screen, two columns on wider screens */
.cc { display: grid; gap: 14px; }
@media (min-width: 900px) { .cc { grid-template-columns: 1.15fr 1fr; align-items: start; } .cc .wide { grid-column: 1 / -1; } }
.cc .card { margin: 0; }
.cc .div { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); font-weight: 650; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 18px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.tile b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.tile span { display: block; font-size: 12px; color: var(--ink3); margin-top: 3px; }
.tile.hot b { color: var(--warn); }
.sdot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink3); }
.sdot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.sdot.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.sdot.warn { background: var(--warn); }
.cc .note { padding: 0 18px 14px; font-size: 12px; color: var(--ink3); }
.page.cmd { max-width: 1240px; }

/* v3.1 the Media House: thumbnails, the drop target, before/after, caption options */
.mrow { align-items: flex-start; gap: 12px; }
.mthumb { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--card); flex: none; }
.mform { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mform select, .mform input { min-width: 0; flex: 1 1 140px; font: inherit; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); }
.mdrop { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 22px 14px; border: 1.5px dashed var(--line2); border-radius: 14px; cursor: pointer; color: var(--ink2); }
.mdrop b { color: var(--ink); }
.mba { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mba small { display: block; color: var(--ink3); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.mba .mthumb { width: 100%; height: 120px; }
.mcap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.mcap > div { flex: 1 1 100%; color: var(--ink); }
@media (min-width: 700px) { .mcap > div { flex: 1 1 260px; } }
.mh3 { font-size: 13px; margin: 14px 0 6px; color: var(--ink2); }

/* v3.8.0 the menu in groups, like the Mac's */
.navgrp { padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink3, var(--ink2)); opacity: .8; }
.navgrp:first-of-type { padding-top: 4px; }
.drawer .nav { min-height: 42px; }
.drawer { overflow-y: auto; }
