/* Gutter Cleaning Cost in Nashville — one-page editorial guide
   Composition: full-width "lead band" per section (heading + intro share the
   wide container with the component beneath it), serif reading column,
   ruled ledger tables. No JavaScript. */

:root {
  --paper: #fcfaf6;
  --band: #f0ece2;
  --card: #ffffff;
  --ink: #1b1f1d;
  --ink-2: #4f5750;
  --rule: #d8d2c4;
  --rule-strong: #1b1f1d;
  --accent: #0f5647;
  --accent-2: #8a5312;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 1.25rem;
  --wide: 1120px;
  --read: 68ch;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #0b4136; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.shell {
  width: min(100% - (2 * var(--gutter)), var(--wide));
  margin-inline: auto;
}

/* ---------- Masthead ---------- */

.masthead {
  background: linear-gradient(180deg, #f7f3ea 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2rem, 7vw, 3.75rem) 0 clamp(1.75rem, 5vw, 2.75rem);
}

h1 {
  font-size: clamp(1.75rem, 5.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  max-width: 20ch;
  text-wrap: balance;
}

.answer {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--accent);
  border-radius: 3px;
  padding: clamp(1.1rem, 3.5vw, 1.75rem) clamp(1.1rem, 3.5vw, 2rem);
  box-shadow: 0 1px 0 rgba(27, 31, 29, 0.05);
}

.answer p {
  font-size: clamp(1.125rem, 2.4vw, 1.4rem);
  line-height: 1.5;
  max-width: 46ch;
  margin: 0;
}

.range {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.12em;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.range--alt {
  font-size: 1em;
  color: var(--accent-2);
}

.reviewed {
  margin: 1.1rem 0 0;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- Section leads ---------- */

.sec { padding-top: clamp(2.25rem, 6vw, 4rem); }

.lead {
  background: var(--band);
  border-top: 3px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.1rem, 3vw, 1.6rem) var(--gutter) clamp(1.1rem, 3vw, 1.5rem);
  margin-inline: calc(-1 * var(--gutter));
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.lead h2 {
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

.lead-text {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-2);
}

/* ---------- Tables ---------- */

.scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--card);
}

.t {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.t--areas { min-width: 46rem; }
.t--co { min-width: 56rem; }

.t--areas thead th:nth-child(1) { width: 31%; }
.t--areas thead th:nth-child(2) { width: 16%; }
.t--areas thead th:nth-child(3) { width: 17%; }
.t--areas thead th:nth-child(4) { width: 36%; }

.t--co thead th:nth-child(1) { width: 20%; }
.t--co thead th:nth-child(2) { width: 21%; }
.t--co thead th:nth-child(3) { width: 29%; }
.t--co thead th:nth-child(4) { width: 30%; }

.t thead th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: left;
  vertical-align: bottom;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--rule-strong);
  background: #faf7f1;
}

.t tbody th,
.t td {
  padding: 1.05rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-weight: 400;
}

.t tbody tr:last-child th,
.t tbody tr:last-child td { border-bottom: 0; }

.t tbody th[scope="row"] { color: var(--ink); }

.place {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.t .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.t--co .num { white-space: normal; min-width: 11rem; }

.t .price {
  font-weight: 700;
  color: var(--ink);
}

.t--areas tbody .price { background: #f4f8f5; }

.t--co tbody th[scope="row"] {
  font-size: 1.0625rem;
  font-weight: 600;
}

.t--co tbody th[scope="row"] a { text-decoration: underline; }

/* Primary tables become complete labeled records on phones. The semantic
   table remains intact in the HTML, but no field is pushed off-screen. */
@media (max-width: 47.999rem) {
  .scroller {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .t--areas,
  .t--co {
    min-width: 0;
  }

  .t thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .t,
  .t tbody,
  .t tr,
  .t tbody th,
  .t td {
    display: block;
    width: 100%;
  }

  .t tbody {
    display: grid;
    gap: 1rem;
  }

  .t tbody tr {
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: var(--card);
  }

  .t tbody th,
  .t td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--rule);
  }

  .t tbody tr:last-child th,
  .t tbody tr:last-child td {
    border-bottom: 1px solid var(--rule);
  }

  .t tbody tr > :last-child {
    border-bottom: 0;
  }

  .t tbody th::before,
  .t td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .t .num,
  .t--co .num {
    min-width: 0;
    text-align: left;
    white-space: normal;
  }

  .t--areas tbody .price {
    background: #f4f8f5;
  }
}

/* ---------- Trailing prose in wide sections ---------- */

.trail,
.prose {
  max-width: var(--read);
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
}

.prose--keyed p {
  border-left: 2px solid var(--rule);
  padding-left: 1.1rem;
  margin-bottom: 1.4em;
}

.prose--keyed p:last-child { margin-bottom: 0; }

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

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.checks li {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1rem 1.1rem 1rem 2.6rem;
  position: relative;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 1.55rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ---------- Numbered steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  max-width: 78ch;
  display: grid;
  gap: 0.5rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 0 0.85rem 3.4rem;
  border-bottom: 1px solid var(--rule);
}

.steps li:last-child { border-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--card);
}

/* ---------- Footer ---------- */

.foot {
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
  border-top: 3px solid var(--rule-strong);
  background: var(--band);
  padding: clamp(1.5rem, 4vw, 2.25rem) 0;
}

.foot p {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 78ch;
  margin: 0;
}

/* ---------- 404 ---------- */

.notfound {
  padding: clamp(3rem, 12vw, 7rem) 0;
}

.notfound h1 { max-width: 24ch; }

/* ---------- Wider screens ---------- */

@media (min-width: 48rem) {
  body { font-size: 1.125rem; }

  .answer p { max-width: 52ch; }

  .lead {
    display: grid;
    grid-template-columns: minmax(14rem, 22rem) 1fr;
    column-gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
  }

  .lead h2 { margin-bottom: 0; }

  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .steps li { padding-left: 3.9rem; }
}

@media (min-width: 64rem) {
  :root { --gutter: 2rem; }

  .masthead .shell {
    display: grid;
    grid-template-columns: minmax(19rem, 29rem) 1fr;
    column-gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }

  h1 { margin-bottom: 0; max-width: 16ch; }

  .answer p { max-width: 58ch; font-size: 1.375rem; }

  .reviewed {
    grid-column: 1 / -1;
    margin-top: 1.75rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rule);
  }

  .t { font-size: 1rem; }

  .t thead th,
  .t tbody th,
  .t td { padding: 1.15rem 1.35rem; }

  .lead { padding-block: 1.75rem; }

  .lead-text { font-size: 1.0625rem; }
}

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