/* Tank & Tankless — utility-room editorial.
   Porcelain, petroleum ink, hot-water red, cold-water teal.
   One stylesheet. No fonts, no framework.
   Cache-busting: update ?v= on every page's stylesheet link whenever this file changes. */

:root {
  --porcelain: #eef1ea;
  --panel: #fbfcf7;
  --ink: #14272b;
  --ink-soft: #20383d;
  --body: #3d5257;
  --muted: #5e6f6e;
  --line: #d3d9d0;
  --hot: #b8432a;
  --hot-dark: #8f2f1b;
  --hot-light: #ef9a7e;
  --cold: #2b6771;
  --brass: #8a6a35;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: Corbel, "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-data: Bahnschrift, "Franklin Gothic Medium", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 4.6vw, 3.55rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 1.95rem); margin-top: 2.7rem; }
h3 { font-size: 1.15rem; margin-top: 1.9rem; letter-spacing: -.01em; }

p { margin: 0 0 1.05em; max-width: var(--measure); }
ul, ol { margin: 0 0 1.2em; padding-left: 1.25em; }
li { margin-bottom: .45em; }
main ul { list-style: square; }
main ul li::marker { color: var(--hot); }
main ul, main ol { max-width: var(--measure); }

a { color: var(--cold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hot); }
strong { color: var(--ink); font-weight: 650; }

::selection { background: var(--hot); color: #fff; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 100;
  background: var(--ink); color: var(--panel);
  padding: .65rem 1rem; text-decoration: none;
}

/* ---------- layout ---------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem);
}
main { padding: 3rem 0 3rem; scroll-margin-top: 5.5rem; }
.prose { max-width: 740px; }
.prose h1 { margin-bottom: .9rem; }
.prose h1 + p {
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink);
}

.dek {
  max-width: 50ch;
  margin: 1.2rem 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.7vw, 1.26rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--body);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.35rem);
  line-height: .97;
  letter-spacing: -.03em;
  max-width: 15ch;
  margin-bottom: 0;
}
.hero .dek { max-width: 44ch; margin-bottom: 0; }

.hero-visual {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--hot);
  border-radius: 2px;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.diagram { display: block; width: 100%; height: auto; color: var(--ink); }
.diagram .cold { stroke: var(--cold); }
.diagram .hot { stroke: var(--hot); }
.diagram .muted { stroke: var(--muted); opacity: .5; }
.diagram .dot { fill: var(--hot); stroke: none; }
.diagram .vs {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  fill: var(--hot);
}
.diagram .diagram-label {
  font-family: var(--font-display);
  font-size: 19px;
  fill: var(--ink);
}
.diagram .diagram-sub {
  font-family: var(--font-data);
  font-size: 11px;
  fill: var(--muted);
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
  margin: 2.4rem 0 3rem;
}

.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--hot);
  border-radius: 2px;
  padding: 1.4rem 1.35rem 1.5rem;
  text-decoration: none;
  color: var(--body);
  transition: background .15s ease;
}
.card:nth-child(2) { border-top-color: var(--cold); }
.card:nth-child(3) { border-top-color: var(--brass); }
.card:hover { background: #fff; }
.card .tag {
  display: inline-block;
  font-family: var(--font-data);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--hot);
}
.card:nth-child(2) .tag { color: var(--cold); }
.card:nth-child(3) .tag { color: var(--brass); }
.card h2 {
  font-size: 1.4rem;
  line-height: 1.18;
  letter-spacing: -.015em;
  margin: .35rem 0 .5rem;
}
.card p {
  margin: 0;
  max-width: none;
  font-size: .94rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- tables ---------- */

.table-scroll {
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
}
table.compare { min-width: 780px; }

.table-note {
  max-width: var(--measure);
  margin: 1.5rem 0 .45rem;
  font-family: var(--font-data);
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
}
.table-note + .table-scroll { margin-top: 0; }

th, td {
  text-align: left;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  background: var(--ink);
  color: var(--panel);
  font-family: var(--font-data);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-bottom: 0;
}
tbody th { color: var(--ink); font-weight: 600; }
tbody th, tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
}
tbody th { box-shadow: 1px 0 0 var(--line); }
tbody td:first-child { box-shadow: 1px 0 0 var(--line); }
thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--ink);
}
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

table.compare tbody td + td { border-left: 1px solid var(--line); }
table.compare thead th + th { border-left: 1px solid var(--ink-soft); }

/* ---------- callouts ---------- */

.callout {
  margin: 2rem 0;
  padding: 1.15rem 1.35rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--hot);
  border-radius: 2px;
}
.callout p:last-child { margin-bottom: 0; }
.callout.verdict { border-left-color: var(--cold); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: .35rem;
  padding: .72rem 1.15rem;
  background: var(--hot);
  border: 1px solid var(--hot);
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-data);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--hot-dark); border-color: var(--hot-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--hot); }
.btn.secondary:hover { background: var(--hot); color: #fff; }
.btn:focus-visible { outline-color: var(--brass); }

.disclosure {
  margin: 1.35rem 0;
  padding: .85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.disclosure strong { color: var(--hot-dark); }

.paid-label {
  font-family: var(--font-data);
  font-size: .78rem;
  font-weight: 600;
  color: var(--hot-dark);
}

.buy-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .35rem;
}
.buy-links .btn { margin-top: 0; }

/* ---------- picks ---------- */

.pick {
  margin-top: 2.8rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}
.pick:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.rank {
  margin: 0 0 .35rem;
  font-family: var(--font-data);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--hot);
}

.pick h2 {
  margin: .15rem 0 1.2rem;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  max-width: 30ch;
}
.pick-body {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.8rem);
  align-items: start;
}

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .1rem 1rem;
  margin: 0;
  padding: .9rem 0 0;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
.specs dt {
  font-family: var(--font-data);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.5;
  color: var(--muted);
}
.specs dd {
  margin: 0 0 .45rem;
  color: var(--ink);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.specs dd:last-of-type { margin-bottom: 0; }
.pick-copy p { max-width: 62ch; }
.pick-copy p:last-child { margin-bottom: 0; }

/* ---------- head to head ---------- */

.versus {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15em .4em;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  line-height: 1.02;
}
.versus em {
  font-size: .55em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--hot);
}

.buy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.35rem;
}
.buy-option {
  padding-top: .8rem;
  border-top: 3px solid var(--hot);
}
.buy-option:nth-child(2) { border-top-color: var(--cold); }
.buy-name {
  margin: 0 0 .55rem;
  max-width: none;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--ink);
}
.buy-option .btn { margin-top: 0; }

/* ---------- notes ---------- */

.fine {
  max-width: 70ch;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--muted);
}
main .wrap > .fine {
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.05rem clamp(1.1rem, 4vw, 2.5rem) .9rem;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.site-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cold), var(--brass) 52%, var(--hot));
}

.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--panel);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--hot-light); font-style: italic; font-size: 1.1em; }
.brand:hover { color: #fff; }

.site-head nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-left: auto;
  font-family: var(--font-data);
  font-size: .82rem;
  letter-spacing: .01em;
}
.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
}
.site-head nav a:hover {
  color: var(--panel);
  border-bottom-color: var(--hot-light);
}

/* ---------- footer ---------- */

.site-foot {
  margin-top: 2rem;
  padding: 2.5rem 0 2rem;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .65);
  font-size: .9rem;
}
.site-foot p { max-width: none; }
.site-foot strong {
  color: var(--panel);
  font-family: var(--font-display);
  font-weight: 600;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  margin: .9rem 0;
  font-family: var(--font-data);
  font-size: .82rem;
}
.foot-links a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.foot-links a:hover { color: var(--panel); text-decoration: underline; text-underline-offset: 3px; }
.site-foot .fine { max-width: 70ch; color: rgba(255, 255, 255, .55); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { max-width: 16ch; }
  .hero-visual { max-width: 440px; }
}

@media (max-width: 760px) {
  .pick-body { grid-template-columns: 1fr; gap: 1.4rem; }
  .specs { grid-template-columns: 1fr; gap: 0; }
  .specs dt { margin-top: .55rem; }
  .specs dd { margin-bottom: .2rem; }
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  main { padding: 2.2rem 0 3rem; }
  h1 { font-size: clamp(2rem, 8vw, 2.7rem); }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .dek { font-size: 1.05rem; }
  .cards { grid-template-columns: 1fr; }
  .card:first-child { grid-column: auto; }
  .site-head { position: static; gap: .6rem; padding-top: 1rem; }
  .versus { display: block; }
  .versus em { display: block; font-size: .5em; line-height: 1; margin: .12em 0 .08em; }
  .table-note::after { content: " Scroll sideways for the full table."; font-style: italic; }
  .foot-links { gap: .4rem .8rem; }
  .site-head nav {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: .8rem;
    font-size: .78rem;
  }
  table { min-width: 600px; }
  table.compare { min-width: 700px; }
  .buy-row { grid-template-columns: 1fr; }
  .buy-links .paid-label { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
