/* Kentai Bonsai — app.css */
:root {
  --moss:       #5a7a4f;
  --moss-deep:  #3f5a37;
  --moss-soft:  #e6ede2;
  --bark:       #6b5742;
  --paper:      #f8f6f1;
  --paper-2:    #efeae0;
  --ink:        #232a23;
  --ink-soft:   #5b6359;
  --line:       #dcd6c8;
  --line-soft:  #ebe6da;
  --accent:     #c4842a;
  --warn:       #b85c2c;
  --danger:     #a23030;
  --ok:         #4f7a4a;
  --shadow:     0 2px 12px rgba(40,50,30,.06);
  --radius:     14px;
  --radius-sm:  9px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--moss-deep); }
a:hover { color: var(--moss); }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem;    margin: 0 0 .35rem; }
p  { margin: 0 0 .75rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.prose { white-space: pre-wrap; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding: 16px 0 48px; }

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(120%) blur(6px);
  background: rgba(248,246,241,.92);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.logo {
  font-weight: 600; text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; letter-spacing: -.01em;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--moss); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.muted { color: var(--ink-soft); }
.nav .btn { padding: 6px 12px; }

.nav-toggle, .nav-burger { display: none; }

@media (max-width: 720px) {
  .site-header .wrap { height: 54px; position: relative; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 38px; height: 38px; cursor: pointer;
    border-radius: 8px; padding: 8px;
    margin-left: auto;
  }
  .nav-burger span {
    display: block; height: 2px; width: 100%;
    background: var(--ink); border-radius: 2px;
    transition: transform .15s ease, opacity .15s ease;
  }
  .nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: absolute;
    top: 54px; left: 0; right: 0;
    display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 6px 16px rgba(40,50,30,.06);
    padding: 8px 16px;
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a {
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav .btn { align-self: flex-start; margin: 8px 0; }
}

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 18px 0;
  color: var(--ink-soft);
  font-size: .9rem;
}
.site-footer .wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  font-weight: 500; font-size: .95rem; text-decoration: none;
  cursor: pointer; transition: transform .04s ease, background .15s, border-color .15s;
}
.btn:hover { background: var(--paper-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: progress; }
.btn-primary { background: var(--moss); border-color: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-deep); border-color: var(--moss-deep); }
.btn-ghost { background: transparent; }
.btn-link { background: transparent; border-color: transparent; color: var(--moss-deep); padding-left: 0; padding-right: 0; }
.btn-danger { color: var(--danger); border-color: rgba(162,48,48,.3); background: #fff; }
.btn-danger:hover { background: rgba(162,48,48,.06); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: .9rem; }

.btn-mini {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 6px 10px; font-size: .8rem;
  cursor: pointer;
}
.btn-mini:hover { background: var(--paper-2); }
.btn-mini-danger { color: var(--danger); border-color: rgba(162,48,48,.3); }

/* Forms */
label { display: block; font-size: .9rem; color: var(--ink-soft); margin: 0 0 12px; }
label > input, label > select, label > textarea {
  display: block; width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff;
}
label > input:focus, label > select:focus, label > textarea:focus {
  outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(90,122,79,.15);
}
textarea { resize: vertical; }
.checkbox { display: flex; gap: 8px; align-items: center; }
.checkbox input { width: auto; margin: 0; }

.form-card {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.form-status { margin-top: 10px; font-size: .9rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }

/* Auth */
.auth-card {
  max-width: 420px; margin: 32px auto 0;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 16px; text-align: center; }
.auth-meta { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--ink-soft); }
.auth-meta a { color: var(--moss-deep); }

/* Flash */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; font-size: .95rem; }
.flash-success { background: #e6ede2; color: var(--moss-deep); border: 1px solid #cdd9c2; }
.flash-error   { background: #fbe7e1; color: var(--danger);    border: 1px solid #f1cdc0; }

/* Page heads */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin: 8px 0 22px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; }
.page-head-actions { display: flex; gap: 8px; }
.back { display: inline-block; color: var(--ink-soft); text-decoration: none; margin: 0 0 12px; }
.back:hover { color: var(--ink); }

/* Hero (homepage) */
.hero {
  display: grid; gap: 24px;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  padding: 36px 0 24px;
}
.hero h1 { font-size: 2.4rem; line-height: 1.1; max-width: 22ch; }
.hero p  { font-size: 1.05rem; color: var(--ink-soft); max-width: 48ch; }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hero-art {
  position: relative; height: 220px; border-radius: var(--radius);
  background: linear-gradient(180deg, #eef3e9 0%, #e0e7d6 100%);
  overflow: hidden;
}
.hero-art .trunk { position: absolute; left: 50%; bottom: 50px; transform: translateX(-50%);
  width: 14px; height: 80px; border-radius: 4px;
  background: linear-gradient(180deg, #6b5742, #4f4030); }
.hero-art .pot { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: 130px; height: 28px; border-radius: 6px;
  background: #4a3b2e; box-shadow: inset 0 -6px 0 #2e2519; }
.hero-art .leaf {
  position: absolute; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--moss);
}
.hero-art .l1 { left: calc(50% - 60px); bottom: 110px; width: 80px; height: 60px; opacity: .9; }
.hero-art .l2 { left: calc(50% - 30px); bottom: 130px; width: 80px; height: 60px; background: var(--moss-deep); opacity: .92; }
.hero-art .l3 { left: calc(50% + 20px); bottom: 110px; width: 70px; height: 50px; background: #6e9362; opacity: .9; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); margin: 24px 0; }
.feature { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.feature .ico { font-size: 1.5rem; margin-bottom: 6px; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .hero h1 { font-size: 1.9rem; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px; text-align: left; cursor: default;
  box-shadow: var(--shadow);
}
.stat-action { cursor: pointer; }
.stat-action:hover { background: var(--paper-2); }
.stat-num { font-size: 1.8rem; font-weight: 600; line-height: 1; }
.stat-lbl { color: var(--ink-soft); font-size: .85rem; margin-top: 6px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Quick actions */
.quick-actions { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.qa-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* Panels */
.panel {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* Trees list toolbar */
.trees-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px 18px;
  align-items: center; justify-content: space-between;
  margin: 0 0 14px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-soft); text-decoration: none;
  font-size: .85rem; font-weight: 500;
  transition: background .12s, border-color .12s, color .12s;
}
.chip:hover { background: var(--paper-2); color: var(--ink); }
.chip.on { background: var(--moss); border-color: var(--moss); color: #fff; }
.chip-n { background: rgba(0,0,0,.06); padding: 1px 7px; border-radius: 999px; font-size: .75rem; color: inherit; }
.chip.on .chip-n { background: rgba(255,255,255,.22); }
.toolbar-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.search-input {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font: inherit; min-width: 220px;
  background: #fff; color: var(--ink);
}
.search-input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(90,122,79,.15); }
.toolbar-controls select {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font: inherit; background: #fff;
}
@media (max-width: 720px) {
  .toolbar-controls { width: 100%; }
  .search-input { flex: 1 1 auto; min-width: 0; }
}

/* Cards (trees / listings) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .08s ease, box-shadow .15s;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(40,50,30,.08); }
.card.inactive { opacity: .65; }
.card-img { position: relative; aspect-ratio: 4/3; background: var(--paper-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .ph { font-size: 3rem; display: flex; align-items: center; justify-content: center; height: 100%; opacity: .3; }
.card-body { padding: 12px 14px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.price { font-weight: 600; }
.ribbon {
  position: absolute; top: 10px; left: 10px; background: var(--accent);
  color: #fff; font-size: .75rem; padding: 4px 8px; border-radius: 999px;
}
.ribbon-mute { background: var(--ink-soft); }

/* Badges */
.badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.badge { display: inline-block; font-size: .7rem; padding: 3px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); }
.badge-water       { background: #e2effa; color: #2b5a85; }
.badge-fert_liquid { background: #ecf6e2; color: #4f7a2c; }
.badge-fert_solid  { background: #f5edd9; color: #876217; }
.badge-rotation    { background: #f5e4dc; color: #8a3c1c; }
.badge-pruning     { background: #e3ecdb; color: #2e4d24; }
.badge-wiring      { background: #e9e6e2; color: #4f4a44; }
.badge-repotting   { background: #efe2c8; color: #6b4f17; }
.badge-ok          { background: #e6ede2; color: var(--moss-deep); }

/* Attention list */
.attention-list, .activity, .enquiry-list, .care-status { list-style: none; padding: 0; margin: 0; }
.attention-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
.attention-list li:last-child { border-bottom: 0; }
.attention-list a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: 1; min-width: 0; }
.al-name { font-weight: 500; }
.thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--paper-2); flex-shrink: 0; display: inline-block; text-align: center; line-height: 36px; }
.thumb.ph { font-size: 1rem; opacity: .5; }

/* Activity feed */
.activity li {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: start;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
.activity li:last-child { border-bottom: 0; }
.act-ico { font-size: 1.05rem; }
.act-del {
  appearance: none; border: 0; background: transparent;
  color: var(--ink-soft); cursor: pointer;
  width: 26px; height: 26px; border-radius: 6px;
  font-size: 1rem; line-height: 1;
  opacity: 0; transition: opacity .12s, color .12s, background .12s;
}
.activity li:hover .act-del,
.act-del:focus { opacity: 1; }
.act-del:hover { color: var(--danger); background: rgba(162,48,48,.08); }
@media (max-width: 720px) { .act-del { opacity: 1; } }

/* Tree detail */
.tree-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .tree-detail { grid-template-columns: 1fr; } }
.tree-gallery { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.tg-main { aspect-ratio: 4/3; background: var(--paper-2); border-radius: var(--radius-sm); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tg-main img { width: 100%; height: 100%; object-fit: cover; }
.tg-main .ph-large { font-size: 5rem; opacity: .3; }
.tg-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 10px; }
.tg-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.tg-thumb.is-main { border-color: var(--accent); }
.tg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tg-thumb .tg-actions { position: absolute; inset: auto 4px 4px auto; display: flex; gap: 4px; opacity: 0; transition: opacity .1s; }
.tg-thumb:hover .tg-actions { opacity: 1; }
.tg-upload-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; flex-wrap: wrap;
}
.tg-upload {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.tg-upload input { display: none; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--ink-soft); font-size: .85rem; }
.kv dd { margin: 0; }

/* Care status list */
.care-status li {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
.care-status li:last-child { border-bottom: 0; }
.care-status li.overdue .cs-when { color: var(--warn); font-weight: 500; }
.cs-label { font-size: .95rem; }
.cs-when { font-size: .85rem; color: var(--ink-soft); }

.cs-action { display: flex; align-items: center; gap: 6px; margin: 0; }
.cs-action input[type="date"] {
  padding: 4px 6px; font-size: .8rem; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--ink);
  width: auto;
}
.cs-action .btn-mini { white-space: nowrap; }
.repot-history { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.repot-history li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); position: relative; padding-left: 22px; }
.repot-history li::before { content: counter(r, decimal-leading-zero); counter-increment: r; position: absolute; left: 0; top: 10px; font-size: .7rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.repot-history li:last-child { border-bottom: 0; }
@media (max-width: 540px) {
  .care-status li { grid-template-columns: 1fr auto; row-gap: 6px; }
  .cs-action { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Listing detail */
.listing-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
@media (max-width: 900px) { .listing-detail { grid-template-columns: 1fr; } }
.listing-gallery { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.lg-main { aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); }
.lg-main img { width: 100%; height: 100%; object-fit: cover; }
.lg-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 10px; }
.lg-thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; padding: 0; background: none; }
.lg-thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-info { display: flex; flex-direction: column; gap: 12px; }
.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-big { font-size: 1.6rem; font-weight: 600; color: var(--moss-deep); }
.enquiry-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }

.enquiry-list li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.enquiry-list li:last-child { border-bottom: 0; }
.enq-head { font-size: .9rem; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.enq-body { white-space: pre-wrap; }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-soft); }

/* Charts */
.charts {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-areas:
    "species activity"
    "monthly monthly";
  gap: 16px;
}
.chart-cell {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.chart-cell h3 {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.chart-cell:nth-child(1) { grid-area: species; }
.chart-cell:nth-child(2) { grid-area: activity; }
.chart-cell:nth-child(3) { grid-area: monthly; }
@media (max-width: 720px) {
  .charts { grid-template-columns: 1fr; grid-template-areas: "species" "activity" "monthly"; }
}

.kchart { font-size: .85rem; }
.kc-empty { color: var(--ink-soft); font-style: italic; margin: 0; }

/* Species — horizontal bars */
.kchart-species { display: flex; flex-direction: column; gap: 8px; }
.kc-row { display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: center; gap: 10px; }
.kc-row .kc-label { color: var(--ink); font-size: .85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-row .kc-bar  { height: 8px; background: rgba(0,0,0,.04); border-radius: 999px; overflow: hidden; }
.kc-row .kc-bar span { display: block; height: 100%; border-radius: 999px; transition: width .35s ease; }
.kc-row .kc-val  { color: var(--ink-soft); font-variant-numeric: tabular-nums; min-width: 24px; text-align: right; font-weight: 500; }

/* Legend (shared) */
.kc-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.kc-key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .8rem; }
.kc-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Activity — 30 stacked vertical bars */
.kchart-activity { position: relative; }
.kc-stacked {
  display: grid; grid-template-columns: repeat(30, 1fr);
  gap: 2px; align-items: end;
  height: 120px;
  padding: 4px 0;
}
.kc-stack { height: 100%; display: flex; align-items: flex-end; }
.kc-stack-bar {
  width: 100%;
  display: flex; flex-direction: column-reverse;
  border-radius: 3px;
  overflow: hidden;
  min-height: 0;
  background: rgba(0,0,0,.03);
  transition: height .35s ease;
}
.kc-stack-bar:empty { background: transparent; }
.kc-seg { width: 100%; }

/* Monthly — vertical bars */
.kchart-monthly .kc-bars {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 6px; align-items: end;
  height: 140px;
  padding: 4px 0;
}
.kc-col { height: 100%; display: flex; align-items: flex-end; }
.kc-vbar {
  width: 100%;
  background: linear-gradient(180deg, var(--moss) 0%, var(--moss-deep) 100%);
  border-radius: 4px 4px 2px 2px;
  min-height: 0;
  transition: height .4s ease;
}
.kc-vbar:hover { filter: brightness(1.08); }

/* Axes */
.kc-axis {
  position: relative;
  margin-top: 6px;
  height: 14px;
  color: var(--ink-soft);
  font-size: .72rem;
  letter-spacing: .02em;
}
.kc-axis span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.kc-axis-flex {
  position: static;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  text-align: center;
  margin-top: 6px;
}
.kc-axis-flex span {
  position: static;
  transform: none;
  display: block;
}

/* Homepage extras */
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--moss-soft);
  color: var(--moss-deep);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
  margin-bottom: 14px;
}
.hero-bullets {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--ink-soft); font-size: .9rem;
}

.section-head { text-align: center; margin: 36px 0 22px; }
.section-head h2 { font-size: 1.7rem; margin: 4px 0 6px; }
.section-head .eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; font-weight: 600; color: var(--moss);
}
.section-head p { max-width: 56ch; margin: 0 auto; }

.how { padding: 16px 0 8px; }
.how-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.step {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
}
.step-num {
  font-size: .75rem; letter-spacing: .12em; font-weight: 700;
  color: var(--moss); margin-bottom: 8px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p  { font-size: .92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .how-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .how-steps { grid-template-columns: 1fr; } }

.thresholds { padding: 16px 0; }
.th-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.th-card {
  background: var(--paper-2); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.th-ico { font-size: 1.6rem; }
.th-card h3 { font-size: .95rem; margin: 6px 0 4px; color: var(--ink-soft); font-weight: 500; }
.th-card p { margin: 0; font-size: 1.1rem; }
.th-card strong { color: var(--moss-deep); }
@media (max-width: 720px) { .th-grid { grid-template-columns: 1fr 1fr; } }

.cta {
  margin: 28px 0;
  background: linear-gradient(135deg, var(--moss) 0%, var(--moss-deep) 100%);
  border-radius: 22px;
  color: #fff;
  padding: 38px 24px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(40,60,30,.18);
}
.cta h2 { color: #fff; font-size: 1.7rem; max-width: 22ch; margin: 0 auto 8px; }
.cta p  { color: rgba(255,255,255,.85); margin: 0 0 18px; }
.cta .btn-primary { background: #fff; color: var(--moss-deep); border-color: #fff; }
.cta .btn-primary:hover { background: var(--paper); border-color: var(--paper); color: var(--moss-deep); }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.cta .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.cta .btn-lg { padding: 12px 22px; font-size: 1rem; }

.faq { padding: 16px 0 32px; }
.faq-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.faq details {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--moss); font-size: 1.2rem; line-height: 1;
  transition: transform .15s;
}
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 720px) { .faq-grid { grid-template-columns: 1fr; } }

/* Toast */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  z-index: 100; opacity: 0; transition: opacity .15s, transform .15s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { background: var(--danger); }
.toast.ok  { background: var(--moss-deep); }
