/* CremationCostGuide.com
   Editorial design system. No frameworks, no webfonts, no external calls.
   Type: serif display (Georgia stack) for headlines, system sans for body
   and data. Palette: pale stone paper, near-black ink, slate accent.
   MOBILE FIRST: base styles below are the phone layout at about 360px.
   Wider layouts are layered on with min-width queries at the end.
   See STYLE_GUIDE.md at the experiment root. */

:root {
  --paper: #f5f5f0;
  --paper-deep: #ebeae2;
  --ink: #232527;
  --ink-soft: #45484a;
  --muted: #76746c;
  --line: #d9d7cb;
  --line-strong: #b3b0a1;
  --accent: #3d5a73;        /* slate */
  --accent-deep: #2c4257;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 72rem;
  --measure: 42rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(rgba(35, 37, 39, 0.03) 1px, transparent 1.1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;   /* 17px at default settings; never below 16px */
  line-height: 1.6;
  overflow-x: clip;
}

/* ---------- Masthead (phone first) ---------- */
.masthead {
  border-bottom: 3px double var(--ink);
  background: var(--paper);
}
.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1rem 0.4rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  padding: 0.3rem 0;
}
.wordmark em { font-style: italic; color: var(--accent); }
.masthead nav {
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.3rem;
}
.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;       /* tap target */
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.masthead nav a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }
.dateline {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  flex-wrap: wrap;
}

/* ---------- Layout (phone first) ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}
article { max-width: var(--measure); }
article.wide { max-width: 100%; }
.kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
}
h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 2.2rem 0 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: none; padding-top: 0; }
h3 { font-family: var(--serif); font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 40rem;
  margin-bottom: 1.3rem;
}
a { color: var(--accent-deep); }
strong { color: var(--ink); }
ul, ol { max-width: var(--measure); padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
.byline {
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  margin: 1.1rem 0 1.4rem;
  max-width: var(--measure);
}

/* ---------- Key figures: stacked on the phone ---------- */
.keyfig {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 1.4rem 0;
}
.keyfig div { background: #fff; padding: 0.9rem 1rem; }
.keyfig .n {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}
.keyfig .l { font-size: 0.88rem; color: var(--muted); display: block; margin-top: 0.3rem; }

/* ---------- Tables ----------
   Default: the table sits in a horizontally scrolling wrapper, so the page
   itself never scrolls sideways. Tables classed "stack" go further on
   narrow screens: each row becomes a card with labeled fields (see the
   max-width block below). */
.tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.1rem 0 0.4rem;
}
table.prices {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
table.prices caption {
  text-align: left;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0 0 0.5rem;
}
table.prices th {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
}
table.prices td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  vertical-align: top;
}
table.prices tbody tr:nth-child(even) td { background: var(--paper); }
table.prices td.num, table.prices th.num { text-align: right; }
table.prices td.rate { font-weight: 700; }
table.prices .src { font-size: 0.88rem; color: var(--muted); }
.tablesource { font-size: 0.88rem; color: var(--muted); margin: 0.3rem 0 1.4rem; max-width: none; }

/* ---------- Notes, verdict ---------- */
.rule-note {
  border: 1px solid var(--line-strong);
  background: var(--paper-deep);
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.rule-note p { margin: 0; }
.verdict {
  border-left: 4px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.verdict p { font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; margin: 0; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 3px double var(--ink);
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.3rem 1rem 2.2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
footer.site p { max-width: none; }
footer.site .fineprint { color: var(--muted); font-size: 0.85rem; }
.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1.6rem;
  border: 1px solid var(--line);
}
.photocredit { font-size: 0.85rem; color: var(--muted); }

/* ---------- Site family (footer) ---------- */
.family { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1rem; }
.family-head { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }
.family ul { list-style: none; margin: 0; padding: 0; }
.family li { margin: 0.35rem 0; }
.family a { font-weight: 600; }

/* ---------- Stacked price tables on narrow screens ----------
   Each row becomes a card: the provider name as the card heading, then one
   labeled line per field. Labels come from data-label attributes in the
   HTML, so the markup must carry them on every cell. */
@media (max-width: 640px) {
  table.prices.stack { background: transparent; }
  table.prices.stack thead { display: none; }
  table.prices.stack tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    margin-bottom: 0.9rem;
  }
  table.prices.stack tbody tr:nth-child(even) td { background: transparent; }
  table.prices.stack td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    text-align: right;
  }
  table.prices.stack td:last-child { border-bottom: none; }
  table.prices.stack td::before {
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    flex: 0 0 auto;
  }
  table.prices.stack td.head {
    display: block;
    text-align: left;
    font-family: var(--serif);
    font-size: 1.08rem;
    font-weight: 700;
    border-bottom: 2px solid var(--ink);
  }
  table.prices.stack td.head::before { content: none; }
  table.prices.stack td.num { text-align: right; }
}

/* ---------- Tablet and up (about 768px) ---------- */
@media (min-width: 700px) {
  main { padding: 2.2rem 1.25rem 3rem; }
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.6rem; }
  .lede { font-size: 1.28rem; }
  .masthead-inner {
    padding: 1.1rem 1.25rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 2rem;
  }
  .wordmark { font-size: 1.9rem; margin-right: auto; }
  .masthead nav { gap: 0 1.4rem; }
  .masthead nav a { margin-left: 0.2rem; }
  .dateline { padding: 0.35rem 1.25rem; }
  .keyfig { flex-direction: row; flex-wrap: wrap; }
  .keyfig div { flex: 1 1 10rem; padding: 1rem 1.1rem; }
  .keyfig .n { font-size: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1.4rem 1.25rem 2.4rem; }
  .verdict { padding-left: 1.1rem; }
  .verdict p { font-size: 1.15rem; }
}

/* ---------- Claim form (claim.html) ---------- */
.claim-form { max-width: var(--measure); margin: 1.5rem 0 2rem; }
.claim-form .field { margin-bottom: 1.15rem; }
.claim-form label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.claim-form input[type="text"],
.claim-form input[type="email"],
.claim-form input[type="tel"],
.claim-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
}
.claim-form textarea { min-height: 7rem; line-height: 1.5; }
.claim-form input:focus,
.claim-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.claim-form .hint { font-size: 0.85rem; color: var(--muted); margin: 0.35rem 0 0; }
.claim-form .field.check { display: flex; gap: 0.6rem; align-items: flex-start; }
.claim-form .field.check input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.claim-form .field.check label { font-weight: 400; margin: 0; }
.claim-form button {
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  min-height: 44px;
  border: 1px solid var(--accent-deep);
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.claim-form button:hover { background: var(--accent-deep); }
.claim-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* QA fix 2026-11-26: keep checked dates on one line */
td[data-label="Checked"] { white-space: nowrap; }

/* ---------- Market picker cards (homepage, added 2026-11-26) ---------- */
.markets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 1.4rem 0 0.6rem;
}
@media (min-width: 700px) {
  .markets { grid-template-columns: 1fr 1fr; }
}
.market-card {
  background: #fff;
  padding: 1.15rem 1.25rem 1.05rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.market-card:hover { background: var(--paper-deep); }
.market-card .mname {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  display: block;
}
.market-card .mfig {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--accent-deep);
  display: block;
  margin-top: 0.45rem;
}
.market-card .mlabel { font-size: 0.88rem; color: var(--ink-soft); display: block; margin-top: 0.3rem; }
.market-card .mgo { font-size: 0.85rem; font-weight: 600; color: var(--accent-deep); display: block; margin-top: 0.55rem; }

