/* Site styles. Every colour comes from theme tokens in /build/themes.css. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-sm: 5px;
  --r: 8px;
  --r-lg: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1180px;
  --shadow-lg: 0 30px 80px -40px rgb(0 0 0 / 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }
html:not(.js) .js-only { display: none !important; }
.js .no-js-only { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: var(--r); background: var(--surface); }
.skip:focus { top: 12px; }

/* Buttons and small controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r);
  background: none; color: var(--text); font: 500 14px/1 var(--font); text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.btn.secondary { background: var(--surface); border-color: var(--control-border); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--surface-2); }
.cta-row .btn { height: 42px; padding: 0 20px; font-size: 15px; }
kbd {
  padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface-2); color: var(--muted); font: 500 11px/1.4 var(--font);
}
.icon-btn {
  width: 30px; height: 30px; border: 0; border-radius: var(--r-sm); background: none;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn {
  padding: 4px 0; border: 0; background: none; color: var(--accent-text);
  font: 500 13px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  background: #f3e5ce; color: #3a2818; box-shadow: inset 0 0 0 1px #d6b88e;
  font: 600 18px/1 Georgia, "Times New Roman", serif;
}
.nav { display: flex; gap: 20px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: 6px; margin-left: auto; }
.search-btn { color: var(--muted); }
.swatch-icon {
  width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--control-border);
  background: conic-gradient(var(--accent) 0 34%, var(--surface) 0 67%, var(--bg) 0);
}

/* Appearance popover */
.theme-panel {
  position: fixed; inset: 66px 20px auto auto; margin: 0;
  width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 84px); overflow: auto;
  padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); box-shadow: 0 24px 64px -24px rgb(0 0 0 / 0.45);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), display 0.18s allow-discrete, overlay 0.18s allow-discrete;
}
.theme-panel:not(:popover-open) { opacity: 0; transform: translateY(-6px); }
@starting-style { .theme-panel:popover-open { opacity: 0; transform: translateY(-6px); } }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { font-size: 16px; font-weight: 600; }
.panel-sub { margin-top: 2px; color: var(--muted); font-size: 13px; }
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
  min-width: 0; margin: 14px 0 0; padding: 0; border: 0;
}
.theme-card {
  position: relative; display: grid; gap: 1px; padding: 10px 10px 9px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  font-size: 13px; cursor: pointer; transition: border-color 0.15s var(--ease);
}
.theme-card:hover { border-color: var(--control-border); }
.theme-card:has(input:checked) { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.theme-card:has(input:checked)::after {
  content: "\2713"; position: absolute; top: 26px; right: 10px; color: var(--accent-text); font-weight: 700;
}
.theme-card:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.swatch { display: flex; height: 14px; margin-bottom: 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.swatch span { flex: 1; }
.theme-name { font-weight: 600; }
.theme-mode { color: var(--muted); font-size: 12px; }

/* Hero */
.hero { padding-block: 72px 8px; }
.hero-copy { display: grid; justify-items: center; text-align: center; }
.eyebrow { margin-bottom: 14px; color: var(--accent-text); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { font: 600 clamp(40px, 6vw, 72px)/1.03 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.lede { max-width: 46ch; margin-top: 20px; color: var(--muted); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.soon { color: var(--muted); font-size: 14px; }
.hero-themes { display: grid; justify-items: center; margin-top: 30px; }
.swatch-label { margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
/* min-height reserves the strip's rows so the dots, built by JavaScript, do not shift the layout. */
.theme-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 780px; min-width: 0; min-height: 36px; margin: 0; padding: 0; border: 0; }
.theme-dot {
  position: relative; display: block; width: 36px; height: 36px; padding: 3px;
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
}
.theme-dot .swatch { height: 100%; margin: 0; border: 0; border-radius: 50%; transform: rotate(-45deg); }
.theme-dot:hover { transform: translateY(-2px); border-color: var(--control-border); }
.theme-dot:has(input:checked) { padding: 2px; border: 2px solid var(--accent-text); }
.theme-dot:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* App window replica, straight on */
.app-window {
  margin: 48px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: 0 50px 110px -60px rgb(0 0 0 / 0.55), 0 2px 8px rgb(0 0 0 / 0.06);
}
.js .app-window { animation: rise 0.8s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.app-titlebar {
  display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 14px;
  border-bottom: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 12px;
}
.app-title { display: inline-flex; align-items: center; gap: 8px; }
.app-mark { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: #f3e5ce; color: #3a2818; font: 600 11px/1 Georgia, serif; }
.win-controls { display: flex; gap: 18px; }
.win-controls span { width: 10px; height: 10px; border: 1px solid var(--muted); border-radius: 2px; }
.app-body { display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.app-sidebar { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--line); background: var(--bg); font-size: 13px; }
.side-search {
  display: flex; align-items: center; justify-content: space-between; height: 30px; margin-bottom: 8px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: 12px;
}
.side-nav, .side-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.side-nav li { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: var(--r-sm); }
.side-nav li.is-active { background: var(--surface-2); font-weight: 600; }
.side-count { color: var(--muted); font-size: 11px; }
.side-heading { margin: 16px 8px 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.side-list li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; }
.side-check { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 3px; background: var(--accent); }
.side-check::after { content: "\2713"; color: var(--on-accent); font-size: 10px; line-height: 1; }
.side-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--bar); }

.cal { display: flex; flex-direction: column; min-width: 0; }
.cal-toolbar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tb-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tb-arrows { color: var(--muted); font-size: 18px; }
.cal-range { font-size: 15px; font-weight: 600; white-space: nowrap; }
.tb-seg { display: flex; margin-left: auto; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 12px; }
.tb-seg span { padding: 3px 10px; border-radius: 3px; color: var(--muted); }
.tb-seg .is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.tb-event { height: 30px; padding: 0 12px; font-size: 13px; }
.cal-head { display: grid; grid-template-columns: 52px repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal-allday, .cal-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.cal-day { padding: 8px 10px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.cal-date { margin-left: 4px; color: var(--text); font-size: 17px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.cal-day.is-today, .cal-day.is-today .cal-date { color: var(--accent-text); }
.cal-day.is-today::after { content: "Today"; margin-left: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.cal-allday { border-bottom: 1px solid var(--line); }
.cal-gutter { padding: 8px 8px 0 0; color: var(--muted); font-size: 10px; text-align: right; }
.cal-allday-ev { margin: 5px 6px; padding: 2px 8px; border-left: 3px solid var(--bar); border-radius: 4px; background: var(--fill); font-size: 12px; font-weight: 500; }
.cal-body { --q: 14px; }
.cal-hours { display: grid; grid-auto-rows: calc(var(--q) * 4); color: var(--muted); font-size: 10px; text-align: right; }
.cal-hours span { padding-right: 8px; transform: translateY(-6px); }
.cal-hours span:first-child { visibility: hidden; }
.cal-grid {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(30, var(--q));
  margin: 0; padding: 0; list-style: none;
  background:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--q) * 4)),
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 20% 100%;
}
.cal-ev {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; margin: 1px 4px 2px; overflow: hidden; padding: 3px 8px;
  border-left: 3px solid var(--bar); border-radius: 4px; background: var(--fill); font-size: 12px; line-height: 1.25;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.cal-ev:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgb(0 0 0 / 0.4); }
.js .cal-ev { animation: ev-in 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms + 250ms); }
@keyframes ev-in { from { opacity: 0; transform: translateY(6px); } }
.cal-ev .ev-title { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev .ev-time { font-size: 11px; }
.cal-ev[data-len="0.5"] .ev-time { display: none; }
.cal-grid[data-now]::after {
  content: ""; position: relative; z-index: 1; grid-column: var(--now-col); grid-row: var(--now-row);
  align-self: start; height: 2px; margin-top: -1px; background: var(--danger);
}

/* Event placement from data attributes (no inline styles under CSP). Columns are weekdays;
   rows are quarter hours from 8:00, covering every start and span the grid can show. */
.cal-ev[data-day="0"] { grid-column: 1; } .cal-ev[data-day="1"] { grid-column: 2; } .cal-ev[data-day="2"] { grid-column: 3; } .cal-ev[data-day="3"] { grid-column: 4; } .cal-ev[data-day="4"] { grid-column: 5; }
.cal-ev[data-start="8"] { grid-row-start: 1; } .cal-ev[data-start="8.25"] { grid-row-start: 2; } .cal-ev[data-start="8.5"] { grid-row-start: 3; }
.cal-ev[data-start="8.75"] { grid-row-start: 4; } .cal-ev[data-start="9"] { grid-row-start: 5; } .cal-ev[data-start="9.25"] { grid-row-start: 6; }
.cal-ev[data-start="9.5"] { grid-row-start: 7; } .cal-ev[data-start="9.75"] { grid-row-start: 8; } .cal-ev[data-start="10"] { grid-row-start: 9; }
.cal-ev[data-start="10.25"] { grid-row-start: 10; } .cal-ev[data-start="10.5"] { grid-row-start: 11; } .cal-ev[data-start="10.75"] { grid-row-start: 12; }
.cal-ev[data-start="11"] { grid-row-start: 13; } .cal-ev[data-start="11.25"] { grid-row-start: 14; } .cal-ev[data-start="11.5"] { grid-row-start: 15; }
.cal-ev[data-start="11.75"] { grid-row-start: 16; } .cal-ev[data-start="12"] { grid-row-start: 17; } .cal-ev[data-start="12.25"] { grid-row-start: 18; }
.cal-ev[data-start="12.5"] { grid-row-start: 19; } .cal-ev[data-start="12.75"] { grid-row-start: 20; } .cal-ev[data-start="13"] { grid-row-start: 21; }
.cal-ev[data-start="13.25"] { grid-row-start: 22; } .cal-ev[data-start="13.5"] { grid-row-start: 23; } .cal-ev[data-start="13.75"] { grid-row-start: 24; }
.cal-ev[data-start="14"] { grid-row-start: 25; } .cal-ev[data-start="14.25"] { grid-row-start: 26; } .cal-ev[data-start="14.5"] { grid-row-start: 27; }
.cal-ev[data-start="14.75"] { grid-row-start: 28; } .cal-ev[data-start="15"] { grid-row-start: 29; } .cal-ev[data-start="15.25"] { grid-row-start: 30; }
.cal-ev[data-len="0.25"] { grid-row-end: span 1; } .cal-ev[data-len="0.5"] { grid-row-end: span 2; } .cal-ev[data-len="0.75"] { grid-row-end: span 3; }
.cal-ev[data-len="1"] { grid-row-end: span 4; } .cal-ev[data-len="1.25"] { grid-row-end: span 5; } .cal-ev[data-len="1.5"] { grid-row-end: span 6; }
.cal-ev[data-len="1.75"] { grid-row-end: span 7; } .cal-ev[data-len="2"] { grid-row-end: span 8; } .cal-ev[data-len="2.25"] { grid-row-end: span 9; }
.cal-ev[data-len="2.5"] { grid-row-end: span 10; } .cal-ev[data-len="2.75"] { grid-row-end: span 11; } .cal-ev[data-len="3"] { grid-row-end: span 12; }

.meetings { --bar: var(--ev-meetings); --fill: var(--ev-meetings-fill); }
.deep-work { --bar: var(--ev-deep-work); --fill: var(--ev-deep-work-fill); }
.planning { --bar: var(--ev-planning); --fill: var(--ev-planning-fill); }
.personal { --bar: var(--ev-personal); --fill: var(--ev-personal-fill); }

/* Sections */
.section { padding-block: 76px; border-top: 1px solid var(--line); }
.section-head { max-width: 580px; margin-bottom: 28px; }
.section-head h2 { font: 600 clamp(28px, 3.4vw, 40px)/1.12 var(--display); letter-spacing: -0.025em; }
.section-head p:last-child { margin-top: 10px; color: var(--muted); font-size: 16px; }
.demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.demo-note { color: var(--muted); font-size: 13px; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }

/* Event editor demo */
.event-demo { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 28px; align-items: start; }
.modal-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-body { display: grid; gap: 12px; padding: 16px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.field > legend { margin-bottom: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Date and time pairs need a full row each or the native inputs truncate. */
.field-row:has(.date-time) { grid-template-columns: 1fr; }
input:not([type="checkbox"], [type="radio"]), select, textarea {
  width: 100%; min-width: 0; height: 34px; padding: 0 10px;
  border: 1px solid var(--control-border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); font: 14px var(--font);
}
textarea { height: auto; padding: 8px 10px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 0; border-color: var(--accent-text); }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger); }
.field-error { color: var(--danger); font-size: 12px; font-weight: 600; }
.hint { color: var(--muted); font-size: 12px; }
.colour-row { display: flex; align-items: center; gap: 8px; }
.colour-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ev-meetings); }
select:disabled { cursor: not-allowed; opacity: 0.65; }
.check { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 14px; cursor: pointer; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.date-time { display: grid; grid-template-columns: 1.35fr 1fr; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--control-border); border-radius: 999px; background: var(--surface);
  font-size: 13px; cursor: pointer;
}
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); font-weight: 600; }
.chip:has(input:checked)::after { content: "\2713"; color: var(--accent-text); font-size: 12px; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bar); }

.mini-week-wrap { position: sticky; top: 84px; min-width: 0; }
.mini-week {
  --hour: 34px;
  display: grid; grid-template-columns: 46px repeat(5, minmax(0, 1fr));
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-lg); font-size: 12px;
}
.mw-head { padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-head.is-today { color: var(--accent-text); }
.mw-hours { position: relative; }
.mw-hour { height: var(--hour); padding-right: 6px; color: var(--muted); font-size: 11px; text-align: right; transform: translateY(-7px); }
.mw-day {
  position: relative; height: calc(var(--hour) * 12); border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour));
}
.mw-ev {
  position: absolute; left: 3px; right: 3px; top: calc(var(--start) * var(--hour)); height: calc(var(--len) * var(--hour) - 2px);
  overflow: hidden; padding: 3px 6px; border-left: 3px solid var(--bar); border-radius: 4px;
  background: var(--fill); font-size: 11px; line-height: 1.3;
  transition: top 0.2s var(--ease), height 0.2s var(--ease), background-color 0.2s var(--ease);
}
.mw-ev strong { display: block; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mw-ev.is-preview { outline: 2px dashed var(--accent-text); outline-offset: -2px; z-index: 2; }
.mw-ev.is-new { animation: drop 0.45s var(--ease); }

/* Task board demo */
.quick-add {
  display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 6px 6px 6px 14px;
  border: 1px solid var(--control-border); border-radius: var(--r-lg); background: var(--surface);
}
.quick-add:focus-within { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.quick-add input:not([type]) { height: 36px; padding: 0; border: 0; background: transparent; }
.quick-add input:focus-visible { outline: none; box-shadow: none; }
.quick-plus { color: var(--muted); font-size: 18px; }
.task-demo > .field-error { margin-top: 6px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.column { min-height: 240px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); transition: border-color 0.15s var(--ease); }
.column.is-drop { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.column h3 { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; font-size: 13px; font-weight: 600; }
.count { color: var(--muted); font-weight: 500; }
.status-dot { width: 9px; height: 9px; border: 2px solid var(--muted); border-radius: 50%; }
[data-status="doing"] .status-dot { border-color: var(--ev-meetings); background: var(--ev-meetings); }
[data-status="done"] .status-dot { border-color: var(--ev-personal); background: var(--ev-personal); }
.column ul { display: grid; gap: 8px; min-height: 60px; margin: 0; padding: 0; list-style: none; }
.task { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); cursor: grab; }
.task.is-dragging { opacity: 0.5; }
.task.is-new { animation: drop 0.35s var(--ease); }
.task-title { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.task-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.task-tag { padding: 1px 6px; border-left: 3px solid var(--bar); border-radius: 4px; background: var(--fill); font-size: 11px; }
.task-actions { display: flex; gap: 4px; margin-left: auto; }
.task-actions button {
  height: 26px; padding: 0 8px; border: 1px solid var(--control-border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: 500 12px var(--font); cursor: pointer;
}
.task-actions button:hover { background: var(--surface-2); }

/* Tour */
.tabs {
  display: flex; gap: 4px; width: fit-content; max-width: 100%; margin-bottom: 18px; padding: 4px; overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
}
[role="tab"] { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 14px var(--font); cursor: pointer; }
[role="tab"]:hover { color: var(--text); }
[role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.14); }
.tab-panel img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
/* Hidden before tour.js runs so inactive screenshots are not fetched. */
.js .tab-panel[data-tab-inactive] { display: none; }
html:not(.js) .tab-panel + .tab-panel { margin-top: 20px; }

/* Closing and footer */
.closing { padding-block: 96px; text-align: center; }
.closing h2 { font: 600 clamp(30px, 4vw, 48px)/1.1 var(--display); letter-spacing: -0.03em; }
.closing p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 22px; }

/* Command palette */
.palette {
  width: min(560px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text);
  box-shadow: 0 30px 90px -20px rgb(0 0 0 / 0.55);
}
.palette::backdrop { background: rgb(0 0 0 / 0.35); backdrop-filter: blur(2px); }
.palette [role="combobox"] { height: 52px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 16px; }
.palette [role="combobox"]:focus-visible { outline: none; border-bottom: 2px solid var(--accent-text); }
#palette-list { max-height: 320px; margin: 0; padding: 6px; overflow: auto; list-style: none; }
[role="option"] { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: var(--r); font-size: 14px; cursor: pointer; }
[role="option"][aria-selected="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent-text); }
.palette-hint { color: var(--muted); font-size: 12px; }
.palette-empty { padding: 18px; color: var(--muted); }
.palette-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* Responsive */
@media (max-width: 1100px) {
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { display: none; }
}
@media (max-width: 900px) {
  .event-demo { grid-template-columns: 1fr; }
  .mini-week-wrap { position: static; }
}
@media (max-width: 640px) {
  .nav, .search-btn kbd { display: none; }
  #theme-current { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .theme-panel { inset: 66px 16px auto 16px; width: auto; }
  .hero { padding-block: 44px 0; }
  .lede { font-size: 16px; }
  .theme-strip { min-height: 124px; }
  .app-window { margin-top: 32px; }
  .tb-chip, .tb-arrows, .tb-seg { display: none; }
  .cal-toolbar { justify-content: space-between; height: 44px; padding: 0 10px; }
  .cal-range { font-size: 13px; }
  .cal-head { grid-template-columns: 28px repeat(5, minmax(0, 1fr)); }
  .cal-allday, .cal-body { grid-template-columns: 28px minmax(0, 1fr); }
  .cal-body { --q: 11px; }
  .cal-day { padding: 6px 4px; font-size: 9px; }
  .cal-date { display: block; margin: 0; font-size: 14px; }
  .cal-day.is-today::after { display: none; }
  .cal-hours { font-size: 8px; }
  .cal-hours span { padding-right: 3px; }
  .cal-ev { margin: 1px 2px; padding: 2px 3px; border-left-width: 2px; font-size: 9.5px; }
  .cal-ev .ev-title { white-space: normal; overflow-wrap: anywhere; }
  /* Half-hour blocks have room for one line only: ellipsis rather than a cut-off second line. */
  .cal-ev[data-len="0.5"] .ev-title { white-space: nowrap; }
  .cal-ev .ev-time { display: none; }
  .section { padding-block: 52px; }
  .field-row, .board { grid-template-columns: 1fr; }
  .mini-week { --hour: 28px; grid-template-columns: 34px repeat(5, minmax(0, 1fr)); font-size: 11px; }
  .mw-hour { font-size: 10px; }
  .closing { padding-block: 64px; }
}
