/* =====================================================================
   WALLZY — CONTENT PAGES (templates, guides, ideas; tools/build-pages.mjs)
   Layout only. Colours are style.css's --ui-* roles, so both themes work.
   ===================================================================== */
.content-page main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px) 40px; }
.pg-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 22px 0 0; font-size: 13px; color: var(--ui-faint); }
.pg-crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ui-faint); }
.pg-crumbs a { color: var(--ui-dim); text-decoration: none; }
.pg-crumbs a:hover { color: var(--ui-text); text-decoration: underline; }
.content-page .lede { font-size: clamp(15.5px, 1.4vw, 17px); line-height: 1.65; color: var(--ui-dim); max-width: 68ch; }
.content-page h1 { margin: 8px 0 14px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; color: var(--ui-strong); letter-spacing: -.01em; }
.content-page h2 { font-size: clamp(21px, 2.2vw, 26px); color: var(--ui-strong); margin: 0 0 12px; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 10px; }
.pg-actions .btn { text-decoration: none; }
.pg-note { font-size: 13px; color: var(--ui-faint); margin: 6px 0 0; }
.pg-sec { margin: clamp(36px, 5vw, 56px) 0 0; }
.pg-sec p { color: var(--ui-dim); line-height: 1.65; max-width: 72ch; }
.pg-sec a, .prose a, .pg-hub-head a { color: var(--ui-accent-text); }

/* Template pages */
.pg-tpl-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: center; padding: 18px 0 10px; }
.pg-tpl-cards { position: relative; height: clamp(360px, 42vw, 520px); }
.pg-c { position: absolute; width: 52%; height: auto; border-radius: 12px; box-shadow: 0 24px 50px -18px var(--ui-shadow-strong); }
.pg-c1 { left: 24%; top: 0; z-index: 3; }
.pg-c2 { left: 0; top: 9%; transform: rotate(-8deg); z-index: 2; }
.pg-c3 { right: 0; top: 9%; transform: rotate(8deg); z-index: 1; }
.pg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(30px, 4vw, 50px); }
.pg-list { margin: 0; padding-left: 20px; color: var(--ui-dim); line-height: 1.8; }
.pg-steps { padding-left: 22px; color: var(--ui-dim); line-height: 1.7; max-width: 72ch; }
.pg-steps li { margin-bottom: 8px; }

/* Grids of template cards */
.pg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 22px; }
.pg-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); max-width: 900px; }
.pg-tcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.pg-tcard img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 16px 34px -18px var(--ui-shadow-strong); transition: transform .18s ease; }
.pg-tcard:hover img { transform: translateY(-4px); }
.pg-tname { font-weight: 750; color: var(--ui-strong); margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.pg-tdesc { font-size: 13.5px; line-height: 1.5; color: var(--ui-dim); }
.pg-tier { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; }
.pg-tier-free { background: var(--ui-ok-bg); color: var(--ui-ok-text); }
.pg-tier-pro { background: var(--ui-accent-soft-2); color: var(--ui-accent-text); }
.pg-tier-studio { background: var(--ui-warn-bg); color: var(--ui-warn-text); }

/* Hubs */
.content-page .pg-hub { padding-left: 0; padding-right: 0; padding-top: 10px; }
.pg-hub-head { margin-bottom: clamp(26px, 3vw, 40px); }
.pg-cat { margin-bottom: clamp(34px, 4vw, 52px); }
.pg-cat-blurb { color: var(--ui-dim); margin: -4px 0 18px; }
.pg-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.pg-links a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--ui-line-2); border-radius: 14px; background: var(--ui-bg-2); text-decoration: none; color: inherit; }
.pg-links a:hover { border-color: var(--ui-hover-line); }
.pg-links strong { font-size: 17px; color: var(--ui-strong); }
.pg-links span { font-size: 14px; line-height: 1.55; color: var(--ui-dim); }

/* Articles */
.pg-article { max-width: 820px; padding-top: 10px; }
.pg-meta { font-size: 13px; color: var(--ui-faint); margin: 4px 0 0; }
.prose { margin-top: 26px; }
.prose h2 { margin: 38px 0 12px; }
.prose p, .prose li { font-size: 16px; line-height: 1.75; color: var(--ui-text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.pg-fig { margin: 24px 0; }
.pg-fig img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--ui-line-2); }
.pg-fig figcaption { font-size: 13.5px; color: var(--ui-faint); margin-top: 8px; }
.pg-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.pg-table th, .pg-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--ui-line-2); color: var(--ui-text); }
.pg-table th { font-weight: 700; color: var(--ui-strong); background: var(--ui-bg-2); }
.pg-more { margin-top: 44px; padding: 20px 22px; border: 1px solid var(--ui-line-2); border-radius: 14px; background: var(--ui-bg-2); }
.pg-more h2 { font-size: 18px; }
.pg-more ul { margin: 0; padding-left: 20px; line-height: 1.9; }
.pg-more a { color: var(--ui-accent-text); }

.pg-cta { margin: clamp(44px, 6vw, 70px) 0 10px; padding: clamp(26px, 4vw, 40px); text-align: center; border-radius: 18px; background: var(--ui-bg-2); border: 1px solid var(--ui-line-2); }
.pg-cta p { color: var(--ui-dim); margin: 0 0 18px; }
.pg-cta .btn { text-decoration: none; }

@media (max-width: 860px) {
  .pg-tpl-hero { grid-template-columns: 1fr; }
  .pg-tpl-cards { height: clamp(300px, 92vw, 460px); max-width: 520px; width: 100%; margin: 10px auto 0; }
  .pg-cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pg-table { font-size: 13px; }
  .pg-table th, .pg-table td { padding: 7px 6px; }
}

/* Short answers, questions, facts and the glossary (2026-10-19) */
.pg-answer { margin: 6px 0 18px; padding: 14px 18px; border-left: 4px solid var(--ui-accent); border-radius: 0 12px 12px 0; background: var(--ui-accent-soft); max-width: 72ch; }
.pg-answer p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ui-text); }
.pg-answer .pg-answer-h { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ui-accent-text); margin-bottom: 4px; }
.pg-faq { max-width: 820px; }
.pg-qa { padding: 14px 0; border-top: 1px solid var(--ui-line-2); }
.pg-qa h3 { margin: 0 0 6px; font-size: 17px; color: var(--ui-strong); }
.pg-qa p { margin: 0; }
.pg-facts { max-width: 760px; }
.pg-facts th { width: 30%; background: transparent; }
.pg-gloss { margin: 0; }
.pg-gloss dt { font-weight: 750; color: var(--ui-strong); margin-top: 16px; font-size: 16.5px; scroll-margin-top: 80px; }
.pg-gloss dd { margin: 4px 0 0; color: var(--ui-text); line-height: 1.7; font-size: 16px; }
.pg-gloss dd a { color: var(--ui-accent-text); }

/* The printable worksheet: real millimetres, so the card outline prints life size. */
.ws-sheet { margin: 24px 0; padding: 14mm 12mm; background: #fff; color: #111; border: 1px solid var(--ui-line-2); border-radius: 12px; max-width: 186mm; font-family: Arial, Helvetica, sans-serif; overflow-x: auto; }
.ws-sheet .ws-title { font-size: 22pt; font-weight: 800; margin: 0 0 4mm; color: #111; }
.ws-sheet p { color: #111; }
.ws-line, .ws-stat { display: flex; gap: 2mm; align-items: flex-end; margin: 0 0 4mm; font-size: 11pt; }
.ws-line span, .ws-stat span { flex: 1; border-bottom: 1px solid #333; min-height: 6mm; }
.ws-line .ws-short, .ws-stat .ws-short { flex: 0 0 20mm; }
.ws-grid { display: grid; grid-template-columns: 63mm 1fr; gap: 8mm; align-items: start; }
.ws-card { width: 63mm; height: 88mm; border: 1.5px solid #111; border-radius: 3mm; display: grid; grid-template-rows: 9mm 1fr 22mm; box-sizing: border-box; font-size: 8pt; color: #777; }
.ws-c-name { border-bottom: 1px dashed #999; padding: 2mm; }
.ws-c-art { display: grid; place-items: center; text-align: center; padding: 2mm; }
.ws-c-text { border-top: 1px dashed #999; padding: 2mm; }
.ws-sheet .ws-l { font-size: 10.5pt; font-weight: 700; margin: 0 0 1.5mm; }
.ws-box { border: 1px solid #333; border-radius: 2mm; min-height: 14mm; margin: 0 0 4mm; }
.ws-box-s { min-height: 8mm; }
.ws-lines { border-bottom: 1px solid #333; height: 9mm; }
.ws-sheet .ws-foot { font-size: 9pt; color: #555; margin: 4mm 0 0; }
@media (max-width: 640px) { .ws-grid { grid-template-columns: 1fr; } }
@media print {
  @page { margin: 10mm; }
  /* Only the worksheet: everything else on its page leaves no space behind. */
  body.content-page:has(.ws-sheet) { background: #fff; }
  body.content-page:has(.ws-sheet) > :not(main),
  body.content-page:has(.ws-sheet) main > :not(.pg-article),
  body.content-page:has(.ws-sheet) .pg-article > :not(.prose),
  body.content-page:has(.ws-sheet) .prose > :not(.ws-sheet) { display: none !important; }
  body.content-page:has(.ws-sheet) main, body.content-page:has(.ws-sheet) .pg-article, body.content-page:has(.ws-sheet) .prose { margin: 0; padding: 0; max-width: none; }
  .ws-sheet { margin: 0; border: 0; padding: 0; width: 186mm; max-width: none; overflow: visible; }
  .ws-grid { grid-template-columns: 63mm 1fr; }
}
.ws-sheet .ws-src { margin-top: 6mm; }
