/* Expert Solar Farms — site stylesheet (tokens, base, components) */

/* ---------- Tokens ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.18vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.35rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.375rem, 1.2rem + 4.2vw, 4.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Brand: navy + solar gold on warm paper */
  --navy-950: #061630;
  --navy-900: #0a2148;
  --navy-800: #0f2f66;
  --navy-700: #1b4284;
  --navy-600: #2c5aa6;
  --navy-200: #c9d6ea;
  --navy-100: #e3eaf5;
  --navy-50: #f0f4fa;
  --gold-400: #ffcb45;
  --gold-500: #f5b81c;
  --gold-600: #d99a00;
  --gold-700: #8a6100;
  --gold-100: #fdf1cc;
  --gold-50: #fff9e8;

  --color-bg: #faf8f3;
  --color-surface: #ffffff;
  --color-surface-2: #f4f1ea;
  --color-text: #101b2d;
  --color-text-muted: #4f5d75;
  --color-text-faint: #7d899d;
  --color-text-inverse: #f7f9fc;
  --color-primary: var(--navy-800);
  --color-accent: var(--gold-500);
  --color-link: #14499a;
  --color-border: oklch(0.32 0.1 262 / 0.16);
  --color-divider: oklch(0.32 0.1 262 / 0.1);
  --color-success: #1d7a4b;
  --color-success-bg: #e4f3ea;
  --color-danger: #a8321f;
  --color-danger-bg: #fbe9e5;
  --color-warn: #8a6100;
  --color-warn-bg: var(--gold-100);

  /* Chart palette (use in this order) */
  --chart-1: #0f2f66; --chart-2: #f5b81c; --chart-3: #2c7fb8; --chart-4: #7fa8d9;
  --chart-5: #d97a00; --chart-6: #5b6b85; --chart-7: #1d7a4b; --chart-8: #b9c6dc;

  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.875rem; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px oklch(0.25 0.06 262 / 0.08);
  --shadow-md: 0 6px 18px oklch(0.25 0.06 262 / 0.1);
  --shadow-lg: 0 18px 44px oklch(0.25 0.06 262 / 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 180ms var(--ease);

  --font-display: 'Cabinet Grotesk', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'General Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --w-narrow: 46rem;
  --w-default: 68rem;
  --w-wide: 78rem;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --header-h: 4.5rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0 0 var(--space-4); line-height: 1.15; color: var(--navy-900); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.015em; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); font-weight: 650; letter-spacing: -0.005em; line-height: 1.25; }
h4 { font-size: var(--text-base); font-weight: 700; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); }
a { color: var(--color-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color var(--t); }
a:hover { color: var(--navy-900); text-decoration-thickness: 2px; }
strong { font-weight: 650; }
small { font-size: var(--text-xs); }
hr { border: 0; border-top: 1px solid var(--color-divider); margin: var(--space-10) 0; }
sup { line-height: 0; }
:focus-visible { outline: 3px solid var(--gold-600); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--gold-400); color: var(--navy-950); }
.num, table td, .stat__value { font-variant-numeric: tabular-nums lining-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-4); top: -4rem; z-index: 200; background: var(--gold-500); color: var(--navy-950); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-weight: 650; }
.skip-link:focus { top: var(--space-3); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--w-wide)); margin-inline: auto; }
.container--default { width: min(100% - 2 * var(--gutter), var(--w-default)); }
.container--narrow { width: min(100% - 2 * var(--gutter), var(--w-narrow)); }
.section { padding-block: clamp(var(--space-10), 6vw, var(--space-20)); }
.section--tight { padding-block: clamp(var(--space-8), 4vw, var(--space-12)); }
.section--tint { background: var(--color-surface-2); }
.section--white { background: var(--color-surface); }
.section--navy { background: var(--navy-900); color: var(--color-text-inverse); }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }
.section--navy a { color: var(--gold-400); }
.section--navy p { color: oklch(0.93 0.02 262); }
.section__head { max-width: 46rem; margin-bottom: var(--space-8); }
.section__head p { color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1.5; }
.section--navy .section__head p { color: oklch(0.88 0.03 262); }
.kicker { display: inline-block; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-700); margin-bottom: var(--space-3); }
.section--navy .kicker, .page-hero .kicker, .home-hero .kicker { color: var(--gold-400); }
.lead { font-size: var(--text-lg); line-height: 1.5; color: var(--color-text-muted); }
.muted { color: var(--color-text-muted); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--space-6); }
@media (min-width: 44rem) { .grid-2, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.split { display: grid; gap: clamp(var(--space-6), 4vw, var(--space-16)); align-items: center; }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .split--media-wide { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .split--reverse > :first-child { order: 2; }
  .split--top { align-items: start; }
}
.split img { border-radius: var(--radius-lg); width: 100%; object-fit: cover; }
.stack > * + * { margin-top: var(--space-4); }

/* ---------- Header / nav ---------- */
.utility { background: var(--navy-950); color: oklch(0.85 0.03 262); font-size: var(--text-xs); }
.utility .container { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); min-height: 2.25rem; }
.utility a { color: #fff; text-decoration: none; font-weight: 600; }
.utility a:hover { color: var(--gold-400); }
.utility__links { display: flex; gap: var(--space-5); }
.utility__addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 40rem) { .utility__addr span { display: none; } }

.site-header { position: sticky; top: 0; z-index: 100; background: oklch(0.985 0.006 85 / 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-divider); transition: box-shadow var(--t); }
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img, .brand svg { height: 2.75rem; width: auto; }
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; margin: 0; }
.nav__link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.6rem 0.7rem; border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--text-sm); font-weight: 600; color: var(--navy-900); text-decoration: none; border-radius: var(--radius-md); white-space: nowrap; }
.nav__link:hover, .nav__item:focus-within > .nav__link { background: var(--navy-50); color: var(--navy-900); }
.nav__link[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--gold-500); border-radius: 0; }
.nav__link svg { width: 0.7rem; height: 0.7rem; transition: transform var(--t); }
.nav__item.is-open > .nav__link svg { transform: rotate(180deg); }
.nav__menu { position: absolute; top: calc(100% + 0.35rem); left: 0; min-width: 16.5rem; list-style: none; margin: 0; padding: var(--space-2); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--t), transform var(--t), visibility var(--t); }
.nav__item:last-child .nav__menu, .nav__item:nth-last-child(2) .nav__menu { left: auto; right: 0; }
.nav__item.is-open > .nav__menu, .nav__item:hover > .nav__menu, .nav__item:focus-within > .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu li { margin: 0; }
.nav__menu a { display: block; padding: 0.55rem 0.75rem; border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-text); text-decoration: none; font-weight: 500; }
.nav__menu a:hover, .nav__menu a:focus-visible { background: var(--navy-50); color: var(--navy-900); }
.nav__menu a[aria-current="page"] { color: var(--navy-800); font-weight: 700; background: var(--gold-50); }
.header__cta { display: none; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-md); color: var(--navy-900); cursor: pointer; }
.nav-toggle svg { width: 1.35rem; height: 1.35rem; }
@media (min-width: 70rem) { .nav { display: block; } .nav-toggle { display: none; } .header__cta { display: inline-flex; } }

.drawer { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: oklch(0.15 0.05 262 / 0.55); opacity: 0; transition: opacity 240ms var(--ease); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(22.5rem, 90vw); background: var(--color-surface); padding: var(--space-5); overflow-y: auto; transform: translateX(100%); transition: transform 260ms var(--ease); display: flex; flex-direction: column; gap: var(--space-2); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.drawer__top strong { font-family: var(--font-display); font-size: var(--text-lg); color: var(--navy-900); }
.drawer details { border-bottom: 1px solid var(--color-divider); }
.drawer summary, .drawer__single { display: flex; justify-content: space-between; align-items: center; min-height: 3rem; font-weight: 650; color: var(--navy-900); cursor: pointer; list-style: none; text-decoration: none; }
.drawer__single { border-bottom: 1px solid var(--color-divider); }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; color: var(--color-text-muted); }
.drawer details[open] summary::after { content: "–"; }
.drawer details ul { list-style: none; padding: 0 0 var(--space-3) var(--space-3); margin: 0; }
.drawer details li { margin: 0; }
.drawer details a { display: block; padding: 0.55rem 0; color: var(--color-text); text-decoration: none; font-size: var(--text-sm); }
.drawer details a[aria-current="page"] { font-weight: 700; color: var(--navy-800); }
.drawer .btn { margin-top: var(--space-4); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.875rem; padding: 0.65rem 1.25rem; border: 2px solid transparent; border-radius: var(--radius-md); font: inherit; font-size: var(--text-sm); font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t), transform var(--t); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold-500); color: var(--navy-950); }
.btn--primary:hover { background: var(--gold-400); color: var(--navy-950); }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }
.btn--ghost { border-color: var(--color-border); color: var(--navy-900); background: transparent; }
.btn--ghost:hover { border-color: var(--navy-800); background: var(--navy-50); }
.btn--ghost-light { border-color: oklch(1 0 0 / 0.45); color: #fff; background: transparent; }
.btn--ghost-light:hover { border-color: #fff; background: oklch(1 0 0 / 0.1); color: #fff; }
.btn--sm { min-height: 2.5rem; padding: 0.45rem 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.arrow-link { font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.arrow-link::after { content: "→"; transition: transform var(--t); }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Page hero (interior) ---------- */
.page-hero { position: relative; background: var(--navy-900); color: #fff; overflow: hidden; isolation: isolate; }
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, oklch(0.2 0.08 262 / 0.96) 0%, oklch(0.2 0.08 262 / 0.88) 42%, oklch(0.2 0.08 262 / 0.45) 100%); }
.page-hero--plain::before { background: linear-gradient(oklch(1 0 0 / 0.045) 1px, transparent 1px) 0 0 / 100% 2.75rem, linear-gradient(90deg, oklch(1 0 0 / 0.045) 1px, transparent 1px) 0 0 / 5.5rem 100%; }
.page-hero .container { padding-block: clamp(var(--space-10), 6vw, var(--space-20)); }
.page-hero h1 { color: #fff; max-width: 22ch; margin-bottom: var(--space-4); }
.page-hero__lead { font-size: var(--text-lg); line-height: 1.5; max-width: 40rem; color: oklch(0.93 0.02 262); margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0 0 var(--space-5); font-size: var(--text-xs); color: oklch(0.82 0.04 262); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }

.subnav { background: var(--color-surface); border-bottom: 1px solid var(--color-divider); }
.subnav ul { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: var(--space-2) 0; overflow-x: auto; scrollbar-width: thin; }
.subnav li { margin: 0; flex: none; }
.subnav a { display: block; padding: 0.5rem 0.8rem; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
.subnav a:hover { background: var(--navy-50); color: var(--navy-900); }
.subnav a[aria-current="page"] { background: var(--navy-800); color: #fff; }

/* ---------- Article layout with table of contents ---------- */
.article { display: grid; gap: var(--space-10); padding-block: clamp(var(--space-8), 5vw, var(--space-16)); }
@media (min-width: 64rem) { .article { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--space-16); } }
.toc { font-size: var(--text-sm); }
@media (min-width: 64rem) { .toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; } }
.toc__title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-3); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--color-border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.35rem 0 0.35rem var(--space-4); margin-left: -1px; border-left: 2px solid transparent; color: var(--color-text-muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--navy-900); }
.toc a.is-active { color: var(--navy-900); font-weight: 650; border-left-color: var(--gold-500); }
.article__body > section, .article__body > .section { padding-block: 0; margin-bottom: var(--space-12); background: none; }
.article__body > section > .container, .article__body .container { width: 100%; }
.article__body .section__head { margin-bottom: var(--space-5); }

/* ---------- Prose ---------- */
.prose { max-width: 46rem; }
.prose--wide { max-width: none; }
.prose h2 { margin-top: var(--space-12); }
.prose h2:first-child, .prose > :first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-8); }
.prose h4 { margin-top: var(--space-6); margin-bottom: var(--space-2); }
.prose li::marker { color: var(--gold-600); }
.prose blockquote { margin: var(--space-6) 0; padding: var(--space-5) var(--space-6); background: var(--navy-50); border-radius: var(--radius-lg); font-size: var(--text-lg); line-height: 1.45; color: var(--navy-900); }
.prose img, .figure img { border-radius: var(--radius-lg); }
.figure { margin: var(--space-8) 0; }
.figure figcaption { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.updated { font-size: var(--text-xs); color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: var(--space-5); padding: 0.3rem 0.7rem; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); }
.updated::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--gold-500); }

/* ---------- Cards ---------- */
.card { position: relative; display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); transition: box-shadow var(--t), transform var(--t), border-color var(--t); }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.6; }
.card > :last-child { margin-bottom: 0; }
.card__kicker { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-700); margin-bottom: var(--space-2); }
.card__img { margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-5); border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: 16 / 10; object-fit: cover; width: calc(100% + 2 * var(--space-6)); max-width: none; }
.card__foot { margin-top: auto; padding-top: var(--space-4); }
.card--link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--navy-200); }
.card--link a.card__cover { text-decoration: none; color: inherit; }
.card--link a.card__cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--navy { background: var(--navy-900); border-color: transparent; color: #fff; }
.card--navy h3 { color: #fff; } .card--navy p { color: oklch(0.88 0.03 262); } .card--navy .card__kicker { color: var(--gold-400); }
.card--flat { background: var(--color-surface-2); border-color: transparent; }
.section--tint .card--flat { background: var(--color-surface); }

/* ---------- Stats ---------- */
.stat-row { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); }
.stat { padding: var(--space-5) 0 0; border-top: 2px solid var(--navy-800); }
.section--navy .stat { border-top-color: var(--gold-500); }
.stat__value { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); line-height: 1; color: var(--navy-900); letter-spacing: -0.02em; }
.section--navy .stat__value { color: #fff; }
.stat__label { display: block; margin-top: var(--space-2); font-size: var(--text-sm); line-height: 1.4; color: var(--color-text); }
.section--navy .stat__label { color: oklch(0.9 0.03 262); }
.stat__source { display: block; margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.section--navy .stat__source { color: oklch(0.78 0.04 262); }

/* ---------- Callouts & badges ---------- */
.callout { background: var(--navy-50); border: 1px solid var(--navy-100); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); margin: var(--space-6) 0; }
.callout > :last-child { margin-bottom: 0; }
.callout__label { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-700); margin-bottom: var(--space-2); }
.callout--key { background: var(--gold-50); border-color: var(--gold-100); }
.callout--key .callout__label { color: var(--gold-700); }
.callout--warn { background: var(--color-danger-bg); border-color: oklch(0.6 0.15 30 / 0.2); }
.callout--warn .callout__label { color: var(--color-danger); }
.disclaimer { font-size: var(--text-sm); color: var(--color-text-muted); background: var(--color-surface-2); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); margin-top: var(--space-10); }
.disclaimer > :last-child { margin-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 700; line-height: 1.5; white-space: nowrap; background: var(--navy-100); color: var(--navy-800); }
.badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.badge--active { background: var(--color-success-bg); color: var(--color-success); }
.badge--ended { background: var(--color-danger-bg); color: var(--color-danger); }
.badge--ending { background: var(--color-warn-bg); color: var(--color-warn); }
.badge--plain::before { display: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--space-6) 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.5; min-width: 34rem; }
.table caption { caption-side: top; text-align: left; padding: var(--space-4) var(--space-4) var(--space-2); font-weight: 700; color: var(--navy-900); }
.table th, .table td { padding: 0.7rem var(--space-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-divider); }
.table thead th { background: var(--navy-900); color: #fff; font-weight: 650; font-size: var(--text-xs); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; position: sticky; top: 0; }
.table tbody th { font-weight: 650; color: var(--navy-900); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:nth-child(even) { background: oklch(0.32 0.1 262 / 0.03); }
.table .num, .table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table--compact th, .table--compact td { padding: 0.45rem var(--space-3); }
.table--fit { min-width: 0; }
.table-note { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: calc(-1 * var(--space-3)); margin-bottom: var(--space-6); }

/* ---------- Timeline & steps ---------- */
.timeline { list-style: none; margin: var(--space-6) 0; padding: 0; border-left: 2px solid var(--navy-100); }
.timeline > li { position: relative; margin: 0; padding: 0 0 var(--space-8) var(--space-6); }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: ""; position: absolute; left: -0.45rem; top: 0.35rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--color-bg); border: 2px solid var(--navy-800); }
.timeline > li.is-key::before { background: var(--gold-500); border-color: var(--gold-600); }
.timeline > li.is-past::before { background: var(--navy-800); }
.timeline__date { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-700); margin-bottom: var(--space-1); }
.timeline__title { font-size: var(--text-lg); font-weight: 650; color: var(--navy-900); margin-bottom: var(--space-2); line-height: 1.3; }
.timeline p { color: var(--color-text-muted); margin-bottom: var(--space-2); }
.steps { list-style: none; counter-reset: step; margin: var(--space-6) 0; padding: 0; display: grid; gap: var(--space-5); }
.steps > li { counter-increment: step; position: relative; margin: 0; padding-left: 3.5rem; min-height: 2.5rem; }
.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); line-height: 1; color: var(--gold-600); }
.steps h3 { margin-bottom: var(--space-1); }
.steps p { color: var(--color-text-muted); margin-bottom: 0; }
.steps--cols { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--space-8); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before { content: ""; position: absolute; left: 0.15rem; top: 0.45em; width: 0.8rem; height: 0.45rem; border-left: 2.5px solid var(--gold-600); border-bottom: 2.5px solid var(--gold-600); transform: rotate(-45deg); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }
.faq__item { border-bottom: 1px solid var(--color-border); }
.faq__item summary { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: var(--space-4) 0; cursor: pointer; list-style: none; font-weight: 650; font-size: var(--text-base); color: var(--navy-900); line-height: 1.4; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; flex: none; font-size: 1.4rem; line-height: 1; font-weight: 400; color: var(--gold-600); transition: transform var(--t); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item > div { padding: 0 0 var(--space-5); max-width: 46rem; color: var(--color-text-muted); }
.faq__item > div > :last-child { margin-bottom: 0; }

/* ---------- Directory / link lists ---------- */
.directory { list-style: none; margin: var(--space-5) 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--color-divider); }
.directory > li { margin: 0; padding: var(--space-4) 0; border-bottom: 1px solid var(--color-divider); display: grid; gap: var(--space-1); }
@media (min-width: 48rem) { .directory > li { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: var(--space-6); } .directory--cols { grid-template-columns: 1fr 1fr; column-gap: var(--space-10); } .directory--cols > li { grid-template-columns: 1fr; gap: var(--space-1); } }
.directory a { font-weight: 650; text-decoration: none; }
.directory a:hover { text-decoration: underline; }
.directory a[target="_blank"]::after, .ext::after { content: "↗"; font-size: 0.8em; margin-left: 0.2em; color: var(--color-text-faint); display: inline-block; }
.directory p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.pill-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: var(--space-5) 0; padding: 0; }
.pill-nav li { margin: 0; }
.pill-nav a, .pill-nav button { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.4rem 0.95rem; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--navy-900); font: inherit; font-size: var(--text-sm); font-weight: 600; text-decoration: none; cursor: pointer; }
.pill-nav a:hover, .pill-nav button:hover { border-color: var(--navy-800); background: var(--navy-50); }
.pill-nav .is-active, .pill-nav [aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.news-list { list-style: none; margin: var(--space-5) 0; padding: 0; }
.news-list > li { margin: 0; padding: var(--space-4) 0; border-bottom: 1px solid var(--color-divider); }
.news-list__meta { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-1); }
.news-list a { font-weight: 650; font-size: var(--text-lg); line-height: 1.3; text-decoration: none; color: var(--navy-900); }
.news-list a:hover { text-decoration: underline; }
.news-list p { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- Product cards (Renogy page) ---------- */
.product-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); margin: var(--space-6) 0; }
.product { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
.product__cat { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-700); margin-bottom: var(--space-2); }
.product h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-2); line-height: 1.3; }
.product p { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.spec { list-style: none; margin: 0 0 var(--space-4); padding: 0; font-size: var(--text-sm); border-top: 1px solid var(--color-divider); }
.spec li { display: flex; justify-content: space-between; gap: var(--space-4); margin: 0; padding: 0.4rem 0; border-bottom: 1px solid var(--color-divider); }
.spec li span:first-child { color: var(--color-text-muted); }
.spec li span:last-child { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.product__foot { margin-top: auto; font-size: var(--text-sm); }
.cat-head { display: grid; gap: var(--space-6); align-items: center; margin-top: var(--space-12); }
@media (min-width: 48rem) { .cat-head { grid-template-columns: 16rem minmax(0, 1fr); } }
.cat-head img { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- Charts & calculators ---------- */
.chart-grid { display: grid; gap: var(--space-6); }
@media (min-width: 60rem) { .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chart-card--wide { grid-column: 1 / -1; } }
.chart-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); min-width: 0; }
.chart-card h3 { margin-bottom: var(--space-1); }
.chart-card__take { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.chart-card__canvas { position: relative; height: clamp(15rem, 40vw, 21rem); }
.chart-card__source { font-size: var(--text-xs); color: var(--color-text-muted); margin: var(--space-4) 0 0; }
.chart-card details { margin-top: var(--space-3); font-size: var(--text-sm); }
.chart-card details summary { cursor: pointer; color: var(--color-link); font-weight: 600; }
.calc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: clamp(var(--space-5), 3vw, var(--space-8)); margin: var(--space-6) 0; }
.calc__grid { display: grid; gap: var(--space-6); }
@media (min-width: 56rem) { .calc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-10); } }
.calc__result { background: var(--navy-900); color: #fff; border-radius: var(--radius-lg); padding: var(--space-6); align-self: start; }
.calc__result h3, .calc__result h4 { color: #fff; }
.calc__big { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); line-height: 1.05; color: var(--gold-400); font-variant-numeric: tabular-nums; }
.calc__rows { list-style: none; padding: 0; margin: var(--space-4) 0 0; font-size: var(--text-sm); }
.calc__rows li { display: flex; justify-content: space-between; gap: var(--space-4); padding: 0.45rem 0; margin: 0; border-top: 1px solid oklch(1 0 0 / 0.15); }
.calc__rows li span:last-child { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.calc__note { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-4); }
.calc__result .calc__note { color: oklch(0.82 0.04 262); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-5); }
.form__row { display: grid; gap: var(--space-5); }
@media (min-width: 40rem) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--space-2); }
.field label, .field legend, .label { font-size: var(--text-sm); font-weight: 650; color: var(--navy-900); padding: 0; }
.field .hint { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 400; }
.field .req { color: var(--color-danger); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], input[type="url"], input[type="file"], select, textarea {
  width: 100%; min-height: 2.875rem; padding: 0.6rem 0.8rem; font: inherit; font-size: 1rem; color: var(--color-text); background: var(--color-surface); border: 1px solid oklch(0.32 0.1 262 / 0.32); border-radius: var(--radius-md); transition: border-color var(--t), box-shadow var(--t);
}
textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--navy-700); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 3px oklch(0.78 0.16 85 / 0.55); }
input[type="range"] { width: 100%; accent-color: var(--navy-800); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--navy-800); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); min-height: 2rem; }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--color-danger); }
.field__error { font-size: var(--text-xs); color: var(--color-danger); font-weight: 600; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); font-size: var(--text-sm); font-weight: 600; }
.form__status:empty { display: none; }
.form__status--ok { background: var(--color-success-bg); color: var(--color-success); }
.form__status--error { background: var(--color-danger-bg); color: var(--color-danger); }
.form__status--info { background: var(--navy-50); color: var(--navy-800); }
.form-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: clamp(var(--space-5), 3vw, var(--space-8)); box-shadow: var(--shadow-sm); }
.address { font-style: normal; line-height: 1.6; }

/* ---------- kW scale (signature component) ---------- */
.kw-scale { margin: var(--space-8) 0; }
.kw-scale__bar { position: relative; height: 0.5rem; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); }
.kw-scale__ticks { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); margin-top: var(--space-3); gap: var(--space-3); list-style: none; padding: 0; }
.kw-scale__ticks li { margin: 0; padding-top: var(--space-3); border-left: 2px solid var(--navy-800); padding-left: var(--space-3); font-size: var(--text-sm); line-height: 1.35; }
.kw-scale__ticks strong { display: block; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; color: var(--navy-900); }
.kw-scale__ticks span { color: var(--color-text-muted); }
.section--navy .kw-scale__ticks li { border-left-color: var(--gold-500); }
.section--navy .kw-scale__ticks strong { color: #fff; }
.section--navy .kw-scale__ticks span { color: oklch(0.86 0.03 262); }
@media (max-width: 44rem) { .kw-scale__ticks { grid-template-columns: 1fr 1fr; } }

/* ---------- Media ---------- */
.media-band { position: relative; min-height: clamp(16rem, 38vw, 28rem); display: grid; align-items: end; color: #fff; isolation: isolate; overflow: hidden; }
.media-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.media-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, oklch(0.18 0.07 262 / 0.9), oklch(0.18 0.07 262 / 0.15) 70%); }
.media-band .container { padding-block: var(--space-10); }
.media-band h2 { color: #fff; max-width: 24ch; }
.media-band p { max-width: 40rem; color: oklch(0.93 0.02 262); }
.gallery { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 56rem) { .gallery { grid-template-columns: repeat(4, 1fr); } .gallery > :first-child { grid-column: span 2; grid-row: span 2; } }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-8) var(--space-4) var(--space-3); font-size: var(--text-sm); font-weight: 650; color: #fff; background: linear-gradient(0deg, oklch(0.15 0.06 262 / 0.85), transparent); }

/* ---------- Sources ---------- */
.sources { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--color-border); font-size: var(--text-sm); }
.sources h2 { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-3); }
.sources ol, .sources ul { padding-left: 1.25rem; color: var(--color-text-muted); columns: 1; }
@media (min-width: 56rem) { .sources ol, .sources ul { columns: 2; column-gap: var(--space-10); } }
.sources li { break-inside: avoid; margin-bottom: var(--space-2); overflow-wrap: anywhere; }

/* ---------- CTA band & footer ---------- */
.cta-band { background: var(--gold-500); color: var(--navy-950); }
.cta-band .container { display: grid; gap: var(--space-5); padding-block: clamp(var(--space-8), 5vw, var(--space-12)); align-items: center; }
@media (min-width: 56rem) { .cta-band .container { grid-template-columns: minmax(0, 1fr) auto; } }
.cta-band h2 { color: var(--navy-950); margin-bottom: var(--space-2); }
.cta-band p { margin: 0; max-width: 44rem; color: oklch(0.24 0.07 262); }
.site-footer { background: var(--navy-950); color: oklch(0.82 0.03 262); font-size: var(--text-sm); }
.site-footer .container { padding-block: var(--space-16) var(--space-8); }
.footer__grid { display: grid; gap: var(--space-10); }
@media (min-width: 44rem) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .footer__grid { grid-template-columns: 1.5fr repeat(4, 1fr); gap: var(--space-8); } }
.footer__brand img, .footer__brand svg { height: 5.5rem; width: auto; margin-bottom: var(--space-5); }
.footer__brand p { max-width: 22rem; }
.site-footer h2 { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-400); margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--space-2); }
.site-footer a { color: oklch(0.92 0.02 262); text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); text-decoration: underline; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3) var(--space-8); margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid oklch(1 0 0 / 0.12); font-size: var(--text-xs); color: oklch(0.72 0.03 262); }
.footer__legal p { margin: 0; max-width: 52rem; }
.footer__legal nav { display: flex; gap: var(--space-5); }

/* ---------- Home ---------- */
.home-hero { position: relative; color: #fff; isolation: isolate; overflow: hidden; background: var(--navy-900); }
.home-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, oklch(0.17 0.07 262 / 0.95) 0%, oklch(0.17 0.07 262 / 0.82) 45%, oklch(0.17 0.07 262 / 0.3) 100%); }
.home-hero .container { padding-block: clamp(var(--space-16), 11vw, 9rem) clamp(var(--space-12), 7vw, var(--space-24)); }
.home-hero h1 { color: #fff; font-size: var(--text-3xl); line-height: 1.02; letter-spacing: -0.025em; max-width: 15ch; margin-bottom: var(--space-5); }
.home-hero h1 em { font-style: normal; color: var(--gold-400); }
.home-hero__lead { font-size: var(--text-lg); line-height: 1.5; max-width: 38rem; color: oklch(0.94 0.02 262); }
.home-hero__facts { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-8); list-style: none; padding: 0; margin: var(--space-10) 0 0; font-size: var(--text-sm); font-weight: 600; }
.home-hero__facts li { margin: 0; display: inline-flex; align-items: center; gap: 0.55rem; }
.home-hero__facts li::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--gold-500); border-radius: 50%; }
.ruler { background: var(--navy-950); color: #fff; border-top: 1px solid oklch(1 0 0 / 0.1); }
.ruler .container { padding-block: var(--space-8); }
.ruler__title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-400); margin-bottom: var(--space-4); }
.ruler__track { position: relative; height: 3.25rem; border-bottom: 2px solid oklch(1 0 0 / 0.5); background: repeating-linear-gradient(90deg, oklch(1 0 0 / 0.5) 0 1px, transparent 1px 2%) bottom / 100% 0.5rem no-repeat, repeating-linear-gradient(90deg, oklch(1 0 0 / 0.8) 0 2px, transparent 2px 10%) bottom / 100% 1rem no-repeat; }
.ruler__fill { position: absolute; left: 0; bottom: -2px; height: 4px; width: 100%; background: var(--gold-500); transform-origin: left; }
.ruler__marks { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; padding: 0; margin: var(--space-3) 0 0; font-size: var(--text-xs); color: oklch(0.86 0.03 262); gap: var(--space-2); }
.ruler__marks li { margin: 0; }
.ruler__marks strong { display: block; color: #fff; font-size: var(--text-sm); }
.ruler__marks li:last-child { text-align: right; }
@media (max-width: 40rem) { .ruler__marks { grid-template-columns: repeat(3, 1fr); } .ruler__marks li:nth-child(2), .ruler__marks li:nth-child(4) { display: none; } .ruler__marks li:nth-child(3) { text-align: center; } }
.feature-grid { display: grid; gap: var(--space-5); }
@media (min-width: 56rem) { .feature-grid { grid-template-columns: repeat(6, 1fr); } .feature-grid > * { grid-column: span 2; } .feature-grid > .span-3 { grid-column: span 3; } .feature-grid > .span-4 { grid-column: span 4; } .feature-grid > .span-6 { grid-column: span 6; } }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 17rem; padding: var(--space-6); border-radius: var(--radius-lg); overflow: hidden; color: #fff; isolation: isolate; text-decoration: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 600ms var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, oklch(0.16 0.07 262 / 0.94) 0%, oklch(0.16 0.07 262 / 0.5) 55%, oklch(0.16 0.07 262 / 0.1) 100%); }
.tile:hover img { transform: scale(1.04); }
.tile:hover { color: #fff; }
.tile h3 { color: #fff; margin-bottom: var(--space-1); }
.tile p { margin: 0; font-size: var(--text-sm); color: oklch(0.92 0.02 262); max-width: 34rem; }
.tile .card__kicker { color: var(--gold-400); }
.logo-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-8); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-6 { margin-top: var(--space-6); } .mt-10 { margin-top: var(--space-10); } .mb-6 { margin-bottom: var(--space-6); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Article text measure ---------- */
.article__body > section > :is(p, ul, ol, h2, h3, h4, dl, blockquote), .article__body > :is(p, ul, ol, h2, h3, h4) { max-width: 46rem; }
.article__body > section > :is(ul, ol).steps--cols, .article__body > section > ul.directory, .article__body > section > ul.pill-nav, .article__body > section > ul.news-list, .article__body > section > ol.timeline { max-width: none; }
.article__body > section > ol.timeline { max-width: 52rem; }
.article__body h2 { margin-top: 0; }
.article__body h3 { margin-top: var(--space-8); }
.article__body .card h3, .article__body .steps h3, .article__body .timeline h3, .article__body .chart-card h3, .article__body .product h3, .article__body .calc h3 { margin-top: 0; }
.article__body li::marker { color: var(--gold-600); }
.article__body > section { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
dl.defs { margin: var(--space-5) 0; }
dl.defs dt { font-weight: 700; color: var(--navy-900); margin-top: var(--space-5); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
dl.defs dd { margin: var(--space-1) 0 0; color: var(--color-text-muted); }

/* ---------- Aliases for backend form markup ---------- */
.form-grid { display: grid; gap: var(--space-5); }
@media (min-width: 40rem) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .field--full, .form-grid > fieldset, .form-grid > .form-actions, .form-grid > .form-status, .form-grid > .form-note { grid-column: 1 / -1; } }
.field-hint { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 400; }
.field-error { font-size: var(--text-xs); color: var(--color-danger); font-weight: 600; }
.field-error:empty { display: none; }
input.is-invalid, select.is-invalid, textarea.is-invalid, input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.form-status { border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); font-size: var(--text-sm); font-weight: 600; }
.form-status:empty, .form-status[hidden] { display: none; }
.form-status.is-success { background: var(--color-success-bg); color: var(--color-success); }
.form-status.is-error { background: var(--color-danger-bg); color: var(--color-danger); }
.form-status.is-info { background: var(--navy-50); color: var(--navy-800); }
.form-note { font-size: var(--text-xs); color: var(--color-text-muted); }
.btn-primary { background: var(--gold-500); color: var(--navy-950); }
.btn-primary:hover { background: var(--gold-400); color: var(--navy-950); }
.account-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-6); }
.account-tabs button, .account-tabs a { padding: 0.7rem 1rem; border: 0; background: none; font: inherit; font-weight: 650; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.account-tabs [aria-selected="true"], .account-tabs .is-active { color: var(--navy-900); border-bottom-color: var(--gold-500); }
.doc-list { list-style: none; padding: 0; margin: var(--space-4) 0; border-top: 1px solid var(--color-divider); }
.doc-list li { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; margin: 0; border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); }

@media print { .site-header, .utility, .drawer, .cta-band, .subnav, .toc { display: none !important; } body { background: #fff; } }

/* ---------- Fixes after first render ---------- */
.site-header .header__cta { display: none; white-space: nowrap; }
@media (min-width: 70rem) { .site-header .header__cta { display: inline-flex; } }
@media (min-width: 70rem) and (max-width: 80rem) { .nav__link { padding-inline: 0.5rem; } .brand img { height: 2.4rem; } }
.table-wrap { color: var(--color-text); }
.section--navy .table-wrap a { color: var(--color-link); }
.section--navy .card--navy { background: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.16); }
.section--navy .card--navy:hover { background: oklch(1 0 0 / 0.1); border-color: var(--gold-500); }
.section--navy .card--navy a { color: #fff; }
.site-footer a.btn--primary, .site-footer a.btn--primary:hover { color: var(--navy-950); text-decoration: none; }
.section--navy .table-note { color: oklch(0.82 0.03 262); }
.card h3 a { color: inherit; text-decoration: none; }
.card--link:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.tile h3 { font-size: var(--text-lg); }
.address { margin-bottom: var(--space-4); }
.article { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .article { grid-template-columns: 15rem minmax(0, 1fr); } }
@media (max-width: 63.99rem) {
  .toc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
  .toc ol { columns: 1; }
  .article { gap: var(--space-6); }
}
@media (min-width: 40rem) and (max-width: 63.99rem) { .toc ol { columns: 2; column-gap: var(--space-8); } .toc li { break-inside: avoid; } }

/* long unbreakable product names (e.g. "20A/30A/.../400A") must not widen cards */
.product, .card, .product-grid > *, .grid > * { min-width: 0; }
.product h3, .card h3, .spec li span { overflow-wrap: anywhere; }

/* calculators: inputs keep natural height beside a taller result panel; links readable on navy */
.calc__grid > form, .calc__grid > .form { align-self: start; align-content: start; }
.calc__result a, .calc__result .calc__note a { color: var(--gold-400); text-decoration-color: currentColor; }
.calc__result a:hover { color: #fff; }
.stat-row + .table-note { margin-top: var(--space-4); }

/* chart cards as <figure>: no browser default margin; consistent spacing in and around grids */
figure.chart-card, .chart-card.figure { margin: var(--space-6) 0; }
.chart-grid { margin: var(--space-6) 0; }
.chart-grid > .chart-card, .chart-grid > figure.chart-card, .chart-grid > .chart-card.figure { margin: 0; }
.chart-card__canvas--tall { height: clamp(28rem, 60vw, 30rem); }
#bt-loads input { min-width: 0; width: 100%; }
#bt-loads td:first-child, #bt-loads th:first-child { width: 46%; }
@media (max-width: 40rem) { #bt-loads th, #bt-loads td { padding-inline: var(--space-2); } }
#bt-loads { min-width: 0; table-layout: fixed; }
#bt-loads input { padding-inline: 0.5rem; }
#bt-loads th { white-space: normal; letter-spacing: 0.04em; }

/* backend_engineer: make the hidden attribute win over component display rules (forms, account views) */
[hidden] { display: none !important; }
.form__row { align-items: start; }
