:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --border: #e2e8f0;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #f0fdfa;
  --pass: #047857;
  --pass-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --fail: #b91c1c;
  --fail-bg: #fef2f2;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --max-width: 1120px;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.65rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.15rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
}

.brand__mark svg {
  display: block;
  width: 22px;
  height: 22px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand__text span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav__link {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  background: var(--surface-alt);
  color: var(--ink);
}

/* Main */
.main-shell {
  flex: 1;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: #94a3b8;
}

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  color: #f8fafc;
  border-radius: 16px;
  padding: 2.2rem 1.8rem;
  margin-bottom: 1.5rem;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5eead4;
  margin-bottom: 0.5rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.hero p {
  margin: 0 0 1.25rem;
  color: #cbd5e1;
  max-width: 68ch;
  font-size: 1.03rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.88fr);
  gap: 1.75rem;
  align-items: center;
}

.hero__media {
  margin: 0;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  background: rgba(15, 23, 42, 0.25);
  aspect-ratio: 3 / 2;
}

.hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 840px) {
  .hero--split {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .hero__media {
    max-height: 220px;
  }
}

/* Institutional Editorial Photo Cards (CLS-Safe 3:2) */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 0.9rem;
}

@media (max-width: 720px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

.editorial-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.editorial-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.editorial-card__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface-alt);
}

.editorial-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.editorial-card__body h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.3;
  color: var(--ink);
}

.editorial-card__body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.48;
}

.page-header {
  margin-bottom: 1.35rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 72ch;
}

.byline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.callout-box h2 {
  margin: 0 0 0.25rem;
  font-size: 1.08rem;
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.35rem;
  min-width: 0;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
}

.card h3 {
  margin-top: 1.1rem;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 860px) {
  .calc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tool-grid,
.product-grid,
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-card__tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
}

.tool-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.tool-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.field small {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

input[type="number"],
input[type="text"],
input[type="email"],
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.72rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
}

select {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appliance-row label strong {
  margin-right: 0.3rem;
}

.appliance-row .badge {
  vertical-align: middle;
  padding: 0.14rem 0.5rem;
  font-size: 0.72rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.05rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: #cbd5e1;
}

.btn--secondary:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* KPI & Result Panels */
.result-panel {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.3rem;
  position: sticky;
  top: 84px;
  min-width: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0;
}

@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kpi {
  background: var(--surface-alt);
  border-radius: 9px;
  padding: 0.8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.kpi__label {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.kpi__val {
  display: block;
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge--pass {
  background: var(--pass-bg);
  color: var(--pass);
  border: 1px solid #a7f3d0;
}

.badge--warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #fde68a;
}

.badge--fail {
  background: var(--fail-bg);
  color: var(--fail);
  border: 1px solid #fecaca;
}

/* Appliance Picker */
.appliance-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.appliance-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) 82px 86px;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}

.appliance-row.is-selected {
  background: var(--accent-soft);
  border-color: #99f6e4;
}

@media (max-width: 640px) {
  .appliance-row {
    grid-template-columns: auto 1fr;
  }
}

.appliance-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* Product Cards */
.product-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg);
}

.product-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.product-card__brand {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  font-weight: 700;
}

.product-card__title {
  margin: 0.1rem 0 0;
  font-size: 1.02rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.spec-grid div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.45rem 0.6rem;
}

.spec-grid dt {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.spec-grid dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
}

.product-card__note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
  flex: 1;
}

.product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.product-card__price {
  font-weight: 800;
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ & Callouts */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}

.faq-item summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 700;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 800;
  color: var(--accent-dark);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item__body {
  padding: 0 1rem 0.95rem;
  color: var(--ink-muted);
}

.faq-item__body p {
  margin: 0;
}

.callout-box {
  background: var(--accent-soft);
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}

.callout-box h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.callout-box p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  max-width: 62ch;
}

.notice-box {
  border-left: 4px solid var(--warn);
  background: var(--warn-bg);
  color: #78350f;
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  margin: 0.9rem 0;
}

.notice-box--fail {
  border-left-color: var(--fail);
  background: var(--fail-bg);
  color: #7f1d1d;
}

.notice-box--pass {
  border-left-color: var(--pass);
  background: var(--pass-bg);
  color: #064e3b;
}

/* Ad slots */
.ad-slot {
  background: var(--surface-alt);
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem;
  margin: 1.15rem 0;
  text-align: center;
}

.ad-slot__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

/* Utility */
.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.85rem;
}

.formula-box {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.9rem 1.1rem;
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  overflow-x: auto;
  margin: 0.85rem 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.pill-list a {
  display: inline-block;
  padding: 0.38rem 0.75rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.pill-list a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  color: #fff;
  font-size: 1.15rem;
}

.site-footer h3 {
  color: #fff;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.6rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.site-footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 1.8rem;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Behavioral UX Visual Gauges, Bars & Presets */
.ux-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.35rem 0 0.75rem;
}

.ux-gauge__sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 0.25rem;
}

.ux-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.ux-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.ux-bar-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}

.ux-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 220ms ease;
}

.ux-bar-fill--accent { background: var(--accent); }
.ux-bar-fill--pass { background: var(--pass); }
.ux-bar-fill--warn { background: var(--warn); }
.ux-bar-fill--fail { background: var(--fail); }

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.preset-chip {
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.preset-chip:hover,
.preset-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

/* Print Load Sheet */
@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .callout-box,
  .btn,
  .no-print {
    display: none !important;
  }
  .result-panel {
    position: static;
    border: 1px solid #000;
  }
  body {
    background: #fff;
  }
}
