:root {
  color-scheme: light;
  --canvas: #fff7e6;
  --surface: #fffaf1;
  --surface-strong: #fffdf8;
  --ink: #2d3a47;
  --ink-soft: #465562;
  --muted: #69727a;
  --moss: #a8b58a;
  --moss-dark: #596b4b;
  --sage: #a8b58a;
  --sage-pale: #dce3cf;
  --sage-wash: #eef1e7;
  --clay: #c88899;
  --clay-wash: #fcedf0;
  --gold: #a9b7c6;
  --gold-wash: #edf2f5;
  --focus-ring: rgba(168, 181, 138, 0.42);
  --ambient-line: rgba(168, 181, 138, 0.13);
  --ambient-one: #e3ebd5;
  --ambient-two: #f7c8d3;
  --sidebar: rgba(255, 250, 241, 0.9);
  --sidebar-border: rgba(45, 58, 71, 0.14);
  --shadow-sm: 0 4px 16px rgba(47, 62, 53, 0.06);
  --shadow-md: 0 18px 60px rgba(47, 62, 53, 0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

.app-shell[data-theme="powder"] {
  --canvas: #fff7e6; --surface: #fff9f2; --surface-strong: #fffdf9; --ink: #2d3a47; --ink-soft: #505d68; --muted: #756b72;
  --moss: #cf8ea1; --moss-dark: #92566a; --sage: #f7c8d3; --sage-pale: #f0dce1; --sage-wash: #fff0f3;
  --clay: #a8b58a; --clay-wash: #edf2e5; --gold: #a9b7c6; --gold-wash: #edf2f5; --focus-ring: rgba(207, 142, 161, 0.4); --ambient-line: rgba(247, 200, 211, 0.2); --ambient-one: #f7c8d3; --ambient-two: #e8eedc; --sidebar: rgba(255, 249, 242, 0.92); --sidebar-border: rgba(146, 86, 106, 0.14);
}

.app-shell[data-theme="garden"] {
  --canvas: #f4f7eb; --surface: #fcfdf7; --surface-strong: #ffffff; --ink: #2d3a47; --ink-soft: #4e5d51; --muted: #687265;
  --moss: #84986c; --moss-dark: #506244; --sage: #a8b58a; --sage-pale: #d8e2cb; --sage-wash: #eaf0e2;
  --clay: #d59aa9; --clay-wash: #fbeef0; --gold: #a9b7c6; --gold-wash: #edf2f5; --focus-ring: rgba(132, 152, 108, 0.42); --ambient-line: rgba(168, 181, 138, 0.18); --ambient-one: #dce8cf; --ambient-two: #f7c8d3; --sidebar: rgba(252, 253, 247, 0.92); --sidebar-border: rgba(80, 98, 68, 0.14);
}

.app-shell[data-theme="air"] {
  --canvas: #f3f6f4; --surface: #fbfcfa; --surface-strong: #ffffff; --ink: #2d3a47; --ink-soft: #52616d; --muted: #697680;
  --moss: #7f98a7; --moss-dark: #4e6878; --sage: #a9b7c6; --sage-pale: #d6e0e7; --sage-wash: #edf3f5;
  --clay: #b2bd92; --clay-wash: #f0f3e7; --gold: #f0b9c5; --gold-wash: #fff0f3; --focus-ring: rgba(169, 183, 198, 0.5); --ambient-line: rgba(169, 183, 198, 0.2); --ambient-one: #dce7ed; --ambient-two: #e6ecd9; --sidebar: rgba(251, 252, 250, 0.92); --sidebar-border: rgba(78, 104, 120, 0.14);
}

.app-shell[data-theme="dusk"] {
  --canvas: #f4eee5; --surface: #fff7e6; --surface-strong: #fffdf8; --ink: #2d3a47; --ink-soft: #4d5962; --muted: #6d7274;
  --moss: #63766a; --moss-dark: #2d3a47; --sage: #a8b58a; --sage-pale: #d6ddcb; --sage-wash: #e8eddf;
  --clay: #d58ca1; --clay-wash: #fce9ee; --gold: #a9b7c6; --gold-wash: #edf2f5; --focus-ring: rgba(45, 58, 71, 0.35); --ambient-line: rgba(45, 58, 71, 0.12); --ambient-one: #dfe7d2; --ambient-two: #f7c8d3; --sidebar: rgba(255, 247, 230, 0.92); --sidebar-border: rgba(45, 58, 71, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, var(--ambient-line) 80px),
    var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

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

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.34;
  pointer-events: none;
}

.ambient-one {
  top: -140px;
  right: 12%;
  background: var(--ambient-one);
}

.ambient-two {
  bottom: -180px;
  left: 28%;
  background: var(--ambient-two);
}

.auth-gate {
  width: min(100% - 32px, 420px);
  margin: min(18vh, 160px) auto 48px;
  padding: 32px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth-gate h1 {
  margin: 0;
  font: 600 40px/1 var(--serif);
}

.auth-gate > p {
  margin: 12px 0 24px;
  color: var(--muted);
}

.auth-gate-form {
  display: grid;
  gap: 12px;
}

.auth-gate-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
}

.auth-gate-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.account-status {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  color: var(--ink-soft);
}

.account-status small {
  color: var(--muted);
}

.account-status .text-button {
  justify-self: start;
  margin-top: 4px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px 24px;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sage);
  border-radius: 50%;
  color: var(--moss-dark);
  font: 600 23px/1 var(--serif);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font: 600 19px/1.1 var(--serif);
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.week-stamp {
  margin: 32px 0;
  padding: 16px;
  background: var(--sage-wash);
  border-radius: var(--radius);
}

.week-stamp span,
.week-stamp strong {
  display: block;
}

.week-stamp span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.week-stamp strong {
  font: 600 15px/1.3 var(--serif);
}

.inbox-nav {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: -16px 0 16px;
  padding: 12px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--sage-wash);
  color: var(--ink);
  text-align: left;
}

.inbox-nav:hover,
.inbox-nav.is-active {
  border-color: var(--sage);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.inbox-nav-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--moss-dark);
  font-weight: 800;
}

.inbox-nav strong,
.inbox-nav small {
  display: block;
}

.inbox-nav strong {
  font-size: 11px;
}

.inbox-nav small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.inbox-nav b {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--moss);
  color: white;
  font-size: 9px;
  text-align: center;
}

.inbox-nav-wrap,
.step-nav-item {
  position: relative;
}

.stage-label-trigger {
  position: relative;
  cursor: text;
}

.stage-label-trigger::after {
  position: absolute;
  z-index: 4;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  content: attr(data-tooltip);
  font: 600 10px/1.3 var(--sans);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.stage-label-trigger:hover::after,
.stage-label-trigger:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.stage-rename-button {
  display: none;
}

.inbox-nav-wrap.is-editing {
  display: grid;
  align-items: center;
  gap: 10px;
}

.step-nav-item.is-editing {
  min-height: 64px;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 10px 8px;
  border-radius: var(--radius);
  background: var(--sage-wash);
}

.inbox-nav-wrap.is-editing {
  min-height: 58px;
  margin: -16px 0 16px;
  padding: 12px;
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.stage-label-input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--sage);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.step-nav {
  display: grid;
  gap: 6px;
}

.step-link {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.step-link:hover {
  background: var(--sage-wash);
  color: var(--ink);
  transform: translateX(2px);
}

.step-link.is-active {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-link.is-complete:not(.is-active) {
  color: var(--moss-dark);
}

.step-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.step-link.is-active .step-number {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
}

.step-link strong,
.step-link small {
  display: block;
}

.step-link strong {
  font-size: 13px;
}

.step-link small {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.3;
  opacity: 0.78;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
}

.theme-selector {
  position: relative;
  border-top: 1px solid var(--sage-pale);
  padding-top: 12px;
}

.theme-selector summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.theme-selector summary::-webkit-details-marker { display: none; }

.theme-selector summary strong,
.theme-selector summary small,
.theme-option strong,
.theme-option small {
  display: block;
}

.theme-selector summary strong { font-size: 12px; }
.theme-selector summary small,
.theme-option small { color: var(--muted); font-size: 9px; }
.theme-selector[open] summary > span:last-child { transform: rotate(180deg); }

.theme-options {
  display: grid;
  gap: 4px;
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(320px, calc(100vh - 80px));
  margin-top: 10px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow-md);
}

.theme-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.theme-option:hover,
.theme-option.is-selected {
  border-color: var(--sage);
  background: var(--sage-wash);
}

.theme-option strong { font-size: 10px; }
.theme-option b { color: var(--moss-dark); font-size: 13px; text-align: right; }

.theme-swatch {
  display: flex;
  height: 26px;
  overflow: hidden;
  border: 1px solid rgba(45, 58, 71, 0.12);
  border-radius: 7px;
}

.theme-swatch i { flex: 1; }
.theme-swatch[data-theme-preview="linen"] i:nth-child(1) { background: #fff7e6; }
.theme-swatch[data-theme-preview="linen"] i:nth-child(2) { background: #a8b58a; }
.theme-swatch[data-theme-preview="linen"] i:nth-child(3) { background: #2d3a47; }
.theme-swatch[data-theme-preview="powder"] i:nth-child(1) { background: #fff7e6; }
.theme-swatch[data-theme-preview="powder"] i:nth-child(2) { background: #f7c8d3; }
.theme-swatch[data-theme-preview="powder"] i:nth-child(3) { background: #2d3a47; }
.theme-swatch[data-theme-preview="garden"] i:nth-child(1) { background: #a8b58a; }
.theme-swatch[data-theme-preview="garden"] i:nth-child(2) { background: #fff7e6; }
.theme-swatch[data-theme-preview="garden"] i:nth-child(3) { background: #2d3a47; }
.theme-swatch[data-theme-preview="air"] i:nth-child(1) { background: #a9b7c6; }
.theme-swatch[data-theme-preview="air"] i:nth-child(2) { background: #fff7e6; }
.theme-swatch[data-theme-preview="air"] i:nth-child(3) { background: #2d3a47; }
.theme-swatch[data-theme-preview="dusk"] i:nth-child(1) { background: #2d3a47; }
.theme-swatch[data-theme-preview="dusk"] i:nth-child(2) { background: #fff7e6; }
.theme-swatch[data-theme-preview="dusk"] i:nth-child(3) { background: #f7c8d3; }

.feedback-link {
  min-height: 56px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.feedback-link:hover {
  background: var(--sage-wash);
}

.feedback-link > span:first-child {
  font: 22px var(--serif);
}

.feedback-link strong,
.feedback-link small {
  display: block;
}

.feedback-link strong {
  font-size: 12px;
}

.feedback-link small {
  color: var(--muted);
  font-size: 9px;
}

.reset-link {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}

.workspace {
  min-width: 0;
  padding: 56px clamp(24px, 5vw, 80px) 40px;
}

.workspace-inner {
  max-width: 1180px;
  margin: 0 auto;
  animation: settle 480ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.capture-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 10px 10px 10px 16px;
  border: 1px solid rgba(105, 131, 108, 0.24);
  border-radius: 16px;
  background: rgba(251, 252, 248, 0.94);
  box-shadow: var(--shadow-sm);
}

.capture-glyph {
  color: var(--moss);
  font-size: 22px;
}

.capture-bar label,
.capture-bar input {
  width: 100%;
  min-width: 0;
}

.capture-bar input {
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.capture-bar input::placeholder {
  color: #8a928b;
}

.inbox-header {
  margin-bottom: 24px;
}

.inbox-summary,
.destination-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.inbox-summary > div,
.destination-strip > div {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border-right: 1px solid var(--sage-pale);
}

.inbox-summary > div:last-child,
.destination-strip > div:last-child {
  border-right: 0;
}

.inbox-summary span,
.destination-strip span {
  color: var(--muted);
  font-size: 9px;
}

.inbox-summary strong {
  font: 600 26px var(--serif);
}

.destination-strip {
  margin-top: 20px;
  background: transparent;
}

.destination-strip strong {
  font: 600 18px var(--serif);
}

.triage-card {
  display: grid;
  gap: 24px;
  margin-top: 20px;
  padding: 28px;
  border: 1px solid rgba(105, 131, 108, 0.22);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.triage-position,
.triage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.triage-position span {
  color: var(--moss-dark);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.triage-position small {
  color: var(--muted);
  font-size: 9px;
}

.triage-card blockquote {
  margin: 0;
  color: var(--ink);
  font: 600 32px/1.25 var(--serif);
}

.triage-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.triage-outcomes legend {
  width: 100%;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.triage-outcomes button {
  padding: 9px 12px;
  border: 1px solid var(--sage-pale);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.triage-outcomes button:hover,
.triage-outcomes button.is-selected {
  border-color: var(--moss);
  background: var(--sage-wash);
  color: var(--moss-dark);
}

.triage-fields {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--sage-wash);
}

.triage-fields-calendar {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.triage-explanation {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--sage);
  background: var(--sage-wash);
  color: var(--muted);
  font-size: 11px;
}

.notice.compact {
  padding: 12px 14px;
}

.inbox-empty {
  margin-top: 20px;
  padding-block: 64px;
}

.inbox-empty > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--sage-wash);
  color: var(--moss-dark);
  font-size: 22px;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header,
.current-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--moss-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
}

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.page-lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.count-badge {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--sage-pale);
  border-radius: 999px;
  background: rgba(251, 252, 248, 0.6);
  color: var(--moss-dark);
  font-size: 11px;
  font-weight: 700;
}

.intro-note,
.choice-principle {
  max-width: 840px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px 24px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: rgba(251, 252, 248, 0.58);
}

.intro-note p,
.choice-principle p {
  margin: 0;
  color: var(--ink-soft);
}

.intro-glyph {
  color: var(--moss);
  font: 28px/1 var(--serif);
}

.choice-principle {
  border-left: 4px solid var(--sage);
  font: 19px/1.5 var(--serif);
}

.notice {
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: var(--radius);
}

.notice ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.notice-error {
  border: 1px solid #dfb9aa;
  background: var(--clay-wash);
  color: #754a3d;
}

.notice-success {
  border: 1px solid var(--sage-pale);
  background: var(--sage-wash);
}

.direction-list,
.bets-list,
.activity-list {
  display: grid;
  gap: 16px;
}

.direction-card,
.bet-card,
.activity-card,
.add-panel {
  position: relative;
  padding: 24px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius-lg);
  background: rgba(251, 252, 248, 0.94);
  box-shadow: var(--shadow-sm);
}

.direction-card {
  transition: opacity 180ms ease, transform 180ms ease;
}

.direction-card:hover {
  transform: translateY(-2px);
}

.direction-card.is-muted {
  opacity: 0.58;
}

.direction-main,
.activity-heading,
.bet-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.direction-main {
  margin-bottom: 16px;
}

.field-name {
  max-width: 520px;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #bdc2bc;
}

.status-dot.is-on {
  background: var(--moss);
  box-shadow: 0 0 0 5px var(--sage-wash);
}

.field-row {
  display: grid;
  gap: 16px;
}

.field-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-row-five {
  grid-template-columns: 1.2fr repeat(4, 1fr);
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea,
.mini-select select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(47, 62, 53, 0.03);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--sage);
}

.field-name input {
  padding-left: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: 600 25px/1.2 var(--serif);
}

.field-name input:focus {
  border-bottom-color: var(--sage);
}

.grow {
  min-width: 220px;
}

.checkbox-field {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 68px;
  padding-bottom: 12px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--moss);
}

.checkbox-field > span {
  color: var(--ink);
  font-size: 12px;
}

.text-button {
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--moss-dark);
  font-size: 11px;
  font-weight: 700;
}

.danger-text {
  color: #946150;
}

.direction-card > .text-button {
  margin-top: 12px;
}

.add-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  border: 1px dashed var(--sage);
  border-radius: var(--radius);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.button-primary {
  border: 1px solid var(--moss-dark);
  background: linear-gradient(180deg, #718c74, var(--moss));
  color: white;
  box-shadow: 0 8px 22px rgba(79, 107, 84, 0.2);
}

.button-primary:hover {
  background: var(--moss-dark);
}

.button-secondary {
  border: 1px solid var(--sage);
  background: var(--surface);
  color: var(--moss-dark);
}

.button-quiet {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.button-danger {
  border: 1px solid #b77463;
  background: var(--clay-wash);
  color: #815246;
}

.calendar-sync-card {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.calendar-sync-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.calendar-sync-heading > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--sage-wash);
  color: var(--moss-dark);
}

.calendar-sync-heading strong,
.calendar-sync-heading small {
  display: block;
}

.calendar-sync-heading strong {
  font-size: 11px;
}

.calendar-sync-heading small,
.calendar-sync-meta,
.calendar-sync-error,
.dialog-copy {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.calendar-sync-meta,
.calendar-sync-error {
  line-height: 1.45;
}

.calendar-sync-error {
  color: #946150;
}

.calendar-connect-button {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 10px;
}

.calendar-disconnect-button {
  justify-self: start;
  color: var(--muted);
  font-size: 10px;
}

.calendar-retry-button {
  justify-self: start;
  min-height: 44px;
  color: var(--moss-dark);
  font-size: 10px;
}

.pwa-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.pwa-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.pwa-notice .button {
  min-height: 44px;
  flex: 0 0 auto;
}

.install-cta {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.ios-install-help {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.ios-install-help ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-inline-start: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ios-install-help li {
  overflow-wrap: anywhere;
}

.install-cta .button-quiet {
  min-height: 44px;
  justify-self: start;
}

.calendar-disconnect-actions {
  flex-wrap: wrap;
}

.commit-counter {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--sage);
  border-radius: 50%;
  color: var(--moss-dark);
}

.commit-counter span,
.commit-counter small {
  display: block;
}

.commit-counter span {
  font: 600 28px/1 var(--serif);
}

.commit-counter small {
  margin-top: 4px;
  font-size: 9px;
}

.commit-counter.is-full {
  background: var(--sage-wash);
}

.bet-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(340px, 1.25fr);
  gap: 24px 40px;
  overflow: hidden;
}

.bet-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--sage-pale);
}

.bet-card.is-advance::before {
  background: var(--moss);
}

.bet-heading {
  justify-content: flex-start;
}

.bet-index {
  color: var(--sage);
  font: 600 30px/1 var(--serif);
}

.bet-heading h2,
.bet-heading p {
  margin: 0;
}

.bet-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.mode-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 10px;
  background: var(--sage-wash);
}

.mode-choice button {
  min-height: 42px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mode-choice button.is-selected {
  background: var(--surface-strong);
  color: var(--moss-dark);
  box-shadow: var(--shadow-sm);
}

.outcome-field,
.pause-message {
  grid-column: 1 / -1;
}

.pause-message {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--sage-pale);
  color: var(--muted);
  font-style: italic;
}

.activity-card {
  display: grid;
  gap: 16px;
}

.resource-costs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--sage-wash);
}

.energy-range {
  display: grid;
  gap: 8px;
}

.energy-range > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.energy-range output {
  color: var(--moss-dark);
  font: 600 16px/1 var(--serif);
}

.energy-range input,
.checkin-question input {
  width: 100%;
  accent-color: var(--moss);
}

.energy-range.is-emotional input,
.checkin-question.is-emotional input {
  accent-color: var(--clay);
}

.energy-range small {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.energy-range small i {
  flex: 1;
  border-top: 1px solid var(--sage-pale);
}

.activity-heading {
  margin-bottom: -4px;
}

.direction-chip,
.plan-direction {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--sage-wash);
  color: var(--moss-dark);
  font-size: 9px;
  font-weight: 700;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.icon-button:hover {
  background: var(--sage-wash);
  color: var(--ink);
}

.icon-button.compact {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.add-panel {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  border-style: dashed;
  background: rgba(251, 252, 248, 0.52);
  box-shadow: none;
}

.capacity-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface);
}

.capacity-strip > div {
  padding: 20px 24px;
  border-right: 1px solid var(--sage-pale);
}

.capacity-strip > div:last-child {
  border-right: 0;
}

.capacity-strip span,
.capacity-strip strong {
  display: block;
}

.capacity-strip span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

.capacity-strip strong {
  font: 600 27px/1 var(--serif);
}

.capacity-strip .is-buffer {
  background: var(--sage-wash);
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.day-column {
  min-width: 0;
}

.day-heading {
  min-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--sage-pale);
}

.day-heading span {
  font: 600 14px/1.2 var(--serif);
  text-transform: capitalize;
}

.day-heading small {
  color: var(--muted);
  font-size: 9px;
}

.day-blocks {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 12px;
}

.calendar-block {
  position: relative;
  min-height: 84px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-block.is-fixed {
  border-color: #e4d5ca;
  background: #f8f1ec;
}

.calendar-block div strong,
.calendar-block div span {
  display: block;
}

.calendar-block div strong {
  font-size: 11px;
}

.calendar-block div span,
.calendar-block small {
  color: var(--muted);
  font-size: 9px;
}

.calendar-block .icon-button {
  position: absolute;
  top: 2px;
  right: 2px;
}

.window-energy {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.window-energy label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px;
}

.window-energy label > span {
  color: var(--moss-dark);
  font-size: 9px;
  font-weight: 800;
}

.window-energy select {
  width: 38px;
  min-height: 28px;
  padding: 2px 4px;
  border: 1px solid var(--sage-pale);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 9px;
}

.day-empty {
  margin: 0;
  padding: 16px 8px;
  color: #9aa29b;
  font: italic 13px var(--serif);
  text-align: center;
}

.week-summary {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-primary,
.summary-metric {
  padding: 24px;
}

.summary-primary {
  background: var(--ink);
  color: var(--surface);
}

.capacity-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.capacity-number strong {
  font: 600 42px/1 var(--serif);
}

.capacity-number span {
  color: #b8c0ba;
  font-size: 12px;
}

.summary-primary p:last-child {
  margin: 12px 0 0;
  color: #bfc7c1;
  font-size: 11px;
}

.progress-track {
  height: 6px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
}

.summary-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--sage-pale);
}

.summary-metric span,
.summary-metric small {
  color: var(--muted);
  font-size: 9px;
}

.summary-metric strong {
  margin: 8px 0;
  font: 600 28px/1 var(--serif);
}

.summary-metric.is-buffer {
  background: var(--sage-wash);
}

.summary-metric.is-risk {
  background: var(--clay-wash);
  color: #754a3d;
}

.allocation-card {
  display: grid;
  gap: 16px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.allocation-heading {
  margin: 0;
}

.allocation-mode {
  width: min(350px, 100%);
}

.allocation-mode button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.allocation-mode button.is-selected {
  background: var(--surface-strong);
  color: var(--moss-dark);
  box-shadow: var(--shadow-sm);
}

.allocation-bar {
  display: flex;
  min-height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sage-wash);
}

.allocation-segment {
  min-width: 0;
  background: var(--moss);
}

.allocation-segment[data-segment-index="1"] { background: #bf8d62; }
.allocation-segment[data-segment-index="2"] { background: #73879a; }
.allocation-segment[data-segment-index="3"] { background: #94799a; }
.allocation-segment.is-free { background: #dce2da; }

.allocation-rows {
  display: grid;
}

.allocation-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--sage-pale);
  font-size: 11px;
}

.allocation-row:last-child { border-bottom: 0; }

.allocation-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
}

.allocation-row:nth-child(2) .allocation-dot { background: #bf8d62; }
.allocation-row:nth-child(3) .allocation-dot { background: #73879a; }
.allocation-row:nth-child(4) .allocation-dot { background: #94799a; }
.allocation-row.is-free .allocation-dot { background: #dce2da; }

.allocation-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allocation-row b { font-size: 12px; }
.allocation-row small { color: var(--muted); text-align: right; }

.allocation-row label { display: flex; align-items: center; gap: 4px; font-weight: 700; }

.allocation-row input {
  width: 48px;
  min-height: 30px;
  padding: 4px 6px;
  text-align: right;
}

.allocation-total {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--sage-wash);
  color: var(--moss-dark);
  font-size: 10px;
  font-weight: 700;
}

.allocation-total.is-error,
.allocation-error { color: #754a3d; }

.allocation-total.is-error { background: var(--clay-wash); }
.allocation-error { margin: -6px 0 0; font-size: 10px; }

.allocation-preview-list { display: grid; }

.allocation-preview-list > div {
  display: grid;
  grid-template-columns: 1fr auto 72px;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sage-pale);
  font-size: 12px;
}

.allocation-preview-list small { color: var(--muted); text-align: right; }
.allocation-preview-list .is-positive { color: var(--moss-dark); }
.allocation-preview-list .is-negative { color: #9a5a43; }

.risk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.energy-calendar {
  margin: 32px 0;
}

.energy-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.energy-day {
  padding: 14px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: rgba(251, 252, 248, 0.86);
}

.energy-day.is-depleted {
  border-color: #dfb9aa;
  background: var(--clay-wash);
}

.energy-day > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.energy-day > div:first-child strong {
  font: 600 13px var(--serif);
  text-transform: capitalize;
}

.energy-day > div:first-child span {
  color: var(--muted);
  font-size: 8px;
}

.battery-row {
  display: grid;
  grid-template-columns: 20px auto 1fr;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
}

.battery-row > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage-wash);
  color: var(--moss-dark);
  font-size: 9px;
  font-weight: 800;
}

.battery-row.is-emotional > span {
  background: var(--clay-wash);
  color: #865846;
}

.battery-row b {
  font: 600 19px/1 var(--serif);
}

.battery-row small {
  color: var(--muted);
  font-size: 8px;
}

.current-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.risk-row span {
  padding: 8px 12px;
  border: 1px solid #e6d9bd;
  border-radius: 999px;
  background: var(--gold-wash);
  color: #6e5c37;
  font-size: 10px;
}

.section-heading {
  margin: 36px 0 16px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading > small {
  color: var(--muted);
  font-size: 10px;
}

.plan-block {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.plan-block.is-deep {
  border-top: 4px solid var(--moss);
}

.plan-time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.plan-block > strong {
  font: 600 16px/1.25 var(--serif);
}

.plan-block > small {
  color: var(--muted);
  font-size: 9px;
}

.plan-resource {
  display: flex;
  gap: 6px;
}

.plan-resource span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--sage-wash);
  color: var(--moss-dark);
  font-size: 8px;
  font-weight: 700;
}

.plan-resource span:last-child {
  background: var(--clay-wash);
  color: #865846;
}

.mini-select {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.mini-select span {
  color: var(--muted);
  font-size: 9px;
}

.mini-select select {
  min-height: 34px;
  padding: 4px 6px;
  font-size: 9px;
}

.rebalance-section {
  margin-top: 48px;
}

.unscheduled-count {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clay-wash);
  color: #754a3d;
  font-size: 11px;
  font-weight: 700;
}

.unscheduled-list {
  display: grid;
  gap: 10px;
}

.unscheduled-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border: 1px solid #e5d7d1;
  border-radius: var(--radius);
  background: rgba(251, 252, 248, 0.86);
}

.unscheduled-card > div:first-child {
  display: grid;
  gap: 3px;
}

.unscheduled-card > div:first-child span,
.unscheduled-card > div:first-child small {
  color: var(--muted);
  font-size: 9px;
}

.unscheduled-card > div:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--sage-wash);
}

.confirm-panel strong {
  font: 600 20px var(--serif);
}

.confirm-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--sage);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state h2,
.empty-state h3 {
  color: var(--ink);
}

.empty-state.compact {
  padding: 28px;
}

.flow-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--sage-pale);
}

.dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.energy-dialog {
  width: min(740px, calc(100vw - 32px));
}

.checkin-card {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.checkin-header {
  align-items: flex-start;
}

.checkin-header h2 {
  margin: 0 0 6px;
  font-size: 32px;
}

.checkin-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.checkin-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.checkin-progress span {
  height: 4px;
  border-radius: 999px;
  background: var(--sage-pale);
}

.checkin-progress span.is-done {
  background: var(--moss);
}

.checkin-questions {
  display: grid;
}

.checkin-question {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--sage-pale);
}

.checkin-question > span,
.checkin-question > small {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.checkin-question strong {
  font: 600 17px var(--serif);
}

.checkin-question output {
  color: var(--moss-dark);
  font: 600 18px var(--serif);
}

.checkin-question small {
  color: var(--muted);
  font-size: 8px;
}

.checkin-result {
  display: grid;
  gap: 18px;
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.resource-score {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--sage-wash);
}

.resource-score.is-emotional {
  background: #eef0ea;
}

.resource-score.is-low {
  background: var(--clay-wash);
}

.resource-score > span,
.resource-score > small {
  color: var(--muted);
  font-size: 9px;
}

.resource-score > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.resource-score input {
  width: 70px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 36px/1 var(--serif);
}

.resource-score b {
  color: var(--muted);
  font: 500 15px var(--serif);
}

.deficit-card {
  padding: 16px 18px;
  border-left: 4px solid var(--clay);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--clay-wash);
}

.deficit-card strong {
  font: 600 17px var(--serif);
}

.deficit-card p {
  margin: 4px 0 0;
  color: #76574d;
  font-size: 10px;
}

.proposal-list {
  display: grid;
}

.proposal-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sage-pale);
  cursor: pointer;
}

.proposal-option input {
  margin-top: 3px;
  accent-color: var(--moss);
}

.proposal-option strong,
.proposal-option small {
  display: block;
}

.proposal-option strong {
  font-size: 12px;
}

.proposal-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.score-details {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--sage-wash);
  color: var(--muted);
  font-size: 10px;
}

.score-details summary {
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.score-details p {
  margin: 10px 0 6px;
}

.dialog::backdrop {
  background: rgba(35, 45, 39, 0.42);
  backdrop-filter: blur(4px);
}

.dialog-card {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.dialog-header,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 30px;
}

.dialog-actions {
  justify-content: flex-end;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--sage-wash);
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.segmented input:checked + span {
  background: var(--surface-strong);
  color: var(--moss-dark);
  box-shadow: var(--shadow-sm);
}

.feedback-history {
  display: grid;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--sage-pale);
}

.feedback-history article {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--sage-wash);
}

.feedback-history article span {
  color: var(--moss-dark);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.feedback-history article p {
  margin: 4px 0 0;
  font-size: 11px;
}

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

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 16px;
  }

  .workspace {
    padding-inline: 28px;
  }

  .week-summary {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }

  .days-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-row-five {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--sage-pale);
  }

  .allocation-card { padding: 18px; }

  .allocation-row { grid-template-columns: 10px minmax(0, 1fr) auto 52px; gap: 8px; }

  .allocation-preview-list > div { grid-template-columns: 1fr auto 58px; }

  .brand,
  .week-stamp,
  .sidebar-footer {
    display: none;
  }

  .sidebar > div:first-child {
    display: block;
  }

  .inbox-nav {
    min-height: 58px;
    grid-template-columns: 34px 1fr auto;
    justify-items: stretch;
    margin: 0;
    padding: 10px;
  }

  .inbox-nav > span:nth-child(2) {
    display: block;
  }

  .inbox-nav-mark {
    width: 24px;
    height: 24px;
  }

  .inbox-nav b {
    min-width: 20px;
    padding: 1px 5px;
  }

  .inbox-nav-wrap.is-editing {
    min-height: 58px;
    margin: 0 0 8px;
    padding: 6px;
  }

  .inbox-nav-wrap:not(.is-editing) {
    margin-bottom: 8px;
  }

  .step-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    gap: 4px;
    overflow-x: auto;
  }

  .step-link {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    text-align: center;
  }

  .step-link:hover {
    transform: none;
  }

  .stage-label-trigger::after {
    display: none;
  }

  .stage-rename-button {
    position: absolute;
    z-index: 2;
    top: 2px;
    right: 2px;
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sage-pale);
    color: var(--moss-dark);
    font-size: 10px;
    line-height: 1;
  }

  .step-nav-item.is-editing {
    min-height: 58px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 4px;
    padding: 6px 4px;
  }

  .stage-label-input {
    padding: 3px;
    font-size: 11px;
  }

  .step-link small {
    display: none;
  }

  .step-number {
    width: 24px;
    height: 24px;
  }

  .workspace {
    padding: 32px 16px 24px;
  }

  .capture-bar {
    grid-template-columns: auto 1fr;
    padding: 10px 12px;
  }

  .capture-bar .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .page-header,
  .current-header {
    align-items: flex-start;
  }

  h1 {
    font-size: 36px;
  }

  .field-row-three,
  .field-row-five,
  .capacity-strip,
  .week-summary,
  .bet-card,
  .resource-costs,
  .score-grid,
  .inbox-summary,
  .destination-strip,
  .triage-fields,
  .triage-fields-calendar {
    grid-template-columns: 1fr;
  }

  .inbox-summary > div,
  .destination-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--sage-pale);
  }

  .inbox-summary > div:last-child,
  .destination-strip > div:last-child {
    border-bottom: 0;
  }

  .triage-card {
    padding: 20px;
  }

  .triage-card blockquote {
    font-size: 26px;
  }

  .triage-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .add-row,
  .confirm-panel,
  .unscheduled-card {
    align-items: stretch;
    flex-direction: column;
  }

  .add-row .button,
  .confirm-panel .button {
    width: 100%;
  }

  .summary-metric {
    border-top: 1px solid var(--sage-pale);
    border-left: 0;
  }

  .days-grid {
    grid-template-columns: 1fr;
  }

  .energy-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-actions {
    width: 100%;
    justify-content: stretch;
  }

  .current-actions .button {
    flex: 1;
  }

  .day-heading {
    position: sticky;
    top: 87px;
    z-index: 1;
    padding: 12px 4px;
    background: rgba(243, 244, 239, 0.94);
    backdrop-filter: blur(8px);
  }

  .plan-block {
    min-height: 160px;
  }
}

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