/* ============================================================
   HYDRATE — design system
   Porcelain light surface · deep-ink structure · glacial aqua
   accent. One OS pane, masterful transitions, command bar dock.
   ============================================================ */

:root {
  --porcelain: #FBFAF7;     /* near-white, a whisper warm */
  --porcelain-2: #F3F1EB;
  --ink: #29261F;           /* warm near-black */
  --deep: #3E362C;          /* deep warm brown — buttons, brand chip */
  --deep-2: #4A4136;
  --tan: #F0EDE5;           /* the "darker" surfaces — barely, deliberately */
  --tan-2: #E9E4D8;
  --aqua: #0E9CC9;          /* pure-water blue — validated, passes all six checks */
  --aqua-ink: #0B7FA5;
  --ice: #7FD9F2;
  --mint: #4E8F55;
  --line: rgba(41, 38, 31, .09);
  --line-strong: rgba(41, 38, 31, .17);
  --muted: rgba(41, 38, 31, .58);
  --faint: rgba(41, 38, 31, .38);
  --glass: rgba(255, 255, 255, .68);
  --glass-solid: rgba(255, 255, 255, .92);
  --shadow: 0 1px 2px rgba(62,54,44,.05), 0 12px 40px -12px rgba(62,54,44,.15);
  --shadow-lift: 0 2px 6px rgba(62,54,44,.07), 0 24px 60px -16px rgba(62,54,44,.24);
  --r: 22px;
  --r-sm: 12px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --dock-h: 118px;
  --ease-master: cubic-bezier(.32, .72, .18, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* the living water layer — fixed; content floats and scrolls, water doesn't */
#waterLoop { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#waterLoop svg, #waterLoop video { width: 100%; height: 100%; object-fit: cover; display: block; }
#siteScroll, .topbar, .dock, .palette, .auth-sheet { position: relative; z-index: 1; }
.topbar { z-index: 40; } .dock { z-index: 50; } .palette { z-index: 90; } .auth-sheet { z-index: 95; }

body {
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow: hidden; /* scroll shell below */
  -webkit-font-smoothing: antialiased;
}

/* ---------- scroll shell (composition-gate safe) ---------- */
#siteScroll {
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-bottom: calc(var(--dock-h) + 40px);
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 99; background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 8px; }

a { color: var(--aqua-ink); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- masterful pane transitions ---------- */
::view-transition-old(root) { animation: paneOut .26s var(--ease-master) both; }
::view-transition-new(root) { animation: paneIn .44s var(--ease-master) both; }
@keyframes paneOut { to { opacity: 0; transform: translateY(-14px) scale(.992); filter: blur(3px); } }
@keyframes paneIn { from { opacity: 0; transform: translateY(22px) scale(.996); filter: blur(4px); } }
#view.pane-leave { opacity: 0; transform: translateY(-14px); filter: blur(3px); transition: all .18s var(--ease-master); }
#view.pane-enter { animation: paneIn .44s var(--ease-master) both; }
#view { will-change: opacity, transform; }

/* ---------- system bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 8px clamp(16px, 4vw, 40px);
  background: linear-gradient(rgba(251,250,247,.88), rgba(251,250,247,.66));
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.brand .drop { width: 30px; height: 30px; border-radius: 9px; background: var(--deep); display: grid; place-items: center; }
.brand .drop svg { width: 17px; height: 17px; stroke: #EFC9AE; fill: none; stroke-width: 1.7; }
.brand .b-name { font-size: 16px; line-height: 1.15; }
.brand .b-sub { display: block; font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.sys { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.sys .chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); padding: 5px 11px; white-space: nowrap;
}
.acc-chip { cursor: pointer; color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 12.5px; }
.acc-chip:hover { border-color: var(--aqua); }
#sndBtn { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#sndBtn.snd-on { color: var(--aqua-ink); border-color: rgba(14,156,201,.45); background: rgba(14,156,201,.08); }
#sndBtn.snd-on svg { animation: sndPulse 1.8s ease-in-out infinite; }
@keyframes sndPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.chip-ico { width: 14px; height: 14px; stroke: var(--aqua-ink); fill: none; stroke-width: 1.8; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(43,179,163,.18); display: inline-block; }
.live-dot.closed { background: #B4832B; box-shadow: 0 0 0 3px rgba(180,131,43,.16); }
.k-hint { cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); color: var(--muted); font-family: var(--font-mono); font-size: 11px; padding: 5px 9px; }
.k-hint:hover { border-color: var(--line-strong); color: var(--ink); }
@media (max-width: 700px) { .hide-sm { display: none !important; } }

/* ---------- command bar dock (the OS pane's one control) ---------- */
.dock {
  position: fixed; z-index: 50;
  left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(680px, calc(100vw - 16px));
  background: rgba(242, 239, 231, .9);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(41,38,31,.10);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 14px 44px -10px rgba(62,54,44,.35);
  overflow: hidden;
  transition: height .5s var(--ease-master), width .5s var(--ease-master);
  display: flex; flex-direction: column;
  height: var(--dock-h);
}
.dock.chat-open { height: min(62dvh, 560px); width: min(720px, calc(100vw - 16px)); }
.dock-icons {
  display: flex; gap: 2px; padding: 8px 8px 2px;
  overflow-x: auto; scrollbar-width: none; flex: none;
}
.dock-icons::-webkit-scrollbar { display: none; }
.dock-icons a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 58px; padding: 6px 8px 5px;
  border-radius: 14px;
  color: rgba(41,38,31,.58);
  font-size: 9.5px; font-weight: 500; letter-spacing: .02em;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.dock-icons a svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.dock-icons a svg.digi-ico { width: 22px; height: 22px; stroke: none; overflow: visible; transition: transform .25s var(--ease-master); }
.dock-icons a:hover { color: var(--ink); background: rgba(41,38,31,.06); }
.dock-icons a:hover svg.digi-ico { transform: translateY(-2px) scale(1.06); }
.dock-icons a[aria-current="page"] { color: var(--ink); background: rgba(14,156,201,.14); }
.dock-icons a[aria-current="page"] svg { stroke: var(--aqua); }
.dock-icons a[aria-current="page"] svg.digi-ico { animation: digiBob 2.6s ease-in-out infinite; }
@keyframes digiBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
.dg-shine { animation: dgShine 3.2s ease-in-out infinite; }
@keyframes dgShine { 0%,100% { opacity: .5; } 50% { opacity: .95; } }
.dg-wheel { transform-box: fill-box; transform-origin: center; }
a[aria-current="page"] .dg-wheel, a:hover .dg-wheel { animation: dgSpin 1.4s linear infinite; }
@keyframes dgSpin { to { transform: rotate(360deg); } }
.dg-wave { transform-box: fill-box; transform-origin: center; animation: dgWave 3.4s ease-in-out infinite; }
@keyframes dgWave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1.3px); } }
.dg-dot { transform-box: fill-box; transform-origin: center; }
a:hover .dg-dot, a[aria-current="page"] .dg-dot { animation: dgPop 1.2s ease-in-out infinite; }
.dg-dot:nth-of-type(2) { animation-delay: .12s !important; }
.dg-dot:nth-of-type(3) { animation-delay: .24s !important; }
.dg-dot:nth-of-type(4) { animation-delay: .36s !important; }
@keyframes dgPop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) { .digi-ico, .dg-shine, .dg-wheel, .dg-wave, .dg-dot { animation: none !important; } }

.dock-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-log {
  flex: 1; overflow-y: auto; min-height: 0;
  display: none; flex-direction: column; gap: 10px;
  padding: 12px 16px 6px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.chat-x {
  display: none; position: absolute; top: 10px; right: 12px; z-index: 5;
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(41,38,31,.08); color: rgba(41,38,31,.6); font-size: 13px; line-height: 1;
}
.chat-x:hover { background: rgba(41,38,31,.14); color: var(--ink); }
.dock { position: fixed; } /* anchor context for .chat-x */
.dock.chat-open .chat-x { display: grid; place-items: center; }
.ora-ava { width: 26px; height: 26px; border-radius: 8px; flex: none; margin-right: 2px; background: #fff; padding: 2px; }
.dock.chat-open .chat-log { display: flex; }
.msg { max-width: 86%; font-size: 13.5px; line-height: 1.55; border-radius: 16px; padding: 9px 13px; animation: msgIn .32s var(--ease-master) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.me { align-self: flex-end; background: var(--aqua); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,.78); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(62,54,44,.06); }
.msg.bot b { color: var(--ink); }
.msg.bot a { color: var(--aqua-ink); }
.msg.typing { display: inline-flex; gap: 5px; align-items: center; padding: 12px 15px; }
.tdot { width: 6px; height: 6px; border-radius: 50%; background: rgba(41,38,31,.4); animation: tdot 1.1s ease-in-out infinite; }
.tdot:nth-child(2) { animation-delay: .18s; }
.tdot:nth-child(3) { animation-delay: .36s; }
@keyframes tdot { 0%,100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
a.chat-chip { text-decoration: none; display: inline-block; }
.chat-chip {
  cursor: pointer; border: 1px solid rgba(14,156,201,.4); border-radius: 999px;
  background: rgba(255,255,255,.6); color: var(--aqua-ink);
  font-size: 12px; font-weight: 600; padding: 6px 12px;
  transition: background .15s;
}
.chat-chip:hover { background: rgba(14,156,201,.14); }
.dock-input {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 12px;
}
.dock-input input {
  flex: 1; border: 1px solid rgba(41,38,31,.12); border-radius: 18px;
  background: #FFFFFF; outline: none;
  color: var(--ink); font: 500 15px var(--font-body);
  padding: 14px 18px; min-height: 50px;
  box-shadow: 0 1px 3px rgba(62,54,44,.07);
  transition: border-color .2s, box-shadow .2s;
}
.dock-input input::placeholder { color: rgba(41,38,31,.4); }
.dock-input input:focus { border-color: rgba(14,156,201,.5); box-shadow: 0 0 0 3px rgba(14,156,201,.12); }
.dock-send {
  width: 44px; height: 44px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--aqua); color: #fff; display: grid; place-items: center;
  transition: transform .15s, background .2s; flex: none;
}
.dock-send:hover { background: var(--aqua-ink); }
.dock-send:active { transform: scale(.92); }
.dock-send svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.chat-close {
  display: none; flex: none; align-self: center; margin-top: 6px;
  border: 0; background: none; color: rgba(41,38,31,.42);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; cursor: pointer; padding: 4px 10px;
}
.dock.chat-open .chat-close { display: block; }
.chat-note { flex: none; text-align: center; font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; color: rgba(41,38,31,.36); padding-bottom: 6px; display: none; }
.dock.chat-open .chat-note { display: block; }

/* ---------- layout primitives ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.panel { padding-top: clamp(22px, 4vw, 42px); padding-bottom: 12px; }
.p-head { max-width: 720px; padding-top: clamp(18px, 3vw, 34px); }
.kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--aqua-ink); margin-bottom: 14px; }
.display {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(26px, 4.6vw, 46px); line-height: 1.07; margin: 0 0 14px;
}
.display .soft { color: var(--aqua-ink); }
h2.h { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(21px, 2.6vw, 28px); margin: 0 0 8px; }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 6px; letter-spacing: -.01em; }
.lede { font-size: clamp(16px, 1.8vw, 18.5px); color: var(--muted); max-width: 620px; margin: 0; }
.section { margin: clamp(24px, 3.6vw, 44px) 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------- glass tiles ---------- */
.glass {
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), var(--shadow);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
}
.tile { padding: 22px; position: relative; overflow: hidden; }
.tile.link { display: block; color: var(--ink); transition: transform .22s ease, box-shadow .22s ease, border-color .22s; }
.tile.link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.tile .t-icon { width: 26px; height: 26px; stroke: var(--aqua-ink); fill: none; stroke-width: 1.6; margin-bottom: 12px; }
.tile p { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.tile .t-go { position: absolute; top: 18px; right: 18px; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.tile-dark { background: linear-gradient(150deg, var(--tan), var(--tan-2)); color: var(--ink); border-color: rgba(41,38,31,.10); }
.tile-dark p { color: var(--muted); }
.tile-dark .t-icon { stroke: var(--aqua); }
.tile-dark h3, .tile-dark .stat-n { color: var(--ink); }

/* ---------- stat tiles ---------- */
.stat { padding: 18px 20px; }
.stat .stat-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat .stat-n { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.1; margin-top: 6px; }
.stat .stat-s { font-size: 12.5px; color: var(--faint); margin-top: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  border-radius: 999px; padding: 12px 22px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--deep); color: #fff; box-shadow: 0 8px 24px -8px rgba(10,53,71,.5); }
.btn-primary:hover { background: var(--deep-2); }
.btn-aqua { background: var(--aqua); color: #fff; box-shadow: 0 8px 24px -8px rgba(14,139,168,.55); }
.btn-aqua:hover { background: var(--aqua-ink); }
.btn-ghost { background: var(--glass); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.p-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.p-cta .aside { font-size: 13px; color: var(--faint); }

/* ---------- arrival geo popup ---------- */
.geo-pop {
  position: fixed; inset: 0; z-index: 96; display: grid; place-items: center;
  background: rgba(41,38,31,.28); backdrop-filter: blur(7px);
}
.geo-panel {
  width: min(400px, calc(100vw - 32px)); text-align: center;
  background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.8);
  border-radius: 26px; box-shadow: var(--shadow-lift);
  padding: 30px 26px 24px;
  animation: sheetIn .5s var(--ease-master) both;
}
.geo-drop { width: 54px; height: 54px; margin: 0 auto 14px; animation: geoBob 2.4s ease-in-out infinite; }
@keyframes geoBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.geo-panel h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 21px; margin: 0 0 6px; }
.geo-panel p { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.geo-fine { font-size: 10.5px; color: var(--faint); margin-top: 12px !important; line-height: 1.5; }
.geo-fine a { color: var(--muted); text-decoration: underline; }

/* ---------- cockpit (home = the app, viewport-locked) ---------- */
body.cockpit-mode #siteScroll { overflow: hidden; padding-bottom: 0; }
.cockpit {
  display: grid; gap: 12px;
  grid-template-columns: 236px 1fr 312px;
  height: calc(100dvh - 56px - 132px - env(safe-area-inset-bottom, 0px));
  padding: 12px clamp(12px, 2vw, 24px) 0;
  max-width: 1560px; margin: 0 auto;
}
.ck-rail { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; padding-bottom: 6px; }
.ck-center { position: relative; min-height: 0; border-radius: var(--r); overflow: hidden; border: 1px solid rgba(255,255,255,.75); box-shadow: var(--shadow); }
.ck-center svg { width: 100%; height: 100%; display: block; background: linear-gradient(160deg, #E8F2EC, #F1F5EC); }
.ck-card { background: rgba(255,255,255,.66); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid rgba(255,255,255,.78); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 15px; }
.ck-h { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.ck-town { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: 7px 8px; border-radius: 9px; font: 500 13px var(--font-body); color: var(--muted); }
.ck-town:hover { background: rgba(41,38,31,.05); color: var(--ink); }
.ck-town.on { background: rgba(14,156,201,.12); color: var(--aqua-ink); font-weight: 600; }
.ck-link { display: block; font-size: 12.5px; color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.ck-link:hover { background: rgba(41,38,31,.05); color: var(--ink); }
.ck-prod { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.cp-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: #EAF4F7; }
.cp-img-ph { display: grid; place-items: center; }
.cp-drop { width: 20px; height: 20px; stroke: var(--aqua); fill: none; stroke-width: 1.6; }
.ck-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ck-chip { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 4px 10px; font: 600 10.5px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.ck-chip.on { border-color: var(--aqua); color: var(--aqua-ink); background: rgba(14,156,201,.1); }
.leaflet-tile { filter: saturate(.82) brightness(1.05); }
.leaflet-container { font-family: var(--font-body); }
.nm-pin { filter: drop-shadow(0 2px 4px rgba(11,127,165,.4)); }
.nm-station-pin svg { animation: geoBob 2.6s ease-in-out infinite; }
.ck-prod:last-child { border-bottom: 0; }
.ck-prod .cp-n { flex: 1; min-width: 0; }
.ck-prod .cp-t { font-weight: 600; font-size: 13px; line-height: 1.3; }
.ck-prod .cp-p { font-family: var(--font-mono); font-size: 11px; color: var(--aqua-ink); }
.ck-add { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 15px; line-height: 1; color: var(--ink); flex: none; }
.ck-add:hover { border-color: var(--aqua); color: var(--aqua-ink); }
.ck-cart { border: 1.5px solid rgba(14,156,201,.4); }
.ck-cart-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 5px 0; }
.ck-cart-total { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); padding-top: 9px; margin-top: 6px; }
.ck-mode { display: flex; gap: 6px; margin: 8px 0 10px; }
.ck-mode button { flex: 1; border: 1.5px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 7px 4px; font: 600 11.5px var(--font-body); cursor: pointer; color: var(--muted); }
.ck-mode button.on { border-color: var(--aqua); color: var(--aqua-ink); background: rgba(14,156,201,.08); }
@media (max-width: 980px) {
  .cockpit { grid-template-columns: 1fr; height: auto; overflow-y: auto; }
  body.cockpit-mode #siteScroll { overflow-y: auto; padding-bottom: calc(var(--dock-h) + 40px); }
  .ck-center { height: 42dvh; min-height: 300px; order: -1; }
  .ck-rail { overflow: visible; }
}

/* ---------- the node map ---------- */
.node-map { position: relative; overflow: hidden; border-radius: var(--r); margin-top: 14px; }
.node-map svg { display: block; width: 100%; height: auto; background: linear-gradient(160deg, #EAF3F2, #F2F6F1); }
.nm-zoom { transition: transform 1.1s var(--ease-master); transform-origin: center; }
.nm-town { font-family: var(--font-mono); font-size: 10px; fill: rgba(41,38,31,.55); }
.nm-dot { fill: rgba(41,38,31,.3); }
.nm-cov { fill: rgba(95,122,74,.10); stroke: rgba(95,122,74,.35); stroke-width: 1; stroke-dasharray: 3 4; }
.nm-station { animation: geoBob 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nm-you { animation: youPulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes youPulse { 0% { opacity: 1; } 50% { opacity: .55; } 100% { opacity: 1; } }
.nm-cta {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.8); border-radius: 16px; padding: 10px 14px;
  font-size: 13px;
}
.nm-cta b { font-family: var(--font-display); font-size: 13.5px; }
.nm-cta .spacer { flex: 1; }

/* ---------- app location row ---------- */
.loc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-ico { width: 20px; height: 20px; stroke: var(--aqua); fill: none; stroke-width: 1.7; flex: none; }
.water-card h3 { font-size: 18px; }

/* ---------- hero ---------- */
.hero-os { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: stretch; margin-top: clamp(20px, 3vw, 36px); }
@media (max-width: 880px) { .hero-os { grid-template-columns: 1fr; } }
.ticker {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  border-top: 1px solid var(--line); margin-top: clamp(26px, 4vw, 44px); padding-top: 16px;
}
.ticker b { color: var(--ink); font-weight: 500; }

/* ---------- order flow ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 18px; }
.step-pill {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; color: var(--faint);
  background: var(--glass);
}
.step-pill.on { border-color: var(--aqua); color: var(--aqua-ink); background: rgba(14,139,168,.08); }
.step-pill.done { color: var(--mint); border-color: rgba(43,179,163,.4); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.choice {
  text-align: left; cursor: pointer; padding: 18px;
  background: var(--glass); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s, background .15s, transform .15s;
  color: var(--ink);
}
.choice:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.choice.sel { border-color: var(--aqua); background: rgba(14,139,168,.07); box-shadow: 0 0 0 3px rgba(14,139,168,.12); }
.choice .c-t { font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.choice .c-p { font-family: var(--font-mono); font-size: 12px; color: var(--aqua-ink); white-space: nowrap; }
.choice .c-d { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.order-review { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 800px) { .order-review { grid-template-columns: 1fr; } }
.receipt { font-size: 14px; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.receipt .r-row:last-child { border-bottom: 0; }
.receipt .r-row b { font-family: var(--font-mono); font-weight: 500; }
.receipt .r-total { font-family: var(--font-display); font-weight: 700; font-size: 20px; }

/* ---------- coverage checker ---------- */
.cov { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.cov input {
  flex: 1; min-width: 200px;
  font: 500 15px var(--font-body); color: var(--ink);
  background: var(--glass-solid); border: 1.5px solid var(--line-strong); border-radius: 999px;
  padding: 12px 20px; outline: none;
}
.cov input:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(14,139,168,.14); }
.cov-out { margin-top: 12px; font-size: 14px; min-height: 22px; }
.cov-out .ok { color: var(--mint); font-weight: 600; }
.cov-out .near { color: #B4832B; font-weight: 600; }
.town-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.town-cloud span { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; color: var(--muted); background: var(--glass); }

/* ---------- process rail ---------- */
.rail { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; counter-reset: st; }
@media (max-width: 940px) { .rail { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .rail { grid-template-columns: repeat(2, 1fr); } }
.rail .r-step { padding: 16px 14px; counter-increment: st; }
.rail .r-step::before { content: "0" counter(st); font-family: var(--font-mono); font-size: 10.5px; color: var(--aqua-ink); letter-spacing: .1em; }
.rail .r-step h3 { font-size: 13.5px; margin-top: 8px; }
.rail .r-step p { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* ---------- commerce cards ---------- */
.shop-block { margin-top: 8px; }
.fwd-embed-note { font-size: 13px; color: var(--faint); margin-top: 10px; }
.fwd-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fwd-card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.fwd-card:hover { border-color: var(--line-strong); }
.fwd-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 12px; background: var(--porcelain-2); }
.fwd-card-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.fwd-card-price { font-family: var(--font-mono); font-size: 13px; color: var(--aqua-ink); margin-top: 4px; }
.fwd-card-desc { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------- dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.dash-grid > * { grid-column: span 12; }
@media (min-width: 880px) {
  .dg-4 { grid-column: span 4 !important; }
  .dg-6 { grid-column: span 6 !important; }
  .dg-8 { grid-column: span 8 !important; }
}
.countdown-strip { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.countdown-strip .cd-n { font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: -.03em; }
.dash-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); letter-spacing: .06em; }
select.dash-sel, input.dash-in {
  font: 500 14px var(--font-body); color: var(--ink);
  background: var(--glass-solid); border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 9px 12px; outline: none; max-width: 100%;
}
select.dash-sel:focus, input.dash-in:focus { border-color: var(--aqua); }
.hydro-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.chart-wrap { position: relative; margin-top: 12px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -130%);
  background: var(--deep); color: #fff; font-family: var(--font-mono); font-size: 11px;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; transition: opacity .12s;
}
.chart-tip.show { opacity: 1; }
.bottle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.bottle-row:last-child { border-bottom: 0; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--glass); cursor: pointer; font-size: 15px; color: var(--ink); line-height: 1; }
.stepper button:hover { border-color: var(--ink); }
.stepper b { font-family: var(--font-mono); font-size: 14px; min-width: 18px; text-align: center; }

/* ---------- hours table ---------- */
.hours { font-size: 14px; width: 100%; border-collapse: collapse; }
.hours td { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.hours td:last-child { text-align: right; font-family: var(--font-mono); font-size: 12.5px; }
.hours tr.today td { color: var(--aqua-ink); font-weight: 600; }

/* ---------- insights / articles ---------- */
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.art-card { display: block; color: var(--ink); padding: 22px; transition: transform .22s ease, box-shadow .22s, border-color .22s; }
.art-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.art-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--aqua-ink); }
.art-card h3 { font-size: 18px; margin-top: 8px; }
.art-card p { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.art-min { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 12px; display: block; }
.article { max-width: 720px; }
.article h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-size: 22px; margin: 34px 0 10px; }
.article p { font-size: 16.5px; line-height: 1.75; color: rgba(7,34,46,.82); margin: 14px 0; }
.article strong { color: var(--ink); }
.article .art-cta { margin: 30px 0; }
.crumbs { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* ---------- command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(41,38,31,.35); backdrop-filter: blur(6px); display: grid; place-items: start center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-panel { width: min(560px, calc(100vw - 32px)); background: var(--glass-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lift); overflow: hidden; }
.palette-panel input { width: 100%; border: 0; outline: none; background: transparent; font: 500 16px var(--font-body); color: var(--ink); padding: 18px 20px; border-bottom: 1px solid var(--line); }
.palette-results { max-height: 320px; overflow-y: auto; padding: 8px; }
.palette-results a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 11px 14px; border-radius: 10px; color: var(--ink); }
.palette-results a.sel, .palette-results a:hover { background: rgba(14,139,168,.09); }
.pr-name { font-weight: 600; font-size: 14px; }
.pr-desc { font-size: 12px; color: var(--faint); }
.palette-empty { padding: 20px; font-size: 14px; color: var(--muted); }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

/* ---------- auth sheet ---------- */
.auth-sheet { position: fixed; inset: 0; z-index: 95; background: rgba(41,38,31,.4); backdrop-filter: blur(8px); display: grid; place-items: end center; }
.auth-sheet[hidden] { display: none; }
@media (min-width: 700px) { .auth-sheet { place-items: center; } }
.auth-panel {
  position: relative;
  width: min(440px, 100vw);
  background: var(--glass-solid); border: 1px solid var(--line);
  border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lift);
  padding: 30px 26px calc(26px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  animation: sheetIn .45s var(--ease-master) both;
}
@media (min-width: 700px) { .auth-panel { border-radius: 26px; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(40px); } }
.auth-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; color: var(--faint); font-size: 15px; cursor: pointer; padding: 6px; }
.auth-drop { width: 52px; height: 52px; border-radius: 16px; background: var(--deep); display: grid; place-items: center; margin: 0 auto 14px; }
.auth-drop svg { width: 26px; height: 26px; stroke: var(--ice); fill: none; stroke-width: 1.7; }
.auth-panel h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 22px; margin: 0 0 6px; }
.auth-sub { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.auth-btns { display: grid; gap: 9px; }
.auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: #fff;
  font: 600 14.5px var(--font-body); color: var(--ink);
  transition: border-color .15s, transform .12s;
}
.auth-btn:hover { border-color: var(--ink); }
.auth-btn:active { transform: scale(.985); }
.auth-btn .a-logo, .a-logo { width: 18px; height: 18px; flex: none; }
.auth-phone { display: grid; gap: 9px; }
.auth-phone input {
  width: 100%; text-align: center; font: 600 16px var(--font-body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 999px;
  padding: 13px 18px; outline: none; letter-spacing: .02em;
}
.auth-phone input:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(0,113,227,.15); }
.auth-primary { background: var(--aqua); color: #fff; border-color: transparent; }
.auth-primary:hover { background: var(--aqua-ink); border-color: transparent; }
.auth-or { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 2px 0; }
.auth-ghost { background: transparent; border-style: dashed; color: var(--muted); }
.auth-note { font-size: 12.5px; color: var(--aqua-ink); min-height: 0; margin: 12px 0 0; }
.auth-note b { color: var(--ink); }
.auth-fine { font-size: 11px; color: var(--faint); margin: 14px 0 0; line-height: 1.55; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- footer ---------- */
.microline { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--faint); border-top: 1px solid var(--line); margin-top: clamp(40px, 6vw, 72px); padding: 18px 0 8px; line-height: 1.8; }
.microline a { color: var(--muted); }

.noscript { max-width: 640px; margin: 60px auto; padding: 0 24px; font-family: var(--font-body); }

/* proposed-terms tag */
.proposed { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #B4832B; border: 1px solid rgba(180,131,43,.35); border-radius: 6px; padding: 2px 7px; vertical-align: middle; margin-left: 8px; }
