:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5d6b7c;
  --line: #dfe3e8;
  --brand: #1f3a5f;
  --brand-ink: #ffffff;
  --accent: #2f6fd6;
  --good: #1f7a4d;
  --danger: #b3261e;
  --internal-bg: #fff8e6;
  --internal-line: #e8c66a;
  --mine-bg: #eef4ff;
  --radius: 10px;
  --st-new: #2f6fd6;
  --st-in_progress: #8a5a00;
  --st-waiting: #7a3fb0;
  --st-resolved: #1f7a4d;
  --st-closed: #5d6b7c;
  --pr-high: #b3261e;
  --pr-medium: #8a5a00;
  --pr-low: #5d6b7c;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1b2129;
    --ink: #e6e9ee;
    --muted: #9aa6b4;
    --line: #2d3540;
    --brand: #16283f;
    --accent: #6ea2ff;
    --good: #4fbf86;
    --danger: #ff7b72;
    --internal-bg: #2b2414;
    --internal-line: #6b5520;
    --mine-bg: #1a2638;
    --st-new: #6ea2ff;
    --st-in_progress: #e0a73a;
    --st-waiting: #c38cf5;
    --st-resolved: #4fbf86;
    --st-closed: #9aa6b4;
    --pr-high: #ff7b72;
    --pr-medium: #e0a73a;
    --pr-low: #9aa6b4;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
code { background: var(--bg); padding: .1em .35em; border-radius: 4px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
main.wrap { padding-block: 24px 48px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* header */
.top { background: var(--brand); color: var(--brand-ink); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; padding-block: 6px; }
.brand { color: #fff; font-weight: 650; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.mark { background: #fff; color: var(--brand); border-radius: 6px; padding: 1px 6px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.top nav a { color: #d6e2f2; padding: 6px 10px; border-radius: 6px; }
.top nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.top nav a.on { background: rgba(255,255,255,.16); color: #fff; }
.who { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: #d6e2f2; margin: 0; }
.who .link { color: #fff; }
.preview-bar { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; background: #fff4d6; color: #5a4300; border-bottom: 1px solid #e8d49a; padding: 8px 16px; margin: 0; font-size: .92rem; }

/* controls */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.google { width: 100%; padding: 11px; font-size: 1rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link.danger { color: var(--danger); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 100%;
}
textarea { width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: .92rem; }
label > input:not([type=checkbox]), label > select { width: 100%; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 200px; }
.row.between { justify-content: space-between; align-items: center; }
.checks { display: flex; flex-direction: column; gap: 4px; }
.files input { border-style: dashed; padding: 12px; }
.narrow-num { width: 5.5em; }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.narrow { max-width: 680px; margin: 0 auto; }
.login { max-width: 440px; margin-top: 8vh; }
.login .dev { margin-top: 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 0; }
.flash { background: var(--mine-bg); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash.err { border-left-color: var(--danger); }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* pills */
.pill, .tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid currentColor; }
.tag { color: var(--muted); font-weight: 500; }
.st-new { color: var(--st-new); }
.st-in_progress { color: var(--st-in_progress); }
.st-waiting { color: var(--st-waiting); }
.st-resolved { color: var(--st-resolved); }
.st-closed { color: var(--st-closed); }
.pr-high { color: var(--pr-high); }
.pr-medium { color: var(--pr-medium); }
.pr-low { color: var(--pr-low); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tickets { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.tickets th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tickets td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tickets tr:last-child td { border-bottom: 0; }
table.tickets tr:hover td { background: var(--mine-bg); }
table.tickets td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.tickets td.title { min-width: 240px; }
table.tickets td.title > a { color: var(--ink); font-weight: 550; }
table.tickets td.when { white-space: nowrap; color: var(--muted); font-size: .88rem; }
table.tickets tr.overdue td.num { box-shadow: inset 3px 0 0 var(--danger); }
.sub { font-size: .84rem; color: var(--muted); margin-top: 2px; }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.plain thead th { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
table.cats input[type=text], table.cats input:not([type]) { width: 100%; min-width: 140px; }

/* queue */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 8px 0 14px; }
.tab { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.count { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font-size: .78rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.filters input[type=search] { flex: 1 1 220px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* ticket */
.ticket-head { margin-bottom: 16px; }
.ticket-head h1 { margin: 4px 0 8px; }
.ticket-head .num { color: var(--muted); font-weight: 500; }
.back { font-size: .9rem; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
aside { display: flex; flex-direction: column; gap: 14px; }
.side select, .side input { width: 100%; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.side dt { color: var(--muted); font-size: .88rem; }
.side dd { margin: 0; }
.side details summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.side details form { margin-top: 8px; }
.timeline { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.msg.mine { background: var(--mine-bg); }
.msg.internal { background: var(--internal-bg); border-color: var(--internal-line); }
.msg.resolution { border-left: 4px solid var(--good); }
.msg .meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; font-size: .92rem; }
.msg time, .ev time { color: var(--muted); font-size: .84rem; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.ev { color: var(--muted); font-size: .88rem; padding: 0 16px; }
.atts { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.reply.internal { background: var(--internal-bg); border-color: var(--internal-line); }
.reply .h { font-weight: 600; }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.big { font-size: 2rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line); }
.bars li:last-child { border-bottom: 0; }
.weeks { display: flex; gap: 6px; align-items: flex-end; height: 160px; overflow-x: auto; }
.wk { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.wk .pair { flex: 1; display: flex; gap: 2px; align-items: flex-end; width: 100%; justify-content: center; }
.wk i { display: block; width: 40%; min-height: 1px; border-radius: 3px 3px 0 0; }
.wk span { font-size: .72rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
i.c { background: var(--accent); }
i.r { background: var(--good); }
.legend { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }

@media (max-width: 860px) {
  .ticket-grid { grid-template-columns: 1fr; }
  .stat-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .who span { display: none; }
  h1 { font-size: 1.3rem; }
  .card { padding: 14px; }
}

/* R1: urgent flag, rooms, activity toggle */
.pill.urgent { color: #fff; background: var(--danger); border-color: var(--danger); }
table.tickets tr.urgent td { background: color-mix(in srgb, var(--danger) 7%, transparent); }
.urgent-check { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.urgent-check:has(input:checked) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.activity-toggle { display: inline-flex; margin-bottom: 8px; }
.timeline.hide-activity .ev { display: none; }
.hidden { display: none; }

/* Help assistant */
.helpbot { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin: 1rem 0; }
.helpbot .chat { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; max-height: 60vh; overflow-y: auto; }
.bubble { max-width: 85%; padding: .6rem .85rem; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-line; }
.bubble.ai { white-space: pre-line; }
.bubble.typing { color: var(--muted); font-style: italic; }
.bubble .fix { margin: .5rem 0; padding: .5rem .7rem; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 6px; }
.bubble .fix ol { margin: .35rem 0 0; padding-left: 1.2rem; }
.bubble .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.helpbot .ask { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.helpbot .ask textarea { flex: 1; min-width: 0; resize: vertical; }

/* To do */
.quick-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.quick-add input[name=title] { flex: 1 1 16rem; min-width: 0; }
.quick-add details { flex-basis: 100%; }
.quick-add textarea { width: 100%; margin-top: .4rem; }
h2.bucket { font-size: 1rem; margin: 1.4rem 0 .4rem; }
h2.b-urgent, h2.b-overdue { color: var(--danger); }
ul.todo { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.todo-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-top: 1px solid var(--line); }
.todo-item:first-child { border-top: 0; }
.todo-item.urgent { box-shadow: inset 3px 0 0 var(--danger); }
.todo-item .what { flex: 1; min-width: 0; }
.todo-item .what > a { font-weight: 600; }
.todo-item .pills { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.todo-item form.done { margin: 0; }
.tick { display: inline-block; flex: none; width: 22px; height: 22px; padding: 0; border: 2px solid var(--muted); border-radius: 50%; background: transparent; cursor: pointer; }
.tick:hover { border-color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.tick.ticket { border-style: dashed; cursor: default; background: transparent; }
.tag.task { color: var(--accent); }
.tag.bucket { font-size: .7rem; padding: 0 7px; }
.tag.b-colab { color: var(--accent); }
.tabs.buckets { margin-bottom: .25rem; }
.plain-list { margin: 0; padding-left: 1.1rem; }
details.article summary { cursor: pointer; }
details.article[open] summary { margin-bottom: .75rem; }
@media (max-width: 600px) { .todo-item .pills { display: none; } .bubble { max-width: 95%; } }

.ai-answer { white-space: pre-line; margin: .4rem 0 .6rem; padding: .5rem .7rem; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 6px; }

/* Known-issue notices (R3) */
.notices { display: grid; gap: .5rem; margin-bottom: 16px; }
.notice { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--mine-bg); }
.notice.sev-outage { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.notice-label { flex: none; }
.notice.sev-outage .notice-label { color: var(--danger); }
.notice-body { flex: 1 1 16rem; white-space: pre-line; }
.notice-meta { flex-basis: 100%; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
details.notice-edit { margin-top: .75rem; border-left: 4px solid var(--accent); }
details.notice-edit.sev-outage { border-left-color: var(--danger); }
details.notice-edit summary { cursor: pointer; }
details.notice-edit[open] summary { margin-bottom: .75rem; }
details.notice-edit > form + form { margin-top: .5rem; }
.tag.notice-on { color: var(--good); }
.narrow-text { width: 8rem; }

/* Room QR codes (R3) */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qr-card { background: #fff; color: #000; border: 1px dashed #999; border-radius: var(--radius); padding: 14px; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.qr-room { font-size: 1.2rem; font-weight: 700; }
.qr-building { color: #444; }
.qr-code svg { display: block; width: 160px; height: 160px; margin: 8px auto; }
.qr-hint { font-size: .85rem; }
.qr-url { font: .8rem ui-monospace, SFMono-Regular, Menlo, monospace; color: #333; overflow-wrap: anywhere; }
@media print {
  header.top, .no-print, .flash, .notices { display: none !important; }
  body, main.wrap { background: #fff; padding: 0; margin: 0; max-width: none; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
  .qr-card { border-color: #999; }
}
/* R2 agent tools: saved replies, bulk actions, merge */
.canned-pick { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.canned-pick.hidden { display: none; }
.canned-del { margin-top: .5rem; }
.bulk-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 10px; }
.bulk-bar input[name=resolution] { flex: 1 1 14rem; min-width: 0; }
table.tickets .sel { width: 1%; padding-right: 0; }
details.merge summary { cursor: pointer; font-weight: 600; }
details.merge[open] summary { margin-bottom: .6rem; }
/* R3: followers and "Did this fix it?" ratings */
form.inline { display: inline; margin: 0; }
.watch-list { list-style: none; margin: 0 0 8px; padding: 0; }
.watch-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.watch-list li:last-child { border-bottom: 0; }
.rate, .rating-given { margin-bottom: 14px; }
.rate .h { font-weight: 600; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
label.thumb { flex-direction: row; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 1rem; }
label.thumb:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rating-given { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rating-given .body { flex-basis: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.rating-comments { list-style: none; margin: 8px 0 0; padding: 0; }
.rating-comments li { padding: 5px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
/* R2: someone else on this ticket, held-back replies, recurring tasks */
.flash.presence { border-left-color: var(--pr-medium); }
.flash.stale ul { margin: .4rem 0; padding-left: 1.2rem; }
.flash.stale li { white-space: pre-wrap; }
table.recurring td.actions { white-space: nowrap; text-align: right; }
table.recurring td.actions form { display: inline; margin-left: .6rem; }
table.recurring tr.paused td { color: var(--muted); }
.recurring-form .every { display: flex; gap: .4rem; align-items: center; }
/* R5: help articles (/kb) and the stats export */
.kb h2 { margin-top: 1.4rem; }
.kb-list { list-style: none; margin: 0; padding: 0; }
.kb-list li { padding: .45rem 0; border-top: 1px solid var(--line); }
.kb-list li:first-child { border-top: 0; }
.kb-list .sub { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.kb-body { line-height: 1.6; overflow-wrap: anywhere; }
.kb-body h2 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 1.05rem; margin: 1.3rem 0 .4rem; }
.kb-body ol.steps li, .kb-body ul li { margin: .3rem 0; }
.kb-stuck { margin-top: 1.4rem; padding: .7rem .9rem; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 6px; }
select.kb-insert { max-width: 16rem; }
.card.export { margin-top: 16px; }

/* Teach the help bot */
.teach summary { cursor: pointer; }
.teach[open] summary { margin-bottom: .75rem; }
.teach .bot-said { background: var(--surface-2, rgba(127,127,127,.08)); border-radius: 8px; padding: 8px 12px; margin-bottom: .75rem; }
.teach .ai-answer { white-space: pre-wrap; }

.pair-code { font-family: ui-monospace, monospace; font-size: 1.4em; letter-spacing: .08em; }

.booking { width: 100%; height: 640px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: #fff; }
.booking-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.book-offer { border-left: 4px solid var(--accent, #1e5aa8); }
.book-side { margin-top: 12px; }
.btn.ghost { background: transparent; color: var(--muted, #667); border-style: dashed; }
.link-names td { vertical-align: top; }
.link-names select { max-width: 22rem; }
.add-email { max-width: 14rem; }

/* ---- projects ---- */
.pill.ps-planning { color: var(--muted); }
.pill.ps-active { color: var(--accent); }
.pill.ps-on_hold { color: #a46a00; }
.pill.ps-done { color: var(--good); }
.msg-plain { white-space: pre-wrap; overflow-wrap: anywhere; }
.late { color: var(--danger); font-weight: 600; }
.progress { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.progress .bar { display: inline-block; width: 80px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress .fill { display: block; height: 100%; background: var(--good); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; margin-top: 14px; }
.board-col { background: color-mix(in srgb, var(--line) 35%, transparent); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.board-col h2 { font-size: .95rem; margin: 2px 4px 4px; }
.proj-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); }
.proj-card:hover { border-color: var(--accent); }
.proj-card.late { box-shadow: inset 3px 0 0 var(--danger); font-weight: normal; color: var(--ink); }
.todo-item.done .what > a { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.tick.ticked { background: var(--good); border-color: var(--good); }
.page-head a.on { font-weight: 700; color: var(--ink); }
@media (max-width: 860px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board { grid-template-columns: minmax(0, 1fr); } }
.progress .fill.w0 { width: 0%; }
.progress .fill.w5 { width: 5%; }
.progress .fill.w10 { width: 10%; }
.progress .fill.w15 { width: 15%; }
.progress .fill.w20 { width: 20%; }
.progress .fill.w25 { width: 25%; }
.progress .fill.w30 { width: 30%; }
.progress .fill.w35 { width: 35%; }
.progress .fill.w40 { width: 40%; }
.progress .fill.w45 { width: 45%; }
.progress .fill.w50 { width: 50%; }
.progress .fill.w55 { width: 55%; }
.progress .fill.w60 { width: 60%; }
.progress .fill.w65 { width: 65%; }
.progress .fill.w70 { width: 70%; }
.progress .fill.w75 { width: 75%; }
.progress .fill.w80 { width: 80%; }
.progress .fill.w85 { width: 85%; }
.progress .fill.w90 { width: 90%; }
.progress .fill.w95 { width: 95%; }
.progress .fill.w100 { width: 100%; }

/* ---- booking page ---- */
.book { max-width: 960px; margin: 0 auto; }
.book-hero { padding: 12px 0 8px; }
.book-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); letter-spacing: -.01em; margin: 0 0 .5rem; }
.book-hero.compact h1 { font-size: 1.5rem; }
.book-hero h1 .muted { font-weight: 500; }
.book-eyebrow { margin: 0 0 .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.book-lede { margin: 0; max-width: 62ch; font-size: 1.05rem; color: var(--muted); line-height: 1.55; }
.book-about { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius); background: var(--mine-bg); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.book-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0 0; }
.book-option { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.book-option:hover, .book-option:focus-visible { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent) 55%, transparent); text-decoration: none; }
.book-len { display: flex; align-items: baseline; gap: 6px; }
.book-num { font-size: 2.6rem; font-weight: 750; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.book-unit { font-size: 1rem; font-weight: 600; color: var(--muted); }
.book-name { font-size: 1.1rem; font-weight: 700; margin-top: 4px; }
.book-desc { color: var(--muted); line-height: 1.5; flex: 1; }
.book-cta { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 650; color: var(--accent); }
.book-steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.book-steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.book-step-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mine-bg); color: var(--accent); font-weight: 700; font-size: .9rem; border: 1px solid var(--line); }
.book-steps .muted { font-size: .92rem; }
.book-urgent { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 36px 0 0; padding: 16px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.book-urgent strong { display: block; margin-bottom: 2px; }
.book-urgent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.book-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.book-back { font-weight: 600; }
.book-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.book-seg a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.book-seg a:hover { color: var(--ink); text-decoration: none; }
.book-seg a.on { background: var(--accent); color: #fff; }
.book-frame { margin-top: 18px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.book-frame iframe.booking { display: block; height: 760px; border: 0; border-radius: 0; }
.book-fallback { margin-top: 10px; }
.book-open { margin-top: 18px; }
@media (max-width: 760px) {
  .book-options, .book-steps { grid-template-columns: minmax(0, 1fr); }
  .book-option { padding: 18px; }
  .book-num { font-size: 2.1rem; }
  .book-frame iframe.booking { height: 680px; }
}
