:root {
  color-scheme: light;
  --ink: #18332e;
  --muted: #6c7d78;
  --line: #dce5e1;
  --canvas: #f7f7f3;
  --surface: #ffffff;
  --surface-soft: #eef4f0;
  --forest: #164a44;
  --forest-deep: #103b36;
  --mint: #9cd1bb;
  --amber: #d99134;
  --rose: #b14f50;
  --shadow: 0 14px 38px rgba(31, 58, 48, 0.1);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, label:has(input:focus-visible) {
  outline: 3px solid rgba(38, 124, 111, 0.34);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 13% 12%, rgba(156, 209, 187, 0.54), transparent 30%),
    radial-gradient(circle at 85% 82%, rgba(244, 203, 143, 0.45), transparent 27%),
    var(--canvas);
}

.login-panel {
  width: min(100%, 460px);
  padding: 46px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.08em;
  background: var(--forest);
  border-radius: 13px;
}

.login-panel .brand-mark { width: 52px; height: 52px; margin-bottom: 30px; font-size: 1.28rem; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.11em;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  color: var(--forest-deep);
  font-size: clamp(2.05rem, 5vw, 2.7rem);
  letter-spacing: -0.06em;
  line-height: 1.1;
}

h2 { margin-bottom: 8px; font-size: 1.18rem; letter-spacing: -0.035em; }

.login-lede { margin-bottom: 34px; color: var(--muted); }

.login-form, .dialog-form, .review-form { display: grid; gap: 16px; }

label { display: grid; gap: 7px; color: var(--ink); font-size: 0.87rem; font-weight: 690; }

input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cddad4;
  border-radius: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder, textarea::placeholder { color: #91a19c; }
textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #367568; box-shadow: 0 0 0 3px rgba(54, 117, 104, 0.12); outline: none; }

.form-message { min-height: 1.3em; margin: -5px 0 0; color: var(--rose); font-size: 0.84rem; }
.privacy-caption { color: var(--muted); font-size: 0.79rem; line-height: 1.55; }

.quick-capture {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1.3fr);
  gap: 16px 24px;
  align-items: end;
  max-width: 980px;
  margin: 0 0 26px;
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, #edf7f1, #ffffff 74%);
  border: 1px solid #cddfd6;
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(31, 79, 64, 0.06);
}
.quick-capture h2 { margin-bottom: 5px; font-size: 1.26rem; }
.quick-capture > div > p:not(.eyebrow) { margin-bottom: 0; color: #577168; font-size: 0.85rem; }
.quick-capture-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.quick-capture-form input { min-height: 48px; font-size: 0.93rem; background: #fff; }
.quick-capture-form .button { min-height: 48px; white-space: nowrap; }
.quick-capture-footer { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 14px; padding-top: 4px; border-top: 1px solid #dce9e2; }
.quick-capture-footer .privacy-caption { margin: 0; }
.reference-disclosure { grid-column: 1 / -1; padding-top: 3px; color: #49665d; font-size: 0.82rem; }
.reference-disclosure summary { cursor: pointer; font-weight: 700; }
.reference-disclosure[open] { display: grid; gap: 10px; }
.reference-disclosure label { margin-top: 4px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-link, .reference-link, .attachment-count { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 8px; color: #38675a; font-size: 0.75rem; font-weight: 700; text-decoration: none; background: #edf5f1; border-radius: 7px; }
.attachment-link small { margin-left: 5px; color: #718780; font-weight: 600; }
.reference-link:hover, .attachment-link:hover { text-decoration: underline; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 730;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--forest); box-shadow: 0 8px 17px rgba(22, 74, 68, 0.18); }
.button-primary:hover { background: var(--forest-deep); }
.button-secondary { color: var(--forest); background: #fff; border-color: #b8cbc3; }
.button-secondary:hover { background: #f2f8f5; }
.button-danger { color: #fff; background: var(--rose); box-shadow: 0 8px 17px rgba(177, 79, 80, 0.16); }
.button-danger:hover { background: #963e42; }
.button-light { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.42); }
.button-light:hover { background: rgba(255, 255, 255, 0.2); }
.button-wide { width: 100%; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 252px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 26px 16px 18px;
  color: #deeee7;
  background: var(--forest-deep);
}

.brand-lockup { display: flex; align-items: center; gap: 11px; margin: 0 10px 38px; }
.brand-lockup .brand-mark { width: 35px; height: 35px; color: var(--forest); font-size: 0.87rem; background: #e0f0e9; border-radius: 11px; }
.brand-lockup strong, .brand-lockup span { display: block; line-height: 1.2; }
.brand-lockup strong { color: #fff; font-size: 0.96rem; }
.brand-lockup span { color: #9cbbb0; font-size: 0.76rem; }

.side-nav { display: grid; gap: 5px; }
.nav-item {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  color: #bcd4cb;
  font-size: 0.91rem;
  font-weight: 660;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
}
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.075); }
.nav-item.is-active { color: #fff; background: rgba(255, 255, 255, 0.16); }
.nav-icon { width: 16px; color: #b9e4cf; font-size: 1.1rem; text-align: center; }
.nav-count { min-width: 20px; margin-left: auto; padding: 1px 6px; color: #ddf2e7; font-size: 0.72rem; text-align: center; background: rgba(255, 255, 255, 0.13); border-radius: 999px; }

.sidebar-note {
  margin: auto 8px 16px;
  padding: 14px;
  color: #b7d0c5;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.sidebar-note p { margin-bottom: 0; font-size: 0.74rem; line-height: 1.55; }
.sidebar-note-label { margin-bottom: 5px !important; color: #f2f9f5; font-size: 0.66rem !important; font-weight: 740; letter-spacing: 0.09em; }
.logout-button { padding: 8px 11px; color: #bcd4cb; font-size: 0.82rem; text-align: left; background: transparent; border: 0; border-radius: 8px; }
.logout-button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.app-main { min-width: 0; padding: 42px clamp(24px, 5vw, 74px) 70px; }
.app-version { margin: 36px 0 0; color: #83938e; font-size: 0.72rem; text-align: right; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 19px; }
.topbar h1 { margin-bottom: 0; font-size: clamp(1.8rem, 3.7vw, 2.45rem); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.today-date { margin: 0; color: var(--muted); font-size: 0.83rem; white-space: nowrap; }

.safety-banner { margin-bottom: 28px; padding: 12px 14px; color: #576760; font-size: 0.8rem; background: #eef3f0; border-left: 3px solid #8dc4aa; border-radius: 0 8px 8px 0; }

.view { animation: appear 180ms ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(255px, 0.8fr); gap: 18px; }
.focus-card, .reflection-card, .metric-card, .section-block, .template-strip, .backup-card { border-radius: var(--radius); }
.focus-card { padding: 26px; background: var(--surface); box-shadow: 0 1px 0 rgba(17, 47, 40, 0.05); }
.card-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-heading h2, .section-heading h2 { margin-bottom: 0; }
.helper-text { margin: 8px 0 17px; color: var(--muted); font-size: 0.81rem; }
.text-button { padding: 4px; color: #26695e; font-size: 0.82rem; font-weight: 740; white-space: nowrap; background: transparent; border: 0; }
.text-button:hover { color: var(--forest-deep); text-decoration: underline; }

.focus-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; counter-reset: focus; }
.focus-list > li { counter-increment: focus; }
.focus-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 8px 11px 8px 5px;
  background: #f8faf8;
  border: 1px solid #e8efeb;
  border-radius: 10px;
}
.focus-item::before { content: counter(focus, decimal-leading-zero); color: #96a7a0; font-size: 0.73rem; font-weight: 720; text-align: center; }
.focus-item strong, .task-content strong { display: block; overflow: hidden; font-size: 0.89rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.focus-item small, .task-content small { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.focus-placeholder { padding: 15px 8px; color: var(--muted); font-size: 0.87rem; }

.reflection-card { display: flex; flex-direction: column; justify-content: space-between; padding: 27px; color: #e9f4ef; background: linear-gradient(145deg, #165147, #123d37); }
.reflection-card .eyebrow { color: #b3dccc; }
.reflection-card h2 { color: #fff; font-size: 1.48rem; line-height: 1.25; }
.reflection-card p:not(.eyebrow) { color: #c2ddd3; font-size: 0.84rem; }
.reflection-card .button { align-self: flex-start; margin-top: 10px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 18px 0 32px; }
.metric-card { padding: 17px 18px; background: transparent; border: 1px solid var(--line); }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 0.75rem; }
.metric-card strong { display: block; margin: 6px 0 0; color: var(--forest-deep); font-size: 1.55rem; letter-spacing: -0.05em; }

.section-block { padding: 25px; background: var(--surface); }
.section-heading { margin-bottom: 16px; }
.task-stack { display: grid; gap: 8px; }
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 15px;
  padding: 13px 13px 13px 15px;
  background: #fff;
  border: 1px solid #e4ece8;
  border-radius: 11px;
  transition: border-color 140ms ease, transform 140ms ease;
}
.task-row:hover { border-color: #b9d3c8; transform: translateY(-1px); }
.task-content { min-width: 0; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.tag, .score, .due, .status-label { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; font-size: 0.68rem; font-weight: 710; border-radius: 999px; }
.tag { color: #3d7164; background: #e8f4ee; }
.tag.type-issue { color: #955417; background: #fff0dd; }
.tag.type-people { color: #5a578b; background: #edecfb; }
.tag.type-care { color: #865269; background: #f9eaf1; }
.score { color: #27695d; background: #eaf5ef; }
.due { color: #6a7772; background: #f1f4f2; }
.due.is-overdue { color: #a64d4d; background: #fae9e9; }
.status-label { color: #60736c; background: #eff3f1; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.small-button, .icon-button { display: inline-grid; min-width: 32px; height: 32px; place-items: center; padding: 0 9px; color: #487268; font-size: 0.78rem; font-weight: 710; background: #f7faf8; border: 1px solid #dbe7e1; border-radius: 8px; }
.small-button:hover, .icon-button:hover { color: var(--forest-deep); background: #eaf5ef; }
.small-button.is-focus { color: #a36517; background: #fff5e4; border-color: #f2d5a7; }
.priority-score { min-width: 33px; color: var(--forest); font-size: 0.75rem; font-weight: 800; text-align: center; }

.template-strip { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 18px; padding: 24px 27px; background: #e5f1eb; }
.template-strip h2 { margin-bottom: 4px; }
.template-strip p:not(.eyebrow) { margin-bottom: 0; color: #557168; font-size: 0.82rem; }
.template-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.template-button { padding: 9px 11px; color: #285f55; font-size: 0.78rem; font-weight: 700; background: rgba(255, 255, 255, 0.7); border: 1px solid #c3dcd0; border-radius: 9px; }
.template-button:hover { background: #fff; }

.view-intro { max-width: 780px; margin-bottom: 22px; color: var(--muted); font-size: 0.92rem; }
.view-intro p { margin-bottom: 5px; }
.split-intro { display: flex; max-width: none; align-items: flex-start; justify-content: space-between; gap: 22px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 16px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.filter-bar label { gap: 4px; color: var(--muted); font-size: 0.69rem; }
.filter-bar select { min-width: 105px; min-height: 35px; padding: 6px 25px 6px 9px; font-size: 0.8rem; }
.search-field { flex: 1 1 210px; }
.search-field input { min-height: 35px; padding: 7px 10px; font-size: 0.82rem; }

.task-table { display: grid; gap: 8px; }
.task-table .task-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.empty-state { padding: 52px 24px; color: var(--muted); text-align: center; background: #fff; border: 1px dashed #c8d8d1; border-radius: var(--radius); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); }
.empty-state p { font-size: 0.84rem; }

.initiative-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.initiative-card { display: grid; gap: 15px; padding: 23px; background: #fff; border: 1px solid #e2ebe6; border-radius: var(--radius); }
.initiative-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.initiative-card h2 { margin-bottom: 0; font-size: 1.05rem; }
.initiative-card p { margin: 0; color: var(--muted); font-size: 0.83rem; }
.stage { padding: 4px 7px; color: #3c7164; font-size: 0.68rem; font-weight: 750; white-space: nowrap; background: #e9f5ef; border-radius: 999px; }
.stage.is-draft { color: #756f47; background: #faf5dd; }
.stage.is-paused { color: #7e6671; background: #f3edf0; }
.initiative-card-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid #edf2ef; }
.initiative-card-footer small { color: var(--muted); font-size: 0.74rem; }
.initiative-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.initiative-first-step { padding: 10px 11px; color: #45645b !important; background: #f5f9f6; border-radius: 8px; }

.care-list { display: grid; gap: 9px; max-width: 880px; }
.care-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; background: #fff; border: 1px solid #ecdfe6; border-radius: 13px; }
.care-symbol { display: grid; width: 35px; height: 35px; place-items: center; color: #95576e; background: #faedf3; border-radius: 50%; }

.review-layout { max-width: 860px; }
.review-form { padding: 23px; background: #fff; border-radius: var(--radius); }
.review-form textarea { min-height: 105px; }
.review-footer { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.saved-status { margin-right: auto; color: #4a796b; font-size: 0.78rem; }
.backup-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 18px; padding: 23px; background: #eef4f0; }
.backup-card h2 { margin-bottom: 5px; }
.backup-card p:not(.eyebrow) { max-width: 570px; margin-bottom: 0; color: #5e746c; font-size: 0.8rem; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.file-button { cursor: pointer; }

dialog {
  width: min(calc(100% - 32px), 570px);
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow-y: auto;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(17, 49, 41, 0.3);
}
dialog.dialog-wide { width: min(calc(100% - 32px), 780px); }
dialog::backdrop { background: rgba(15, 43, 36, 0.48); backdrop-filter: blur(2px); }
.dialog-form { padding: 26px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-header h2 { margin-bottom: 0; font-size: 1.3rem; }
.icon-button { min-width: 32px; font-size: 1.22rem; font-weight: 500; }
.dialog-safety { margin: 0; padding: 10px 11px; color: #6c6752; font-size: 0.78rem; background: #fff9e9; border-left: 3px solid #e2bd69; border-radius: 0 7px 7px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-span-2 { grid-column: span 2; }
.checkbox-row { display: flex; align-items: center; gap: 8px; color: #42665c; font-size: 0.85rem; }
.checkbox-row input { width: 17px; min-height: auto; height: 17px; accent-color: var(--forest); }
.dialog-footer { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin-top: 4px; }
.dialog:not(.dialog-wide) .dialog-footer { display: flex; justify-content: flex-end; }
#initiative-dialog .dialog-footer { display: grid; grid-template-columns: auto 1fr auto auto; }
.delete-confirm-footer { display: flex !important; justify-content: flex-end; }
.text-danger { padding: 7px; color: var(--rose); font-size: 0.8rem; font-weight: 720; background: transparent; border: 0; }
.text-danger:hover { text-decoration: underline; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 15px;
  color: #fff;
  font-size: 0.84rem;
  background: #234940;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 55, 45, 0.28);
}
.toast.is-error { background: #933f43; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand-lockup { margin-inline: 6px; }
  .quick-capture { grid-template-columns: 1fr; }
  .quick-capture-footer { flex-wrap: wrap; }
  .hero-grid { grid-template-columns: 1fr; }
  .reflection-card { min-height: 220px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .template-strip { align-items: flex-start; flex-direction: column; }
  .template-actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; z-index: 2; display: flex; height: auto; min-height: 64px; flex-direction: row; align-items: center; padding: 10px 12px; }
  .brand-lockup { flex: 0 0 auto; margin: 0 12px 0 0; }
  .brand-lockup div:last-child, .sidebar-note { display: none; }
  .side-nav { display: flex; min-width: 0; flex: 1; gap: 1px; overflow-x: auto; }
  .logout-button { display: inline-flex; flex: 0 0 auto; min-height: 39px; align-items: center; padding: 7px 9px; color: #e2f0e9; font-size: 0.76rem; }
  .nav-item { min-width: max-content; min-height: 39px; gap: 5px; padding: 7px 9px; font-size: 0.77rem; }
  .nav-icon { display: none; }
  .nav-count { margin-left: 2px; }
  .app-main { padding: 25px 16px 52px; }
  .app-version { margin-top: 26px; text-align: left; }
  .topbar { align-items: flex-end; margin-bottom: 16px; }
  .topbar-actions { display: block; }
  .today-date { display: none; }
  .topbar .button { min-width: 42px; padding: 10px 12px; font-size: 0; }
  .topbar .button::first-letter { font-size: 1.25rem; }
  .safety-banner { margin-bottom: 20px; }
  .focus-card, .reflection-card, .section-block { padding: 19px; }
  .metric-grid { gap: 8px; margin-bottom: 22px; }
  .metric-card { padding: 13px; }
  .metric-card strong { font-size: 1.35rem; }
  .task-row, .task-table .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .task-row .priority-score, .task-table .task-row .priority-score { display: none; }
  .row-actions { grid-column: span 2; justify-content: flex-end; }
  .split-intro, .backup-card { flex-direction: column; }
  .quick-capture { grid-template-columns: 1fr; padding: 19px; }
  .quick-capture-footer { align-items: flex-start; flex-direction: column; }
  .intro-actions { width: 100%; }
  .intro-actions .button { flex: 1; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .initiative-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: auto; }
  .dialog-form { padding: 19px; }
  .dialog-footer { grid-template-columns: auto 1fr auto auto; }
  .dialog-footer .button { padding-inline: 11px; }
}

@media (max-width: 430px) {
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .dialog-form { padding: 18px 16px; }
  .delete-confirm-footer .button { min-height: 44px; }
  .login-panel { padding: 32px 25px; }
  .nav-item { padding-inline: 7px; font-size: 0.72rem; }
  .focus-item { grid-template-columns: 23px minmax(0, 1fr); }
  .focus-item .small-button { display: none; }
  .template-actions { display: grid; width: 100%; }
  .template-button { width: 100%; text-align: left; }
  .quick-capture-form { grid-template-columns: 1fr; }
  .quick-capture-form .button { width: 100%; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
}
