:root {
  --paper: #F4F6F8;
  --surface: #FFFFFF;
  --surface-2: #EEF1F5;
  --ink: #1C2333;
  --ink-2: #4A5468;
  --ink-3: #6B7487;
  --line: #DCE1E8;
  --blue: #2C4C86;
  --blue-tint: #E3EAF6;
  --red: #B3362C;
  --red-tint: #F8E4E1;
  --green: #2E7A57;
  --green-tint: #E1F1E8;
  --amber: #8A6512;
  --amber-tint: #FBF1D6;
  --manila: #E9CB78;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(28, 35, 51, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12161F;
    --surface: #1A1F2B;
    --surface-2: #222838;
    --ink: #E7EAF1;
    --ink-2: #B4BCCB;
    --ink-3: #8E97A9;
    --line: #2E3546;
    --blue: #8FB0EA;
    --blue-tint: #22304D;
    --red: #F08A80;
    --red-tint: #3C2023;
    --green: #7CCBA4;
    --green-tint: #1C3328;
    --amber: #E5C36B;
    --amber-tint: #362D17;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12161F;
  --surface: #1A1F2B;
  --surface-2: #222838;
  --ink: #E7EAF1;
  --ink-2: #B4BCCB;
  --ink-3: #8E97A9;
  --line: #2E3546;
  --blue: #8FB0EA;
  --blue-tint: #22304D;
  --red: #F08A80;
  --red-tint: #3C2023;
  --green: #7CCBA4;
  --green-tint: #1C3328;
  --amber: #E5C36B;
  --amber-tint: #362D17;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: 30px; letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; font-family: var(--sans); }
p { margin: 0 0 .6em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px;
  border-right: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.brand img { width: 30px; height: 30px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--blue-tint); color: var(--blue); }
.nav .count { font-size: 12px; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.nav .count.hot { background: var(--red-tint); color: var(--red); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.side-foot { margin-top: auto; padding: 10px; font-size: 13px; color: var(--ink-3); }
.side-foot strong { color: var(--ink); display: block; font-size: 14px; }
main { padding: 32px 40px 80px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--ink-2); margin: 6px 0 0; }
.tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { padding: 20px 16px 96px; }
  h1 { font-size: 25px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20;
  }
  .tabbar a { text-align: center; font-size: 12px; color: var(--ink-3); text-decoration: none; padding: 6px 2px; border-radius: var(--radius-sm); }
  .tabbar a[aria-current="page"] { color: var(--blue); font-weight: 600; }
  .tabbar svg { display: block; margin: 0 auto 2px; }
}

/* ---------- building blocks ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-pad { padding: 18px 20px; }
.panel h2 { margin-bottom: 4px; }
.panel .sub { color: var(--ink-3); font-size: 13px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .grid-2, .grid-main { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 18px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.money { font-family: var(--serif); font-variant-numeric: tabular-nums; }

.btn {
  font: 500 14px/1 var(--sans); border-radius: var(--radius-sm); padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; gap: 6px; align-items: center;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #10182A; } }
:root[data-theme="dark"] .btn.primary { color: #10182A; }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--blue); padding-left: 6px; padding-right: 6px; }
.btn:disabled { opacity: .55; cursor: default; }

label.field { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
input, select, textarea {
  font: 14px/1.4 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 10px; width: 100%;
}
textarea { min-height: 220px; font-family: var(--sans); resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }

/* ---------- counts strip ---------- */
.counts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin-bottom: 18px; }
.counts a { padding: 16px 18px; text-decoration: none; color: inherit; border-right: 1px solid var(--line); }
.counts a:last-child { border-right: 0; }
.counts a:hover { background: var(--surface-2); }
.counts .n { font-family: var(--serif); font-size: 32px; line-height: 1.1; display: block; }
.counts .n.hot { color: var(--red); }
.counts .l { color: var(--ink-2); font-size: 13px; }
@media (max-width: 700px) { .counts { grid-template-columns: 1fr 1fr; } .counts a:nth-child(2) { border-right: 0; } .counts a:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- postmark (the signature element) ---------- */
.postmark {
  --c: var(--blue);
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  border: 2px solid var(--c); color: var(--c);
  display: grid; place-items: center; text-align: center; line-height: 1; position: relative;
  transform: rotate(-8deg);
}
.postmark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed var(--c); opacity: .55; }
.postmark b { font-family: var(--serif); font-size: 17px; display: block; }
.postmark i { font-style: normal; font-size: 10px; display: block; margin-top: 2px; }
.postmark.overdue { --c: var(--red); }
.postmark.done { --c: var(--green); }
.postmark.none { --c: var(--line); color: var(--ink-3); }
.postmark.lg { width: 76px; height: 76px; }
.postmark.lg b { font-size: 24px; }

/* ---------- letter list ---------- */
.letters { list-style: none; margin: 0; padding: 0; }
.letter {
  display: grid; grid-template-columns: 58px 44px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.letters li:last-child .letter { border-bottom: 0; }
.letter:hover { background: var(--surface-2); }
.letter .t { font-weight: 600; }
.letter .s { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.letter .r { text-align: right; }
.letter .amt { font-family: var(--serif); font-size: 18px; display: block; }
.letter > div { min-width: 0; }
@media (max-width: 560px) { .letter { grid-template-columns: 48px 1fr; } .letter .thumb { display: none; } .letter .r { grid-column: 2; text-align: left; } .postmark { width: 46px; height: 46px; } }
.thumb { width: 44px; height: 57px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
span.thumb { background: transparent; border-style: dashed; }

/* ---------- scan viewer ---------- */
.scan { display: grid; gap: 10px; position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; }
@media (max-width: 980px) { .scan { position: static; max-height: none; overflow: visible; } }
.page-btn { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: zoom-in; display: block; width: 100%; box-shadow: var(--shadow); }
.page-btn img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
dialog.lightbox { max-width: none; width: min(1100px, calc(100% - 24px)); height: calc(100vh - 24px); padding: 0; display: grid; grid-template-rows: auto 1fr; }
dialog.lightbox:not([open]) { display: none; }
.lb-bar { padding: 10px 14px; border-bottom: 1px solid var(--line); gap: 8px; }
.lb-scroll { overflow: auto; background: var(--surface-2); padding: 16px; text-align: center; }
.lb-scroll img { max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: zoom-in; }
.lb-scroll img.zoomed { max-width: none; cursor: zoom-out; }
.btn .count { margin-left: 6px; font-size: 12px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.btn.primary .count { background: rgba(255,255,255,.25); color: inherit; }

.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 20px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.blue { background: var(--blue-tint); color: var(--blue); }
.tag.red { background: var(--red-tint); color: var(--red); }
.tag.green { background: var(--green-tint); color: var(--green); }
.tag.amber { background: var(--amber-tint); color: var(--amber); }

.empty { padding: 26px 20px; color: var(--ink-2); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 980px) { .filters { grid-template-columns: 1fr 1fr; } .filters .search { grid-column: 1 / -1; } }

/* ---------- letter page ---------- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rec { border-left: 4px solid var(--blue); }
.rec.dispute, .rec.appeal, .rec.shop { border-left-color: var(--manila); }
.rec .verb { font-family: var(--serif); font-size: 24px; text-transform: capitalize; }
.cite { margin: 10px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13px; }
.cite b { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.review-note { background: var(--amber-tint); color: var(--amber); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- meters & charts ---------- */
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 6px 0 4px; }
.meter > span { display: block; height: 100%; background: var(--blue); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-3); font: 11px var(--sans); }
.chart .grid { stroke: var(--line); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; max-width: 520px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(18, 22, 31, .45); }
dialog form { padding: 20px; display: grid; gap: 12px; }
dialog h2 { margin-bottom: 2px; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .panel { max-width: 440px; width: 100%; padding: 28px; }
.auth h1 { margin-bottom: 8px; }
.profiles { display: grid; gap: 8px; margin-top: 14px; }
.profiles button { text-align: left; justify-content: space-between; padding: 12px 14px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) { #toast { bottom: 84px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.loading { padding: 40px 0; color: var(--ink-3); }
.btn .count.hot { background: var(--red-tint); color: var(--red); }

/* ---------- travel ---------- */
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--chip, rgba(31,122,140,.12)); color: inherit; }
.chip.guest { background: rgba(192,106,43,.14); }
.postmark.now { border-color: #2E7A57; color: #2E7A57; }
.tasks li.done .t { text-decoration: line-through; opacity: .65; }
.letter.task, .letter.trip-row { grid-template-columns: auto 1fr auto; }
.small-btn { padding: 4px 10px; font-size: 13px; min-height: 32px; }
.btn.ghost { background: transparent; border-color: transparent; }
.bookings .booking { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 12px; padding: 12px 14px; border-left: 3px solid #1F7A8C; }
.bookings .booking.stay { border-left-color: #2E7A57; }
.bookings .b-when { font-weight: 600; font-size: 13px; }
.bookings .booking .r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
@media (max-width: 640px) {
  .bookings .booking { grid-template-columns: 1fr; }
  .bookings .booking .r { flex-direction: row; align-items: center; }
  .letter.task { grid-template-columns: auto 1fr; }
  .letter.task .r { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- events ---------- */
.tallies { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.tally b { font-variant-numeric: tabular-nums; }
.tally.yes b { color: var(--green); }
.tally.maybe b { color: var(--amber); }
.tally.no b { color: var(--red); }
.tally.none b { color: var(--ink-3); }
.tally-big { font-size: 17px; margin-bottom: 10px; }
.guest-group h3 { font-size: 14px; margin: 14px 0 4px; }
.postmark.hosted { border-color: #7A4E9A; color: #7A4E9A; }
.postmark.cancelled { opacity: .5; text-decoration: line-through; }
.seg { display: inline-flex; gap: 0; max-width: 100%; overflow-x: auto; }
.seg .btn { flex: 0 0 auto; }
.seg .btn { border-radius: 0; margin-left: -1px; }
.seg .btn:first-child { border-radius: 8px 0 0 8px; }
.seg .btn:last-child { border-radius: 0 8px 8px 0; }
.btn.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.filters.row { gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- rides ---------- */
.letter.ride { grid-template-columns: auto 1fr auto; }
.letter.ride .r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.letter.ride .r select { width: auto; min-width: 110px; }
select.purpose.business { border-color: var(--blue); color: var(--blue); }
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pipeline .step { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.pipeline .step strong { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .pipeline { grid-template-columns: 1fr; }
  .letter.ride { grid-template-columns: auto 1fr; }
  .letter.ride .r { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

#main { min-width: 0; }

/* ---------- orders ---------- */
button.letter.order-row { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; grid-template-columns: auto 1fr auto; }
button.letter.order-row:hover { background: var(--surface-2); }
.letter.order-row .r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
dialog.wide { width: min(640px, calc(100vw - 32px)); max-width: 640px; padding: 22px 24px; max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.wide h3 { margin: 6px 0; font-size: 15px; }

/* ---------- credit ---------- */
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.score b { font-family: var(--serif); font-size: 44px; line-height: 1; }
.score.green b { color: var(--green); } .score.blue b { color: var(--blue); } .score.amber b { color: var(--amber); } .score.red b { color: var(--red); }
.score > span:not(.tag):not(.delta) { color: var(--ink-3); font-size: 13px; }
.delta { font-weight: 600; font-size: 14px; } .delta.down { color: var(--red); } .delta.up { color: var(--green); }
.spark { color: var(--blue); max-width: 100%; }
.recs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.recs li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 12px; }
.callout.bad { border-left-color: var(--red); }
.callout p { margin: 4px 0 0; }
/* ---------- alerts center ---------- */
.alert-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.alert-counts .ac { display: flex; flex-direction: column; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.alert-counts .ac b { font-size: 26px; font-family: var(--serif); }
.alert-counts .ac.urgent b { color: var(--red); } .alert-counts .ac.soon b { color: var(--amber); } .alert-counts .ac.fyi b { color: var(--blue); }
.alerts { list-style: none; margin: 0; padding: 0; }
.alert-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--blue); }
.alert-item.urgent .dot { background: var(--red); } .alert-item.soon .dot { background: var(--amber); }
.alert-item .body { text-decoration: none; color: inherit; min-width: 0; }
.alert-item .t { font-weight: 600; }
.alert-item .s { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.alert-item.dismissed { opacity: .55; }
.filter-chips { margin-bottom: 14px; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.chip-btn.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.alerts-home { margin-bottom: 18px; }
@media (max-width: 640px) { .alert-counts { gap: 6px; } .alert-counts .ac { padding: 8px 10px; } .alert-counts .ac b { font-size: 20px; } .alert-item { grid-template-columns: 10px minmax(0, 1fr); } .alert-item .acts { grid-column: 2; } }

/* KAN-27: appointments, flight changes, digest, taxes */
.stack-tags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.bad-text { color: var(--red); }
.change-legs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.change-leg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.change-leg:last-child { border-color: var(--blue); background: var(--blue-tint); }
ul.impact { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
ul.impact li { padding-left: 2px; }
.change-item { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.change-item:last-child { border-bottom: 0; }
.booking.activity .b-when { color: var(--amber); }
details.digest summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
details.digest summary::-webkit-details-marker { display: none; }
.digest-body { white-space: pre-wrap; font-family: inherit; font-size: 14px; margin: 6px 0 0; color: var(--ink-2); }
section.panel h3 { font-size: 15px; margin: 16px 0 6px; }
@media (max-width: 560px) { .change-legs { grid-template-columns: minmax(0, 1fr); } }
.letter.appt-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.letter.appt-row .s { white-space: normal; }

/* Integrations (KAN-43) */
.tabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs .tab { padding: 8px 14px; color: inherit; text-decoration: none; border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.tabs .tab.active { border-bottom-color: var(--blue); font-weight: 600; }
.row.chips { margin-bottom: 10px; gap: 6px; }
.row.chips .chip { text-decoration: none; padding: 4px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.row.chips .chip.on { background: var(--blue); color: #fff; }
.notice { background: rgba(192,106,43,.12); border-radius: 8px; padding: 8px 12px; }
.int-provider { margin-top: 16px; }
.int-provider h3 { margin: 0 0 6px; font-size: 15px; }
pre.draft { white-space: pre-wrap; max-height: 50vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; }

/* Notifications and sign-in codes (KAN-9, KAN-58) */
.notify-form { display: grid; gap: 8px; }
.notify-form .row.check { gap: 8px; align-items: flex-start; }
.notify-log { margin: 4px 0 0; padding-left: 18px; }
.auth form { display: grid; gap: 10px; margin-top: 8px; }
.auth form[hidden] { display: none; }
