/* DoorCount public site — white, navy #1B2A4A, steel-blue accent #4A7A9B */
:root {
  --navy: #1B2A4A;
  --steel: #4A7A9B;
  --white: #ffffff;
  --paper: #f5f6f8;
  --rule: #d7dce3;
  --ink: #1B2A4A;
  --muted: #5a6270;
  --max: 70rem;
  --prose: 40.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--steel);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--navy); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

h1, h2, h3, .wordmark {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.65rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.25rem 0 0.4rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: 0 0 0.35rem; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.topbar {
  height: 4px;
  background: var(--steel);
}

header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.brand svg { display: block; }

.wordmark {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

nav.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

nav.primary a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

nav.primary a:hover { color: var(--steel); }

main { display: block; }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 840px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .nav-wrap { flex-direction: column; align-items: flex-start; }
  nav.primary { justify-content: flex-start; }
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 0.6rem;
}

.lede {
  font-size: 1.15rem;
  max-width: 38rem;
  color: var(--navy);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 1.5rem 0 0;
}

.facts div {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--rule);
}
.facts div:last-child { border-right: 0; }

@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; }
  .facts div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .facts div:last-child { border-bottom: 0; }
}

.facts strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
}
.facts span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

.price-card {
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem 1.4rem 1.35rem;
}

.price-card h2 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.price-card .amount {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  margin: 0.4rem 0 0.15rem;
}

.price-card .amount small {
  font-size: 1rem;
  font-weight: 600;
  margin-left: 0.15rem;
}

.price-card p { color: #d9dee6; margin-bottom: 0.65rem; }
.price-card p:last-child { margin-bottom: 0; }

.price-card .note {
  font-size: 0.9rem;
  border-top: 1px solid #33415e;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  color: #c5ccd8;
}

section.band {
  padding: 2.75rem 1.25rem;
}

section.band.alt { background: var(--paper); }
section.band.navy {
  background: var(--navy);
  color: var(--white);
}
section.band.navy h2,
section.band.navy h3 { color: var(--white); }
section.band.navy p,
section.band.navy li { color: #d5dbe4; }
section.band.navy a { color: #b7d0e0; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.prose { max-width: var(--prose); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
}

.panel {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 1.25rem 1.3rem 1.1rem;
}

.panel h3 { margin-top: 0; }

.ok { border-left: 4px solid var(--steel); }
.not { border-left: 4px solid var(--navy); }

table.lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.lines th,
table.lines td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

table.lines th {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

table.lines td.line {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--navy);
  width: 4.5rem;
  white-space: nowrap;
}

.tabs {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding: 0;
}
.tabs li {
  break-inside: avoid;
  margin: 0 0 0.45rem;
  padding-left: 0;
}
.tabs code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  font-weight: 700;
  color: var(--navy);
}

@media (max-width: 640px) {
  .tabs { columns: 1; }
}

dl.faq dt {
  font-weight: 700;
  color: var(--navy);
  margin: 1.1rem 0 0.25rem;
}
dl.faq dt:first-child { margin-top: 0; }
dl.faq dd {
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.contact-box {
  border: 1px solid var(--navy);
  padding: 1.25rem 1.35rem;
  background: var(--white);
}

.email {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.contact-box .email { font-size: 1.2rem; }

footer.site {
  border-top: 4px solid var(--navy);
  padding: 1.75rem 1.25rem 2.25rem;
  background: var(--white);
  font-size: 0.92rem;
}

footer.site .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

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

footer.site .legal {
  color: var(--muted);
  max-width: 36rem;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

footer.site nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
footer.site nav a:hover { color: var(--steel); }

/* Calculator */
form.calc {
  display: grid;
  gap: 1.25rem;
}

fieldset {
  border: 1px solid var(--rule);
  background: var(--white);
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
}

legend {
  font-weight: 700;
  color: var(--navy);
  padding: 0 0.4rem;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

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

.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field.span2 { grid-column: 1 / -1; }

label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

input[type="number"],
select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid #b7bec8;
  background: var(--white);
  color: var(--navy);
  width: 100%;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

button {
  font: inherit;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  padding: 0.65rem 1.1rem;
}

button.primary {
  background: var(--navy);
  color: var(--white);
}
button.primary:hover { background: #24365c; }

button.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.results {
  border: 1px solid var(--navy);
  padding: 1.2rem 1.3rem;
  background: var(--white);
  display: none;
}
.results.show { display: block; }

.results .coc {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.4rem;
  color: var(--navy);
  margin: 0.2rem 0 0.4rem;
}

.results .neg { color: #8b1e2d; }

.statgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1.25rem;
  margin: 1rem 0;
}
.statgrid div span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}
.statgrid div strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
}

.formula {
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
}

.cta-follow {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

small.fine { color: var(--muted); font-size: 0.85rem; }

@media print {
  header.site { position: static; }
  nav.primary, .topbar { display: none; }
  a { color: var(--navy); }
  .price-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

a.btn {
  display: inline-block;
  margin: 0.75rem 0 0.5rem;
  padding: 0.7rem 1.1rem;
  background: #4A7A9B;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 2px;
}
a.btn:hover { background: #1B2A4A; color: #ffffff; }
.price-card a.btn { background: #ffffff; color: #1B2A4A; }
.price-card a.btn:hover { background: #4A7A9B; color: #ffffff; }
