/* hvactechnician.us: cool-to-heat palette (teal for cooling, copper for heating), slate ink, gauge-style readouts. */
:root {
  --bg: #f2f5f3; --card: #ffffff; --ink: #14222d; --muted: #4a5a66; --line: #d3dde1; --soft: #e8eff1;
  --cool: #0a5c72; --cool-d: #074657; --cool-t: #e1f0f3; --heat: #a9441a; --heat-t: #fbeae1;
  --ok: #1b6538; --warn: #7a5000; --err: #a1261a; --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
a { color: var(--cool); text-underline-offset: 2px; }
a:hover { color: var(--cool-d); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #f0a35e; outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; top: 8px; }

/* header */
.top { background: var(--ink); color: #fff; }
.top-in { max-width: 1160px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .2px; font-size: 17px; }
.brand:hover { color: #fff; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11.5px; color: #a9c3cc; letter-spacing: .3px; }
.menu { margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; border: 1px solid #4a6170; border-radius: 8px; padding: 5px 12px; font-size: 14px; color: #fff; }
.menu summary::-webkit-details-marker { display: none; }
.menu ul { list-style: none; margin: 0; padding: 8px; position: absolute; right: 0; top: 40px; background: var(--ink); border: 1px solid #33495a; border-radius: 10px; width: 250px; z-index: 5; }
.menu li a { display: block; padding: 8px 10px; color: #e6f1f4; text-decoration: none; border-radius: 6px; font-size: 15px; }
.menu li a:hover, .menu li a[aria-current] { background: #22394a; color: #fff; }
.strip { height: 4px; background: linear-gradient(90deg, #0a5c72, #4f8f9c 45%, #d48a4f 75%, #a9441a); }

/* layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
.crumbs a { color: var(--muted); }
.grid { display: block; }
main { min-width: 0; }
h1 { font-size: 27px; line-height: 1.18; margin: 12px 0 6px; letter-spacing: -.2px; }
.lede { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; }
h2 { font-size: 21px; line-height: 1.25; margin: 30px 0 10px; }
h3 { font-size: 17px; margin: 20px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
.small { font-size: 14px; color: var(--muted); }
.asof { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }

/* tool card */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 16px; position: relative; overflow: hidden; box-shadow: 0 1px 0 rgba(20, 34, 45, .04); }
.tool::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, #0a5c72, #6aa2ad 50%, #c8763f 80%, #a9441a); }
.tool h2 { margin-top: 4px; font-size: 18px; }
.tool2 { margin-top: 18px; }
.f { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 10px; }
.f > div { min-width: 0; }
label, legend { display: block; font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.lab-inline { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 15px; margin: 6px 0; }
.lab-inline input { margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
select, input[type=text], input[type=number] { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #9fb2ba; border-radius: 8px; padding: 9px 10px; min-height: 44px; }
select { background-image: none; }
input[aria-invalid=true] { border-color: var(--err); box-shadow: 0 0 0 2px #f6d5d0; }
.pair { display: flex; gap: 8px; }
.pair > * { flex: 1; min-width: 0; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
button { font: inherit; font-weight: 600; font-size: 15.5px; border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; border: 1px solid var(--cool); background: var(--cool); color: #fff; }
button:hover { background: var(--cool-d); }
button.ghost { background: #fff; color: var(--cool); }
button.ghost:hover { background: var(--cool-t); }
.err { color: var(--err); font-weight: 600; font-size: 14.5px; margin: 6px 0 0; min-height: 0; }
.err:empty { display: none; }
.out { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.out[hidden] { display: none; }
.out-area { font-weight: 700; margin: 0 0 4px; }
.big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big-num { font-size: 38px; font-weight: 800; letter-spacing: -.5px; color: var(--cool-d); font-variant-numeric: tabular-nums; line-height: 1.1; }
.big-unit { color: var(--muted); font-size: 15px; }
.big2 { font-size: 17px; margin: 2px 0 8px; }
.big2 b { font-variant-numeric: tabular-nums; }
.note { background: var(--cool-t); border-left: 4px solid var(--cool); padding: 9px 11px; border-radius: 6px; font-size: 14.5px; margin: 10px 0; }
.warnbox { background: #fff4dc; border-left: 4px solid #c58a10; padding: 9px 11px; border-radius: 6px; font-size: 14.5px; margin: 8px 0; }
.result-type { font-size: 26px; font-weight: 800; color: var(--heat); margin: 2px 0 6px; line-height: 1.2; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); vertical-align: middle; }
.pill.ok { background: #e0f2e7; color: var(--ok); }
.pill.no { background: #f3e8e2; color: #7b3b1c; }

/* range gauge */
.gauge { position: relative; height: 46px; margin: 8px 2px 4px; }
.gauge .track { position: absolute; left: 0; right: 0; top: 16px; height: 10px; border-radius: 6px; background: var(--soft); }
.gauge .band { position: absolute; top: 16px; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #6aa2ad, #0a5c72 50%, #a9441a); }
.gauge .mk { position: absolute; top: 10px; width: 2px; height: 22px; background: var(--ink); }
.gauge .mk span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.gauge .mk.you { background: var(--heat); width: 3px; top: 4px; height: 28px; }
.gauge .mk.you span { top: -2px; left: 7px; transform: none; color: var(--heat); font-weight: 700; }

/* tables */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
caption { text-align: left; font-weight: 700; padding: 10px 10px 6px; font-size: 14.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e5ecee; text-align: left; vertical-align: top; }
thead th { background: #eef4f5; font-size: 13px; color: #33454f; white-space: nowrap; }
tbody tr:nth-child(even) > * { background: #f7fafa; }
.tool details { margin: 0 0 12px; padding: 8px 10px; background: var(--soft); border-radius: 8px; }
.tool details summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
td.n, th.n { text-align: right; white-space: nowrap; }
.pct td, .pct th { padding: 6px 8px; }
th button.sort { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; padding: 0; min-height: 0; cursor: pointer; text-decoration: underline dotted; }
th button.sort:hover { background: none; color: var(--cool); }
th[aria-sort=ascending] button.sort::after { content: " \25B2"; font-size: 10px; }
th[aria-sort=descending] button.sort::after { content: " \25BC"; font-size: 10px; }
tr.hl > * { background: #fff3ea !important; }
.quote { margin: 0; font-style: italic; }
blockquote { margin: 10px 0 14px; padding: 8px 12px; border-left: 4px solid var(--heat); background: var(--heat-t); border-radius: 0 6px 6px 0; }
blockquote p { margin: 0 0 4px; }
blockquote cite { font-size: 13px; font-style: normal; color: var(--muted); }
.filter { max-width: 340px; }

/* faq, sources */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 11px 0; }
.faq details p { margin-top: 0; }
.sources ol { padding-left: 20px; font-size: 14.5px; }
.sources li { margin-bottom: 6px; }
.cards { display: grid; gap: 10px; grid-template-columns: 1fr; padding: 0; list-style: none; }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.cards a { font-weight: 700; }

/* ad slots: space reserved so ads cause no layout shift */
.ad-slot { margin: 16px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-top { min-height: 60px; }
.ad-in { min-height: 260px; }
.ad-side { min-height: 260px; }
.ad-bottom { min-height: 310px; }

/* footer */
footer { background: var(--ink); color: #c9d8de; margin-top: 30px; }
.foot { max-width: 1160px; margin: 0 auto; padding: 18px 16px 26px; font-size: 14px; }
.foot a { color: #e3f0f4; }
.foot ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }

@media (min-width: 500px) {
  .ad-bottom { min-height: 70px; }
  .f.two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  h1 { font-size: 34px; }
  .ad-top { min-height: 100px; }
  .tool { padding: 18px 20px 20px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .f.three { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
  aside.side { position: sticky; top: 12px; margin-top: 64px; }
}
@media print { .ad-slot, .menu, footer { display: none; } }
