:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #293c30;
  background: #f5f6ef;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ink: #293c30;
  --muted: #667361;
  --accent: #2d6249;
  --accent-hover: #234e3b;
  --soft: #e9efdf;
  --canvas: #f5f6ef;
  --paper: #fffefa;
  --line: #e1e6d8;
  --amber: #89603a;
  --sidebar-width: 244px;
  --topbar-height: 80px;
  --mobile-nav-height: 78px;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  cursor: pointer;
  color: inherit;
}
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #69815d;
  outline-offset: 4px;
}
a { color: var(--accent); text-decoration: none; }
p { line-height: 1.65; margin: 0 0 15px; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: 36px; line-height: 1.2; font-weight: 650; letter-spacing: -1.2px; }
h2 { font-size: 22px; line-height: 1.35; font-weight: 600; }
h3 { font-size: 17px; line-height: 1.45; font-weight: 600; }
small { font-size: 12px; }
input, textarea, select {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border: 1px solid #cbd4c2;
  border-radius: 11px;
  background: #fffefa;
  color: inherit;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { outline: 2px solid #9daf8e; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #7b8774; opacity: 1; }
.icon { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -60px; left: 16px; padding: 12px 16px; background: white; z-index: 100; }
.skip-link:focus { top: 12px; }
.shell { min-height: 100dvh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 33px 22px 24px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.brand { min-height: 44px; display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 21px; font-weight: 650; letter-spacing: -.6px; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .1px; }
.nav-caption { margin: 45px 13px 14px; color: #7b8872; font-size: 10px; font-weight: 550; letter-spacing: 1.5px; }
.sidebar nav { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 13px 15px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-link.active { background: var(--soft); color: var(--accent); font-weight: 650; }
.nav-link:hover { background: #eff2e9; }
.nav-count { min-width: 22px; margin-left: auto; padding: 2px 6px; border-radius: 7px; background: #e7eddc; color: #506a45; font-size: 11px; text-align: center; }
.sidebar-capture { justify-content: flex-start; margin-top: 27px; padding-left: 15px; background: transparent !important; border: 1px solid var(--line); }
.sidebar-footer { margin-top: auto; padding: 60px 12px 0; }
.sidebar-footer > p:last-child { margin: 0; padding-top: 18px; border-top: 1px solid var(--line); color: #7a856f; font-size: 12px; line-height: 1.8; }
.local-note { color: var(--muted); font-size: 12px; margin-bottom: 20px; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: #698f55; }
.workspace { margin-left: var(--sidebar-width); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-height); padding: 0 42px; border-bottom: 1px solid var(--line); background: #fffefa9e; }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb span { color: #acb6a1; margin: 0 13px; }
.breadcrumb strong { color: #485c40; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.topbar .source-link { color: #6e8062; background: transparent; }
.topbar .source-link.active { background: var(--soft); }
.mobile-brand, .bottom-nav { display: none; }
main { max-width: 1240px; margin: auto; padding: 37px 42px 65px; outline: none; }
.page-head { margin-bottom: 27px; }
.eyebrow { margin-bottom: 11px; color: #728064; font-size: 10px; font-weight: 550; letter-spacing: 1.4px; text-transform: uppercase; }
.subtitle { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.primary { background: var(--accent); color: #fffef8; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { background: var(--soft); color: #385932; }
.secondary:hover:not(:disabled) { background: #dfe8d2; }
.plain { color: var(--muted); background: transparent; }
.plain:hover:not(:disabled) { background: #eff2e9; }
.outline { color: #506445; background: var(--paper); border: 1px solid var(--line); }
.compact { font-size: 13px; padding: 10px 14px; }
.wide { width: 100%; }
.center { text-align: center; }
.muted, .hint { color: var(--muted); }
.hint { margin: 10px 0; font-size: 12px; line-height: 1.6; }
.text-button { display: inline-flex; gap: 9px; align-items: center; min-height: 44px; background: transparent; color: var(--accent); padding: 8px 0; font-size: 13px; font-weight: 550; }
.text-button .icon { width: 17px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0 29px; }
.metric { position: relative; display: grid; justify-content: stretch; grid-template-columns: 1fr auto; padding: 21px 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); text-align: left; color: var(--ink); font-weight: 400; }
.metric > span { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 5px; width: 100%; color: var(--muted); font-size: 13px; }
.metric > span .icon { width: 18px; height: 18px; color: #82916e; }
.metric strong { margin-top: 10px; font-size: 44px; line-height: 1; font-weight: 550; letter-spacing: -2px; }
.metric small { align-self: end; padding-bottom: 3px; color: #70805f; font-size: 11px; }
.metric.attention { color: var(--accent); background: #e7eedc; border-color: #d7e2c8; }
.metric.attention > span { color: #4f6940; }
.today-columns { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 30px; }
.today-content { min-width: 0; }
.workspace-tabs { display: flex; align-items: stretch; gap: 23px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.workspace-tabs button, .workspace-tabs a { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 0 12px; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; }
.workspace-tabs button.selected { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.workspace-tabs span { padding: 2px 5px; border-radius: 5px; background: #e8eddf; color: #566a44; font-size: 10px; }
.workspace-tabs a { margin-left: auto; }
.workspace-tabs a .icon { width: 14px; }
.focus-card { position: relative; overflow: hidden; padding: 27px; border: 1px solid #d7e1c9; border-radius: 19px; background: linear-gradient(125deg, #f1f5e8 0%, #fbfcf5 82%); }
.priority-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; color: #718258; font-size: 11px; }
.priority-line > span:first-child { display: flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: 1.25px; font-weight: 650; color: #687e4b; }
.priority-line .icon { width: 16px; height: 16px; }
.focus-card h2 { max-width: 620px; font-size: 29px; font-weight: 550; line-height: 1.25; letter-spacing: -.9px; overflow-wrap: anywhere; }
.focus-reason { display: flex; gap: 10px; align-items: flex-start; margin: 19px 0; padding: 13px 14px; border-radius: 10px; background: #e8eeded9; color: #5c714a; }
.focus-reason .icon { width: 17px; height: 17px; margin-top: 2px; }
.focus-reason p { margin: 0; font-size: 13px; line-height: 1.6; }
.focus-origin { display: flex; align-items: center; gap: 7px; color: #738265; font-size: 12px; }
.focus-origin .icon { width: 15px; height: 15px; }
.focus-actions { display: flex; gap: 10px; margin-top: 21px; }
.focus-actions .primary { gap: 18px; }
.focus-actions .primary .icon { width: 17px; }
.remaining-list { margin-top: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 27px 0 13px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.section-head h2 span { font-size: 11px; padding: 3px 6px; border-radius: 6px; background: var(--soft); color: var(--muted); font-weight: 500; }
.section-head a { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 12px; }
.section-head a .icon { width: 15px; }
.card-list { display: grid; gap: 12px; }
.item { min-width: 0; padding: 19px 21px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.item.overdue { border-left: 3px solid #be9866; }
.item-head { display: flex; align-items: center; gap: 10px; }
.item-title { display: block; flex: 1; min-width: 0; min-height: 44px; padding: 3px 0; background: transparent; text-align: left; font-size: 17px; font-weight: 600; line-height: 1.45; letter-spacing: -.2px; overflow-wrap: anywhere; }
.item-title:hover { color: var(--accent); }
.importance { color: #8d693a; font-size: 11px; border-radius: 6px; padding: 5px 7px; background: #f6efdd; }
.item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.item-origin { display: inline-flex; align-items: center; gap: 5px; margin-right: 3px; }
.item-origin .icon { width: 13px; height: 13px; }
.pill { max-width: 100%; padding: 4px 7px; border-radius: 6px; background: #f0f2e9; color: #69775f; font-size: 11px; line-height: 1.4; }
.pill.soft, .pill.green { color: #4e7040; background: #eaf0df; }
.pill.amber { color: var(--amber); background: #f8efdf; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.item-actions button { font-size: 12px; padding: 9px 12px; }
.item-actions .icon { width: 16px; height: 16px; }
.quick-input { display: flex; justify-content: flex-start; gap: 11px; width: 100%; margin-top: 24px; min-height: 58px; border: 1px solid #dce3d0; border-radius: 13px; padding: 14px 17px; color: #6d805b; background: #fcfdf7; font-size: 13px; font-weight: 400; text-align: left; }
.quick-input .icon:last-child { margin-left: auto; width: 18px; }
.status-line { margin: 13px 0 0; color: #75806c; font-size: 11px; line-height: 1.65; }
.day-aside { padding: 2px 0 0 24px; border-left: 1px solid var(--line); }
.aside-heading { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; }
.aside-heading h2 { font-size: 15px; }
.aside-heading .icon { color: #81916f; width: 18px; }
.agenda-list { display: grid; gap: 17px; margin-top: 14px; }
.agenda-item { display: block; width: 100%; min-width: 0; padding: 3px 0 3px 13px; border-left: 2px solid #bbcda5; border-radius: 0; background: transparent; text-align: left; }
.agenda-item time { display: block; color: #768468; font-size: 11px; font-weight: 400; }
.agenda-item strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 550; margin-top: 6px; overflow-wrap: anywhere; }
.agenda-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.aside-empty { padding: 20px 0 24px; }
.aside-empty p { color: #768266; font-family: Georgia, serif; font-size: 19px; line-height: 1.45; margin-bottom: 12px; }
.aside-empty span { font-size: 11px; color: #7b8771; }
.aside-note { margin-top: 24px; padding: 19px 18px 12px; border-radius: 16px; background: #eaf0e0; }
.aside-symbol { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: #dce7cd; color: #577440; margin-bottom: 11px; }
.aside-symbol .icon { width: 18px; height: 18px; }
.aside-note h3 { font-size: 14px; }
.aside-note p { color: #6d7f5b; font-size: 12px; margin: 9px 0 4px; }
.aside-note .text-button { font-size: 11px; }
.sources-note { min-height: 44px; display: flex; align-items: center; gap: 8px; margin-top: 23px; color: #718363; font-size: 11px; }
.sources-note > .icon { width: 17px; height: 17px; }
.sources-note > .icon:last-child { margin-left: auto; width: 13px; }
.sources-note small { display: block; color: #7f8a74; font-size: 10px; margin-top: 5px; line-height: 1.5; }
.empty { padding: 38px 25px; border: 1px solid var(--line); border-radius: 18px; background: #fffefa; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 18px; background: #edf2e3; color: #7b955e; }
.empty-icon .icon { width: 27px; height: 27px; }
.empty h2 { font-size: 23px; font-weight: 550; letter-spacing: -.6px; }
.empty p { max-width: 390px; margin: 12px auto 21px; color: var(--muted); font-size: 13px; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.list-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.filters { display: flex; gap: 7px; overflow-x: auto; padding: 3px 2px 14px; margin: 7px -2px 6px; }
.filters button { flex-shrink: 0; min-height: 44px; padding: 9px 13px; background: #fffefa; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.filters button.selected { color: var(--accent); border-color: #cddabb; background: #eaf0df; }
.filters button span { font-size: 10px; color: #7a876d; }
.list-toolbar .filters { padding-bottom: 3px; margin-bottom: 3px; }
.search-wrap { position: relative; margin: 0 0 15px; }
.search-wrap .icon { position: absolute; left: 15px; top: 14px; width: 18px; height: 18px; color: #7d8b6f; }
.search-wrap input { padding-left: 44px; font-size: 14px; background: #fffefa; border-color: var(--line); }
.sources-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.source { padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.source-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source-symbol { display: grid; place-items: center; width: 39px; height: 39px; background: #f0f2e9; border-radius: 11px; color: #8a947c; }
.source-symbol.connected { background: #e6eed9; color: #65854d; }
.connections-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.connections-heading h2 { font-size: 23px; font-weight: 550; }
.connections-heading .eyebrow { margin-bottom: 9px; }
.connections-heading p:not(.eyebrow) { margin-top: 8px; font-size: 13px; color: var(--muted); }
.connections-heading > button { flex-shrink: 0; font-size: 12px; }
.connection-grid { margin-bottom: 18px; }
.connection-card { display: flex; flex-direction: column; min-width: 0; }
.connection-card .source-top { align-items: flex-start; }
.connection-card .source-top .pill { white-space: normal; text-align: right; }
.connection-symbol { flex-shrink: 0; font-size: 19px; font-weight: 650; }
.connection-description { flex: 1; }
.source .connection-preferences { margin-top: 18px; font-size: 12px; color: #607553; }
.connection-preferences span { display: block; margin-top: 4px; color: #7b886f; }
.source .connection-last-sync { font-size: 11px; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.connection-actions button { font-size: 12px; }
.connection-security { margin: 0 0 24px; background: #f2f6eb; }
.connection-security .source-top { flex-wrap: wrap; }
.connection-security .source-top h2 { margin: 0; }
.connection-security dl { display: grid; gap: 0; margin: 18px 0 0; }
.connection-security dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #dfe7d5;
  font-size: 12px;
  line-height: 1.55;
}
.connection-security dt { color: #77876b; }
.connection-security dd { margin: 0; color: #4f6843; overflow-wrap: anywhere; }
.connection-security .hint { font-size: 11px; }
.connection-error { margin-bottom: 18px; }
.connection-error button { display: inline-flex; font-size: inherit; }
.connection-loading { margin-bottom: 22px; }
.connection-dialog { max-width: 540px; }
.connection-dialog-intro { color: var(--muted); font-size: 13px; line-height: 1.7; }
.connection-ai-choice { padding: 13px 16px; margin-top: 20px; border: 1px solid #dce4d0; border-radius: 13px; background: #f3f6ed; }
.connection-ai-choice .check { align-items: flex-start; margin: 0; }
.connection-ai-choice .check input { flex-shrink: 0; margin-top: 1px; }
.connection-ai-choice .check span { line-height: 1.6; }
.connection-ai-choice p { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.connection-ai-choice .hint { font-size: 11px; }
.connection-dialog button[type="submit"] { margin-top: 18px; }
.connection-next-step { padding-top: 20px; margin-top: 24px; border-top: 1px solid var(--line); }
.connection-next-step h3 { font-size: 15px; margin-bottom: 9px; }
.connection-next-step p { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.connection-next-step .hint { margin-top: 12px; font-size: 11px; }
.connection-next-step button, .connection-next-step .button-link { font-size: 12px; }
.google-setup { padding: 18px; margin: 22px 0; border: 1px solid #dce4d0; border-radius: 15px; background: #f4f7ef; }
.google-setup h3 { font-size: 16px; margin: 0 0 10px; }
.google-setup summary { padding: 0; display: flex; align-items: center; }
.google-setup-steps { margin: 18px 0 0; padding-left: 23px; }
.google-setup-steps li { padding-left: 5px; margin: 0 0 19px; color: #4f6843; font-size: 14px; line-height: 1.6; }
.google-setup-steps li::marker { color: #7c9264; font-weight: 600; }
.google-setup-steps p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.google-setup a { text-underline-offset: 3px; }
.calendar-dialog { max-width: 820px; padding: 30px; }
.calendar-dialog .dialog-head { position: sticky; top: -30px; z-index: 2; margin: -1px 0 18px; padding: 15px 0; background: var(--paper); }
.calendar-dialog .connection-dialog-intro { font-size: 14px; }
.calendar-connection-settings { margin: 0 0 12px; padding: 0; border-top: 0; }
.calendar-connection-settings > summary { color: #7a876c; padding: 8px 0; }
.calendar-connection-settings:not([open]) + #calendar-workspace .calendar-account:first-child { margin-top: 8px; }
.calendar-dialog .connection-import-settings { margin: 20px 0 0; }
.calendar-dialog .connection-next-step { margin-top: 14px; padding-top: 18px; }
.calendar-dialog .hint { font-size: 12px; line-height: 1.7; }
.calendar-account { padding: 22px; margin: 22px 0; border: 1px solid var(--line); border-radius: 17px; background: #fbfcf6; }
.calendar-account-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.calendar-account-head > div { min-width: 0; flex: 1 1 240px; }
.calendar-account h3 { font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.calendar-account-head p { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.calendar-account-head .pill { white-space: normal; }
.calendar-selection { margin: 17px 0 0; }
.calendar-selection summary { font-size: 14px; }
.calendar-choice { align-items: flex-start; gap: 13px; padding: 12px 0; margin: 0; border-bottom: 1px solid #e5eadc; }
.calendar-choice input { flex-shrink: 0; margin-top: 2px; }
.calendar-choice > span { min-width: 0; overflow-wrap: anywhere; }
.calendar-choice strong { display: block; font-size: 14px; font-weight: 550; }
.calendar-choice small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.calendar-load-row { margin-top: 21px; }
.calendar-load-row > button { margin-bottom: 9px; }
.calendar-window { margin-top: 16px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.calendar-agenda { margin-top: 28px; }
.calendar-agenda-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.calendar-agenda-heading h3 { font-size: 20px; font-weight: 550; }
.calendar-timezone { margin: 19px 0 11px; font-size: 11px; color: var(--muted); }
.calendar-events { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.calendar-event { padding: 19px 21px; border-bottom: 1px solid var(--line); background: #fffef9; }
.calendar-event:last-child { border-bottom: 0; }
.calendar-event h4 { font-size: 16px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; }
.calendar-event h4 .pill { display: inline-block; margin-left: 6px; vertical-align: middle; font-size: 10px; }
.calendar-event-time { color: #72825f; font-size: 12px; line-height: 1.6; margin-bottom: 7px; }
.calendar-event-location { color: #6e7d62; font-size: 13px; line-height: 1.6; margin-top: 8px; overflow-wrap: anywhere; }
.calendar-event-source { color: #859078; font-size: 11px; margin-top: 10px; overflow-wrap: anywhere; }
.calendar-event-canceled { background: #f4f5ee; }
.calendar-event-canceled h4 { color: #8a917f; }
.calendar-empty { padding: 28px 22px; margin: 20px 0 0; border: 1px dashed #d6dfc9; border-radius: 15px; background: #f5f7ef; }
.calendar-empty strong { font-size: 15px; font-weight: 550; }
.calendar-empty p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 8px; }
@media (max-width: 720px) {
  .connections-heading { gap: 10px; }
  .connections-heading h2 { font-size: 21px; }
  .connections-heading > button { padding-inline: 9px; }
  .connection-card .source-top .pill { font-size: 10px; max-width: 75%; }
  .connection-security dl > div { gap: 12px; }
  .connection-dialog .field-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .connection-dialog .field-grid label { font-size: 12px; }
  .connection-ai-choice { padding: 13px; }
}
.source h2 { font-size: 17px; margin-top: 18px; }
.source p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.ai-source { margin-top: 18px; }
.ai-source .source-top h2 { display: flex; gap: 8px; align-items: center; margin: 0; }
.ai-source .text-button { margin-top: 10px; }
.notice { padding: 15px 17px; margin: 18px 0; border-radius: 12px; background: #edf1e5; color: #67775b; font-size: 13px; line-height: 1.65; }
.error-banner { background: #fff0e9; color: #954a36; border: 1px solid #f0d9cd; }
.loading { padding: 25px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* The conversation owns its scroll area so the input is always within reach. */
.chat-page { overflow: hidden; }
.chat-page main { height: calc(100dvh - var(--topbar-height)); padding: 0 42px; max-width: 1040px; }
.chat-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-heading { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 23px 0 19px; border-bottom: 1px solid var(--line); }
.chat-heading-mark { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 14px; background: #e7eedc; color: #718c55; }
.chat-heading h1 { font-size: 21px; line-height: 1.3; letter-spacing: -.5px; }
.chat-heading p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.chat-heading > button { margin-left: auto; background: transparent; color: #799066; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 25px; padding: 25px 10px 30px 0; scrollbar-width: thin; scrollbar-color: #c8d3ba transparent; }
.conversation-start { text-align: center; margin: 0 0 27px; font-size: 10px; letter-spacing: .3px; color: #869178; }
.message { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 12px; margin: 0 0 30px; }
.message-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 11px; background: #e5edda; color: #79905e; font-size: 11px; }
.message-avatar .icon { width: 18px; height: 18px; }
.message-name { display: flex; flex-wrap: wrap; gap: 12px; margin: 3px 0 10px; color: #698052; font-size: 11px; }
.message-name time { color: #849177; font-size: 10px; }
.message-text { color: #394d31; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-message .message-avatar { background: #e9e8da; color: #827c60; }
.user-message .message-name { color: #7e8168; }
.user-message .message-text { display: inline-block; max-width: 100%; padding: 13px 17px; border: 1px solid #e0e6d4; border-radius: 0 15px 15px; background: #edf2e4; color: #45563b; font-size: 14px; }
.thinking { color: #738762; font-size: 13px; line-height: 1.8; }
.thinking small { display: block; color: #7b8870; font-size: 11px; margin-top: 5px; }
.thinking-dots { display: inline-block; color: #819763; letter-spacing: 3px; margin-right: 5px; }
.chat-suggestion { padding: 19px 20px; border: 1px solid #dce5cd; border-radius: 15px; background: #fffefa; margin-top: 17px; box-shadow: 0 6px 20px #3d573807; }
.suggestion-label { display: flex; align-items: center; gap: 7px; color: #6b8553; font-size: 11px; margin-bottom: 12px; }
.suggestion-label .icon { width: 15px; height: 15px; }
.chat-suggestion h3 { font-size: 19px; line-height: 1.4; }
.chat-suggestion > p { color: #748268; font-size: 13px; line-height: 1.7; margin: 10px 0; }
.chat-suggestion > button { margin-top: 16px; font-size: 12px; }
.chat-suggestion > button .icon { width: 16px; height: 16px; }
.chat-message-error { padding: 13px 15px; margin-top: 10px; border-radius: 12px; background: #f9efdf; color: #826338; }
.chat-message-error p { font-size: 13px; margin-bottom: 10px; }
.chat-message-error button { background: #f1e4c9; color: #755b35; font-size: 12px; }
.older-messages { text-align: center; margin: -7px 0 15px; }
.older-messages button { font-size: 12px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; text-align: center; padding: 25px 0 40px; }
.chat-empty-symbol { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 17px; background: #e7eddc; color: #87996c; margin-bottom: 24px; }
.chat-empty-symbol .icon { width: 26px; height: 26px; }
.chat-empty .eyebrow { font-size: 9px; color: #798868; margin-bottom: 15px; letter-spacing: 1.8px; }
.chat-empty h2 { font-family: Georgia, "Times New Roman", serif; font-size: 39px; font-weight: 400; line-height: 1.15; letter-spacing: -1.2px; color: #47603b; }
.chat-empty > p:not(.eyebrow) { color: #7a856d; font-size: 13px; line-height: 1.75; margin: 20px 0; }
.chat-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 5px; }
.chat-prompts button { min-height: 44px; padding: 10px 13px; border: 1px solid #dce4cf; border-radius: 24px; color: #6a8054; background: #fafbf4; font-size: 11px; font-weight: 400; }
.chat-input-area { flex-shrink: 0; padding: 13px 0 17px; background: var(--canvas); }
.chat-input-area .form-error { font-size: 12px; margin: 0 0 9px; }
.chat-input-area .form-error:empty { display: none; }
.conversation-composer { display: flex; align-items: flex-end; gap: 9px; min-height: 66px; padding: 10px 11px 10px 18px; border: 1px solid #d7e0ca; border-radius: 17px; background: #fffefa; box-shadow: 0 5px 25px #48613d09; }
.conversation-composer:focus-within { border-color: #8ea577; box-shadow: 0 0 0 2px #e2ead8; }
.conversation-composer textarea { min-width: 0; min-height: 44px; max-height: 160px; resize: none; padding: 10px 0; border: 0; border-radius: 0; outline: none; background: transparent; font-size: 14px; line-height: 1.6; }
.send-button { flex-shrink: 0; width: 44px; height: 44px; padding: 0; border-radius: 12px; }
.send-button .icon { width: 19px; height: 19px; }
.chat-footnote { display: flex; justify-content: center; gap: 18px; margin-top: 10px; color: #7f8b73; font-size: 10px; line-height: 1.5; }
.keyboard-hint { color: #89947f; }

/* Capture and detail views share the same form and spacing system. */
body:has(dialog[open]) { overflow: hidden; }
dialog { max-width: 580px; width: calc(100% - 32px); max-height: 90dvh; overflow: auto; padding: 27px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: inherit; box-shadow: 0 25px 90px #26332326; }
dialog::backdrop { background: #27352555; backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.dialog-head > div { min-width: 0; }
.dialog-head .eyebrow { margin-top: 4px; margin-bottom: 10px; font-size: 9px; }
.dialog-head h2 { font-size: 24px; line-height: 1.3; font-weight: 550; overflow-wrap: anywhere; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 44px; width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 12px; background: #eff2e8; color: #718061; font-size: 27px; font-weight: 400; }
label { display: block; margin: 17px 0 8px; color: #607452; font-size: 13px; line-height: 1.5; }
label input, label select { margin-top: 8px; }
.voice-row { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 12px; }
.voice-row button { font-size: 13px; }
.voice-row span { font-size: 12px; }
audio { display: block; width: 100%; margin-top: 14px; }
.recording { color: #9b4232; background: #fbe8de; }
details { border-top: 1px solid var(--line); margin: 20px 0; padding-top: 11px; }
summary { cursor: pointer; min-height: 44px; padding: 11px 0; color: #637655; font-size: 13px; line-height: 1.6; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.field-grid > *, .field-grid input { min-width: 0; }
.form-error { margin: 14px 0; color: #994732; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.original { max-height: 270px; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f4f6ed; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; }
.suggestion { padding: 19px; margin: 18px 0; border: 1px solid #d6e0c7; border-radius: 15px; background: #eef3e5; }
.suggestion p { font-size: 13px; margin: 10px 0 13px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 14px 0; }
.check input { width: 21px; height: 21px; min-height: 0; margin: 0; accent-color: var(--accent); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.detail-actions .primary { flex: 1; }
.history-entry { padding: 13px 0; border-bottom: 1px solid var(--line); color: #5f7152; font-size: 13px; }
.history-entry small { display: block; color: #7f8a73; font-size: 11px; margin-top: 6px; }
.history-entry p { margin: 5px 0; font-size: 12px; overflow-wrap: anywhere; }
.usage-row { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.usage-row strong { color: #526744; }
#toast { position: fixed; left: 50%; bottom: 25px; z-index: 30; display: none; transform: translateX(-50%); max-width: min(90%, 600px); width: max-content; padding: 13px 20px; border-radius: 12px; background: #31462d; color: #fffef7; box-shadow: 0 8px 35px #2f402925; font-size: 13px; line-height: 1.6; }
#toast.visible { display: block; }

@media (min-width: 1450px) {
  main { padding-top: 45px; }
  .today-columns { grid-template-columns: minmax(0, 1fr) 270px; gap: 39px; }
  .day-aside { padding-left: 29px; }
}
@media (max-width: 1150px) {
  :root { --sidebar-width: 216px; }
  .sidebar { padding-left: 18px; padding-right: 18px; }
  .brand { font-size: 19px; }
  .brand img { width: 34px; height: 34px; }
  main { max-width: 900px; padding-left: 32px; padding-right: 32px; }
  .topbar { padding-left: 32px; padding-right: 32px; }
  .today-columns { grid-template-columns: 1fr; }
  .day-aside { display: none; }
  .metric { padding: 18px; }
  .metric small { grid-column: 1 / -1; padding-top: 3px; }
  .chat-page main { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 720px) {
  :root { --topbar-height: 68px; }
  .sidebar, .breadcrumb { display: none; }
  .workspace { margin-left: 0; }
  .topbar { position: sticky; top: 0; z-index: 10; padding: 0 21px; background: #f9faf3f5; backdrop-filter: blur(12px); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 19px; font-weight: 650; letter-spacing: -.5px; }
  .top-actions { gap: 4px; }
  .topbar .compact { min-height: 44px; padding: 9px 11px; font-size: 12px; border-radius: 10px; gap: 3px; }
  .topbar .source-link { width: 44px; }
  .topbar .source-link .icon { width: 19px; height: 19px; }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: var(--mobile-nav-height); padding: 8px 13px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffefaf5; backdrop-filter: blur(12px); box-shadow: 0 -5px 25px #2c462306; }
  .bottom-nav .nav-link { position: relative; flex-direction: column; justify-content: center; gap: 6px; min-height: 59px; padding: 7px 2px; color: #7a8d68; font-size: 10px; font-weight: 500; border-radius: 11px; }
  .bottom-nav .nav-link.active { color: var(--accent); background: #edf2e4; }
  .bottom-nav .nav-link .icon { width: 22px; height: 22px; }
  .bottom-nav .nav-count { position: absolute; top: 2px; right: 14px; min-width: 15px; padding: 1px 4px; font-size: 8px; border-radius: 4px; }
  main { max-width: 650px; padding: 27px 22px calc(109px + env(safe-area-inset-bottom)); }
  h1 { font-size: 30px; letter-spacing: -1px; }
  .page-head { margin-bottom: 22px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.3px; margin-bottom: 11px; }
  .subtitle { font-size: 12px; line-height: 1.7; margin-top: 10px; }
  .summary-grid { gap: 8px; margin: 23px 0 21px; }
  .metric { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 14px 12px 13px; border-radius: 13px; }
  .metric > span { min-height: 28px; font-size: 10px; line-height: 1.4; gap: 4px; }
  .metric > span .icon { width: 13px; height: 13px; margin-top: 1px; }
  .metric strong { margin-top: 13px; font-size: 36px; letter-spacing: -1.5px; }
  .metric small { margin-top: 11px; padding: 0; align-self: auto; font-size: 9px; }
  .workspace-tabs { gap: 18px; margin-bottom: 16px; }
  .workspace-tabs button, .workspace-tabs a { min-height: 47px; font-size: 11px; gap: 5px; padding-bottom: 12px; }
  .workspace-tabs span { font-size: 9px; padding: 1px 4px; }
  .workspace-tabs a .icon { width: 13px; }
  .focus-card { border-radius: 17px; padding: 21px; }
  .priority-line { margin-bottom: 15px; font-size: 10px; }
  .priority-line > span:first-child { font-size: 9px; letter-spacing: 1px; }
  .focus-card h2 { font-size: 25px; letter-spacing: -.7px; }
  .focus-reason { padding: 11px 12px; margin: 16px 0; }
  .focus-reason p { font-size: 12px; }
  .focus-origin { font-size: 10px; gap: 5px; }
  .focus-actions { margin-top: 19px; gap: 8px; }
  .focus-actions .primary { font-size: 12px; gap: 19px; }
  .section-head { margin: 21px 0 10px; }
  .section-head h2 { font-size: 18px; }
  .item { padding: 16px 17px; border-radius: 15px; }
  .item-title { font-size: 16px; }
  .item-meta { font-size: 10px; gap: 6px; }
  .pill { font-size: 10px; }
  .item-actions { margin-top: 12px; }
  .item-actions button { font-size: 12px; }
  .quick-input { font-size: 12px; padding: 13px 14px; }
  .quick-input > .icon:first-child { width: 18px; }
  .empty { padding: 32px 20px; }
  .empty h2 { font-size: 23px; }
  .empty p { font-size: 13px; }
  .empty .primary, .empty .button-link { font-size: 12px; }
  .status-line { font-size: 10px; }
  .filters { gap: 7px; }
  .filters button { font-size: 11px; }
  .search-wrap input { font-size: 13px; }
  .sources-grid { grid-template-columns: 1fr; gap: 12px; }
  .source { padding: 20px; }
  .source h2 { font-size: 17px; }
  .source p { font-size: 13px; }
  .notice { font-size: 12px; }
  .chat-page main { height: calc(100dvh - var(--topbar-height) - var(--mobile-nav-height) - env(safe-area-inset-bottom)); padding: 0 22px; }
  .chat-heading { padding: 17px 0 14px; gap: 10px; }
  .chat-heading h1 { font-size: 20px; }
  .chat-heading p { font-size: 10px; line-height: 1.5; }
  .chat-heading-mark { width: 35px; height: 35px; border-radius: 12px; }
  .chat-heading-mark .icon { width: 20px; height: 20px; }
  .chat-messages { padding-top: 19px; padding-right: 2px; padding-bottom: 16px; }
  .message { grid-template-columns: 27px minmax(0, 1fr); gap: 10px; margin-bottom: 25px; }
  .message-avatar { width: 27px; height: 27px; border-radius: 9px; }
  .message-avatar .icon { width: 16px; height: 16px; }
  .message-name { margin-top: 2px; font-size: 10px; gap: 9px; }
  .message-name time { font-size: 9px; }
  .message-text { font-size: 14px; line-height: 1.75; }
  .user-message .message-text { padding: 12px 14px; font-size: 13px; }
  .chat-suggestion { padding: 16px; border-radius: 14px; }
  .chat-suggestion h3 { font-size: 18px; }
  .chat-suggestion > p { font-size: 12px; }
  .chat-suggestion > button { font-size: 11px; }
  .suggestion-label { font-size: 10px; }
  .chat-empty { padding: 20px 0 25px; }
  .chat-empty-symbol { margin-bottom: 20px; width: 44px; height: 44px; border-radius: 15px; }
  .chat-empty .eyebrow { margin-bottom: 12px; }
  .chat-empty h2 { font-size: 34px; }
  .chat-empty > p:not(.eyebrow) { font-size: 12px; margin: 16px 0; }
  .chat-prompts { gap: 7px; }
  .chat-prompts button { font-size: 10px; padding: 10px 12px; }
  .chat-input-area { padding: 10px 0 12px; }
  .conversation-composer { padding: 9px 9px 9px 15px; min-height: 64px; border-radius: 15px; }
  .conversation-composer textarea { font-size: 16px; padding-top: 9px; }
  .chat-footnote { font-size: 9px; margin-top: 8px; }
  .keyboard-hint { display: none; }
  dialog { padding: 23px 20px; max-height: 91dvh; }
  .dialog-head h2 { font-size: 23px; }
  dialog input, dialog textarea, dialog select { font-size: 16px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .detail-actions button { font-size: 13px; }
  #toast { bottom: calc(96px + env(safe-area-inset-bottom)); font-size: 12px; }
}
@media (max-width: 380px) {
  .topbar { padding: 0 15px; }
  .mobile-brand { font-size: 17px; gap: 7px; }
  .mobile-brand img { width: 28px; height: 28px; }
  .topbar .compact { width: 44px; padding: 0; font-size: 24px; }
  .topbar .compact span:last-child { display: none; }
  main { padding-left: 17px; padding-right: 17px; }
  .summary-grid { gap: 6px; }
  .metric { padding: 13px 9px; }
  .metric > span { font-size: 9px; }
  .metric > span .icon { display: none; }
  .metric small { font-size: 8px; }
  .metric strong { font-size: 33px; }
  .workspace-tabs { gap: 13px; }
  .workspace-tabs button, .workspace-tabs a { font-size: 10px; gap: 4px; }
  .workspace-tabs a .icon { display: none; }
  .focus-card { padding: 18px; }
  .focus-card h2 { font-size: 24px; }
  .focus-actions .primary { gap: 11px; padding-left: 13px; padding-right: 13px; }
  .chat-page main { padding-left: 17px; padding-right: 17px; }
  .chat-empty h2 { font-size: 31px; }
}
@media (max-height: 600px) and (max-width: 720px) {
  .chat-heading { padding-top: 10px; padding-bottom: 10px; }
  .chat-heading p, .chat-footnote { display: none; }
  .chat-input-area { padding: 8px 0; }
  .chat-empty { padding: 15px 0; }
  .chat-empty-symbol, .chat-empty .eyebrow { display: none; }
  .chat-empty h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background .15s, color .15s, border-color .15s; }
  .thinking-dots { animation: breathe 1.5s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: .35; } }
}

/* One voice capture and one durable queue serve every context. */
.voice-top-button { background: #e4edd7; color: #416836; }
.voice-queue-button { position: relative; background: transparent; }
.voice-count { position: absolute; top: 0; right: 0; min-width: 17px; padding: 2px 4px; border-radius: 6px; background: #dce8cc; color: #41632f; font-size: 10px; font-weight: 650; line-height: 1.3; }
.voice-count[hidden], [data-voice-context][hidden] { display: none; }
.voice-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 16px; margin: 0 0 19px; border: 1px solid #d9e3cc; background: #edf3e3; color: #4d6f3e; text-align: left; font-size: 12px; }
.voice-overview .icon { width: 18px; height: 18px; }
.voice-overview span { flex: 1; }
.voice-overview span:last-child { flex: 0; }
.voice-context-title { display: flex; align-items: center; gap: 8px; margin: 17px 0 11px; color: #687e56; font-size: 12px; font-weight: 550; }
.voice-context-title > span { display: inline-block; padding: 2px 6px; border-radius: 6px; background: var(--soft); font-size: 10px; }
.voice-card { min-width: 0; overflow-wrap: anywhere; padding: 15px 17px; margin-bottom: 12px; border: 1px solid #dce5cf; border-radius: 14px; background: #fbfdf6; }
.voice-card.interrupted { background: #fcf7eb; border-color: #e8dcc3; }
.voice-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; color: #70825e; font-size: 11px; }
.voice-card-top > span { display: inline-flex; gap: 7px; align-items: center; }
.voice-card-top .icon { width: 15px; height: 15px; }
.voice-card-top time { color: #829171; font-size: 10px; }
.voice-state { margin: 10px 0 6px; color: #496b39; font-size: 12px; font-weight: 550; line-height: 1.65; }
.voice-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 12px; color: #738367; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.voice-transcript { margin: 9px 0; color: #536b45; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.voice-card-actions { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 11px; }
.voice-card button, .voice-card .button-link { font-size: 11px; padding: 10px 12px; }
.voice-card audio { height: 44px; margin-top: 10px; }
.voice-error { color: #8c633a; }
.voice-dialog { max-width: 580px; }
.voice-queue-dialog { max-width: 650px; }
.voice-target { margin: -5px 0 17px; color: #71855f; font-size: 13px; }
.voice-capture { padding: 23px 20px 18px; border: 1px solid #dfe7d2; border-radius: 17px; background: #f0f5e7; text-align: center; }
.voice-capture-icon { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 17px; border-radius: 50%; background: #e0ebd2; color: #608646; }
.voice-capture-icon .icon { width: 29px; height: 29px; }
.voice-capture-icon.recording { background: #f4e0d0; color: #9d6044; }
.voice-capture time { display: block; font-size: 35px; font-variant-numeric: tabular-nums; letter-spacing: -.8px; color: #466c35; }
.voice-capture > p { max-width: 370px; min-height: 43px; margin: 13px auto 20px; color: #71865e; font-size: 13px; line-height: 1.65; }
.voice-capture .recording { color: #fff7f2; background: #986445; }
.voice-capture .recording:hover { background: #815036; }
#voice-capture-result { margin-top: 16px; }
.voice-import { width: 100%; position: relative; margin-top: 16px; cursor: pointer; }
.voice-import:focus-within { outline: 3px solid #69815d; outline-offset: 3px; }
.voice-review-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.voice-review-actions button { font-size: 12px; }
.voice-empty { padding: 27px 15px; text-align: center; color: #6c815b; }
.voice-empty p { font-size: 18px; margin-bottom: 10px; }
.voice-empty span { font-size: 12px; line-height: 1.7; }
.item-voice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.item-voice-actions .plain { font-size: 12px; }
.item-voice-actions .secondary { font-size: 12px; }
.composer-mic { width: 44px; background: #edf2e4; color: #63874b; }
.composer-mic .icon { width: 20px; height: 20px; }
.chat-messages:has([data-voice-context]:not([hidden])) .chat-empty { display: none; }
.chat-messages [data-voice-context] { margin-bottom: 22px; }
@media (max-width: 720px) {
  .top-actions { gap: 0; }
  .topbar .compact { width: 44px; padding: 0; font-size: 23px; }
  .topbar .compact span:last-child { display: none; }
  .voice-top-button { border-radius: 13px; }
  .voice-dialog { padding: 22px 18px; }
  .voice-capture { padding: 20px 16px 17px; }
  .voice-capture-icon { width: 61px; height: 61px; }
  .voice-capture > p { font-size: 12px; }
  .voice-card { min-width: 0; overflow-wrap: anywhere; padding: 14px; }
  .voice-card-top { font-size: 10px; }
  .voice-card-top time { font-size: 9px; }
  .voice-review-actions button { width: 100%; }
  .conversation-composer { gap: 6px; padding-left: 13px; }
  .conversation-composer textarea { font-size: 16px; }
}
@media (max-width: 380px) {
  .mobile-brand span { display: none; }
  .conversation-composer { gap: 4px; }
  .voice-card-actions { gap: 5px; }
}

/* Automatic capture: the outcome is primary, editing and the source stay nearby. */
[data-captures-context][hidden], [data-capture-inline][hidden], label[hidden] { display: none; }
[data-captures-context] { display: grid; gap: 14px; margin-bottom: 25px; }
.capture-card { padding: 23px; border: 1px solid #cfddc5; border-radius: 19px; background: #fbfdf7; overflow-wrap: anywhere; }
.capture-card.processing { background: #edf3e4; }
.capture-card.needs-answer { border-color: #dccfae; background: #fffaf0; }
.capture-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 17px; color: #577345; font-size: 12px; }
.capture-card-head > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.capture-card-head time { color: #798671; font-size: 11px; font-weight: 400; }
.capture-card-head .icon { width: 18px; height: 18px; }
.capture-progress { display: flex; gap: 14px; align-items: flex-start; }
.capture-progress .thinking-dots { padding-top: 2px; letter-spacing: 3px; color: #78965f; }
.capture-progress p { margin-bottom: 5px; color: #607454; font-size: 13px; }
.capture-answer, .capture-question { color: #425c3e; font-size: 15px; white-space: pre-wrap; }
.capture-question { font-size: 17px; font-weight: 550; }
.capture-error { color: #88563b; font-size: 14px; white-space: pre-wrap; }
.capture-result-item { padding: 18px 0 20px; border-top: 1px solid #dce5d2; }
.capture-result-item h3 { color: #2d4b35; font-size: 22px; margin-bottom: 16px; }
.capture-result-item:last-child { padding-bottom: 0; }
.capture-main-time, .detail-main-time { display: flex; flex-direction: column; gap: 5px; margin: 12px 0 19px; }
.capture-main-time > span, .detail-main-time > span, .capture-reminders > span { color: #728267; font-size: 12px; }
.capture-main-time strong, .detail-main-time strong { font-size: 21px; font-weight: 600; color: #2c6347; letter-spacing: -.3px; }
.capture-no-time { color: #7b8771; font-size: 13px; }
.capture-reminders ul, .detail-reminders ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.capture-reminders li, .detail-reminders li { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 10px 13px; border-radius: 9px; background: #edf2e4; font-size: 13px; }
.capture-reminders time, .detail-reminders time { color: #3c6041; font-weight: 600; }
.capture-reminders li > span, .detail-reminders li > span { color: #6b7b5e; }
.capture-reminders li.canceled { opacity: .65; text-decoration: line-through; }
.capture-item-actions, .capture-footer-actions, .detail-primary-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.capture-item-actions button, .capture-footer-actions button { font-size: 12px; }
.capture-footer-actions { justify-content: flex-end; margin-top: 0; }
.capture-footer-actions .plain { color: #7a6c55; }
.capture-delivery-note { display: block; padding: 12px 0 4px; color: #647d4d; font-size: 12px; line-height: 1.65; text-decoration: underline; text-underline-offset: 3px; }
.capture-original { margin-top: 16px; border-top: 1px solid #e1e7d8; }
.capture-original summary, .detail-original summary, #manual-edit > summary { min-height: 44px; padding-top: 14px; padding-bottom: 12px; }
.capture-original summary { color: #7a8670; font-size: 12px; }
.capture-original .original { margin: 8px 0; max-height: 260px; overflow: auto; font-size: 13px; }
.capture-original audio { margin: 10px 0; }
.capture-card form textarea { font-size: 16px; background: #fffefa; }
.capture-dialog { max-width: 650px; }
.capture-dialog .capture-card { padding: 0; border: 0; background: transparent; }
.chat-capture { margin-bottom: 25px; }
.chat-capture .capture-card { padding: 21px; }
.chat-messages:has([data-captures-context]:not([hidden])) .chat-empty { display: none; }
.detail-main-time { padding: 16px 18px; margin-top: 20px; border-radius: 12px; background: #edf3e4; }
.detail-reminders { margin-bottom: 21px; }
.detail-reminders h3 { display: flex; align-items: center; gap: 8px; color: #687e58; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.detail-reminders h3 .icon { width: 17px; height: 17px; }
.detail-primary-actions { margin-bottom: 20px; }
.detail-primary-actions button { font-size: 12px; }
.detail-original { margin-top: 18px; border-top: 1px solid var(--line); }
.detail-original .original { max-height: 300px; overflow: auto; }
#manual-edit { margin-top: 20px; border-top: 1px solid var(--line); }
#manual-edit > summary { font-size: 14px; color: #587149; }
#manual-edit > form { margin-top: 14px; }
.item-reminders { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; color: #6e825e; font-size: 11px; line-height: 1.7; }
.item-reminders .icon { width: 15px; height: 15px; margin-top: 2px; }
[data-notifications] { margin-top: 20px; margin-bottom: 20px; }
[data-notifications] h2 { margin-bottom: 13px; }
[data-notifications] button + button { margin-left: 8px; }
.voice-automatic-result { margin-top: 10px; }
.voice-automatic-result > .plain { font-size: 12px; }
@media (max-width: 720px) {
  .capture-card { padding: 18px; border-radius: 16px; }
  .capture-card-head { font-size: 11px; margin-bottom: 14px; }
  .capture-card-head time { font-size: 10px; }
  .capture-result-item h3 { font-size: 20px; margin-bottom: 13px; }
  .capture-main-time strong, .detail-main-time strong { font-size: 20px; }
  .capture-reminders li, .detail-reminders li { font-size: 12px; }
  .capture-answer { font-size: 14px; }
  .capture-question { font-size: 16px; }
  .capture-progress { gap: 10px; }
  .capture-progress p { font-size: 12px; }
  .capture-footer-actions { justify-content: flex-start; }
  .chat-capture .capture-card { padding: 17px; }
  .detail-primary-actions button { flex: 1 1 auto; }
  .item-reminders { font-size: 11px; }
  [data-notifications] button { font-size: 12px; }
  [data-notifications] button + button { margin: 8px 0 0; }
}
.capture-completed-row { display: flex; justify-content: flex-start; gap: 12px; width: 100%; min-height: 65px; padding: 13px 16px; border: 1px solid #d9e3cc; background: #edf3e5; color: #527441; text-align: left; }
.capture-completed-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 10px; background: #e0ebd4; }
.capture-completed-icon .icon { width: 18px; height: 18px; }
.capture-completed-row > span:nth-child(2) { flex: 1; min-width: 0; }
.capture-completed-row strong { display: block; font-size: 12px; font-weight: 550; line-height: 1.6; }
.capture-completed-row small { display: block; margin-top: 2px; color: #7c8a6c; font-size: 11px; font-weight: 400; }
@media (max-width: 720px) {
  .capture-completed-row { padding: 12px 14px; gap: 10px; }
  .capture-completed-row strong { font-size: 11px; }
}
.capture-more { margin: -11px 0 20px; }

/* Android companion setup and acknowledgements from the phone. */
.phone-source { margin-bottom: 22px; border-color: #cadbc3; background: #fafdf4; }
.phone-source .source-top { gap: 12px; flex-wrap: wrap; }
.phone-source h2 { display: flex; align-items: center; gap: 9px; }
.phone-setup { display: grid; gap: 21px; list-style: none; padding: 0; margin: 25px 0; }
.phone-setup > li { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 12px; }
.phone-step-number { display: grid; place-items: center; height: 27px; border-radius: 9px; color: #50733f; background: #e3edd8; font-size: 12px; font-weight: 650; }
.phone-setup h3 { font-size: 15px; margin: 3px 0 8px; }
.phone-setup p { font-size: 12px; margin-bottom: 11px; }
.phone-setup .button-link, .phone-setup button { font-size: 12px; }
.phone-setup .hint { margin: 10px 0; }
.phone-build-status { color: #8a7859; }
.phone-install-help summary { color: #79896d; font-size: 11px; min-height: 44px; padding: 13px 0 9px; }
.phone-pairing-code { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin: 13px 0; }
.phone-pairing-code output { display: inline-block; min-width: 178px; padding: 13px 17px; border: 1px solid #ceddc1; border-radius: 12px; background: #f0f6e7; color: #3d6435; font-size: 25px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: 4px; user-select: all; }
.phone-sync-note { padding: 14px 16px; border-radius: 12px; background: #edf2e3; color: #697d58; font-size: 12px !important; }
.phone-devices { display: grid; gap: 12px; margin: 20px 0; }
.phone-device { padding: 17px; border: 1px solid #dce6d1; border-radius: 13px; background: #fffefa; }
.phone-device-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.phone-device-heading strong { font-size: 15px; overflow-wrap: anywhere; }
.phone-device .phone-last-seen { color: #77866b; font-size: 11px; margin: 9px 0; }
.phone-device .phone-permissions { font-size: 11px; color: #5f7e4c; margin-bottom: 12px; }
.phone-device .phone-warning { color: #916536; font-size: 12px; }
.phone-device-counts { display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.phone-device-counts span { font-size: 11px; color: #748365; }
.phone-device-counts strong { padding-left: 3px; font-weight: 600; color: #496c3a; }
.phone-disconnect { margin-top: 10px; }
.phone-disconnect summary { min-height: 44px; padding: 15px 0 10px; color: #877964; font-size: 11px; }
.phone-disconnect .hint { font-size: 12px; }
.phone-disconnect button { font-size: 12px; }
.phone-add-device { margin-bottom: 19px; }
.phone-add-device > summary { min-height: 44px; padding: 12px 0; color: #617c50; font-size: 12px; }
.phone-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.phone-footer button { padding-left: 0; font-size: 12px; }
.phone-footer .hint { margin: 0; font-size: 11px; }
.alarm-kind { align-self: flex-start; display: inline-flex; padding: 2px 7px; border-radius: 6px; color: #896134 !important; background: #f2e8d3; font-size: 10px; font-weight: 550; line-height: 1.5; }
.alarm-delivery { flex: 1 0 100%; display: grid; gap: 3px; font-size: 11px; line-height: 1.6; }
.phone-alarm-state { color: #7d856f; font-size: 11px; }
.phone-alarm-state.confirmed { color: #5e7d48; }
.phone-alarm-state.warning { color: #9b693c; }

/* Telegram keeps the credential form mounted while status and pairing refresh. */
.telegram-dialog { max-width: 620px; padding: 26px; overflow-x: hidden; overscroll-behavior: contain; }
.telegram-dialog .dialog-head { position: sticky; top: -26px; z-index: 2; margin-bottom: 12px; padding: 16px 0; background: var(--paper); }
.telegram-dialog .telegram-intro { font-size: 14px; color: var(--muted); }
.telegram-dialog .telegram-overview { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 13px 15px; margin: 17px 0; border: 1px solid #dce6d2; border-radius: 13px; background: #f1f5e9; }
.telegram-dialog .telegram-overview > span:last-child { font-size: 11px; color: var(--muted); }
.telegram-dialog .telegram-overview .pill { white-space: normal; }
.telegram-dialog .telegram-steps { list-style: none; margin: 24px 0; padding: 0; }
.telegram-dialog .telegram-steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 0 23px; margin-bottom: 23px; border-bottom: 1px solid var(--line); }
.telegram-dialog .telegram-steps > li:last-child { margin-bottom: 0; }
.telegram-dialog .telegram-step-number { display: inline-flex; align-items: center; justify-content: center; height: 28px; border-radius: 9px; background: #e6eeda; color: #526d42; font-size: 12px; font-weight: 650; }
.telegram-dialog .telegram-steps h3 { font-size: 17px; margin: 3px 0 11px; }
.telegram-dialog .telegram-steps p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.telegram-dialog .telegram-steps .telegram-bot-name { color: #3c6748; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; margin: 0 0 8px; }
.telegram-dialog .telegram-steps .telegram-token-status { font-size: 12px; }
.telegram-dialog .telegram-confirmed { color: #48733d; }
.telegram-dialog .telegram-steps details { margin: 12px 0; }
.telegram-dialog .telegram-steps summary { font-weight: 550; }
.telegram-dialog .telegram-steps input { width: 100%; min-width: 0; }
.telegram-dialog .telegram-steps button, .telegram-dialog .telegram-steps .button-link { max-width: 100%; font-size: 13px; }
.telegram-dialog .telegram-steps .hint { font-size: 11px; margin: 10px 0 13px; }
.telegram-dialog .telegram-pair-fallback { margin: 17px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8ee; }
.telegram-dialog .telegram-pair-fallback label { display: block; margin: 13px 0 7px; font-size: 12px; }
.telegram-dialog .telegram-pair-command { width: 100%; min-width: 0; min-height: 70px; resize: none; font-size: 14px; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.telegram-dialog .telegram-guide ol { padding-left: 19px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.telegram-dialog .telegram-guide li { padding-left: 3px; margin-bottom: 12px; }
.telegram-dialog .telegram-guide b { overflow-wrap: anywhere; }
.telegram-dialog .telegram-inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.telegram-dialog .telegram-inbox-head h3 { font-size: 17px; }
.telegram-dialog .telegram-inbox-head button { padding-inline: 5px; font-size: 12px; }
.telegram-dialog .telegram-message-list { display: grid; gap: 10px; }
.telegram-dialog .telegram-message { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdf7; min-width: 0; }
.telegram-dialog .telegram-message-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; }
.telegram-dialog .telegram-message-head strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.telegram-dialog .telegram-message-head span { font-size: 10px; color: #8a754e; }
.telegram-dialog .telegram-message p { margin: 8px 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.telegram-dialog .telegram-message small { font-size: 10px; color: #7b886f; }
.telegram-dialog .telegram-empty { padding: 20px 17px; border: 1px dashed #d4dfc8; border-radius: 13px; background: #f5f8ee; color: #627751; }
.telegram-dialog .telegram-empty strong { font-size: 13px; }
.telegram-dialog .telegram-empty p { margin: 9px 0 0; font-size: 12px; }
.telegram-dialog .telegram-limits { margin: 19px 0; font-size: 12px; color: var(--muted); }
.telegram-dialog .telegram-footer { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); }
.telegram-dialog .telegram-footer button { width: 100%; }
@media (max-width: 720px) {
  .telegram-dialog { width: calc(100% - 12px); max-width: none; max-height: calc(100dvh - 12px); padding: 12px 17px 24px; border-radius: 18px; }
  .telegram-dialog .dialog-head { top: -12px; padding: 12px 0 15px; }
  .telegram-dialog .telegram-steps > li { gap: 10px; grid-template-columns: 25px minmax(0, 1fr); }
  .telegram-dialog .telegram-step-number { height: 25px; }
  .telegram-dialog .telegram-steps h3 { font-size: 16px; margin-top: 2px; }
  .telegram-dialog .telegram-steps button, .telegram-dialog .telegram-steps .button-link { width: 100%; }
  .telegram-dialog .telegram-steps input { font-size: 16px; }
}
@media (max-width: 720px) {
  .phone-source .source-top > .pill { font-size: 10px; }
  .phone-setup { gap: 20px; }
  .phone-setup > li { gap: 10px; grid-template-columns: 25px minmax(0, 1fr); }
  .phone-step-number { height: 25px; }
  .phone-setup h3 { font-size: 14px; }
  .phone-device { padding: 14px; }
  .phone-device-heading strong { font-size: 14px; }
  .phone-pairing-code output { font-size: 24px; }
  .phone-footer { gap: 1px; }
  .phone-footer .hint { flex-basis: 100%; }
}

/* Calendar has one generous scrolling surface on a phone. */
@media (max-width: 720px) {
  .calendar-dialog {
    width: calc(100% - 12px);
    max-width: none;
    max-height: calc(100dvh - 12px);
    padding: 12px 17px 28px;
    border-radius: 18px;
    overscroll-behavior: contain;
  }
  .calendar-dialog .dialog-head { top: -12px; padding: 12px 0 15px; }
  .calendar-dialog .dialog-head h2 { font-size: 24px; }
  .calendar-dialog .connection-dialog-intro { font-size: 14px; }
  .calendar-dialog .connection-next-step p { font-size: 13px; }
  .calendar-dialog .connection-next-step button, .calendar-dialog .connection-next-step .button-link { font-size: 13px; }
  .google-setup { padding: 16px; }
  .google-setup-steps { padding-left: 19px; }
  .calendar-account { padding: 17px; }
  .calendar-account-head > div { flex-basis: 100%; }
  .calendar-load-row .primary { width: 100%; }
  .calendar-event { padding: 17px; }
}

/* Private iCal setup stays above the optional Google OAuth path. */
.ical-connect{padding:1.2rem 0;border-bottom:1px solid var(--line,#dce3d5);margin-bottom:1.2rem}
.ical-connect form{display:grid;gap:1rem;margin:1.2rem 0}
.ical-connect label{display:grid;gap:.5rem;font-weight:600}
.ical-connect input{width:100%;min-width:0;box-sizing:border-box}
.ical-connect .calendar-event{padding:1rem 0;border-bottom:1px solid var(--line,#dce3d5);overflow-wrap:anywhere}
.ical-connect .calendar-event p{margin:.4rem 0}
.ical-connect .connection-actions{display:flex;flex-wrap:wrap;gap:.75rem}

.phone-inbox { margin-bottom: 24px; }
.phone-inbox-card { border-top: 1px solid var(--line, #dce3d8); padding: 18px 0; overflow-wrap: anywhere; }
.phone-inbox-card time { font-size: 13px; color: #697362; }
.phone-inbox-body { white-space: pre-wrap; }

.phone-inbox [data-filters] button[aria-pressed="true"],.phone-inbox [data-mark][aria-pressed="true"] { box-shadow: inset 0 0 0 2px #285c46; }
.phone-inbox details { margin: 16px 0; }
.phone-inbox form label { display: block; margin: 12px 0; }
.phone-inbox form input,.phone-inbox form select { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
