:root {
  --bg: #0b0d10;
  --bg-2: #11151a;
  --bg-3: #161b22;
  --line: #232a33;
  --line-2: #2f3945;
  --tx: #e6edf3;
  --tx-2: #9fb0c0;
  --tx-3: #6b7d8f;
  --acc: #4ade80;
  --acc-2: #22d3ee;
  --warn: #fbbf24;
  --bad: #f87171;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sidebar: 280px;
  --maxw: 900px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--acc-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 0 60px;
}

.sidebar-brand {
  padding: 0 24px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.sidebar-brand .mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
  display: block;
  margin-bottom: 6px;
}
.sidebar-brand .title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.sidebar-brand .sub {
  font-size: 12.5px;
  color: var(--tx-3);
  margin-top: 4px;
  font-family: var(--mono);
}

.toc { padding: 0 12px; }
.toc-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tx-3);
  padding: 16px 12px 8px;
}
.toc a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--tx-2);
  font-size: 14px;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover { background: var(--bg-3); color: var(--tx); text-decoration: none; }
.toc a.active { color: var(--acc); border-left-color: var(--acc); background: var(--bg-3); }

.content {
  flex: 1;
  min-width: 0;
  padding: 0 48px 120px;
}
.inner { max-width: var(--maxw); margin: 0 auto; }

/* ---------- mobile nav ---------- */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  align-items: center;
  justify-content: space-between;
}
.mobile-bar .title { font-size: 15px; font-weight: 600; }
.menu-btn {
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--tx);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 44px; border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
  display: block;
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 680;
  margin-bottom: 18px;
}
.lede { font-size: 18.5px; color: var(--tx-2); max-width: 680px; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.chip {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  color: var(--tx-2);
  background: var(--bg-2);
}
.chip strong { color: var(--tx); font-weight: 600; }

/* ---------- typography ---------- */
h2 {
  font-size: 27px;
  letter-spacing: -0.025em;
  font-weight: 660;
  margin: 60px 0 6px;
  padding-top: 12px;
  scroll-margin-top: 80px;
}
h2 .h2num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--acc);
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  font-weight: 500;
}
h3 {
  font-size: 18.5px;
  font-weight: 640;
  letter-spacing: -0.015em;
  margin: 36px 0 10px;
  color: var(--tx);
}
h4 {
  font-size: 15px;
  font-weight: 650;
  margin: 24px 0 8px;
  color: var(--tx);
}
p { margin-bottom: 14px; color: var(--tx-2); }
p strong, li strong { color: var(--tx); font-weight: 620; }
.section-sub { color: var(--tx-3); font-size: 15px; margin-bottom: 22px; }

ul, ol { margin: 0 0 16px 20px; color: var(--tx-2); }
li { margin-bottom: 7px; }

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--acc-2);
}

hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 20px 0 24px;
  background: var(--bg-2);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
th {
  text-align: left;
  padding: 11px 14px;
  background: var(--bg-3);
  color: var(--tx);
  font-weight: 620;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--tx-2);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,0.018); }
td strong { color: var(--tx); }
.num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }

/* ---------- callouts ---------- */
.callout {
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--tx-3);
  background: var(--bg-2);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout .ct {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
}
.callout.good { border-left-color: var(--acc); }
.callout.good .ct { color: var(--acc); }
.callout.warn { border-left-color: var(--warn); }
.callout.warn .ct { color: var(--warn); }
.callout.bad { border-left-color: var(--bad); }
.callout.bad .ct { color: var(--bad); }
.callout.info { border-left-color: var(--acc-2); }
.callout.info .ct { color: var(--acc-2); }

/* ---------- stat grid ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.stat {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 9px;
  padding: 16px;
}
.stat .v {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--acc);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.2;
}
.stat .k {
  font-size: 12.5px;
  color: var(--tx-3);
  margin-top: 5px;
  display: block;
  line-height: 1.4;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 10px;
  padding: 18px;
}
.card h4 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
  display: block;
  margin-bottom: 8px;
}

/* ---------- floor plan ---------- */
.plan {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 12px;
  padding: 22px;
  margin: 22px 0 28px;
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.plan-head h3 { margin: 0; }
.plan-head .badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  color: var(--tx-2);
}
.plan svg { width: 100%; height: auto; display: block; margin: 18px 0 6px; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12.5px;
  color: var(--tx-3);
  font-family: var(--mono);
  margin-top: 10px;
}
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i {
  width: 10px; height: 10px; border-radius: 2px; display: inline-block;
}

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.pros-cons > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--bg);
}
.pros-cons h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 9px;
  font-weight: 600;
}
.pros h5 { color: var(--acc); }
.cons h5 { color: var(--bad); }
.pros-cons ul { margin: 0 0 0 16px; font-size: 14px; }
.pros-cons li { margin-bottom: 5px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding-top: 26px;
  color: var(--tx-3);
  font-size: 13.5px;
}
.footer .mono { font-family: var(--mono); font-size: 12px; }

/* ---------- sources ---------- */
.sources { font-size: 13.5px; }
.sources li { margin-bottom: 6px; word-break: break-word; }

/* ---------- renders ---------- */
.render {
  margin: 22px auto 26px;
  max-width: 600px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
}
.render img,
.render svg {
  display: block;
  width: 100%;
  height: auto;
}
/* the scale drawing is the one image people measure against — let it run wide */
.render.scale { background: var(--bg); max-width: 100%; }
.render figcaption {
  padding: 11px 14px 13px;
  border-top: 1px solid var(--line);
  color: var(--tx-3);
  font-size: 13px;
  line-height: 1.55;
}
.render figcaption strong { color: var(--tx-2); font-weight: 600; }

/* ---------- product photos ---------- */
.parts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 22px 0 26px;
}
.part {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
}
.part .shot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 12px;
  /* product photography is shot on white; give it a light tile so it reads
     as a deliberate swatch instead of a blown-out hole in a dark page */
  background: #f4f6f8;
  border-bottom: 1px solid var(--line);
}
.part .shot img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.part figcaption { padding: 11px 13px 13px; font-size: 12.5px; line-height: 1.5; color: var(--tx-3); }
.part figcaption strong { display: block; color: var(--tx-2); font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.part figcaption .src { display: block; margin-top: 6px; font-size: 11px; color: var(--line-2); }
.parts.wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.parts.wide .shot { height: 190px; }

/* a lone part in an auto-fill grid leaves a dead column; lay it on its side instead */
.parts.solo { grid-template-columns: 1fr; }
.parts.solo .part { display: grid; grid-template-columns: 250px 1fr; align-items: stretch; }
.parts.solo .shot { height: auto; min-height: 180px; border-bottom: 0; border-right: 1px solid var(--line); }
.parts.solo figcaption { padding: 16px 18px; font-size: 13px; align-self: center; }
.parts.solo figcaption strong { font-size: 14px; margin-bottom: 5px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .content { padding: 0 24px 90px; }
}
@media (max-width: 820px) {
  .mobile-bar { display: flex; }
  .layout { display: block; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    width: 270px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99;
  }
  .scrim.open { display: block; }
  .content { padding: 0 18px 80px; }
  .hero { padding: 40px 0 32px; }
  .pros-cons { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .parts.solo .part { grid-template-columns: 1fr; }
  .parts.solo .shot { border-right: 0; border-bottom: 1px solid var(--line); height: 170px; min-height: 0; }
}

.render figcaption .src { display: block; margin-top: 7px; font-size: 11px; color: var(--line-2); }
.render figcaption .src a { color: var(--line-2); text-decoration: underline; }
