/* My Witside — brand tokens copied from the presales app (templates/index.html). */
:root {
  --navy: #2e0d33; --navy-dark: #1c0922; --blue: #c8174e; --blue-hover: #a3103f;
  --accent: #ff5c8d; --tint: #fdf0f4; --tint-strong: #fbe3eb; --tint-border: #f6d3df;
  --bg: #f6f4f7; --surface: #ffffff; --raised: #fbfafc;
  --border: #e9e3ec; --border-strong: #d9d0de; --line: #f0ebf2;
  --text: #1f1424; --text-2: #3d3342; --muted: #6d6274; --light: #a79daf;
  --ok: #0a7a54; --ok-bg: #e3f5ee; --warn: #9a4b00; --warn-bg: #fdefd8;
  --info: #6d28d9; --info-bg: #f1ebfd; --na: #6d6274; --na-bg: #f0edf2;
  --bad: #b4232f; --bad-bg: #fde8ea;
  --c-client: #c8174e; --c-internal: #efa3bd; --c-pending: #e9b35f; --c-holiday: #d9d0de;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31,20,36,0.04), 0 2px 12px rgba(31,20,36,0.05);
  --shadow-md: 0 6px 20px rgba(46,13,51,0.10);
  --ring: 0 0 0 4px rgba(200,23,78,0.14);
  --band: radial-gradient(900px 380px at 0% 0%, #5a1a4a 0%, transparent 60%),
          linear-gradient(120deg, #2a0b26 0%, #1c0922 60%, #231040 100%);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Montserrat, system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg);
  color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; font-weight: 600; }
a:hover { color: var(--blue-hover); }
button, input, select, textarea { font-family: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ── band ─────────────────────────────────────────────────────────── */
.band { background: var(--band); color: #fff; padding: env(safe-area-inset-top) 0 72px; }
.band-inner { max-width: 1328px; margin: 0 auto; padding: 0 32px; }
.top { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: #fff; }
.brand img { height: 26px; display: block; }
.brand .div { width: 1px; height: 22px; background: rgba(255,255,255,0.14); }
.brand .title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.78); }
.topnav { display: flex; gap: 26px; font-size: 13px; }
.topnav a { color: rgba(255,255,255,0.72); padding: 6px 0; border-bottom: 2px solid transparent; }
.topnav a.on, .topnav a:hover { color: #fff; border-bottom-color: var(--accent); }
.who { display: flex; align-items: center; gap: 14px; font-size: 12px; color: rgba(255,255,255,0.62); }
.who strong { color: #fff; font-weight: 600; }
.who a { color: var(--accent); }
.chip-dark { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 7px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); color: rgba(255,255,255,0.7); white-space: nowrap; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 26px; flex-wrap: wrap; }
.hero-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.avatar-lg { width: 68px; height: 68px; flex-shrink: 0; border-radius: 34px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; box-shadow: 0 0 0 4px rgba(255,92,141,0.25); }
.hello { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.meta { font-size: 13px; color: rgba(255,255,255,0.68); margin-top: 4px; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { display: flex; align-items: center; gap: 12px; min-width: 220px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: #fff; text-align: left; cursor: pointer; font-size: 13.5px; }
.choice:hover { background: rgba(255,255,255,0.12); color: #fff; }
.choice.primary { background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 20px rgba(200,23,78,0.35); }
.choice.primary:hover { background: var(--blue-hover); }
.choice .ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.13); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.choice b { display: block; font-weight: 700; }
.choice small { display: block; font-size: 11.5px; color: rgba(255,255,255,0.72); font-weight: 500; }

/* ── layout ───────────────────────────────────────────────────────── */
main { max-width: 1328px; margin: -48px auto 0; padding: 0 32px 40px; display: flex; flex-direction: column; gap: 24px; }
.row { display: grid; gap: 24px; }
.row.fix-req { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
.row.two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card.lift { box-shadow: var(--shadow-md); }
.card-h { min-height: 64px; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h h2 { margin: 0; font-size: 16.5px; font-weight: 800; color: var(--navy); }
.card-h .sub { font-size: 12px; color: var(--muted); }
.card-b { padding: 18px 22px; }
.card-f { margin-top: auto; padding: 12px 22px; font-size: 12.5px; border-top: 1px solid var(--line); background: var(--raised); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tile { padding: 20px 22px; gap: 16px; }
.tile-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tile-h h3 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--navy); }
.src { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tile-f { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; }

/* ── pills ────────────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.pill.plain::before { display: none; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
.pill.na { color: var(--na); background: var(--na-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.up { text-transform: uppercase; letter-spacing: 0.04em; }

/* ── things to fix ────────────────────────────────────────────────── */
.fix { display: grid; grid-template-columns: 118px minmax(0, 1fr) 120px auto; gap: 18px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.fix:last-child { border-bottom: 0; }
.fix b { display: block; font-size: 14.5px; }
.fix p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.btn-soft { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--tint-border); background: var(--tint); color: var(--blue); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.allclear { display: flex; gap: 16px; align-items: center; padding: 22px; }
.allclear .ic { width: 42px; height: 42px; border-radius: 21px; background: var(--ok-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── requests ─────────────────────────────────────────────────────── */
.req { width: 100%; display: flex; align-items: center; gap: 14px; padding: 13px 20px 13px 22px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 14px; font-weight: 400; }
.req:hover { background: var(--raised); color: var(--text); }
.req .ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.req.hr .ic { background: var(--blue); }
.req span.t { flex-grow: 1; min-width: 0; }
.req b { display: block; font-weight: 700; }
.req small { display: block; font-size: 12px; color: var(--muted); }
.req em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--blue); white-space: nowrap; }

/* ── utilisation ──────────────────────────────────────────────────── */
.util { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; padding: 22px; }
.period { display: flex; flex-direction: column; gap: 16px; padding-right: 32px; border-right: 1px solid var(--line); min-width: 0; }
.period h4 { margin: 0; font-size: 15px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kpi b { display: block; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--navy); }
.kpi.chg b { color: var(--blue); }
.kpi span { font-size: 12px; color: var(--muted); }
.meter { position: relative; height: 12px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.meter .target { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--navy); }
.meter-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.hours { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 7px; font-size: 13px; }
.hours span:nth-child(even) { font-family: var(--mono); }
.hours .tot { font-weight: 700; padding-top: 7px; border-top: 1px solid var(--line); }
.trend { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bars { position: relative; height: 190px; margin-top: 22px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--border-strong); }
.bars .col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; }
.bars .col i { display: block; width: 44%; border-radius: 3px 3px 0 0; }
.bars .col .u { background: var(--c-internal); }
.bars .col .c { background: var(--blue); }
.bars .col .v { position: absolute; top: -18px; font-family: var(--mono); font-size: 10.5px; color: var(--text-2); }
.bars .tline { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--navy); }
.months { display: flex; gap: 10px; }
.months span { flex: 1 1 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ── day strips ───────────────────────────────────────────────────── */
.wk { display: flex; flex-direction: column; gap: 6px; }
.wk-l { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.day { height: 50px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 10.5px; font-weight: 600; }
.day .n { font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.day.ok { background: var(--ok-bg); color: var(--ok); }
.day.missing { background: var(--warn-bg); color: var(--warn); border: 1px solid #efc98f; }
.day.today { background: #fff; color: var(--text); border: 1.5px dashed var(--light); }
.day.future { background: var(--bg); color: var(--muted); }
.day.leave, .day.holiday { background: var(--na-bg); color: var(--muted); }
.two-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.two-kpi span { display: block; font-size: 12px; color: var(--muted); }
.two-kpi b { font-size: 20px; font-weight: 800; }
.rgw { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: start; }
.rgw .l { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-top: 5px; }
.segs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.seg { height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10.5px; }
.seg.client { background: var(--c-client); color: #fff; }
.seg.internal { background: var(--c-internal); color: #4a0d24; }
.seg.pending { background: var(--c-pending); color: #3d2600; }
.seg.holiday, .seg.leave { background: var(--c-holiday); color: var(--text-2); }
.seg.unbooked { background: #fff; color: var(--muted); border: 1.5px dashed var(--light); }
.seg.past { opacity: 0.45; }
.cap { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }

/* ── lists ────────────────────────────────────────────────────────── */
.li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li .t { min-width: 0; }
.li b { display: block; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.li small { display: block; font-size: 11.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); }
.big { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--navy); }
.stack { display: flex; height: 12px; border-radius: 5px; overflow: hidden; background: var(--tint); border: 1px solid var(--tint-border); }
.box { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 10px; font-size: 12.5px; }
.box.ok { background: var(--ok-bg); } .box.warn { background: var(--warn-bg); } .box.na { background: var(--na-bg); }
.case { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); }
.case .top2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stpill { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; color: #fff; background: #6b7280; }
.stpill.submitted { background: #2563eb; } .stpill.assigned { background: #7c3aed; } .stpill.review { background: #d97706; }
.stpill.declined { background: #dc2626; } .stpill.completed { background: #059669; }
.na-card { background: var(--raised); }

/* ── org tree ─────────────────────────────────────────────────────── */
.org { display: flex; flex-direction: column; align-items: center; padding: 22px; gap: 0; }
.org .lvl { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; max-width: 100%; }
.org .lvl-l { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; text-align: center; }
.org .vline { width: 2px; height: 18px; background: var(--border-strong); }
.org .vline.me { background: var(--blue); }
.node { width: 236px; min-height: 58px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; gap: 10px; }
.node .av { width: 36px; height: 36px; flex-shrink: 0; border-radius: 18px; background: #ece6ef; color: var(--text-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.node .t { min-width: 0; flex-grow: 1; }
.node b { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; }
.node small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node .off { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: var(--warn); background: var(--warn-bg); white-space: nowrap; }
.node.skip { border-style: dashed; background: var(--raised); min-height: 48px; }
.node.mgr .av { background: var(--navy); color: #fff; }
.node.me { border: 1.5px solid var(--blue); background: var(--tint); box-shadow: 0 0 0 4px rgba(200,23,78,0.08); }
.node.me .av { background: var(--blue); color: #fff; }
.node.rep .av { background: var(--tint-strong); color: var(--blue-hover); }
.group { border: 1px solid var(--line); background: var(--raised); border-radius: 14px; padding: 12px; }
.more { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

/* ── access ───────────────────────────────────────────────────────── */
.acc { display: flex; align-items: center; gap: 12px; padding: 0 22px; min-height: 44px; border-bottom: 1px solid #f5f1f6; }
.acc .ab { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; }
.acc .t { flex-grow: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.acc b { font-size: 13px; white-space: nowrap; }
.acc small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── docs & shortcuts ─────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; padding: 8px 22px 14px; }
.doc { display: flex; align-items: center; gap: 12px; min-height: 46px; border-bottom: 1px solid #f5f1f6; color: var(--text); }
.doc:hover { color: var(--blue); }
.doc .t { min-width: 0; }
.doc b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shorts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 22px; }
.short { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 13px; font-weight: 700; }
.short:hover { border-color: var(--border-strong); color: var(--blue); }
.short .ab { width: 26px; height: 26px; border-radius: 7px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px; background: var(--blue); color: #fff; border: 0; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--blue-hover); color: #fff; }
.btn.block { width: 100%; height: 50px; font-size: 15px; box-shadow: 0 6px 20px rgba(200,23,78,0.30); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ── footer ───────────────────────────────────────────────────────── */
.foot { max-width: 1328px; margin: 16px auto 48px; padding: 0 32px; }
.foot-in { border-radius: var(--radius); background: var(--navy); color: #fff; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-in p { margin: 4px 0 0; font-size: 12.5px; color: rgba(255,255,255,0.72); max-width: 760px; }
.fresh { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fresh span { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 7px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.banner { padding: 14px 18px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: 13px; border: 1px solid #efc98f; }

/* ── dialog / sheet ───────────────────────────────────────────────── */
dialog.sheet { border: 0; padding: 0; width: min(560px, 100vw); max-width: 100vw; border-radius: 22px; box-shadow: 0 18px 48px rgba(46,13,51,0.25); color: var(--text); }
dialog.sheet::backdrop { background: rgba(28,9,34,0.55); }
.sheet-in { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-h h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--navy); }
.sheet-h p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.x { width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: 0; background: var(--bg); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.fld input, .fld select, .fld textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 16px; color: var(--text); background: #fff; outline: none; }
.fld textarea { min-height: 130px; resize: vertical; line-height: 1.45; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--blue); box-shadow: var(--ring); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13.5px; color: var(--text-2); }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.err { color: #dc2626; font-size: 12.5px; min-height: 16px; }
.done { text-align: center; padding: 18px 0 6px; }
.done .ic { width: 56px; height: 56px; border-radius: 28px; background: var(--ok-bg); display: inline-flex; align-items: center; justify-content: center; }
.handle { display: none; }

/* ── tab bar (phones / installed app) ─────────────────────────────── */
.tabbar { display: none; }

/* ── login ────────────────────────────────────────────────────────── */
.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(1200px 600px at 10% -10%, #5a1a4a 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #3a1760 0%, transparent 55%), linear-gradient(135deg, #2a0b26 0%, #1c0922 100%); }
.gate { background: #fff; border-radius: 20px; box-shadow: 0 18px 48px rgba(46,13,51,0.18); max-width: 420px; width: 100%; padding: 36px 32px 30px; text-align: center; }
.gate img { height: 32px; margin-bottom: 22px; }
.gate h1 { font-size: 21px; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.gate p { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.gate .code { text-align: center; letter-spacing: 10px; font-size: 24px; font-family: var(--mono); }
.gate .hint { font-size: 12px; color: var(--muted); margin-top: 16px; }
.gate .hint button { background: none; border: 0; color: var(--blue); font-weight: 600; cursor: pointer; font-size: 12px; padding: 6px; }
.step { display: none; } .step.on { display: block; }

/* ── responsive ───────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .row.fix-req, .row.two { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .util { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .util .trend { grid-column: 1 / -1; }
  .period:nth-child(2) { border-right: 0; padding-right: 0; }
}
@media (max-width: 760px) {
  body { font-size: 14px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .band { padding-bottom: 56px; }
  .band-inner { padding: 0 18px; }
  .top { height: 56px; }
  .brand img { height: 19px; }
  .topnav, .who .chip-dark, .who .mail { display: none; }
  .hero { padding-top: 10px; }
  .avatar-lg { display: none; }
  .hello { font-size: 25px; }
  .meta { font-size: 12.5px; }
  .choices { display: none; }
  main { padding: 0 14px 24px; margin-top: -40px; gap: 14px; }
  .row, .tiles { gap: 14px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .util { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
  .period { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
  .kpi b { font-size: 34px; }
  .card-h { padding: 12px 16px; min-height: 52px; }
  .card-b, .tile { padding: 16px; }
  .fix { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 16px; }
  .fix .pill, .fix .src { display: none; }
  .fix .btn-soft { height: 36px; padding: 0 12px; font-size: 12px; }
  .fix b { font-size: 14px; }
  .req { padding: 12px 16px; }
  .org { padding: 16px; }
  .node { width: 100%; }
  .org .lvl { width: 100%; flex-direction: column; flex-wrap: nowrap; }
  .group { width: 100%; }
  .acc { padding: 0 16px; }
  .acc small { display: none; }
  .docs { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 10px; }
  .shorts { padding: 14px 16px; }
  .foot { padding: 0 14px; margin-bottom: 24px; }
  .foot-in { padding: 18px; }
  dialog.sheet { margin: auto 0 0; width: 100vw; border-radius: 24px 24px 0 0; max-height: 92vh; }
  .sheet-in { padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); }
  .handle { display: block; align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 6px 8px env(safe-area-inset-bottom); background: rgba(255,255,255,0.96); border-top: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); }
  .tabbar a, .tabbar button { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; background: none; border: 0; cursor: pointer; }
  .tabbar .on { color: var(--blue); }
}
@media (display-mode: standalone) { .who a.signout-desktop { display: none; } }
.stack i { display: block; height: 100%; }

/* ── language flags (v2) ──────────────────────────────────────────── */
.flags { display: inline-flex; gap: 6px; align-items: center; }
.flag { display: inline-flex; width: 30px; height: 21px; border-radius: 4px; overflow: hidden; opacity: 0.55; border: 1.5px solid transparent; transition: opacity 0.15s ease; }
.flag svg { display: block; width: 100%; height: 100%; }
.flag:hover { opacity: 0.9; }
.flag.on { opacity: 1; border-color: #ff5c8d; }
.gate { position: relative; }
.gate-flags { position: absolute; top: 14px; right: 14px; }
.gate-flags .flag.on { border-color: var(--blue); }

/* ── indirect reports (v2) ────────────────────────────────────────── */
.branch { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.branch:first-of-type { border-top: 0; }
.branch summary { cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 700; color: var(--navy); padding: 6px 2px 8px; display: flex; align-items: center; gap: 8px; }
.branch summary::-webkit-details-marker { display: none; }
.branch summary::before { content: '›'; display: inline-block; font-size: 16px; line-height: 1; color: var(--blue); transition: transform 0.15s ease; }
.branch[open] summary::before { transform: rotate(90deg); }
.node.ind { width: 200px; min-height: 48px; padding: 7px 10px; }
.node.ind .av { width: 30px; height: 30px; font-size: 11px; background: var(--bg); }
.group { width: 100%; }
@media (max-width: 760px) {
  .who .flags { margin-left: auto; }
  .who .signout { display: none; }
  .node.ind { width: 100%; }
}
