/* The /tools pages: template A ("split"), chosen 2026-10-21. Brand tokens from
   areas/brand/assets/tokens/solarbase-tokens.json; Solar Blue dark (#2656CC)
   carries white text at 6.4:1 where the main Solar Blue sits at 4.5:1. */

@font-face {
  font-family: Figtree;
  src: url(/fonts/figtree.woff2) format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #222323;
  --ink-2: #535353;
  --slate: #6B7280;
  --mist: #F4F5F7;
  --line: #E3E5EA;
  --field: #8C8C8C;
  --amber: #FAAC2D;
  --amber-tint: #FFF3DF;
  --blue: #2656CC;
  --blue-dark: #1C4099;
  --ok-bg: #E6F4EC; --ok: #1E6B41;
  --warn-bg: #FFF3DF; --warn: #8A5B00;
  --bad-bg: #FBE8E8; --bad: #A32A2E;
  --info-bg: #E8EFFF; --info: #1B4BD8;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #FFFFFF; color: var(--ink);
  font-family: "Avenir Next", Avenir, Figtree, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-weight: 500; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 3px solid #2F6BFF; outline-offset: 2px;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 20; padding: 8px 12px; background: #FFFFFF; }
.skip:focus { top: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: clamp(16px, 5vw, 40px); padding-right: clamp(16px, 5vw, 40px); }

/* header and footer */
.site-header { border-bottom: 1px solid var(--line); background: #FFFFFF; }
.header-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.site-header img { display: block; height: 26px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.site-nav a { font-size: 15px; color: var(--ink-2); }
.site-nav a[aria-current] { color: var(--ink); font-weight: 600; }
.site-nav .btn { color: #FFFFFF; }

.cta-band { background: var(--ink); color: #FFFFFF; padding: 64px 0; }
.cta-band .inner { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.cta-band h2 span { color: var(--amber); }
.cta-band p { margin-top: 12px; font-size: 17px; line-height: 1.55; color: #C1C1C1; max-width: 640px; }
.cta-band .text { flex: 1 1 520px; min-width: 0; }
.site-footer { background: var(--ink); border-top: 1px solid #535353; padding: 28px 0 36px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; justify-content: space-between; }
.site-footer img { display: block; height: 22px; width: auto; }
.site-footer p { flex: 1 1 480px; max-width: 720px; font-size: 14px; line-height: 1.55; color: #C1C1C1; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a, .site-footer span { font-size: 14px; color: #C1C1C1; }
.site-footer nav a:hover { color: #FFFFFF; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 6px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #FFFFFF; }
.btn-primary:hover { background: var(--blue-dark); color: #FFFFFF; }
.btn-secondary { background: #FFFFFF; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { color: var(--blue-dark); border-color: var(--blue-dark); }
.btn-amber { background: var(--amber); color: var(--ink); min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn-amber:hover { color: var(--ink); background: #FBBE5B; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--blue); cursor: pointer; }

/* the tool page */
.tool-page { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.intro { display: flex; flex-direction: column; gap: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--slate); }
.crumbs a { font-weight: 600; }
.intro h1 { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.rule { width: 56px; height: 4px; background: var(--amber); }
.lede { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 720px; }

.calc { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.calc-form {
  flex: 999 1 520px; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; align-content: start;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field.wide, .calc-form fieldset.wide, .calc-form .wide { grid-column: 1 / -1; }
.field > label, .field > legend, .group-legend { font-size: 15px; font-weight: 600; padding: 0; }
.field > legend { margin-bottom: 6px; }
.calc-form input[type="text"], .calc-form input[type="number"], .calc-form select, .calc-form textarea {
  width: 100%; min-width: 0; height: 48px; border: 1px solid var(--field); border-radius: 6px; padding: 0 14px;
  font: inherit; font-size: 17px; color: var(--ink); background: #FFFFFF;
}
.calc-form textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; }
.calc-form select { padding: 0 10px; }
.hint { font-size: 14px; line-height: 1.45; color: var(--slate); }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--field); font-size: 15px; background: #FFFFFF;
}
.segmented input:checked + span { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 600; }
.segmented input:focus-visible + span { outline: 3px solid #2F6BFF; outline-offset: 2px; }

.checklist { display: flex; flex-direction: column; }
.checklist label { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; cursor: pointer; }
.checklist label:last-child { border-bottom: 1px solid var(--line); }
.checklist input, .rowtable input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--blue); }

.rowtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.rowtable-wrap { overflow-x: auto; }
.rowtable th { text-align: left; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0 8px 8px 0; white-space: nowrap; }
.rowtable td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.rowtable td.label { min-width: 150px; }
.calc-form .rowtable input[type="text"], .calc-form .rowtable select { height: 44px; font-size: 16px; padding: 0 10px; min-width: 76px; }
.rowtable output { font-weight: 600; white-space: nowrap; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 150px; border: 2px dashed var(--field); border-radius: 10px; padding: 20px; background: #FFFFFF;
}
.dropzone.over { border-color: var(--blue); background: var(--info-bg); }
.dropzone strong { font-size: 16px; }
.dropzone input[type="file"] { font: inherit; font-size: 15px; max-width: 100%; }

.result {
  flex: 1 1 360px; min-width: 0; background: var(--mist); border-radius: 12px; padding: 28px;
  display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px;
}
.result-label { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.result-big { font-size: clamp(52px, 6vw, 76px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.result-sub { font-size: 22px; font-weight: 600; }
.result-sub small { font-size: 16px; font-weight: 500; color: var(--ink-2); }
.rows { display: flex; flex-direction: column; margin-top: 4px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.row:last-child { border-bottom: 1px solid var(--line); }
.row > span:first-child { color: var(--ink-2); }
.row > output, .row > span:last-child { font-weight: 600; text-align: right; }
.result-note { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.status { align-self: flex-start; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 12px; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.status.info { background: var(--info-bg); color: var(--info); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; align-items: end; height: 120px; padding-top: 4px; }
.bars span { display: block; background: #BBBBBB; border-radius: 2px 2px 0 0; min-height: 2px; }
.bars span.hi { background: var(--amber); }
.bars-axis { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }

.working { display: flex; flex-direction: column; gap: 10px; }
.working h2 { font-size: 20px; }
.working p { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 820px; }
.sources { font-size: 14px; line-height: 1.55; color: var(--slate); max-width: 820px; }

.hook { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--amber-tint); border-radius: 12px; padding: 20px 24px; }
.hook span { font-size: 16px; line-height: 1.5; flex: 1 1 420px; }
.hook a { font-size: 15px; font-weight: 600; }

.content { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 8px; }
.prose { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.prose section { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-size: 28px; letter-spacing: -0.01em; }
.prose p { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.formula { align-self: flex-start; background: var(--mist); border-radius: 8px; padding: 14px 18px; font-size: 17px; font-weight: 600; }
.example { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.example div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; font-size: 16px; }
.example div + div { border-top: 1px solid var(--line); }
.example div > span:first-child { color: var(--ink-2); }
.example div > span:last-child { font-weight: 600; text-align: right; }
.example div.total { background: var(--amber-tint); }
.example div.total > span:first-child { color: var(--ink); }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-size: 18px; font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 10px; font-size: 16px; line-height: 1.6; }
.related { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.related h2 { font-size: 20px; }
.related a { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.related a:hover { border-color: var(--field); color: var(--ink); }
.related strong { font-size: 16px; font-weight: 600; }
.related span { font-size: 15px; line-height: 1.45; color: var(--slate); }

.preview-note { background: var(--amber-tint); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.preview-note h2 { font-size: 22px; }
.preview-note p, .preview-note li { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.preview-note ul { margin: 0; padding-left: 20px; }

/* the hub */
.hub-hero { background: var(--mist); padding: 64px 0 48px; }
.hub-hero .inner { display: flex; flex-direction: column; gap: 20px; }
.hub-hero .kicker { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.hub-hero h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -0.02em; max-width: 880px; }
.hub-hero p { font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 720px; }
.hub-groups { padding-top: 56px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 56px; }
.hub-group { display: flex; flex-direction: column; gap: 20px; }
.hub-group h2 { font-size: 28px; letter-spacing: -0.01em; }
.hub-group > div > p { margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--slate); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 180px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.card:hover { border-color: var(--field); color: var(--ink); }
.card h3 { font-size: 17px; line-height: 1.25; }
.card p { font-size: 15px; line-height: 1.45; color: var(--slate); }
.card .go { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--blue); }

/* phones: the answer stays in view while the inputs are edited */
.sticky-bar { display: none; }
@media (max-width: 640px) {
  .site-header .nav-extra { display: none; }
  .site-nav { gap: 8px 16px; }
  .site-header img { height: 22px; }
  .site-nav .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .rowtable td.label { min-width: 110px; font-size: 14px; }
}
@media (max-width: 820px) {
  .result { position: static; }
  .calc-form { padding: 20px; }
  .sticky-bar:not([hidden]) {
    display: flex; position: sticky; bottom: 0; z-index: 10; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--ink); color: #FFFFFF; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  }
  .sticky-bar strong { font-size: 20px; color: var(--amber); }
  .sticky-bar span { font-size: 15px; color: #FFFFFF; }
  .sticky-bar .btn { background: var(--amber); color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .skip, .hook, .content, .cta-band, .site-footer, .sticky-bar, .actions, .working .sources a { display: none !important; }
  .tool-page { padding: 0; gap: 16px; }
  .calc { display: block; }
  .calc-form, .result { border: 1px solid #999; break-inside: avoid; margin-bottom: 12px; position: static; }
  .result { background: #FFFFFF; }
}
