[hidden]{display:none !important}
/* ============================================================
   Printable Habit Tracker — styles
   Palette: warm cream, soft sage green, blush.
   Ink/heading tones borrow from the logo's deep teal so the
   logo sits natively without recoloring it.
   ============================================================ */

:root {
  --cream:      #faf6ef;
  --cream-2:    #f3ecdf;
  --sage:       #9cb89a;
  --sage-deep:  #6f9474;
  --sage-soft:  #e4ede2;
  --blush:      #e8c7c2;
  --blush-soft: #f6e4e1;
  --teal-ink:   #134f5c;  /* from logo */
  --teal-2:     #1b6b78;
  --green-pop:  #5aa451;  /* from logo */
  --text:       #2f3a3b;
  --muted:      #6b7775;
  --line:       #d9cfc0;
  --white:      #ffffff;
  --radius:     14px;
  --shadow:     0 4px 18px rgba(19, 79, 92, 0.08);
  --maxw:       1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Quicksand', 'Nunito', sans-serif;
  color: var(--teal-ink);
  line-height: 1.2;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--teal-2); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
}
.logo-link { display: inline-flex; }
.logo { height: 120px; width: auto; display: block; }
@media (max-width: 520px) { .logo { height: 84px; } }
.header-nav { display: flex; gap: 22px; }
.header-nav a {
  text-decoration: none;
  color: var(--teal-ink);
  font-weight: 700;
  font-size: 0.95rem;
}
.header-nav a:hover { color: var(--green-pop); }

/* ---------- Hero ---------- */
.hero { padding: 12px 0 4px; text-align: center; }
.hero h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 6px;
  font-weight: 700;
}
.hero-sub {
  max-width: 680px;
  margin: 0 auto;
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- Tool ---------- */
.tool { padding: 28px 0 56px; }
.tool-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: start;
}

.controls {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 92px;
}
.controls-title { margin: 0 0 16px; font-size: 1.25rem; }

.field { border: 0; margin: 0 0 18px; padding: 0; }
.field > label, .field-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--teal-ink);
  margin-bottom: 7px;
}
.hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; }

input[type="text"], textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
}
input[type="text"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* presets */
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-ink);
  background: var(--sage-soft);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: .15s;
}
.preset:hover { background: var(--sage); color: var(--white); }
.preset.active { background: var(--sage-deep); color: var(--white); border-color: var(--sage-deep); }

/* segmented controls */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--cream-2);
  padding: 5px;
  border-radius: 12px;
}
.seg-opt { flex: 1 1 auto; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--muted);
  padding: 8px 6px;
  border-radius: 8px;
  white-space: nowrap;
  transition: .15s;
}
.seg-opt input:checked + span { background: var(--white); color: var(--teal-ink); box-shadow: var(--shadow); }
.seg-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--sage-soft); }

.daily-hint { margin: 8px 0 0; display: none; }

/* color-code checkbox control */
.check-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--teal-ink);
  cursor: pointer;
  min-height: 44px;
}
.check-opt input { width: 16px; height: 16px; accent-color: var(--sage-deep); cursor: pointer; }

/* actions */
.actions { display: flex; gap: 10px; margin-top: 6px; }
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: 11px;
  padding: 12px 16px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: .15s;
}
.btn-primary { background: var(--green-pop); color: var(--white); flex: 1; }
.btn-primary:hover { background: #4d9145; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--teal-ink); }
.btn-ghost:hover { background: var(--cream-2); }

/* ---------- Preview ---------- */
.preview-pane { min-width: 0; }
.preview-tag {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 30px 30px 34px;
  color: #1d2727;
  /* keep an approximate page feel on screen */
  min-height: 600px;
  /* make themed colors actually print */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  /* ----- theme tokens (Classic / B&W defaults) ----- */
  --accent:     #134f5c;
  --grid-line:  #c7cdcc;
  --head-bg:    #eef2f1;
  --head-text:  #20302f;
  --habit-bg:   #fbfdfb;
}

/* ----- color themes (light, ink-friendly, high contrast) ----- */
.sheet.theme-classic { --accent:#134f5c; --grid-line:#c7cdcc; --head-bg:#eef2f1; --head-text:#20302f; --habit-bg:#fbfdfb; }
.sheet.theme-sage    { --accent:#4a7a52; --grid-line:#c6d6c2; --head-bg:#e4ede2; --head-text:#2c3f2c; --habit-bg:#f4f8f2; }
.sheet.theme-blush   { --accent:#a64a5e; --grid-line:#e2c6cc; --head-bg:#f6e4e8; --head-text:#4a2c33; --habit-bg:#fdf6f7; }
.sheet.theme-ocean   { --accent:#1b5e8a; --grid-line:#c3d6e2; --head-bg:#e2eef6; --head-text:#1f3a4a; --habit-bg:#f4f9fc; }
.sheet.theme-sunset  { --accent:#b5581e; --grid-line:#e6d0bb; --head-bg:#f8e8d6; --head-text:#4a3320; --habit-bg:#fdf8f2; }
.sheet.theme-bold    { --accent:#111827; --grid-line:#9aa3ad; --head-bg:#d7dde3; --head-text:#111827; --habit-bg:#f4f6f8; }

/* wider preview in landscape so wide (monthly) grids breathe on screen */
.sheet.landscape { overflow-x: auto; }
.sheet.landscape table { min-width: 720px; }
@media (min-width: 881px) {
  /* let the preview column take over the full grid width in landscape */
  .tool-grid:has(.sheet.landscape) { grid-template-columns: 300px 1fr; }
}

/* sheet internals (shared by screen + print) */
.sheet-head { text-align: center; border-bottom: 2px solid var(--accent); padding-bottom: 12px; margin-bottom: 18px; }
.sheet-title { font-family: 'Quicksand', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--accent); margin: 0; }
.sheet-sub { font-size: 0.9rem; color: #5a6463; margin: 4px 0 0; text-transform: capitalize; }

.sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sheet th, .sheet td { border: 1px solid var(--grid-line); text-align: center; }
.sheet th {
  background: var(--head-bg);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.72rem;
  padding: 6px 3px;
}
.sheet td { height: 26px; }
.sheet .habit-cell {
  text-align: left;
  padding: 6px 8px;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--head-text);
  background: var(--habit-bg);
  width: 30%;
}
.sheet .corner { background: var(--head-bg); }

/* ----- color-code habits: key legend + row dots ----- */
.habit-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex: 0 0 auto;
}
.habit-key { margin: 0 0 16px; }
.habit-key-title {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 6px;
}
.habit-key-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.habit-key-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--head-text);
}
.sheet .habit-cell .habit-dot { margin-right: 5px; }

/* ----- circle / ring tracker ----- */
.circle-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 28px;
  padding: 6px 0 2px;
}
.circle-svg { width: 380px; max-width: 100%; height: auto; }
.circle-key { margin: 0; max-width: 240px; }
.circle-key .habit-key-list { flex-direction: column; gap: 5px; }
.circle-note { font-size: 0.72rem; color: var(--muted); margin: 8px 0 0; }

/* ----- year chain (don't-break-the-chain heat-map) ----- */
.chain-habit {
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 4px;
}
.chain-note { text-align: center; font-size: 0.74rem; color: #5a6463; margin: 4px 0 8px; }
.chain-wrap { overflow-x: auto; }
.sheet .chain-table { min-width: 640px; }
.sheet .chain-table th { font-size: 0.58rem; padding: 3px 0; }
.sheet .chain-table td { height: 17px; }
.sheet .chain-table td.chain-mo {
  width: 36px;
  background: var(--head-bg);
  color: var(--accent);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.66rem;
  padding: 1px 2px;
}
.sheet .chain-table th.chain-mo { width: 36px; }
.sheet .chain-table .chain-cell { background: var(--habit-bg); }
.sheet .chain-table .chain-blank { border: 0; background: transparent; }

/* ----- extras (streak / reward / reflection / mood) ----- */
.sheet .extra-box {
  margin-top: 14px;
  border: 1px solid var(--grid-line);
  border-radius: 8px;
  padding: 10px 12px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.sheet .extra-box h4 {
  margin: 0 0 8px;
  font-family: 'Quicksand', sans-serif;
  color: var(--accent);
  font-size: 0.9rem;
}
.streak-row { display: flex; flex-wrap: wrap; gap: 4px; }
.streak-cell {
  width: 22px; height: 22px;
  border: 1.5px solid var(--grid-line);
  border-radius: 4px;
  font-size: 0.58rem;
  line-height: 1;
  color: #8a9492;
  padding: 2px 0 0 3px;
}
.extra-lines {
  background-image: repeating-linear-gradient(transparent, transparent 23px, #dfe4e3 23px, #dfe4e3 24px);
  min-height: 72px;
}
.extra-lines-short { min-height: 48px; }
.mood-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-cell {
  width: 30px; height: 30px;
  border: 1.5px solid var(--grid-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  opacity: 0.85;
}

/* extras checkbox group in the controls */
.extras-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.extras-grid .check-opt { min-height: 34px; }

/* print-only 12-month container (filled just before printing) */
#print-months { display: none; }

/* mark styles inside cells */
.mark { display: inline-block; }
.mark-checkbox { width: 13px; height: 13px; border: 1.5px solid #7a8482; border-radius: 3px; }
.mark-circle { width: 14px; height: 14px; border: 1.5px solid #7a8482; border-radius: 50%; }
/* color-in = empty fillable cell, nothing drawn */

.sheet .notes-box {
  margin-top: 18px;
  border: 1px solid #c7cdcc;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 64px;
}
.sheet .notes-box h4 {
  margin: 0 0 6px;
  font-family: 'Quicksand', sans-serif;
  color: var(--teal-ink);
  font-size: 0.9rem;
}
.sheet .notes-text { font-size: 0.85rem; color: #41504e; white-space: pre-wrap; }
.sheet .notes-lines { background-image: repeating-linear-gradient(transparent, transparent 23px, #dfe4e3 23px, #dfe4e3 24px); min-height: 72px; }

.sheet-empty { text-align: center; color: var(--muted); padding: 60px 10px; }

/* daily layout list */
.daily-list { width: 100%; border-collapse: collapse; }
.daily-list td { border: 1px solid #c7cdcc; padding: 7px 9px; font-size: 0.85rem; }
.daily-time { width: 64px; font-weight: 700; color: var(--teal-ink); background: #fbfdfb; }

/* ---------- Supporting content ---------- */
.content { padding: 18px 0 40px; }
.content.faq { background: var(--blush-soft); padding: 44px 0 56px; }
.prose { max-width: 820px; }
.prose h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.prose p { margin: 0 0 14px; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 8px; }

.info-table { width: 100%; border-collapse: collapse; margin: 8px 0 10px; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.info-table th, .info-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.info-table th { background: var(--sage-soft); color: var(--teal-ink); font-family: 'Quicksand', sans-serif; }
.info-table tr:last-child td { border-bottom: 0; }

/* FAQ details */
details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--teal-ink);
  font-family: 'Quicksand', sans-serif;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; float: right; color: var(--sage-deep); font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin: 12px 0 2px; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-logo { height: 46px; width: auto; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { text-decoration: none; color: var(--teal-ink); font-weight: 700; }
.footer-nav a:hover { color: var(--green-pop); }
.copyright { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .tool-grid { grid-template-columns: 1fr; }
  .controls { position: static; }
  .sheet { padding: 22px 16px 26px; min-height: auto; }
  .header-nav { display: none; }
}

/* site-url footer: only visible when printing a sheet */
.print-foot{display:none}

/* ============================================================
   PRINT — the sheet is the product. Hide everything else.
   ============================================================ */
@media print {
  @page { size: portrait; margin: 12mm; }

  .no-print { display: none !important; }

  html, body { background: #fff !important; margin: 0; padding: 0; }

  /* collapse layout so only the sheet flows on the page */
  main, .tool, .tool-grid, .preview-pane, .content, .hero, section { all: unset; display: block; }
  .content, .faq, .hero, #how, #faq, .pop-guides, .site-footer, .famblock { display: none !important; }

  .tool-grid { display: block; }

  .sheet {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    width: 100%;
    overflow: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* keep themed accents/backgrounds when printing (Classic already reads B&W) */
  .sheet-title, .sheet th, .sheet .notes-box h4, .daily-time { color: var(--accent) !important; }
  .sheet .habit-cell { color: var(--head-text) !important; }
  .sheet th, .sheet .corner { background: var(--head-bg) !important; }
  .info-table th { background: #eee !important; }
  .sheet th, .sheet td, .daily-list td, .sheet .notes-box { border-color: var(--grid-line) !important; }
  .mark-checkbox, .mark-circle { border-color: #555 !important; }
  .habit-dot, .circle-svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet.landscape table { min-width: 0 !important; }

  /* give fillable cells more vertical room on paper */
  .sheet td { height: 30px; }

  /* year chain: keep cells compact so 12×31 fits one page */
  .sheet .chain-table { min-width: 0 !important; }
  .sheet .chain-table td { height: 15px; }
  .sheet .chain-table td.chain-mo { background: var(--head-bg) !important; color: var(--accent) !important; }
  .sheet .chain-table .chain-cell { background: var(--habit-bg) !important; }
  .sheet .chain-table .chain-blank { border: 0 !important; background: transparent !important; }

  /* extras keep their themed accents and borders on paper */
  .sheet .extra-box { border-color: var(--grid-line) !important; }
  .sheet .extra-box h4 { color: var(--accent) !important; }
  .streak-cell, .mood-cell { border-color: var(--grid-line) !important; }

  /* "print all 12 months": show the print-only sheets, hide the preview sheet */
  body.print-12 #sheet { display: none !important; }
  body.print-12 #print-months { display: block; }
  #print-months .print-sheet { page-break-after: always; }
  #print-months .print-sheet:last-child { page-break-after: auto; }

  .print-foot{display:block;text-align:center;font-size:8pt;font-weight:700;letter-spacing:.04em;color:#b3b3b3;margin-top:8px}
}

/* ===== Lively single green theme (matches the logo) — 2026-07-06 ===== */
:root{
  --green-pop:#4ea24a;                 /* brightened logo green */
  --teal-ink:#134f5c;                  /* logo teal */
  --accent-grad:linear-gradient(120deg,#5bb457,#2f9e7a 55%,#134f5c);
}
.btn,.preset,.panel,.controls,.hero{transition:transform .12s ease,box-shadow .2s ease,background-color .2s,color .2s,border-color .2s}
/* gradient headline + entrance */
.hero h1{background:var(--accent-grad);-webkit-background-clip:text;background-clip:text;color:transparent;animation:phtRise .6s cubic-bezier(.2,.7,.2,1) both}
.hero-sub{animation:phtRise .6s .08s cubic-bezier(.2,.7,.2,1) both}
@keyframes phtRise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
/* floating green blobs behind the hero */
.hero{position:relative;overflow:hidden}
.hero::before,.hero::after{content:"";position:absolute;border-radius:50%;filter:blur(6px);opacity:.28;z-index:0;pointer-events:none;animation:phtFloat 9s ease-in-out infinite}
.hero::before{width:130px;height:130px;background:#5bb457;top:-30px;right:8%}
.hero::after{width:90px;height:90px;background:#2f9e7a;bottom:-20px;left:6%;animation-duration:11s}
.hero>*{position:relative;z-index:1}
@keyframes phtFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-16px)}}
@media(prefers-reduced-motion:reduce){.hero h1,.hero-sub,.hero::before,.hero::after{animation:none}}
/* buttons */
.btn-primary{background:var(--green-pop)!important;border-color:var(--green-pop)!important;color:#fff!important}
.btn-primary:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 10px 22px rgba(19,79,92,.18);filter:brightness(1.05)}
.btn-primary:active{transform:translateY(0) scale(.99)}
.btn-ghost:hover{transform:translateY(-2px);border-color:var(--green-pop);color:var(--teal-ink)}
/* preset chips (green) */
.preset{cursor:pointer;background:#e6f4e4;color:#2f7d46}
.preset:hover{transform:translateY(-2px);background:var(--green-pop);color:#fff;border-color:var(--green-pop);box-shadow:0 6px 14px rgba(19,79,92,.14)}
.preset.active{background:var(--green-pop);color:#fff;border-color:var(--green-pop)}
.panel:hover,.controls:hover{box-shadow:0 10px 30px rgba(19,79,92,.12)}

/* monthly header: compact day number + single-letter weekday, no overflow */
.sheet thead th{overflow:hidden}
.sheet .d-num{display:block;line-height:1.05;font-weight:700}
.sheet .d-dow{display:block;font-size:.58rem;font-weight:600;opacity:.7;line-height:1;margin-top:1px}
.sheet th{padding:5px 1px}
.sheet .corner{width:132px}
.sheet .habit-cell{width:132px;overflow-wrap:normal;word-break:normal}
