/* Heylane — appearance tokens shared by every screen. Light is the default. */
/* Jade palette (restored by Umer Nawaz, 02 Nov 2026, after reviewing Coral Ivory; see docs/BRAND-DIRECTION.md).
   Jade carries actions and selection, coral marks conversations, blue informs, amber warns, red is for errors. */
:root {
  color-scheme: light;
  --ink: #183e36;
  --muted: #52665f;
  --dim: #60746b;
  --bg: #f5f8f4;
  --surface: #ffffff;
  --surface-alt: #edf4ef;
  --line: #d5e2d9;
  --line-strong: #b9cdbf;
  --accent: #177760;
  --accent-hover: #105d4b;
  --accent-soft: #e0f2e8;
  --accent-line: #b5d9c6;
  --blue: #356a9c;
  --blue-soft: #e9f0fb;
  --blue-line: #c8d9ec;
  --green: #28714f;
  --green-soft: #e4f2e7;
  --green-line: #bbd7c4;
  --rose: #9d4931;
  --rose-soft: #fbece5;
  --rose-line: #f0cbbd;
  --amber: #8a5a00;
  --amber-soft: #fbf1dc;
  --amber-line: #ecd3a0;
  --red: #af3d31;
  --red-soft: #fbecea;
  --red-line: #efc4bd;
  --primary-text: #ffffff;
  --shadow-color: #193e3610;
  --backdrop: #10271f70;
  --hero: #e6f3e9;
  --cover-peach: #f5decd;
  --cover-blue: #dce9f5;
  --cover-green: #cce8d7;
  --cover-ink: #24473b;
  /* Compatibility aliases for the original layout primitives. --coral is the conversation colour. */
  --coral: var(--rose);
  --coral-soft: var(--rose-soft);
  --carbon: var(--surface);
  --pearl: var(--ink);
  --gold: var(--accent);
  --emerald: var(--green);
  --panel: var(--surface);
  --panel2: var(--surface-alt);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ebf4ec;
  --muted: #adc3b7;
  --dim: #a0b8ab;
  --bg: #142422;
  --surface: #1c302c;
  --surface-alt: #263e36;
  --line: #3a5148;
  --line-strong: #52695f;
  --accent: #9cdcc0;
  --accent-hover: #c0efd8;
  --accent-soft: #284d3f;
  --accent-line: #426e58;
  --blue: #b3cdec;
  --blue-soft: #2c3f50;
  --blue-line: #486079;
  --green: #acd6b9;
  --green-soft: #284633;
  --green-line: #4a6f58;
  --rose: #efbaa4;
  --rose-soft: #503e34;
  --rose-line: #7a5a4a;
  --amber: #f2c46b;
  --amber-soft: #3a3118;
  --amber-line: #6a5a2c;
  --red: #ffb3a7;
  --red-soft: #4a2a26;
  --red-line: #7a3f37;
  --primary-text: #143b2d;
  --shadow-color: #06161035;
  --backdrop: #071511b8;
  --hero: #243f33;
  --cover-peach: #5c4736;
  --cover-blue: #344e60;
  --cover-green: #355542;
  --cover-ink: #f2f4e8;
}
html { color: var(--ink); background: var(--bg); }
body { background: var(--bg); }
.sidebar { background: var(--surface); padding-top: 30px; }
.wordmark { flex-direction: row; align-items: center; gap: 10px; padding: 0 7px; margin-bottom: 32px; }
.wordmark .brand-symbol { width: 42px; height: 42px; flex: 0 0 42px; }
.wordmark>span { font-size: 28px; letter-spacing: -1.4px; font-weight: 750; line-height: 1.1; color: var(--ink); }
.wordmark small { display: block; font-size: 10px; letter-spacing: 1.6px; font-weight: 600; color: var(--muted); margin-top: 7px; }
.workspace-picker { background: var(--bg); border-radius: 12px; margin-bottom: 29px; }
.workspace-avatar { border-radius: 9px; background: var(--accent-soft); }
.nav-item { border-radius: 10px; font-size: 13.5px; min-height: 45px; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.nav-item b { background: var(--surface); color: var(--accent); border-radius: 6px; }
.nav-item:hover { background: var(--surface-alt); }
.topbar { background: var(--surface); }
.breadcrumb strong { color: var(--ink); font-weight: 550; }
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-alt); color: var(--ink); font-size: 12px; }
.theme-toggle .icon { width: 15px; height: 15px; }
.theme-toggle:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.topbar-right { gap: 16px; }
.mode-banner { background: var(--surface-alt); color: var(--muted); border-bottom-color: var(--line); }
.mode-banner strong, .mode-banner button { color: var(--accent); }
.page-heading .eyebrow { letter-spacing: 1.8px; }
h1 { font-weight: 650; letter-spacing: -1.4px; }
.page-heading p { font-size: 13.5px; }
.btn { border-radius: 10px; }
.primary, .today .cell-top>span { background: var(--accent); color: var(--primary-text); border-color: var(--accent); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.secondary:hover, .subtle:hover, .icon-button:hover { background: var(--surface-alt); border-color: var(--line); }
.text-button:hover { color: var(--accent-hover); }
.hero { border-radius: 20px; border: 1px solid var(--accent-line); background: var(--hero); }
.hero:after { background: none; width: 240px; height: 240px; top: -120px; right: -80px; border: 45px solid var(--accent-line); opacity: .3; }
.hero h2 { font-size: 32px; font-weight: 650; letter-spacing: -1.1px; }
.hero h2 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 13.5px; }
.hero-link, .hero-link:hover { color: var(--accent); font-weight: 650; }
.hero-map { isolation: isolate; }
.map-grid { background-image: radial-gradient(var(--accent-line) .8px, transparent .8px); }
.map-node { background: var(--surface); border-color: var(--accent-line); border-radius: 14px; box-shadow: 0 10px 28px var(--shadow-color); }
.map-node strong { font-weight: 650; }
.map-node small { color: var(--accent); }
.map-node span, .map-caption { color: var(--muted); }
.node-icon { background: var(--accent-soft); color: var(--accent); border: 0; border-radius: 10px; }
.map-comment .node-icon { background: var(--coral-soft); color: var(--coral); border: 0; }
.map-comment { border-color: var(--line); }
.map-comment small { color: var(--coral); }
.map-guide .node-icon { background: var(--blue-soft); color: var(--blue); border: 0; }
.map-guide small { color: var(--blue); }
.map-connectors { stroke: var(--accent); opacity: .45; stroke-width: 1.5; }
.map-connectors .secondary-line { stroke: var(--coral); }
.stat { border-radius: 15px; background: var(--surface); padding: 21px; }
.stat strong { color: var(--ink); font-weight: 550; }
.stat>.icon { box-sizing: content-box; padding: 11px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.stat:nth-child(2)>.icon { background: var(--coral-soft); color: var(--coral); }
.stat:nth-child(3)>.icon { background: var(--blue-soft); color: var(--blue); }
.stat:nth-child(4)>.icon { background: var(--green-soft); color: var(--green); }
.panel { border-radius: 16px; }
.campaign-card { background: var(--surface); border-radius: 13px; }
.campaign-card:hover { border-color: var(--accent); box-shadow: 0 9px 20px var(--shadow-color); }
.cover, .cover.gold { background: var(--cover-peach); color: var(--cover-ink); }
.cover.blue { background: var(--cover-blue); }
.cover.green { background: var(--cover-green); }
.cover strong { font-weight: 600; }
.cover-brand, .cover-bottom { color: var(--cover-ink); }
.cover-orbit, .cover-orbit:before, .cover-orbit:after, .cover-lines { border-color: var(--cover-ink); opacity: .2; }
.campaign-card h3 { color: var(--ink); }
.badge { border-radius: 6px; }
.badge.gold { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.badge.green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.badge.muted { color: var(--muted); background: var(--surface-alt); border-color: var(--line); }
.avatar, .tone-0 { background: var(--coral-soft); color: var(--coral); }
.tone-1 { background: var(--blue-soft); color: var(--blue); }
.tone-2 { background: var(--accent-soft); color: var(--accent); }
.platform { background: var(--surface-alt); color: var(--muted); border-color: var(--line); }
.platform.instagram { color: var(--coral); }
.platform.linkedin { color: var(--blue); }
.platform.youtube { color: var(--red); }
.platform.tiktok { color: var(--accent); }
.bottom-note { border-radius: 14px; background: var(--surface-alt); }
.bottom-note>.brand-workflow-icon { flex-shrink: 0; width: 32px; height: 32px; color: var(--accent); }
.preview-comment strong, .comment-row strong { font-size: 13.5px; }
.preview-comment p { font-size: 12.5px; }
.segmented { background: var(--surface-alt); border-radius: 10px; }
.segmented button { border-radius: 7px; }
.segmented button.selected { background: var(--surface); color: var(--accent); box-shadow: 0 2px 5px var(--shadow-color); }
.calendar-board { background: var(--surface); border-radius: 15px; }
.calendar-cell.outside, .weekdays { background: var(--bg); }
.calendar-event { background: var(--accent-soft); border-color: var(--accent-line); border-left-color: var(--accent); }
.calendar-event.blue { background: var(--blue-soft); border-color: var(--blue-line); border-left-color: var(--blue); }
.calendar-event:hover { background: var(--surface-alt); }
.calendar-event>span, .calendar-event small { color: var(--muted); }
.draft-item, .inbox-layout { background: var(--surface); border-radius: 13px; }
.comment-list { background: var(--bg); }
.comment-row.selected { background: var(--accent-soft); }
.comment-row:hover { background: var(--surface-alt); }
.post-context { background: var(--bg); }
.message-bubble { border-radius: 4px 16px 16px 16px; background: var(--surface-alt); }
.context-note, .connection-note { background: var(--accent-soft); border-color: var(--accent-line); border-radius: 12px; }
.context-note strong, .connection-note strong { color: var(--accent); }
.workflow-diagram { border-radius: 16px; background: var(--hero); border-color: var(--accent-line); }
.flow-step-icon { background: var(--surface); color: var(--accent); border-color: var(--accent-line); border-radius: 14px; }
.flow-step:nth-child(3) .flow-step-icon { color: var(--coral); }
.flow-step:nth-child(5) .flow-step-icon { color: var(--blue); }
.flow-step strong { font-weight: 650; }
.flow-step-number, .flow-arrow { color: var(--muted); }
.result-banner { background: var(--coral-soft); border-color: var(--line); border-radius: 12px; }
.result-banner p, .result-banner small { color: var(--muted); }
.result-banner.success { background: var(--green-soft); border-color: var(--green-line); }
.guide-card { background: var(--surface); border-radius: 16px; }
.guide-cover { background: var(--cover-green); color: var(--cover-ink); }
.guide-cover>span, .guide-cover>small, .document-mark { color: var(--cover-ink); }
.document-mark { border-color: var(--accent-line); border-radius: 10px; }
.upload-card { background: var(--surface); border-radius: 16px; }
.upload-card:hover { background: var(--accent-soft); }
input:not([type=checkbox],[type=file]), textarea, select { background: var(--surface); color: var(--ink); border-color: var(--line); border-radius: 9px; font-size: 13.5px; }
input:hover, textarea:hover, select:hover { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--dim); }
select option { background: var(--surface); color: var(--ink); }
label { color: var(--ink); font-size: 12.5px; font-weight: 550; }
dialog { background: var(--surface); border-color: var(--line); border-radius: 20px; }
dialog::backdrop { background: var(--backdrop); }
.dialog-actions { background: var(--bg); }
.composer-rule>.brand-workflow-icon { color: var(--accent); }
#guide-dialog input[type=file]::file-selector-button { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.appearance-note { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.brand-palette .swatch { border-color: var(--line); }
.swatch.jade { background: #177760; }
.swatch.mint { background: #e0f2e8; }
.swatch.coral { background: #f3a58c; }
.swatch.cloud { background: #f5f8f4; }
.swatch.ink { background: #183e36; }
#toast { background: var(--surface); color: var(--ink); border-color: var(--accent-line); border-radius: 12px; }
.skip-link { background: var(--accent); color: var(--primary-text); }
@media(max-width:1190px) {
  .wordmark { gap: 7px; padding-left: 5px; }
  .wordmark>span { font-size: 25px; }
  .wordmark .brand-symbol { width: 36px; height: 36px; flex-basis: 36px; }
  .stat { padding: 16px; }
  .stat>.icon { padding: 8px; }
}
@media(max-width:920px) {
  .wordmark>span { font-size: 22px; }
  .wordmark small { font-size: 9px; letter-spacing: 1px; }
  .wordmark .brand-symbol { width: 30px; height: 30px; flex-basis: 30px; }
  .nav-item { font-size: 12px; }
  .topbar-right { gap: 12px; }
}
@media(max-width:650px) {
  .wordmark>span { font-size: 28px; }
  .wordmark .brand-symbol { width: 40px; height: 40px; flex-basis: 40px; }
  .wordmark small { font-size: 10px; }
  .nav-item { font-size: 13.5px; }
  .topbar-right { gap: 8px; }
  .topbar-right .local-indicator { display: none; }
  .theme-toggle { font-size: 12px; min-width: 90px; }
  .hero h2 { font-size: 29px; }
  .hero p { font-size: 12.5px; }
  .stat>.icon { padding: 8px; width: 16px; height: 16px; }
  .hero-map .map-plan:after, .hero-map .map-comment:after { border-color: var(--accent-line); }
}


/* Component polish (02 Nov 2026): one focus ring, consistent control states, semantic feedback colours. */
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn { border-radius: 10px; font-weight: 600; transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
.secondary:hover { border-color: var(--line-strong); }
input:not([type=checkbox],[type=file]):focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
.form-error { color: var(--red); }
.result-banner { background: var(--amber-soft); border-color: var(--amber-line); }
.result-banner.success { background: var(--green-soft); border-color: var(--green-line); }
.nav-item { font-weight: 500; }
.nav-item.active { box-shadow: inset 0 0 0 1px var(--accent-line); }
.panel { border-color: var(--line); }
.wordmark small { font-size: 8.5px; letter-spacing: 1.2px; white-space: nowrap; }
#toast { border-color: var(--line-strong); box-shadow: 0 12px 32px var(--shadow-color); }
@media (max-width: 650px) {
  /* 16px stops mobile browsers zooming into a field on focus. */
  input:not([type=checkbox],[type=file]), textarea, select { font-size: 16px; }
}

/* Design audit batch (02 Nov 2026): compact headers (U5), simulation chip (U15), sidebar count (U12), Today (U1). */
main { padding-top: 26px; }
.page-heading { margin-bottom: 22px; align-items: center; }
.page-heading h1 { font-size: 28px; letter-spacing: -.8px; line-height: 1.2; }
.page-heading p { margin-top: 4px; font-size: 14px; }
.sim-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--amber-line); border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.sim-chip .icon { width: 13px; height: 13px; }
.nav-item b.nav-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--primary-text); font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.6; }
.profile span:not(.profile-dot) { line-height: 1.4; }
.today-title { font-size: 16px; margin: 0 0 10px; }
.today-queue ul, .today-posts { list-style: none; margin: 0; padding: 0; }
.today-queue ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.today-item { --tone: var(--muted); --tone-soft: var(--surface-alt); display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; }
button.today-item:hover { border-color: var(--line-strong); background: var(--surface-alt); }
.today-item.tone-rose { --tone: var(--rose); --tone-soft: var(--rose-soft); }
.today-item.tone-accent { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.today-item.tone-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.today-item.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.today-item.tone-blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.today-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--tone-soft); color: var(--tone); }
.today-icon .icon { width: 19px; height: 19px; }
.today-text { min-width: 0; display: grid; gap: 3px; }
.today-text strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.today-text small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-go { margin-left: auto; width: 18px; height: 18px; color: var(--dim); flex: 0 0 auto; }
.today-loading { color: var(--muted); }
.today-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.today-post { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; font: inherit; }
.today-posts li:last-child .today-post { border-bottom: 0; }
.today-post:hover strong { color: var(--accent); }
.today-post > span:not(.platform) { min-width: 0; display: grid; gap: 2px; }
.today-post strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.today-post small { font-size: 12.5px; color: var(--muted); }
.today-post .badge { margin-left: auto; }
.today-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
@media (max-width: 900px) { .today-queue ul, .today-columns, .today-start { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 650px) { .page-heading h1 { font-size: 25px; } main { padding-top: 20px; } .today-item { min-height: 64px; padding: 12px 14px; } }

/* Inbox list-to-detail on narrow screens (U4), calendar week/agenda views (U6), no side stripes (U13). */
.inbox-back { display: none; }
@media (max-width: 920px) {
  .inbox-back { display: inline-flex; margin-right: 2px; }
  .inbox-layout.show-list .conversation { display: none; }
  .inbox-layout.show-detail .comment-list { display: none; }
}
@media (max-width: 650px) {
  .conversation .reply-actions { position: sticky; bottom: 0; z-index: 2; margin: 13px -16px 0; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); }
  .heading-actions { justify-content: flex-start; }
}
.comment-row { border-left: 0; }
.comment-row.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.calendar-event, .calendar-event.blue { border-left-width: 1px; border-left-color: inherit; }
.calendar-event { border-color: var(--accent-line); border-radius: 8px; }
.calendar-event.blue { border-color: var(--blue-line); }
.calendar-event > span { color: var(--accent); font-weight: 600; }
.calendar-event.blue > span { color: var(--blue); }
.calendar-cell { min-height: 108px; }
.week-board .calendar-cell.week-cell { min-height: 320px; }
.agenda { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 18px; }
.agenda h3 { font-size: 14px; margin: 0 0 8px; color: var(--ink); }
.agenda-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.agenda .calendar-event, .agenda-earlier .calendar-event { margin-top: 0; padding: 12px; }
.agenda .calendar-event strong { font-size: 14px; }
.agenda-earlier { margin: 0 0 24px; }
.agenda-earlier summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 10px; }

/* Loading and busy states (U7), feedback motion (U9), guide cards (U10), activity (U11), command menu (U14). */
.boot-skeleton { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sk-side { background: var(--surface); border-right: 1px solid var(--line); }
.sk-main { display: grid; align-content: start; gap: 16px; padding: 120px 38px 38px; }
.skeleton-stack { display: grid; gap: 14px; }
.skeleton { height: 64px; border-radius: 14px; background: var(--surface-alt); }
.skeleton.short { height: 36px; width: 40%; }
.skeleton.tall { height: 420px; }
@media (max-width: 650px) { .boot-skeleton { grid-template-columns: 1fr; } .sk-side { display: none; } .sk-main { padding: 90px 18px; } }
.guide-facts { display: grid; gap: 2px; margin-top: auto; }
.guide-facts strong { font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 600; color: var(--cover-ink); }
.guide-facts span { font-size: 12.5px; color: var(--cover-ink); opacity: .8; }
.guide-used { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 10px 0; }
.guide-used-label { width: 100%; font-size: 12px; color: var(--muted); }
.activity-day { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 0 4px; letter-spacing: .02em; }
.activity-day:first-child { margin-top: 0; }
.activity-row .text-button { margin-top: 4px; font-size: 12px; }
.cmd-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12.5px; }
.cmd-trigger:hover { border-color: var(--line-strong); color: var(--ink); }
.cmd-trigger .icon { width: 15px; height: 15px; }
.cmd-trigger kbd { font: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); }
#command-menu { width: min(560px, calc(100vw - 32px)); max-width: none; padding: 0; border-radius: 16px; top: 12vh; margin: 0 auto; }
#command-menu input { border: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; min-height: 54px; padding: 14px 18px; font-size: 15px; }
#command-menu input:focus { box-shadow: none; }
#cmd-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
#cmd-list li { padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
#cmd-list li[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
#cmd-list li:hover { background: var(--surface-alt); }
#cmd-list .cmd-empty { color: var(--muted); cursor: default; }
.cmd-hint { margin: 0; padding: 8px 16px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 920px) { .cmd-trigger span, .cmd-trigger kbd { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: hl-pulse 1.4s ease-in-out infinite; }
  .btn { transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out, transform .12s ease-out; }
  .btn:active:not(:disabled) { transform: scale(.98); }
  .badge.flash { animation: hl-pop .2s cubic-bezier(.22, 1, .36, 1); }
  .cv-edge.fresh { animation: hl-fade .14s ease-out; }
  #toast { transition: opacity .2s cubic-bezier(.22, 1, .36, 1), transform .2s cubic-bezier(.22, 1, .36, 1); }
  .today-item, .today-post, .comment-row { transition: background .15s ease-out, border-color .15s ease-out; }
}
@keyframes hl-pulse { 50% { opacity: .55; } }
@keyframes hl-pop { from { transform: scale(.9); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes hl-fade { from { opacity: .2; } to { opacity: 1; } }

/* Windows High Contrast / forced colours (U16): keep selection, state chips and canvas lines visible. */
@media (forced-colors: active) {
  .nav-item.active, .segmented button.selected, .comment-row.selected, .cv-node.selected, #cmd-list li[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .badge, .sim-chip, .cv-kind, .cv-port, .today-item, .nav-item b.nav-count { border: 1px solid CanvasText; }
  .cv-edge, .cv-edge.related { stroke: CanvasText; }
  .cv-edges marker path { fill: CanvasText; }
  .mm-node { fill: GrayText; } .mm-view { stroke: Highlight; }
  .cv-node.has-error { border: 2px dashed CanvasText; }
}
.activity-panel .activity-day:first-child { margin-top: 6px; }
/* Day "add" buttons appear on hover; they must also appear for keyboard focus and on touch screens. */
.add-date:focus-visible, .calendar-cell:focus-within .add-date { opacity: 1; }
@media (hover: none) { .add-date { opacity: 1; } }

/* Publish confirmation (U-01) and the Today retry action (U-02). */
#publish-dialog { max-width: 520px; }
#publish-dialog .dialog-heading { padding: 22px 26px; }
#publish-dialog .dialog-heading h2 { font-size: 20px; }
.publish-body { padding: 18px 26px 6px; }
.publish-body p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.publish-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.publish-facts dt { color: var(--muted); }
.publish-facts dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
#publish-dialog .dialog-actions { padding: 16px 26px; }
.today-retry { margin-left: auto; flex: 0 0 auto; }
