:root {
  --bg: #f5f3ee; --card: #ffffff; --ink: #141414; --ink2: #555049; --muted: #8a847b; --line: #e7e2d8;
  --gold: #b08a2e; --bad: #b3261e; --bad-bg: #fbeae8; --warn: #9a6700; --warn-bg: #fdf3d8; --ok: #2e7d4f; --ok-bg: #e6f3eb;
  --wa: #1f9d55; --radius: 16px; --shadow: 0 1px 2px rgba(20,20,20,.04), 0 4px 16px rgba(20,20,20,.04);
  --serif: 'Source Serif 4', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1 { font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: 16px; margin-bottom: 12px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
h4 { font-size: 14px; margin: 14px 0 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .bad { color: var(--bad); } .ok { color: var(--ok); } .warn { color: var(--warn); }
.pre { white-space: pre-wrap; margin: 0; }
.boot { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

/* layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); background: #fbfaf7; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-family: var(--serif); font-size: 18px; } .brand span span { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink2); font-weight: 500; }
.nav:hover { background: #f0ede6; }
.nav.on { background: var(--ink); color: #fff; }
.nav em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; background: var(--bad); color: #fff; border-radius: 99px; padding: 1px 8px; }
.side-foot { margin-top: auto; padding: 12px; word-break: break-all; }
.view { padding: 32px clamp(16px, 4vw, 48px) 80px; max-width: 1240px; width: 100%; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bottom { display: none; }

/* headings */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .fu-meta { margin-top: 8px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-actions, .row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.back { color: var(--muted); font-size: 14px; margin-bottom: -8px; } .back:hover { color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .1s, opacity .15s; }
.btn:hover { opacity: .88; } .btn:active { transform: scale(.98); } .btn:disabled { opacity: .5; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); background: #fff; }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.wa { background: var(--wa); border-color: var(--wa); }
.btn.block { width: 100%; padding: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.link:hover { text-decoration-color: var(--ink); }
.danger-text { color: var(--bad) !important; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--wa); cursor: pointer; flex: none; }
.icon-btn.ph { visibility: hidden; }
.tag { border: 1px dashed var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.tag:hover { border-color: var(--ink); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid2.wide-left { grid-template-columns: 1.7fr 1fr; }
.empty { padding: 18px 4px; color: var(--muted); }
.empty.good { color: var(--ok); }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 18px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.small-kpis { grid-template-columns: repeat(4, 1fr); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
a.kpi:hover { border-color: var(--ink); }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi b { font-family: var(--serif); font-size: 34px; line-height: 1; font-weight: 600; }
.kpi.bad b { color: var(--bad); } .kpi.warn b { color: var(--warn); } .kpi.ok b { color: var(--ok); }

/* chips & pills */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--c, #555); }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: var(--c, #aaa); }
.chip.muted { color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #f0ede6; }
.s-open { background: #eef1f6; color: #2f4a6e; } .s-progress { background: var(--warn-bg); color: var(--warn); }
.s-waiting { background: #f1ecf7; color: #5b3d86; } .s-done { background: var(--ok-bg); color: var(--ok); }
.pill.role { background: #f6efdc; color: #7a5d16; }
.prio { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 6px; vertical-align: 2px; }
.prio.high { background: var(--bad-bg); color: var(--bad); } .prio.low { background: #f0ede6; color: var(--muted); }
.due { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink2); }
.due.bad { color: var(--bad); } .due.warn { color: var(--warn); } .due.ok { color: var(--ok); } .due.muted { color: var(--muted); font-weight: 500; }

/* follow-up rows */
.fu-list { display: flex; flex-direction: column; }
.fu-row { display: grid; grid-template-columns: 30px 1fr auto 124px 34px; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.fu-row:first-child { border-top: 0; }
.fu-row.plain { grid-template-columns: 1fr auto auto; }
.fu-row.done .fu-title { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9c3b8; }
.tick { width: 26px; height: 26px; border-radius: 99px; border: 2px solid #cfc8bb; background: #fff; display: grid; place-items: center; color: transparent; cursor: pointer; padding: 0; }
.tick:hover { border-color: var(--ok); color: var(--ok); }
.fu-row.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.fu-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fu-title { font-weight: 600; overflow-wrap: anywhere; }
a.fu-main:hover .fu-title { text-decoration: underline; text-underline-offset: 3px; }
.fu-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); align-items: center; }
.status-sel { border: 0; border-radius: 99px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; appearance: none; text-align: center; }
.count { margin: 0 0 4px; }

/* meetings */
.meet-line { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); }
.meet-line:first-of-type { border-top: 0; }
.meet-line:hover .fu-title { text-decoration: underline; text-underline-offset: 3px; }
.meet-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.date-box { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 4px 0; line-height: 1.1; }
.date-box b { font-family: var(--serif); font-size: 20px; } .date-box span { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.line-link { display: block; padding: 8px 0; border-top: 1px solid var(--line); } .line-link:first-of-type { border-top: 0; }
.today-meet { border-color: var(--gold); }
.minutes { font-size: 16px; line-height: 1.65; }
.minutes h3:first-child { margin-top: 0; }
.sig { margin-top: 28px; }
.print-only { display: none; }

/* departments */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dept-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.dept-card:hover { border-color: var(--ink); border-top-color: var(--c); }
.dept-name { font-weight: 700; font-size: 16px; } .dept-head { font-size: 13px; color: var(--muted); }
.dept-nums { font-size: 14px; margin-top: 6px; display: flex; gap: 10px; }
.bar { height: 6px; border-radius: 99px; background: #f0ede6; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.dept-table { padding: 6px 20px; }
.dept-row { display: grid; grid-template-columns: 14px 1fr 70px 90px 90px; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.dept-row:first-child { border-top: 0; }
.dept-row:hover .fu-title { text-decoration: underline; }
.swatch { width: 14px; height: 14px; border-radius: 5px; background: var(--c); display: inline-block; }
.swatch.inline { width: 10px; height: 10px; }

/* tabs & filters */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 99px; cursor: pointer; font-weight: 500; font-size: 14px; }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select, .search { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 12px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; color: var(--muted); }
.search input[type=search] { border: 0; outline: 0; background: none; width: 100%; color: var(--ink); padding: 0; box-shadow: none; }
.search.grow { flex: 1; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink2); }
.field em { font-style: normal; font-weight: 400; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; width: 100%; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,20,20,.06); }
textarea { resize: vertical; line-height: 1.55; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 12px; }
.form { max-width: 900px; }
.form-actions, .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.check:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); font-weight: 600; }
.check input { accent-color: var(--c); }
.action-row { display: grid; grid-template-columns: 2fr 1.2fr 1fr 150px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.action-row .icon-btn { color: var(--muted); }
.quick-dates { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; margin: -4px 0 6px; }
.colors { display: flex; gap: 8px; }
.colors input { position: absolute; opacity: 0; }
.colors i { display: block; width: 28px; height: 28px; border-radius: 99px; cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.colors input:checked + i { box-shadow: 0 0 0 2px var(--ink); }
.upd-form textarea { margin-bottom: 8px; }
.upd-actions { display: flex; gap: 8px; justify-content: flex-end; }
.upd-actions select { width: auto; }
.file-btn { cursor: pointer; }

/* timeline & facts */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 14px 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 99px; background: var(--ink); }
.timeline li.sys::before { background: #cfc8bb; }
.timeline li.sys p { color: var(--ink2); font-size: 14px; }
.facts dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 12px 10px; }
.facts dt { color: var(--muted); font-size: 13px; } .facts dd { margin: 0; overflow-wrap: anywhere; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

/* brief */
.brief-sec ul { margin: 0; padding-left: 20px; } .brief-sec li { margin: 4px 0; }
.brief-sec li a { font-weight: 600; } .brief-sec li a:hover { text-decoration: underline; }
.brief-sec h2.bad { color: var(--bad); } .brief-sec h2.warn { color: var(--warn); }
details summary { cursor: pointer; margin-top: 12px; }

/* modal / toast */
.modal-back { position: fixed; inset: 0; background: rgba(20,20,20,.4); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { background: #fff; border-radius: 20px; padding: 24px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 16px; }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 99px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 32px; width: min(420px, 100%); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.auth-card h1 { font-size: 28px; margin-top: 10px; }
.auth-card > p { margin: 0 0 12px; }
.auth-card .link { align-self: center; margin-top: 10px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 8px; }
.notice { background: var(--warn-bg); padding: 10px 12px; border-radius: 10px; }

/* responsive */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid2, .grid2.wide-left { grid-template-columns: 1fr; }
}
/* AI, documents, voice (all sizes) */
.m-home, .only-mobile { display: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.ai-card { border-color: #e4cf94; background: linear-gradient(180deg, #fffdf6, #fff); }
.ai-card h2 { display: flex; align-items: center; gap: 8px; }
.ai-out p { margin: 0 0 10px; }
.ai-points { margin: 6px 0 4px; padding-left: 20px; } .ai-points li { margin: 4px 0; }
.ai-rem { display: flex; flex-direction: column; gap: 8px; }
.rem { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--pc) 22%, #fff); }
.rem-btns { display: flex; gap: 6px; align-items: center; flex: none; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 99px; display: inline-block; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.ask { display: flex; flex-direction: column; gap: 8px; }
.ask-btns { display: flex; justify-content: flex-end; gap: 8px; }
.suggest-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.qa { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.qa .q { font-weight: 700; margin: 0 0 8px; }
.docs { display: flex; flex-direction: column; }
.doc { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; }
.doc-ic { width: 44px; height: 44px; border-radius: 12px; background: #f3ecd8; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #7a5d16; }
.doc-text { max-height: 60vh; overflow: auto; background: #faf8f3; border-radius: 12px; padding: 14px; font-size: 14px; }
.with-mic { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon-btn.mic { color: var(--ink); }
.icon-btn.mic.live, .voice-orb.live { background: #e5483a; color: #fff; border-color: #e5483a; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(229,72,58,.15); } }
.voice { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0 12px; }
.voice-orb { width: 84px; height: 84px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.voice-text { font-size: 18px; text-align: center; min-height: 54px; margin: 0; }
.sheet-list { display: flex; flex-direction: column; }
.sheet-list a { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-top: 1px solid rgba(0,0,0,.07); font-weight: 600; font-size: 17px; }
.sheet-list a:first-child { border-top: 0; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-grid > * { background: var(--pc); border: 0; border-radius: 24px; min-height: 112px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; cursor: pointer; color: #141414; }
.sheet-grid b { font-size: 17px; }
button:disabled.tag { opacity: .5; }

/* ================================================================ phone (reference: black home, pastel cards, cream pages) */
@media (max-width: 760px) {
  :root { --cream: #f1e8ca; --cream2: #e9dfbd; --glass: rgba(255,255,255,.55); --m: 'Urbanist', var(--sans); }
  body { background: var(--cream); font-size: 16px; }
  body[data-route="home"] { background: #0e0e0e; }
  .app { grid-template-columns: 1fr; }
  .side, .d-only { display: none !important; }
  .only-mobile { display: inline-flex; }
  .view { padding: calc(18px + env(safe-area-inset-top)) 16px 130px; gap: 16px; }
  h1 { font-family: var(--m); font-weight: 600; font-size: 40px; line-height: 1.02; letter-spacing: -.02em; }
  h2 { font-family: var(--m); font-size: 19px; font-weight: 700; }
  .eyebrow { color: #6d6450; font-family: var(--m); font-size: 13px; letter-spacing: .04em; }
  .muted { color: #7b7260; }

  /* round back button like the reference */
  .back { width: 46px; height: 46px; border-radius: 99px; background: rgba(0,0,0,.07); font-size: 0; margin: 0 0 4px; display: grid; place-items: center; align-self: flex-start; }
  .back::before { content: ''; width: 18px; height: 18px; background: currentColor; color: var(--ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/contain no-repeat; }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .head-actions { width: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .head-actions::-webkit-scrollbar { display: none; }
  .head-actions .btn { flex: none; }

  /* buttons + fields */
  .btn { min-height: 46px; padding: 11px 18px; font-size: 15px; font-family: var(--m); font-weight: 700; }
  .btn.ghost { background: var(--glass); border-color: transparent; }
  .btn.sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
  .icon-btn { width: 40px; height: 40px; background: var(--glass); border-color: transparent; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; background: rgba(255,255,255,.7); border-color: transparent; border-radius: 16px; padding: 13px 14px; }
  input:focus, select:focus, textarea:focus { border-color: var(--ink); background: #fff; }
  .row2, .row3 { grid-template-columns: 1fr; gap: 0; }
  .field > span { font-family: var(--m); font-size: 14px; color: #4d4639; }

  /* cards on cream */
  .card { background: var(--glass); border: 0; box-shadow: none; border-radius: 28px; padding: 18px; }
  .ai-card { background: #f7d046; }
  .ai-card .btn:not(.ghost) { background: #141414; }
  .ai-card .muted { color: #5c4d16; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { border: 0; border-radius: 24px; box-shadow: none; background: var(--glass); }
  .kpi b { font-family: var(--m); font-size: 34px; font-weight: 700; }
  .kpis .kpi:first-child:nth-last-child(odd) { grid-column: span 2; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .tab { flex: none; background: transparent; border-color: rgba(0,0,0,.18); padding: 10px 16px; font-family: var(--m); font-weight: 700; }
  .filters select, .search { background: var(--glass); border-color: transparent; border-radius: 16px; }
  .filters select { flex: 1 1 140px; }

  /* follow-ups become pastel cards */
  .fu-list { gap: 10px; }
  .fu-row { background: var(--pc); border: 0 !important; border-radius: 24px; padding: 14px; grid-template-columns: 34px 1fr 40px; row-gap: 8px; column-gap: 10px; color: #141414; }
  .fu-row .fu-meta, .fu-row .chip, .fu-row .muted { color: rgba(20,20,20,.72); }
  .fu-row .chip::before { background: #141414; opacity: .5; }
  .fu-row .fu-title { font-family: var(--m); font-size: 17px; font-weight: 700; line-height: 1.2; }
  .fu-row .due { grid-column: 2; grid-row: 2; }
  .fu-row .due.bad { color: #8f1d14; } .fu-row .due.warn { color: #6b4a00; }
  .fu-row .status-sel { grid-column: 2; grid-row: 3; justify-self: start; width: auto; background: rgba(255,255,255,.55) !important; color: #141414 !important; padding: 7px 14px; }
  .fu-row .icon-btn { grid-column: 3; grid-row: 1; background: rgba(255,255,255,.45); }
  .fu-row .icon-btn.ph { display: none; }
  .tick { width: 34px; height: 34px; background: rgba(255,255,255,.55); border: 0; color: rgba(0,0,0,.25); }
  .fu-row.done { opacity: .75; }
  .fu-row.done .tick { background: #141414; color: #fff; }
  .fu-row.plain { background: rgba(255,255,255,.6); grid-template-columns: 1fr auto; }
  .count { margin-bottom: 2px; }

  /* meetings, departments, timeline */
  .meet-line { grid-template-columns: 50px 1fr; background: rgba(255,255,255,.6); border: 0; border-radius: 22px; padding: 12px; margin-bottom: 8px; }
  .meet-line > .small { grid-column: 2; }
  .date-box { border: 0; background: #141414; color: #fff; border-radius: 16px; padding: 6px 0; }
  .date-box span { color: #d9cfa8; }
  .minutes { font-size: 17px; }
  .dept-table { background: transparent; padding: 0; }
  .dept-row { background: color-mix(in srgb, var(--c) 18%, #fff); border-radius: 22px; border: 0; padding: 14px; margin-bottom: 8px; grid-template-columns: 14px 1fr auto; }
  .dept-row > :nth-child(4), .dept-row > :nth-child(5) { display: none; }
  .facts dl { grid-template-columns: 100px 1fr; }
  .timeline { border-left-color: rgba(0,0,0,.12); }
  .grid2, .grid2.wide-left { grid-template-columns: 1fr; gap: 16px; }
  .action-row { grid-template-columns: 1fr 1fr; padding: 10px; background: rgba(255,255,255,.45); border-radius: 18px; }
  .action-row input[name=a_title] { grid-column: span 2; }
  .action-row .icon-btn { justify-self: end; }
  .check { background: var(--glass); border-color: transparent; padding: 9px 14px; }
  .doc { grid-template-columns: 44px 1fr; } .doc .link { grid-column: 2; justify-self: start; }
  .doc-ic { background: #141414; color: #f7d046; }
  .rem { background: rgba(255,255,255,.6); flex-direction: column; align-items: stretch; border-radius: 20px; }
  .rem-btns { justify-content: flex-end; }
  .suggest-row { flex-wrap: nowrap; overflow-x: auto; margin: 12px -18px 4px; padding: 0 18px; scrollbar-width: none; }
  .tag { flex: none; background: rgba(255,255,255,.6); border: 0; padding: 9px 14px; font-size: 14px; }

  /* black floating capsule nav with yellow + */
  .bottom { display: flex; position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(400px, calc(100% - 28px)); height: 68px; padding: 0 10px; border-radius: 99px; background: #111; box-shadow: 0 12px 30px rgba(0,0,0,.28);
    align-items: center; justify-content: space-around; }
  .bottom a { position: relative; width: 48px; height: 48px; display: grid; place-items: center; color: #7d7d7d; border-radius: 99px; }
  .bottom a.on { color: #fff; background: #262626; }
  .bottom a em { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 99px; background: #f07b50; }
  .bottom .plus { width: 56px; height: 56px; border-radius: 99px; border: 0; background: #f7d046; color: #111; display: grid; place-items: center; cursor: pointer; }
  body[data-route="home"] .bottom { background: rgba(38,38,38,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

  /* bottom sheets */
  .modal-back { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 30px 30px 0 0; background: var(--cream); padding: 12px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .22s ease-out; }
  .modal::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: rgba(0,0,0,.18); margin: 0 auto 14px; }
  .modal h2 { font-family: var(--m); font-size: 26px; font-weight: 700; }
  .modal-actions .btn { flex: 1; }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } }
  #toast { bottom: calc(92px + env(safe-area-inset-bottom)); }

  /* ---- home: black screen, huge title, pills, pastel masonry */
  .m-home { display: block; color: #fff; }
  .m-top { display: flex; justify-content: space-between; align-items: center; }
  .m-top-btns { display: flex; gap: 8px; }
  .m-date { font-family: var(--m); font-weight: 600; color: #8f8f8f; font-size: 14px; }
  .m-circle { width: 46px; height: 46px; border-radius: 99px; background: #232323; border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; }
  .m-title { font-family: var(--m); font-weight: 500; font-size: 56px; line-height: .98; letter-spacing: -.03em; margin: 22px 0 22px; color: #fff; }
  .m-pills { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; scrollbar-width: none; }
  .m-pills::-webkit-scrollbar, .m-depts::-webkit-scrollbar { display: none; }
  .m-pill { flex: none; display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #9a9a9a; border: 1.5px solid #333; border-radius: 99px; padding: 10px 14px 10px 18px; font-family: var(--m); font-size: 17px; font-weight: 600; cursor: pointer; }
  .m-pill i { font-style: normal; font-size: 12px; min-width: 24px; height: 24px; border-radius: 99px; background: #2a2a2a; color: #ddd; display: grid; place-items: center; padding: 0 6px; }
  .m-pill.on { color: #fff; border-color: #fff; }
  .m-pill.alert i { background: #f07b50; color: #111; }
  .m-grid { columns: 2; column-gap: 10px; }
  .m-card { break-inside: avoid; display: flex; flex-direction: column; gap: 8px; background: var(--pc, #eadba8); color: #141414; border-radius: 28px; padding: 16px 14px 16px 16px; margin-bottom: 10px; cursor: pointer; min-height: 140px; -webkit-tap-highlight-color: transparent; }
  .m-card:active { transform: scale(.98); }
  .m-card.ai { background: #f7d046; min-height: 170px; }
  .m-card.calm { background: #232323; color: #fff; }
  .m-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
  .m-label { font-family: var(--m); font-size: 13px; font-weight: 700; line-height: 1.2; padding-top: 4px; opacity: .8; overflow-wrap: anywhere; }
  .m-round { flex: none; width: 38px; height: 38px; border-radius: 99px; background: rgba(255,255,255,.4); border: 1px solid rgba(0,0,0,.08); display: grid; place-items: center; color: #141414; cursor: pointer; padding: 0; }
  .m-round.tickb { color: rgba(0,0,0,.3); }
  .m-round.tickb.on { background: #141414; color: #fff; }
  .m-card-title { font-family: var(--m); font-size: 19px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
  .m-card-sub { font-size: 14px; opacity: .75; line-height: 1.35; }
  .m-due { margin-top: auto; align-self: flex-start; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.5); border-radius: 99px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 6px; }
  .m-due.bad { background: #141414; color: #fff; }
  .m-due i { width: 7px; height: 7px; border-radius: 99px; background: #c62f22; }
  .m-sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 2px 10px; }
  .m-sec-head h2 { color: #fff; margin: 0; font-size: 22px; }
  .m-sec-head a { color: #9a9a9a; font-weight: 600; font-size: 15px; }
  .m-wide { display: flex; align-items: center; gap: 12px; background: #f1e8ca; color: #141414; border-radius: 26px; padding: 12px 12px 12px 12px; margin-bottom: 10px; }
  .m-emoji { width: 50px; height: 50px; border-radius: 99px; background: #fff; display: grid; place-items: center; flex: none; }
  .m-wide-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .m-wide-main small { color: #6d6450; font-weight: 600; }
  .m-wide-main b { font-family: var(--m); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-depts { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .m-dept { flex: none; width: 150px; min-height: 110px; border-radius: 26px; background: var(--pc); color: #141414; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
  .m-dept b { font-family: var(--m); font-size: 17px; line-height: 1.15; }
  .m-dept span { font-size: 13px; font-weight: 600; opacity: .75; }
  body[data-route="home"] .boot { color: #777; }
}
@media (max-width: 360px) { .m-title { font-size: 46px; } .m-card-title { font-size: 17px; } }

/* print: minutes and daily brief print clean on A4 */
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; font-size: 12pt; }
  .side, .bottom, .no-print, #toast, .back { display: none !important; }
  .app { display: block; }
  .view { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .print-only { display: table; width: 100%; border-collapse: collapse; margin-top: 6px; }
  .print-only th, .print-only td { border: 1px solid #999; padding: 6px 8px; text-align: left; font-size: 11pt; vertical-align: top; }
  a { text-decoration: none; }
  h3 { color: #333; }
}

/* ---- Scan MOM overlay (AI chat style, full screen) */
body.noscroll { overflow: hidden; }
.no-speech .icon-btn.mic, .no-speech [data-act=voice-fu] { display: none !important; }
.sheet-grid .wide { grid-column: span 2; min-height: 92px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
.scan { position: fixed; inset: 0; z-index: 70; background: #0e0e0e; color: #fff; display: flex; flex-direction: column; animation: fade .2s; font-family: 'Urbanist', var(--sans); }
.scan-top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 16px 10px; }
.scan-x { width: 44px; height: 44px; border-radius: 99px; border: 0; background: #232323; color: #fff; font-size: 16px; cursor: pointer; }
.scan-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: #f7d046; }
.scan-body { flex: 1; overflow-y: auto; padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 14px; max-width: 720px; width: 100%; margin: 0 auto; }
.bubble { max-width: 92%; padding: 14px 16px; border-radius: 22px; font-size: 17px; line-height: 1.4; }
.bubble.ai { background: #1f1f1f; border-top-left-radius: 6px; align-self: flex-start; }
.scan-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 3/4; background: #1a1a1a; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 99px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.thumb span { position: absolute; left: 10px; bottom: 8px; background: #f7d046; color: #111; font-weight: 800; font-size: 13px; border-radius: 99px; padding: 2px 9px; }
.reading .thumb img { filter: brightness(.65); }
.scanline { position: absolute; left: 0; right: 0; height: 3px; background: #f7d046; box-shadow: 0 0 18px 4px rgba(247,208,70,.6); animation: scanl 1.6s ease-in-out infinite alternate; }
@keyframes scanl { from { top: 4%; } to { top: 94%; } }
.dots { display: inline-flex; gap: 4px; margin-right: 6px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: #f7d046; animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.scan-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); max-width: 720px; width: 100%; margin: 0 auto; }
.scan-gal, .scan-go { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: #cfcfcf; font: 600 13px 'Urbanist', var(--sans); cursor: pointer; width: 76px; }
.scan-go { color: #f7d046; } .scan-go:disabled { color: #555; cursor: default; }
.scan-cam { width: 84px; height: 84px; border-radius: 99px; background: #fff; color: #111; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 6px #2a2a2a; }
.scan-cam:active { transform: scale(.95); }
.scan-save { flex: 1; min-height: 58px; border-radius: 99px; border: 0; background: #f7d046; color: #111; font: 800 18px 'Urbanist', var(--sans); cursor: pointer; }
.scan-save:disabled { opacity: .6; }
.scan-review .field > span { color: #a9a9a9; font-family: 'Urbanist', var(--sans); }
.scan-review input, .scan-review textarea { background: #1c1c1c !important; color: #fff !important; border: 1px solid #2c2c2c !important; border-radius: 16px !important; font-size: 16px !important; }
.scan-review input:focus, .scan-review textarea:focus { border-color: #f7d046 !important; }
.scan-review input[type=date] { color-scheme: dark; }
.scan-review .muted { color: #8a8a8a; } .scan-review .link { color: #f7d046; }
.dept-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dchip { border: 1.5px solid #333; background: transparent; color: #ddd; border-radius: 99px; padding: 10px 16px; font: 700 15px 'Urbanist', var(--sans); cursor: pointer; }
.dchip.on { background: var(--pc, #fff); border-color: var(--pc, #fff); color: #111; }
.scan-items { display: flex; flex-direction: column; gap: 10px; }
.scan-item { position: relative; background: #171717; border-radius: 20px; padding: 10px 44px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.scan-item .row2 { gap: 8px; grid-template-columns: 1fr 1fr; }
.scan-item-x { position: absolute; top: 12px; right: 8px; width: 30px; height: 30px; border-radius: 99px; border: 0; background: #2a2a2a; color: #bbb; cursor: pointer; }
/* AI card ghost buttons stay light on yellow */
@media (max-width: 760px) { .ai-card .btn.ghost { background: rgba(255,255,255,.65); color: #141414; } }
