/* HiveDay — honey amber on warm cream, forced light. External stylesheet only. */
:root {
  color-scheme: light;
  --amber: #B45309;
  --amber-dark: #92400E;
  --amber2: #F59E0B;
  --amber-soft: #FEF3C7;
  --bg: #FFFBEB;
  --card: #FFFFFF;
  --ink: #292018;
  --dim: #78716C;
  --line: #F0E2C4;
  --ok: #15803D;
  --danger: #B3261E;
  --danger-soft: #FDECEA;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --r: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
}
.hidden { display: none !important; }
.small { font-size: .86rem; color: var(--dim); }
a { color: var(--amber); }
h2 { font-size: 1.35rem; margin: 6px 0 14px; }
h3 { font-size: 1.05rem; }

/* header */
.app-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  color: #fff; padding: 10px 16px;
  box-shadow: 0 2px 10px rgba(146, 64, 14, .25);
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-mark img { border-radius: 11px; display: block; }
.app-header h1 { font-size: 1.25rem; margin: 0; line-height: 1.15; }
.tagline { margin: 0; font-size: .78rem; color: #FDE68A; }
.demo-badge { background: #fff; color: var(--amber-dark); font-size: .62rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; vertical-align: middle; letter-spacing: .08em; }
.pro-badge { background: #fff; color: var(--amber-dark); font-weight: 800; font-size: .75rem; padding: 5px 10px; border-radius: 999px; letter-spacing: .06em; }

/* buttons */
.btn {
  display: inline-block; border: 1.5px solid transparent; border-radius: 12px;
  padding: 11px 18px; font-size: .98rem; font-weight: 700; cursor: pointer;
  background: #fff; color: var(--ink); font-family: inherit; text-align: center;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--amber); color: #fff; }
.btn-gold { background: linear-gradient(135deg, #FBBF24, #F59E0B); color: #451A03; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--amber); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: .86rem; border-radius: 999px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; margin-top: 8px; }
a.btn { text-decoration: none; }

/* layout */
main { max-width: 860px; margin: 0 auto; padding: 16px 14px 10px; }
.screen { display: none; }
.screen.active { display: block; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(146, 64, 14, .06);
}
.card h3 { margin-top: 0; }
.empty { text-align: center; color: var(--dim); padding: 28px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); }

/* bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff; border-top: 1px solid var(--line);
  display: flex; box-shadow: 0 -2px 12px rgba(146, 64, 14, .08);
}
.nav-btn {
  flex: 1; background: none; border: 0; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: .68rem; color: var(--dim); font-weight: 600; padding: 6px 0;
}
.nav-btn .nav-ico { font-size: 1.25rem; line-height: 1.1; }
.nav-btn.active { color: var(--amber); }
.nav-btn.nav-cta .nav-ico { background: var(--amber-soft); border-radius: 999px; padding: 3px 12px; }

/* banners */
.sync-error { background: var(--danger-soft); color: var(--danger); padding: 10px 16px; font-size: .9rem; text-align: center; }
.trial-banner {
  background: var(--amber-soft); border: 1px solid var(--amber2); border-radius: var(--r);
  padding: 12px 16px; margin-bottom: 12px; font-size: .94rem;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.trial-banner .sp { flex: 1; }
.demo-note { background: var(--amber-soft); border-radius: 10px; padding: 10px 12px; font-size: .88rem; margin: 10px 0; }

/* hive cards */
.apiary-title { font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin: 18px 2px 8px; }
.hive-card { display: flex; gap: 12px; align-items: flex-start; }
.hive-ico { font-size: 1.9rem; line-height: 1; background: var(--amber-soft); border-radius: 12px; padding: 9px; }
.hive-main { flex: 1; min-width: 0; }
.hive-name { font-weight: 800; font-size: 1.05rem; }
.hive-meta { font-size: .85rem; color: var(--dim); }
.badge { display: inline-block; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; vertical-align: middle; }
.badge-due { background: var(--danger-soft); color: var(--danger); }
.badge-ok { background: #E7F6EC; color: var(--ok); }
.badge-varroa { background: var(--danger); color: #fff; }
.badge-queen { background: var(--amber-soft); color: var(--amber-dark); }
.next-action { background: #FFFBEB; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; font-size: .95rem; }

/* forms */
.field { margin: 12px 0; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; font-size: 1rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber2); }
.form-error { color: var(--danger); font-size: .9rem; margin: 8px 0; }
.form-ok { color: var(--ok); font-size: .9rem; margin: 8px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; bottom: 4px; background: none; border: 0; font-size: 1.1rem; cursor: pointer; padding: 8px; }

/* toggle chips (fast logging) */
.chip-label { font-weight: 700; font-size: .9rem; margin: 14px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 9px 16px; font-size: .95rem; font-weight: 600;
  cursor: pointer; font-family: inherit; min-height: 44px;
}
.chip[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #fff; }
.chip.chip-on[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }

/* segmented tabs */
.seg { display: flex; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px 4px; border-radius: 9px; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--dim); font-family: inherit; }
.seg button.active { background: var(--amber-soft); color: var(--amber-dark); }

/* stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: center; }
.stat-card .v { font-size: 1.7rem; font-weight: 800; color: var(--amber-dark); }
.stat-card .k { font-size: .78rem; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.rowline { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.rowline:last-child { border-bottom: 0; }

/* plans */
.plan-card { border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; margin: 10px 0; background: #fff; }
.plan-card.hot { border-color: var(--amber2); background: #FFFBEB; }
.price { font-size: 1.5rem; font-weight: 800; color: var(--amber-dark); }
.price .small { font-weight: 400; }

/* guide */
.guide-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.guide-item summary { cursor: pointer; padding: 15px 16px; font-weight: 700; font-size: 1rem; list-style: none; }
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item .guide-body { padding: 0 16px 14px; font-size: .94rem; }
.guide-body ul, .guide-body ol { margin: 8px 0 8px 20px; padding: 0; }
.guide-body li { margin: 5px 0; }
.guide-body table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: .9rem; }
.guide-body th, .guide-body td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.mark-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #ccc; vertical-align: middle; margin-right: 6px; }

/* modal + toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(41, 32, 24, .55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 18px; padding: 22px 20px; width: 100%; max-width: 480px; position: relative; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.modal h3 { margin-top: 0; }
.modal-x { position: absolute; top: 10px; right: 10px; background: none; border: 0; font-size: 1.1rem; cursor: pointer; padding: 8px; color: var(--dim); }
#toast-root { position: fixed; bottom: calc(var(--nav-h) + 14px); left: 0; right: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .92rem; box-shadow: 0 6px 24px rgba(0,0,0,.3); max-width: 92vw; text-align: center; }
.acct-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.acct-tab { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px; font-weight: 700; cursor: pointer; font-family: inherit; }
.acct-tab.active { background: var(--amber-soft); border-color: var(--amber2); color: var(--amber-dark); }

/* landing */
.lp-hero { text-align: center; padding: 26px 6px 8px; }
.lp-hero h2 { font-size: 1.9rem; line-height: 1.2; margin: 8px 0; }
.lp-eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .14em; color: var(--amber); }
.lp-sub { color: var(--dim); max-width: 520px; margin: 0 auto 16px; }
.lp-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lp-fine { font-size: .82rem; color: var(--dim); margin-top: 12px; }
.lp-cards { display: grid; gap: 12px; margin: 18px 0; }
@media (min-width: 720px) { .lp-cards { grid-template-columns: repeat(3, 1fr); } }
.lp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.lp-card .lp-ico { font-size: 1.6rem; }
.lp-card h3 { margin: 8px 0 4px; }
.lp-card p { margin: 0; font-size: .92rem; color: var(--dim); }
.lp-plans { display: grid; gap: 12px; margin: 12px 0; }
@media (min-width: 720px) { .lp-plans { grid-template-columns: repeat(3, 1fr); } }
.lp-plan { border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; background: #fff; }
.lp-plan.hot { border-color: var(--amber2); background: #FFFBEB; }
.lp-plan h3 { margin: 4px 0; }
.lp-price { font-size: 1.6rem; font-weight: 800; color: var(--amber-dark); }
.lp-price span { font-size: .85rem; color: var(--dim); font-weight: 400; }
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
details.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 700; }
details.faq p { padding: 0 16px 13px; margin: 0; font-size: .92rem; color: var(--dim); }

/* boot */
#boot-loading { position: fixed; inset: 0; background: var(--bg); z-index: 200; display: grid; place-items: center; }
.boot-card { text-align: center; color: var(--dim); }
.boot-logo img { border-radius: 18px; }

/* history lists */
.hist-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hist-item:last-child { border-bottom: 0; }
.hist-item .del { float: right; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 4px 6px; color: var(--dim); }

/* success page */
.success-wrap { max-width: 520px; margin: 0 auto; padding: 32px 20px 60px; text-align: center; }
.big-emoji { font-size: 3.2rem; }
.how-list { text-align: left; }
.gap-top { margin-top: 12px; }
.mark-white { background: #FFFFFF; }
.mark-yellow { background: #FDE047; }
.mark-red { background: #EF4444; }
.mark-green { background: #22C55E; }
.mark-blue { background: #3B82F6; }
