/* AgroLive v2 · map home. Dark glass, cyan accent, status glows. Hand-built, no libraries. */
:root {
  color-scheme: dark;
  --bg0: #070b14; --bg1: #0b1220;
  --glass: rgba(255, 255, 255, 0.045); --glass2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09); --line2: rgba(255, 255, 255, 0.16);
  --text: #e8eef8; --muted: #a6b3c7; --faint: #8e9cb2;
  --cyan: #22d3ee; --cyanText: #67e8f9; --cyanSoft: rgba(34, 211, 238, 0.13);
  --green: #34d399; --amber: #fbbf24; --rose: #fb7185; --brand: #e4002b;
  --r: 18px; --r-sm: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg0); color: var(--text);
  font: 14px/1.45 var(--font); font-feature-settings: "cv11", "ss01"; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(820px 460px at 18% -8%, rgba(34, 211, 238, 0.13), transparent 62%),
    radial-gradient(640px 420px at 96% 4%, rgba(99, 102, 241, 0.11), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--bg0), var(--bg1) 60%, var(--bg0));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 10px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cyan); color: #04121a; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 8px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.nc { color: var(--faint); font-style: italic; font-weight: 500; font-size: 14px; }
.bad { color: var(--rose); } .warn { color: var(--amber); } .ok { color: var(--green); } .info { color: var(--cyanText); }
.warnText { color: var(--amber); }
.tag { display: block; margin-top: 6px; font-size: 11px; line-height: 1.35; color: var(--faint); letter-spacing: .01em; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow.sm { font-size: 11px; letter-spacing: .1em; display: inline-flex; align-items: center; gap: 6px; }
.hint { font-size: 12px; color: var(--faint); }
.fine { margin: 10px 0 0; font-size: 12px; color: var(--faint); line-height: 1.45; }
.num { font-variant-numeric: tabular-nums; }
.deskOnly { display: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 11, 20, 0.72); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topInner { max-width: 1440px; margin: 0 auto; padding: 8px 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 10px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; flex: none; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 15px; box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 6px 18px rgba(228, 0, 43, 0.28); }
.word { font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.v2 { font-size: 11px; font-weight: 800; color: var(--cyanText); border: 1px solid rgba(34, 211, 238, .4); border-radius: 7px; padding: 1px 6px; background: var(--cyanSoft); }
.asOfTop { display: none; flex: 1; min-width: 0; font-size: 12px; color: var(--muted); text-align: center; }
.topActions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--glass); cursor: pointer; font-variant-numeric: tabular-nums; font-size: 14px; }
.pill b { font-weight: 700; margin-right: 4px; }
.pill b:last-child { margin-right: 0; }
.pdot, .ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pdot.green, .ldot.green { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, .8); }
.pdot.yellow, .ldot.yellow { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, .75); }
.pdot.red, .ldot.red { background: var(--rose); box-shadow: 0 0 8px rgba(251, 113, 133, .8); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass); cursor: pointer; font-weight: 650; font-size: 14px; transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease); }
.btn:hover { background: var(--glass2); border-color: rgba(255,255,255,.24); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btnIcon { padding: 0; width: 44px; }
.btnCopy { border-color: rgba(34, 211, 238, .45); background: linear-gradient(180deg, rgba(34,211,238,.18), rgba(34,211,238,.08)); color: #d9fbff; }
.btnCopy.copied { border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .16); color: #d1fae5; }
.btnPrimary { background: linear-gradient(180deg, #2ad8f0, #16b7d4); color: #03141b; border-color: transparent; font-weight: 750; }
.btnPrimary:hover { background: linear-gradient(180deg, #4ce0f4, #1cc3df); }
.btnGhost { background: transparent; color: var(--cyanText); border-color: rgba(34, 211, 238, .28); }
.wide { width: 100%; margin-top: 12px; }
.menuWrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px; background: rgba(13, 20, 34, .96); border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; }
.menu a:hover, .menu a:focus-visible { background: var(--glass2); }
.menu .menuQuiet { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 60; pointer-events: none; padding: 12px 16px; border-radius: 14px; background: rgba(6, 40, 34, .95); border: 1px solid rgba(52, 211, 153, .55); color: #d1fae5; font-weight: 650; box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 24px rgba(52,211,153,.18); transition: opacity .2s var(--ease), transform .2s var(--ease); white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- layout ---------- */
.grid { max-width: 1440px; margin: 0 auto; padding: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card {
  position: relative; min-width: 0; border-radius: var(--r); padding: 16px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cardHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 28px; }
.statusTag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; background: rgba(255,255,255,.03); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--cyanSoft); border: 1px solid rgba(34, 211, 238, .38); color: var(--cyanText); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .18s var(--ease); }
.chip:hover { background: rgba(34, 211, 238, .22); }
.chipSm { min-height: 44px; font-size: 12.5px; padding: 0 12px; }

/* ---------- hero ---------- */
.hero::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: radial-gradient(420px 200px at 20% 0%, rgba(34,211,238,.12), transparent 70%); }
.heroTop { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.ringWrap { position: relative; width: 96px; height: 96px; }
.ring { width: 96px; height: 96px; overflow: visible; }
.ring .track { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 10; }
.ring .seg { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .seg.green { stroke: var(--green); filter: drop-shadow(0 0 5px rgba(52,211,153,.7)); }
.ring .seg.yellow { stroke: var(--amber); filter: drop-shadow(0 0 5px rgba(251,191,36,.6)); }
.ring .seg.red { stroke: var(--rose); filter: drop-shadow(0 0 5px rgba(251,113,133,.7)); }
.ringCenter { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ringCenter b { font-size: 23px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ringCenter span { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 1px; }
.summary { margin: 0; font-size: 14.5px; line-height: 1.42; font-weight: 600; }
.asOf { margin: 6px 0 0; font-size: 11px; color: var(--faint); line-height: 1.4; }
.headline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.hl { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); transition: border-color .18s var(--ease), background .18s var(--ease); }
.hl:hover { border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.05); }
.hl-available { grid-column: 1 / -1; }
.hlVal { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; font-weight: 760; letter-spacing: -.025em; line-height: 1.05; font-size: 30px; }
.hl-available .hlVal { font-size: 36px; }
.hlVal .unit { font-size: 15px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.hl-available .hlVal { color: #f3fbff; text-shadow: 0 0 24px rgba(34,211,238,.25); }
.hl-followups .hlVal { color: #ffe1e6; }
.hlSub { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.infoDot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--cyan); color: var(--cyanText); font: italic 700 10.5px/1 Georgia, serif; flex: none; }
.infoNote { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 8px 10px; border-radius: 12px; background: rgba(34, 211, 238, .06); border: 1px dashed rgba(34, 211, 238, .3); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.infoNote b { color: var(--text); font-weight: 650; }
.infoNote .infoDot { margin-top: 1px; }
.secondary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.sec { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; min-height: 44px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.sec:hover { border-color: rgba(34,211,238,.35); }
.secText { min-width: 0; display: flex; flex-direction: column; }
.secLabel { font-weight: 600; font-size: 12px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.sec .tag { margin-top: 3px; font-size: 10.5px; }
.secVal { font-size: 21px; font-weight: 740; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }

/* ---------- needs ---------- */
.today { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.need { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 10px 10px 10px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); overflow: hidden; }
.need::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: currentColor; box-shadow: 0 0 12px currentColor; }
.need.bad { color: var(--rose); } .need.warn { color: var(--amber); } .need.info { color: var(--cyan); }
.need.bad:first-child { color: var(--brand); }
.need.bad:first-child::before { background: #ff2d55; box-shadow: 0 0 14px rgba(255, 45, 85, .8); }
.rank { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 750; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line2); }
.needText { min-width: 0; color: var(--text); }
.needTitle { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.needSub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.need .tag { margin-top: 3px; }
.need .chip { min-width: 64px; padding: 0 12px; }
.needsAll { margin-top: 6px; display: grid; gap: 14px; }
.group h3 { margin: 6px 0 6px; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.group h3 .count { color: var(--faint); font-weight: 600; font-size: 12px; }
.group ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.row:hover { background: rgba(255,255,255,.03); }
.rowMain { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-weight: 600; font-size: 13.5px; }
.rowMain small { flex-basis: 100%; font-weight: 400; font-size: 12px; color: var(--muted); line-height: 1.35; }
.rowSide { flex: none; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 650; color: var(--cyanText); }

/* ---------- constellation ---------- */
.constellation { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr); grid-template-rows: repeat(4, auto); gap: 8px; }
.constellation .nodes { display: contents; }
.sourceLines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.sourceLines .track { fill: none; stroke-width: 6; opacity: .10; }
.sourceLines .flow { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 3 7; animation: flow 1.4s linear infinite; opacity: .9; }
.sourceLines .green { stroke: var(--green); } .sourceLines .yellow { stroke: var(--amber); } .sourceLines .red { stroke: var(--rose); }
.sourceLines .flow.yellow { animation-duration: 2.6s; }
.sourceLines .flow.red { animation: none; stroke-dasharray: 1.5 6; opacity: .75; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.hub { grid-column: 2; grid-row: 1 / span 4; align-self: center; justify-self: center; position: relative; z-index: 2; width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 50% 35%, rgba(34,211,238,.28), rgba(10, 20, 36, .96) 70%); border: 1px solid rgba(34, 211, 238, .55); box-shadow: 0 0 0 6px rgba(34,211,238,.06), 0 0 32px rgba(34,211,238,.35); line-height: 1.1; }
.hub b { font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.hub span { font-size: 10px; color: var(--cyanText); text-transform: uppercase; letter-spacing: .12em; }
.hub .hubSub { margin-top: 3px; font-size: 10px; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.hubRing { position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, .35); animation: spin 28s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 68px; min-width: 0; padding: 8px 10px; text-align: left; border-radius: 14px; cursor: pointer; background: rgba(12, 19, 33, .92); border: 1px solid var(--line2); transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
.node:hover { transform: translateY(-1px); }
.node.green { border-color: rgba(52, 211, 153, .45); box-shadow: 0 0 22px -8px rgba(52, 211, 153, .7); }
.node.yellow { border-color: rgba(251, 191, 36, .42); box-shadow: 0 0 22px -8px rgba(251, 191, 36, .6); }
.node.red { border-color: rgba(251, 113, 133, .45); box-shadow: 0 0 22px -8px rgba(251, 113, 133, .7); }
.nodeTop { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 6px; }
.nodeIcon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.05); }
.nodeIcon .ico { width: 17px; height: 17px; }
.node.green .nodeIcon, .nodeIcon.green { color: var(--green); background: rgba(52,211,153,.12); }
.node.yellow .nodeIcon, .nodeIcon.yellow { color: var(--amber); background: rgba(251,191,36,.12); }
.node.red .nodeIcon, .nodeIcon.red { color: var(--rose); background: rgba(251,113,133,.12); }
.node.yellow .nodeIcon, .node.red .nodeIcon { animation: glow 2.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 12px 1px currentColor; } }
.nodeAge { font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.node.green .nodeAge { color: var(--green); } .node.yellow .nodeAge { color: var(--amber); } .node.red .nodeAge { color: var(--rose); }
.nodeName { font-size: 13px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.nodeWhen { font-size: 11px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 11.5px; color: var(--faint); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.constellation.orbit { display: block; }
.constellation.orbit .hub { position: absolute; left: 50%; top: 50%; width: 118px; height: 118px; margin: -59px 0 0 -59px; }
.constellation.orbit .hub b { font-size: 15px; }
.constellation.orbit .hub span { font-size: 11px; }
.constellation.orbit .hub .hubSub { font-size: 11.5px; }
.constellation.orbit .hubRing { inset: -14px; }
.constellation.orbit .node { position: absolute; width: 176px; }

/* ---------- bottom sheet ---------- */
.sheetBackdrop { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 14, .55); opacity: 0; transition: opacity .2s var(--ease); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheetBackdrop.open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 86vh; overflow-y: auto; padding: 8px 16px max(18px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: linear-gradient(180deg, rgba(20, 30, 50, .98), rgba(11, 18, 32, .99)); border: 1px solid var(--line2); border-bottom: 0; box-shadow: 0 -24px 60px rgba(0,0,0,.55); transform: translateY(100%); transition: transform .22s var(--ease); }
.sheet.open { transform: translateY(0); }
body.sheetOpen { overflow: hidden; }
.sheetGrab { width: 42px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); margin: 4px auto 12px; }
.sheetHead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.nodeIcon.lg { width: 44px; height: 44px; border-radius: 13px; }
.nodeIcon.lg .ico { width: 22px; height: 22px; }
.sheetTitles h2 { margin: 0 0 4px; font-size: 19px; font-weight: 750; }
.facts { margin: 14px 0 0; display: grid; gap: 0; }
.facts > div { padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.facts dt small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.facts dd { margin: 4px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.facts code { font: 12px var(--mono); color: var(--cyanText); background: rgba(34,211,238,.08); padding: 1px 5px; border-radius: 5px; }

/* ---------- supply ---------- */
.segbar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.05); gap: 2px; }
.segbar i { display: block; height: 100%; }
.seg-now { background: linear-gradient(90deg, #22d3ee, #5eead4); box-shadow: 0 0 14px rgba(34,211,238,.6); }
.seg-future { background: linear-gradient(90deg, #6366f1, #818cf8); }
.seg-chile { background: repeating-linear-gradient(135deg, rgba(148,163,184,.55) 0 6px, rgba(148,163,184,.3) 6px 12px); }
.segLegend { list-style: none; margin: 12px 0 0; padding: 0; }
.segLegend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sw { width: 12px; height: 12px; border-radius: 4px; }
.segLabel { font-weight: 650; font-size: 13.5px; }
.segLabel small, .segVal small { display: block; font-weight: 400; font-size: 11.5px; color: var(--faint); }
.segVal { text-align: right; font-weight: 740; font-variant-numeric: tabular-nums; font-size: 15px; }
.subHead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 16px 0 6px; }
.subHead h3 { margin: 0; font-size: 13px; font-weight: 700; }
.skus { list-style: none; margin: 0; padding: 0; }
.sku a { display: block; padding: 9px 2px; border-bottom: 1px solid var(--line); min-height: 44px; }
.skuName { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.skuMeta { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.skuMeta b { color: var(--text); }
.skuLb { color: var(--text); font-weight: 750; font-size: 13.5px; }
.bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(34,211,238,.55), #22d3ee); }

/* ---------- sales ---------- */
.salesGrid { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 12px; align-items: center; }
.gaugeWrap { position: relative; width: 100%; max-width: 240px; margin: 0 auto; }
.gauge { display: block; width: 100%; height: auto; overflow: visible; }
.gTrack { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 14; stroke-linecap: round; }
.gVal { fill: none; stroke-width: 14; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(34,211,238,.45)); }
.gaugeCenter { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.gaugeCenter b { display: block; font-size: 34px; font-weight: 780; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.gaugeCenter .unit { font-size: 20px; color: var(--muted); font-weight: 650; margin-left: 2px; }
.gaugeCenter > span { font-size: 11.5px; color: var(--muted); }
.gaugeNote { text-align: center; margin: 6px 0 0; font-size: 12px; color: var(--amber); font-weight: 650; }
.stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; }
.stats > div { padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); min-width: 0; }
.stats dt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 1px 0 0; font-size: 15.5px; font-weight: 740; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats dd small { display: block; font-size: 11.5px; font-weight: 500; color: var(--faint); }

/* ---------- lanes ---------- */
.lanes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lane { border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); transition: border-color .18s var(--ease), background .18s var(--ease); min-width: 0; }
.lane.open { border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .04); }
.laneHead { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; min-height: 56px; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 14px; }
.laneMain { display: flex; flex-direction: column; min-width: 0; }
.laneName { font-size: 15px; font-weight: 720; }
.laneCounts { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.laneRight { display: inline-flex; align-items: center; gap: 6px; }
.due { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.bad { color: #ffd1d9; border-color: rgba(251,113,133,.5); background: rgba(251,113,133,.12); }
.due.muted { color: var(--faint); }
.chev { width: 18px; height: 18px; color: var(--faint); transition: transform .18s var(--ease); }
.lane.open .chev { transform: rotate(180deg); }
.laneSub { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); line-height: 1.35; font-variant-numeric: tabular-nums; }
.laneStat { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--muted); }
.laneStat b { color: var(--text); font-size: 14px; }
.laneSku { color: var(--muted); white-space: nowrap; }
.laneSku b { color: var(--cyanText); font-weight: 700; }
.lane.empty .laneName { color: var(--muted); }
.laneBody { padding: 0 12px 12px; }
.laneBody .facts { margin-top: 0; }
.laneSkus { list-style: none; margin: 0; padding: 0; }
.laneSkus li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.laneSkus b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.laneBody .chip { margin-top: 6px; }

/* ---------- footer ---------- */
.freshToggle { min-height: 44px; font-size: 13px; }
.freshWrap { display: none; }
.freshWrap.open { display: block; }
.fresh { width: 100%; border-collapse: collapse; font-size: 13px; }
.fresh th, .fresh td { text-align: left; padding: 0 4px; border-bottom: 1px solid var(--line); height: 44px; }
.fresh thead th { height: 32px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.fresh td { color: var(--muted); font-variant-numeric: tabular-nums; }
.fresh .colDetail { display: none; }
.fresh td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.fresh thead th:last-child { text-align: right; }
.linkBtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; background: none; padding: 0; cursor: pointer; font-weight: 650; text-align: left; }
.footLinks { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 12px; }
.footLinks a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--cyanText); font-weight: 600; font-size: 13px; }
.footLinks a:hover { background: var(--glass2); }
.error { border-color: rgba(251,113,133,.5); color: #ffd1d9; }

/* ---------- responsive ---------- */
@media (max-width: 519px) {
  .btnCopy .btnLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .btnCopy { width: 44px; padding: 0; }
  .fresh td:nth-child(2) { font-size: 12px; }
}
@media (max-width: 359px) { .word { display: none; } }
@media (min-width: 520px) {
  .headline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hl-available { grid-column: auto; }
  .hl-available .hlVal { font-size: 34px; }
  .grid { padding: 16px; gap: 16px; }
  .card { padding: 18px; }
}
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .grid > .card { grid-column: 1 / -1; }
  .supplyCard, .salesCard { grid-column: span 6 !important; }
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sheet { left: 50%; right: auto; width: min(560px, calc(100% - 32px)); bottom: 16px; border-radius: 22px; border-bottom: 1px solid var(--line2); transform: translate(-50%, calc(100% + 24px)); }
  .sheet.open { transform: translate(-50%, 0); }
}
@media (min-width: 1100px) {
  .topInner, .grid { padding-left: 24px; padding-right: 24px; }
  .asOfTop { display: block; }
  .grid { grid-auto-flow: row dense; }
  .hero { grid-column: 1 / span 6 !important; }
  .needsCard { grid-column: 7 / span 6 !important; }
  .lanes .lane[data-extra] { display: block !important; }
  .today .need[data-extra] { display: grid !important; }
  .phoneOnly { display: none; }
  .deskOnly { display: inline; }
  #lanesMore { display: none; }
  .constCard { grid-column: 1 / span 7 !important; }
  .salesCard { grid-column: 8 / span 5 !important; }
  .supplyCard { grid-column: 1 / -1 !important; }
  .supplyGrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; }
  .supplyRight .subHead { margin-top: 0; }
  .fresh .colDetail { display: table-cell; max-width: 420px; font-size: 12.5px; }
    .lanesCard, .foot { grid-column: 1 / -1 !important; }
  .lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hl-available .hlVal { font-size: 30px; }
  .hlVal { font-size: 28px; }
  .freshToggle { display: none; }
  .freshWrap { display: block; }
}
@media (hover: none) { .node:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- v2 phase 5: corrected supply stages, source notes ---------- */
.supplyTotal > span { display: inline-flex; align-items: center; gap: 10px; }
.supplyTotal { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.supplyTotal b { font-size: 20px; letter-spacing: -.01em; text-transform: none; color: var(--text); font-variant-numeric: tabular-nums; }
.supplyLeft .availRow { margin-top: 12px; }
.supplyLeft .stageNote { margin-top: 10px; }
.heroTip { margin-top: 10px; }
.nodeNote { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.25; color: var(--amber); }
#exploreLink { margin-top: 8px; }
