/* sm-guide.css: the guide pages and the guides index (design-lead, 2026-11-18; round 2, 2026-11-19). Loaded only on
   <body class="sm-page guide">. Built by build-guide.js; every class is prefixed sg- (site guide).

   Dan, 2026-11-19: "The Guides page and pages should clearly separate themselves from the rest of the site. They are
   essentially special reports... Use an earlier site's /guide/ with this site's colors."
   So this is an earlier site's guide, treatment F "Plan sheet" (its css/deck-pages.css, the .pg-guide rules), carried
   over rule for rule: the same layout, proportions, paddings, rule weights and type scale. What changed is only:
     - its near-black (rules, table head, close) is this site's brand violet; its pale gray (list head) the pale lavender gray
     - its orange squares and arrows are the accent teal (--accent: cyan is a button or background only on this site);
       its orange price text is --accent-text (AA on white)
     - its graded black close is a subtle brand violet gradation (a lighter brand violet behind the button, deeper at the foot)
     - the site's heading font for its Bricolage headings, its body font for its Instrument Sans body; the site's own pill button and FAQ
   What sets the report apart from the rest of the site, here as there: a drawing grid behind the page, square corners,
   and every part ruled off in its own cell, where the rest of the site is soft, rounded and unruled.
   Tokens from sm-site.css :root only, never a raw hex. Headings carry no max-width (REWRITE-STANDARD 7 and 13.3): the earlier
   site narrows its H1s to 13ch and 22ch; here they use their column. */

.sm-page.guide {
  --sg-rule: var(--brand);                                              /* an earlier site's black rules */
  --sg-grid: color-mix(in srgb, var(--brand) 6%, var(--card));          /* the drawing grid, faint */
  --sg-glow: color-mix(in srgb, var(--brand) 85%, var(--brand-soft));   /* the close's lighter brand violet */
}
.sm-page.guide .sg-page { background-color: var(--card);
  background-image: linear-gradient(var(--sg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--sg-grid) 1px, transparent 1px);
  background-size: 24px 24px; padding: 56px 0 88px; }
.sm-page.guide .sg-page figure { margin: 0; }
/* a block's last words, held together by build-guide.js (holdTails) so no line ends on one or two words: an inline-block
   moves to the next line whole, and wraps inside itself only where it could not fit a whole line (round 4, 2026-11-19) */
.sm-page.guide .sg-tail { display: inline-block; }
/* a close heading's tail that only fits beside the button on a desktop is held there and wraps freely on a phone */
@media (max-width: 900px) { .sm-page.guide .sg-tail.wide { display: inline; } }
.sm-page.guide .sg-page :is(.sg-cell, .sg-quick) :is(p, td, .sg-ticks li, .sg-list li) a:not(.button) { color: var(--link); font-weight: 700; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- the title block: H1 and dek, the Quick Answer ruled off under them, the photo filling the cell beside both ---------- */
.sm-page.guide .sg-block { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; border: 2px solid var(--sg-rule); background: var(--card); }
.sm-page.guide .sg-title { padding: 44px 44px 40px; border-right: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-title h1 { font-size: var(--h1-inner); }
.sm-page.guide .sg-page p.sg-dek { margin-top: 20px; font-size: 19px; color: var(--muted);  }
.sm-page.guide .sg-photo { grid-row: 1 / 3; grid-column: 2; min-height: 520px; }
/* NAMED EXCEPTION to the photo slot standard (DESIGN-DIRECTION.md "Photo slot sizes"): beside the title block the photo
   fills its cell, whatever height the H1, dek and Quick Answer give it (about 1:1.45 to 1.15:1); 4:3 once it stacks */
.sm-page.guide .sg-photo img { width: 100%; height: 100%; object-fit: cover; }
.sm-page.guide .sg-quick { padding: 32px 44px; border-right: 1.5px solid var(--sg-rule); border-top: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-quick h2 { font-size: 19px; margin-bottom: 10px; }
.sm-page.guide .sg-quick p { font-size: 18px; line-height: 1.6; }
.sm-page.guide .sg-block.no-photo { grid-template-columns: 1fr; }
.sm-page.guide .sg-block.no-photo .sg-title { border-right: 0; }

/* ---------- the rows: each its own ruled frame, the heading in the left cell and its words in the right ---------- */
.sm-page.guide .sg-row { display: grid; grid-template-columns: 420px minmax(0, 1fr); border: 2px solid var(--sg-rule); border-top: 0; background: var(--card); }
.sm-page.guide .sg-block + .sg-row { margin-top: 40px; border-top: 2px solid var(--sg-rule); }
.sm-page.guide .sg-row > h2 { padding: 36px 32px; border-right: 1.5px solid var(--sg-rule); font-size: 26px; }
.sm-page.guide .sg-row.no-head { grid-template-columns: minmax(0, 1fr); }
.sm-page.guide .sg-cell { padding: 36px 44px 40px; max-width: 860px; min-width: 0; }
.sm-page.guide .sg-cell > * + * { margin-top: 14px; }
.sm-page.guide .sg-cell > h3 { margin-top: 26px; font-size: 20px; }
.sm-page.guide .sg-cell strong { font-weight: 800; color: var(--brand); }

/* the price table: a schedule, every cell ruled, a brand violet head row, prices in the accent teal */
.sm-page.guide .sg-cell > * + .sg-table { margin-top: 26px; }
.sm-page.guide .sg-cell > .sg-table { overflow-x: auto; }
.sm-page.guide .sg-table table { width: 100%; border-collapse: collapse; border: 1.5px solid var(--sg-rule); font-size: 16px; }
.sm-page.guide .sg-table th, .sm-page.guide .sg-table td { border: 1px solid var(--sg-rule); padding: 13px 16px; text-align: left; vertical-align: top; }
.sm-page.guide .sg-table thead th { background: var(--sg-rule); color: var(--on-brand); font-weight: 700; font-size: 14px; line-height: 1.4; }
.sm-page.guide .sg-table tbody th { font: 600 17px/1.3 var(--head); color: var(--brand); }
.sm-page.guide .sg-cost { font-weight: 800; white-space: nowrap; color: var(--accent-text); }

/* the boxed list: ruled, a stone head row, two columns, square accent markers */
.sm-page.guide .sg-cell > * + .sg-list { margin-top: 26px; }
.sm-page.guide .sg-list { border: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-list h3 { font-size: 19px; padding: 12px 18px; border-bottom: 1.5px solid var(--sg-rule); background: var(--alt); }
.sm-page.guide .sg-list ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
.sm-page.guide .sg-list li { padding: 14px 18px 14px 44px; position: relative; font-size: 18px; line-height: 1.4; border-bottom: 1px solid var(--sg-rule);  }
.sm-page.guide .sg-list li:nth-child(odd) { border-right: 1px solid var(--sg-rule); }
.sm-page.guide .sg-list li:nth-last-child(-n+2):nth-child(odd), .sm-page.guide .sg-list li:last-child { border-bottom: 0; }
/* an odd last item takes the whole row rather than half of it beside an empty cell, so it runs on one line where it fits
   (round 4: "It has no wiring or plumbing, so no light or fan overhead" needs 463 px and was wrapped in a 318 px half) */
.sm-page.guide .sg-list li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.sm-page.guide .sg-list li::before { content: ""; position: absolute; left: 18px; top: 17px; width: 13px; height: 13px; background: var(--accent); }
.sm-page.guide ul.sg-ticks { list-style: none; padding: 0; margin-bottom: 0; }
.sm-page.guide ul.sg-ticks li { position: relative; padding-left: 26px; }
.sm-page.guide ul.sg-ticks li + li { margin-top: 10px; }
.sm-page.guide ul.sg-ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; background: var(--accent); }

/* photos in a row: a thin ruled frame, square corners */
.sm-page.guide .sg-cell > * + .sg-fig { margin-top: 26px; }
.sm-page.guide .sg-fig { border: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-fig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* the FAQ cell holds the site's own FAQ component (sm-site.css .faq); the row keeps the ruling around it */
.sm-page.guide .sg-faq .sg-cell { max-width: none; }
.sm-page.guide .sg-faq .faq details:last-child { margin-bottom: 0; }

/* ---------- Read Next: the heading centered in its cell, the links ruled beside it (one to three in a row, four as 2 x 2) ---------- */
.sm-page.guide .sg-next > h2 { padding: 28px 32px; font-size: 20px; align-self: stretch; display: flex; align-items: center; }
.sm-page.guide .sg-next ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-page.guide .sg-next ul.n1 { grid-template-columns: minmax(0, 1fr); }
.sm-page.guide .sg-next ul:is(.n2, .n4) { grid-template-columns: 1fr 1fr; }
.sm-page.guide .sg-next li { margin: 0; }
.sm-page.guide .sg-next li + li { border-left: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-next ul.n4 li:nth-child(3) { border-left: 0; }
.sm-page.guide .sg-next ul:is(.n2, .n4) li:nth-child(n+3), .sm-page.guide .sg-next ul:not(.n1, .n2, .n4) li:nth-child(n+4) { border-top: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-next a { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 100%; padding: 28px 32px;
  text-decoration: none; color: var(--brand); font: 600 20px/1.3 var(--head); }
.sm-page.guide .sg-next b { font-weight: 600; }
.sm-page.guide .sg-next a:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sm-page.guide .sg-arrow { flex: none; color: var(--accent); font: 700 24px/1 var(--body); }

/* ---------- the close: the site's one closing bar (sm-site.css, Dan 2026-11-30), full width under the report, never inside
   its ruled frame; the guide menu follows it on the drawing grid (.sg-foot) ---------- */
.sm-page.guide .sg-page.sg-foot { padding: 64px 0 112px; }
.sm-page.guide .sg-foot .gp-menu { margin: 0 auto; }
@media (max-width: 699px) { .sm-page.guide .sg-page.sg-foot { padding: 52px 0 72px; } }

/* ---------- the guides index: one row, each guide a ruled entry with its framed card photo ---------- */
.sm-page.guide .sg-index .sg-cell { max-width: none; padding-top: 16px; padding-bottom: 16px; }
.sm-page.guide .sg-guides { list-style: none; margin: 0; padding: 0; }
.sm-page.guide .sg-guides li { margin: 0; }
.sm-page.guide .sg-guides li + li { border-top: 1px solid var(--sg-rule); }
.sm-page.guide .sg-guide { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px 0;
  text-decoration: none; color: inherit; }
.sm-page.guide .sg-page a.sg-guide { color: inherit; text-decoration: none; }
.sm-page.guide .sg-guide img { width: 180px; height: 120px; object-fit: cover; border: 1.5px solid var(--sg-rule); }
.sm-page.guide .sg-guides h3 { font-size: 21px; }
.sm-page.guide .sg-guides h3 i { font-style: normal; color: var(--accent); font-family: var(--body); font-weight: 700; margin-left: 6px; }
.sm-page.guide a.sg-guide:hover h3 span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sm-page.guide .sg-guides p { margin-top: 6px; color: var(--muted); }

/* ---------- narrower desktops: the heading column narrows before anything stacks ---------- */
/* round 4: 330 px with 28 px sides leaves a row heading 274 px, room for the widest last three words build-guide.js holds
   together (holdTails: "a Different Question" is 248 px at 26 px), so no heading ends on a word or two here. Round 3's
   280 px left 224 px, and four headings ended on one or two words at 1024. */
@media (max-width: 1180px) { .sm-page.guide .sg-row { grid-template-columns: 400px minmax(0, 1fr); } .sm-page.guide .sg-row > h2 { padding-left: 28px; padding-right: 28px; } }

/* ---------- phones and small tablets: everything stacks; each heading ruled off above its cell ---------- */
@media (max-width: 900px) {
  .sm-page.guide .sg-page { padding: 24px 0 56px; }
  .sm-page.guide .sg-page > .wrap { padding: 0 12px; }
  .sm-page.guide .sg-block { grid-template-columns: 1fr; grid-template-rows: none; }
  .sm-page.guide .sg-title { padding: 28px 20px; border-right: 0; }
  .sm-page.guide .sg-photo { grid-row: auto; grid-column: auto; min-height: 0; border-top: 1.5px solid var(--sg-rule); }
  .sm-page.guide .sg-photo img { aspect-ratio: 4 / 3; height: auto; }
  .sm-page.guide .sg-quick { padding: 24px 20px; border-right: 0; }
  .sm-page.guide .sg-row { grid-template-columns: minmax(0, 1fr); }
  .sm-page.guide .sg-block + .sg-row { margin-top: 24px; }
  .sm-page.guide .sg-row > h2 { padding: 22px 20px; border-right: 0; border-bottom: 1.5px solid var(--sg-rule); font-size: 22px; }
  .sm-page.guide .sg-cell { padding: 22px 20px 28px; }
  .sm-page.guide .sg-list ul { grid-template-columns: 1fr; }
  .sm-page.guide .sg-list li:nth-child(odd) { border-right: 0; }
  .sm-page.guide .sg-list li:nth-last-child(-n+2):nth-child(odd) { border-bottom: 1px solid var(--sg-rule); }
  .sm-page.guide .sg-list li:last-child { border-bottom: 0; }
  /* a wide table keeps readable columns and scrolls inside its own box, never the page */
  .sm-page.guide .sg-table table { font-size: 14px; min-width: 460px; }
  .sm-page.guide .sg-table th, .sm-page.guide .sg-table td { padding: 10px; }
  .sm-page.guide .sg-cost { white-space: normal; }
  .sm-page.guide .sg-next ul[class] { grid-template-columns: 1fr; }
  .sm-page.guide .sg-next ul[class] li { border-left: 0; }
  .sm-page.guide .sg-next li + li { border-top: 1.5px solid var(--sg-rule); }
  .sm-page.guide .sg-next a { padding: 20px; font-size: 18px; }
  .sm-page.guide .sg-guide { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .sm-page.guide .sg-guide img { width: 96px; height: 64px; }
}

/* ---------- phones: the guide list stacks, photo above title, so each title has the full width (round 3: beside a
   96 px thumb the titles ran 3 and 4 lines in a 195 px column, and "Repair or Replace / Your Deck?" ended on two words) ---------- */
@media (max-width: 560px) {
  .sm-page.guide .sg-guide { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px 0; }
  .sm-page.guide .sg-guide img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* The guide menu at the foot of every guide (Dan, 2026-11-24: "Make them useful"): a grid of cards, each with the guide's
   title, its one-line description and an arrow; the guide being read is shown muted and not a link. Real room before the
   footer. */
.sm-page.guide .gp-menu { margin: 72px auto 112px; }
.sm-page.guide .gp-menu h2 { margin: 0 0 24px; font-size: 30px; }
.sm-page.guide .gp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.sm-page.guide .gp-card { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; height: 100%; min-height: 76px; padding: 18px 52px 18px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.sm-page.guide a.gp-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(var(--shade-rgb), .10); transform: translateY(-2px); }
.sm-page.guide a.gp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sm-page.guide .gp-t { font: 600 19px/1.3 var(--head); color: var(--brand); }
.sm-page.guide .gp-d { font-size: 16px; line-height: 1.5; color: var(--muted); }
.sm-page.guide .gp-go { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent-text); }
.sm-page.guide .is-current .gp-card { background: transparent; border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); }
.sm-page.guide .is-current .gp-t { color: var(--muted); }
@media (min-width: 768px) { .sm-page.guide .gp-cards { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (min-width: 1180px) { .sm-page.guide .gp-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 699px) { .sm-page.guide .gp-menu { margin: 52px auto 72px; } .sm-page.guide .gp-menu h2 { font-size: 24px; } }
/* guide pages: the graph paper on a light shade of the site's violet, the ruled cells stay white (Dan 2026-11-25, on
   Cincinnati deck: "darken the graph paper area slightly (keep the graph), keep the areas in white", then "do the same for
   the Pittsburgh guide pages") */
.sm-page.guide .sg-page { background-color: #e5e2f0; background-image: linear-gradient(#cfc9e2 1px, transparent 1px), linear-gradient(90deg, #cfc9e2 1px, transparent 1px); }

/* the FAQ row on the site's FAQ ground (sm-site.css .faq-zone): the row's white "background" shorthand would wipe it, so it is
   set again here; the ruling around the row stays the report's (2026-11-30) */
.sm-page.guide .sg-row.faq-zone { background: var(--faq-cells) 0 0 / 180px 180px, var(--faq-ground); }
.sm-page.guide .sg-faq .faq { margin-top: 0; }
