/* EnSol Pro: shared styles
   Palette comes from the logo: ink, teal, amber on a mist background. */

:root {
  --mist: #E9EEEC;
  --paper: #F8FAF9;
  --ink: #12201C;
  --ink-2: #2B3F39;
  --muted: #50625C;
  --teal: #0F9D8F;
  --teal-d: #0B7A70;
  --amber: #E8930C;
  --amber-d: #C97A04;
  --line: #C6D3CE;
  --grid: #D9E4E0;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--teal-d); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100;
  font-family: var(--sans);
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; }
h3 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: 36rem; }
.small { font-size: .95rem; color: var(--muted); }
.ui { font-family: var(--sans); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(233, 238, 236, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-color: var(--line); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 68px;
}
.brand { display: inline-flex; line-height: 0; }
.brand img { height: 41px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; font-family: var(--sans); }
.site-nav a.nav-link {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a.nav-link:hover { border-bottom-color: var(--line); }
.site-nav a.nav-link[aria-current="page"] { border-bottom-color: var(--teal); }

.nav-toggle {
  display: none; font: 600 .95rem var(--sans); color: var(--ink);
  background: transparent; border: 1.5px solid var(--ink); border-radius: 999px;
  padding: .4rem .95rem; cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: .95rem 1.4rem; border-radius: 8px; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-d); color: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: .6rem 1rem; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.25rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

.hero h1 {
  font-size: clamp(2.6rem, 11vw, 5rem);
  line-height: .96; letter-spacing: -.035em; font-weight: 800;
  margin-bottom: 1.5rem;
}
.hero h1 span { display: block; }
.hero .lead { margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.1rem; }
.hero-note { font: 500 .95rem var(--sans); color: var(--muted); margin: 0; }

@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .hero h1 { font-size: clamp(3.4rem, 5.2vw, 4.5rem); }
}

/* Temperature-entropy chart */

.chart-panel {
  background: var(--paper);
  border: 1px solid rgba(18, 32, 28, .16);
  border-radius: 10px; overflow: hidden;
}
.chart-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line);
}
.chart-title { font: 700 1rem var(--sans); }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px; }
.seg button {
  font: 600 .875rem var(--sans); color: var(--ink); background: transparent;
  border: 0; border-radius: 999px; padding: .4rem .9rem; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.chart-body {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 33px 33px;
  background-position: 70px 4px;
}
.chart-body svg { display: block; width: 100%; height: auto; }
.chart-cap {
  padding: .75rem 1rem; border-top: 1px solid var(--line);
  font: 400 .875rem/1.5 var(--sans); color: var(--muted); margin: 0;
}

.dome-fill { fill: rgba(15, 157, 143, .08); stroke: none; }
.dome-line { fill: none; stroke: var(--teal); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.ghost { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.cycle {
  fill: rgba(18, 32, 28, .08); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round;
  transition: fill .5s, stroke .5s;
}
svg[data-state="opt"] .cycle { fill: rgba(232, 147, 12, .38); stroke: var(--teal-d); }
.axis { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.axis-head { fill: var(--ink); }
.lbl { font: 600 12px var(--sans); fill: var(--muted); }
.lbl-ink { font: 700 13px var(--sans); fill: var(--ink); }
.pt { fill: var(--ink); }
svg[data-state="opt"] .pt { fill: var(--teal-d); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head p { color: var(--ink-2); margin-top: 1rem; font-size: 1.15rem; }

/* Capability ledger */

.ledger { border-bottom: 1px solid var(--line); }
.ledger-row {
  display: grid; gap: 1rem 3rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.ledger-row h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.ledger-row .tag { font: 500 .95rem var(--sans); color: var(--muted); margin: .35rem 0 0; }
.ledger-row p { color: var(--ink-2); }
@media (min-width: 860px) {
  .ledger-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.tick-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.tick-list li { position: relative; padding-left: 1.6rem; font-size: 1.05rem; }
.tick-list li::before {
  content: ""; position: absolute; left: .1rem; top: .62em;
  width: .6rem; height: .6rem; background: var(--teal);
  clip-path: polygon(0 50%, 40% 90%, 100% 10%, 85% 0, 40% 62%, 15% 35%);
  width: .8rem; height: .8rem; top: .5em;
}

/* AI band */

.band-dark { background: var(--ink); color: #DCE8E4; }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark a { color: #7fe0d4; }
.band-dark a.btn-primary { color: var(--ink); }
.band-dark .lead { color: #C3D4CE; }
.ai-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 980px) { .ai-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }

.ai-steps { list-style: none; padding: 0; margin: 0; counter-reset: ai; display: grid; gap: 0; }
.ai-steps li {
  counter-increment: ai; display: grid; grid-template-columns: 3rem 1fr; gap: .5rem 1rem;
  padding-block: 1.5rem; border-top: 1px solid rgba(220, 232, 228, .22);
}
.ai-steps li:last-child { border-bottom: 1px solid rgba(220, 232, 228, .22); }
.ai-steps li::before {
  content: counter(ai); font: 800 2rem/1 var(--sans); color: var(--amber);
  grid-column: 1; grid-row: 1 / span 2;
}
.ai-steps li > * { grid-column: 2; }
.ai-steps h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.ai-steps p { margin: 0; color: #C3D4CE; }

/* Audience columns */

.cols-3 { display: grid; gap: 2rem; }
.cols-3 > div { border-top: 3px solid var(--teal); padding-top: 1.1rem; }
.cols-3 h3 { margin-bottom: .5rem; }
.cols-3 p { color: var(--ink-2); margin: 0; }
@media (min-width: 860px) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }

/* CTA strip */

.cta-strip {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--paper); border: 1px solid rgba(18, 32, 28, .16); border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.cta-strip h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.cta-strip p { margin: .6rem 0 0; color: var(--ink-2); }
@media (min-width: 760px) { .cta-strip { grid-template-columns: 1fr auto; } }

/* ---------- Inner pages ---------- */

.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem); }
.page-hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem); line-height: 1; letter-spacing: -.03em;
  font-weight: 800; margin-bottom: 1.1rem;
}

.feature { display: grid; gap: 1.25rem 3.5rem; padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.feature h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.feature .aside { background: var(--paper); border: 1px solid rgba(18, 32, 28, .14); border-radius: 8px; padding: 1.1rem 1.25rem; }
.feature .aside strong { font: 700 .95rem var(--sans); display: block; margin-bottom: .35rem; }
.feature .aside p { margin: 0; font-size: 1.02rem; color: var(--ink-2); }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.feature-nav { display: flex; flex-wrap: wrap; gap: .5rem .5rem; margin-top: 1.5rem; }
.chip {
  font: 600 .95rem var(--sans); text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .45rem 1rem;
}
.chip:hover { background: var(--ink); color: #fff; }

.panel {
  background: var(--paper); border: 1px solid rgba(18, 32, 28, .16);
  border-radius: 10px; padding: clamp(1.25rem, 3vw, 2rem);
}

.split { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 940px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.split-even { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 940px) { .split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Forms */

.form { display: grid; gap: 1.1rem; }
.row2 { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.field label, .field .label { display: block; font: 600 .95rem var(--sans); margin-bottom: .35rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="date"], .field input[type="search"], .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid #93A7A0; border-radius: 6px; padding: .75rem .85rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input[type="search"] { min-width: min(100%, 22rem); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(15, 157, 143, .35); border-color: var(--teal-d);
}
.check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font: 400 .95rem/1.5 var(--sans); }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--teal-d); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; font: 500 1rem/1.5 var(--sans); padding: .85rem 1rem; border-radius: 6px; }
.form-status.show { display: block; }
.form-status.ok { background: #D3EEE8; color: #07463F; }
.form-status.err { background: #FBE2D7; color: #772A0F; }
.form .btn { justify-self: start; }
.fine { font: 400 .875rem/1.5 var(--sans); color: var(--muted); margin: 0; }

.banner {
  font: 500 1rem/1.5 var(--sans); background: #D3EEE8; color: #07463F;
  border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: 1.25rem;
}
.banner a { color: #07463F; font-weight: 700; }

/* Download buttons */

.dl-list { display: grid; gap: .85rem; margin: 1.5rem 0; }
.dl {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  font: 700 1.15rem var(--sans); transition: background-color .15s, color .15s;
}
.dl small { display: block; font: 400 .9rem var(--sans); color: var(--muted); margin-top: .15rem; }
.dl:hover { background: var(--ink); color: #fff; }
.dl:hover small { color: #C3D4CE; }
.dl[aria-disabled="true"] { border-style: dashed; opacity: .6; pointer-events: none; }

.wa-box { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.btn-wa { background: #1FA855; color: #fff; }
.btn-wa:hover { background: #178043; color: #fff; }
.soon { font: 500 1rem var(--sans); color: var(--muted); }

/* Steps, tables, FAQ */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps > li {
  counter-increment: s; display: grid; grid-template-columns: 2.75rem 1fr; gap: .25rem 1rem;
  padding-block: 1.25rem; border-top: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(s); font: 800 1.6rem/1.1 var(--sans); color: var(--teal-d); }
.steps h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.steps p { margin: 0; color: var(--ink-2); }

.spec { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 1rem; }
.spec th, .spec td { text-align: left; padding: .8rem .5rem .8rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--line); }
.spec th { font-weight: 600; width: 38%; }

.faq details { border-top: 1px solid var(--line); padding-block: 1.1rem; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  font: 600 1.15rem/1.35 var(--sans); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.6rem/1 var(--sans); color: var(--teal-d); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .8rem 0 0; color: var(--ink-2); max-width: 44rem; }

/* Beta key box on the downloads page */
.keybox { background: var(--paper); border: 1px solid rgba(18, 32, 28, .16); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.keybox .k-label { font: 600 .9rem var(--sans); color: var(--muted); }
.keybox .k-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .4rem; }
.key-value { font: 700 1.4rem/1.2 var(--sans); letter-spacing: .04em; overflow-wrap: anywhere; }

/* Admin page */
.admin-settings { display: grid; gap: 1.1rem; align-items: end; }
@media (min-width: 900px) { .admin-settings { grid-template-columns: auto 1fr auto; gap: 2rem; } }
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1rem; }
.admin-bar .admin-actions { margin-left: auto; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid rgba(18, 32, 28, .16); border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font: 400 .95rem/1.4 var(--sans); min-width: 56rem; }
.admin-table th, .admin-table td { text-align: left; padding: .8rem .7rem; border-top: 1px solid var(--line); vertical-align: top; }
.admin-table thead th { border-top: 0; font-weight: 700; background: rgba(18, 32, 28, .04); white-space: nowrap; }
.admin-table td.k { font-weight: 600; white-space: nowrap; letter-spacing: .02em; }
.act-wrap { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 11rem; }
.pill { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-weight: 600; font-size: .85rem; background: #D3EEE8; color: #07463F; white-space: nowrap; }
.pill-revoked, .pill-expired, .pill-beta-ended { background: #FBE2D7; color: #772A0F; }

.prose { max-width: 44rem; }
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; letter-spacing: -.015em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1rem; display: grid; gap: .5rem; }
.prose li { padding-left: .15rem; }
.prose strong { font-family: var(--sans); font-weight: 600; }

.channels { list-style: none; padding: 0; margin: 0; }
.channels li { padding-block: 1.25rem; border-top: 1px solid var(--line); }
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channels h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.channels p { margin: 0 0 .35rem; color: var(--ink-2); }
.channels .mail { font: 700 1.1rem var(--sans); }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #C3D4CE; padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; font-family: var(--sans); font-size: 1rem; }
.site-footer a { color: #DCE8E4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; }
.footer-grid h4 { font: 700 1rem var(--sans); color: #fff; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-brand img {
  height: 56px; width: auto; display: block; margin-bottom: 1rem;
  box-sizing: content-box; background: var(--mist); padding: .6rem .9rem; border-radius: 8px;
}
.footer-brand p { max-width: 22rem; margin: 0; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(220, 232, 228, .2); font-size: .9rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr; } }

/* ---------- Mobile navigation ---------- */

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; }
  .js .site-nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--mist); padding: 1.25rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav { flex-wrap: wrap; gap: .75rem 1.25rem; }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Content update: eyebrow and four-column audience row ---- */
.eyebrow { font: 700 .82rem var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--teal-d); margin: 0 0 1rem; }
@media (min-width: 640px) { .cols-3.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cols-3.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; } }
.section-head p + p { margin-top: .75rem; }
