@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/caveat-normal-500-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/figtree-italic-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/figtree-normal-400-800.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Gloock'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/gloock-normal-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* WTCQuilt.com: quilt-made-of-pages. Palette = fabric, frames = stitched blocks, edges = scalloped binding. */
:root {
  --indigo: #1d3557;
  --indigo-2: #2b4c7e;
  --red: #b8323f;
  --red-deep: #7f1f2b;
  --gold: #e0a93b;
  --muslin: #fbf3e4;
  --paper: #fffdf8;
  --blush: #fbefe9;
  --sky: #eef3f9;
  --spruce: #24524e;
  --plum: #4f3466;
  --ink: #232838;
  --muted: #5f6678;
  --line: #e8dcc6;
  --display: 'Gloock', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(29, 53, 87, .06), 0 18px 40px -24px rgba(29, 53, 87, .45);
  /* quilting crosshatch, drawn as a running stitch */
  --stitch-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M0 44 44 0M-11 11 11-11M33 55 55 33' stroke='%231d3557' stroke-opacity='.07' stroke-width='1.2' stroke-dasharray='4 4'/%3E%3Cpath d='M0 0 44 44M-11 33 11 55M33-11 55 11' stroke='%23b8323f' stroke-opacity='.05' stroke-width='1.2' stroke-dasharray='4 4'/%3E%3C/svg%3E");
  /* half-square-triangle patchwork, for dark grounds */
  --patch-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath d='M0 0h48L0 48z' fill='%23fff' fill-opacity='.05'/%3E%3Cpath d='M96 48v48H48z' fill='%23fff' fill-opacity='.05'/%3E%3Cpath d='M48 48h48L48 96z' fill='%23000' fill-opacity='.08'/%3E%3Cpath d='M48 0v48H0z' fill='%23e0a93b' fill-opacity='.06'/%3E%3Cpath d='M0 48h48' stroke='%23fff' stroke-opacity='.08' stroke-dasharray='3 4'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--muslin) var(--stitch-bg);
  font: 18px/1.7 var(--sans);
}
img { max-width: 100%; }
a { color: var(--indigo-2); text-decoration-color: rgba(184, 50, 63, .45); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main .wrap { max-width: 920px; }

/* ---------- header ---------- */
.site-head { background: var(--indigo); position: relative; z-index: 2; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muslin); }
.brand:hover { color: #fff; }
.logo-mark { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); transition: transform .4s ease; }
.brand:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 1.85rem/1 var(--display); letter-spacing: .3px; }
.brand-tag { font: 600 1.2rem/1.1 var(--hand); color: var(--gold); margin-top: 3px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; font: 600 15px/1 var(--sans); }
.nav a { color: #dfe7f2; text-decoration: none; padding: 9px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a[aria-current] { background: var(--muslin); color: var(--indigo); }

/* ---------- hero (binding-scalloped band, color per section) ---------- */
.hero {
  --hero-a: var(--indigo); --hero-b: var(--indigo-2); --glow: rgba(184, 50, 63, .55);
  position: relative; color: var(--muslin); padding: 46px 0 78px;
  background: var(--patch-bg), radial-gradient(900px 420px at 88% -10%, var(--glow), transparent 70%), linear-gradient(135deg, var(--hero-a), var(--hero-b));
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px;
  background: radial-gradient(circle at 18px 0, transparent 17px, var(--muslin) 18px) 0 0 / 36px 22px repeat-x;
}
.hero--guide { --hero-a: #1b3f3c; --hero-b: var(--spruce); --glow: rgba(224, 169, 59, .45); }
.hero--pattern { --hero-a: #5e1520; --hero-b: var(--red); --glow: rgba(224, 169, 59, .5); }
.hero--block { --hero-a: #33204a; --hero-b: var(--plum); --glow: rgba(184, 50, 63, .5); }
.hero--tool { --hero-a: #6b4410; --hero-b: #b07a1f; --glow: rgba(184, 50, 63, .45); }
.hero--site { --hero-a: #22324d; --hero-b: #3a557d; --glow: rgba(224, 169, 59, .35); }
.hero-row { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.hero--with-fig .hero-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.eyebrow { font: 700 1.6rem/1 var(--hand); color: var(--gold); margin: 0 0 10px; transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.hero h1 { font: 400 clamp(2.2rem, 3.2vw + 1rem, 3.7rem)/1.06 var(--display); margin: 0 0 16px; color: #fff; text-wrap: balance; letter-spacing: -.3px; }
.hero .lede { font-size: 1.18rem; color: #e3e9f2; margin: 0; max-width: 46em; }
.hero-fig { margin: 0; justify-self: center; position: relative; transform: rotate(2.2deg); }
.hero-fig img { display: block; width: 100%; max-width: 480px; height: auto; border: 10px solid var(--paper); border-radius: 18px; box-shadow: 0 30px 50px -22px rgba(0, 0, 0, .7); }
.hero-fig::before, .hero-fig::after { content: ""; position: absolute; width: 92px; height: 28px; background: rgba(251, 243, 228, .72); top: -12px; left: 18px; transform: rotate(-12deg); border-radius: 3px; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.hero-fig::after { left: auto; right: 18px; transform: rotate(10deg); }

/* home mosaic of real squares */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; transform: rotate(-3deg); max-width: 440px; justify-self: center; }
.mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 6px solid var(--paper); border-radius: 10px; box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .7); animation: drop .7s cubic-bezier(.2, .8, .2, 1.2) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.mosaic img:nth-child(even) { transform: rotate(3deg); }
@keyframes drop { from { opacity: 0; transform: translateY(-16px) scale(.92); } }

/* ---------- body type ---------- */
main { padding: 26px 0 56px; }
h2 { font: 400 clamp(1.55rem, 1.2vw + 1.1rem, 2rem)/1.15 var(--display); color: var(--indigo); margin: 0 0 14px; clear: both; display: flex; align-items: center; gap: 12px; }
h2::before { content: ""; width: 16px; height: 16px; flex: none; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, var(--red) 50%, var(--gold) 50%); }
h3 { font: 700 1.15rem/1.3 var(--sans); color: var(--indigo); margin: 22px 0 6px; }
.lede { font-size: 1.15rem; color: var(--muted); }
.intro { margin: 8px 0 26px; }
.intro > p:first-child { font-size: 1.12rem; }

/* ---------- stitched panels ---------- */
.panel { position: relative; display: flow-root; background: var(--paper); border-radius: var(--radius); padding: 30px 34px 22px; margin: 0 0 26px; box-shadow: var(--shadow); }
.panel::before { content: ""; position: absolute; inset: 9px; border: 2px dashed rgba(184, 50, 63, .26); border-radius: 15px; pointer-events: none; }
.panel.tint-1 { background: var(--blush); }
.panel.tint-2 { background: var(--sky); }
.panel.tint-2::before { border-color: rgba(29, 53, 87, .22); }
/* memorial pages: cornerstones, like the red squares where sashing meets */
.kind-heritage .panel, .kind-site .panel {
  border-radius: 6px;
  background-image: linear-gradient(var(--red), var(--red)), linear-gradient(var(--indigo), var(--indigo)), linear-gradient(var(--gold), var(--gold)), linear-gradient(var(--red), var(--red));
  background-size: 18px 18px; background-repeat: no-repeat;
  background-position: top left, top right, bottom left, bottom right;
}
.kind-heritage .panel::before, .kind-site .panel::before { inset: 18px; border-radius: 2px; }
.kind-heritage .panel { padding: 38px 42px 30px; }

/* ---------- figures and photos ---------- */
figure { margin: 22px 0; }
figure img, figure svg { max-width: 100%; height: auto; display: block; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
figcaption { font: 15px/1.5 var(--sans); color: var(--muted); margin-top: 8px; }
.photo { max-width: 560px; margin: 26px auto; transform: rotate(-.8deg); }
.photo img { width: 100%; border: 9px solid #fff; border-radius: 14px; box-shadow: 0 22px 34px -22px rgba(29, 53, 87, .65); }
.photo figcaption { text-align: center; font-family: var(--hand); font-size: 1.3rem; color: var(--indigo-2); }
.photo.side { float: right; width: 40%; max-width: 300px; margin: 6px -6px 18px 28px; transform: rotate(1.6deg); }

/* ---------- stats as quilt blocks ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 6px 0 10px; }
.stat { position: relative; text-align: center; padding: 20px 10px 16px; border-radius: 16px; color: #fff; overflow: hidden; background: var(--patch-bg), linear-gradient(135deg, var(--indigo), var(--indigo-2)); box-shadow: var(--shadow); }
.stat:nth-child(2) { background: var(--patch-bg), linear-gradient(135deg, var(--red-deep), var(--red)); }
.stat:nth-child(3) { background: var(--patch-bg), linear-gradient(135deg, #1b3f3c, var(--spruce)); }
.stat:nth-child(4) { background: var(--patch-bg), linear-gradient(135deg, #33204a, var(--plum)); }
.stat:nth-child(5) { background: var(--patch-bg), linear-gradient(135deg, #8a5a12, #c48a26); }
.stat::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(255, 255, 255, .35); border-radius: 11px; }
.stat b { display: block; font: 400 2.5rem/1 var(--display); }
.stat span { font: 600 14px/1.3 var(--sans); opacity: .9; }

/* the five quilts */
.five { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 760px) { .five { grid-template-columns: repeat(2, 1fr); } }
.five li { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); padding: 74px 14px 14px; position: relative; }
.five li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 62px;
  background: linear-gradient(var(--indigo), var(--indigo)) 0 0 / 42% 54% no-repeat, repeating-linear-gradient(180deg, var(--red) 0 8.9px, #fff 8.9px 17.8px); }
.five .q-pa::before { background: radial-gradient(circle at 30% 50%, var(--gold) 0 7px, transparent 8px), linear-gradient(135deg, #1b3f3c, var(--spruce)); }
.five .q-fdny::before { background: linear-gradient(var(--indigo), var(--indigo)) 0 0 / 42% 54% no-repeat, repeating-linear-gradient(180deg, var(--red-deep) 0 8.9px, #fff 8.9px 17.8px); }
.five b { display: block; font: 400 1.2rem/1.2 var(--display); color: var(--indigo); }
.five span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { text-decoration: none; font: 600 15px/1 var(--sans); padding: 10px 15px; border-radius: 999px; background: #fff; color: var(--indigo); border: 2px dashed rgba(29, 53, 87, .25); transition: all .2s; }
.chips a:hover { background: var(--indigo); color: #fff; border-style: solid; border-color: var(--indigo); }
.more a { font-weight: 700; }

/* ---------- cards (hub, home) ---------- */
.cards { list-style: none; padding: 0; margin: 14px 0 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.cards--mini { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.card a:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 26px 40px -24px rgba(29, 53, 87, .6); color: var(--ink); }
.card-thumb { display: block; aspect-ratio: 4 / 3; background: var(--muslin) var(--stitch-bg); position: relative; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; border-radius: 0; }
.card-thumb img.svg-thumb { object-fit: contain; padding: 14px; }
.card-thumb::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(255, 255, 255, .7); border-radius: 12px; pointer-events: none; }
.card-body { padding: 12px 15px 16px; display: flex; flex-direction: column; gap: 4px; }
.card-body b { font: 400 1.14rem/1.2 var(--display); color: var(--indigo); }
.card-body span { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.cards--mini .card-body b { font-size: 1.02rem; }

/* pattern index cards: photo with the diagram pinned on */
.pcards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.pcard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s; }
.pcard a:hover { transform: translateY(-5px); color: var(--ink); }
.pcard-art { position: relative; aspect-ratio: 4 / 3; background: var(--muslin) var(--stitch-bg); display: block; }
.pcard-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-diagram { position: absolute; right: 12px; bottom: -18px; width: 38%; background: #fff; padding: 6px; border-radius: 10px; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .55); transform: rotate(4deg); }
.pcard-diagram.solo, .pcard-art img.pcard-diagram:only-child { position: static; width: 100%; height: 100%; object-fit: contain; padding: 18px; transform: none; box-shadow: none; background: transparent; }
.pcard-body { padding: 26px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.pcard-body b { font: 400 1.25rem/1.2 var(--display); color: var(--indigo); }
.pcard-body > span { font-size: 15px; color: var(--muted); line-height: 1.45; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pcard .meta i { font: 600 12.5px/1 var(--sans); font-style: normal; padding: 6px 10px; border-radius: 999px; background: var(--blush); color: var(--red-deep); }
.pcard .meta i + i { background: var(--sky); color: var(--indigo); }

/* ---------- stitchers: letter tiles, bar, squares ---------- */
.letter-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 9px; margin: 16px 0; }
.letter-tiles a { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; place-items: center; text-decoration: none; background: var(--indigo) center / cover no-repeat; box-shadow: 0 10px 18px -12px rgba(29, 53, 87, .7); transition: transform .25s; }
.letter-tiles a::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(29, 53, 87, .15), rgba(29, 53, 87, .78)); transition: opacity .25s; }
.letter-tiles a:nth-child(3n+2)::before { background: linear-gradient(160deg, rgba(127, 31, 43, .15), rgba(127, 31, 43, .78)); }
.letter-tiles a:hover { transform: scale(1.07) rotate(-2deg); }
.letter-tiles a:hover::before { opacity: .55; }
.letter-tiles span { position: relative; font: 400 2rem/1 var(--display); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 22px; font: 700 15px/1 var(--sans); }
.letters a, .letters span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 10px; text-decoration: none; background: #fff; color: var(--indigo); box-shadow: 0 4px 10px -6px rgba(29, 53, 87, .5); transition: transform .15s; }
.letters a:hover { transform: translateY(-2px); background: var(--red); color: #fff; }
.letters span { background: var(--indigo); color: var(--gold); }
.squares-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; margin: 22px 0; }
.square { position: relative; margin: 0; background: #fff; border-radius: 12px; padding: 10px 10px 12px; box-shadow: 0 16px 26px -18px rgba(29, 53, 87, .65); transform: rotate(-1.1deg); transition: transform .25s; scroll-margin-top: 16px; text-decoration: none; color: var(--ink); }
.square:nth-child(3n+2) { transform: rotate(.9deg); }
.square:nth-child(3n) { transform: rotate(-.3deg); }
.square:hover { transform: rotate(0) translateY(-4px); }
.square::before { content: ""; position: absolute; inset: 4px; border: 1.5px dashed rgba(184, 50, 63, .3); border-radius: 9px; pointer-events: none; }
.square img { width: 100%; height: auto; display: block; border: 0; border-radius: 6px; }
.square figcaption, .square span { display: block; font: 14px/1.45 var(--sans); color: var(--muted); margin-top: 9px; }
.square b { font: 400 1.05rem/1.2 var(--display); color: var(--indigo); }
.square:target { outline: 4px solid var(--gold); outline-offset: 4px; transform: none; }
.nophoto div { aspect-ratio: 1; display: grid; place-items: center; text-align: center; padding: 14px; border-radius: 8px; background: var(--muslin) var(--stitch-bg); color: var(--muted); font: 600 1.3rem/1.2 var(--hand); }
.home-squares { grid-template-columns: repeat(4, 1fr); }
.credit { font-size: 15px; color: var(--muted); font-style: italic; }
.names { columns: 2 220px; column-gap: 32px; padding-left: 20px; }
.names li { break-inside: avoid; margin-bottom: 4px; }
.names li::marker { color: var(--red); }

/* ---------- timeline: a running stitch with patch dots ---------- */
.timeline { list-style: none; padding: 0; margin: 10px 0 0 8px; border-left: 3px dashed rgba(184, 50, 63, .45); }
.timeline li { padding: 0 0 20px 26px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -11px; top: 7px; width: 16px; height: 16px; transform: rotate(45deg); border-radius: 3px; background: linear-gradient(135deg, var(--red) 50%, var(--indigo) 50%); box-shadow: 0 0 0 4px var(--paper); }
.timeline li:nth-child(even)::before { background: linear-gradient(135deg, var(--gold) 50%, var(--indigo) 50%); }
.timeline time { font: 400 1.1rem/1.3 var(--display); color: var(--indigo); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; border-radius: 14px; box-shadow: 0 10px 24px -18px rgba(29, 53, 87, .6); margin: 16px 0; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: 16px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: linear-gradient(135deg, var(--indigo), var(--indigo-2)); color: #fff; font-weight: 700; }
tbody tr:nth-child(even) td { background: #fdf8ee; }
.key { display: flex; flex-wrap: wrap; gap: 14px; font: 15px/1.4 var(--sans); }
.key i { display: inline-block; width: 18px; height: 18px; border: 1px solid #999; vertical-align: -4px; margin-right: 6px; border-radius: 4px; }

/* ---------- shopping bits ---------- */
.picks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.picks li { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.picks h3 { margin: 0 0 4px; }
.picks p { margin: 4px 0 10px; font-size: 16px; }
a.buy { display: inline-block; background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 999px; font: 700 15px/1.2 var(--sans); box-shadow: 0 8px 16px -10px rgba(127, 31, 43, .8); }
a.buy:hover { background: var(--indigo); color: #fff; }

/* ---------- "Why WTCQuilt.com" aside ---------- */
.heritage { position: relative; margin: 34px 0 0; padding: 26px 30px; border-radius: var(--radius); color: #e8edf5; background: var(--patch-bg), linear-gradient(135deg, var(--indigo), var(--indigo-2)); box-shadow: var(--shadow); }
.heritage::before { content: ""; position: absolute; inset: 9px; border: 2px dashed rgba(224, 169, 59, .45); border-radius: 15px; pointer-events: none; }
.heritage .aside-title { font: 700 1.7rem/1 var(--hand); color: var(--gold); margin: 0 0 8px; }
.heritage p { margin: 0; }
.heritage a { color: #fff; }

/* ---------- footer: binding on top, patchwork ground ---------- */
.site-foot { position: relative; margin-top: 30px; padding: 54px 0 34px; color: #cfd8e6; font: 15px/1.6 var(--sans); background: var(--patch-bg), linear-gradient(160deg, #13253f, var(--indigo)); }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 22px; background: radial-gradient(circle at 18px 22px, transparent 17px, var(--muslin) 18px) 0 0 / 36px 22px repeat-x; }
.site-foot a { color: var(--gold); }
.site-foot a:hover { color: #fff; }
.site-foot p { max-width: 60em; }
.site-foot p:last-child { margin-bottom: 0; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, .2); color: #9fb0c8; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 1.5rem/1 var(--display); color: var(--muslin); margin-bottom: 8px; }
.foot-brand .logo-mark { width: 40px; height: 40px; }

/* ---------- responsive / motion / print ---------- */
@media (max-width: 860px) {
  .hero--with-fig .hero-row { grid-template-columns: 1fr; }
  .hero-fig img { max-width: 100%; }
  .mosaic { max-width: 340px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .head-row { padding-top: 10px; padding-bottom: 10px; }
  .logo-mark { width: 44px; height: 44px; }
  .brand-name { font-size: 1.55rem; }
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 8px 12px; }
  .hero { padding: 30px 0 64px; }
  .panel, .kind-heritage .panel { padding: 26px 20px 16px; }
  .photo.side { float: none; width: auto; max-width: 340px; margin: 18px auto; transform: rotate(1deg); }
  .home-squares { grid-template-columns: repeat(2, 1fr); }
  .squares-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .letter-tiles { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .letter-tiles span { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff; }
  .site-head, .site-foot, .heritage, .nav, .hero-fig, .mosaic { display: none; }
  .hero { background: none; color: var(--ink); padding: 0; }
  .hero::after { display: none; }
  .hero h1 { color: var(--ink); }
  .eyebrow { color: var(--muted); }
  .panel { box-shadow: none; background: #fff; }
  a { color: inherit; text-decoration: none; }
}

/* kicker inside the h1 (e.g. "Free pattern:"), set like the eyebrow */
.hero h1 .kicker { display: block; font: 700 1.6rem/1 var(--hand); color: var(--gold); margin-bottom: 12px; transform: rotate(-2deg); transform-origin: left; }
/* diagrams and charts: pinned on a stitched card */
figure:not(.photo):not(.square):not(.hero-fig):not(.shot) { width: fit-content; max-width: 100%; background: #fff; padding: 14px 14px 12px; border-radius: 18px; box-shadow: var(--shadow); position: relative; }
figure:not(.photo):not(.square):not(.hero-fig):not(.shot)::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(29, 53, 87, .18); border-radius: 13px; pointer-events: none; }
figure:not(.photo):not(.square):not(.hero-fig):not(.shot) img, figure:not(.photo):not(.square):not(.hero-fig):not(.shot) svg { border: 0; border-radius: 8px; }
figure:not(.photo):not(.square):not(.hero-fig):not(.shot) figcaption { max-width: 42em; }
.intro > figure:not(.photo) { margin-left: auto; margin-right: auto; }
/* intro: diagrams sit side by side, text runs full width */
.intro { display: flex; flex-wrap: wrap; gap: 0 22px; justify-content: center; align-items: flex-start; }
.intro > *:not(figure) { flex-basis: 100%; }
.intro > figure:not(.photo) { margin: 10px 0 22px; }

/* contact form */
.cform { display: grid; gap: 16px; max-width: 640px; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform label { display: grid; gap: 6px; font: 700 15px/1.3 var(--sans); color: var(--indigo); }
.cform input, .cform select, .cform textarea { font: 16px/1.4 var(--sans); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cform textarea { min-height: 170px; resize: vertical; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: none; border-color: var(--indigo-2); box-shadow: 0 0 0 4px rgba(224, 169, 59, .35); }
.cform button { justify-self: start; border: 0; cursor: pointer; font: 700 16px/1 var(--sans); color: #fff; padding: 14px 26px; border-radius: 999px; background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 10px 18px -10px rgba(127, 31, 43, .8); }
.cform button:hover { background: var(--indigo); }
.cform button:disabled { opacity: .6; cursor: wait; }
.cform-status { margin: 0; font-weight: 600; }
.cform-status.ok { color: var(--spruce); }
.cform-status.err { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .cform-row { grid-template-columns: 1fr; } }

/* calculators */
.calc { background: #fff; border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); position: relative; }
.calc::before { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(36, 82, 78, .3); border-radius: 13px; pointer-events: none; }
.calc form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 18px; margin-bottom: 14px; position: relative; }
.calc label { display: grid; gap: 6px; font: 700 14.5px/1.3 var(--sans); color: var(--indigo); align-content: start; }
.calc input[type=number], .calc select { font: 600 17px/1.3 var(--sans); color: var(--ink); background: var(--muslin); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
.calc input:focus, .calc select:focus { outline: none; border-color: var(--spruce); box-shadow: 0 0 0 4px rgba(224, 169, 59, .35); }
.calc .calc-pair { display: contents; }
.calc .calc-check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; font-weight: 600; }
.calc [hidden] { display: none !important; }
.calc-hint { font-weight: 500; color: var(--muted); font-size: 13px; }
.calc-out { position: relative; }
.calc-out .table-scroll { margin: 0 0 10px; }
.calc-out td:nth-child(2) { font-weight: 700; color: var(--red-deep); white-space: nowrap; }
.calc-note { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
.calc form > label:first-child { grid-column: span 2; }
@media (max-width: 600px) { .calc form > label:first-child { grid-column: auto; } }

/* printables: put the template inside <div class="print-sheet">; printing then shows only that, at true size */
.print-sheet { background: #fff; border-radius: 12px; padding: 12px; overflow-x: auto; }
.print-sheet svg { display: block; max-width: none; border: 0; }
.print-btn { border: 0; cursor: pointer; font: 700 15px/1 var(--sans); color: #fff; padding: 11px 20px; border-radius: 999px; background: linear-gradient(135deg, var(--spruce), #1b3f3c); }
@media print {
  body:has(.print-sheet) .hero, body:has(.print-sheet) .intro, body:has(.print-sheet) main .panel:not(:has(.print-sheet)), body:has(.print-sheet) .heritage { display: none !important; }
  body:has(.print-sheet) main .panel:has(.print-sheet) > :not(.print-sheet) { display: none !important; }
  body:has(.print-sheet) main .panel, body:has(.print-sheet) main .panel::before { padding: 0; margin: 0; box-shadow: none; border: 0; background: none !important; }
  .print-sheet { padding: 0; overflow: visible; }
  .print-sheet svg { page-break-inside: avoid; }
}

/* text, date and search fields in tools match the number fields */
.calc input[type=text], .calc input[type=search], .calc input[type=date], .calc input:not([type]), .calc textarea {
  font: 600 17px/1.3 var(--sans); color: var(--ink); background: var(--muslin); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
.calc textarea { min-height: 90px; resize: vertical; font-weight: 500; }
.calc input[type=text]:focus, .calc input[type=date]:focus, .calc textarea:focus { outline: none; border-color: var(--spruce); box-shadow: 0 0 0 4px rgba(224, 169, 59, .35); }

/* printing a template: Letter with margins that leave exactly the 7.5 x 10 in sheet plus a little room, so no blank last page */
@media print {
  @page { size: letter; margin: 0.4in 0.5in; }
  body:has(.print-sheet) { margin: 0; background: #fff; }
  body:has(.print-sheet) .site-head, body:has(.print-sheet) .site-foot { display: none !important; }
  body:has(.print-sheet) main, body:has(.print-sheet) main .wrap { padding: 0 !important; margin: 0 !important; max-width: none; }
  body:has(.print-sheet) .print-sheet { margin: 0; border-radius: 0; }
  body:has(.print-sheet) .print-sheet + .print-sheet { break-before: page; }
  body:has(.print-sheet) .print-sheet svg { margin: 0 auto; }
}

/* Christmas 2026 band just under the nav, home page only (remove after Christmas with XMAS_STRIP in build.py) */
.xmas-strip { position: relative; z-index: 1; background: var(--red); background-image: var(--patch-bg); color: #fff; border-top: 3px solid var(--gold); border-bottom: 3px solid var(--gold); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55); padding: 16px 0; }
.xmas-strip::before, .xmas-strip::after { content: ""; position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(255, 253, 248, .55); pointer-events: none; }
.xmas-strip::before { top: 6px; }
.xmas-strip::after { bottom: 6px; }
.xmas-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px; text-align: center; }
.xmas-strip p { margin: 0; }
.xmas-text { font: 600 18px/1.35 var(--sans); }
.xmas-kicker { font: 400 2rem/1 var(--hand); color: var(--gold); margin-right: 10px; vertical-align: -2px; }
.xmas-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.xmas-links a { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); color: var(--red-deep); font: 700 16px/1.2 var(--sans); text-decoration: none; padding: 6px 20px 6px 6px; border-radius: 999px; box-shadow: 0 3px 0 var(--red-deep); }
.xmas-links img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.xmas-thumbs { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.xmas-thumbs a { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #fff; font: 600 12px/1.2 var(--sans); text-align: center; }
.xmas-thumbs img { display: block; width: 66px; height: 66px; object-fit: cover; border-radius: 8px; border: 3px solid var(--paper); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6); transform: rotate(-3deg); }
.xmas-thumbs li:nth-child(2) img { transform: rotate(2deg); }
.xmas-thumbs span { display: block; margin-top: 6px; white-space: nowrap; }
.xmas-thumbs li { display: flex; justify-content: center; min-width: 66px; }
.xmas-thumbs a:hover span, .xmas-thumbs a:focus-visible span { color: var(--gold); }
.xmas-links a:hover, .xmas-links a:focus-visible { background: var(--gold); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .xmas-links a { transition: background .15s, color .15s; } }
@media (max-width: 560px) { .xmas-kicker { display: block; margin: 0 0 4px; } .xmas-text { font-size: 16px; } .xmas-links a { padding: 5px 16px 5px 5px; font-size: 15px; } .xmas-links img { width: 32px; height: 32px; } .xmas-thumbs a, .xmas-thumbs img { width: 58px; } .xmas-thumbs img { height: 58px; } }

/* Amazon product cards: photo slot filled live with Amazon's own image by /prices.js (placeholder until then) */
li.gg-card { list-style: none; }
.gg-card-img { display: block; flex: none; width: 120px; height: 120px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.pick-card { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 18px; padding: 0; }
.pick-card .pick-body { flex: 1; min-width: 0; }
.pick-card .pick-body > h3:first-child { margin-top: 0; }
ul:has(> li.pick-card) { padding-left: 0; }
.prod-row { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.prod-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.prod-card .gg-card-img { width: 100%; height: 160px; border: 0; }
.prod-card b { font: 600 15px/1.35 var(--sans); color: var(--ink); flex: 1; }
.prod-card .amz-live-price { margin: 0; font-size: .95rem; }
@media (max-width: 560px) { .gg-card-img { width: 88px; height: 88px; } .pick-card { gap: 12px; } .prod-row { grid-template-columns: repeat(2, 1fr); gap: 12px; } .prod-card .gg-card-img { height: 120px; } }
.amz-row .gg-card-img { width: 64px; height: 64px; padding: 3px; margin: 0 0 6px; }
.picks .pick-card { margin: 0; }

/* Balanced card grids (build.py balance_grids): column counts per breakpoint come from the build as --cd/--cm/--cs;
   rows are centered so a short last row sits in the middle. --bgap must match each grid's column gap. */
.bal { --c: var(--cd); display: flex !important; flex-wrap: wrap; justify-content: center; --bgap: 18px; }
.bal > * { --w: calc((100% - (var(--c) - 1) * var(--bgap)) / var(--c)); flex: 0 0 auto; width: var(--w); min-width: 0; }
@media (min-width: 901px) { .lone-d > :last-child { width: calc(2 * var(--w) + var(--bgap)); } }
@media (min-width: 561px) and (max-width: 900px) { .lone-m > :last-child { width: calc(2 * var(--w) + var(--bgap)); } }
@media (max-width: 560px) { .lone-s > :last-child { width: calc(2 * var(--w) + var(--bgap)); } }
.cards--mini.bal { --bgap: 12px; }
.pcards.bal { --bgap: 22px; }
.stats.bal { --bgap: 14px; }
.five.bal { --bgap: 12px; }
@media (max-width: 900px) { .bal { --c: var(--cm); } }
@media (max-width: 560px) { .bal { --c: var(--cs); } }
@media (max-width: 600px) { .squares-grid.bal { --bgap: 12px; } }
@media (max-width: 560px) { .prod-row.bal { --bgap: 12px; } }
@media (max-width: 760px) { .five.bal { --bgap: 12px; } }

/* History page: screenshots of the original site (balanced by build.py as .shots) */
.shots { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shots.bal { --bgap: 22px; }
.shot { margin: 0; background: #fff; border-radius: 16px; padding: 10px 10px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 8px; border: 1px solid var(--line); }
.shot figcaption { font: 15px/1.5 var(--sans); color: var(--muted); margin-top: 10px; }
.shot figcaption b { display: block; font: 400 1.1rem/1.25 var(--display); color: var(--indigo); margin-bottom: 3px; }
.shot-now { display: block; margin-top: 6px; font-weight: 700; }
