/* 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- (Santa Maria 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 https://fortcollinsdeckcontractors.com/guide/ with Santa Maria's colors."
   So this is Fort Collins deck'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 midnight brand; its pale gray (list head) the light stone
     - its orange squares and arrows are the darker gold (--accent: amber 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 midnight gradation (a lighter midnight behind the button, deeper at the foot)
     - Fraunces for its Bricolage headings, Nunito Sans 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): Fort
   Collins narrows its H1s to 13ch and 22ch; here they use their column. */

.sm-page.guide {
  --sg-rule: var(--brand);                                              /* Fort Collins'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 midnight */
}
.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 :is(h1, h2, h3) { text-wrap: balance; }
.sm-page.guide .sg-page :is(p, li, td, th) { text-wrap: pretty; }
.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); text-wrap: balance; }
.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: 17px; 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: 340px 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 midnight head row, prices in the darker gold */
.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 gold 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: 17px; 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: 16px; line-height: 1.4; border-bottom: 1px solid var(--sg-rule); text-wrap: balance; }
.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: a midnight cell ruled onto the foot of the report, a subtle midnight gradation behind the button ---------- */
.sm-page.guide .sg-page .cta-bar { display: block; margin: 0; padding: 0; background: none; }
.sm-page.guide .sg-close { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 48px 44px;
  border: 2px solid var(--sg-rule); border-top: 0; color: var(--on-brand);
  background: radial-gradient(760px 420px at 100% 100%, var(--sg-glow), transparent),
    linear-gradient(180deg, var(--brand) 40%, var(--brand-deep) 100%), var(--brand); }
.sm-page.guide .sg-close h2 { font-size: 34px; color: var(--on-brand); }
.sm-page.guide .sg-close p { margin-top: 10px; color: var(--on-brand-muted); text-wrap: balance; }
.sm-page.guide .sg-close .creds { margin-top: 16px; color: var(--on-brand); }
.sm-page.guide .sg-close .button { flex: none; }

/* ---------- 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: 330px 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-close { flex-direction: column; align-items: flex-start; padding: 32px 20px; gap: 24px; }
  .sm-page.guide .sg-close h2 { font-size: 28px; }
  .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; }
}
