/* Apsia — one stylesheet for every page.
   Structure mirrors an orbit: bands alternate shadow (black) and sunlight (day).
   Tokens first, then primitives, then components. No page-specific overrides here. */

:root {
  --shadow: #000000;
  --umbra: #0E1630;
  --umbra-2: #16213F;
  --day: #F2F5F9;
  --paper: #FFFFFF;
  --ink: #101418;
  --ink-2: #5B6470;
  --ink-3: #8A93A0;
  --line: rgba(16, 20, 24, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);
  --sun: #F2B441;
  --sun-deep: #D9961E;
  --dusk: #5DA9FF;
  --fault: #FF5A5F;
  --charge: #3DDC97;
  --white: #FFFFFF;
  --white-2: rgba(255, 255, 255, 0.72);
  --white-3: rgba(255, 255, 255, 0.5);

  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --r-ctl: 14px;
  --r-surface: 24px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --band-y: clamp(72px, 10vw, 140px);
  --shadow-float: 0 24px 60px rgba(8, 12, 30, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--shadow);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; }
strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.measure { max-width: 42rem; }
.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
@media (max-width: 860px) {
  .grid.two, .grid.three, .grid.split { grid-template-columns: minmax(0, 1fr); }
}

.band { padding-top: var(--band-y); padding-bottom: var(--band-y); position: relative; }
.band.shadow { background: var(--shadow); color: var(--white); }
.band.day { background: var(--day); color: var(--ink); }
.band.paper { background: var(--paper); color: var(--ink); }
.band.tight { padding-top: calc(var(--band-y) * 0.6); padding-bottom: calc(var(--band-y) * 0.6); }
.band + .band.day, .band.day + .band.shadow { border-top: 0; }

/* ---------- type scale ---------- */
.display { font-size: clamp(44px, 8vw, 96px); letter-spacing: -0.035em; line-height: 0.98; font-weight: 600; }
.h1 { font-size: clamp(36px, 5.2vw, 64px); letter-spacing: -0.03em; }
.h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.025em; }
.h3 { font-size: clamp(21px, 2.2vw, 26px); letter-spacing: -0.015em; line-height: 1.2; }
.lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.4; }
.small { font-size: 15px; line-height: 1.5; }
.muted { color: var(--ink-2); }
.band.shadow .muted { color: var(--white-2); }
.source { font-size: 14px; line-height: 1.45; color: var(--ink-3); margin-top: 14px; }
.band.shadow .source { color: var(--white-3); }
.source a { text-decoration: underline; text-underline-offset: 2px; }
.num { font-size: clamp(40px, 5vw, 64px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.stack > * + * { margin-top: 1em; }
.stack.loose > * + * { margin-top: 1.6em; }
.title-gap { margin-bottom: clamp(28px, 4vw, 56px); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-ctl);
  font-weight: 600; font-size: 16px; line-height: 1; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.sun { background: var(--sun); color: #1B1400; border-color: var(--sun); }
.btn.sun:hover { background: #F7C55E; border-color: #F7C55E; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .9; }
.btn.ghost:hover { opacity: 1; background: rgba(255, 255, 255, 0.06); }
.band.day .btn.ghost:hover, .band.paper .btn.ghost:hover { background: rgba(16, 20, 24, 0.05); }
.btn.ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn.ink:hover { background: #22282F; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 15px; margin-bottom: 6px; color: var(--ink-2); }
.band.shadow .field > span { color: var(--white-2); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
}
.band.shadow .input, .band.shadow .select, .band.shadow .textarea {
  background: var(--umbra); border-color: var(--line-dark); color: var(--white);
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sun); outline: none; }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 64px;
  display: flex; align-items: center;
  background: rgba(0, 0, 0, 0.72); color: var(--white);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; width: 100%; }
.nav-brand { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 10px; }
.nav-brand .brand-icon { width: 30px; height: 30px; flex: 0 0 auto; }
.foot .nav-brand .brand-icon { width: 28px; height: 28px; }

/* ---------- brand moment: shown once per session, on the first page that loads ---------- */
html.intro::before { content: ''; position: fixed; inset: 0; background: var(--shadow); z-index: 9998; }
#brand-intro { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--shadow); opacity: 1; transition: opacity .6s ease; }
#brand-intro svg { width: min(300px, 62vw); height: auto; }
#brand-intro.out { opacity: 0; pointer-events: none; }
#brand-intro .ka-star { transform-box: fill-box; transform-origin: center; animation: ka-star .55s cubic-bezier(.2,.8,.2,1) both; }
#brand-intro .ka-arc { stroke-dasharray: 82; stroke-dashoffset: 82; animation: ka-draw .9s .25s cubic-bezier(.33,0,.2,1) both; }
#brand-intro .ka-dot { offset-path: path('M64,52 A32,32 0 0,1 116,20'); offset-rotate: 0deg; offset-distance: 0%; animation: ka-orbit .9s .25s cubic-bezier(.33,0,.2,1) both; }
#brand-intro .ka-word { opacity: 0; animation: ka-rise .6s 1.05s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ka-star { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.09); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ka-draw { to { stroke-dashoffset: 0; } }
@keyframes ka-orbit { to { offset-distance: 100%; } }
@keyframes ka-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@supports not (offset-path: path('M0 0 L1 1')) { #brand-intro .ka-dot { offset-path: none; transform: translate(116px, 20px); animation: none; } }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { font-size: 15.5px; color: var(--white-2); padding: 6px 2px; border-bottom: 1.5px solid transparent; }
.nav-links a:hover { color: var(--white); }
.nav-links a[aria-current="page"] { color: var(--white); border-bottom-color: var(--sun); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1.5px solid rgba(255, 255, 255, 0.22); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; border: 0; color: var(--white-2); padding: 6px 12px; font-size: 14px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--white); color: var(--ink); }
.nav-burger { display: none; background: transparent; border: 0; color: var(--white); width: 44px; height: 44px; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; transition: transform .2s ease, opacity .2s ease; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 6px;
    position: absolute; left: 0; right: 0; top: 64px; padding: 16px var(--gutter) 24px;
    background: rgba(0, 0, 0, 0.94); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav.open .nav-links a { font-size: 20px; padding: 10px 0; }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-right .btn { display: none; }
}

/* ---------- footer ---------- */
.foot { background: var(--shadow); color: var(--white-2); padding: 56px 0 40px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 15px; }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { color: var(--white); font-size: 15px; margin-bottom: 12px; font-weight: 600; }
.foot a { display: block; padding: 4px 0; color: var(--white-2); }
.foot a:hover { color: var(--white); }
.foot .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--white-3); font-size: 14px; }
@media (max-width: 760px) { .foot .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- hero ---------- */
.hero-pin { height: 210svh; position: relative; }
.hero { position: sticky; top: 0; height: 100svh; display: flex; align-items: flex-end; color: var(--white); overflow: clip; }
@media (prefers-reduced-motion: reduce) { .hero-pin { height: auto; } .hero { position: relative; min-height: 100svh; height: auto; } }
.hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-canvas canvas { width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; padding-bottom: clamp(56px, 9vh, 120px); width: 100%; }
.hero-copy .display { max-width: 12ch; text-shadow: 0 2px 28px rgba(0, 0, 0, 0.7); }
.hero-copy .lead { max-width: 34rem; margin-top: 22px; color: var(--white-2); text-shadow: 0 1px 18px rgba(0, 0, 0, 0.7); }
.hero-copy .actions { margin-top: 30px; }
.hero-readout {
  position: absolute; right: var(--gutter); top: 96px; z-index: 1;
  font-size: 14px; color: var(--white-2); text-align: right; line-height: 1.45;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}
.hero-readout b { display: block; color: var(--white); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.hero-readout .state { color: var(--sun); }
.hero-readout .state.shadow { color: var(--dusk); }
@media (max-width: 720px) { .hero-readout { top: 80px; right: 16px; font-size: 13px; } .hero-readout b { font-size: 22px; } }
.hero-scroll { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1; color: var(--white-3); font-size: 13px; margin: 0; white-space: nowrap; transition: opacity .4s ease; }
.hero-scroll.gone { opacity: 0; }
@media (max-width: 720px) { .hero-scroll { display: none; } }

/* ---------- content components ---------- */
.questions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.questions.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .questions.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px); } }
@media (max-width: 640px) { .questions.four { grid-template-columns: 1fr; } }
.questions .q { border-top: 2px solid var(--ink); padding-top: 22px; }
.questions .q h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.02em; }
.questions .q p { margin-top: 12px; color: var(--ink-2); }
@media (max-width: 860px) { .questions { grid-template-columns: 1fr; } }

.chart-band figure { margin: 0; }
.chart-band figcaption { margin-top: 16px; }
.chart {
  width: 100%; height: auto; border-radius: var(--r-surface);
  background: var(--umbra); padding: clamp(12px, 2vw, 24px);
}
.chart text { font-family: var(--font); font-size: 12px; fill: var(--white-2); }
.chart .axis { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; }
.chart .grid-line { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.chart .s-volt { stroke: #B98016; stroke-width: 2.2; fill: none; }
.chart .s-array { stroke: #3E86D9; stroke-width: 2; fill: none; }
.chart .s-current { stroke: #3E86D9; stroke-width: 1.6; fill: none; }
.chart .s-soc { stroke: #B98016; stroke-width: 2; fill: none; }
.chart .band-p { fill: rgba(62, 134, 217, 0.18); stroke: none; }
.chart .dot { fill: #B98016; opacity: 0.6; }
.chart .eclipse { fill: rgba(93, 169, 255, 0.12); }
.chart .reserve { stroke: var(--fault); stroke-dasharray: 4 4; stroke-width: 1.2; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--white-2); margin-top: 12px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.band.day .chart text { fill: var(--ink-2); }
.band.day .chart { background: var(--paper); border: 1px solid var(--line); }
.band.day .chart .axis { stroke: rgba(16, 20, 24, 0.18); }
.band.day .chart .grid-line { stroke: rgba(16, 20, 24, 0.06); }
.band.day .legend { color: var(--ink-2); }
.band.day .chart .s-volt { stroke: #B87A10; }
.band.day .chart .s-array, .band.day .chart .s-current { stroke: #2467C4; }
.band.day .chart .s-soc, .app .chart .s-soc { stroke: #B87A10; }
.band.day .chart .band-p, .app .chart .band-p { fill: rgba(36, 103, 196, 0.16); }
.band.day .chart .dot, .app .chart .dot { fill: #B87A10; }

.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.proof .p { border-top: 2px solid rgba(255, 255, 255, 0.25); padding-top: 20px; }
.proof .p .num { color: var(--sun); }
.proof .p p { margin-top: 10px; color: var(--white-2); }
.band.day .proof .p { border-top-color: rgba(16, 20, 24, 0.18); }
.band.day .proof .p .num { color: #B87A10; }
.band.day .proof .p p { color: var(--ink-2); }
.proof .p p.control { font-size: 14px; color: var(--white-3, rgba(255,255,255,.55)); margin-top: 6px; }
.band.day .proof .p p.control { color: var(--ink-3, #6b7178); }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }

.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 64px); }
.who .w h3 { font-size: 24px; }
.who .w p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 720px) { .who { grid-template-columns: 1fr; } }

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.doors .d { background: var(--umbra); border-radius: var(--r-surface); padding: 28px; min-height: 220px; display: flex; flex-direction: column; }
.doors .d h3 { font-size: 22px; }
.doors .d p { margin-top: 10px; color: var(--white-2); }
.doors .d .when { margin-top: auto; padding-top: 18px; color: var(--sun); font-size: 15px; }
@media (max-width: 860px) { .doors { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 28px 26px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--ink); }
.plan h3 { font-size: 22px; }
.plan .price { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; margin-top: 14px; line-height: 1.05; }
.plan .price small { display: block; font-size: 14px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; margin-top: 6px; }
.plan ul { margin: 18px 0 24px; padding-left: 18px; color: var(--ink-2); }
.plan li { margin: 6px 0; }
.plan .btn { margin-top: auto; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }

.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; color: var(--ink-2); }

.prose h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 2.2em; margin-bottom: .5em; }
.prose h3 { font-size: 22px; margin-top: 1.6em; margin-bottom: .4em; }
.prose p, .prose li { color: var(--ink-2); }
.band.shadow .prose p, .band.shadow .prose li { color: var(--white-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: .35em 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: rgba(16, 20, 24, 0.06); padding: 2px 6px; border-radius: 6px; }
.band.shadow .prose code { background: rgba(255, 255, 255, 0.1); }
.prose pre { background: var(--umbra); color: var(--white); border-radius: 16px; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* ---------- app ---------- */
.app { min-height: calc(100svh - 64px); background: var(--day); color: var(--ink); }
.app-head { padding: 36px 0 20px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; flex: 0 0 auto; }
.tabs button {
  background: transparent; border: 0; padding: 12px 16px; font-size: 16px; font-weight: 600;
  color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.app-body { padding: 28px 0 80px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-surface); padding: clamp(20px, 3vw, 32px); }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 24px; }
.panel .sub { color: var(--ink-2); margin-top: 6px; }
.drop {
  display: block; margin-top: 20px; border: 2px dashed rgba(16, 20, 24, 0.22); border-radius: 18px;
  padding: 40px 24px; text-align: center; color: var(--ink-2); cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.drop:hover, .drop.over { border-color: var(--sun-deep); background: rgba(242, 180, 65, 0.08); }
.drop b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.drop input { display: none; }
.status { margin-top: 16px; font-size: 15px; color: var(--ink-2); min-height: 1.4em; }
.status.error { color: #B3261E; }
.status.ok { color: #1E7F58; }
.report { margin-top: 24px; }
.report .headline { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 20px; }
.kpi { border-top: 2px solid var(--ink); padding-top: 12px; }
.kpi b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.kpi span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.kpi .range { font-size: 13px; color: var(--ink-3); }
.findings { margin-top: 24px; }
.finding { display: grid; grid-template-columns: 10px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.finding i { width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; background: var(--ink-3); }
.finding.warn i { background: var(--sun-deep); }
.finding.fault i { background: var(--fault); }
.finding.ok i { background: var(--charge); }
.finding p { margin: 0; }
.finding .because { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; margin-top: 18px; }
.form-grid .field > span { min-height: 2.7em; display: flex; align-items: flex-end; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 18px; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.table td.num, .table th.num { text-align: right; font-size: inherit; font-weight: inherit; letter-spacing: 0; line-height: inherit; }
.table th.num { font-weight: 600; }
.table td .because { display: block; white-space: normal; font-size: 13px; color: var(--ink-2); max-width: 320px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tag.ok { background: rgba(61, 220, 151, 0.18); color: #146B47; }
.tag.no { background: rgba(255, 90, 95, 0.16); color: #A3252A; }
.tag.warn { background: rgba(242, 180, 65, 0.22); color: #7A5200; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.compare .side { border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.compare .side h4 { font-size: 15px; color: var(--ink-2); margin-bottom: 12px; }
.compare .side .row { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.compare .side .row b { font-weight: 600; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.assumptions { margin-top: 18px; font-size: 14px; color: var(--ink-3); }
.assumptions summary { cursor: pointer; }
.note { background: rgba(242, 180, 65, 0.14); border-radius: 12px; padding: 12px 14px; font-size: 15px; margin-top: 16px; }

/* ---- app: mapping step (check the columns) ---- */
.mapping { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.mapping .map-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 6px; }
.mapping .map-head h3 { margin: 0; font-size: 20px; }
.mapping .map-why { font-size: 13px; color: var(--ink-2); white-space: normal; max-width: 360px; }
.mapping .map-table td { vertical-align: middle; }
.mapping .map-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mapping .map-sample { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink-2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.mapping .select.small { padding: 6px 30px 6px 10px; font-size: 14px; min-width: 150px; }
.mapping .map-opts { margin-top: 14px; }
.mapping .map-opts .field { margin-bottom: 8px; }
.mapping .map-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.mapping .map-facts .warn-text { color: #7A5200; }
.mapping .map-note { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.mapping .chart-wrap { margin-top: 14px; }
.mapping .status { margin-top: 10px; }

.orbit-src { display: inline-block; font-size: 13px; color: #1E7F58; margin-top: 4px; }
.orbit-src.bad { color: #B3261E; }

.glossary { margin: 8px 0 0; }
.glossary dt { font-weight: 600; margin-top: 14px; }
.glossary dd { margin: 4px 0 0; color: var(--ink-2); max-width: 72ch; }

/* array health */
.array{margin-top:14px}
.panels{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 2px}
.panel{font-size:.86rem;padding:6px 10px;border-radius:8px;border:1px solid var(--line)}
.panel.bad{border-color:#d63b3b;color:#b42323}
.panel.warn{border-color:#c98a10;color:#8a5a00}
.panel.ok{opacity:.8}

/* app: compact findings, save control, fleet */
.finding .why { background: none; border: 0; padding: 0; margin-top: 4px; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.finding .why.open { color: var(--ink); }
.finding .because[hidden] { display: none; }
.save { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.save .save-label { font-size: 14px; color: var(--ink-2); }
.save .select, .save .input { width: auto; max-width: 280px; }
.save .status { margin: 0; }
.input.small, .select.small { min-height: 38px; padding: 6px 10px; font-size: 14px; border-radius: 10px; }
.select.small { padding-right: 30px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sat-head .headline { margin-bottom: 4px; }
.rules { margin-top: 8px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rule .x { background: none; border: 0; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 2px 8px; line-height: 1; margin-left: auto; }
.map-more { margin-top: 8px; }
.map-more summary { font-size: 14px; }

/* ---- app: result first ---- */
.formbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 18px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 14px; color: var(--ink-2); }
.formbar .sum { flex: 1 1 auto; }
.whatif { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 14px 0 4px; padding: 10px 14px; border-radius: 12px; background: rgba(16, 20, 24, 0.04); font-size: 14px; }
.whatif .lbl { color: var(--ink-3); font-weight: 600; }
.whatif .wi { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.whatif .wi b { color: var(--ink); min-width: 4.5ch; font-variant-numeric: tabular-nums; }
.whatif input[type=range] { width: 140px; accent-color: var(--sun-deep, #B87A10); }
.report.updating .headline, .report.updating .kpis { opacity: .45; transition: opacity .2s; }
@media (max-width: 640px) { .whatif { gap: 10px; } .whatif input[type=range] { width: 110px; } }
.connector .grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; margin-top: 10px; }
.connector .grid-form .field { margin: 0; }
.connector .grid-form textarea { min-height: 54px; }
