@font-face {
  font-family: "Lato Extended";
  src: url("assets/fonts/Lato-Extended-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lato Extended";
  src: url("assets/fonts/Lato-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --sidebar-width: 236px;
  --topbar-height: 52px;
  --bg: #0a0a0c;
  --sidebar: #0b0b0d;
  --frame: #101114;
  --surface: #15161a;
  --surface-raised: #191a1f;
  --surface-hover: #1c1e23;
  --surface-active: #202229;
  --border: #25272e;
  --border-soft: #1e2025;
  --text: #f3f3f5;
  --text-soft: #c3c5cc;
  --muted: #898d97;
  --faint: #5c606a;
  --accent: #8b8cf8;
  --accent-strong: #aaaaff;
  --accent-soft: rgba(139, 140, 248, .13);
  --green: #5ac897;
  --red: #e47984;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --focus: 0 0 0 3px rgba(139, 140, 248, .3);
  --font-ui: "Lato Extended", "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--font-ui);
  font-size: 17px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #efeff1;
  --sidebar: #f1f1f3;
  --frame: #fbfbfc;
  --surface: #fff;
  --surface-raised: #fff;
  --surface-hover: #f4f4f6;
  --surface-active: #ececf0;
  --border: #dedee4;
  --border-soft: #e9e9ed;
  --text: #202126;
  --text-soft: #50535b;
  --muted: #777b84;
  --faint: #a4a7ae;
  --accent: #6466db;
  --accent-strong: #5557cb;
  --accent-soft: rgba(100, 102, 219, .1);
}

* { box-sizing: border-box; }
html { background: var(--bg); font-family: var(--font-ui); -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 1rem; font-weight: 400; line-height: 1.5; font-kerning: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { color: inherit; font: inherit; font-family: var(--font-ui); }
button, select { cursor: pointer; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(139, 140, 248, .32); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--muted) 38%, transparent); background-clip: padding-box; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: none; box-shadow: var(--focus); }
button, a, .life-card, .queue-link { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:active, .life-card:active, .queue-link:active { transform: scale(.97); }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; padding: 10px 10px 12px; background: var(--sidebar); color: var(--text-soft); border-right: 1px solid var(--border-soft); }
.workspace-switcher { display: flex; align-items: center; min-height: 50px; padding: 5px 8px; gap: 11px; }
.workspace-switcher > div { display: flex; flex: 1; min-width: 0; flex-direction: column; line-height: 1.25; }
.workspace-switcher strong { color: var(--text); font-size: .9rem; }
.workspace-switcher span:not(.avatar) { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 9px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 24%, var(--surface)), var(--surface)); color: var(--text); font-size: .72rem; font-weight: 600; letter-spacing: .04em; box-shadow: inset 0 1px rgba(255,255,255,.06); }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: transparent; color: var(--muted); transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease; }
.sidebar-close, .menu-button { display: none; }

.sidebar-nav { display: grid; gap: 2px; margin-top: 10px; }
.sidebar-nav a, .project-link, .sidebar-footer button { display: flex; align-items: center; width: 100%; min-height: 36px; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; transition: transform 130ms var(--ease-out), color 130ms ease, background-color 130ms ease; }
.sidebar-nav a { padding: 0 9px; gap: 10px; font-size: .88rem; font-weight: 400; }
.sidebar-nav a.is-active { background: var(--surface-active); color: var(--text); }
.sidebar-nav a small { min-width: 21px; margin-left: auto; padding: 2px 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .69rem; text-align: center; }
.nav-icon { width: 18px; color: var(--faint); text-align: center; }
.sidebar-group { margin-top: 22px; }
.sidebar-label { margin: 0 9px 8px; color: var(--muted); font-size: .7rem; font-weight: 400; letter-spacing: .065em; text-transform: uppercase; }
.project-link { padding: 0 9px; gap: 10px; font-size: .84rem; }
.project-link i { width: 7px; height: 7px; border-radius: 50%; background: var(--area); box-shadow: 0 0 0 3px color-mix(in srgb, var(--area) 13%, transparent); }
.sidebar-spacer { flex: 1; }
.season-card { margin: 10px 2px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.season-card span { color: var(--muted); font-size: .7rem; font-weight: 400; letter-spacing: .065em; text-transform: uppercase; }
.season-card strong { display: block; margin-top: 7px; color: var(--text); font-size: .92rem; }
.season-card p { margin: 5px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.sidebar-footer { display: grid; gap: 2px; padding: 4px 0 0; }
.sidebar-footer button { justify-content: space-between; padding: 0 9px; font-size: .78rem; }
.sidebar-footer kbd { border: 0; color: var(--faint); font: inherit; }
.sidebar-footer p { margin: 8px 9px 0; color: var(--faint); font-size: .68rem; }

.main-frame { min-width: 0; height: 100vh; height: 100dvh; background: var(--frame); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-height); padding: 0 20px; border-bottom: 1px solid var(--border-soft); background: color-mix(in srgb, var(--frame) 92%, transparent); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-left { font-size: .86rem; }
.crumb-muted, .crumb-separator { color: var(--faint); }
.topbar-left strong { font-weight: 600; }
.search-button { display: flex; align-items: center; gap: 19px; min-height: 35px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 400; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.search-button kbd { border: 0; color: var(--faint); font: inherit; }
.deadline-pill { display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .78rem; }
.deadline-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.deadline-pill strong { color: var(--text-soft); font-weight: 600; }
.page-scroll { height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.page { width: 100%; }
.page-section { width: min(1280px, calc(100% - 64px)); margin: 0 auto; padding: 46px 0 80px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; }
strong, b { font-weight: 600; }
.hero-row, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.hero-row h1, .section-heading h1 { margin: 6px 0 7px; color: var(--text); font-size: clamp(2.5rem, 4.4vw, 3.6rem); font-weight: 400; line-height: 1.06; letter-spacing: normal; }
.hero-row > div > p:last-child, .section-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.45; }
.eyebrow, .section-kicker { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 400; letter-spacing: .075em; text-transform: uppercase; }
.season-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); font-size: .76rem; white-space: nowrap; }
.season-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.primary-button, .secondary-button, .quiet-button, .text-action, .delete-button { border-radius: 7px; font-weight: 600; transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.primary-button { min-height: 40px; padding: 0 17px; border: 1px solid color-mix(in srgb, var(--text) 78%, var(--border)); border-radius: 9px; background: var(--text); color: var(--bg); font-size: .82rem; font-weight: 400; }
.secondary-button, .quiet-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font-size: .79rem; }
.text-action { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; background: transparent; color: var(--muted); font-size: .8rem; }
.text-action span { color: var(--text-soft); }
.compact-button { min-height: 32px; padding: 0 11px; font-size: .74rem; white-space: nowrap; }
.delete-button { min-height: 32px; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--red) 28%, var(--border)); background: transparent; color: color-mix(in srgb, var(--red) 82%, var(--text-soft)); font-size: .74rem; font-weight: 400; }
.row-delete { border-color: transparent; color: var(--faint); opacity: .82; }

.capture-bar { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto auto auto; align-items: center; gap: 8px; margin-bottom: 18px; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.025); }
.capture-plus { padding-left: 5px; color: var(--accent-strong); font-size: 1.25rem; }
.capture-bar > input { min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; font-size: 1.04rem; }
.capture-bar > input::placeholder { color: var(--faint); }
.capture-select select { height: 38px; min-width: 150px; padding: 0 30px 0 10px; border: 1px solid var(--border-soft); border-radius: 7px; background: var(--surface-raised); color: var(--text-soft); font-size: .78rem; }
.when-select select { min-width: 126px; }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: inset 0 1px rgba(255,255,255,.018); }
.plan-panel { min-height: 500px; padding: 25px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-header.compact { align-items: center; }
.panel-header h2 { margin: 6px 0 0; font-size: 1.34rem; letter-spacing: normal; }
.panel-header > strong { font-size: 1.42rem; }
.plain-stat { color: var(--muted); font-size: .79rem; }
.day-progress, .large-progress, .life-progress { overflow: hidden; height: 5px; border-radius: 999px; background: var(--border-soft); }
.day-progress { margin: 18px 0 12px; }
.day-progress i, .large-progress i, .life-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.day-progress i { width: 100%; transform: scaleX(var(--progress, 0)); transform-origin: left center; transition: transform 820ms var(--ease-out); will-change: transform; }
.large-progress i, .life-progress i { width: var(--meter); }
.task-list { display: grid; }
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 11px; min-height: 62px; border-bottom: 1px solid var(--border-soft); transition: transform 250ms var(--ease-out), opacity 180ms ease, background-color 180ms ease; }
.task-row.is-animating { opacity: .62; }
.task-row:last-child { border-bottom: 0; }
.task-check { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--border)); border-radius: 7px; background: transparent; color: transparent; transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease; }
.task-check span { display: inline-block; font-size: .7rem; opacity: 0; transform: scale(.7) rotate(-10deg); transition: opacity 170ms ease, transform 250ms var(--ease-out); }
.task-main { min-width: 0; padding: 10px 0; background: transparent; text-align: left; }
.task-main strong { display: block; overflow: hidden; color: var(--text-soft); font-size: .94rem; font-weight: 400; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; transition: color 180ms ease, opacity 180ms ease, transform 250ms var(--ease-out); }
.task-main span { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--muted); font-size: .74rem; line-height: 1.25; }
.task-main i { width: 5px; height: 5px; border-radius: 50%; background: var(--area); }
.task-row.is-done .task-check { background: var(--accent); color: #fff; }
.task-row.is-done .task-check span { opacity: 1; transform: scale(1) rotate(0); }
.task-row.is-animating.is-done .task-check { background: transparent; color: transparent; }
.task-row.is-animating.is-done .task-check span { opacity: 0; transform: scale(.7) rotate(-10deg); }
.task-row.is-animating .task-main strong { opacity: .6; transform: translateY(3px); }
.task-row.is-done .task-main strong { color: var(--faint); text-decoration: line-through; }
.progress-count { display: inline-block; transform: translateY(0); opacity: 1; transition: transform 220ms var(--ease-out), opacity 180ms ease; }
.progress-count.is-updating { transform: translateY(-2px); opacity: .9; }
.important-mark { color: color-mix(in srgb, #e7ba62 65%, var(--faint)); font-size: .85rem; }
.more-button { width: 28px; height: 28px; border-radius: 6px; background: transparent; color: var(--faint); font-size: .65rem; letter-spacing: .08em; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.empty-state { padding: 40px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; color: var(--text-soft); font-size: .9rem; }
.empty-state p { margin: 7px auto 0; max-width: 440px; font-size: .74rem; line-height: 1.55; }
.quiet-empty { margin: 0; padding: 23px 4px; color: var(--faint); font-size: .75rem; }
.today-side { display: grid; gap: 14px; }
.pulse-panel, .scratch-panel { padding: 21px; }
.pulse-panel { transition: background-color 420ms var(--ease-out), border-color 420ms var(--ease-out); }
.pulse-panel .section-kicker, .pulse-panel .pulse-line strong, .pulse-panel .pulse-line span { transition: color 420ms var(--ease-out); }
.pulse-panel.is-complete { border-color: color-mix(in srgb, var(--green) 48%, var(--border)); background: color-mix(in srgb, var(--green) 11%, var(--surface)); box-shadow: inset 0 1px rgba(255,255,255,.025), 0 12px 34px rgba(90,200,151,.08); }
.pulse-panel.is-complete .section-kicker { color: color-mix(in srgb, var(--green) 75%, var(--muted)); }
.pulse-panel.is-complete .pulse-line strong { color: var(--green); }
.pulse-panel.is-complete .pulse-line span { color: color-mix(in srgb, var(--green) 70%, var(--text-soft)); }
.pulse-line { display: flex; flex-direction: column; margin-top: 18px; }
.pulse-line strong { font-size: 1.2rem; }
.pulse-line span { margin-top: 5px; color: var(--muted); font-size: .78rem; }
.day-rule { margin: 20px -21px -21px; padding: 17px 21px; border-top: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--accent-soft); transition: background-color 420ms var(--ease-out), border-top-color 420ms var(--ease-out); }
.pulse-panel.is-complete .day-rule { border-top-color: color-mix(in srgb, var(--green) 42%, var(--border)); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.day-rule span { color: var(--accent-strong); font-size: .68rem; font-weight: 400; letter-spacing: .075em; text-transform: uppercase; }
.day-rule p { margin: 7px 0 0; color: var(--text-soft); font-size: .82rem; line-height: 1.45; }
.scratch-panel .panel-header span { color: var(--faint); font-size: .68rem; }
.panel-explainer { max-width: 34rem; margin: 14px 0 10px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.scratch-panel textarea, .reflection-panel textarea { width: 100%; resize: vertical; border: 1px solid var(--border-soft); border-radius: 8px; outline: 0; background: var(--frame); color: var(--text-soft); line-height: 1.55; }
.scratch-panel textarea { min-height: 158px; padding: 13px; font-size: .84rem; }
.scratch-panel textarea:focus, .reflection-panel textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
.queue-link { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.queue-link strong { display: block; margin-top: 5px; font-size: .94rem; }
.queue-link > span { color: var(--muted); font-size: .75rem; }

.notes-panel { margin-top: 18px; overflow: hidden; background: color-mix(in srgb, var(--surface) 86%, var(--frame)); }
.note-tabbar { display: flex; align-items: flex-end; min-height: 48px; padding: 7px 9px 0; border-bottom: 1px solid var(--border-soft); background: color-mix(in srgb, var(--bg) 52%, var(--surface)); }
.note-tabs { display: flex; flex: 1; min-width: 0; gap: 3px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.note-tabs::-webkit-scrollbar { display: none; }
.note-tab { display: flex; flex: 0 1 210px; align-items: center; min-width: 112px; max-width: 230px; height: 40px; padding: 0 13px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 400; text-align: left; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.note-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-tab.is-active { border-color: var(--border-soft); background: var(--surface); color: var(--text); }
.note-add-tab { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; margin: 0 0 1px 4px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 1.15rem; font-weight: 400; transition: transform 130ms var(--ease-out), background-color 130ms ease, color 130ms ease; }
.note-commandbar { display: flex; align-items: center; justify-content: space-between; min-height: 49px; gap: 18px; padding: 7px 12px 7px 18px; border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.note-location { display: flex; min-width: 0; align-items: center; gap: 7px; color: var(--faint); font-size: .74rem; }
.note-location i { font-style: normal; }
.note-location strong { overflow: hidden; color: var(--text-soft); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.note-command-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.note-save-state { min-width: 75px; color: var(--faint); font-size: .67rem; text-align: right; }
.note-mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--frame); }
.note-mode-switch button { min-width: 64px; height: 29px; padding: 0 10px; border-radius: 5px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 400; transition: transform 130ms var(--ease-out), background-color 130ms ease, color 130ms ease, box-shadow 130ms ease; }
.note-mode-switch button.is-active { background: var(--surface-active); color: var(--text); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 1px 4px rgba(0,0,0,.18); }
.note-delete-button { height: 33px; padding: 0 9px; border-radius: 6px; background: transparent; color: var(--faint); font-size: .7rem; font-weight: 400; transition: transform 130ms var(--ease-out), background-color 130ms ease, color 130ms ease; }
.note-delete-button:disabled { cursor: default; opacity: .35; }
.notes-toolbar { display: flex; align-items: center; min-height: 46px; gap: 5px; overflow-x: auto; padding: 7px 12px; border-bottom: 1px solid var(--border-soft); background: color-mix(in srgb, var(--surface-raised) 66%, var(--surface)); scrollbar-width: none; }
.notes-toolbar::-webkit-scrollbar { display: none; }
.note-tool-group { display: flex; align-items: center; gap: 2px; padding-right: 5px; border-right: 1px solid var(--border-soft); }
.note-tool-group:last-child { padding-right: 0; border-right: 0; }
.notes-toolbar button { min-width: 32px; height: 31px; padding: 0 8px; border-radius: 6px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 400; white-space: nowrap; transition: transform 120ms var(--ease-out), background-color 120ms ease, color 120ms ease; }
.notes-toolbar button[data-note-format="bold"] { font-weight: 600; }
.notes-toolbar button[data-note-format="italic"] { font-style: italic; }
.notes-toolbar button[data-note-format="strike"] { text-decoration: line-through; }
.note-document { min-height: 590px; background: color-mix(in srgb, var(--frame) 76%, var(--surface)); }
.note-editor-column, .note-preview { width: min(940px, 100%); min-height: 590px; margin: 0 auto; padding: 42px clamp(28px, 5vw, 68px) 70px; }
.note-editor-column { display: flex; flex-direction: column; }
.note-title { width: 100%; padding: 0 0 18px; border: 0; outline: 0; background: transparent; color: var(--text); font-family: var(--font-ui); font-size: clamp(1.85rem, 3vw, 2.35rem); font-weight: 400; line-height: 1.15; letter-spacing: -.018em; }
.note-editor { flex: 1; width: 100%; min-height: 465px; padding: 0; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--text-soft); font-family: var(--font-ui); font-size: 1rem; font-weight: 400; line-height: 1.78; tab-size: 2; }
.note-editor::placeholder { color: var(--faint); }
.note-preview { overflow: visible; color: var(--text-soft); }
.note-preview-title { margin: 0 0 28px; color: var(--text); font-size: clamp(1.85rem, 3vw, 2.35rem); font-weight: 400; line-height: 1.15; letter-spacing: -.018em; }
.note-preview-body { max-width: 780px; }
.note-preview h1, .note-preview h2, .note-preview h3, .note-preview h4, .note-preview h5, .note-preview h6 { color: var(--text); font-weight: 600; line-height: 1.28; }
.note-preview h1 { margin: 34px 0 16px; font-size: 1.65rem; letter-spacing: -.012em; }
.note-preview h2 { margin: 38px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); font-size: 1.34rem; letter-spacing: -.008em; }
.note-preview h3 { margin: 28px 0 10px; font-size: 1.08rem; }
.note-preview h4, .note-preview h5, .note-preview h6 { margin: 24px 0 9px; font-size: .98rem; }
.note-preview p { margin: 0 0 17px; font-size: .98rem; line-height: 1.76; }
.note-preview strong { color: var(--text); }
.note-preview del { color: var(--muted); }
.note-preview ul, .note-preview ol { margin: 0 0 20px; padding-left: 27px; }
.note-preview li { margin: 7px 0; padding-left: 3px; font-size: .98rem; line-height: 1.65; }
.note-preview .note-checklist { list-style: none; padding-left: 0; }
.note-preview .note-checklist input { width: 16px; height: 16px; margin: 0 10px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.note-preview blockquote { margin: 24px 0; padding: 13px 17px; border-left: 3px solid color-mix(in srgb, var(--accent) 72%, var(--border)); border-radius: 0 7px 7px 0; background: var(--accent-soft); color: var(--text-soft); }
.note-preview blockquote p { margin: 0; }
.note-preview hr { height: 1px; margin: 32px 0; border: 0; background: var(--border); }
.note-preview code { padding: 2px 5px; border-radius: 4px; background: var(--surface-raised); color: var(--accent-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .84em; }
.note-preview pre { overflow: auto; margin: 20px 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); line-height: 1.6; }
.note-preview pre code { padding: 0; background: transparent; color: var(--text-soft); }
.note-preview a { color: var(--accent-strong); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
.note-table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: 8px; }
.note-preview table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.note-preview th, .note-preview td { padding: 10px 12px; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); text-align: left; }
.note-preview th { background: var(--surface-raised); color: var(--text); font-weight: 600; }
.note-preview tr:last-child td { border-bottom: 0; }
.note-preview th:last-child, .note-preview td:last-child { border-right: 0; }
.note-placeholder { color: var(--faint); }
.notes-footer { display: flex; justify-content: space-between; gap: 20px; padding: 10px 15px; border-top: 1px solid var(--border-soft); background: var(--surface); color: var(--faint); font-size: .66rem; }
.note-context-menu { position: fixed; z-index: 200; min-width: 218px; padding: 6px; border: 1px solid color-mix(in srgb, var(--border) 85%, var(--text-soft)); border-radius: 9px; background: color-mix(in srgb, var(--surface-raised) 94%, transparent); box-shadow: 0 20px 54px rgba(0,0,0,.48); backdrop-filter: blur(18px) saturate(135%); transform-origin: top left; }
.note-context-menu[hidden] { display: none; }
.note-menu-label { padding: 7px 10px 8px; color: var(--faint); font-size: .68rem; }
.note-menu-separator { height: 1px; margin: 5px -6px; background: var(--border-soft); }
.note-context-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 33px; padding: 0 10px; border-radius: 6px; background: transparent; color: var(--text-soft); text-align: left; font-size: .76rem; font-weight: 400; }
.note-context-menu button:hover, .note-menu-group:hover > .note-menu-parent { background: var(--surface-hover); color: var(--text); }
.note-menu-group { position: relative; }
.note-menu-parent span { color: var(--muted); }
.note-submenu { position: absolute; top: -6px; left: calc(100% + 5px); display: none; min-width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); box-shadow: 0 18px 46px rgba(0,0,0,.42); }
.note-menu-group:hover .note-submenu { display: block; }

.queue-groups { display: grid; gap: 18px; }
.queue-group { border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.queue-group > header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.queue-group > header h2 { margin: 0; font-size: 1rem; }
.queue-group > header p { margin: 5px 0 0; color: var(--muted); font-size: .69rem; }
.queue-group > header > span { display: grid; place-items: center; min-width: 25px; height: 25px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .67rem; }
.queue-group .task-list { padding: 0 20px; }

.year-signal { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 34px; margin-bottom: 18px; padding: 20px 24px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(105deg, var(--accent-soft), var(--surface) 48%); }
.year-signal > div span { display: block; color: var(--muted); font-size: .67rem; }
.year-signal > div strong { display: block; margin-top: 5px; font-size: 1rem; }
.year-signal p { margin: 0 0 0 auto; max-width: 470px; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.life-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.life-card { display: flex; min-height: 295px; flex-direction: column; padding: 21px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); transition: transform 150ms var(--ease-out), border-color 150ms ease, background-color 150ms ease; }
.life-card header { display: flex; align-items: center; justify-content: space-between; }
.area-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid color-mix(in srgb, var(--area) 55%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--area) 12%, var(--surface)); color: var(--area); font-size: .7rem; font-weight: 600; }
.life-arrow { color: var(--faint); }
.life-card h2 { margin: 18px 0 7px; font-size: 1.14rem; }
.life-card > p { margin: 0; min-height: 58px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.life-week { margin-top: auto; padding-top: 18px; }
.life-week > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.life-week span { color: var(--faint); font-size: .68rem; font-weight: 400; letter-spacing: .065em; text-transform: uppercase; }
.life-week strong { color: var(--text-soft); font-size: .69rem; font-weight: 400; }
.life-progress { margin: 9px 0 8px; height: 4px; }
.life-progress i { background: var(--area); }
.life-week small { color: var(--muted); font-size: .65rem; }
.life-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .64rem; }

.back-link { display: inline-flex; margin-bottom: 25px; color: var(--muted); font-size: .72rem; }
.profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 17px; margin-bottom: 24px; }
.profile-hero .area-mark { width: 42px; height: 42px; border-radius: 10px; font-size: .79rem; }
.profile-hero h1 { margin: 5px 0 8px; font-size: clamp(2.5rem, 4.4vw, 3.6rem); font-weight: 400; line-height: 1.06; letter-spacing: normal; }
.profile-hero > div > p:last-child { max-width: 760px; margin: 0; color: var(--text-soft); font-size: 1rem; line-height: 1.45; }
.current-direction { margin-bottom: 16px; padding: 24px; border: 1px solid color-mix(in srgb, var(--area) 42%, var(--border)); border-radius: 11px; background: linear-gradient(120deg, color-mix(in srgb, var(--area) 12%, var(--surface)), var(--surface)); }
.current-direction span { color: var(--area); font-size: .7rem; font-weight: 400; letter-spacing: .075em; text-transform: uppercase; }
.current-direction h2 { max-width: 970px; margin: 10px 0 0; font-size: 1.3rem; line-height: 1.4; letter-spacing: normal; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; }
.profile-progress, .evidence-panel { padding: 22px; }
.large-progress { height: 7px; margin: 20px 0 12px; }
.large-progress i { background: var(--area); }
.profile-progress > p { margin: 0 0 11px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.compact-list .task-row { min-height: 52px; }
.receipt-stack { display: grid; margin-top: 16px; }
.receipt-stack > div { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.receipt-stack > div > span { color: var(--area); font-size: .7rem; }
.receipt-stack p { margin: 0; }
.receipt-stack strong { display: block; color: var(--text-soft); font-size: .75rem; font-weight: 400; line-height: 1.4; }
.receipt-stack small { display: block; margin-top: 3px; color: var(--faint); font-size: .63rem; }
.profile-section { margin-top: 44px; }
.profile-section > header h2, .profile-columns h2 { margin: 7px 0 18px; font-size: 1.25rem; letter-spacing: normal; }
.year-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.path-step { display: grid; grid-template-columns: auto 1fr; gap: 11px; min-height: 142px; padding: 20px; border-right: 1px solid var(--border-soft); opacity: .55; }
.path-step:last-child { border-right: 0; }
.path-step > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); font-size: .65rem; }
.path-step strong, .path-step small { display: block; }
.path-step small { margin-top: 3px; color: var(--faint); font-size: .62rem; }
.path-step p { margin: 11px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.path-step.is-current { background: color-mix(in srgb, var(--area) 9%, transparent); opacity: 1; }
.path-step.is-current > span { border-color: var(--area); color: var(--area); }
.path-step.is-past { opacity: .82; }
.profile-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.profile-columns > section { padding: 23px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.insight-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.insight-row span { color: var(--green); font-weight: 600; }
.insight-row.watch span { color: #e49461; }
.insight-row p { margin: 0; color: var(--text-soft); font-size: .77rem; line-height: 1.5; }
.goal-statements > p:not(.section-kicker) { margin: 0; padding: 13px 0; border-top: 1px solid var(--border-soft); color: var(--text-soft); font-size: .78rem; line-height: 1.5; }
.guide-card > div { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 0; }
.guide-card > div span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid color-mix(in srgb, var(--area) 50%, var(--border)); border-radius: 6px; color: var(--area); font-size: .62rem; }
.guide-card > div p { margin: 1px 0 0; color: var(--text-soft); font-size: .73rem; line-height: 1.5; }

.week-controls { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.week-controls button { min-height: 36px; padding: 0 12px; border-right: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .69rem; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.week-controls button:last-child { border-right: 0; }
.week-evidence { margin-bottom: 16px; padding: 22px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.week-evidence > header, .archive-section > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.week-evidence h2, .archive-section h2 { margin: 6px 0 0; font-size: 1.2rem; }
.week-evidence > header > span { color: var(--muted); font-size: .7rem; }
.evidence-by-area { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px 24px; margin-top: 18px; }
.evidence-by-area a { display: grid; grid-template-columns: auto minmax(0, 1fr) 120px; align-items: center; gap: 10px; min-height: 57px; border-top: 1px solid var(--border-soft); }
.evidence-by-area a > span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid color-mix(in srgb, var(--area) 45%, var(--border)); border-radius: 7px; color: var(--area); font-size: .62rem; }
.evidence-by-area strong, .evidence-by-area small { display: block; }
.evidence-by-area strong { font-size: .74rem; }
.evidence-by-area small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.evidence-by-area i { overflow: hidden; height: 4px; border-radius: 999px; background: var(--border-soft); }
.evidence-by-area b { display: block; width: var(--meter); height: 100%; background: var(--area); }
.reflection-panel { margin-bottom: 42px; padding: 22px; }
.reflection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.reflection-grid label { color: var(--text-soft); font-size: .73rem; font-weight: 600; }
.reflection-grid textarea { display: block; min-height: 98px; margin-top: 8px; padding: 11px; font-size: .73rem; font-weight: 400; }
.reflection-panel footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; }
.reflection-panel footer span, #review-status { color: var(--faint); font-size: .64rem; }
.archive-section { padding-bottom: 40px; }
.history-tools { display: flex; gap: 8px; }
.history-tools input, .history-tools select { height: 36px; border: 1px solid var(--border); border-radius: 7px; outline: 0; background: var(--surface); color: var(--text-soft); font-size: .7rem; }
.history-tools input { width: 210px; padding: 0 10px; }
.history-tools select { padding: 0 28px 0 10px; }
#history-list { margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.history-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 65px; padding: 8px 17px; border-bottom: 1px solid var(--border-soft); }
.history-row:last-child { border-bottom: 0; }
.history-actions { display: flex; align-items: center; gap: 7px; }
.history-check { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); font-size: .65rem; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; overflow: hidden; color: var(--text-soft); font-size: .79rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.task-copy span { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: .64rem; }
.task-copy i { width: 5px; height: 5px; border-radius: 50%; background: var(--area); }

.identity-statement { max-width: 1050px; margin: 0 0 28px; padding: 0; border: 0; color: var(--text); font-size: clamp(1.75rem, 3.3vw, 2.8rem); font-weight: 400; line-height: 1.25; letter-spacing: normal; }
.compass-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.compass-card { padding: 23px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.compass-card > span { color: var(--faint); font-size: .65rem; }
.compass-card h2 { margin: 17px 0 13px; font-size: 1.05rem; }
.compass-card p { margin: 0; padding: 12px 0; border-top: 1px solid var(--border-soft); color: var(--text-soft); font-size: .76rem; line-height: 1.5; }

dialog { max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.modal { width: 100vw; height: 100vh; }
.modal[open] { display: grid; place-items: center; }
.modal-surface { width: min(580px, calc(100vw - 28px)); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-raised); box-shadow: 0 28px 90px rgba(0,0,0,.45); opacity: 1; transform: scale(1); transition: transform 220ms var(--ease-out), opacity 170ms var(--ease-out); }
@starting-style { .modal[open] .modal-surface { opacity: 0; transform: scale(.96); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 5px 0 0; font-size: 1.16rem; }
.task-editor, .compass-editor { padding-bottom: 18px; }
.task-editor > .form-field, .compass-editor > .form-field { margin: 18px 22px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 15px 22px 0; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field > span, .check-field span { color: var(--text-soft); font-size: .7rem; font-weight: 600; }
.form-field small { color: var(--faint); font-weight: 400; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; outline: 0; background: var(--frame); color: var(--text); font-size: .78rem; }
.form-field input, .form-field select { height: 40px; padding: 0 10px; }
.form-field textarea { padding: 10px; resize: vertical; line-height: 1.5; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
.check-field { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 40px; }
.check-field input { accent-color: var(--accent); }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 22px 0; padding-top: 17px; border-top: 1px solid var(--border); }
.modal-footer > div { display: flex; gap: 8px; }
.playbook-surface { width: min(1120px, calc(100vw - 32px)); height: min(780px, calc(100vh - 32px)); overflow: hidden; }
.playbook-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 12px 18px 12px 22px; border-bottom: 1px solid var(--border); }
.playbook-header h2 { margin: 5px 0 0; font-size: 1.14rem; }
.playbook-actions { display: flex; align-items: center; gap: 8px; }
.playbook-actions input { width: 230px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; outline: 0; background: var(--frame); font-size: .72rem; }
.playbook-layout { display: grid; grid-template-columns: 240px 1fr; height: calc(100% - 70px); }
.playbook-layout nav { overflow: auto; padding: 12px; border-right: 1px solid var(--border); }
.playbook-layout nav a { display: block; padding: 8px 9px; border-radius: 6px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.playbook-layout article { overflow: auto; padding: 30px clamp(24px, 5vw, 64px) 60px; }
.playbook-layout article section { max-width: 760px; margin: 0 auto 45px; scroll-margin-top: 20px; }
.playbook-layout article h2 { margin: 0 0 18px; font-size: 1.65rem; letter-spacing: normal; }
.playbook-layout article h3 { margin: 27px 0 10px; font-size: 1rem; }
.playbook-layout article p, .playbook-layout article li { color: var(--text-soft); font-size: .77rem; line-height: 1.7; }
.playbook-layout article blockquote { margin: 18px 0; padding: 14px 17px; border-left: 2px solid var(--accent); background: var(--accent-soft); }
.playbook-layout article blockquote p { margin: 0; }
.playbook-layout article code { padding: 2px 5px; border-radius: 4px; background: var(--frame); font-size: .72rem; }
.search-modal.keyboard-open .modal-surface { transition: none; }
.search-surface { width: min(600px, calc(100vw - 28px)); align-self: start; margin-top: 12vh; overflow: hidden; }
.search-input-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.search-input-row input { height: 34px; border: 0; outline: 0; background: transparent; }
.search-input-row span, .search-input-row kbd { color: var(--faint); }
.search-results { max-height: 420px; overflow: auto; padding: 7px; }
.search-results button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 51px; padding: 7px 10px; border-radius: 7px; background: transparent; text-align: left; transition: transform 120ms var(--ease-out), background-color 120ms ease; }
.search-results strong, .search-results small { display: block; }
.search-results strong { color: var(--text-soft); font-size: .77rem; }
.search-results small { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.search-results kbd { color: var(--faint); font: inherit; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 190px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--text-soft); box-shadow: 0 14px 40px rgba(0,0,0,.3); font-size: .73rem; opacity: 1; transform: translateY(0); transition: transform 190ms var(--ease-out), opacity 150ms var(--ease-out); }
@starting-style { .toast { opacity: 0; transform: translateY(8px); } }
.toast.is-leaving { opacity: 0; transform: translateY(5px); }
.mobile-scrim { display: none; }

.panel-header h2,
.queue-group > header h2,
.life-card h2,
.current-direction h2,
.profile-section > header h2,
.profile-columns h2,
.week-evidence h2,
.archive-section h2,
.compass-card h2,
.modal-header h2,
.playbook-header h2,
.pulse-line strong {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) {
  .sidebar-nav a:hover, .project-link:hover, .sidebar-footer button:hover, .icon-button:hover, .more-button:hover, .search-results button:hover { background: var(--surface-hover); color: var(--text); }
  .life-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--area) 45%, var(--border)); background: var(--surface-raised); }
  .queue-link:hover, .secondary-button:hover, .quiet-button:hover, .week-controls button:hover, .search-button:hover { background: var(--surface-hover); }
  .primary-button:hover { background: color-mix(in srgb, var(--text) 90%, var(--accent)); }
  .delete-button:hover { border-color: color-mix(in srgb, var(--red) 58%, var(--border)); background: color-mix(in srgb, var(--red) 9%, transparent); color: var(--red); }
  .task-row:hover .row-delete { opacity: 1; }
  .text-action:hover, .back-link:hover { color: var(--text-soft); }
  .playbook-layout nav a:hover { background: var(--surface-hover); color: var(--text-soft); }
}

@media (max-width: 1080px) {
  .life-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-grid, .profile-grid { grid-template-columns: 1fr; }
  .today-side { grid-template-columns: 1fr 1fr; }
  .queue-link { grid-column: 1 / -1; }
  .evidence-by-area { grid-template-columns: 1fr; }
  .reflection-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: min(310px, 86vw); height: 100dvh; padding: calc(10px + env(safe-area-inset-top)) 10px calc(12px + env(safe-area-inset-bottom)); overflow-y: auto; transform: translateX(-100%); transition: transform 240ms var(--ease-drawer); box-shadow: 20px 0 60px rgba(0,0,0,.38); }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-close, .menu-button { display: grid; }
  .mobile-scrim { position: fixed; z-index: 39; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity 180ms var(--ease-out); }
  body.nav-open .mobile-scrim { display: block; opacity: 1; }
  .main-frame { height: 100dvh; }
  .topbar { height: calc(var(--topbar-height) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
  .page-scroll { height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top)); padding-bottom: env(safe-area-inset-bottom); }
  .page-section { width: min(100% - 32px, 680px); padding-top: 30px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .menu-button, .sidebar-close, .sync-pill { width: 44px; height: 44px; min-height: 44px; }
  .modal-header .icon-button, .playbook-actions .icon-button { width: 44px; height: 44px; }
  .modal-surface { max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))); }
  .search-button, .deadline-pill { min-height: 44px; }
  .sidebar-nav a, .project-link, .sidebar-footer button { min-height: 44px; }
  .season-card { padding: 14px; }
  .capture-bar > input, .capture-select select, .primary-button, .secondary-button, .quiet-button, .delete-button { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .task-check, .more-button { position: relative; }
  .task-check::after, .more-button::after { position: absolute; inset: -11px; content: ""; }
  .row-delete { min-height: 44px; }
  .deadline-pill span { display: none; }
  .search-button span { display: none; }
  .profile-columns, .compass-grid { grid-template-columns: 1fr; }
  .note-editor-column, .note-preview { width: 100%; }
  .year-path { grid-template-columns: 1fr 1fr; }
  .path-step:nth-child(2) { border-right: 0; }
  .path-step:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .year-signal { grid-template-columns: 1fr 1fr; }
  .year-signal p { grid-column: 1 / -1; margin: 0; }
}

@media (max-width: 600px) {
  .hero-row, .section-heading { flex-direction: column; }
  .hero-row h1, .section-heading h1 { font-size: 2.5rem; }
  .capture-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 11px; }
  .capture-plus { display: none; }
  .capture-bar > input { grid-column: 1 / -1; height: 44px; padding: 0 4px; }
  .capture-select { grid-row: auto; }
  .capture-select select { width: 100%; min-width: 0; }
  .capture-bar .primary-button { grid-column: 1 / -1; grid-row: auto; width: 100%; height: 44px; }
  .task-row { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; }
  .task-row .important-mark { display: none; }
  .task-row .row-delete { width: 44px; padding: 0; font-size: 0; }
  .task-row .row-delete::before { content: "×"; font-size: 1.05rem; line-height: 1; }
  .today-side, .life-grid { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: auto 1fr; }
  .profile-hero .primary-button { grid-column: 1 / -1; width: 100%; }
  .year-path { grid-template-columns: 1fr; }
  .path-step { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .path-step:last-child { border-bottom: 0; }
  .profile-columns { grid-template-columns: 1fr; }
  .year-signal { gap: 18px; }
  .evidence-by-area a { grid-template-columns: auto 1fr; }
  .evidence-by-area i { grid-column: 2; width: 100%; }
  .history-tools { width: 100%; flex-direction: column; }
  .history-tools input, .history-tools select { width: 100%; }
  .archive-section > header { align-items: stretch; flex-direction: column; }
  .history-row { grid-template-columns: auto 1fr; }
  .history-row .secondary-button { grid-column: 2; justify-self: start; }
  .history-actions { grid-column: 2; justify-self: start; flex-wrap: wrap; }
  .week-controls { width: 100%; }
  .week-controls button:nth-child(2) { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .playbook-layout { grid-template-columns: 1fr; }
  .playbook-layout nav { display: none; }
  .playbook-actions input { width: 150px; }
  .modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .modal-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .note-commandbar { align-items: flex-start; flex-direction: column; gap: 8px; padding: 10px 12px; }
  .note-command-actions { width: 100%; }
  .note-save-state { margin-right: auto; text-align: left; }
  .note-mode-switch { margin-left: auto; }
  .note-mode-switch button { min-width: 58px; }
  .note-delete-button { padding-right: 5px; }
  .note-editor-column, .note-preview { min-height: 520px; padding: 32px 24px 52px; }
  .note-document { min-height: 520px; }
  .notes-footer span:last-child { display: none; }
  .note-submenu { left: auto; right: calc(100% + 5px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .sidebar, .mobile-scrim, .modal-surface, .toast, button, a, .life-card, .queue-link { transition-duration: .01ms !important; transform: none !important; }
  .task-row, .task-check span, .task-main strong, .progress-count, .pulse-panel, .day-rule { transition-duration: .01ms !important; transform: none !important; opacity: 1 !important; }
  .day-progress i { transition-duration: .01ms !important; transform: scaleX(var(--progress, 0)) !important; }
}

/* Cloud account, migration, and backup surfaces */
[hidden] { display: none !important; }

.auth-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  overflow: auto;
  background: var(--bg);
}
.auth-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-backdrop::after { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, transparent 0, var(--bg) 68%); content: ""; }
.auth-backdrop span { position: absolute; width: 34vw; min-width: 300px; aspect-ratio: 1; border-radius: 50%; opacity: .1; filter: blur(90px); }
.auth-backdrop span:nth-child(1) { top: -16%; left: 5%; background: #69a8f7; }
.auth-backdrop span:nth-child(2) { right: 2%; bottom: -22%; background: #8b8cf8; }
.auth-backdrop span:nth-child(3) { top: 34%; left: 42%; width: 22vw; background: #5ac897; opacity: .06; }
.auth-card { position: relative; width: min(100%, 520px); border: 1px solid color-mix(in srgb, var(--border) 86%, white 14%); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 28px 90px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.04); overflow: hidden; backdrop-filter: blur(26px) saturate(115%); }
.auth-brand { display: flex; align-items: center; gap: 11px; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.auth-brand > div { display: flex; flex-direction: column; line-height: 1.3; }
.auth-brand strong { font-size: .91rem; }
.auth-brand div span { color: var(--muted); font-size: .72rem; }
.auth-avatar { width: 34px; height: 34px; }
#auth-panel { padding: 34px; }
.auth-heading { margin-bottom: 26px; }
.auth-heading h1 { margin: 7px 0 9px; font-size: clamp(1.85rem, 7vw, 2.45rem); font-weight: 400; line-height: 1.08; letter-spacing: -.018em; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.auth-heading code, .auth-setup-list code { padding: .13em .38em; border: 1px solid var(--border); border-radius: 5px; background: var(--frame); color: var(--text-soft); font: .86em ui-monospace, SFMono-Regular, Consolas, monospace; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form label span { color: var(--text-soft); font-size: .78rem; }
.auth-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--frame); color: var(--text); transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease; }
.auth-form input:focus { border-color: color-mix(in srgb, var(--accent) 70%, var(--border)); background: color-mix(in srgb, var(--frame) 88%, var(--accent-soft)); box-shadow: var(--focus); }
.auth-submit { width: 100%; min-height: 46px; margin-top: 3px; }
.auth-submit:disabled { cursor: wait; opacity: .62; }
.auth-switches { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.auth-switches button, .auth-signout-link { padding: 4px 0; background: transparent; color: var(--muted); font-size: .76rem; transition: color 140ms ease, transform 140ms var(--ease-out); }
.auth-privacy { margin: 27px 0 0; padding-top: 17px; border-top: 1px solid var(--border-soft); color: var(--faint); font-size: .7rem; line-height: 1.5; text-align: center; }
.auth-message { padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--frame); color: var(--text-soft); font-size: .76rem; line-height: 1.45; }
.auth-message.is-error { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); background: color-mix(in srgb, var(--red) 8%, var(--frame)); color: color-mix(in srgb, var(--red) 80%, var(--text)); }
.auth-message.is-warning { border-color: color-mix(in srgb, #e7ba62 38%, var(--border)); background: color-mix(in srgb, #e7ba62 8%, var(--frame)); }
.auth-message.is-success { border-color: color-mix(in srgb, var(--green) 42%, var(--border)); background: color-mix(in srgb, var(--green) 9%, var(--frame)); }
.auth-message.is-info { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); background: color-mix(in srgb, var(--accent) 7%, var(--frame)); }
.auth-loading { display: grid; justify-items: center; gap: 15px; padding: 48px 0; color: var(--muted); }
.auth-loading i { width: 26px; height: 26px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: auth-spin 700ms linear infinite; }
.auth-loading p { margin: 0; font-size: .86rem; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.auth-setup-list { display: grid; gap: 9px; margin-top: 20px; }
.auth-setup-list span { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 11px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text-soft); font-size: .8rem; }
.auth-setup-list i { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); font-style: normal; font-size: .7rem; }
.migration-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.migration-counts > div { min-width: 0; padding: 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--frame); }
.migration-counts strong, .migration-counts span { display: block; }
.migration-counts strong { overflow: hidden; color: var(--text); font-size: 1.04rem; text-overflow: ellipsis; }
.migration-counts span { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.migration-assurance { display: flex; gap: 11px; margin: 16px 0; padding: 12px; border-radius: 9px; background: color-mix(in srgb, var(--green) 7%, var(--frame)); }
.migration-assurance > i { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); font-style: normal; }
.migration-assurance p { margin: 0; }
.migration-assurance strong, .migration-assurance span { display: block; }
.migration-assurance strong { font-size: .8rem; }
.migration-assurance span { margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.migration-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.migration-actions button { min-height: 46px; }
.migration-actions .is-complete { border-color: color-mix(in srgb, var(--green) 38%, var(--border)); color: var(--green); }
.auth-signout-link { display: block; margin: 18px auto 0; }

.sync-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 33px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); font-size: .72rem; transition: transform 140ms var(--ease-out), color 140ms ease, background-color 140ms ease, border-color 140ms ease; }
.sync-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent); }
.sync-pill[data-status="saving"] i, .sync-pill[data-status="loading"] i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sync-pill[data-status="offline"] i { background: #e7ba62; box-shadow: 0 0 0 3px rgba(231,186,98,.12); }
.sync-pill[data-status="error"] { border-color: color-mix(in srgb, var(--red) 35%, var(--border)); color: color-mix(in srgb, var(--red) 75%, var(--muted)); }
.sync-pill[data-status="error"] i { background: var(--red); box-shadow: 0 0 0 3px rgba(228,121,132,.12); }

.account-surface { width: min(720px, calc(100vw - 30px)); }
.account-surface h3 { margin: 0; font-size: .96rem; }
.account-surface p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.account-identity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 6px 0 20px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--frame); }
.account-identity > div { display: flex; min-width: 0; flex-direction: column; }
.account-identity strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; }
.account-identity div span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.account-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 18px 0; border-top: 1px solid var(--border-soft); }
.install-status { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--green) 32%, var(--border)); border-radius: 999px; background: color-mix(in srgb, var(--green) 7%, transparent); color: var(--green); font-size: .72rem; white-space: nowrap; }
.account-restore { grid-template-columns: minmax(0, 1fr) auto; }
.file-button { display: inline-grid; place-items: center; }
.restore-preview { grid-column: 1 / -1; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 5%, var(--frame)); }
.restore-summary { display: flex; justify-content: space-between; gap: 16px; }
.restore-summary span { color: var(--muted); font-size: .72rem; }
.restore-counts { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 12px 0; color: var(--muted); font-size: .72rem; }
.restore-counts > div { display: inline-flex; gap: 4px; }
.restore-counts strong { color: var(--text-soft); }
.account-danger .delete-button { min-height: 38px; }
.account-surface .modal-footer { margin-top: 2px; }
.account-surface .modal-footer > span { color: var(--faint); font-size: .7rem; }

@media (hover: hover) and (pointer: fine) {
  .auth-switches button:hover, .auth-signout-link:hover { color: var(--text-soft); }
  .sync-pill:hover { background: var(--surface-hover); color: var(--text-soft); }
}

@media (max-width: 720px) {
  #auth-panel { padding: 28px 22px; }
  .auth-card { border-radius: 15px; }
  .migration-counts { grid-template-columns: repeat(2, 1fr); }
  .migration-actions { grid-template-columns: 1fr; }
  .sync-pill span { display: none; }
  .sync-pill { width: 44px; justify-content: center; padding: 0; }
  .account-section, .account-restore { grid-template-columns: 1fr; gap: 12px; }
  .account-section > button, .account-section > label { justify-self: start; }
  .install-status { justify-self: start; min-height: 34px; }
  .account-identity { grid-template-columns: auto minmax(0, 1fr); }
  .account-identity > button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-transparency: reduce) {
  .auth-card { background: var(--surface); backdrop-filter: none; }
  .auth-backdrop { display: none; }
}

@media (prefers-contrast: more) {
  .auth-card, .auth-form input, .migration-counts > div { border-color: var(--text-soft); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-loading i { animation-duration: 1.2s; }
}

/* Patterns and read-only Calendar */
.today-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0 18px; }
.quick-checkin-card, .calendar-preview { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 126px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.quick-checkin-card h2, .calendar-preview h2, .patterns-card h2 { margin: 3px 0 7px; font-size: 18px; }
.quick-checkin-card p, .calendar-preview p, .patterns-card header p { margin: 0; color: var(--text-muted); line-height: 1.5; }
.calendar-preview { display: block; }
.calendar-preview header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.calendar-preview header > a { color: var(--text-soft); font-size: 13px; }
.calendar-preview ul { display: grid; gap: 9px; margin: 13px 0 0; padding: 0; list-style: none; }
.calendar-preview li { display: grid; grid-template-columns: 5px 1fr; gap: 10px; align-items: stretch; }
.calendar-preview li > span { border-radius: 5px; background: var(--calendar); }
.calendar-preview li div { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.calendar-preview li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.calendar-preview li small { flex: 0 0 auto; color: var(--text-muted); }

.patterns-layout { display: grid; gap: 16px; }
.patterns-card { padding: 22px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.patterns-card > header, .recent-checkins > header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.patterns-card > header > span { color: var(--text-muted); }
.checkin-entry { padding: 16px 0; border-top: 1px solid var(--border-soft); }
.checkin-entry > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.checkin-entry > header > div { display: flex; align-items: center; gap: 8px; }
.checkin-entry > header span, .checkin-entry > p, .checkin-entry details { color: var(--text-muted); font-size: 13px; }
.checkin-entry > p { margin: 9px 0 0; line-height: 1.5; }
.checkin-entry details { margin-top: 10px; }
.checkin-entry details p { white-space: pre-wrap; color: var(--text-soft); }
.danger-text { color: var(--danger, #ef8a8a) !important; }
.pattern-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pattern-summary-grid > div { padding: 15px; border-radius: 13px; background: var(--surface-soft); }
.pattern-summary-grid h3 { margin: 0 0 10px; font-size: 14px; }
.pattern-counts, .helped-list, .break-options { margin: 0; padding: 0; list-style: none; }
.pattern-counts { display: grid; gap: 8px; }
.pattern-counts li { display: flex; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 13px; }
.pattern-counts strong { color: var(--text-soft); }
.pattern-empty { margin: 0; color: var(--text-muted); }
.helped-list { display: grid; gap: 10px; }
.helped-list li { padding: 13px 15px; border-radius: 12px; background: var(--surface-soft); color: var(--text-soft); line-height: 1.5; }
.helped-list span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.break-options { display: grid; gap: 8px; }
.break-options li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 6px 8px 6px 14px; border: 1px solid var(--border-soft); border-radius: 12px; }
.break-options li > div { display: flex; align-items: center; gap: 3px; }
.break-options .icon-button { width: 34px; height: 34px; min-height: 34px; }
.break-add { display: flex; gap: 9px; margin-top: 12px; }
.break-add input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text); padding: 0 12px; }
.reset-timer { margin: 20px 0; font-variant-numeric: tabular-nums; font-size: clamp(42px, 8vw, 70px); font-weight: 600; letter-spacing: -.04em; }
.reset-actions { display: flex; gap: 9px; }
.checkin-editor { width: min(700px, calc(100vw - 24px)); }
.checkin-grid { padding: 20px 24px; }

.calendar-actions { display: flex; gap: 8px; }
.calendar-layout { display: grid; grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); gap: 18px; align-items: start; }
.calendar-feed-layout { grid-template-columns: minmax(0, 1fr); }
.calendar-layout > aside, .calendar-layout > main, .calendar-state { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.calendar-layout > aside { padding: 18px; position: sticky; top: 12px; }
.calendar-layout > aside > p { margin: 12px 0 0; color: var(--text-muted); font-size: 12px; }
.calendar-filters { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.calendar-filters legend { margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.calendar-filters label { display: grid; grid-template-columns: auto 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 38px; font-size: 13px; }
.calendar-filters label > span { width: 8px; height: 24px; border-radius: 8px; background: var(--calendar); }
.calendar-filters label small { color: var(--text-muted); }
.agenda section + section { border-top: 1px solid var(--border); }
.agenda section > header { padding: 15px 18px; background: var(--surface-soft); }
.agenda article { display: grid; grid-template-columns: 6px 112px minmax(0, 1fr) auto; gap: 13px; align-items: center; min-height: 68px; padding: 10px 18px; border-top: 1px solid var(--border-soft); }
.calendar-dot { align-self: stretch; border-radius: 6px; background: var(--calendar); }
.agenda-time { color: var(--text-muted); font-size: 13px; }
.agenda article > div:nth-of-type(2) { display: grid; gap: 4px; min-width: 0; }
.agenda article small { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.agenda article > a { color: var(--text-soft); font-size: 13px; }
.calendar-state { display: grid; justify-items: start; gap: 9px; padding: 28px; }
.calendar-state strong { font-size: 18px; }
.calendar-state p { max-width: 620px; margin: 0; color: var(--text-muted); line-height: 1.55; }
.calendar-state i { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--text-soft); border-radius: 50%; animation: spin .8s linear infinite; }
.calendar-account span { display: block; margin-top: 7px; color: var(--text-muted); font-size: 12px; }

@media (max-width: 800px) {
  .today-context-grid, .calendar-layout { grid-template-columns: 1fr; }
  .calendar-layout > aside { position: static; }
  .pattern-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .today-context-grid { grid-template-columns: 1fr; }
  .quick-checkin-card { align-items: flex-start; flex-direction: column; }
  .pattern-summary-grid { grid-template-columns: 1fr; }
  .patterns-card { padding: 17px; }
  .break-options li { align-items: flex-start; flex-direction: column; }
  .break-options li > div { flex-wrap: wrap; }
  .agenda article { grid-template-columns: 5px 1fr auto; }
  .agenda-time { grid-column: 2; grid-row: 1; }
  .agenda article > div:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  .agenda article > a { grid-column: 3; grid-row: 1 / span 2; }
}
