/* Lunarion Platform · design system (same language as lunarionlabs.com): silver, black and white,
   thin display type, mono bracket labels, square buttons. Light and dark themes share every token. */

:root {
  --bg: #F2F2F3;          /* page */
  --bg-2: #E9E9EC;        /* sunken areas */
  --panel: #FFFFFF;       /* cards, sidebar */
  --ink: #0C0C0F;         /* main text */
  --ink-2: #5A5A62;       /* secondary text */
  --ink-3: #8E8E96;       /* labels, hints */
  --line: #DEDEE3;        /* hairlines */
  --line-2: #CACAD0;
  --fill: #0C0C0F;        /* primary button */
  --fill-ink: #FFFFFF;
  --hover: rgba(12, 12, 15, .05);
  --focus: rgba(12, 12, 15, .35);
  --ok: #1E7F55; --ok-bg: rgba(30, 127, 85, .09);
  --warn: #9A6400; --warn-bg: rgba(154, 100, 0, .1);
  --err: #B42318; --err-bg: rgba(180, 35, 24, .08);
  --silver: linear-gradient(100deg, #0C0C0F 0%, #6A6A72 60%, #A8A8AE 100%);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 10px;
  --side: 260px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07070A; --bg-2: #0B0B0F; --panel: #0F0F13; --ink: #F4F4F6; --ink-2: #A8A8AE; --ink-3: #6E6E76;
    --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16); --fill: #F4F4F6; --fill-ink: #0C0C0F;
    --hover: rgba(255,255,255,.05); --focus: rgba(255,255,255,.4);
    --ok: #5CC99A; --ok-bg: rgba(92,201,154,.1); --warn: #E3B35C; --warn-bg: rgba(227,179,92,.1); --err: #F2857A; --err-bg: rgba(242,133,122,.1);
    --silver: linear-gradient(100deg, #FFFFFF 0%, #CFCFD4 55%, #8E8E96 100%);
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07070A; --bg-2: #0B0B0F; --panel: #0F0F13; --ink: #F4F4F6; --ink-2: #A8A8AE; --ink-3: #6E6E76;
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16); --fill: #F4F4F6; --fill-ink: #0C0C0F;
  --hover: rgba(255,255,255,.05); --focus: rgba(255,255,255,.4);
  --ok: #5CC99A; --ok-bg: rgba(92,201,154,.1); --warn: #E3B35C; --warn-bg: rgba(227,179,92,.1); --err: #F2857A; --err-bg: rgba(242,133,122,.1);
  --silver: linear-gradient(100deg, #FFFFFF 0%, #CFCFD4 55%, #8E8E96 100%);
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.dim { color: var(--ink-3); }
.display { font-weight: 200; letter-spacing: -.045em; line-height: .98; margin: 0; text-wrap: balance; }
.display em { font-style: normal; background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-b { fill: currentColor; stroke: none; }

/* wordmark */
.brand { display: inline-flex; align-items: center; font-weight: 500; font-size: 18px; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand img { width: .62em; height: .62em; margin: 0 .02em; transform: translateY(.04em); }
.brand small { font-size: 1em; font-weight: 400; opacity: .55; margin-left: .22em; letter-spacing: -.02em; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 4px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 500 14px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .25s, border-color .25s, transform .4s var(--ease); }
.btn:hover { background: var(--hover); }
.btn-fill { background: var(--fill); color: var(--fill-ink); border-color: var(--fill); }
.btn-fill:hover { background: var(--fill); opacity: .9; }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--hover); }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; align-content: start; }
.field > span { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12.5px; }
.field input, .field select, .field textarea { width: 100%; height: 46px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--ink); font: 15px var(--sans); transition: border-color .2s, background .2s; }
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink-2); background: var(--panel); }
.alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 6px; font-size: 14px; }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }

/* sign-in pages: art on the left, form on the right */
.auth-grid { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #07070A; color: #F4F4F6; padding: 36px clamp(24px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-art .brand { color: #F4F4F6; }
.auth-orb { position: absolute; width: min(46vh, 420px); right: 8%; top: 12%; transform: scaleX(-1); opacity: .95; }
.auth-claim { position: relative; display: grid; gap: 18px; }
.auth-claim .display { font-size: clamp(44px, 5.6vw, 86px); }
.auth-claim .display em { background: linear-gradient(100deg, #FFFFFF 0%, #CFCFD4 55%, #8E8E96 100%); -webkit-background-clip: text; background-clip: text; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px; gap: 30px; }
.auth-box { width: 100%; max-width: 400px; }
.box-h { font-weight: 300; font-size: 32px; letter-spacing: -.035em; margin: 0 0 8px; }
.box-lead { color: var(--ink-2); margin: 0 0 26px; }
.box-link { display: inline-block; margin-top: 18px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.box-link:hover { color: var(--ink); }
.auth-box .btn-fill { width: 100%; margin-top: 6px; }
.auth-legal a { text-decoration: none; }
@media (max-width: 860px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-art { min-height: 260px; }
  .auth-orb { width: 200px; right: 6%; top: 24px; }
  .auth-claim .display { font-size: 40px; }
}

/* application shell */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 14px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.side .brand { padding: 4px 10px 10px; }
.side-nav { display: grid; gap: 2px; align-content: start; flex: 1; }
.side-k { margin: 16px 10px 6px; color: var(--ink-3); }
.side-k:first-child { margin-top: 0; }
.side-a { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 7px; border: 0; background: none; color: var(--ink-2); font: 14px var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.side-a:hover { background: var(--hover); color: var(--ink); }
.side-a.on { background: var(--hover); color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }
.side-foot { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-width: 0; border-radius: 7px; text-decoration: none; }
.me:hover { background: var(--hover); }
.av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line-2); font: 500 12px var(--mono); }
.me-t { display: grid; min-width: 0; }
.me-t b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-t small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 clamp(16px, 3vw, 36px);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-h { font-weight: 400; font-size: 17px; letter-spacing: -.02em; margin: 0; }
.top-r { margin-left: auto; display: flex; gap: 8px; }
.only-m { display: none; }
.page { padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 36px) 80px; display: grid; gap: 36px; align-content: start; }
[data-theme="dark"] .if-light, [data-theme="light"] .if-dark { display: none; }
:root:not([data-theme]) .if-light { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .if-light { display: inline; } :root:not([data-theme]) .if-dark { display: none; } }

/* dashboard */
.hello { display: grid; gap: 14px; }
.hello .display { font-size: clamp(40px, 5vw, 72px); }
.lead { color: var(--ink-2); font-size: 17px; margin: 0; max-width: 60ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 8px; padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); text-decoration: none; box-shadow: var(--shadow); transition: border-color .25s, transform .5s var(--ease); }
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile-k { color: var(--ink-3); }
.tile-h { font-size: 20px; font-weight: 300; letter-spacing: -.03em; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; left: 0; width: var(--side); transform: translateX(-100%); transition: transform .45s var(--ease); }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .only-m { display: inline-grid; }
}

/* error page */
.err { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.err-box { display: grid; gap: 18px; justify-items: start; max-width: 480px; }
.err-box h1 { font-weight: 300; font-size: 34px; letter-spacing: -.035em; margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* password field with show/hide eye (added by app.js) */
.pw { position: relative; display: block; }
.pw > input { width: 100%; padding-right: 48px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--ink); background: var(--hover); }

/* ===== shared components (every module uses these; add module CSS at the end of this file in a labelled block) ===== */

/* page header: title + actions */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ph-t { display: grid; gap: 8px; }
.ph-t h2 { font-weight: 300; font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.04em; line-height: 1; margin: 0; }
.ph-a { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.btn-danger:hover { background: var(--err-bg); }
.btn-ghost { border-color: transparent; }

/* toolbar: search + filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input[type=search], .toolbar select { height: 38px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 14px var(--sans); min-width: 0; }
.toolbar input[type=search] { width: min(320px, 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; text-decoration: none; color: var(--ink-2); }
.chip.on, .chip:hover { color: var(--ink); background: var(--hover); border-color: var(--ink-3); }

/* card */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-b { padding: clamp(16px, 2vw, 24px); display: grid; gap: 14px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; font-weight: 500; font-size: 15px; letter-spacing: -.01em; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat { padding: 18px 20px; display: grid; gap: 6px; }
.stat-v { font-weight: 300; font-size: 30px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }

/* table */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl a.row-link { text-decoration: none; font-weight: 500; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .muted { color: var(--ink-2); }

/* badges / status */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font: 500 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-ink { background: var(--fill); color: var(--fill-ink); }

/* empty state */
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 56px 20px; color: var(--ink-2); }
.empty img { width: 64px; opacity: .8; }
.empty h3 { margin: 0; font-weight: 300; font-size: 24px; letter-spacing: -.03em; color: var(--ink); }

/* pagination */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }

/* detail layout: main column + side column */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink-3); font: 500 11px/1.8 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* form grid */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .fgrid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
/* file inputs: hairline box + square mono button, both themes */
input[type=file], .field input[type=file] { display: block; width: 100%; max-width: 100%; height: auto; min-height: 46px; padding: 6px; border-radius: 6px;
  border: 1px dashed var(--line-2); background: var(--bg-2); color: var(--ink-2); font: 13.5px var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
input[type=file]:hover { border-color: var(--ink-3); background: var(--panel); }
input[type=file]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input[type=file]::file-selector-button { height: 32px; margin-right: 12px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .2s, border-color .2s; }
input[type=file]::file-selector-button:hover { background: var(--hover); border-color: var(--ink-3); }
input[type=file][hidden] { display: none; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on, .tab:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 8px; padding: 10px; min-height: 120px; align-content: start; }
.kcol-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 6px; }
.kcard { display: grid; gap: 6px; padding: 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; cursor: grab; }
.kcard:hover { border-color: var(--line-2); }
.kcard.drag { opacity: .5; }
.kcol.over { outline: 2px dashed var(--line-2); outline-offset: -4px; }

/* timeline / activity */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; font-size: 14px; }
.timeline li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); margin-top: 7px; }
.timeline small { color: var(--ink-3); display: block; }

/* progress bar */
.bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: inherit; }

/* modal (native <dialog>, opened with data-open="id") */
dialog.modal { border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font-weight: 400; font-size: 18px; letter-spacing: -.02em; }
.modal-b { padding: 22px; display: grid; gap: 16px; }

/* chat / messages thread */
.thread { display: grid; gap: 12px; }
.msg { max-width: 72ch; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.msg.mine { justify-self: end; background: var(--fill); color: var(--fill-ink); border-color: var(--fill); }
.msg small { display: block; opacity: .6; margin-top: 6px; font-size: 11.5px; }

.mt0 { margin-top: 0; } .grow { flex: 1; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* ===== module: clients ===== */
.cl-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.cl-note { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.cl-note:last-child { border-bottom: 0; }
.cl-note p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.cl-note-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cl-private { font-size: 13px; }
.cl-inline { display: flex; gap: 6px; align-items: center; }
.cl-inline select { height: 34px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 13px var(--sans); }
.cl-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* ===== module: prospects ===== */
.pr-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pr-board .kcol { align-content: start; }
.pr-board .kcard b { font-weight: 500; font-size: 14px; }
.pr-board .kcard small { font-size: 12.5px; }
.pr-val { font-variant-numeric: tabular-nums; font-size: 13px; }
.pr-total { margin: -4px 4px 4px; }
.pr-late { color: var(--warn); }
.kcol.pr-won .kcol-h .mono:first-child { color: var(--ok); }
.kcol.pr-lost .kcol-h .mono:first-child { color: var(--err); }
.pr-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.pr-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.pr-notes { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); white-space: pre-line; color: var(--ink-2); }
.pr-intake { grid-template-columns: 200px 1fr; }
@media (max-width: 700px) { .pr-intake { grid-template-columns: 1fr; } }
.pr-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-kinds .chip { cursor: pointer; gap: 6px; }
.pr-kinds .chip input { accent-color: var(--ink); margin: 0; }
.pr-kinds .chip:has(input:checked) { color: var(--ink); background: var(--hover); border-color: var(--ink-3); }
.pr-body { display: block; white-space: pre-line; overflow-wrap: anywhere; margin-top: 2px; }
.pr-stage { display: flex; gap: 8px; align-items: end; }
.pr-stage .field { flex: 1; }
.pr-close { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pr-tasks li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pr-tasks li:last-child { border-bottom: 0; }
.pr-tasks li.done .pr-task-t { color: var(--ink-3); text-decoration: line-through; }
.pr-task-t { display: grid; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.pr-task-t small { font-size: 12px; }
.pr-check { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 12px; padding: 0; }
.pr-check:hover { background: var(--hover); }
.pr-x { width: 28px; height: 28px; }
.pr-stage-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pr-stage-row input, .pr-stage-row select { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); min-width: 0; }
.pr-stage-row input { flex: 1; min-width: 160px; }
/* public audit request */
.ar-grid { align-items: start; }
.ar-art { position: sticky; top: 0; height: 100vh; }
.ar-panel { justify-content: flex-start; padding-top: 48px; }
.ar-box { width: 100%; max-width: 620px; }
.ar-lang { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 18px; color: var(--ink-3); }
.ar-lang a { text-decoration: none; }
.ar-lang a[aria-current] { color: var(--ink); }
.ar-form fieldset { border: 0; margin: 0; padding: 0 0 26px; min-width: 0; display: grid; gap: 16px; border-bottom: 1px solid var(--line); }
.ar-form fieldset:last-of-type { border-bottom: 0; }
.ar-form fieldset[hidden] { display: none; }
.ar-legend { padding: 0; font-weight: 300; font-size: 22px; letter-spacing: -.03em; display: flex; gap: 12px; align-items: baseline; }
.ar-legend sup, .ar-ql sup { color: var(--ink-3); }
.ar-hint { margin: -8px 0 0; color: var(--ink-3); font-size: 13.5px; }
.ar-q { display: grid; gap: 10px; }
.ar-ql { margin: 0; font-weight: 500; font-size: 15px; }
.ar-ql small { font-weight: 400; color: var(--ink-3); font-size: 12.5px; margin-left: 6px; }
label.ar-q > .ar-ql { font: 500 15px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.ar-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-opt { position: relative; display: inline-flex; cursor: pointer; }
.ar-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ar-opt span { display: grid; gap: 2px; padding: 9px 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); font-size: 14px; transition: border-color .2s, background .2s, color .2s; }
.ar-opt span small { color: var(--ink-3); font-size: 12.5px; }
.ar-opt:hover span { border-color: var(--ink-3); color: var(--ink); }
.ar-opt input:checked + span { border-color: var(--ink); background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ar-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.ar-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ar-cards .ar-opt span { width: 100%; padding: 14px 16px; }
@media (max-width: 560px) { .ar-cards { grid-template-columns: 1fr; } }
.ar-step-err { margin: 0; color: var(--err); font-size: 13.5px; min-height: 0; }
.ar-step-err:empty { display: none; }
.ar-nda { align-items: flex-start; }
.ar-send { width: 100%; }
.ar-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ar-progress { display: none; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.ar-progress i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.ar-nav { display: none; }
.ar-js .ar-progress { display: block; }
.ar-js .ar-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ar-js .ar-next[hidden] { display: none; }
.ar-prev:disabled { opacity: .35; cursor: default; }
.grid2 > .card { align-self: start; }
.ar-js .ar-nojs { display: none; }
.ar-js fieldset { border-bottom: 0; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 860px) { .ar-art { position: relative; height: auto; } }

/* ===== module: team ===== */
.perm-grid td, .perm-grid th { padding: 9px 12px; }
.perm-c { width: 18px; height: 18px; accent-color: var(--ink); }
.perm-more { border-top: 1px solid var(--line); padding-top: 12px; }
.perm-more summary { cursor: pointer; color: var(--ink-2); }
.perm-sh { width: 1%; white-space: nowrap; }
.perm-s { width: 1%; white-space: nowrap; }
.perm-s select { height: 34px; min-width: 176px; padding: 0 30px 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 13px var(--sans); cursor: pointer; }
.perm-s select:focus { outline: none; border-color: var(--ink-2); }
.perm-na { font-size: 12.5px; }
.perm-note { font-size: 12.5px; margin: 10px 0 0; }
.perm-line { display: block; margin-top: 2px; }
.perm-sum-h { margin: 18px 0 8px; font-size: 13px; }
.perm-sum { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line); }
.perm-sum li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.perm-sum-r { text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .perm-s select { min-width: 0; width: 100%; } .perm-s { white-space: normal; } }
.totp-key { font: 500 14px var(--mono); letter-spacing: .12em; overflow-wrap: anywhere; }
.totp-uri { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }

/* ===== module: settings ===== */
.set-grid { display: grid; gap: 20px; }

/* ===== module: projects, files, help ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pj-crumb { text-decoration: none; }
.pj-crumb:hover { color: var(--ink); }
.pj-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.pj-head-prog { flex-direction: column; align-items: flex-end; gap: 8px; min-width: 220px; }
.pj-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.pj-h { margin: 6px 0 0; font-weight: 400; font-size: 18px; letter-spacing: -.02em; }
.pj-text { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.pj-w { font-weight: 500; }
.pj-small { font-size: 13px; margin: 0; }
.pj-meta { margin: 0; }
.pj-sep { border-top: 1px solid var(--line); }
.pj-url { width: 100%; height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 12.5px var(--mono); }
.pj-late { color: var(--err); }
/* progress bars: <progress class="pbar"> (no inline styles under the CSP) */
.pbar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--bg-2); color: var(--ink); overflow: hidden; }
.pbar::-webkit-progress-bar { background: var(--bg-2); border-radius: 999px; }
.pbar::-webkit-progress-value { background: var(--ink); border-radius: 999px; transition: width .6s var(--ease); }
.pbar::-moz-progress-bar { background: var(--ink); border-radius: 999px; }
.pbar-lg { height: 8px; width: min(280px, 100%); }
.pj-prog { min-width: 140px; }
.pj-prog .pbar { display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; }
/* kanban cards */
.pj-board .kcard { color: inherit; }
.pj-kname { font-weight: 500; font-size: 14px; }
.pj-ksub { font-size: 12.5px; }
.pj-kfoot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* client cards */
.pj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pj-card { display: grid; gap: 12px; padding: 20px; text-decoration: none; transition: border-color .25s, transform .5s var(--ease); }
.pj-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pj-card-h { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-card-t { font-weight: 300; font-size: 22px; letter-spacing: -.03em; }
.pj-card-f { display: flex; justify-content: space-between; gap: 10px; }
/* stage list */
.pj-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.pj-step { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pj-step:last-child { border-bottom: 0; }
.pj-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); flex: none; }
.pj-step-in_progress .pj-dot { border-color: var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.pj-step-client_review .pj-dot { border-color: var(--warn); background: var(--warn); }
.pj-step-done .pj-dot { border-color: var(--ok); background: var(--ok); }
.pj-step-done .grow { color: var(--ink-2); }
.pj-stages, .pj-reqs { display: grid; gap: 14px; }
.pj-stage { scroll-margin-top: 80px; }
.pj-stage-t { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.pj-stage-t h3 { margin: 0; font-weight: 500; font-size: 15px; }
.pj-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 11px; color: var(--ink-2); }
.pj-sub { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pj-sub > .mono { margin: 0; }
.pj-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pj-check li { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; }
.pj-check li.done .grow, .pj-check li.done > span:last-child { color: var(--ink-3); text-decoration: line-through; }
.pj-box { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 5px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fill-ink); font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.pj-check li.done .pj-box { background: var(--fill); border-color: var(--fill); }
.pj-x { border: 0; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.pj-x:hover { color: var(--err); background: var(--err-bg); }
.pj-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pj-inline select, .pj-in { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); }
.pj-in { flex: 1; min-width: 180px; }
.pj-comment { display: grid; gap: 8px; }
.pj-comment textarea { min-height: 64px; }
.pj-comment-a { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg.pj-internal { border-style: dashed; background: var(--warn-bg); color: var(--ink); }
.pj-answer { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); }
.pj-answer p { margin: 0; }
.pj-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.pj-danger { border-top: 1px solid var(--line); padding-top: 14px; }
/* client: what is expected */
.pj-todo { border-color: var(--line-2); }
.pj-ask { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.pj-ask:first-child { padding-top: 0; }
.pj-ask:last-child { border-bottom: 0; padding-bottom: 0; }
.pj-ask h4 { margin: 0; font-weight: 400; font-size: 19px; letter-spacing: -.02em; }
.pj-ask > p { margin: 0; }
.pj-ask-a { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-answer-f { display: grid; gap: 12px; max-width: 640px; }
.pj-flist { list-style: none; margin: 0; padding: 0; }
.pj-flist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: 14px; }
.pj-flist li:last-child { border-bottom: 0; }
.pj-flist a { text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.pj-fmeta { display: flex; gap: 8px; align-items: center; flex: none; }
/* files */
.fl-layout { display: grid; gap: 16px; align-items: start; }
.fl-layout.fl-has-tree { grid-template-columns: 250px minmax(0, 1fr); }
@media (max-width: 900px) { .fl-layout.fl-has-tree { grid-template-columns: 1fr; } }
.fl-main { display: grid; gap: 14px; min-width: 0; }
.fl-nav { display: grid; padding: 8px; gap: 2px; }
.fl-node { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-node:hover { background: var(--hover); color: var(--ink); }
.fl-node.on { background: var(--hover); color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }
.fl-d1 { padding-left: 24px; } .fl-d2 { padding-left: 38px; } .fl-d3 { padding-left: 52px; } .fl-d4, .fl-d5, .fl-d6, .fl-d7, .fl-d8, .fl-d9, .fl-d10, .fl-d11, .fl-d12 { padding-left: 66px; }
.fl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-3); }
.fl-crumbs a { color: var(--ink-2); text-decoration: none; }
.fl-crumbs a:hover { color: var(--ink); }
.fl-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.fl-folder { display: flex; align-items: center; gap: 10px; padding: 14px; text-decoration: none; font-size: 14px; }
.fl-folder:hover { border-color: var(--line-2); }
.fl-ico { width: 18px; height: 14px; border: 1.5px solid var(--ink-2); border-radius: 3px; position: relative; flex: none; }
.fl-ico::before { content: ""; position: absolute; left: -1.5px; top: -5px; width: 8px; height: 4px; border: 1.5px solid var(--ink-2); border-bottom: 0; border-radius: 2px 2px 0 0; }
.fl-name { display: flex; align-items: center; gap: 10px; }
.fl-ext { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2); font-size: 10px; color: var(--ink-2); flex: none; }
.fl-ext-lg { min-width: 72px; height: 52px; font-size: 13px; }
.fl-title { overflow-wrap: anywhere; }
.fl-preview { place-items: center; }
.fl-preview img { display: block; max-height: 70vh; width: auto; margin: 0 auto; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); }
.fl-pdf { display: grid; justify-items: center; gap: 12px; padding: 30px 10px; text-align: center; }
.fl-review-ask { border-color: var(--warn); }
.fl-review-ask .card-b > p { margin: 0; }
.fl-sha { font-size: 10.5px; letter-spacing: 0; text-transform: none; }
.fl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fl-gcard { overflow: hidden; display: grid; }
.fl-gthumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.fl-gthumb a, .fl-gthumb img { display: block; width: 100%; height: 100%; }
.fl-gthumb img { object-fit: cover; }
.fl-gthumb video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.fl-gthumb audio { width: calc(100% - 24px); }
/* one shared video: a wide player, not a tile */
.fl-gallery-one { grid-template-columns: minmax(0, 1fr); }
.fl-gallery-one .fl-gthumb { aspect-ratio: 16 / 9; max-height: 74vh; width: 100%; }
.fl-gbody { display: grid; gap: 8px; padding: 14px; }
.fl-gname { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
/* public pages (status page, share links) */
body.pub { min-height: 100vh; }
.pub-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line); background: var(--panel); }
.pub-main { max-width: 1100px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 36px) 80px; display: grid; gap: 28px; }
.pub-main .ph-t h2 { font-weight: 300; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; line-height: 1; margin: 0; overflow-wrap: anywhere; }
.pub-v { font-size: 22px; }
/* help center */
.hp-hero { display: grid; gap: 14px; justify-items: start; }
.hp-hero .display { font-size: clamp(38px, 4.6vw, 64px); }
.hp-search { display: flex; gap: 8px; width: min(640px, 100%); }
.hp-search input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 16px var(--sans); }
.hp-search .btn { height: 48px; }
.hp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.hp-list { list-style: none; margin: 0; padding: 0; }
.hp-list li { border-bottom: 1px solid var(--line); }
.hp-list li:last-child { border-bottom: 0; }
.hp-list a { display: grid; gap: 4px; padding: 13px clamp(16px, 2vw, 24px); text-decoration: none; font-size: 14px; }
.hp-list a:hover { background: var(--hover); }
.hp-list b { font-weight: 500; }
.hp-article { display: grid; gap: 14px; align-content: start; max-width: 74ch; min-width: 0; }
.hp-article > p { margin: 0; }
.hp-title { font-weight: 300; font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -.04em; line-height: 1.05; margin: 0; }
.hp-prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.hp-prose h3 { color: var(--ink); font-weight: 500; font-size: 18px; letter-spacing: -.015em; margin: 30px 0 8px; }
.hp-prose h4 { color: var(--ink); font-weight: 500; font-size: 16px; margin: 22px 0 6px; }
.hp-prose p { margin: 0 0 14px; }
.hp-prose ul, .hp-prose ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 6px; }
.hp-prose strong { color: var(--ink); font-weight: 500; }
.hp-hint { font-size: 13px; margin: 0; }
.hp-cat-row { display: grid; grid-template-columns: 1fr 1fr 70px auto; gap: 6px; }
.hp-cat-row input { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); min-width: 0; }
.hp-cat-del { margin-top: -10px; }
@media (max-width: 700px) { .hp-cat-row { grid-template-columns: 1fr 1fr; } .pj-head-prog { align-items: flex-start; } }

/* ===== module: inbox ===== */
.ib-list { list-style: none; margin: 0; padding: 0; }
.ib-row { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px clamp(14px, 2vw, 22px); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-2); transition: background .2s; }
.ib-list li:last-child .ib-row { border-bottom: 0; }
.ib-row:hover { background: var(--hover); }
.ib-row b { font-weight: 400; color: var(--ink); }
.ib-unread b { font-weight: 600; }
.ib-unread { box-shadow: inset 2px 0 0 var(--ink); }
.ib-who, .ib-sub { display: grid; gap: 2px; min-width: 0; }
.ib-who > *, .ib-sub > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-meta { display: grid; justify-items: end; gap: 6px; white-space: nowrap; }
.ib-meta > span { display: flex; gap: 6px; align-items: center; }
@media (max-width: 760px) { .ib-row { grid-template-columns: 1fr; gap: 6px; } .ib-meta { justify-items: start; } }
.ib-thread { align-content: start; }
.ib-msg { max-width: none; display: grid; gap: 8px; background: var(--panel); }
.ib-msg.ib-out { background: var(--bg-2); border-color: var(--line-2); margin-left: clamp(0px, 6vw, 72px); }
.ib-msg-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.ib-msg-h b { font-weight: 500; }
.ib-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; }
.ib-vars code, .au-known code { font: 12px var(--mono); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); display: inline-block; margin: 0 4px 4px 0; }
.ib-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
.ib-col, .au-col { display: grid; gap: 20px; align-content: start; }
.ib-sched { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.ib-send { justify-content: flex-start; }
.mono-h { font-family: var(--mono) !important; font-size: clamp(20px, 2.4vw, 28px) !important; letter-spacing: 0 !important; }
.tbl td form { display: inline; }
/* campaign preview: same structure as the real email, drawn with the theme tokens */
.ib-mail { background: var(--bg); padding: 22px clamp(14px, 3vw, 28px); border-radius: 0 0 var(--r) var(--r); display: grid; gap: 14px; }
.ib-mark { margin: 0; font-size: 18px; letter-spacing: -.04em; color: var(--ink-3); }
.ib-mark b { color: var(--ink); font-weight: 600; }
.ib-mail-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px; display: grid; gap: 12px; }
.ib-mail-card h4 { margin: 0 0 6px; font-weight: 400; font-size: 21px; letter-spacing: -.03em; }
.ib-mail-card p { margin: 0; font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; }
.ib-mail-btn { justify-self: start; margin-top: 6px; padding: 11px 18px; border-radius: 4px; background: var(--fill); color: var(--fill-ink); font-weight: 600; font-size: 13.5px; }
.ib-mail-foot { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; line-height: 1.6; }

/* ===== module: automations ===== */
.au-form { display: grid; gap: 20px; }
.au-cond { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
.au-cond input, .au-cond select, .au-step-h select, .au-date input { height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); min-width: 0; }
@media (max-width: 700px) { .au-cond { grid-template-columns: 1fr; } }
.au-steps { display: grid; gap: 12px; }
.au-steps > h3 { margin: 8px 0 0; }
.au-vars { margin: 0; font-size: 13px; }
.au-step { border: 1px solid var(--line); margin: 0; min-width: 0; }
.au-step[hidden] { display: none; }
.au-step-h { display: flex; align-items: center; gap: 12px; }
.au-step-h select { flex: 1; max-width: 340px; }
.au-js .au-f { display: none; }
.au-js .au-step[data-type="email"] .au-f[data-for="email"],
.au-js .au-step[data-type="notify"] .au-f[data-for="notify"],
.au-js .au-step[data-type="webhook"] .au-f[data-for="webhook"],
.au-js .au-step[data-type="wait"] .au-f[data-for="wait"] { display: grid; }
.au-js .au-step[data-type=""] { opacity: .7; }
.au-runs { list-style: none; margin: 0; padding: 0; }
.au-runs > li { border-bottom: 1px solid var(--line); padding: 12px clamp(14px, 2vw, 22px); }
.au-runs > li:last-child { border-bottom: 0; }
.au-runs summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.au-log { margin: 10px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.au-log li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.au-data summary { cursor: pointer; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.au-data pre, .au-pre { margin: 8px 0 0; padding: 12px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font: 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.au-known { margin: 0; font-size: 12px; }
.au-secret summary { list-style: none; width: max-content; }
.au-secret summary::-webkit-details-marker { display: none; }
.au-code { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font: 12.5px var(--mono); overflow-wrap: anywhere; user-select: all; }
.au-date { display: inline-flex; align-items: center; gap: 6px; }
.mono-in { font: 13px/1.5 var(--mono) !important; }

/* ===== module: appointments ===== */
.ap-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.ap-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ap-day { display: grid; gap: 8px; align-content: start; min-height: 220px; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.ap-day.today { border-color: var(--ink-3); box-shadow: inset 0 2px 0 var(--ink); }
.ap-day-h { margin: 0 0 4px; color: var(--ink-2); }
.ap-none { font-size: 12.5px; margin: 0; }
.ap-ev { display: grid; gap: 3px; padding: 9px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; font-size: 13px; min-width: 0; }
.ap-ev:hover { border-color: var(--line-2); }
.ap-ev b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-ev small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-ev .mono { font-size: 10.5px; color: var(--ink-2); }
.ap-ev.ap-done { opacity: .65; }
.ap-ev.ap-no_show { border-style: dashed; }
@media (max-width: 1100px) { .ap-week { grid-template-columns: 1fr; } .ap-day { min-height: 0; } }
.ap-qa { display: grid; gap: 4px; }
.ap-qa p { margin: 0; white-space: pre-wrap; }
.ap-note { margin: 0; white-space: pre-wrap; }
.ap-hint { padding: 12px 14px; margin: 0; border-top: 1px solid var(--line); }
.ap-hours { display: grid; gap: 10px; }
.ap-hour { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.ap-hour input { height: 42px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--mono); min-width: 0; }
.ap-hour span { color: var(--ink-2); }
@media (max-width: 600px) { .ap-hour { grid-template-columns: 1fr; gap: 6px; } }
.ap-off, .ap-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ap-off li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ap-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.ap-item:last-child { border-bottom: 0; }
.ap-item p { margin: 2px 0; }

/* public booking pages (/book): same language as the sign-in pages */
.bk { min-height: 100vh; }
.bk-grid { min-height: 100vh; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.bk-art { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #07070A; color: #F4F4F6; padding: 32px clamp(24px, 4vw, 56px) 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.bk-art .brand { color: #F4F4F6; }
.bk-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bk-lang { display: flex; gap: 2px; }
.bk-lang a { color: #8E8E96; text-decoration: none; padding: 6px 8px; border-radius: 4px; }
.bk-lang a.on, .bk-lang a:hover { color: #F4F4F6; background: rgba(255,255,255,.07); }
/* the orb takes the free height between the top bar and the claim, so a long title or description never runs under it */
.bk-orb { position: relative; flex: 1 1 0; min-height: 0; width: 100%; max-height: min(44vh, 400px); object-fit: contain; object-position: 6% 50%; transform: scaleX(-1); opacity: .9; pointer-events: none; }
.bk-claim { position: relative; display: grid; gap: 18px; max-width: 34ch; }
.bk-claim .display { font-size: clamp(44px, 5.4vw, 84px); }
.bk-claim .bk-h { font-size: clamp(38px, 4.4vw, 68px); }
.bk-claim .display em { background: linear-gradient(100deg, #FFFFFF 0%, #CFCFD4 55%, #8E8E96 100%); -webkit-background-clip: text; background-clip: text; }
.bk-k { color: #8E8E96; margin: 0; }
.bk-lead { color: #A8A8AE; font-size: 16.5px; margin: 0; max-width: 46ch; white-space: pre-line; }
.bk-back { color: #8E8E96; text-decoration: none; }
.bk-back:hover { color: #F4F4F6; }
.bk-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; }
.bk-facts li { padding: 7px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; color: #CFCFD4; }
.bk-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px clamp(16px, 4vw, 56px); gap: 30px; min-width: 0; }
.bk-box { width: 100%; max-width: 560px; display: grid; gap: 22px; min-width: 0; }
.bk-box > * { min-width: 0; }
.bk-box > .mono, .bk-form > .mono { margin: 0; }
.bk-legal { margin: 0; text-align: center; }
.bk-legal a { text-decoration: none; }
.bk-empty { display: grid; gap: 16px; justify-items: start; color: var(--ink-2); }
.bk-types { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bk-type { position: relative; display: grid; gap: 6px; padding: 22px 56px 22px 22px; border: 1px solid var(--line-2); border-radius: 6px; text-decoration: none; background: var(--panel); transition: border-color .25s, transform .5s var(--ease); }
.bk-type:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.bk-type-h { font-weight: 300; font-size: 24px; letter-spacing: -.03em; }
.bk-type-d { color: var(--ink-2); font-size: 14.5px; }
.bk-type-go { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 20px; transition: transform .4s var(--ease); }
.bk-type:hover .bk-type-go { transform: translate(4px, -50%); }
.bk-step { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.bk-step .mono { margin: 0; }
.bk-tz { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-cal { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 14px; }
.bk-cal-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.bk-cal-h b { font-weight: 400; font-size: 17px; letter-spacing: -.02em; text-transform: capitalize; }
.bk-cal-h .off { opacity: .3; cursor: default; }
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-dh { text-align: center; color: var(--ink-3); padding: 6px 0; font-size: 10.5px; }
.bk-d { display: grid; place-items: center; height: 46px; border-radius: 4px; font-size: 14px; color: var(--ink-3); text-decoration: none; font-variant-numeric: tabular-nums; position: relative; }
.bk-d.out { visibility: hidden; }
.bk-d.bk-on { color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); font-weight: 500; transition: border-color .2s, background .2s; }
.bk-d.bk-on:hover { border-color: var(--ink-2); }
.bk-d.sel { background: var(--fill); color: var(--fill-ink); border-color: var(--fill); }
.bk-d.today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.bk-times { display: grid; gap: 12px; }
.bk-times .mono { margin: 0; }
.bk-none { margin: 0; padding: 14px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--ink-2); }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.bk-slot { display: grid; place-items: center; height: 44px; border: 1px solid var(--line-2); border-radius: 4px; text-decoration: none; font: 500 14px var(--sans); font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s; }
.bk-slot:hover { border-color: var(--ink-2); background: var(--hover); }
.bk-slot.sel { background: var(--fill); color: var(--fill-ink); border-color: var(--fill); }
.bk-form { padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.bk-sel { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.bk-sel span { display: grid; gap: 4px; }
.bk-sel b { font-weight: 500; }
.bk-form .field > span em { font-style: normal; text-transform: none; letter-spacing: 0; }
.bk-consent { align-items: flex-start; color: var(--ink-2); font-size: 13.5px; }
.bk-consent input { margin-top: 2px; flex: none; }
.bk-form .btn-fill { width: 100%; }
.bk-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bk-kv { grid-template-columns: 110px 1fr; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-cancel summary { cursor: pointer; color: var(--ink-2); padding: 8px 0; }
.bk-cancel[open] summary { margin-bottom: 12px; }
.bk-acc { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r, 10px); background: var(--surface, transparent); }
.bk-acc h2 { font-size: 20px; font-weight: 400; letter-spacing: -.02em; margin: 6px 0 6px; }
.bk-acc p.dim { margin: 0 0 16px; }
.bk-acc:target { border-color: var(--ink-2); }
.bk-acc-has { margin-top: 24px; }
@media (max-width: 900px) {
  .bk-grid { grid-template-columns: minmax(0, 1fr); }
  .bk-art { position: relative; height: auto; min-height: 0; padding: 22px 16px 30px; }
  .bk-orb { position: absolute; flex: none; width: 130px; height: auto; max-height: none; right: 4%; top: 70px; opacity: .3; }
  .bk-claim { max-width: none; }
  .bk-claim .display, .bk-claim .bk-h { font-size: 40px; }
  .bk-panel { padding: 28px 16px 40px; justify-content: flex-start; }
  .bk-kv { grid-template-columns: 1fr; gap: 4px; }
}

/* ===== module: support ===== */
.sp-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.sp-thread .msg { max-width: min(72ch, 100%); }
.sp-thread .sp-team:not(.mine) { border-color: var(--line-2); }
.sp-thread .sp-internal { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--ink); justify-self: stretch; max-width: none; }
.sp-mh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.sp-mh b { font-weight: 500; }
.sp-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.sp-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.sp-files a { text-underline-offset: 3px; }
.msg.mine .sp-files small, .msg.mine .sp-files a { color: inherit; }
.sp-rate-h { margin: 0; font-weight: 300; font-size: 22px; letter-spacing: -.03em; }
.sp-stars { display: flex; gap: 6px; }
.sp-stars label { cursor: pointer; }
.sp-stars input { position: absolute; opacity: 0; pointer-events: none; }
.sp-stars span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 4px; border: 1px solid var(--line-2); font: 500 15px var(--mono); }
.sp-stars input:checked + span { background: var(--fill); color: var(--fill-ink); border-color: var(--fill); }
.sp-stars input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.sp-canned { list-style: none; margin: 0; padding: 0; }
.sp-canned li { display: flex; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.sp-canned li:last-child { border-bottom: 0; }
.sp-canned p { margin: 4px 0 0; font-size: 13.5px; }

/* ===== module: chat ===== */
.ch-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.ch-side { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-conv { position: relative; display: grid; gap: 3px; padding: 12px 44px 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.ch-conv:hover, .ch-conv.on { background: var(--hover); }
.ch-conv.on { box-shadow: inset 2px 0 0 var(--ink); }
.ch-conv-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ch-conv-h b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-conv-h small { font-size: 10px; white-space: nowrap; }
.ch-conv-l { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-conv.unread .ch-conv-l { color: var(--ink); }
.ch-badge { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fill); color: var(--fill-ink); font: 500 11px/20px var(--mono); text-align: center; }
.ch-badge[hidden] { display: none; }
.ch-main { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 460px; }
.ch-live { color: var(--ok); }
.ch-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px clamp(14px, 2vw, 22px); }
.ch-empty { margin: auto; text-align: center; max-width: 40ch; }
.ch-msg { position: relative; align-self: flex-start; max-width: min(64ch, 86%); }
.ch-msg.mine { align-self: flex-end; }
.ch-mh { font-size: 12.5px; margin-bottom: 4px; color: var(--ink-2); }
.ch-mh b { font-weight: 500; }
.ch-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-deleted { opacity: .55; }
.ch-meta { display: block; margin-top: 6px; opacity: .65; font-size: 11.5px; }
.ch-edit { margin-top: 6px; font-size: 12px; }
.ch-edit summary { cursor: pointer; opacity: .7; list-style: none; display: inline; }
.ch-edit summary::-webkit-details-marker { display: none; }
.ch-edit-f { display: grid; gap: 6px; margin-top: 6px; }
.ch-edit-f textarea { width: 100%; min-width: 220px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 14px var(--sans); }
.ch-del { display: inline; }
.ch-del button { border: 0; background: none; color: inherit; opacity: .6; font: 12px var(--sans); cursor: pointer; padding: 0; margin-left: 10px; }
.ch-del button:hover, .ch-edit summary:hover { opacity: 1; text-decoration: underline; }
.ch-compose { position: relative; border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; }
.ch-bar { display: flex; align-items: flex-end; gap: 6px; padding: 4px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--bg-2); transition: border-color .15s, background .15s; }
.ch-bar:focus-within { border-color: var(--ink-3); background: var(--panel); }
.ch-compose textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 200px; resize: none; padding: 8px 6px; border: 0; background: transparent; color: var(--ink); font: 15px/1.4 var(--sans); }
.ch-compose textarea:focus, .ch-compose textarea:focus-visible { outline: none; box-shadow: none; }
.ch-compose textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
.ch-ib, .ch-send { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--ink-2); border: 0; background: none; padding: 0; }
.ch-ib:hover { background: var(--hover); color: var(--ink); }
.ch-ib:focus-within { outline: 2px solid var(--focus, var(--ink-3)); outline-offset: 1px; }
.ch-ib .ic, .ch-send .ic { width: 21px; height: 21px; }
.ch-send { background: var(--fill); color: var(--fill-ink); transition: opacity .15s, transform .15s; }
.ch-send:disabled { opacity: .3; cursor: default; transform: scale(.92); }
.is-sending .ch-send { opacity: .5; }
.ch-hint { margin: 0 6px; font-size: 10.5px; text-transform: none; letter-spacing: 0; }
.ch-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.ch-chips[hidden] { display: none; }
.ch-chip { position: relative; flex: none; display: flex; align-items: center; gap: 8px; width: 220px; max-width: 70vw; padding: 6px 4px 6px 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); overflow: hidden; }
.ch-chip img, .ch-chip-ic { flex: none; width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--bg-2); }
.ch-chip-ic { position: relative; display: grid; place-items: center; color: var(--ink-2); }
.ch-chip-ic .ic { width: 22px; height: 22px; margin-top: -8px; }
.ch-chip-ic b, .att-ic b { position: absolute; bottom: 5px; left: 0; right: 0; text-align: center; font: 500 8.5px/1 var(--mono); letter-spacing: .04em; }
.ch-chip-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ch-chip-t b { font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-chip-t small { font: 11px var(--mono); color: var(--ink-3); }
.ch-chip-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; padding: 0; }
.ch-chip-x:hover { background: var(--hover); color: var(--ink); }
.ch-chip-x .ic { width: 18px; height: 18px; }
.ch-chip-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.is-sending .ch-chip-x { visibility: hidden; }
.ch-drop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.ch-drop[hidden] { display: none; }
.ch-drop span { display: grid; justify-items: center; gap: 10px; padding: 34px 44px; border: 1.5px dashed var(--ink-3); border-radius: 20px; background: var(--panel); color: var(--ink); }
.ch-drop .ic { width: 34px; height: 34px; }
.ch-drop b { font-weight: 500; }
.ch-err { margin: 0; }
.ch-ro { padding: 14px 18px; margin: 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .ch-wrap { grid-template-columns: 1fr; }
  .ch-side { position: static; max-height: 220px; }
  .ch-main { height: calc(100vh - 120px); }
  .ch-msg { max-width: 92%; }
}

/* attachments in chat bubbles and ticket messages (templates/partials/attachments.html) */
.att { display: grid; gap: 6px; margin-top: 8px; width: 320px; max-width: 100%; }
.ch-body + .att, .sp-body + .att { margin-top: 8px; }
.ch-msg .ch-mh + .att, .ch-msg > .att:first-child { margin-top: 0; }
.ch-media-only { padding: 4px; }
.ch-media-only .ch-mh { padding: 4px 8px 0; }
.ch-media-only .ch-meta, .ch-media-only .ch-edit, .ch-media-only .ch-del { margin-left: 8px; margin-bottom: 4px; }
.ch-media-only .att { margin-top: 0; }
.att-grid { display: grid; gap: 3px; border-radius: 12px; overflow: hidden; }
.att-n2, .att-n4 { grid-template-columns: 1fr 1fr; }
.att-n3 { grid-template-columns: 1fr 1fr; }
.att-n3 > :first-child { grid-column: 1 / -1; }
.att-img { display: block; position: relative; background: var(--bg-2); line-height: 0; cursor: zoom-in; }
.att-img img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.att-n2 .att-img img, .att-n4 .att-img img, .att-n3 .att-img:not(:first-child) img { aspect-ratio: 1; height: 100%; }
.att-n3 .att-img:first-child img { aspect-ratio: 16 / 10; height: 100%; }
.att-img:hover img { filter: brightness(.94); }
.att-img:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.att-vid { display: block; width: 100%; max-height: 360px; background: #000; }
.att-n2 .att-vid, .att-n3 .att-vid, .att-n4 .att-vid { aspect-ratio: 1; height: 100%; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.ch-msg.mine .att-file { background: color-mix(in srgb, var(--fill-ink) 12%, transparent); border-color: color-mix(in srgb, var(--fill-ink) 18%, transparent); color: var(--fill-ink); }
.att-fa { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.att-ic { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 48px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); }
.att-ic .ic { width: 22px; height: 22px; margin-top: -9px; }
.att-pdf .att-ic { background: color-mix(in srgb, var(--err) 12%, var(--panel)); color: var(--err); }
.ch-msg.mine .att-ic { background: color-mix(in srgb, var(--fill-ink) 14%, transparent); color: inherit; }
.att-fn { min-width: 0; display: grid; gap: 3px; }
.att-fn b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-fn small { display: block; margin: 0; font: 11px var(--mono); opacity: .65; }
.att-fa:hover b { text-decoration: underline; text-underline-offset: 3px; }
.att-dl { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: inherit; opacity: .7; }
.att-dl:hover { opacity: 1; background: var(--hover); }
.att-dl .ic { width: 19px; height: 19px; }
.att-audio { display: grid; gap: 4px; }
.att-audio audio { width: 100%; height: 40px; }
.att-an { margin: 0 4px; font-size: 11.5px; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* image viewer */
dialog.lb { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 6, 9, .94); color: #F4F4F6; display: none; }
dialog.lb[open] { display: grid; grid-template-rows: auto 1fr; }
dialog.lb::backdrop { background: rgba(0, 0, 0, .6); }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-width: 0; }
.lb-name { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { font-size: 12px; opacity: .6; }
.lb-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: inherit; cursor: pointer; padding: 0; }
.lb-btn:hover { background: rgba(255, 255, 255, .16); }
.lb-btn .ic, .lb-nav .ic { width: 22px; height: 22px; }
.lb-img { grid-row: 2; justify-self: center; align-self: center; max-width: calc(100vw - 24px); max-height: calc(100dvh - 90px); object-fit: contain; border-radius: 6px; user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #F4F4F6; cursor: pointer; padding: 0; }
.lb-nav:hover { background: rgba(255, 255, 255, .2); }
.lb-nav[hidden] { display: none; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
@media (max-width: 600px) {
  .ch-hint { display: none; }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
  .att { width: 280px; }
}

/* ===== module: notifications ===== */
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.nt-item:last-child { border-bottom: 0; }
.nt-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.nt-unread .nt-dot { background: var(--ink); }
.nt-main { display: grid; gap: 3px; min-width: 0; }
.nt-title { font-weight: 400; text-decoration: none; }
.nt-unread .nt-title { font-weight: 500; }
a.nt-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.nt-body { margin: 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.nt-main small { text-transform: none; letter-spacing: .02em; }
.nt-act { display: flex; gap: 4px; }
.nt-bell { position: relative; }
.nt-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--fill); color: var(--fill-ink); font: 500 10px/18px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.nt-badge[hidden] { display: none; }
.nt-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.nt-toast { display: grid; gap: 4px; padding: 14px 16px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.25); text-decoration: none; font-size: 14px; animation: nt-in .5s var(--ease); transition: opacity .5s, transform .5s var(--ease); }
.nt-toast b { font-weight: 500; }
.nt-toast span { color: var(--ink-2); font-size: 13px; }
.nt-toast.out { opacity: 0; transform: translateY(8px); }
@keyframes nt-in { from { opacity: 0; transform: translateY(10px); } }

/* ===== module: billing ===== */
.bl-filters { flex-wrap: wrap; }
.bl-stat { font-size: 24px; }
.bl-narrow { max-width: 640px; }
.bl-main, .bl-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.bl-actions { display: grid; gap: 8px; }
.bl-actions form { display: grid; }
.bl-actions .btn { width: 100%; }
.bl-paper { padding: clamp(18px, 3vw, 36px); display: grid; gap: 26px; }
.bl-paper-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: flex-start; }
.bl-who { display: grid; gap: 6px; }
.bl-num { margin: 0; font-weight: 300; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.bl-title { margin: 0; color: var(--ink-2); font-size: 16px; }
.bl-meta { grid-template-columns: auto auto; }
.bl-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.bl-party { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.bl-party b { color: var(--ink); font-weight: 500; }
.bl-lines .bl-desc-cell { white-space: pre-line; min-width: 220px; }
.bl-lines tbody + tbody { border-top: 1px solid var(--line); }
.bl-sec-row td { font-weight: 500; padding-top: 18px; border-bottom: 1px solid var(--ink-3); }
.bl-sub-row td { color: var(--ink-2); font-size: 13px; }
.bl-disc { display: block; color: var(--ink-3); font-size: 11.5px; }
.bl-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; margin: 0 0 0 auto; width: min(420px, 100%); font-size: 14px; }
.bl-totals dt { color: var(--ink-2); }
.bl-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-totals .bl-strong { color: var(--ink); font-weight: 500; font-size: 16px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.bl-note .bl-np { display: block; margin: 0 0 12px; }
.bl-note .bl-np:last-child { margin-bottom: 0; }
.bl-note strong { color: var(--ink); font-weight: 600; }
.bl-note a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.bl-note p:last-child { margin: 6px 0 0; white-space: pre-line; color: var(--ink-2); font-size: 14px; }
.bl-decision { margin: 0; padding: 12px 14px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); text-transform: none; letter-spacing: 0; }
.bl-pre { margin: 0; white-space: pre-line; font-size: 14px; color: var(--ink-2); }
.bl-link { width: 100%; height: 38px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); font: 12px var(--mono); }
.bl-refuse { border-top: 1px solid var(--line); }
.bl-side .stat-v { margin: 0; }
/* editor */
.bl-editor { display: grid; gap: 20px; }
.bl-ed td { padding: 6px 6px; vertical-align: top; }
.bl-ed th { padding: 10px 6px; }
.bl-in { width: 100%; min-width: 0; height: 38px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); }
.bl-in:focus { outline: none; border-color: var(--ink-2); background: var(--panel); }
textarea.bl-in { height: 38px; min-height: 38px; padding: 9px; resize: vertical; line-height: 1.35; overflow: hidden; }
.bl-in-desc { min-width: 260px; }
.bl-in-n { width: 96px; text-align: right; }
.bl-in-s { width: 64px; text-align: right; }
.bl-in-u { width: 64px; }
.bl-in-sec { font-weight: 500; background: transparent; border-color: var(--line-2); }
.bl-r-sec td { background: var(--hover); }
.bl-c-move { width: 30px; white-space: nowrap; }
.bl-mv, .bl-x { display: inline-grid; place-items: center; width: 22px; height: 18px; padding: 0; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 13px; line-height: 1; }
.bl-x { width: 30px; height: 38px; font-size: 18px; }
.bl-mv:hover, .bl-x:hover { color: var(--ink); }
.bl-lt { padding-top: 15px !important; color: var(--ink-2); }
.bl-lib { height: 36px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 13px var(--sans); max-width: 260px; }
.bl-live-wrap { border-top: 1px solid var(--line); }
.bl-live-note { margin: 0; font-size: 12.5px; }
.bl-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 40%); }
/* public pages (quote / invoice link, signing page) */
.pub { min-height: 100vh; display: flex; flex-direction: column; }
.pub-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 64px; padding: 0 clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line); background: var(--panel); }
.pub-main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(20px, 4vw, 44px) clamp(16px, 3vw, 36px) 60px; display: grid; gap: 24px; align-content: start; }
.pub-foot { display: flex; gap: 18px; justify-content: center; padding: 22px; border-top: 1px solid var(--line); }
.pub-foot a { text-decoration: none; }

/* ===== module: contracts ===== */
.ct-doc { min-width: 0; }
.ct-body { gap: 0; max-width: 78ch; }
.ct-body h3 { margin: 22px 0 8px; font-weight: 500; font-size: 17px; letter-spacing: -.015em; }
.ct-body h3:first-child { margin-top: 0; }
.ct-body p { margin: 0 0 12px; white-space: pre-line; color: var(--ink-2); line-height: 1.65; }
.ct-hash { border-top: 1px solid var(--line); text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; font-size: 11px; }
.ct-signers { list-style: none; margin: 0; padding: 0; }
.ct-signers li { display: grid; gap: 6px; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.ct-signers li:last-child { border-bottom: 0; }
.ct-sg-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ct-sg-h b { font-weight: 500; font-size: 14px; }
.ct-sig { width: 180px; max-width: 100%; aspect-ratio: 3 / 1; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.ct-editor { font: 14px/1.6 var(--mono) !important; min-height: 420px !important; }
.ct-vars { margin: 0; font-size: 12.5px; line-height: 2; }
.ct-vars code { font: 11.5px var(--mono); padding: 2px 6px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); white-space: nowrap; }
.ct-pad-wrap { border: 1px dashed var(--line-2); border-radius: 8px; background: var(--bg-2); }
.ct-pad { display: block; width: 100%; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.ct-pad-err { margin: 0; }

/* ===== module: dashboard, reports ===== */
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .db-grid { grid-template-columns: 1fr; } }
.db-main, .db-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.db-kpi { text-decoration: none; color: inherit; transition: border-color .25s, transform .5s var(--ease); }
.db-kpi:hover { border-color: var(--line-2); transform: translateY(-2px); }
.db-kpi-v { display: grid; gap: 2px; }
.db-kpi .stat-v.db-kpi-multi { font-size: 23px; }
.db-kpi-s { color: var(--ink-3); font-size: 13px; }
.db-group { border-bottom: 1px solid var(--line); }
.db-group:last-child { border-bottom: 0; }
.db-group-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px clamp(16px, 2vw, 24px) 4px; }
.db-group-h p { margin: 0; color: var(--ink-2); }
.db-more { text-decoration: none; white-space: nowrap; }
.db-more:hover { color: var(--ink); }
.db-list { list-style: none; margin: 0; padding: 0 0 10px; }
.db-list-pad { padding: 8px 0; }
.db-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px clamp(16px, 2vw, 24px); text-decoration: none; transition: background .2s; }
.db-row:hover { background: var(--hover); }
.db-row-t { display: grid; gap: 2px; min-width: 0; }
.db-row-t b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-row-t small { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-row .badge { flex: none; }
.db-empty { padding: 40px 20px; }
.db-empty p { margin: 0; max-width: 46ch; }
.db-none { margin: 0; padding: 18px clamp(16px, 2vw, 24px); color: var(--ink-3); font-size: 14px; }
.db-actions { display: grid; gap: 8px; padding: clamp(16px, 2vw, 24px); }
.db-actions .btn { justify-content: space-between; }
.db-tl { padding: 18px clamp(16px, 2vw, 24px); }
.db-tl a { text-decoration: none; font-weight: 500; }
.db-tl a:hover { text-decoration: underline; }
.db-sec { display: grid; gap: 12px; }
.db-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.db-sec-h p { margin: 0; }
.rp-period { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.rp-custom { gap: 10px; }
.rp-date { display: inline-flex; align-items: center; gap: 8px; }
.rp-date input { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 14px var(--sans); }
.rp-range { margin: 0 0 0 auto; }
.rp-h { display: grid; gap: 4px; min-width: 0; }
.rp-h p { margin: 0; font-size: 13px; }
.rp-ha { display: flex; align-items: center; gap: 10px; flex: none; }
.rp-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px 28px; padding: 20px clamp(16px, 2vw, 24px) 6px; border-bottom: 1px solid var(--line); }
.rp-chart { margin: 0; display: grid; gap: 10px; min-width: 0; }
.rp-svg { display: block; width: 100%; height: auto; max-height: 240px; }
.rp-chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.rp-legend { display: inline-flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.rp-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rp-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.rp-a { fill: var(--ink); } .rp-key.rp-a { background: var(--ink); }
.rp-b { fill: var(--ink-3); opacity: .55; } .rp-key.rp-b { background: var(--ink-3); opacity: .55; }
.rp-ok { fill: var(--ok); } .rp-key.rp-ok { background: var(--ok); }
.rp-bad { fill: var(--err); } .rp-key.rp-bad { background: var(--err); }
.rp-svg rect { transition: opacity .2s; }
.rp-svg rect:hover { opacity: .75; }
.rp-axis { stroke: var(--line-2); stroke-width: 1; }
.rp-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.rp-t { fill: var(--ink-3); font: 10px var(--mono); letter-spacing: .02em; }
.rp-tbl td.rp-total { font-weight: 500; border-top: 1px solid var(--line-2); }
.rp-good { color: var(--ok); }
.rp-badt { color: var(--err); }
.rp-charts.rp-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr)); }

/* ===== module: settings integrations ===== */
.int-ph { margin-top: 28px; }
.int-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
.int-card { min-width: 0; scroll-margin-top: 80px; }
.int-help { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.int-result { margin: 0; overflow-wrap: anywhere; }
.int-hook { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); }
.int-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
.int-copy code, .int-events code { font: 12.5px/1.4 var(--mono); overflow-wrap: anywhere; color: var(--ink); }
.int-copy code { flex: 1; min-width: 0; }
.int-copy .btn { flex: none; }
.int-events { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.int-form { display: grid; gap: 14px; }
.int-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.int-fields[disabled] input, .int-fields[disabled] select { opacity: .7; cursor: not-allowed; }
.int-lab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.int-lab > span { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.int-src { font: 500 10px/1 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 4px 7px; border-radius: 999px; background: var(--hover); white-space: nowrap; }
.int-src.badge-ok { background: var(--ok-bg); color: var(--ok); }
.int-src.badge-ink { background: var(--hover); color: var(--ink-2); border: 1px solid var(--line-2); }
.int-secret { display: flex; gap: 8px; align-items: center; min-width: 0; }
.int-secret > .pw, .int-secret > input { flex: 1; min-width: 0; }
.int-secret .btn { flex: none; height: 46px; }
.int-clear { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.int-clear input { width: 16px; height: 16px; accent-color: var(--ink); }
.int-test { display: flex; justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--line); }
.int-test .btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 1100px) { .int-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .int-grid .fgrid { grid-template-columns: minmax(0, 1fr); }
  .int-copy { flex-wrap: wrap; }
}

/* ===== responsive safety net (audit 2026-10-06) =====
   A grid track grows to its widest child by default: a long table or a row of buttons pushed the whole page
   wider than the phone. Tracks may now shrink, and wide content scrolls inside its own box. */
.page { grid-template-columns: minmax(0, 1fr); }
.page > *, .card, .card-b, .split > *, .grid2 > *, .fgrid > *, .ph-t, .ph-a { min-width: 0; }
.ph-a { max-width: 100%; }
.lead, .ph-t h2, .card-h h3 { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  table.tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl th, table.tbl td { white-space: nowrap; }
  .ph { align-items: flex-start; }
  .ph-a { width: 100%; }
  .ph-a .btn { flex: 1 1 auto; }
  .toolbar > * { max-width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* ===== module: referrals, diagnostics, sitechat ===== */
.rf-hero .card-b { gap: 10px; }
.rf-copy { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.rf-input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--mono); }
.rf-input-sm { height: 36px; font-size: 12.5px; }
.rf-small { margin: 0 0 6px; font-size: 13px; }
.rf-share { display: flex; flex-wrap: wrap; gap: 8px; }
.rf-rule { display: grid; gap: 4px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.rf-rule p { margin: 0; font-size: 16px; }
.rf-rules-line { margin: -16px 0 0; }
.rf-radio { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rf-col, .dg-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.rf-act { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rf-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.rf-inline .field { flex: 1; min-width: 140px; }
.rf-inline .rf-input { flex: 1; min-width: 160px; }
.rf-iban { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.rf-stats .stat-v { overflow-wrap: anywhere; font-size: 26px; }
@media (max-width: 520px) { .rf-copy { flex-direction: column; } .rf-copy .btn { width: 100%; } }

.dg-bar { margin-top: 6px; max-width: 220px; height: 4px; }
.dg-bar-lg { max-width: none; height: 4px; margin-top: -18px; }
.dg-w0 { width: 0; } .dg-w1 { width: 10%; } .dg-w2 { width: 20%; } .dg-w3 { width: 30%; } .dg-w4 { width: 40%; } .dg-w5 { width: 50%; }
.dg-w6 { width: 60%; } .dg-w7 { width: 70%; } .dg-w8 { width: 80%; } .dg-w9 { width: 90%; } .dg-w10 { width: 100%; }
.dg-weeks { list-style: none; margin: 0; padding: 0; }
.dg-week { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.dg-week:last-child { border-bottom: 0; }
.dg-week.now { box-shadow: inset 2px 0 0 var(--ink); background: var(--hover); }
.dg-week-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.dg-week-t b { font-weight: 500; }
.dg-week-t small { width: 100%; font-size: 12.5px; }
.dg-week-a { display: flex; align-items: center; gap: 10px; }
.dg-glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dg-g { display: grid; gap: 4px; padding: 16px 20px; border-right: 1px solid var(--line); }
.dg-g:last-child { border-right: 0; }
.dg-g-critical .stat-v { color: var(--err); } .dg-g-high .stat-v { color: var(--warn); }
@media (max-width: 600px) { .dg-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dg-g:nth-child(2) { border-right: 0; } .dg-g:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.dg-reports { display: grid; gap: 14px; }
.dg-h { margin: 6px 0 0; font-weight: 300; font-size: 24px; letter-spacing: -.03em; }
.dg-report { scroll-margin-top: 80px; }
.dg-report .card-h { flex-wrap: wrap; }
.dg-findings { list-style: none; margin: 0; padding: 0; display: grid; }
.dg-findings li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dg-findings li:last-child { border-bottom: 0; }
.dg-findings-edit li { padding: 12px clamp(16px, 2vw, 24px); }
.dg-findings b { font-weight: 500; }
.dg-findings p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.dg-findings .badge { justify-self: start; }
.dg-reco .mono { color: var(--ink-3); margin-right: 4px; }
@media (max-width: 600px) { .dg-findings li { grid-template-columns: minmax(0, 1fr) auto; } .dg-findings li > .badge { grid-column: 1 / -1; } }
.dg-scope { font-size: 14px; }
.dg-status { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-add { border-top: 1px solid var(--line); }

.sc-mode { font-size: 22px; }
.sc-badge { margin-top: 6px; text-decoration: none; }
.sc-ex { max-width: 360px; }
.sc-code { margin: 0; padding: 14px 16px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font: 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.sc-role { display: block; margin-bottom: 4px; opacity: .65; font-size: 10px; }
.msg.sc-msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.msg.sc-system { color: var(--ink-2); }

/* ===== module: gcal + imap ===== */
.gc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; }
.gc-bar p { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.gc-split { align-items: start; }
.gc-disc { border-top: 1px solid var(--line); padding-top: 14px; justify-content: flex-start; }
.gc-how { margin: 0; padding-left: 18px; display: grid; gap: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.gc-members { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gc-members li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; min-width: 0; }
.gc-members .mono, .gc-bar .mono, .im-meta.mono { font-size: 12px; overflow-wrap: anywhere; text-transform: none; letter-spacing: 0; }
.im-box { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); min-width: 0; }
.im-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.im-head strong { font-weight: 500; overflow-wrap: anywhere; }
.im-meta { margin: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.im-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.im-edit { border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; }
.im-edit[open] { padding-bottom: 14px; }
.im-edit summary { cursor: pointer; padding: 12px 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); overflow-wrap: anywhere; }
.im-edit .int-form { margin-bottom: 10px; }
.im-empty { padding: 4px 0; }
.im-files { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.im-files a { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; font: 12px/1 var(--mono); color: var(--ink); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-files a:hover { background: var(--hover); }

/* ===== module: ops (global search, bulk actions, push, Slack) ===== */
.top-search { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; min-width: 220px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-3); font: 14px var(--sans); cursor: pointer; text-align: left; }
.top-search:hover { border-color: var(--line-2); color: var(--ink-2); }
.top-search span { flex: 1; }
.top-search kbd { font: 500 10.5px/1 var(--mono); letter-spacing: .04em; padding: 4px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-3); background: var(--panel); }
@media (max-width: 860px) { .top-search { min-width: 0; width: 38px; padding: 0; justify-content: center; } .top-search span, .top-search kbd { display: none; } }
dialog.op-sdlg { width: min(640px, calc(100vw - 24px)); margin-top: min(12vh, 96px); max-height: min(76vh, 640px); overflow: hidden; display: none; flex-direction: column; }
dialog.op-sdlg[open] { display: flex; }
.op-shead { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.op-shead input { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--ink); font: 300 18px var(--sans); letter-spacing: -.01em; }
.op-shead input:focus { outline: none; }
.op-sres { overflow-y: auto; padding: 6px 8px 10px; }
.op-shint { margin: 0; padding: 22px 10px; text-align: center; font-size: 14px; }
.op-sgroup { display: grid; gap: 2px; padding: 6px 0; }
.op-sgh { margin: 6px 10px 4px; }
.op-sitem { display: grid; gap: 2px; padding: 9px 10px; border-radius: 7px; text-decoration: none; min-width: 0; }
.op-sitem.on, .op-sitem:focus-visible { background: var(--hover); outline: none; }
.op-sitem-t { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; overflow-wrap: anywhere; }
.op-sitem small, .op-hit small { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-sall { display: block; margin: 6px 2px 0; padding: 10px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.op-sall:hover { color: var(--ink); }
.op-sform { display: flex; gap: 8px; padding: 10px; }
.op-sform input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 16px var(--sans); }
.op-count { margin: -16px 0 -18px; }
.op-hits { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.op-hit { display: grid; gap: 2px; padding: 10px 12px; border-radius: 7px; text-decoration: none; min-width: 0; }
.op-hit:hover { background: var(--hover); }
.op-hit-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 500; overflow-wrap: anywhere; }
.op-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.op-bulk-sel { display: inline-flex; align-items: center; gap: 4px; }
.op-bulk-sel[hidden] { display: none; }
.op-bulk-n { color: var(--ink); }
.op-bulk-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.op-bulk-f select { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 13px var(--sans); max-width: 100%; }
.op-bulk-f.off { opacity: .55; }
.op-bulk-x { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tbl .bulk-c { width: 36px; padding-right: 0; }
.bulk-c input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; vertical-align: middle; }
.op-kinds { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; }
.op-kinds legend { margin-bottom: 10px; }
.op-test { border-top: 1px solid var(--line); padding-top: 14px; }
.op-nowrap { white-space: nowrap; }
.op-err { overflow-wrap: anywhere; }
.field textarea.int-json { font: 12px/1.5 var(--mono); }
@media (max-width: 560px) { .op-bulk-x { margin-left: 0; } .op-sform .btn { padding: 0 14px; } }

/* ===== module: phone ===== */
a.tel-stat { text-decoration: none; transition: border-color .25s; }
a.tel-stat:hover { border-color: var(--line-2); }
.tel-bar { flex-wrap: wrap; }
.tel-log td { vertical-align: top; }
.tel-new td:first-child { box-shadow: inset 2px 0 0 var(--ink); }
.tel-dir { display: inline-block; width: 1.1em; color: var(--ink-3); font-family: var(--mono); }
.tel-who a, .tel-who span { font-weight: 500; text-decoration: none; }
.tel-who small, .tel-block { display: block; }
.tel-ex { display: block; color: var(--ink-2); font-size: 13px; max-width: 60ch; overflow-wrap: anywhere; }
.tel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.tel-col { display: grid; gap: 20px; min-width: 0; }
.tel-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.tel-audio { width: 100%; max-width: 100%; height: 40px; }
.tel-sum { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tel-sum p { margin: 0; }
.tel-items { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tel-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.tel-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tel-num { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tel-num:last-child { border-bottom: 0; padding-bottom: 0; }
.tel-hooks code { font: 12.5px var(--mono); overflow-wrap: anywhere; }
.tel-preview summary { cursor: pointer; color: var(--ink-2); }
.tel-preview pre { margin: 10px 0 0; padding: 12px; max-height: 320px; overflow: auto; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.tel-flow { display: grid; gap: 20px; }
.tel-fs { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 20px; }
.tel-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tel-hint { font-size: 13px; }
.tel-digits { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.tel-digit { display: flex; align-items: center; gap: 10px; }
.tel-digit select, .tel-day input[type=time] { height: 40px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); min-width: 0; }
.tel-digit select { flex: 1; }
.tel-key { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--line-2); font: 500 15px var(--mono); }
.tel-tz { max-width: 340px; }
.tel-days { display: grid; gap: 8px; }
.tel-day { display: grid; grid-template-columns: 150px auto 14px auto; gap: 10px; align-items: center; justify-content: start; }
.tel-checks { gap: 10px; }
.tel-rem { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tel-save { position: sticky; bottom: 12px; }
.tel-save .btn { box-shadow: var(--shadow); }
.tel-wait > i { width: 40%; animation: tel-wait 1.4s var(--ease) infinite alternate; }
@keyframes tel-wait { from { transform: translateX(-10%); } to { transform: translateX(160%); } }
.tel-count { display: block; text-align: right; }
@media (max-width: 700px) {
  .tel-pair, .tel-rem { grid-template-columns: 1fr; }
  .tel-day { grid-template-columns: 1fr auto 14px auto; }
  .tel-day input[type=time] { width: 100%; }
}

/* ===== pickers ===== */
/* closed select: today's field look + thin chevron */
.field select, select.input { cursor: pointer; }
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { display: flex; align-items: center; padding-right: 38px; }
  select::picker-icon { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
    transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); }
  select:open::picker-icon { transform: translateY(2px) rotate(-135deg); }
  selectedcontent { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  ::picker(select) { margin-top: 6px; padding: 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink);
    box-shadow: 0 12px 40px rgba(0,0,0,.18); max-height: min(320px, 50vh); overflow-y: auto; font: 15px var(--sans);
    opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .25s var(--ease), overlay .25s allow-discrete, display .25s allow-discrete; }
  ::picker(select):popover-open { opacity: 1; transform: none; }
  @starting-style { ::picker(select):popover-open { opacity: 0; transform: translateY(-4px); } }
  select option { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 6px; cursor: pointer; background: transparent; color: var(--ink); font: 400 14.5px var(--sans); }
  select option::checkmark { content: ""; order: 1; margin-left: auto; width: 5px; height: 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px); opacity: 0; }
  select option:checked { font-weight: 600; }
  select option:checked::checkmark { opacity: 1; }
  select option:hover, select option:focus-visible { background: var(--hover); outline: none; }
  select option:disabled { color: var(--ink-3); cursor: default; }
}

/* time picker (hours / minutes columns) */
.lp-tp { position: fixed; inset: auto; margin: 0; display: flex; gap: 6px; padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink);
  box-shadow: 0 12px 40px rgba(0,0,0,.2); font: 14px var(--mono); }
.lp-tp::backdrop { background: transparent; }
.lp-tcol { display: flex; flex-direction: column; gap: 2px; width: 60px; height: 232px; overflow-y: auto; scrollbar-width: none; scroll-behavior: auto; }
.lp-tcol::-webkit-scrollbar { display: none; }
.lp-tcol + .lp-tcol { padding-left: 6px; border-left: 1px solid var(--line); }
.lp-topt { flex: 0 0 34px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: 14px var(--mono); cursor: pointer; font-variant-numeric: tabular-nums; }
.lp-topt:hover { background: var(--hover); }
.lp-topt.lp-sel, .lp-topt.lp-sel:hover { background: var(--fill); color: var(--fill-ink); border-color: var(--fill); font-weight: 600; }
.lp-tp.lp-sheet { left: 0; right: 0; bottom: 0; top: auto; width: 100%; justify-content: center; border-radius: 14px 14px 0 0; border-width: 1px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.lp-tp.lp-sheet .lp-tcol { width: 42%; }
.lp-time .lp-tin { width: 96px; height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--mono); }
.tel-day .lp-tin { height: 40px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--sans); min-width: 0; }

/* date picker */
.lp-cal { position: fixed; inset: auto; margin: 0; width: 304px; padding: 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink);
  box-shadow: 0 12px 40px rgba(0,0,0,.2); font: 14px var(--sans); }
.lp-cal::backdrop { background: transparent; }
.lp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lp-title { color: var(--ink); font-weight: 500; }
.lp-nav { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; }
.lp-nav:hover { background: var(--hover); }
.lp-grid { display: grid; grid-template-columns: repeat(7, 36px); justify-content: space-between; row-gap: 2px; }
.lp-wd { display: grid; place-items: center; height: 28px; font-size: 10.5px; color: var(--ink-3); }
.lp-day { width: 36px; height: 36px; padding: 0; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--ink); font: 400 14px var(--sans); cursor: pointer; }
.lp-day:hover { background: var(--hover); }
.lp-day.lp-out { color: var(--ink-3); opacity: .55; }
.lp-day.lp-today { border-color: var(--ink-2); }
.lp-day.lp-sel, .lp-day.lp-sel:hover { background: var(--fill); color: var(--fill-ink); border-color: var(--fill); opacity: 1; font-weight: 600; }
.lp-day.lp-dis { color: var(--ink-3); text-decoration: line-through; opacity: .4; cursor: not-allowed; background: transparent; }
.lp-time { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--ink-2); }
.lp-time-in { height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px var(--mono); }
.lp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.lp-foot .btn { height: 36px; }
.lp-cal.lp-sheet { left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-width: none; border-radius: 14px 14px 0 0; border-width: 1px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.lp-sheet .lp-grid { grid-template-columns: repeat(7, 1fr); justify-items: center; }

/* appointment page: extra guests field (inline styles are blocked by the CSP) */
input[name="guests"]{width:100%;max-width:520px;display:block;margin:0 0 6px}
form[action$="/resync"],form[action$="/resend-invite"]{margin-top:8px}

/* ===== module: access ===== */
.ac-split { grid-template-columns: minmax(0, 1fr) 360px; }
.ac-list { display: grid; gap: 16px; min-width: 0; }
.ac-req .card-h h3 .dim { font-weight: 400; }
.ac-pre { white-space: pre-line; }
.ac-link { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-link input { flex: 1 1 260px; min-width: 0; font: 400 12.5px/1 var(--mono); }
.ac-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-actions form { display: inline; }
.ac-svc-actions { white-space: nowrap; text-align: right; }
.ac-svc-actions form { display: inline-block; margin: 2px 0 2px 4px; }
.ac-hist summary { cursor: pointer; }
.ac-hist .timeline { margin-top: 14px; }
.ac-opts { border: 0; margin: 0; padding: 0; gap: 12px; }
.ac-opt { align-items: flex-start; }
.ac-opt input { margin-top: 2px; flex: none; }
.ac-badges { display: flex; flex-wrap: wrap; gap: 6px; }
a.ac-stat { text-decoration: none; color: inherit; }
a.ac-stat:hover, a.ac-stat.on { border-color: var(--ink-3); background: var(--hover); }
/* public page /connect/{token} */
.ac-msg { margin: 0; padding: 14px 16px; border-left: 2px solid var(--ink-3); background: var(--hover); border-radius: 0 6px 6px 0; }
.ac-msg p { margin: 0 0 6px; white-space: pre-line; }
.ac-card { scroll-margin-top: 24px; }
.ac-state { margin: 0; }
.ac-why { margin: 0; color: var(--ink-2); }
.ac-why .mono { margin-right: 6px; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.ac-k { margin: 0; }
.ac-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink); line-height: 1.5; }
.ac-ids { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 6px; }
.ac-id { display: grid; gap: 6px; }
.ac-id-v { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ac-id-v code { font: 500 14px/1.3 var(--mono); overflow-wrap: anywhere; }
.ac-done { margin-top: 4px; }
.ac-copy-tmp { position: fixed; left: -10000px; top: 0; }
@media (max-width: 1100px) { .ac-split { grid-template-columns: 1fr; } }
/* access: automatic Google connection, public intake form, settings */
.ac-google { border-color: var(--ink-3); }
.ac-google .card-b { display: grid; gap: 12px; }
.ac-gbtn { justify-self: start; }
.ac-gnote { margin: 0; font-size: 13px; }
.ac-errs { margin: 0; padding-left: 18px; }
.ac-h4 { margin: 8px 0 0; font-weight: 500; }

/* iOS Safari zooms into any field under 16px on focus: keep every field at 16px on touch screens */
@media (pointer:coarse){input,select,textarea{font-size:16px!important}}
.ac-manual{margin-top:8px}.ac-manual summary{cursor:pointer;margin-bottom:10px}

/* access: animated walkthrough of the Google sign-in (12 s loop, 4 scenes of 3 s) */
.tuto { display: grid; gap: 12px; margin: 6px 0 2px; }
.tuto .ac-k { margin: 0; }
.tuto-win { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; color: #202124; box-shadow: 0 12px 30px -18px rgba(0,0,0,.35); }
.tuto-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: #f1f3f4; border-bottom: 1px solid #e3e3e3; }
.tuto-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d0d0d0; }
.tuto-bar span { margin-left: 8px; font: 11px var(--mono, monospace); color: #5f6368; background: #fff; border-radius: 10px; padding: 2px 10px; }
.tuto-screen { position: relative; height: 230px; }
.tuto-sc { position: absolute; inset: 0; padding: 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; opacity: 0; animation: tuto-scene 12s infinite both; font-size: 13px; }
.tuto-s2 { animation-delay: 3s; } .tuto-s3 { animation-delay: 6s; } .tuto-s4 { animation-delay: 9s; }
.tuto-sc p { margin: 0; }
.tuto-t { font-size: 15px; font-weight: 500; line-height: 1.3; max-width: 30ch; }
.tuto-gl { font: 600 22px var(--sans); background: linear-gradient(90deg,#4285f4,#ea4335,#fbbc05,#34a853); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tuto-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 280px; padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; border-radius: 6px; }
.tuto-row b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1a73e8; color: #fff; font-size: 12px; }
.tuto-row + .tuto-row b { background: #e8eaed; color: #5f6368; }
.tuto-warn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fce8e6; color: #d93025; font-weight: 700; }
.tuto-btn { padding: 6px 14px; border-radius: 16px; border: 1px solid #dadce0; color: #1a73e8; }
.tuto-btn-f { background: #1a73e8; color: #fff; border-color: #1a73e8; margin-top: 4px; }
.tuto-link { color: #5f6368; text-decoration: underline; border-radius: 4px; padding: 1px 4px; }
.tuto-chk { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 260px; text-align: left; }
.tuto-chk i { flex: none; width: 16px; height: 16px; border: 2px solid #5f6368; border-radius: 3px; position: relative; animation: tuto-tick 12s infinite both 6s; }
.tuto-chk:nth-of-type(2) i { animation-name: tuto-tick2; } .tuto-chk:nth-of-type(3) i { animation-name: tuto-tick3; } .tuto-chk:nth-of-type(n+4) i { animation-name: tuto-tick3; }
.tuto-ok { width: 44px; height: 44px; border-radius: 50%; background: #34a853; position: relative; }
.tuto-ok::after { content: ""; position: absolute; left: 16px; top: 9px; width: 10px; height: 20px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.tuto-done { color: #188038; font-size: 13px; }
.tuto-done::before { content: "✓ "; }
.tuto-cur { position: absolute; width: 14px; height: 20px; left: 50%; top: 50%; background: #202124; clip-path: polygon(0 0, 0 78%, 26% 60%, 44% 100%, 58% 94%, 40% 56%, 72% 56%); opacity: 0; pointer-events: none; animation: tuto-cur1 12s infinite both; }
.tuto-s1 .tuto-cur { --x: -40px; --y: -8px; }
.tuto-s2 .tuto-cur { animation-name: tuto-cur2; animation-delay: 3s; }
.tuto-s3 .tuto-cur { animation-delay: 6s; --x: 4px; --y: 74px; }
.tuto-hit { animation: tuto-hit 12s infinite both; }
.tuto-s2 .tuto-hit { animation-delay: 3s; }
.tuto-s2 .tuto-hit2 { animation: tuto-hit2 12s infinite both 3s; }
.tuto-s3 .tuto-hit { animation-delay: 6s; }
.tuto-caps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.tuto-caps li { color: var(--ink-3); transition: color .3s; animation: tuto-cap 12s infinite both; }
.tuto-caps li:nth-child(2) { animation-delay: 3s; } .tuto-caps li:nth-child(3) { animation-delay: 6s; } .tuto-caps li:nth-child(4) { animation-delay: 9s; }
@keyframes tuto-scene { 0% { opacity: 0; transform: translateY(6px); } 3%, 23% { opacity: 1; transform: none; } 25%, 100% { opacity: 0; } }
@keyframes tuto-cap { 0%, 24% { color: var(--ink); } 25%, 100% { color: var(--ink-3); } }
@keyframes tuto-cur1 { 0% { opacity: 0; transform: translate(60px, 60px); } 4% { opacity: 1; } 13% { transform: translate(var(--x), var(--y)); } 15% { transform: translate(var(--x), var(--y)) scale(.8); } 17%, 23% { opacity: 1; transform: translate(var(--x), var(--y)); } 25%, 100% { opacity: 0; } }
@keyframes tuto-cur2 { 0% { opacity: 0; transform: translate(70px, 50px); } 4% { opacity: 1; } 9% { transform: translate(-6px, 34px); } 10% { transform: translate(-6px, 34px) scale(.8); } 11% { transform: translate(-6px, 34px); } 17% { transform: translate(-6px, 62px); } 18% { transform: translate(-6px, 62px) scale(.8); } 19%, 23% { opacity: 1; transform: translate(-6px, 62px); } 25%, 100% { opacity: 0; } }
@keyframes tuto-hit { 0%, 14% { background: transparent; } 15%, 23% { background: rgba(26,115,232,.14); } 25%, 100% { background: transparent; } }
@keyframes tuto-hit2 { 0%, 17% { background: transparent; } 18%, 23% { background: rgba(26,115,232,.14); } 25%, 100% { background: transparent; } }
@keyframes tuto-tick { 0%, 5% { background: transparent; border-color: #5f6368; } 6%, 23% { background: #1a73e8; border-color: #1a73e8; } 25%, 100% { background: transparent; } }
@keyframes tuto-tick2 { 0%, 8% { background: transparent; border-color: #5f6368; } 9%, 23% { background: #1a73e8; border-color: #1a73e8; } 25%, 100% { background: transparent; } }
@keyframes tuto-tick3 { 0%, 11% { background: transparent; border-color: #5f6368; } 12%, 23% { background: #1a73e8; border-color: #1a73e8; } 25%, 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .tuto-win { display: none; }
  .tuto-caps li { animation: none; color: var(--ink); }
}
/* access public page: a calmer title that does not break word by word */
.ac-pub .bk-claim { max-width: 520px; }
.ac-pub .bk-claim .bk-h { font-size: clamp(32px, 3.3vw, 50px); line-height: 1.08; }
.ac-pub .bk-lead { font-size: 15.5px; }
.alert-info { background: transparent; color: var(--ink); border: 1px solid var(--line-2, var(--line)); }
/* instant meeting: two big choices, then the ready link */
.inst-opts { display: grid; gap: 10px; margin-top: 14px; }
.inst-opts form { margin: 0; }
.inst-opt { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 14px 16px; border: 1px solid var(--line-2, var(--line)); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.inst-opt:hover, .inst-opt:focus-visible { border-color: var(--ink); }
.inst-opt span { font-size: 13px; color: var(--ink-2); }
.inst-ready { margin-bottom: 16px; padding: 16px 18px; }
.inst-ready h3 { margin: 4px 0 10px; }

/* access: how-to video above the guided steps */
.ac-video { display: block; width: 100%; aspect-ratio: 16 / 9; margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #eef0f3; }

/* access: no account yet, create links */
.ac-na p{margin:0 0 8px}.ac-na p:last-child{margin:0}.ac-na-btns{display:flex;flex-wrap:wrap;gap:8px}

/* client home: the main action right under the greeting on phones and tablets */
.db-cta-m { display: none; }
@media (max-width: 1100px) { .db-cta-m { display: inline-flex; width: 100%; margin-top: 14px; } }

