/*
 * Home Energy Watch design system.
 *
 * Shared by the public website and the signed-in application. Colors, type,
 * radius and component styles follow the November 2026 redesign mockups:
 * deep forest green, teal data, mint actions, amber attention, white cards.
 */

/* -- 1. Fonts ------------------------------------------------------------- */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
}

/* -- 2. Tokens ------------------------------------------------------------ */

:root {
  --hew-forest-900: #0b3a35;
  --hew-forest-800: #0e4842;
  --hew-forest-700: #135a52;
  --hew-forest-600: #1a6d63;
  --hew-teal-500: #22b5a3;
  --hew-teal-400: #3cc9b6;
  --hew-teal-200: #a6e6dc;
  --hew-teal-100: #d9f4ef;
  --hew-teal-50: #eefaf7;
  --hew-mint-500: #3fd98a;
  --hew-mint-400: #5ce39c;
  --hew-mint-100: #dbf8e8;
  --hew-amber-500: #f2a024;
  --hew-amber-100: #fdf0d9;
  --hew-red-500: #e5534b;
  --hew-red-100: #fde4e2;
  --hew-blue-500: #3d7be0;
  --hew-blue-100: #e1ebfb;

  --hew-ink: #11221f;
  --hew-ink-2: #3c4f4b;
  --hew-ink-3: #6b7c78;
  --hew-line: #dfe8e5;
  --hew-line-strong: #c4d3cf;
  --hew-surface: #ffffff;
  --hew-surface-2: #f4f8f7;
  --hew-surface-3: #e9f1ef;

  --hew-font-display: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hew-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --hew-radius-sm: 8px;
  --hew-radius: 12px;
  --hew-radius-lg: 18px;
  --hew-radius-pill: 999px;

  --hew-shadow-sm: 0 1px 2px rgba(11, 58, 53, 0.06), 0 2px 6px rgba(11, 58, 53, 0.05);
  --hew-shadow: 0 6px 20px rgba(11, 58, 53, 0.09);
  --hew-shadow-lg: 0 18px 48px rgba(6, 34, 31, 0.22);

  --hew-gutter: clamp(16px, 4vw, 40px);
  --hew-max: 1200px;
}

/* -- 3. Base -------------------------------------------------------------- */

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

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

body.hew {
  margin: 0;
  background: var(--hew-surface);
  color: var(--hew-ink);
  font-family: var(--hew-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hew h1,
.hew h2,
.hew h3,
.hew h4 {
  margin: 0;
  font-family: var(--hew-font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--hew-ink);
}
.hew h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); }
.hew h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.hew h3 { font-size: 1.15rem; font-weight: 600; }
.hew p { margin: 0; }
.hew :where(a:not([class])) { color: var(--hew-forest-600); }
.hew img { max-width: 100%; display: block; }

.hew-wrap {
  width: 100%;
  max-width: var(--hew-max);
  margin: 0 auto;
  padding: 0 var(--hew-gutter);
}

.hew-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hew-teal-500);
}

.hew-lead {
  font-size: 1.12rem;
  color: var(--hew-ink-2);
  max-width: 40em;
}

.hew-muted { color: var(--hew-ink-3); }
.hew-skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--hew-surface);
  padding: 8px 14px;
  border-radius: var(--hew-radius-sm);
}
.hew-skip:focus { left: 8px; }

.hew :focus-visible {
  outline: 3px solid var(--hew-teal-400);
  outline-offset: 2px;
}

/* -- 4. Buttons, chips, icons --------------------------------------------- */

.hew-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--hew-radius-sm);
  font-family: var(--hew-font-body);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.hew-btn:hover { transform: translateY(-1px); }
.hew-btn-primary {
  background: var(--hew-mint-500);
  color: var(--hew-forest-900);
}
.hew-btn-primary:hover { background: var(--hew-mint-400); }
.hew-btn-dark {
  background: var(--hew-forest-700);
  color: #fff;
}
.hew-btn-dark:hover { background: var(--hew-forest-600); }
.hew-btn-outline {
  background: transparent;
  border-color: var(--hew-line-strong);
  color: var(--hew-ink);
}
.hew-btn-outline:hover { border-color: var(--hew-forest-600); }
.hew-btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}
.hew-btn-ghost-light:hover { background: rgba(255, 255, 255, 0.16); }
.hew-btn[aria-disabled="true"],
.hew-btn:disabled {
  background: var(--hew-surface-3);
  border-color: var(--hew-surface-3);
  color: var(--hew-ink-3);
  cursor: default;
  transform: none;
}
.hew-btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.88rem; }
.hew-btn-block { width: 100%; }

.hew-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--hew-radius-pill);
  background: var(--hew-teal-100);
  color: var(--hew-forest-700);
  font-size: 0.78rem;
  font-weight: 700;
}
.hew-chip-amber { background: var(--hew-amber-100); color: #8a5300; }
.hew-chip-mint { background: var(--hew-mint-500); color: var(--hew-forest-900); }

.hew-icon {
  width: 24px;
  height: 24px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.hew-icon-tile {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--hew-radius);
  background: var(--hew-teal-50);
  color: var(--hew-teal-500);
}
.hew-icon-tile .hew-icon { width: 28px; height: 28px; }
.hew-icon-tile.is-amber { background: var(--hew-amber-100); color: var(--hew-amber-500); }
.hew-icon-tile.is-red { background: var(--hew-red-100); color: var(--hew-red-500); }
.hew-icon-tile.is-blue { background: var(--hew-blue-100); color: var(--hew-blue-500); }
.hew-icon-tile.is-mint { background: var(--hew-mint-100); color: #18a35d; }

/* -- 5. Cards, stat tiles, charts ---------------------------------------- */

.hew-card {
  background: var(--hew-surface);
  border: 1px solid var(--hew-line);
  border-radius: var(--hew-radius-lg);
  box-shadow: var(--hew-shadow-sm);
  padding: 24px;
}
.hew-card-tight { padding: 16px; }

.hew-stat {
  display: grid;
  gap: 2px;
}
.hew-stat strong {
  font-family: var(--hew-font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--hew-ink);
}
.hew-stat strong small {
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 2px;
}
.hew-stat span {
  font-size: 0.82rem;
  color: var(--hew-ink-3);
}
.hew-stat .hew-delta {
  font-size: 0.8rem;
  font-weight: 700;
  color: #18a35d;
}

/* Bar charts are inline SVG (the CSP forbids inline style attributes). */
.hew-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hew-chart .bar { fill: var(--hew-teal-400); }
.hew-chart .bar.is-flag { fill: var(--hew-amber-500); }
.hew-chart .bar.is-soft { fill: var(--hew-teal-200); }
.hew-chart .grid { stroke: var(--hew-line); stroke-width: 1; }
.hew-chart .axis-label { fill: var(--hew-ink-3); font-size: 10px; font-family: var(--hew-font-body); }
.hew-chart .area { fill: var(--hew-teal-200); opacity: 0.7; }
.hew-chart .line { fill: none; stroke: var(--hew-teal-500); stroke-width: 2; }
.hew-chart .baseline { stroke: var(--hew-forest-600); stroke-width: 1.5; stroke-dasharray: 5 4; }

.hew-sample-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hew-ink-3);
}

/* -- 6. Site header and footer ------------------------------------------- */

.hew-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--hew-forest-900);
  color: #fff;
}
.hew-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.hew-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--hew-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
}
.hew-brand .hew-logo { width: 34px; height: 34px; }
.hew-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.hew-nav a,
.hew-nav summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--hew-radius-sm);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.hew-nav summary::-webkit-details-marker { display: none; }
.hew-nav a:hover,
.hew-nav summary:hover,
.hew-nav a.is-active { color: #fff; background: rgba(255, 255, 255, 0.08); }
.hew-nav details { position: relative; }
.hew-nav details[open] summary { background: rgba(255, 255, 255, 0.08); }
.hew-nav .hew-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  display: grid;
  padding: 8px;
  background: var(--hew-surface);
  border-radius: var(--hew-radius);
  box-shadow: var(--hew-shadow-lg);
}
.hew-nav .hew-menu a { color: var(--hew-ink); }
.hew-nav .hew-menu a:hover { background: var(--hew-surface-2); color: var(--hew-ink); }
.hew-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hew-header-actions .hew-btn { min-height: 38px; padding: 0 16px; font-size: 0.9rem; white-space: nowrap; }
.hew-menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.hew-footer {
  margin-top: 0;
  padding: 56px 0 32px;
  background: var(--hew-forest-900);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}
.hew-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.hew-footer h4 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 0.95rem;
}
.hew-footer a {
  display: block;
  padding: 3px 0;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}
.hew-footer a:hover { color: #fff; }
.hew-footer .hew-brand { margin-bottom: 12px; }
.hew-footer-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* -- 7. Page sections ---------------------------------------------------- */

.hew-section { padding: 88px 0; }
.hew-section-alt { background: var(--hew-surface-2); }
.hew-section-head {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.hew-section-head .hew-lead { margin: 0 auto; }
.hew-section-head.is-left { margin-left: 0; text-align: left; }
.hew-section-head.is-left .hew-lead { margin: 0; }

/* Hero with photo or illustrated dusk scene */
.hew-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6, 30, 28, 0.88) 0%, rgba(6, 30, 28, 0.62) 46%, rgba(6, 30, 28, 0.18) 100%),
    var(--hew-hero-image, linear-gradient(160deg, #1b3f5c 0%, #3a5b7a 38%, #c98a5a 78%, #e9b27a 100%));
  background-size: cover;
  background-position: center;
}
.hew-hero-scene {
  position: absolute;
  inset: auto 0 0 auto;
  width: min(62%, 820px);
  height: 100%;
  pointer-events: none;
}
/* AVIF (~80 KB) or WebP where supported, a recompressed JPEG otherwise; smaller files on phones. */
.hew-hero.has-photo { --hew-hero-image: url("img/hero-home.jpg"); }
@media (max-width: 800px) {
  .hew-hero.has-photo { --hew-hero-image: url("img/hero-home-800.jpg"); }
}
@supports (background-image: image-set(url("img/hero-home.avif") type("image/avif"))) {
  .hew-hero.has-photo {
    --hew-hero-image: image-set(url("img/hero-home.avif") type("image/avif"), url("img/hero-home.webp") type("image/webp"), url("img/hero-home.jpg") type("image/jpeg"));
  }
  @media (max-width: 800px) {
    .hew-hero.has-photo {
      --hew-hero-image: image-set(url("img/hero-home-800.avif") type("image/avif"), url("img/hero-home-800.webp") type("image/webp"), url("img/hero-home-800.jpg") type("image/jpeg"));
    }
  }
}
.hew-hero.has-photo .hew-hero-scene { display: none; }
.hew-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 40px;
  min-height: 600px;
  padding-top: 72px;
  padding-bottom: 140px;
}
.hew-hero h1 { color: #fff; }
.hew-hero .hew-lead { color: rgba(255, 255, 255, 0.88); margin-top: 18px; }
.hew-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.hew-hero-preview {
  justify-self: end;
  width: min(100%, 400px);
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--hew-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  color: var(--hew-ink);
  box-shadow: var(--hew-shadow-lg);
  backdrop-filter: blur(6px);
}
.hew-hero-preview header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  font-weight: 600;
}
.hew-hero-preview .hew-chart { margin: 10px 0 14px; }
.hew-hero-preview .hew-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Benefit strip that overlaps the hero */
.hew-benefits {
  position: relative;
  z-index: 2;
  margin-top: -64px;
}
.hew-benefits-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 22px;
  border-radius: var(--hew-radius-lg);
  background: var(--hew-surface);
  box-shadow: var(--hew-shadow);
}
.hew-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
}
.hew-benefit strong {
  font-family: var(--hew-font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Steps */
.hew-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hew-step {
  overflow: hidden;
  padding: 0;
}
.hew-step-art {
  height: 150px;
  background: var(--hew-teal-50);
  display: grid;
  place-items: center;
  color: var(--hew-teal-500);
}
.hew-step-art .hew-icon { width: 64px; height: 64px; stroke-width: 1.4; }
.hew-step-body { padding: 20px 22px 24px; }
.hew-step-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--hew-forest-700);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
.hew-step h3 { display: flex; align-items: center; margin-bottom: 8px; }
.hew-step p { color: var(--hew-ink-2); font-size: 0.95rem; }

/* Feature grid */
.hew-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.hew-feature {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  padding: 26px 18px;
  text-align: center;
}
.hew-feature h3 { font-size: 1rem; }
.hew-feature p { font-size: 0.9rem; color: var(--hew-ink-2); }

/* Feature detail rows */
.hew-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}
.hew-detail + .hew-detail { margin-top: 88px; }
.hew-detail.is-flipped .hew-detail-copy { order: 2; }
.hew-detail-copy { display: grid; gap: 16px; }
.hew-checklist {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.hew-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--hew-ink-2);
}
.hew-checklist li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--hew-mint-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230b3a35' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Product preview: dashboard frame */
.hew-dash {
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: hidden;
  border-radius: var(--hew-radius-lg);
  background: var(--hew-surface-2);
  box-shadow: var(--hew-shadow-lg);
  font-size: 0.86rem;
}
.hew-dash-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 12px;
  background: var(--hew-forest-800);
  color: rgba(255, 255, 255, 0.85);
}
.hew-dash-nav .hew-brand { font-size: 0.95rem; margin: 0 6px 14px; }
.hew-dash-nav .hew-brand .hew-logo { width: 26px; height: 26px; }
.hew-dash-nav span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--hew-radius-sm);
}
.hew-dash-nav span.is-active { background: var(--hew-forest-600); color: #fff; }
.hew-dash-nav .hew-icon { width: 18px; height: 18px; }
.hew-dash-main { display: grid; gap: 14px; padding: 18px; }
.hew-dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hew-dash-top h3 { font-size: 1.2rem; }
.hew-dash-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.hew-dash-tiles .hew-card { padding: 14px; border-radius: var(--hew-radius); }
.hew-dash-tiles .hew-icon { width: 20px; height: 20px; color: var(--hew-teal-500); }
.hew-dash-tiles.hew-tiles-2 { grid-template-columns: repeat(2, 1fr); }
.hew-dash-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 12px;
}
.hew-dash-grid .hew-card { padding: 16px; border-radius: var(--hew-radius); }
.hew-insight-card {
  display: grid;
  gap: 8px;
  align-content: start;
}
.hew-insight-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

/* Pricing */
.hew-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.hew-plans.is-single {
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
}
.hew-plans.is-pair {
  grid-template-columns: repeat(2, minmax(0, 400px));
  justify-content: center;
}
.hew-plan {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  padding: 30px 26px;
}
.hew-plan.is-featured {
  border: 2px solid var(--hew-mint-500);
  background: linear-gradient(180deg, var(--hew-mint-100) 0%, var(--hew-surface) 38%);
  box-shadow: var(--hew-shadow);
}
.hew-plan .hew-chip-mint {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
}
.hew-plan-price {
  font-family: var(--hew-font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--hew-ink);
}
.hew-plan-price small {
  font-family: var(--hew-font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--hew-ink-3);
}
.hew-plan-summary { color: var(--hew-ink-2); font-size: 0.95rem; }
.hew-plan-note { font-size: 0.82rem; color: var(--hew-ink-3); }

/* Professionals split */
.hew-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
.hew-photo.has-photo { --hew-photo: url("img/professional.jpg"); }
.hew-photo {
  min-height: 360px;
  border-radius: var(--hew-radius-lg);
  background: var(--hew-photo, linear-gradient(135deg, var(--hew-teal-100), var(--hew-surface-3)));
  background-size: cover;
  background-position: center;
}

/* Honest limits */
.hew-limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.hew-limit {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px;
  border-left: 4px solid var(--hew-mint-500);
}
.hew-limit strong {
  font-family: var(--hew-font-display);
  font-size: 1rem;
  font-weight: 600;
}
.hew-limit p { font-size: 0.92rem; color: var(--hew-ink-2); }

/* FAQ */
.hew-faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}
.hew-faq details {
  padding: 18px 22px;
  border: 1px solid var(--hew-line);
  border-radius: var(--hew-radius);
  background: var(--hew-surface);
}
.hew-faq summary {
  font-family: var(--hew-font-display);
  font-weight: 600;
  cursor: pointer;
}
.hew-faq details p { margin-top: 10px; color: var(--hew-ink-2); }

/* Call to action band */
.hew-cta {
  padding: 72px 0;
  background: linear-gradient(120deg, var(--hew-forest-800) 0%, var(--hew-forest-600) 100%);
  color: #fff;
}
.hew-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hew-cta h2 { color: #fff; }
.hew-cta p { color: rgba(255, 255, 255, 0.82); margin-top: 8px; }

/* Interior page hero */
.hew-page-hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, var(--hew-teal-50) 0%, var(--hew-surface) 100%);
  text-align: center;
}
.hew-page-hero .hew-wrap { display: grid; gap: 14px; justify-items: center; }
.hew-page-hero .hew-lead { margin: 0 auto; }

/* Long-form and legal */
.hew-prose {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}
.hew-prose section { display: grid; gap: 10px; }
.hew-prose h2 { font-size: 1.35rem; }
.hew-prose p,
.hew-prose li { color: var(--hew-ink-2); }

/* Forms */
.hew-form { display: grid; gap: 16px; }
.hew-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.hew-form input,
.hew-form select,
.hew-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--hew-line-strong);
  border-radius: var(--hew-radius-sm);
  background: var(--hew-surface);
  color: var(--hew-ink);
  font: inherit;
  font-weight: 400;
}
.hew-form input:focus,
.hew-form select:focus,
.hew-form textarea:focus { border-color: var(--hew-teal-500); outline: none; }

.hew-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.hew-contact-grid .hew-card { display: grid; gap: 10px; align-content: start; }

.hew-flash {
  max-width: var(--hew-max);
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: var(--hew-radius);
  background: var(--hew-teal-50);
  border: 1px solid var(--hew-teal-200);
}

/* -- 8. Responsive -------------------------------------------------------- */

@media (max-width: 1040px) {
  .hew-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hew-dash { grid-template-columns: 1fr; }
  .hew-dash-nav { display: none; }
  .hew-limits { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1120px) {
  .hew-menu-toggle { display: inline-flex; }
  .hew-header-inner { flex-wrap: wrap; }
  .hew-nav,
  .hew-header-actions {
    display: none;
    width: 100%;
  }
  .hew-header.is-open .hew-nav,
  .hew-header.is-open .hew-header-actions {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-bottom: 14px;
  }
  .hew-nav .hew-menu { position: static; box-shadow: none; background: transparent; padding: 0 0 0 12px; }
  .hew-nav .hew-menu a { color: rgba(255, 255, 255, 0.88); }
}

@media (max-width: 900px) {
  .hew-hero-inner { grid-template-columns: 1fr; min-height: 0; padding-bottom: 120px; }
  .hew-hero-preview { justify-self: start; }
  .hew-hero-scene { display: none; }
  .hew-benefits-card { grid-template-columns: repeat(2, 1fr); }
  .hew-steps,
  .hew-plans,
  .hew-plans.is-pair,
  .hew-contact-grid { grid-template-columns: 1fr; }
  .hew-detail,
  .hew-split { grid-template-columns: 1fr; gap: 28px; }
  .hew-detail.is-flipped .hew-detail-copy { order: 0; }
  .hew-footer-grid { grid-template-columns: 1fr 1fr; }
  .hew-dash-tiles { grid-template-columns: repeat(2, 1fr); }
  .hew-dash-grid { grid-template-columns: 1fr; }
  .hew-section { padding: 64px 0; }
}

@media (max-width: 560px) {
  .hew-benefit { padding: 6px 4px; gap: 10px; }
  .hew-benefit .hew-icon-tile { width: 42px; height: 42px; }
  .hew-feature-grid,
  .hew-limits,
  .hew-footer-grid { grid-template-columns: 1fr; }
  .hew-hero-preview .hew-stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hew-hero-actions .hew-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hew-btn { transition: none; }
  .hew-btn:hover { transform: none; }
}

/* -- Signed-out app screens ----------------------------------------------
 * Sign in, sign up, password and link pages render through base.html with
 * the older app stylesheet. On those pages the app tokens are remapped to the
 * design system, and the shared components are restyled to match the site.
 */

body.hew-auth,
body.hew-app {
  --paper: #ffffff;
  --paper-raised: #ffffff;
  --paper-recessed: var(--hew-teal-50);
  --ground: var(--hew-surface-alt, #f4f8f7);
  --ink: var(--hew-ink);
  --ink-2: var(--hew-ink-2);
  --ink-3: #5f716d;
  --ink-4: #8a9a96;
  --rule: var(--hew-line);
  --rule-soft: var(--hew-line);
  --rule-strong: var(--hew-line-strong);
  --rule-ink: var(--hew-forest-900);
  --accent: var(--hew-forest-600);
  --accent-ink: var(--hew-forest-800);
  --accent-wash: var(--hew-teal-50);
  --accent-line: var(--hew-teal-200);
  --radius: var(--hew-radius-sm);
  --sans: var(--hew-font-body);
  --mono: var(--hew-font-body);
}

body.hew-auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 16px;
  background:
    radial-gradient(1100px 520px at 100% 0%, var(--hew-teal-100), transparent 60%),
    radial-gradient(900px 480px at 0% 100%, var(--hew-mint-100), transparent 55%),
    #f4f8f7;
}

.hew-auth-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.hew-auth-actions .hew-btn { min-height: 38px; padding: 0 16px; font-size: 0.9rem; white-space: nowrap; }

.hew-auth-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px var(--hew-gutter, 20px);
}
.hew-auth-stage:has(.signup-layout) { grid-template-columns: minmax(0, 1fr); max-width: 1120px; }
.hew-auth-stage:has(.signup-layout) .hew-auth-aside { display: none; }

.hew-auth-aside { display: grid; gap: 18px; color: var(--hew-forest-900); }
.hew-auth-aside-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hew-forest-600);
}
.hew-auth-aside-title {
  font-family: var(--hew-font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hew-auth-aside ul { display: grid; gap: 12px; margin: 6px 0 0; padding: 0; list-style: none; }
.hew-auth-aside li { display: flex; align-items: center; gap: 10px; color: var(--hew-ink-2); font-weight: 500; }
.hew-auth-aside li .hew-icon {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 50%;
  background: var(--hew-mint-100);
  color: var(--hew-forest-700);
}

.hew-auth .hew-auth-shell { display: block; min-height: 0; max-width: none; padding: 0; margin: 0; }
.hew-auth .auth-layout { max-width: none; padding: 0; }
.hew-auth .signup-layout { display: block; width: 100%; max-width: 780px; margin: 0 auto; padding: 0; }

.hew-auth .auth-block {
  gap: 20px;
  padding: 36px;
  border: 1px solid var(--hew-line);
  border-radius: var(--hew-radius-lg);
  background: #fff;
  box-shadow: 0 24px 60px -28px rgba(11, 58, 53, 0.35);
}
.hew-auth .section-header { display: block; padding: 0; border: 0; }
.hew-auth .section-header h2 { margin: 6px 0 8px; font-size: clamp(1.6rem, 3vw, 2rem); }
.hew-auth .section-kicker {
  font-family: var(--hew-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--hew-teal-500);
}
.hew-auth .plain-note,
.hew-auth .auth-note,
.hew-auth .section-header > div > p:not(.section-kicker) { font-size: 0.95rem; line-height: 1.55; color: var(--hew-ink-2); }
.hew-auth label > small { font-size: 0.82rem; color: #5f716d; }

.hew-auth .auth-block form,
.hew-auth .account-form { display: grid; gap: 16px; }
.hew-auth label > span:first-child {
  margin-bottom: 6px;
  font-family: var(--hew-font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hew-ink);
}
.hew-auth input[type="text"],
.hew-auth input[type="email"],
.hew-auth input[type="password"],
.hew-auth input[type="tel"],
.hew-auth input[type="number"],
.hew-auth select,
.hew-auth textarea {
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--hew-line-strong);
  border-radius: var(--hew-radius-sm);
  font-family: var(--hew-font-body);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hew-auth input:focus,
.hew-auth select:focus,
.hew-auth textarea:focus {
  outline: none;
  border-color: var(--hew-teal-500);
  box-shadow: 0 0 0 4px var(--hew-teal-100);
}
.hew-auth input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--hew-forest-600); }

.hew-auth button[type="submit"],
.hew-auth .button-primary,
.hew-auth .button-link {
  width: 100%;
  min-height: 50px;
  padding: 0 22px;
  border: 1.5px solid var(--hew-mint-500);
  border-radius: var(--hew-radius-sm);
  background: var(--hew-mint-500);
  color: var(--hew-forest-900);
  font-family: var(--hew-font-body);
  font-size: 1rem;
  font-weight: 700;
}
.hew-auth button[type="submit"]:hover,
.hew-auth .button-primary:hover,
.hew-auth .button-link:hover {
  border-color: var(--hew-mint-400);
  background: var(--hew-mint-400);
  color: var(--hew-forest-900);
}
.hew-auth .button-secondary {
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px solid var(--hew-line-strong);
  border-radius: var(--hew-radius-sm);
  background: #fff;
  color: var(--hew-forest-900);
  font-size: 0.95rem;
  font-weight: 600;
}
.hew-auth .button-row,
.hew-auth .app-layout form > .button-row { display: grid; gap: 10px; justify-self: stretch; }
.hew-auth .button-row > * { width: 100%; }
.hew-auth .inline-link { color: var(--hew-forest-600); font-family: inherit; font-size: inherit; font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; }

.hew-auth .plan-card,
.hew-auth .choice-card {
  padding: 18px;
  border: 1.5px solid var(--hew-line);
  border-radius: var(--hew-radius);
  background: #fff;
}
.hew-auth .plan-card:has(input:checked) { border-color: var(--hew-mint-500); box-shadow: 0 0 0 4px var(--hew-mint-100); }
.hew-auth .signup-pricing .plan-card { display: grid; gap: 4px; background: var(--hew-teal-50); }
.hew-auth .signup-pricing .plan-card:only-child input[type="radio"] { display: none; }
.hew-auth .signup-pricing .plan-card strong { order: -1; font-family: var(--hew-font-display); font-size: 1.15rem; color: var(--hew-forest-900); }
.hew-auth .signup-pricing .plan-card span { margin: 0; font-size: 1rem; font-weight: 600; color: var(--hew-forest-700); text-transform: none; letter-spacing: 0; font-family: var(--hew-font-body); }
.hew-auth .signup-pricing .plan-card small { font-size: 0.9rem; color: var(--hew-ink-2); }
.hew-auth .plan-price { font-family: var(--hew-font-display); font-size: 1.6rem; color: var(--hew-forest-900); }
.hew-auth .plan-points li { font-size: 0.92rem; }
.hew-auth .plan-points li::before { top: 11px; background: var(--hew-mint-500); height: 2px; }

.hew-auth .flash-list { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px var(--hew-gutter, 20px) 0; }
.hew-auth .flash {
  padding: 12px 16px;
  border: 1px solid var(--hew-teal-200);
  border-radius: var(--hew-radius);
  background: var(--hew-teal-50);
  color: var(--hew-forest-900);
  font-size: 0.95rem;
}

.hew-auth .app-footer {
  justify-content: center;
  gap: 18px;
  padding: 22px var(--hew-gutter, 20px);
  border-top: 1px solid var(--hew-line);
  background: transparent;
  font-family: var(--hew-font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hew-ink-2);
}
.hew-auth .app-footer a { color: var(--hew-ink-2); }
.hew-auth .app-footer a:hover { color: var(--hew-forest-600); }

@media (max-width: 900px) {
  .hew-auth-stage { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; padding-bottom: 40px; }
  .hew-auth-aside ul { display: none; }
  .hew-auth-aside-title { font-size: 1.6rem; }
  .hew-auth-stage { align-items: start; }
}

@media (max-width: 560px) {
  .hew-auth-stage { padding-top: 24px; }
  .hew-auth-aside { display: none; }
  .hew-auth .auth-block { padding: 24px 20px; }
  .hew-auth .field-grid { grid-template-columns: minmax(0, 1fr); }
  .hew-auth .hew-brand span { display: none; }
}

/* -- Signed-in app ---------------------------------------------------------
 * The signed-in screens keep their layouts and data components from
 * styles.css. Here the shell (sidebar, top bar) is redrawn to match the
 * dashboard mockup, and shared components pick up the design system.
 */

body.hew-app {
  --sidebar-w: 248px;
  --ok: var(--hew-forest-600);
  --ok-wash: var(--hew-mint-100);
  --flag: #b4471f;
  --flag-wash: #fdeee6;
  --flag-line: #f2c3aa;
  font-size: 14px;
  background: var(--hew-surface-2);
}

/* sidebar */
.hew-app .app-sidebar {
  border-right: 0;
  background: var(--hew-forest-800);
  color: rgba(255, 255, 255, 0.82);
}
.hew-app .app-brand { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.hew-app .brand-lockup { gap: 10px; color: #fff; }
.hew-app .app-sidebar .brand-mark { width: 34px; height: 34px; background: none; }
.hew-app .app-sidebar .brand-mark .hew-logo { width: 34px; height: 34px; }
.hew-app .brand-lockup .eyebrow {
  font-family: var(--hew-font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}
.hew-app .brand-lockup strong { font-size: 0.78rem; font-weight: 500; color: var(--hew-mint-400); }

.hew-app .sidebar-account {
  margin: 14px 14px 6px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--hew-radius);
  background: rgba(255, 255, 255, 0.05);
}
.hew-app .sidebar-account .label { color: rgba(255, 255, 255, 0.55); }
.hew-app .sidebar-account strong { font-family: var(--hew-font-body); font-size: 0.95rem; color: #fff; }
.hew-app .sidebar-account p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }

.hew-app .app-nav { gap: 2px; padding: 10px 12px; }
.hew-app .app-nav a {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-left: 0;
  border-radius: var(--hew-radius-sm);
  color: rgba(255, 255, 255, 0.78);
}
.hew-app .app-nav a .hew-icon { flex: none; width: 19px; height: 19px; }
.hew-app .app-nav a span { font-size: 0.92rem; font-weight: 500; }
.hew-app .app-nav a small { display: none; }
.hew-app .app-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.hew-app .app-nav a.active { background: var(--hew-forest-600); color: #fff; }
.hew-app .app-nav a.active .hew-icon { color: var(--hew-mint-400); }

.hew-app .sidebar-session { padding: 16px 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.hew-app .sidebar-session .label { color: rgba(255, 255, 255, 0.55); }
.hew-app .sidebar-session strong { font-size: 0.9rem; color: #fff; }
.hew-app .sidebar-session p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.hew-app .sidebar-session button.button-secondary[type="submit"] {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
}
.hew-app .sidebar-session button.button-secondary[type="submit"]:hover { border-color: var(--hew-mint-400); background: rgba(255, 255, 255, 0.06); color: #fff; }

/* top bar and page */
.hew-app .app-main-shell { background: var(--hew-surface-2); }
.hew-app .app-topbar {
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--hew-line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}
.hew-app .app-topbar h1 { font-family: var(--hew-font-display); font-size: 1.45rem; font-weight: 700; color: var(--hew-forest-900); }
.hew-app .app-topbar .eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: var(--hew-teal-500); }
.hew-app .topbar-chip { padding: 5px 12px; border-radius: var(--hew-radius-pill); font-size: 0.8rem; }

.hew-app .eyebrow,
.hew-app .section-kicker,
.hew-app .label { font-family: var(--hew-font-body); font-weight: 700; color: var(--hew-teal-500); }

.hew-app h2 { font-family: var(--hew-font-display); color: var(--hew-forest-900); }
.hew-app .section-header h2 { font-size: 1.15rem; }
.hew-app .section-header > div > p:not(.section-kicker),
.hew-app .plain-note { font-size: 0.88rem; line-height: 1.5; color: var(--hew-ink-2); }

/* cards */
.hew-app .section-block {
  gap: 14px;
  padding: 20px 22px 22px;
  border: 1px solid var(--hew-line);
  border-radius: var(--hew-radius);
  background: #fff;
  box-shadow: var(--hew-shadow-sm);
}

/* tables */
.hew-app table { font-size: 0.86rem; }
.hew-app thead th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hew-line);
  background: var(--hew-surface-2);
  font-family: var(--hew-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hew-ink-3);
}
.hew-app thead th:first-child { border-top-left-radius: var(--hew-radius-sm); }
.hew-app thead th:last-child { border-top-right-radius: var(--hew-radius-sm); }
.hew-app tbody td { padding: 10px 12px; border-bottom-color: var(--hew-line); }
.hew-app tbody tr:hover { background: var(--hew-teal-50); }

/* forms and buttons */
.hew-app input[type="text"],
.hew-app input[type="email"],
.hew-app input[type="password"],
.hew-app input[type="number"],
.hew-app input[type="date"],
.hew-app input[type="search"],
.hew-app input[type="url"],
.hew-app input[type="tel"],
.hew-app select,
.hew-app textarea {
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px solid var(--hew-line-strong);
  border-radius: var(--hew-radius-sm);
  font-family: var(--hew-font-body);
  font-size: 0.92rem;
}
.hew-app input:focus,
.hew-app select:focus,
.hew-app textarea:focus {
  outline: none;
  border-color: var(--hew-teal-500);
  box-shadow: 0 0 0 3px var(--hew-teal-100);
}
.hew-app label > span:first-child { font-family: var(--hew-font-body); font-size: 0.82rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--hew-ink); }

.hew-app button[type="submit"],
.hew-app .button-primary,
.hew-app .button-link {
  min-height: 40px;
  padding: 0 18px;
  border: 1.5px solid var(--hew-mint-500);
  border-radius: var(--hew-radius-sm);
  background: var(--hew-mint-500);
  color: var(--hew-forest-900);
  font-family: var(--hew-font-body);
  font-size: 0.9rem;
  font-weight: 700;
}
.hew-app button[type="submit"]:hover,
.hew-app .button-primary:hover,
.hew-app .button-link:hover { border-color: var(--hew-mint-400); background: var(--hew-mint-400); color: var(--hew-forest-900); }
.hew-app .button-secondary,
.hew-app button.button-secondary[type="submit"] {
  border: 1.5px solid var(--hew-line-strong);
  border-radius: var(--hew-radius-sm);
  background: #fff;
  color: var(--hew-forest-900);
  font-weight: 600;
}
.hew-app .button-secondary:hover { border-color: var(--hew-forest-600); background: var(--hew-teal-50); color: var(--hew-forest-900); }
.hew-app button,
.hew-app .button-secondary,
.hew-app .button-link { letter-spacing: 0; text-transform: none; }
.hew-app .panel-title {
  border-bottom-color: var(--hew-line);
  font-family: var(--hew-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hew-forest-900);
}
.hew-app .mini-panel h3,
.hew-app .detail-column h3 {
  font-family: var(--hew-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hew-forest-900);
}
.hew-app .account-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hew-app .account-switcher label { font-size: 0.8rem; font-weight: 600; color: var(--hew-ink-2); }
.hew-app .account-switcher select { width: auto; min-width: 160px; }
.hew-app .profile-bar { border-radius: 0 4px 4px 0; background: var(--hew-teal-400); }
.hew-app .profile-row.overnight .profile-bar { background: var(--hew-amber-500); }
.hew-app .chart-series-line.chart-series-current,
.hew-app .chart-series-line.meter { stroke: var(--hew-teal-500); }
.hew-app .legend-swatch.chart-series-current { background: var(--hew-teal-500); }
.hew-app .button-small { min-height: 32px; padding: 0 12px; font-size: 0.82rem; }
.hew-app button.danger { border-color: var(--hew-red-500); background: #fff; color: var(--hew-red-500); }
.hew-app .inline-link,
.hew-app a:where(:not([class])) { color: var(--hew-forest-600); font-weight: 600; }

.hew-app .flash {
  border: 1px solid var(--hew-teal-200);
  border-radius: var(--hew-radius);
  background: var(--hew-teal-50);
  color: var(--hew-forest-900);
}

.hew-app .app-footer {
  border-top: 1px solid var(--hew-line);
  background: transparent;
  font-family: var(--hew-font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hew-ink-3);
}

.hew-app .commission-preview-banner {
  border-bottom: 1px solid var(--hew-amber-500);
  background: var(--hew-amber-100);
  color: var(--hew-forest-900);
}

@media (max-width: 860px) {
  .hew-app .app-sidebar { border-bottom: 0; }
  .hew-app .app-brand { padding: 14px 16px; }
  .hew-app .sidebar-account { margin: 0 12px 4px; padding: 10px 12px; }
  .hew-app .app-nav { flex-wrap: nowrap; overflow-x: auto; padding: 8px 12px 12px; }
  .hew-app .app-nav a { padding: 8px 12px; border-bottom: 0; white-space: nowrap; }
  .hew-app .app-nav a.active { border-bottom: 0; }
  .hew-app .sidebar-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
  .hew-app .sidebar-session p { margin-bottom: 0; }
  .hew-app .app-topbar { position: static; padding: 14px var(--gutter); }
  .hew-app .section-block { padding: 16px; }
}

/* Commissioner account controls: select, disable/enable, delete. */
.hew-app .account-chip-list.is-selectable { align-items: center; }
.hew-app .account-select { display: inline-flex; align-items: center; margin-right: -2px; }
.hew-app .account-select input { width: 18px; height: 18px; accent-color: var(--hew-forest-600); }
.hew-app .account-status-badge {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--hew-radius-pill);
  background: var(--hew-amber-100);
  color: #8a4b0f;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}
.hew-app .account-admin-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.hew-app .account-admin-label { align-self: center; font-size: 0.82rem; font-weight: 600; color: var(--hew-ink-2); }
.hew-app .account-delete-confirm { display: grid; gap: 2px; }
.hew-app .account-delete-confirm span { font-size: 0.72rem !important; color: var(--hew-ink-3) !important; }
.hew-app .account-delete-confirm input { width: 130px; min-height: 32px; }
.hew-app .account-admin-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hew-line);
  border-radius: var(--hew-radius-sm);
  background: var(--hew-surface-2);
}
.hew-app button.danger,
.hew-app button.danger[type="submit"] {
  border: 1.5px solid var(--hew-red-500);
  background: #fff;
  color: var(--hew-red-500);
}
.hew-app button.danger[type="submit"]:hover { background: var(--hew-red-500); color: #fff; }

/* Space between a form's last field and its buttons. Grid and flex forms
 * already space their children with `gap`; this covers buttons that sit in a
 * fieldset or other plain block right after fields, notes or details. */
.hew-app .form-fieldset { display: grid; gap: 12px; min-width: 0; }
.hew-app .form-fieldset > :is(button, .button-link) { justify-self: start; }
.hew-app :is(form:not([class]), fieldset, .form-fieldset, div, section, details)
  > :is(.field-grid, label, p, details, fieldset, .form-fieldset, textarea, select)
  + :is(button, .button-row, .button-link) { margin-top: 14px; }

/* Menu groups */
.hew-app .app-nav .app-nav-group {
  margin: 12px 12px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.hew-app .app-nav .app-nav-group:first-child { margin-top: 2px; }
.hew-app .app-nav a { padding: 8px 12px; }
@media (max-width: 860px) {
  .hew-app .app-nav .app-nav-group { display: none; }
}

/* One-topic pages */
.hew-app .section-page { max-width: 1100px; }
.hew-app .guide-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.hew-app .guide-index { padding: 14px 10px; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.hew-app .guide-index .section-kicker { padding: 0 8px; }
.hew-app .guide-index ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.hew-app .guide-index a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--hew-radius-sm); color: var(--hew-ink-2); font-size: 0.9rem; text-decoration: none; }
.hew-app .guide-index a:hover { background: var(--hew-surface-2); color: var(--hew-ink); }
.hew-app .guide-index a.active { background: var(--hew-teal-50); color: var(--hew-forest-900); font-weight: 600; }
.hew-app .guide-index small { font-size: 0.7rem; font-weight: 600; color: var(--hew-forest-600); white-space: nowrap; }
.hew-app .guide-detail h2 { margin: 4px 0 8px; }
.hew-app .guide-steps { margin: 18px 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.hew-app .guide-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; line-height: 1.55; }
.hew-app .guide-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hew-forest-900); color: #fff; font-weight: 600; font-size: 0.85rem; }
.hew-app .guide-detail .guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hew-app .guide-footnote { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hew-line); }
@media (max-width: 860px) {
  .hew-app .guide-layout { grid-template-columns: 1fr; }
  .hew-app .guide-index { position: static; max-height: 260px; }
}

/* Date-range calendar */
.hew-app .range-pair { display: grid; gap: 18px; margin: 8px 0 14px; }
.hew-app .range-field { padding: 14px; border: 1px solid var(--hew-line); border-radius: var(--hew-radius); background: var(--hew-surface); }
.hew-app .range-title { margin: 0; font-weight: 600; color: var(--hew-ink); }
.hew-app .range-summary { margin: 2px 0 10px; color: var(--hew-ink-2); font-size: 0.9rem; }
.hew-app .range-summary.is-error { color: var(--hew-red-500); font-weight: 600; }
.hew-app .range-nav { display: flex; gap: 8px; margin-bottom: 10px; }
.hew-app .range-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.hew-app .range-month-title { margin: 0 0 6px; font-weight: 600; text-align: center; }
.hew-app .range-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.hew-app .range-weekday { text-align: center; font-size: 0.72rem; color: var(--hew-ink-3); padding-bottom: 4px; }
.hew-app .range-day {
  height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--hew-ink); font-size: 0.88rem; font-weight: 500; cursor: pointer;
}
.hew-app .range-day:hover:not(:disabled) { background: var(--hew-teal-100); color: var(--hew-forest-900); }
.hew-app .range-day:disabled { color: var(--hew-line-strong); cursor: not-allowed; background: transparent; }
.hew-app .range-day.in-range { background: var(--hew-teal-100); color: var(--hew-forest-900); }
.hew-app .range-day.is-start,
.hew-app .range-day.is-end { background: var(--hew-forest-900); color: #fff; }
.hew-app .range-day.is-start { border-radius: 18px 0 0 18px; }
.hew-app .range-day.is-end { border-radius: 0 18px 18px 0; }
.hew-app .range-day.is-start.is-end { border-radius: 18px; }
@media (max-width: 700px) {
  .hew-app .range-months { grid-template-columns: 1fr; }
}
.hew-app .range-fallback[hidden],
.hew-app .range-calendar[hidden] { display: none !important; }
.hew-app .range-day.is-start:hover:not(:disabled),
.hew-app .range-day.is-end:hover:not(:disabled) { background: var(--hew-forest-900); color: #fff; }


/* Press page */
.hew-press-about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.hew-press-about h2 { margin: 10px 0 0; }
.hew-press-copy p { margin: 0 0 16px; color: var(--hew-ink-2); line-height: 1.65; }
.hew-press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.hew-press-item { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hew-press-thumb { display: block; aspect-ratio: 1 / 1; background: var(--hew-surface-3); }
.hew-press-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hew-press-item figcaption { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hew-press-item h3 { margin: 0; font-size: 1.05rem; }
.hew-press-item p { margin: 0 0 8px; color: var(--hew-ink-2); flex: 1; }
.hew-press-item .hew-btn { align-self: flex-start; }
.hew-press-brand { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.hew-press-asset { display: flex; flex-direction: column; gap: 12px; }
.hew-press-asset h3 { margin: 0; font-size: 1.05rem; }
.hew-press-asset p { margin: 0; color: var(--hew-ink-2); }
.hew-press-asset-preview { height: 140px; display: grid; place-items: center; border-radius: var(--hew-radius-sm); background: var(--hew-surface-2); overflow: hidden; }
.hew-press-asset-preview.is-dark { background: var(--hew-forest-900); }
.hew-press-asset-preview.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.hew-press-asset-preview img { display: block; }
.hew-press-logo { width: 80px; height: 80px; }
.hew-press-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hew-press-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--hew-forest-700); }
.hew-press-links .hew-icon { width: 16px; height: 16px; }
.hew-press-colors { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-height: 140px; align-content: center; }
.hew-press-colors li { display: flex; align-items: center; gap: 10px; }
.hew-press-colors code { margin-left: auto; color: var(--hew-ink-3); }
.hew-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--hew-line); }
.hew-swatch.is-forest { background: #0b3a35; }
.hew-swatch.is-mint { background: #3fd98a; }
.hew-swatch.is-teal { background: #22b5a3; }
.hew-swatch.is-ink { background: #11221f; }
@media (max-width: 1040px) {
  .hew-press-grid { grid-template-columns: repeat(2, 1fr); }
  .hew-press-brand { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hew-press-about { grid-template-columns: 1fr; gap: 16px; }
  .hew-press-grid, .hew-press-brand { grid-template-columns: 1fr; }
}

/* Voice home inventory */
.hew-app .voice-inventory { margin: 18px 0; padding: 18px; border: 1px solid var(--hew-teal-100); border-radius: var(--hew-radius); background: var(--hew-teal-50); }
.hew-app .voice-inventory-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hew-app .voice-inventory-head h3 { margin: 2px 0 6px; }
.hew-app .voice-controls { display: flex; gap: 8px; }
.hew-app .voice-controls button { display: inline-flex; align-items: center; gap: 8px; }
.hew-app .voice-controls .hew-icon { width: 18px; height: 18px; }
.hew-app .voice-status { margin: 10px 0; color: var(--hew-ink-2); font-size: 0.9rem; }
.hew-app .voice-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.hew-app .voice-transcript { max-height: 360px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.hew-app .voice-transcript:empty { display: none; }
.hew-app .voice-line { padding: 8px 12px; border-radius: 12px; background: var(--hew-surface); max-width: 92%; }
.hew-app .voice-line.is-user { justify-self: end; background: var(--hew-forest-900); color: #fff; }
.hew-app .voice-line span { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.hew-app .voice-line p { margin: 2px 0 0; }
.hew-app .voice-proposals { display: grid; gap: 10px; align-content: start; }
.hew-app .voice-proposals-title { margin: 0; font-weight: 600; }
.hew-app .voice-item { margin: 0; padding: 12px; border: 1px solid var(--hew-line); border-radius: var(--hew-radius-sm); background: var(--hew-surface); display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(70px, 0.7fr) minmax(90px, 1fr); gap: 8px 10px; align-items: end; }
.hew-app .voice-item label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--hew-ink-2); }
.hew-app .voice-item > input[type="checkbox"] { align-self: center; width: 18px; height: 18px; }
.hew-app .voice-item .voice-item-check { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; }
.hew-app .voice-item-meta { grid-column: 2 / -1; margin: 0; font-size: 0.78rem; color: var(--hew-ink-3); }
.hew-app .voice-proposal-actions { display: flex; align-items: center; gap: 12px; }
.hew-app .voice-type-form { display: flex; gap: 8px; margin-top: 12px; }
.hew-app .voice-type-form input { flex: 1; }
@media (max-width: 860px) {
  .hew-app .voice-panes { grid-template-columns: 1fr; }
  .hew-app .voice-item { grid-template-columns: auto 1fr 1fr; }
  .hew-app .voice-item label:nth-of-type(1) { grid-column: 2 / -1; }
}
.hew-app .voice-inventory [hidden] { display: none !important; }

/* Referral share kit */
.hew-kit-link { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.hew-kit-link code { font-size: 1.05rem; word-break: break-all; }
.hew-kit-link p { margin: 6px 0 0; }
.hew-kit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hew-kit-item { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hew-kit-item img { width: 100%; height: auto; display: block; background: var(--hew-surface-3); }
.hew-kit-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.hew-kit-body h3 { margin: 0; font-size: 1.05rem; }
.hew-kit-post { margin: 0; color: var(--hew-ink-2); font-size: 0.92rem; line-height: 1.5; word-break: break-word; }
.hew-kit-share, .hew-kit-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.hew-kit-btn { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--hew-forest-900); color: #fff; font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.hew-kit-btn:hover { background: var(--hew-forest-700); color: #fff; }
.hew-kit-tools .hew-btn { padding: 7px 12px; font-size: 0.82rem; min-height: 0; }
.hew-kit-tools .hew-icon { width: 15px; height: 15px; }
.hew-kit-html summary { cursor: pointer; font-size: 0.85rem; color: var(--hew-ink-3); }
.hew-kit-html textarea { width: 100%; margin-top: 6px; font-family: ui-monospace, monospace; font-size: 0.78rem; }
.hew-kit-note { margin-top: 24px; }
@media (max-width: 1040px) { .hew-kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hew-kit-grid { grid-template-columns: 1fr; } }
.hew-referral-landing { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #f4faf8; font-family: Inter, system-ui, sans-serif; }
.hew-referral-landing main { max-width: 520px; padding: 24px; text-align: center; }
.hew-referral-landing img { width: 100%; height: auto; border-radius: 16px; }
.hew-referral-landing h1 { font-size: 1.4rem; color: #0b3a35; }

/* Affiliate portal */
.hew-affiliate-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--hew-mint-400, #3fd98a); color: var(--hew-forest-900); font-size: 0.7rem; font-weight: 700; vertical-align: middle; }
.hew-affiliate-nav a.is-active { color: #fff; }
.hew-affiliate-user { color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; margin-right: 8px; align-self: center; }
.hew-affiliate-main { padding: 36px 0 64px; background: var(--hew-surface-2); min-height: 70vh; }
.hew-affiliate-main .hew-card { margin-bottom: 20px; }
.hew-affiliate-auth { max-width: 460px; margin: 24px auto; }
.hew-affiliate-auth h1, .hew-affiliate-head h1 { margin: 6px 0 8px; font-size: 1.8rem; }
.hew-affiliate-auth-inline { max-width: 520px; }
.hew-affiliate-head { margin-bottom: 20px; }
.hew-affiliate-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.hew-affiliate-stats.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hew-affiliate-stats .hew-card { margin-bottom: 0; }
.hew-affiliate-stat { display: grid; gap: 4px; }
.hew-affiliate-stat span { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hew-ink-3); }
.hew-affiliate-stat strong { font-size: 1.6rem; color: var(--hew-forest-900); }
.hew-affiliate-stat small { color: var(--hew-ink-3); line-height: 1.4; }
.hew-affiliate-table table { width: 100%; border-collapse: collapse; }
.hew-affiliate-table th, .hew-affiliate-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--hew-line); font-size: 0.92rem; }
.hew-table-wrap { overflow-x: auto; }
.hew-status { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--hew-surface-3); }
.hew-status.is-approved { background: var(--hew-teal-100); color: var(--hew-forest-900); }
.hew-status.is-paid { background: var(--hew-forest-900); color: #fff; }
.hew-status.is-reversed { background: #fde8e8; color: #8a1c1c; }
.hew-affiliate-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0 0 12px; }
.hew-affiliate-facts dt { font-size: 0.8rem; color: var(--hew-ink-3); }
.hew-affiliate-facts dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 900px) { .hew-affiliate-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hew-affiliate-stats, .hew-affiliate-stats.is-two, .hew-affiliate-facts { grid-template-columns: 1fr; } }
.hew-affiliate-main h2 { font-size: 1.25rem; margin: 0 0 12px; }

/* Dropdowns: our own arrow, inset from the edge, instead of the browser's arrow jammed against it. */
:is(.hew, .hew-app, .hew-auth, body) select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%23315450' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
  text-overflow: ellipsis;
}
:is(.hew, .hew-app, .hew-auth, body) select:not([multiple]):not([size]):disabled { opacity: 0.6; }

/* ZIP lookup: companies to choose from when service areas overlap. */
.utility-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.utility-choice { font: inherit; font-size: 0.875rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hew-line-strong); background: var(--hew-surface); color: inherit; cursor: pointer; }
.utility-choice:hover, .utility-choice:focus-visible { border-color: var(--hew-teal-500); }

/* Signed-in "Add an electric account": the sign-up form inside the app shell gets the full
   content width, not the 420px sign-in column with an empty 300px grid track. */
.hew-app .signup-layout { display: block; width: 100%; max-width: 780px; margin: 0; padding: 0; }
.hew-app .signup-layout .auth-block { width: 100%; max-width: none; }
