/* CloseHive local guide pages (scripts/hive/build.mjs). The CloseHive look: white space, green-into-blue glow,
   Questrial headings, soft glass cards, gentle motion. Phone first; light and dark. */
@font-face { font-family: Questrial; src: url(/hive/questrial.woff2) format('woff2'); font-display: swap; }
:root {
  --ink: #091747; --soft: #4A5578; --mute: #7A84A3; --line: #E5EAF3; --bg: #FFFFFF; --panel: #F6F8FC; --glass: rgba(255,255,255,.78);
  --green: #22C46B; --cyan: #21D1FE; --blue: #147ABF; --grad: linear-gradient(100deg, #22C46B 0%, #21D1FE 55%, #147ABF 100%);
  --sell: #0B7A43; --sell-tint: #E5F7EC; --buy: #1466B8; --buy-tint: #E6F4FD; --coral: #D9573F;
  --accent: #0F8A7A; --tint: #E6F8F3; --shadow: 0 1px 2px rgba(9,23,71,.04), 0 10px 30px rgba(9,23,71,.07);
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #EEF2FA; --soft: #B0BAD3; --mute: #8792B0; --line: #233052; --bg: #070D1F; --panel: #0F1830; --glass: rgba(15,24,48,.72);
    --sell: #6EDC9C; --sell-tint: rgba(24,169,87,.16); --buy: #7CCBF7; --buy-tint: rgba(30,159,227,.16); --accent: #5FE3C2; --tint: rgba(42,212,180,.12); --coral: #FF8A73;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px rgba(0,0,0,.35); }
}
.t-sell { --accent: var(--sell); --tint: var(--sell-tint); }
.t-buy { --accent: var(--buy); --tint: var(--buy-tint); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow-x: hidden; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, .heronum b, .stat .value, .result b, .brand span { font-family: Questrial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(34px, 8.6vw, 54px); line-height: 1.08; margin: 10px 0 12px; }
h2 { font-size: clamp(24px, 5.4vw, 30px); line-height: 1.2; margin: 44px 0 14px; }
main, .crumbs, .foot { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.ic { width: 18px; height: 18px; flex: none; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: var(--glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 21px; }
.bar-cta { color: #fff; background: var(--grad); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(33,209,254,.28); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; font-size: 13px; color: var(--mute); }
.crumbs a { color: var(--mute); text-decoration: none; }

/* Hero: soft green-to-blue glow, one number, one button */
.hero { position: relative; margin: 14px -16px 8px; padding: 30px 20px 26px; border-radius: 0 0 32px 32px; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto -20%; height: 140%; z-index: -1;
  background: radial-gradient(60% 55% at 15% 30%, rgba(34,196,107,.22), transparent 70%), radial-gradient(55% 60% at 85% 20%, rgba(33,209,254,.26), transparent 70%), radial-gradient(60% 60% at 60% 90%, rgba(20,122,191,.18), transparent 70%); }
.hero::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px; background: var(--grad); opacity: .5; }
.kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .02em; backdrop-filter: blur(8px); }
.lead { font-size: 19px; color: var(--soft); margin: 0 0 18px; max-width: 34em; }
.heronum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.heronum b { font-size: clamp(40px, 11vw, 58px); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heronum span { color: var(--soft); font-size: 15px; }
.trust { margin: 10px 0 0; font-size: 13px; color: var(--mute); }
.note { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 12px 18px; margin: 18px 0 0; font-size: 15.5px; backdrop-filter: blur(8px); }
.note::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--grad); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; color: #fff; background: var(--grad);
  font-weight: 800; font-size: 18px; text-decoration: none; box-shadow: 0 10px 26px rgba(33,209,254,.32), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.big { min-height: 58px; font-size: 19px; width: 100%; max-width: 420px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; justify-content: center;
  transform: translateY(110%); transition: transform .35s ease; }
.dock.on { transform: none; }
.dock.always { transform: none; }
.dock .btn { width: 100%; max-width: 520px; }
@media (min-width: 900px) { .dock { display: none; } }

/* Number cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 22px 0; }
.stat { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); }
.stat .label { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.3; color: var(--soft); font-weight: 600; }
.stat .label .ic { color: var(--accent); }
.stat .value { font-size: clamp(25px, 6.6vw, 32px); line-height: 1.15; margin-top: 2px; }
.stat .compare { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--accent); }
.stat .compare.down { background: rgba(20,122,191,.1); color: var(--blue); }
.stat .meaning { font-size: 13px; line-height: 1.4; color: var(--mute); }

/* Insights and plain lists */
.insights, .plain { list-style: none; padding: 0; margin: 0; }
.insights li, .plain li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--line); }
.insights li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(33,209,254,.35); }
.insights li::after { content: ""; position: absolute; left: 9px; top: 20px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plain li::before { content: ""; position: absolute; left: 6px; top: 22px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); opacity: .8; }

/* Steps: a connected timeline with glowing dots */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 8px 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(#22C46B, #21D1FE, #147ABF); opacity: .45; }
.steps li { counter-increment: s; position: relative; padding: 8px 0 14px 54px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid transparent; background-image: linear-gradient(var(--bg), var(--bg)), var(--grad); background-origin: border-box; background-clip: padding-box, border-box;
  color: var(--accent); font-weight: 800; font-size: 15px; box-shadow: 0 0 0 4px var(--bg), 0 0 18px rgba(33,209,254,.3); }
.callout { background: var(--tint); border-radius: 18px; padding: 14px 16px; margin: 18px 0; }

/* Calculators */
.calc { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 22px 18px; margin: 24px 0; box-shadow: var(--shadow); overflow: hidden; }
.calc::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.calc h2 { margin-top: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fields label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--soft); font-weight: 700; }
.fields input { font: inherit; font-size: 20px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; min-height: 52px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.fields input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(33,209,254,.18); }
.result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 22px 0 8px; }
.result b { font-size: clamp(40px, 11vw, 54px); line-height: 1.05; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.result span { color: var(--soft); }
.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 6px 0 4px; }
.split i { display: block; height: 100%; transition: width .5s ease; }
.split i.keep { background: var(--grad); }
.split i.cost { background: rgba(217,87,63,.55); }
.split i.owed { background: var(--mute); opacity: .55; }
.lines { list-style: none; padding: 0; margin: 10px 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lines li span:last-child { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Neighbors as bars */
.bars { display: grid; gap: 12px; margin: 14px 0; }
.barrow { padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.barrow.here { background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.barhead { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.barhead span { font-weight: 800; font-variant-numeric: tabular-nums; }
.barhead a { text-decoration: none; font-weight: 600; }
.track { height: 10px; border-radius: 999px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 999px; background: var(--grad); box-shadow: 0 0 12px rgba(33,209,254,.4); }
.barrow:not(.here) .track i { opacity: .55; box-shadow: none; }
.barnote { font-size: 13px; color: var(--mute); }

/* Bottom call to action */
.cta { position: relative; text-align: center; border-radius: 28px; padding: 30px 20px; margin: 44px 0; overflow: hidden; isolation: isolate; border: 1px solid var(--line); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 0% 0%, rgba(34,196,107,.18), transparent 70%), radial-gradient(70% 90% at 100% 100%, rgba(33,209,254,.2), transparent 70%), var(--panel); }
.cta h2 { margin-top: 0; }

/* Cards to other pages */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; gap: 2px; padding: 15px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.card:hover { border-color: var(--cyan); }
.card span { color: var(--mute); font-size: 14px; }
.card.t-sell b { color: var(--sell); } .card.t-buy b { color: var(--buy); } .card.t-brand b { color: var(--blue); }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 700; min-height: 32px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
summary::-webkit-details-marker { display: none; }
.sources ul { padding-left: 20px; font-size: 13.5px; color: var(--mute); }
.small { font-size: 13.5px; color: var(--mute); }
.foot { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 20px; padding-bottom: 110px; }
.foot a { color: var(--mute); }
@media (prefers-reduced-motion: no-preference) {
  .btn, .card { transition: transform .15s ease, box-shadow .15s ease; }
  .btn:active, .card:active { transform: scale(.98); }
  .hero h1, .hero .lead, .heronum, .hero .btn { animation: rise .6s ease both; }
  .hero .lead { animation-delay: .06s; } .heronum { animation-delay: .12s; } .hero .btn { animation-delay: .18s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Computers: a wider hero with the number and button side by side */
@media (min-width: 900px) {
  .hero { margin: 18px 0 8px; padding: 40px 40px 34px; border-radius: 32px; display: grid; grid-template-columns: 1.25fr 1fr; column-gap: 32px; align-items: end; }
  .hero > .kicker, .hero > h1, .hero > .lead, .hero > .note { grid-column: 1 / -1; }
  .hero .heronum { margin: 0; }
  .hero .btn.big { justify-self: stretch; }
  .hero .trust { grid-column: 2; margin-top: 8px; text-align: center; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}

/* Real place photo at the top of the hero */
.photo { margin: -10px 0 18px; border-radius: 22px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 6px; font-size: 11px; color: rgba(255,255,255,.88);
  background: linear-gradient(transparent, rgba(5,12,40,.55)); }
.photo figcaption a { color: inherit; }
@media (min-width: 900px) { .hero > .photo { grid-column: 1 / -1; } .photo img { aspect-ratio: 21 / 8; } }

/* Deep situation guides: a warm opening, readable sections, a checklist with checkmarks. */
.heart { margin: 22px 0 6px; padding: 18px 20px; border-radius: 20px; background: var(--tint); border: 1px solid var(--line); }
.heart p { margin: 0 0 10px; font-size: 18px; line-height: 1.7; }
.heart p:last-child { margin-bottom: 0; }
article h3 { font-size: 18px; margin: 20px 0 4px; }
ul.check { list-style: none; padding-left: 0; }
ul.check li { position: relative; padding-left: 30px; margin: 8px 0; }
ul.check li::before { content: "✓"; position: absolute; left: 4px; top: 0; color: var(--accent); font-weight: 800; }
.help ul { padding-left: 20px; }

/* Ask CloseHive: the helper on every guide page */
.ask-open { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 8; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(9,23,71,.25); animation: rise .5s ease both .6s; }
.ask-open:hover { transform: translateY(-1px); }
.ask-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(33,209,254,.22); }
body.asking .ask-open, body.asking .dock { display: none; }
.ask { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; max-height: min(82vh, 640px); max-height: min(86dvh, 680px); display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); border-top-left-radius: 22px; border-top-right-radius: 22px; box-shadow: 0 -12px 40px rgba(9,23,71,.22);
  padding: 14px 16px calc(12px + env(safe-area-inset-bottom)); animation: fadein .22s ease both; }
.ask[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.ask-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ask-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.ask-head small { color: var(--mute); font-size: 12px; }
.ask-x { width: 44px; height: 44px; border: 0; background: transparent; color: var(--soft); font-size: 28px; cursor: pointer; }
.ask-log { flex: 1; overflow-y: auto; padding: 12px 0; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.ask-me { margin: 0; max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.5; }
.ask-bot { align-self: flex-start; background: var(--panel); border-bottom-left-radius: 6px; }
.ask-you { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.ask-wait span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--mute); animation: blink 1s infinite; }
.ask-wait span:nth-child(2) { animation-delay: .15s; } .ask-wait span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.ask-go { align-self: stretch; text-align: center; padding: 13px 16px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 800; text-decoration: none; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.ask-chips button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.ask-form { display: flex; gap: 8px; }
.ask-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 16px; }
.ask-form button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; }
.ask-note { margin: 8px 0 0; color: var(--mute); font-size: 11.5px; text-align: center; }
.ask-tip { position: fixed; right: 16px; bottom: calc(142px + env(safe-area-inset-bottom)); z-index: 8; max-width: min(260px, calc(100vw - 32px)); padding: 10px 14px;
  border-radius: 16px 16px 4px 16px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14.5px; font-weight: 600;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; cursor: pointer; }
.ask-tip.on { opacity: 1; transform: none; pointer-events: auto; }
body.asking .ask-tip { display: none; }
/* Small phones: a little tighter. Phones turned sideways: the sheet uses the whole height. */
@media (max-width: 360px) { .ask-open { padding: 0 14px; font-size: 14px; } .ask-me { font-size: 15px; } }
@media (max-height: 480px) and (orientation: landscape) { .ask { max-height: 100dvh; border-radius: 0; } .ask-chips { flex-wrap: nowrap; overflow-x: auto; } }
/* Tablets and computers: a floating card in the corner that grows with the screen. */
@media (min-width: 700px) {
  .ask-open { bottom: 24px; right: 24px; }
  .ask-tip { right: 24px; bottom: 84px; }
  .ask { left: auto; right: 24px; bottom: 24px; width: min(420px, calc(100vw - 48px)); max-height: min(78vh, 680px); border-radius: 22px; }
}
@media (min-width: 1600px) { .ask { width: 460px; } .ask-me { font-size: 16.5px; } }
@media (prefers-reduced-motion: reduce) { .ask-open, .ask, .ask-wait span { animation: none; } }
