/* ================================================================
   CA M&E — "Community Field Journal"
   Warm paper, park-green ink, terracotta stamps.
   Fraunces (display) + Karla (body).
   ================================================================ */

:root {
  /* palette */
  --paper: #f5f0e4;
  --paper-deep: #ede6d3;
  --card: #fbf8ef;
  --ink: #21301f;
  --ink-soft: #4c5a48;
  --ink-faint: #7d8877;
  --green: #2e5d3f;
  --green-deep: #234a31;
  --green-tint: #dde8d9;
  --terra: #c2622e;
  --terra-deep: #a34e20;
  --terra-tint: #f4e0d0;
  --amber: #e0a83c;
  --amber-tint: #f7ecd2;
  --line: #d8cfb8;
  --line-strong: #b9ae90;
  --danger: #a33a2a;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", "Helvetica Neue", sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --shadow-card: 0 1px 2px rgba(33, 48, 31, 0.06), 0 6px 18px -8px rgba(33, 48, 31, 0.18);
  --shadow-pop: 0 2px 4px rgba(33, 48, 31, 0.08), 0 14px 34px -10px rgba(33, 48, 31, 0.28);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, #efe4c8 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 20%, #e9efdd 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
}

/* paper grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(14px + var(--safe-top)) 18px calc(96px + var(--safe-bottom));
  min-height: 100dvh;
}

/* ---------------------------------------------------------------
   typography
   --------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: 2rem; font-weight: 560; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; font-weight: 550; }
h3 { font-size: 1.08rem; font-weight: 600; }

p { margin: 0; }

.lede { color: var(--ink-soft); font-size: 1.02rem; max-width: 40ch; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
}

.small { font-size: 0.85rem; color: var(--ink-faint); }

/* ---------------------------------------------------------------
   header / brand
   --------------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-lockup { height: 34px; display: block; }

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #f4efdf;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 2px rgba(244, 239, 223, 0.35), var(--shadow-card);
  transform: rotate(-4deg);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.05rem;
  line-height: 1.1;
}
.brand-name span { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

.plan-chip {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-tint);
  border: 1px dashed var(--green);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---------------------------------------------------------------
   cards
   --------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.card--action {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.card--action:active { transform: scale(0.985); }

.card--locked {
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  box-shadow: none;
  color: var(--ink-faint);
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--lg { gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* staggered entrance */
.reveal { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reveal:nth-child(1) { animation-delay: 0.03s; }
.reveal:nth-child(2) { animation-delay: 0.09s; }
.reveal:nth-child(3) { animation-delay: 0.15s; }
.reveal:nth-child(4) { animation-delay: 0.21s; }
.reveal:nth-child(5) { animation-delay: 0.27s; }
.reveal:nth-child(6) { animation-delay: 0.33s; }
.reveal:nth-child(7) { animation-delay: 0.39s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* project card */
.project-emoji {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--green-tint);
  border-radius: var(--r-md);
  border: 1px solid rgba(46, 93, 63, 0.2);
}
.project-card .tagline { color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge--example { background: var(--amber-tint); color: #8a6316; border: 1px solid rgba(224, 168, 60, 0.5); }
.badge--live { background: var(--green-tint); color: var(--green-deep); border: 1px solid rgba(46, 93, 63, 0.35); }
.badge--new { background: var(--terra-tint); color: var(--terra-deep); border: 1px solid rgba(194, 98, 46, 0.35); }

.meter {
  height: 6px;
  border-radius: 999px;
  background: var(--paper-deep);
  overflow: hidden;
  margin-top: 12px;
}
.meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #4a7d58);
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------------------------------------------------------------
   buttons
   --------------------------------------------------------------- */
.btn {
  appearance: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--green);
  color: #f6f2e6;
  box-shadow: 0 2px 0 var(--green-deep), var(--shadow-card);
}
.btn--primary:not(:disabled):hover { background: var(--green-deep); }

.btn--terra {
  background: var(--terra);
  color: #fdf6ee;
  box-shadow: 0 2px 0 var(--terra-deep), var(--shadow-card);
}

.btn--ghost {
  background: transparent;
  color: var(--green-deep);
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--green); }

.btn--small { padding: 8px 14px; font-size: 0.85rem; }
.btn--block { width: 100%; }

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 1rem;
}

.link-btn {
  background: none;
  border: none;
  padding: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--terra);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* AI sparkle button state */
.btn .spin {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
   forms
   --------------------------------------------------------------- */
label.field { display: block; }
label.field > span,
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="month"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fffdf7;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 93, 63, 0.14);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* toggle switch */
input.switch {
  appearance: none;
  width: 46px;
  height: 27px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  flex: none;
  margin: 0;
}
input.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 1px 3px rgba(33, 48, 31, 0.3);
  transition: left 0.2s ease;
}
input.switch:checked { background: var(--green); }
input.switch:checked::after { left: 22px; }

input:disabled, textarea:disabled {
  background: var(--paper-deep);
  color: var(--ink-soft);
  cursor: default;
  opacity: 0.85;
}

input[type="number"] { text-align: center; font-weight: 700; font-size: 1.1rem; }

/* ---------------------------------------------------------------
   journey / setup steps
   --------------------------------------------------------------- */
.journey { display: flex; flex-direction: column; gap: 0; }

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}
.step::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 46px;
  bottom: 0;
  width: 2px;
  background-image: linear-gradient(var(--line-strong) 55%, transparent 55%);
  background-size: 2px 9px;
}
.step:last-child::before { display: none; }

.step-stamp {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--card);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--ink-faint);
  transform: rotate(-3deg);
  transition: all 0.25s ease;
}
.step--done .step-stamp {
  background: var(--green);
  border-color: var(--green-deep);
  color: #f4efdf;
}
.step--active .step-stamp {
  border-color: var(--terra);
  color: var(--terra-deep);
  background: var(--terra-tint);
  transform: rotate(3deg) scale(1.06);
  box-shadow: var(--shadow-card);
}
.step--locked { opacity: 0.55; }

.step-body h3 { padding-top: 8px; }
.step-body .hint { font-size: 0.88rem; color: var(--ink-soft); margin-top: 2px; }
.step-panel { margin-top: 12px; }

.tick { display: inline-block; animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* draft box — AI output */
.draft {
  background: linear-gradient(160deg, #fdf9ee, #f7f0dc);
  border: 1.5px solid var(--amber);
  border-radius: var(--r-md);
  padding: 4px;
  position: relative;
  margin-top: 10px;
}
.draft--locked::after { display: none; }
.draft::after {
  content: "✎ edit freely";
  position: absolute;
  top: -9px;
  right: 14px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--amber);
  color: #4d3810;
  padding: 2px 8px;
  border-radius: 999px;
}
.draft textarea, .draft input {
  border: none;
  background: transparent;
  box-shadow: none !important;
}

/* activity rows */
.activity-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffdf7;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px;
}
.activity-row .num {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-deep);
  font-weight: 800;
  font-size: 0.8rem;
  margin-top: 4px;
}
.activity-row input { border: none; padding: 4px 2px; background: transparent; }
.activity-row input:focus { box-shadow: none; }
.activity-row .del {
  flex: none;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  margin-top: 2px;
}
.activity-row .del:hover { color: var(--danger); }

.indicator-grid {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
  margin-top: 8px;
}

.cap-note {
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
  padding: 6px;
}

/* ---------------------------------------------------------------
   tabs (project dashboard)
   --------------------------------------------------------------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 18px calc(12px + var(--safe-bottom));
  pointer-events: none;
}
.tabbar-inner {
  pointer-events: auto;
  display: flex;
  gap: 4px;
  background: var(--ink);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow-pop);
}
.tab {
  appearance: none;
  border: none;
  background: transparent;
  color: #b9c4b3;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab.active { background: var(--paper); color: var(--ink); }

/* ---------------------------------------------------------------
   tracking table
   --------------------------------------------------------------- */
.month-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.month-strip::-webkit-scrollbar { display: none; }
.month-chip {
  flex: none;
  appearance: none;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.month-chip.selected { background: var(--green); border-color: var(--green-deep); color: #f4efdf; }
.month-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.month-chip.selected .dot { background: var(--amber); }

.track-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1.5px dashed var(--line);
}
.track-row:last-of-type { border-bottom: none; }
.track-row .desc { font-weight: 700; font-size: 0.95rem; }
.track-row .unit { font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------------------------------------------------------------
   report
   --------------------------------------------------------------- */
.report-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-table th, .report-table td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.report-table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.report-table td.num, .report-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table .total { font-weight: 800; color: var(--green-deep); }

.timecapsule {
  border: 2px solid var(--terra);
  border-radius: var(--r-lg);
  padding: 18px;
  background: linear-gradient(165deg, #fdf6ee, #f8ead9);
  position: relative;
  overflow: hidden;
}
.timecapsule--locked {
  border-style: dashed;
  background: linear-gradient(165deg, #fbf6ef, #f3ece0);
}
/* two-class selector beats the base .timecapsule::before regardless of order */
.timecapsule.timecapsule--locked::before { content: "LOCKED"; opacity: 0.85; }
.timecapsule::before {
  content: "TIME CAPSULE";
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(38deg);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  background: var(--terra);
  color: #fdf6ee;
  padding: 3px 40px;
}
.timecapsule blockquote {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--terra-deep);
}

.narrative {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
}
.narrative strong { color: var(--green-deep); background: rgba(224, 168, 60, 0.22); padding: 0 3px; border-radius: 4px; }

/* ---------------------------------------------------------------
   Dot — the resident M&E guide
   --------------------------------------------------------------- */
.dot-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dot-avatar {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  border: 2.5px solid var(--amber);
  box-shadow: var(--shadow-card);
  background: #f0dfb4;
}
.dot-avatar--sm { width: 30px; height: 30px; border-width: 2px; box-shadow: none; }
.dot-bubble {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg);
  padding: 12px 15px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-card);
}
.dot-bubble .dot-name {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 3px;
}
.btn .dot-avatar--sm { margin: -6px 0 -6px -8px; }
.dot-intro--big { margin: 26px 0 6px; }
.dot-intro--big .dot-avatar { width: 74px; height: 74px; }
.dot-intro--big .dot-bubble { font-size: 1rem; }

/* ---------------------------------------------------------------
   sheets (activity editor, month picker, project edit)
   --------------------------------------------------------------- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(33, 48, 31, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: var(--paper);
  width: 100%;
  max-width: 560px;
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(24px + var(--safe-bottom));
  max-height: 92dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
  animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet--full { min-height: 92dvh; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.4; } }

/* char counter + mic */
.char-note { text-align: right; font-size: 0.72rem; color: var(--ink-faint); margin-top: 4px; }
.mic-btn.recording {
  border-color: var(--danger);
  color: var(--danger);
  animation: pulse 1.1s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(163, 58, 42, 0.15); } }

/* project photo thumbs */
.project-thumb {
  width: 52px;
  height: 52px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.photo-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

/* tile size modifiers — apply to both the emoji tile and the photo thumb */
.tile--lg { width: 72px; height: 72px; font-size: 2.2rem; border-radius: 18px; }
.tile--mast { width: 30px; height: 30px; font-size: 1rem; border-radius: 50%; }

/* project look picker (emoji + background colour) */
.look-picker { display: flex; flex-direction: column; gap: 8px; }
.look-top { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.look-top .small { margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-chip {
  width: 40px; height: 40px; font-size: 1.3rem;
  display: grid; place-items: center; padding: 0;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.emoji-chip.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(46, 93, 63, 0.25); }
.swatch {
  width: 36px; height: 36px; border-radius: 50%; padding: 0;
  border: 2px solid rgba(0, 0, 0, 0.08); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.swatch.selected { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--green); }

/* year chips with data coverage */
.year-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.year-chip {
  appearance: none;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}
.year-chip.selected { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.year-chip .cov {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
}
.year-chip .cov--some { background: var(--amber); border-color: var(--amber); }
.year-chip .cov--most { background: #7da267; border-color: #7da267; }
.year-chip .cov--full { background: var(--green); border-color: var(--green); }

/* sparkline chart rows */
.spark-row { padding: 10px 0; border-bottom: 1.5px dashed var(--line); }
.spark-row:last-child { border-bottom: none; }
.spark-row .row { align-items: baseline; }
.spark-svg { width: 100%; height: 34px; display: block; margin-top: 6px; }
.spark-svg rect { fill: var(--green); }
.spark-svg rect.faint { fill: var(--line); }
.spark-total { font-weight: 800; color: var(--green-deep); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------
   misc
   --------------------------------------------------------------- */
.divider {
  border: none;
  border-top: 1.5px dashed var(--line-strong);
  margin: 22px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
}

.callout {
  background: var(--amber-tint);
  border: 1.5px dashed var(--amber);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 0.88rem;
  color: #6b4f14;
}
.callout .link-btn { color: var(--terra-deep); }

.vision-photo {
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  display: block;
  margin-top: 10px;
}

#toast-root {
  position: fixed;
  bottom: calc(84px + var(--safe-bottom));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.3s cubic-bezier(0.2, 1.2, 0.4, 1), toast-out 0.3s ease 2.4s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.empty-note {
  text-align: center;
  color: var(--ink-faint);
  padding: 30px 20px;
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------
   print — annual report becomes the donor document
   --------------------------------------------------------------- */
@media print {
  body { background: #fff; }
  .grain, .tabbar, .masthead, .no-print, #toast-root { display: none !important; }
  .app { padding: 0; max-width: none; }

  /* Each report section is a self-contained unit: never split it across a
     page boundary — if it doesn't fit in what's left of the page, push the
     whole thing to the top of the next page instead. */
  .card, .timecapsule {
    box-shadow: none;
    border-color: #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Keep a heading glued to the content that follows it. */
  .card h2, .card h3, .timecapsule .eyebrow {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Rows within a section (table rows, month-by-month bars) shouldn't split
     mid-row either, even if the section itself has to break. */
  .report-table tr, .spark-row {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (min-width: 561px) {
  .app { padding-top: 34px; }
}
