/* Layout: navy ledger sidebar + light work surface; marigold marks the one thing to do now (check in). */
:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --ink: #16233a;
  --ink-2: #4a5568;
  --muted: #6b7486;
  --line: #dde1ea;
  --navy: #16233a;
  --navy-2: #22324f;
  --on-navy: #e6eaf2;
  --on-navy-dim: #9aa6bd;
  --accent: #e39a2d;
  --accent-ink: #3b2508;
  --accent-soft: #fbefd9;
  --ok: #1f8a5b; --ok-soft: #dcf2e7;
  --warn: #b26b00; --warn-soft: #fdf0d8;
  --bad: #c2412d; --bad-soft: #fbe3de;
  --info: #2f5fb3; --info-soft: #e1eafa;
  --violet: #6a4bb5; --violet-soft: #ece6f8;
  --radius: 10px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522; --surface: #172033; --surface-2: #1d2840; --ink: #e8ecf4; --ink-2: #c0c8d8; --muted: #8d98ad; --line: #2a3651;
    --navy: #0b111c; --navy-2: #18233a; --on-navy: #e6eaf2; --on-navy-dim: #8592ab;
    --accent: #f0ac47; --accent-ink: #2a1803; --accent-soft: #3a2b14;
    --ok: #45c48a; --ok-soft: #173a2b; --warn: #f0b04a; --warn-soft: #3a2c12; --bad: #f07a65; --bad-soft: #43201b;
    --info: #7ea6ef; --info-soft: #1c2d4d; --violet: #ad94ee; --violet-soft: #2b2347;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
h4 { font-size: .9rem; margin: 1rem 0 .4rem; }
p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.late-txt { color: var(--bad); font-weight: 600; }
.danger-txt { color: var(--bad) !important; }
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shell ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy); color: var(--on-navy);
  display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  z-index: 40;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand strong { display: block; font-size: 1rem; }
.brand small { color: var(--on-navy-dim); font-size: .78rem; }
.auth-card .brand small { color: var(--muted); }
.mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 800; letter-spacing: -.03em; }
.mark.sm { width: 30px; height: 30px; font-size: .8rem; border-radius: 7px; }
img.mark { background: #000; object-fit: cover; display: inline-block; }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--on-navy-dim); font-weight: 600; font-size: .92rem; }
.side nav a:hover { background: var(--navy-2); color: var(--on-navy); text-decoration: none; }
.side nav a.on { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.who { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--navy-2); padding-top: 12px; margin-top: 8px; }
.who-name { flex: 1; min-width: 0; color: var(--on-navy); padding: 4px 8px; }
.who-name:hover { text-decoration: none; }
.who-name strong, .who-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-name small { color: var(--on-navy-dim); font-size: .76rem; }
.who .linkbtn { color: var(--on-navy-dim); padding: 8px; }

.topbar { display: none; }
.main { margin-left: 248px; padding-block: 28px 48px; padding-left: max(16px, 3vw); padding-right: max(16px, 3vw); max-width: 1320px; display: flex; flex-direction: column; gap: 18px; }
.tabbar, .scrim { display: none; }

@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .45); z-index: 30; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--navy); color: var(--on-navy);
    padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
  }
  .topbar-title { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
  .main { margin-left: 0; padding-block: 18px 96px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 600; color: var(--muted); padding: 4px; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on .ic { color: var(--accent); }
  h1 { font-size: 1.35rem; }
}

/* ---------- bare (login/install) ---------- */
body.bare { min-height: 100vh; background: var(--navy); }
.bare-main { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.auth-card.wide { max-width: 640px; }
.auth-card .brand { padding: 0 0 6px; }

/* ---------- page parts ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.cols > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 1000px) { .cols, .cols.wide-left { grid-template-columns: 1fr; } }

.flash { padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-err { background: var(--bad-soft); color: var(--bad); }
.empty { text-align: center; align-items: center; padding: 36px 18px; gap: 10px; }
.warn { color: var(--warn); font-weight: 600; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stats.mini { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.stats.mini .stat { background: var(--surface-2); border-color: transparent; padding: 8px 12px; }
a.stat:hover { text-decoration: none; border-color: var(--ink-2); }
.stat small { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat b { font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.stats.mini .stat b { font-size: 1.2rem; }
.stat b span { font-size: .9rem; color: var(--muted); }
.stat.alert { border-color: var(--bad); }
.stat.alert b { color: var(--bad); }
.stat.warnbg b { color: var(--warn); }

/* punch card */
.punch { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: var(--navy); color: var(--on-navy); border-radius: 14px; padding: 22px 24px; }
.punch .eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--on-navy-dim); font-weight: 700; }
.punch-times { display: flex; gap: 28px; flex-wrap: wrap; margin: 10px 0; }
.punch-times small { display: block; color: var(--on-navy-dim); font-size: .76rem; }
.punch-times b { font-size: 1.3rem; }
.punch-note { color: var(--on-navy-dim); font-size: .85rem; max-width: 52ch; }
.punch-note b { color: var(--on-navy); }
.punch-act { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 170px; }
.punch-btn { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); font: 800 1.05rem var(--font); display: grid; place-items: center; box-shadow: 0 10px 30px rgb(227 154 45 / .35); transition: transform .12s; }
.punch[data-state="out"] .punch-btn { background: #f4f6fa; color: var(--navy); box-shadow: 0 10px 30px rgb(0 0 0 / .3); }
.punch-btn:active { transform: scale(.96); }
.punch-btn .ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid currentColor; opacity: .25; }
.punch-btn.busy .ring { border-top-color: transparent; opacity: .8; animation: spin 1s linear infinite; }
.punch-btn[disabled] { cursor: wait; }
@keyframes spin { to { transform: rotate(360deg); } }
.punch-status { font-size: .85rem; text-align: center; max-width: 28ch; min-height: 1.2em; }
.punch-status.err { color: #ffb4a6; }
.punch-status.ok { color: #9fe3bf; }
.card .punch-status { text-align: left; max-width: none; }
.card .punch-status.err { color: var(--bad); }
.card .punch-status.ok { color: var(--ok); }
.punch-done { background: var(--navy-2); padding: 12px 16px; border-radius: 10px; font-weight: 600; text-align: center; }
.punch .warn { color: var(--accent); }
.punch .warn a { color: #fff; text-decoration: underline; }
.punch .pill { margin-left: 6px; vertical-align: middle; }
@media (max-width: 640px) {
  .punch { grid-template-columns: 1fr; padding: 18px; }
  .punch-times { gap: 18px; }
  .punch-act { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .punch-btn.busy .ring { animation: none; } * { transition: none !important; } }

/* pills */
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill-present, .pill-approved, .pill-active, .pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-late, .pill-pending, .pill-on_hold, .pill-review { background: var(--warn-soft); color: var(--warn); }
.pill-absent, .pill-rejected { background: var(--bad-soft); color: var(--bad); }
.pill-leave, .pill-in_progress, .pill-lead, .pill-head, .pill-manager { background: var(--info-soft); color: var(--info); }
.pill-holiday, .pill-admin { background: var(--violet-soft); color: var(--violet); }
.pill-off, .pill-cancelled, .pill-closed, .pill-todo, .pill-employee { background: var(--surface-2); color: var(--muted); }

.prio { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: var(--line); }
.prio-urgent { background: var(--bad); } .prio-high { background: var(--accent); } .prio-medium { background: var(--info); } .prio-low { background: var(--line); }
.prio-tag { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.prio-tag.prio-urgent { background: var(--bad-soft); color: var(--bad); }
.prio-tag.prio-high { background: var(--accent-soft); color: var(--warn); }
.prio-tag.prio-medium { background: var(--info-soft); color: var(--info); }

/* task list */
.tlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tlist li + li { border-top: 1px solid var(--line); }
.tlist a { display: flex; gap: 12px; padding: 10px 2px; color: var(--ink); align-items: center; }
.tlist a:hover { text-decoration: none; background: var(--surface-2); }
.tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-main b { font-weight: 600; overflow-wrap: anywhere; }
.tl-main small, .tl-side small { color: var(--muted); font-size: .8rem; }
.tl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tlist li.is-done b { text-decoration: line-through; color: var(--muted); }

/* board */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.lane { background: var(--surface-2); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.lane header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding: 2px 4px 4px; }
.lane-in_progress header { color: var(--info); } .lane-review header { color: var(--warn); } .lane-done header { color: var(--ok); }
.lane-empty { color: var(--muted); font-size: .85rem; padding: 8px 4px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.tcard:hover { text-decoration: none; border-color: var(--ink-2); }
.tcard b { font-weight: 600; overflow-wrap: anywhere; }
.tcard-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.tcard-who { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--ink-2); margin-top: 4px; }
.lane-done .tcard b { color: var(--muted); }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; overflow: visible; } .lane { min-height: 0; } }

.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: var(--accent); font-weight: 800; flex: none; }
.avatar.xs { width: 22px; height: 22px; border-radius: 6px; font-size: .7rem; }

/* clients */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.client { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.client:hover { text-decoration: none; border-color: var(--ink-2); }
.client-top { display: flex; gap: 12px; align-items: flex-start; }
.client-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.client-name small { color: var(--muted); font-size: .82rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .74rem; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2); }
.client-foot { display: flex; gap: 14px; font-size: .85rem; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 10px; }

/* key-value */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl.compact td { padding: 7px 8px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form h3 { margin-top: 4px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; font-weight: 600; color: var(--ink-2); min-width: 0; }
input, select, textarea {
  font: 400 .95rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
@media (max-width: 640px) { .grid2, .grid4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } }
.chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.chk input { width: auto; }
.checks { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.checks legend { font-size: .84rem; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { width: auto; }
.inline-edit { display: flex; gap: 6px; align-items: center; }
.inline-edit input { padding: 5px 8px; border-color: transparent; background: transparent; font-weight: 600; }
.inline-edit input:hover, .inline-edit input:focus { border-color: var(--line); background: var(--surface); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 .9rem var(--font); padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--ink-2); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: .82rem; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: 600 .88rem var(--font); color: var(--info); cursor: pointer; }
.danger-zone { margin-top: 4px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 9px 14px; font-weight: 700; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* status segmented control */
.status-bar { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; }
.seg { border: 0; background: transparent; padding: 9px 6px; border-radius: 7px; font: 700 .85rem var(--font); color: var(--muted); cursor: pointer; }
.seg:hover { color: var(--ink); }
.seg.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
@media (max-width: 480px) { .status-bar { grid-template-columns: 1fr 1fr; } }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feed li { display: flex; gap: 10px; }
.feed li > div { flex: 1; min-width: 0; }
.feed li.sys p { color: var(--muted); font-size: .85rem; font-style: italic; }
.feed-meta { margin-bottom: 2px; }

/* lists */
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hol li { display: flex; gap: 12px; align-items: center; }
.hol li > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-weight: 600; }
.hol li small { font-weight: 400; font-size: .8rem; }
.hol.big li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hol li.past { opacity: .55; }
.date-chip { width: 48px; flex: none; text-align: center; border-radius: 8px; background: var(--accent-soft); color: var(--warn); padding: 4px 0; line-height: 1.1; }
.date-chip b { display: block; font: 600 1.2rem var(--mono); }
.date-chip small { font-size: .7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }

/* leave requests */
.req-list { display: flex; flex-direction: column; }
.req { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.req-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.req-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.req-act input { width: 180px; padding: 6px 9px; }

details.fold summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary h3::before { content: "+ "; color: var(--accent); }
details.fold[open] summary h3::before { content: "– "; }

/* install-as-app banner */
.install-bar { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; }
.install-bar[hidden] { display: none; }
.install-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.install-txt small { color: var(--ink-2); font-size: .82rem; }
.install-bar .linkbtn { font-size: 1.3rem; color: var(--muted); padding: 0 4px; }

/* installed app: keep bottom tabs clear of the home indicator */
@media (display-mode: standalone) { .topbar { padding-top: calc(10px + env(safe-area-inset-top)); } }
