/*
 * QuoteSketch: the template gallery's pages (/templates/gallery, /templates/<slug>)
 * Only those pages load this sheet; the site's own (site.css) is untouched. It
 * draws the sample quotation as text, in the site's colours, and the cards'
 * two buttons. Written by hand; the pages are written by build-gallery.js.
 */

/* The cards: Preview and Use in Builder side by side, stacked when narrow. */
.gq-card-actions{ display:flex; flex-wrap:wrap; gap:10px; }
.gq-card-actions .btn{ flex:1 1 auto; justify-content:center; }

/* The gallery page (9.96 round 2): a compact grid, 4 cards a row on a desktop, 2 on
   a phone, so many templates fit on one screen. */
.gq-hero{ padding:24px 0 18px; }
.gq-hero h1{ font-size:clamp(26px,3vw,34px); max-width:none; }
.gq-hero .lead{ margin-top:6px; font-size:16px; }
.gq-hero .crumb{ margin-bottom:8px; }
.sec.gq-list{ padding:18px 0 48px; }
.gq-all{ justify-content:center; margin-top:22px; }
.gq-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:20px 18px; }
.gq-card{ display:flex; flex-direction:column; min-width:0; }
.gq-thumb{ display:block; aspect-ratio:4/5; border-radius:8px; overflow:hidden; background:#eef2f8; box-shadow:0 0 0 1px rgba(13,35,64,.08); }
.gq-thumb img{ display:block; width:100%; height:100%; object-fit:cover; }
.gq-card .gq-title{ margin:10px 0 0; font-size:15px; line-height:1.3; }
.gq-card .gq-type{ margin:2px 0 0; font-size:13px; color:var(--muted); }
.gq-card .gq-design{ margin:0 0 8px; font-size:12px; color:var(--muted); }
.gq-design-note{ margin:12px 0 0; font-size:14px; color:var(--muted); }
.gq-design-note a{ color:var(--blue, inherit); font-weight:600; }
.gq-grid .gq-card-actions{ gap:6px; margin-top:auto; }
.gq-grid .gq-card-actions .btn{ min-height:36px; padding:6px 10px; font-size:13.5px; flex:1 1 0; }
@media (max-width: 1000px){ .gq-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width: 720px){
  .gq-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px 12px; }
  .gq-hero{ padding:16px 0 12px; }
  .sec.gq-list{ padding:12px 0 36px; }
  .gq-grid .gq-card-actions{ flex-direction:column; }
  .gq-grid .gq-card-actions .btn{ min-height:40px; flex:none; }
}

/* The preview page: the sheets as the Builder draws them, then the text. */
.gq-sheets{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:24px; max-width:1000px; margin:0 auto; }
.gq-sheet{ margin:0; }
.gq-sheet img{ display:block; width:100%; height:auto; }
.gq-sheet figcaption, .gq-photo-fig figcaption{ margin-top:8px; font-size:13px; line-height:1.45; color:var(--muted, #5b6b7f); text-align:center; }
.gq-photo-fig{ margin:0 0 14px; }
.gq-photo-fig .gq-photo{ margin-bottom:0; }
.gq-texthead{ max-width:880px; margin:0 auto 14px; font-size:20px; }
.sec.gq-text{ padding-top:24px; }
.gq-page2{ margin-top:20px; }
.gq-page2 h3{ margin-top:0; }
.gq-photo{ display:block; width:70%; max-width:420px; height:auto; margin:0 auto 14px; }
.gq-logo{ display:block; width:120px; height:auto; margin-bottom:10px; }
.gq-spec table{ width:100%; border-collapse:collapse; }
.gq-spec td{ padding:8px 10px; border:1px solid var(--line); vertical-align:top; }
@media (max-width: 720px){ .gq-sheets{ grid-template-columns:1fr; gap:16px; } }

/* The quotation, as a document on the page. */
.gq-sec{ padding-top:8px; }
.gq-doc{ max-width:880px; margin:0 auto; background:#fff; color:var(--head); border-radius:8px;
  box-shadow:0 24px 50px -28px rgba(13,35,64,.45), 0 0 0 1px rgba(13,35,64,.07);
  padding:44px 48px; font-size:14.5px; line-height:1.5; }
.gq-doc p{ margin:0; }
.gq-top{ display:flex; justify-content:space-between; gap:24px; padding-bottom:20px; border-bottom:2px solid var(--navy); }
.gq-from p, .gq-to p{ color:var(--text); }
.gq-doc .gq-name{ color:var(--head); font-weight:700; font-size:16px; }
.gq-meta{ text-align:right; }
.gq-meta h2{ font-size:26px; letter-spacing:.06em; text-transform:uppercase; color:var(--navy); margin:0 0 8px; }
.gq-meta dl{ margin:0; display:grid; gap:2px; }
.gq-meta dl div{ display:flex; justify-content:flex-end; gap:10px; }
.gq-meta dt{ color:var(--muted); }
.gq-meta dd{ margin:0; font-weight:600; }
.gq-to{ margin:20px 0 16px; }
.gq-doc .gq-label{ font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:4px; }
.gq-subject{ margin:0 0 8px !important; }
.gq-msg{ color:var(--text); margin-bottom:18px !important; }
.gq-tablewrap{ overflow-x:auto; }
.gq-items{ width:100%; border-collapse:collapse; min-width:520px; }
.gq-items th{ background:var(--navy); color:#fff; font-size:12.5px; font-weight:600; text-align:left; padding:9px 10px; }
.gq-items td{ padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
.gq-items .num{ text-align:right; white-space:nowrap; }
.gq-items .gq-n{ width:28px; color:var(--muted); }
.gq-items th.gq-n{ color:#fff; }
.gq-detail{ display:block; color:var(--text); font-size:13px; margin-top:2px; }
.gq-totals{ margin:14px 0 0 auto; border-collapse:collapse; min-width:300px; }
.gq-totals th{ text-align:left; font-weight:500; color:var(--text); padding:5px 10px; }
.gq-totals td{ text-align:right; padding:5px 10px; white-space:nowrap; font-weight:600; }
.gq-totals .gq-grand th, .gq-totals .gq-grand td{ background:var(--navy); color:#fff; font-weight:700; padding:9px 10px; }
.gq-doc h3{ font-size:15px; margin:26px 0 8px; color:var(--head); }
.gq-terms{ margin:0; padding-left:20px; display:grid; gap:4px; color:var(--text); }
.gq-terms strong{ color:var(--head); }
.gq-notes{ margin:14px 0 0; padding:10px 14px; border-left:3px solid var(--line); color:var(--text); }
.gq-notes p{ margin:0 0 4px; }
.gq-bank{ margin:0; color:var(--text); }
.gq-enc{ margin:0; padding-left:20px; color:var(--text); }
.gq-foot{ margin-top:24px !important; text-align:center; color:var(--muted); }

@media (max-width: 640px){
  .gq-doc{ padding:22px 16px; font-size:14px; }
  .gq-top{ flex-direction:column; }
  .gq-meta{ text-align:left; }
  .gq-meta dl div{ justify-content:flex-start; }
  .gq-totals{ min-width:0; width:100%; }
}
