/* YPR OS, the staff platform (/os/). Direction A ("Bold street") in its dark app form, ported from the reviewed
   prototype: charcoal surfaces, YPR red for the one thing to do, Archivo + Space Mono, big touch targets, a bottom tab
   bar on phones and a sidebar from 960 px. Only transform/opacity animate; prefers-reduced-motion turns motion off. */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url('/fonts/archivo-latin-wdth.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url('/fonts/space-mono-latin-700.woff2') format('woff2'); }

:root {
  --bg: #0e0e10; --bg-2: #131316; --surface: #1a1a1e; --surface-2: #232328; --surface-3: #2d2d33;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16);
  --text: #f5f4f1; --text-2: rgba(245, 244, 241, .78); --text-3: rgba(245, 244, 241, .62);
  --red: #d50a0a; --red-press: #b40000; --red-text: #ff6a62; --red-soft: rgba(213, 10, 10, .18); --red-line: rgba(255, 90, 82, .34);
  --green: #3ccf86; --green-text: #5fe0a0; --green-soft: rgba(60, 207, 134, .14);
  --amber: #f5b031; --amber-text: #ffc95c; --amber-soft: rgba(245, 176, 49, .14);
  --blue-text: #9cc2ff; --blue-soft: rgba(110, 160, 255, .15);
  --tbc: #ffd84d; --tbc-ink: #1a1500; --focus: #ffb000;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-lg: 20px; --r: 14px; --r-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1); --out: cubic-bezier(.16, 1, .3, 1);
  --tabh: 68px; --side: 248px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.os { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); background-image: radial-gradient(70% 40% at 50% -10%, rgba(213, 10, 10, .12), transparent 70%); background-repeat: no-repeat;
  color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
p { margin: 0 0 .75rem; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: 14px; }
.link { color: var(--red-text); font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; }
.inline { display: inline; }
.warn-t { color: var(--amber-text); }

/* ── bars ── */
.previewbar { background: var(--tbc); color: var(--tbc-ink); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: center; padding: 6px 12px; }
.viewas { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #ffd84d; color: #1a1500; }
.viewas p { margin: 0; flex: 1; font-size: 14px; line-height: 1.3; }
.viewas .ic { width: 22px; height: 22px; }
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--line); }
.os--ro .top { border-bottom: 2px solid #ffd84d; }
.top__ro { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #ffd84d; color: #1a1500; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.top__in { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 16px; max-width: 1200px; margin: 0 auto; }
.top__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.top__brand img { height: 30px; width: auto; display: block; }
.top__os { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; padding-left: 10px; border-left: 2px solid var(--red); color: var(--text); }
.top__me { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.top__who { display: none; flex-direction: column; line-height: 1.15; min-width: 0; }
.top__name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__role { font-size: 12px; color: var(--text-3); }
.top__back { margin-left: -8px; }

/* ── layout ── */
.main { display: block; padding: 18px 0 calc(var(--tabh) + 40px + env(safe-area-inset-bottom)); }
.main:focus { outline: none; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 460px; }
.os--bare .main { padding-bottom: 48px; }

/* bottom tab bar (phones) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(22px); backdrop-filter: saturate(1.5) blur(22px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar ul { list-style: none; margin: 0 auto; padding: 4px 4px 0; display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr); max-width: 560px; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: var(--tabh); padding-top: 9px; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-decoration: none; transition: color .2s; }
.tab .ic { width: 24px; height: 24px; transition: transform .25s var(--out); }
.tab:active .ic { transform: scale(.86); }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] .ic { stroke-width: 2.2; }
.tab__b { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }

/* sidebar (desktop) */
.side { display: none; }
@media (min-width: 960px) {
  .top__who { display: flex; }
  .tabbar { display: none; }
  body.os:not(.os--bare) { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; align-items: start; }
  body.os > .previewbar, body.os > .viewas, body.os > .top { grid-column: 1 / -1; }
  .side { grid-column: 1; display: flex; flex-direction: column; position: sticky; top: 56px; height: calc(100vh - 56px); padding: 20px 12px; border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; }
  .side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .side__a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 650; font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left; }
  .side__a:hover { background: var(--surface); color: var(--text); }
  .side__a[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--red); }
  .side__ext { width: 14px; height: 14px; margin-left: auto; opacity: .6; }
  .side__out { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
  .main { grid-column: 2; padding: 32px 0 64px; }
  .wrap { max-width: 1000px; padding: 0 40px; }
  .wrap--narrow { max-width: 460px; }
  .top__in { max-width: none; padding-left: 24px; }
}

/* ── type ── */
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 4px; }
.h1, .hello { font-size: clamp(30px, 6vw + 8px, 44px); line-height: 1.02; font-weight: 800; font-stretch: 112%; letter-spacing: -.025em; margin: 6px 0 10px; overflow-wrap: anywhere; }
.h1--task { font-size: clamp(26px, 4vw + 10px, 38px); font-stretch: 105%; }
.h1--sub { font-size: 24px; margin-top: 10px; }
.h3 { font-size: 18px; font-weight: 750; margin: 0; }
.lead { color: var(--text-2); font-size: 16px; margin: 0 0 18px; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 2px 12px; }
.sec h2 { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.sec__r { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.needs { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--text-2); margin: 0 0 6px; }
.needs b { color: var(--text); font-weight: 750; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; animation: pulse 2.2s var(--ease) infinite; }
.needs--clear .pulse { background: var(--green); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(213, 10, 10, .55); } 70% { box-shadow: 0 0 0 10px rgba(213, 10, 10, 0); } 100% { box-shadow: 0 0 0 0 rgba(213, 10, 10, 0); } }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 700; font-size: 15.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s var(--ease), background .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn .ic { width: 18px; height: 18px; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: #e01010; }
.btn--primary:active { background: var(--red-press); }
.btn--primary[disabled] { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--quiet { background: transparent; color: var(--text-2); padding: 0 12px; }
.btn--quiet:hover { color: var(--text); }
.btn--danger { color: var(--red-text); }
.btn--ok { background: var(--green-soft); color: var(--green-text); }
.btn--light { background: #1a1500; color: #ffd84d; }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; min-height: 54px; font-size: 16.5px; }
.btn--grow { flex: 1 1 auto; }
.icon-btn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--text); text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--surface); }
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn--accent { background: var(--red); color: #fff; }
.icon-btn--accent:hover { background: #e01010; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.actions form.inline { display: contents; }
.actions .inline .btn--grow { flex: 1 1 auto; }

/* ── chips, badges ── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.chip--red { background: var(--red-soft); color: var(--red-text); }
.chip--amber { background: var(--amber-soft); color: var(--amber-text); }
.chip--green { background: var(--green-soft); color: var(--green-text); }
.chip--blue { background: var(--blue-soft); color: var(--blue-text); }
.chip--tbc { background: var(--tbc); color: var(--tbc-ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 8px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--blue-soft); color: var(--blue-text); }
.badge .ic { width: 15px; height: 15px; }

/* ── lists and rows ── */
.list { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 11px 14px; position: relative; text-decoration: none; color: var(--text); }
.list > .row + .row::before, .list > .item + .item::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--line); }
a.row:hover { background: var(--surface-2); }
a.row:active { background: var(--surface-3); }
.row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row__t { font-weight: 650; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.row__s { font-size: 14px; color: var(--text-3); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.row__r { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: none; max-width: 44%; }
.row__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.row .chev { color: var(--text-3); width: 18px; height: 18px; }
.ricon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.ricon .ic { width: 19px; height: 19px; }
.tone-red { background: var(--red-soft); color: var(--red-text); }
.tone-amber { background: var(--amber-soft); color: var(--amber-text); }
.tone-green { background: var(--green-soft); color: var(--green-text); }
.tone-blue { background: var(--blue-soft); color: var(--blue-text); }
.item { position: relative; display: flex; align-items: stretch; }
.item > .row { flex: 1; min-width: 0; }
.item__q { display: flex; align-items: center; padding-right: 10px; }
.qdone { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line-2); background: transparent; color: var(--text-3); display: grid; place-items: center; cursor: pointer; transition: transform .12s var(--ease), background .15s, color .15s, border-color .15s; }
.qdone:hover { border-color: var(--green); color: var(--green-text); }
.qdone:active { transform: scale(.9); background: var(--green-soft); }
.qdone .ic { width: 20px; height: 20px; stroke-width: 2.4; }
@media (max-width: 480px) { .row--task { flex-wrap: wrap; } .row--task .row__main { flex-basis: calc(100% - 80px); } .row--task .row__r { max-width: none; order: 3; margin-left: 48px; justify-content: flex-start; } }

.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 750; font-size: 14px; color: #fff; letter-spacing: .02em; }
.av--sm { width: 32px; height: 32px; font-size: 12px; }
.av--lg { width: 84px; height: 84px; font-size: 28px; }

.empty { text-align: center; padding: 36px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); margin: 8px 0; }
.empty__t { font-weight: 750; font-size: 18px; margin-bottom: 6px; }
.empty__s { color: var(--text-3); max-width: 42ch; margin: 0 auto 14px; }

/* ── today ── */
.cards { display: flex; flex-direction: column; gap: 12px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); animation: cardIn .5s var(--out) both; animation-delay: calc(var(--i, 0) * 55ms); }
.tcard--urgent { border-color: var(--red-line); background: linear-gradient(180deg, color-mix(in srgb, var(--red) 10%, var(--surface)), var(--surface) 65%); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tcard__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tcard__eyebrow { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard__time { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.tcard__title { font-size: 20px; line-height: 1.2; font-weight: 750; margin: 0 0 4px; overflow-wrap: anywhere; }
.tcard__meta { font-size: 15px; color: var(--text-2); margin: 0; }
.tcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 20%, var(--surface)), var(--surface) 70%); border: 1px solid var(--red-line); margin: 0 0 12px; text-decoration: none; color: var(--text); }
.banner--quiet { background: var(--surface); border-color: var(--line); }
a.banner:hover { border-color: var(--line-2); }
.banner__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.banner b { font-size: 16px; }
.banner small { color: var(--text-2); font-size: 14px; }
.banner .chev { color: var(--text-3); width: 18px; height: 18px; }
.hcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.hcard { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s var(--ease); }
.hcard:hover { border-color: var(--line-2); }
.hcard:active { transform: scale(.985); }
.hcard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hcard__name { font-size: 22px; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; }
.hcard__m { color: var(--text-2); font-size: 14.5px; }
.hcard__stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--text-3); }
.hcard__stats b { color: var(--text); }
.hcard .badge { align-self: flex-start; }
.hcards + p, .hcards + .disc { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat small { font-size: 13px; color: var(--text-3); line-height: 1.2; display: block; }
.stat--red b { color: var(--red-text); } .stat--green b { color: var(--green-text); } .stat--amber b { color: var(--amber-text); }

/* ── segmented, filters ── */
.seg { display: flex; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 3px; margin: 6px 0 10px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: 1 0 auto; min-height: 42px; padding: 0 14px; display: grid; place-items: center; border-radius: 11px; font-size: 14.5px; font-weight: 650; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.seg a[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.fchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 4px; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14.5px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.fchip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.fchip__n { font-family: var(--mono); font-size: 11px; opacity: .75; }

/* ── forms ── */
.form { display: flex; flex-direction: column; }
.label { display: block; font-weight: 700; font-size: 15px; margin: 16px 0 6px; }
.form > .label:first-of-type, .form > input[type="hidden"] + .label { margin-top: 4px; }
.opt { font-weight: 500; color: var(--text-3); }
.input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--bg-2); color: var(--text); font-size: 16px; }
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(255, 176, 0, .25); }
.input[readonly] { color: var(--text-3); }
.input:disabled { opacity: .7; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.4; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f5f4f1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input[type="date"].input, input[type="datetime-local"].input { color-scheme: dark; }
.input--num { max-width: 110px; }
.input--date { width: auto; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.input--plate { text-transform: uppercase; font-weight: 800; letter-spacing: .08em; max-width: 220px; }
.hint { font-size: 13.5px; color: var(--text-3); margin: 6px 0 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 10px; font-weight: 650; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--red); }
.formbar { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.inrow { display: flex; gap: 8px; align-items: flex-end; border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.inrow legend { padding: 0; }
.inrow .input:not(.input--num) { flex: 1; min-width: 140px; }
.inrow--2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .inrow--2 { grid-template-columns: 1fr 1fr; } }
.disc { margin: 18px 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.disc > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 16px; font-weight: 700; cursor: pointer; color: var(--text-2); }
.disc > summary::-webkit-details-marker { display: none; }
.disc > summary:hover { color: var(--text); }
.disc[open] > summary { color: var(--text); border-bottom: 1px solid var(--line); }
.disc > .form, .disc > form, .disc > p, .disc > .inline { display: block; padding: 4px 16px 16px; }
.disc > .form { display: flex; }
.disc--inline { margin: 0 0 0 48px; background: transparent; border: 0; }
.disc--inline > summary { min-height: 40px; padding: 0; font-size: 14px; color: var(--red-text); display: inline-flex; }
.disc--inline[open] > summary { border: 0; }
.disc--inline > .form { padding: 4px 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.prose { white-space: normal; overflow-wrap: anywhere; color: var(--text-2); }

/* notices */
.notice { border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line-2); background: var(--surface); }
.notice p { margin: 0; }
.notice--error { border-color: var(--red-line); background: var(--red-soft); }
.notice--ok { border-color: rgba(60, 207, 134, .35); background: var(--green-soft); }
.notice--info { border-color: rgba(110, 160, 255, .3); background: var(--blue-soft); }
.notice--tbc { border-color: rgba(255, 216, 77, .4); background: rgba(255, 216, 77, .12); }
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabh) + 16px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto; padding: 12px 16px; min-height: 52px; border-radius: 16px; background: #f5f4f1; color: #141416; font-weight: 650; font-size: 15px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: toastIn .35s var(--out) both, toastOut .3s ease 4.5s forwards; }
.toast .ic { color: #0d7a46; stroke-width: 2.6; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); visibility: hidden; } }
@media (min-width: 960px) { .toast { bottom: 24px; left: calc(var(--side) + 24px); } }

/* ── task timeline ── */
.tl { list-style: none; margin: 0 0 16px; padding: 0 0 0 18px; border-left: 2px solid var(--line-2); }
.tl__i { position: relative; padding: 0 0 16px 14px; }
.tl__i::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); box-shadow: 0 0 0 3px var(--bg); }
.tl__i--comment::before { background: var(--blue-text); } .tl__i--escalate::before { background: var(--red); } .tl__i--status::before { background: var(--green); } .tl__i--assign::before { background: var(--amber); }
.tl__who { font-weight: 700; margin-right: 8px; }
.tl__at { font-size: 13px; color: var(--text-3); }
.tl__i p { margin: 3px 0 0; color: var(--text-2); overflow-wrap: anywhere; }

/* ── homes: schedule ── */
.scheds { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.disc--sched .scheds { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: transparent; }
.disc--sched > summary .sec__r { margin-left: auto; }
.sched { padding: 10px 14px 4px; position: relative; }
.sched + .sched { border-top: 1px solid var(--line); }
.sched--off { opacity: .6; }
.sched__row { display: flex; align-items: center; gap: 12px; }

/* ── people ── */
.phead { text-align: center; padding: 8px 0 6px; display: flex; flex-direction: column; align-items: center; }
.phead__n { margin: 14px 0 4px; }
.phead__s { color: var(--text-2); font-size: 17px; margin: 0 0 10px; }
.phead .chips { justify-content: center; }
.access__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.access .actions { margin-top: 10px; }
.prog { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 0 0 12px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #ff4a3d); transform-origin: left; }
.prog--ok i { background: var(--green); }
.obs { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ob { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.ob + .ob { border-top: 1px solid var(--line); }
.ob__box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.ob--done .ob__box { background: var(--green); border-color: var(--green); color: #06210f; }
.ob__box .ic { width: 18px; height: 18px; stroke-width: 3; }
.ob__main { flex: 1; min-width: 150px; display: flex; flex-direction: column; }
.ob__t { font-weight: 650; }
.ob--done .ob__t { color: var(--text-2); }
.ob__s { font-size: 13.5px; color: var(--text-3); }
.ob__f { display: contents; }
.ob__box--btn { width: 44px; height: 44px; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; margin: -8px 0; transition: transform .12s var(--ease), border-color .15s, background .15s; }
.ob__box--btn:hover { border-color: var(--green); }
.ob__box--btn:active { transform: scale(.9); }
.ob--done .ob__box--btn { background: var(--green); border-color: var(--green); color: #06210f; }

/* ── fleet ── */
.plate { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 6px; background: #f4f3ef; color: #111; font-weight: 800; font-size: 14px; letter-spacing: .08em; font-stretch: 95%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .25); white-space: nowrap; vertical-align: 1px; }
.plate--big { min-height: 38px; font-size: 19px; padding: 0 12px; border-radius: 8px; }
.plate--hero { min-height: 52px; font-size: 30px; padding: 0 18px; border-radius: 10px; margin: 6px 0 0; background: #ffd84d; }
.vcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.vcard__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vcard__t { font-size: 19px; font-weight: 750; margin: 12px 0 8px; }
.vcard__w { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; margin: 4px 0 0; }
.vcard__w::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.vcard__w--expired, .vcard__w--soon { color: var(--red-text); } .vcard__w--watch { color: var(--amber-text); } .vcard__w--ok { color: var(--green-text); }
.book { scroll-margin-top: 80px; margin-top: 24px; }
.book .h3 { margin-bottom: 6px; }

/* ── sign-in ── */
.auth { padding-top: 6vh; }
.auth__logo { display: block; height: 56px; width: auto; margin: 0 0 24px; }
.auth .hello { margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.form .cf-turnstile { margin-top: 14px; min-height: 65px; }

/* ── photos ── */
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: var(--surface-2); }
.av--xs { width: 22px; height: 22px; font-size: 9px; }
.av--xl { width: 112px; height: 112px; font-size: 36px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line-2); }
.who { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.who .av { margin: -2px 0; }
.viewas .av { flex: none; box-shadow: 0 0 0 2px #1a1500; }
.phedit { margin: 4px 0 8px; text-align: center; }
.phedit > summary { list-style: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--red-text); font-weight: 650; font-size: 14.5px; cursor: pointer; }
.phedit > summary::-webkit-details-marker { display: none; }
.phedit__f { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0 4px; }
.phedit__pick { cursor: pointer; }
.phedit__pick:focus-within { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.phedit__err { color: var(--red-text); font-weight: 650; margin: 4px 0; }
.phedit__preview { display: block; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 8px auto; }

/* ── sign-in code ── */
.codebox { margin-top: 22px; }
.input--code { font-family: var(--mono); font-size: 26px; letter-spacing: .3em; text-align: center; max-width: 260px; }

/* ── notifications ── */
.push { padding: 18px; }
.pstate__t { font-weight: 750; font-size: 18px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.pstate__t--ok { color: var(--green-text); }
.pstate .btn--block { margin-top: 8px; }
.steps { list-style: none; counter-reset: step; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.steps li[hidden] { display: none; }
.steps li::before { content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.steps .ic { width: 18px; height: 18px; vertical-align: -3px; color: var(--blue-text); }
.prefs { display: block; }
.pref { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 14px; cursor: pointer; position: relative; }
.pref + .pref::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--line); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s var(--out); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.switch:disabled { opacity: .5; }
.prefs__bar { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.this-device { margin-left: 8px; vertical-align: 2px; }
.pushcard { margin-top: 14px; }
.banner__link { text-decoration: none; color: inherit; }
.banner__link::after { content: ""; position: absolute; inset: 0; }
.pushcard { position: relative; }
.pushcard .btn { position: relative; z-index: 1; }

/* "What changed for YPR" film on the owner's Today (worker/staff/welcome.js) */
.welcome { padding: 18px; margin: 18px 0 6px; background: linear-gradient(135deg, #1f0f10, var(--surface) 60%); border-color: rgba(213, 10, 10, .35); }
.welcome__eyebrow { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ff5c55; margin: 0 0 6px; }
.welcome__title { font-size: 22px; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; margin: 0 0 14px; }
.welcome__video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
.homefilm { padding: 18px; margin: 18px 0 6px; }
.homefilm__none { margin: 14px 2px 0; }
iframe.welcome__video { border: 0; }

/* "Only you can answer these" on the owner's Today (11.11.2026) */
.answers { margin: 18px 0 8px; }
.answers__h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.05rem; }
.answers__n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #d50a0a; color: #fff; font-size: .8rem; }
.answers__s { margin: 0 0 10px; font-size: .9rem; opacity: .7; }

/* "YPR at a glance" (owner's Today) */
.glance { margin: 14px 0 6px; }
.glance__h { margin: 0 0 2px; font-size: 1.05rem; }
.stats--glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .stats--glance { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat--link { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.stat--link, .stat--link * { text-decoration: none; }
.stat--link:hover { border-color: var(--red, #d50a0a); }
.stat--link:active { transform: scale(.98); }
.stat__sub { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; color: var(--text-3); }

/* Team page (25.11.2026) */
.tthumb { width: 40px; height: 50px; border-radius: 6px; object-fit: cover; flex: none; background: #1d1d1d; display: inline-flex; align-items: center; justify-content: center; color: #888; }
.tthumb .ic { width: 20px; height: 20px; }
.trow { display: block; }
.trow + .trow { border-top: 1px solid rgba(255,255,255,.06); }
.tacts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px 64px; }
.tacts form.inline { display: inline; }
.tphoto { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.tphoto img { width: 120px; height: 150px; object-fit: cover; border-radius: 8px; }

/* ── profiles (people/<id>/: Profile, Personal details, Checks; Homes and teams) ── */
.pf { margin: 0 0 12px; padding: 2px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pf__r { display: grid; grid-template-columns: minmax(120px, 32%) 1fr; gap: 12px; padding: 11px 0; }
.pf__r + .pf__r { border-top: 1px solid var(--line); }
.pf dt { color: var(--text-2); font-size: 14px; padding-top: 1px; }
.pf dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.45; }
.pf dd.pf__none { color: var(--text-3); }
@media (max-width: 560px) { .pf__r { grid-template-columns: 1fr; gap: 3px; } }
.pf__shown { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.pf__shown .ic { width: 16px; height: 16px; flex: none; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow__t { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.prow__t small { color: var(--text-2); font-size: 13.5px; line-height: 1.4; }
.prow form.inline { display: inline; }
.card--flat { box-shadow: none; padding: 4px 16px; }
.fs { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; display: flex; flex-direction: column; }
.fs + .fs { margin-top: 22px; }
.fs > legend { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 0; margin: 0 0 2px; }
.banner--ask { background: linear-gradient(135deg, var(--blue-soft), var(--surface) 70%); border-color: var(--line-2); }
.urows { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.urow { padding: 10px 14px; }
.urow + .urow { border-top: 1px solid var(--line); }
.urow__head { display: flex; align-items: center; gap: 12px; }
.urow__main { display: flex; flex-direction: column; }
.urow__main small { color: var(--text-3); font-size: 13.5px; }
.urow .disc--inline { margin: 4px 0 0 48px; }
.urow .disc--inline > summary { color: var(--text-2); }

/* ── calendar ── */
.weeknav { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; flex-wrap: wrap; }
.weeknav b { font-size: 15px; min-width: 0; }
.weeknav .btn--small { min-width: 44px; justify-content: center; }
.cal { display: flex; flex-direction: column; gap: 6px; }
.cal__day { margin: 0; }
.cal__d { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin: 14px 0 8px; color: var(--text); }
.cal__d > span:not(.chip) { color: var(--text-3); font-weight: 600; }
.cal__d--today { color: var(--blue-text); }
.cal__none { color: var(--text-3); font-size: 14px; margin: 0 0 4px; padding-left: 2px; }
.row--past { opacity: .55; }
.slots { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.slot { display: flex; align-items: center; gap: 10px 14px; padding: 10px 14px; flex-wrap: wrap; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot__t { font-weight: 750; font-variant-numeric: tabular-nums; min-width: 104px; }
.slot__a { display: flex; gap: 8px; flex-wrap: wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two > span { display: flex; flex-direction: column; min-width: 0; }
.picks { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-top: 6px; max-height: 340px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.pick + .pick { border-top: 1px solid var(--line); }
.pick input { width: 22px; height: 22px; accent-color: var(--red); flex: none; }
.reply { display: flex; flex-direction: column; gap: 6px; }
.reply p { margin: 0; }
.kv-text { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; margin: 12px 0; }
.picker { margin-top: 22px; }

/* Calendar on your phone: the three add buttons, and the link with its Copy button */
.sync { display: grid; gap: 10px; margin: 16px 0 20px; }
.sync .btn { justify-content: center; }
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow .input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.copyrow .btn { flex: 0 0 auto; }

/* Feedback box: the messages, their status and the owner's note */
.fbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fb { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.fb__head { display: flex; align-items: center; gap: 10px; }
.fb__kind { font-weight: 700; flex: 1 1 auto; min-width: 0; }
.fb__body { margin: 8px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb__note { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--blue-soft); }
.fb__manage { margin: 10px 0 0; }
.fbline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.fbline .ic { width: 16px; height: 16px; flex: 0 0 auto; }
