:root {
  color-scheme: light;
  --paper: #f8f8f8;
  --white: #fff;
  --ink: #171717;
  --muted: #565656;
  --line: #cdcdcd;
  --display: Georgia, 'Times New Roman', serif;
  font: 16px/1.48 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.shell { width: min(calc(100% - 72px), 1360px); margin-inline: auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--ink); }
.masthead nav { display: flex; align-items: center; gap: 20px; font-size: .85rem; }
.site-name { text-decoration: none; font-weight: 720; }
.pdf-link { padding: 7px 11px; border: 1px solid var(--ink); text-decoration: none; font-weight: 650; }
.pdf-link:hover { color: var(--white); background: var(--ink); }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 18px 36px; padding-block: 34px 29px; }
h1 { font: 400 clamp(2.45rem, 6.05vw, 5.4rem)/1 var(--display); letter-spacing: -.05em; }
.intro p { margin-top: 12px; color: var(--muted); max-width: 50ch; }
.site-measures { display: flex; gap: 18px; flex-shrink: 0; }
.site-measures div { border-left: 1px solid var(--line); padding-left: 11px; }
.site-measures dt { font-size: .72rem; color: var(--muted); }
.site-measures dd { font: 1.25rem/1.25 var(--display); margin-top: 4px; }

.plan-switch { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 14px; }
.plan-switch button { display: grid; align-content: start; gap: 2px; padding: 11px 12px; border: 0; text-align: left; background: var(--white); }
.plan-switch button:hover { background: #ebebeb; }
.plan-switch strong { font-weight: 700; font-size: .9rem; }
.plan-switch small { color: var(--muted); font-size: .73rem; }
.plan-switch button[aria-pressed="true"], .view-switch button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.plan-switch button[aria-pressed="true"] small { color: #dfdfdf; }
.plan-switch button:focus-visible { outline-offset: -4px; }

.workspace { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(265px, 1fr); align-items: start; gap: 14px; }
.drawing, .side { border: 1px solid var(--line); background: var(--white); min-width: 0; }
.drawing-header { display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; padding: 12px 14px; }
h2 { font: 1.43rem/1.14 var(--display); }
.view-switch { display: flex; gap: 3px; }
.view-switch button { border: 1px solid transparent; background: var(--white); padding: 5px 8px; font-size: .8rem; font-weight: 700; }
.view-switch button:hover { border-color: var(--ink); }
figure img { display: block; width: 100%; height: auto; background: #ececec; }
figcaption, .night-control { padding: 9px 14px; font-size: .8rem; color: var(--muted); }
.night-control { border-top: 1px solid var(--line); }
.night-control label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.night-control input { accent-color: var(--ink); }

.side { padding: 15px; }
.side h2 + p { margin-top: 9px; font-size: .85rem; color: var(--muted); }
.totals, .specs { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 10px; }
.totals { margin-top: 15px; border-block: 1px solid var(--line); padding-block: 10px; font-size: .8rem; }
.totals strong { font: 1.6rem/1.08 var(--display); white-space: nowrap; }
.totals :is(strong,b), .specs dd { text-align: right; }
.specs { margin-top: 12px; font-size: .82rem; }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 680; }
details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; font-size: .85rem; font-weight: 680; }
.materials-list { padding: 0; margin: 5px 0 0; list-style: none; }
.materials-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 8px; border-bottom: 1px solid var(--line); padding-block: 7px; font-size: .77rem; }
.materials-list small { grid-column: 1 / -1; color: var(--muted); font-size: .72rem; }
.small { margin-top: 12px; color: var(--muted); font-size: .75rem; }

.comparison { border-top: 1px solid var(--ink); margin-block: 35px 45px; padding-top: 18px; scroll-margin-top: 14px; }
.comparison h2 { font-size: 2rem; margin-bottom: 11px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; text-align: left; width: 100%; min-width: 650px; font-size: .83rem; font-variant-numeric: tabular-nums; background: var(--white); }
th, td { padding: 9px 11px; border-bottom: 1px solid var(--line); }
td { white-space: nowrap; }
table button { border: 0; background: none; text-decoration: underline; text-underline-offset: .18em; padding: 0; text-align: left; }

@media (max-width: 820px) {
  .shell { width: calc(100% - 30px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .side { width: 100%; }
}
@media (max-width: 620px) {
  .masthead { flex-wrap: wrap; padding-block: 8px; }
  .masthead nav { gap: 11px; }
  .intro { flex-wrap: wrap; padding-block: 24px 20px; }
  .plan-switch { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .plan-switch button { grid-column: span 2; padding-inline: 8px; }
  .plan-switch button:nth-last-child(-n + 2) { grid-column: span 3; }
  .plan-switch strong { font-size: .78rem; }
  .site-measures { gap: 12px; }
}
@media (max-width: 370px) {
  .masthead nav { margin-left: auto; }
}
