/* Goat PPC website — one stylesheet, no build step. Light and dark follow the system. */
:root {
  --paper: #f6f1e8; --paper-2: #efe8db; --card: #fffdf9; --ink: #1d1a17; --ink-2: #4a443d; --muted: #6f685f;
  --line: rgba(29, 26, 23, .12); --accent: #d9742b; --accent-ink: #8a4412; --accent-soft: rgba(217, 116, 43, .14);
  --green: #2f6b5a; --green-soft: rgba(47, 107, 90, .14); --shadow: 0 30px 60px -24px rgba(29, 26, 23, .45), 0 0 0 1px rgba(29, 26, 23, .08);
  --radius: 14px; --wrap: 1180px; --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 44ch; }
.kicker { display: inline-block; font: 600 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: .55em .8em; border-radius: 999px; margin-bottom: 1.1em; }
.wrap { width: min(var(--wrap), 100% - clamp(32px, 8vw, 80px)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 56px); }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
code, kbd { font-family: var(--font-mono); font-size: .9em; background: var(--paper-2); padding: .1em .4em; border-radius: 6px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: .5em .75em; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font: inherit; }
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.25em; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font: inherit; line-height: 1.1; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; padding: 12px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8em .6em; }
}

/* Hero */
.hero { position: relative; overflow: clip; padding-block: clamp(56px, 8vw, 104px) 0; }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; grid-template-columns: 1.05fr .95fr; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 6px; }
.badge { display: inline-flex; align-items: center; gap: .45em; font-size: .9rem; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .45em .85em; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}


/* Hero visual: a receipt that prints the sample product's price, plus two chips */
.hero-viz { position: relative; min-height: 600px; padding-top: 28px; }
.receipt { position: relative; width: min(100%, 390px); margin: 24px 0 0 6%; background: #fffdf7; color: #1d1a17; border-radius: 6px 6px 2px 2px; padding: 24px 24px 30px;
  box-shadow: 0 34px 50px -26px rgba(29, 26, 23, .55), 0 1px 0 rgba(0, 0, 0, .06); transform: rotate(-2deg); font-family: var(--font-mono); font-size: .84rem; }
.receipt::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 9px; height: 2px;
  background: radial-gradient(circle, rgba(35, 31, 27, .32) 1px, transparent 1.5px) 0 0 / 8px 2px repeat-x; }
.receipt h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; color: #1d1a17; letter-spacing: 0; }
.receipt .sub { font-family: var(--font-body); font-size: .7rem; color: #8a8178; letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 14px; }
.receipt .rows { list-style: none; margin: 0; padding: 0; }
.receipt .rows li { display: grid; grid-template-columns: 1.1em 1fr auto; align-items: baseline; column-gap: 8px; padding: 5px 0 4px; border-top: 1px dashed rgba(29, 26, 23, .18);
  opacity: 0; transform: translateY(6px); animation: row-in .45s ease forwards; animation-delay: calc(var(--i) * 110ms + 350ms); }
.receipt .rows li:first-child { border-top: 0; }
.receipt .op { color: #a1988b; }
.receipt .name { color: #4a443d; }
.receipt .name small { color: #a1988b; font-size: .78em; margin-left: .3em; }
.receipt .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.receipt .bar { grid-column: 2 / -1; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--c, #d9742b); width: var(--w, 10%); opacity: .85; }
.receipt .sum { border-top: 1px solid rgba(29, 26, 23, .55); font-weight: 700; }
.receipt .sum .name { color: #1d1a17; }
.receipt .final { border-top: 2px solid #1d1a17; margin-top: 2px; padding-top: 8px; font-size: 1rem; }
.receipt .final .amt { color: #b4591a; font-size: 1.5rem; font-family: var(--font-display); }
.receipt .foot { font-family: var(--font-body); font-size: .76rem; color: #8a8178; margin: 14px 0 0; line-height: 1.45; }
@keyframes row-in { to { opacity: 1; transform: none; } }


.chip { position: absolute; background: var(--card); color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: .55em 1em; font-size: .82rem; white-space: nowrap;
  box-shadow: 0 14px 28px -16px rgba(29, 26, 23, .5); animation: float 5s ease-in-out infinite alternate; }
.chip strong { color: var(--ink); }
.chip.c1 { left: -2%; top: 4px; }
.chip.c2 { right: 0; bottom: -30px; animation-delay: -2.4s; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-8px); } }

.hero-strip { margin-top: clamp(40px, 6vw, 72px); padding-bottom: 8px; }
.strip-caption { text-align: center; color: var(--muted); font-size: .92rem; margin: 14px 0 0; }

@media (max-width: 960px) {
  .hero-viz { min-height: 0; padding-top: 48px; margin-top: 8px; }
  .receipt { margin: 0 auto; transform: rotate(-1.2deg); }
  .chip.c1 { display: none; }
  .chip.c2 { right: 0; bottom: -26px; }
}
@media (max-width: 480px) { .chip { font-size: .74rem; } }
@media (prefers-reduced-motion: reduce) {
  .receipt .rows li { animation: none; opacity: 1; transform: none; }
  .chip { animation: none; }
}

/* Screenshots */
.shot { border-radius: 12px; box-shadow: var(--shadow); background: var(--card); }
.shot img { border-radius: 12px; }
figure { margin: 0; }
figcaption { font-size: .92rem; color: var(--muted); margin-top: .7em; }

/* Feature grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; }
.card h3 { display: flex; align-items: center; gap: .55em; margin-bottom: .5em; }
.card .glyph { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 15px; flex: none; }
.card p { color: var(--ink-2); margin-bottom: .6em; }
.card ul { margin: .4em 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: .95rem; }
.card li { margin: .25em 0; }
.card li::marker { color: var(--accent); }

/* How-it-works steps */
.steps { counter-reset: step; display: grid; gap: clamp(36px, 6vw, 72px); }
.step { display: grid; gap: clamp(20px, 3vw, 44px); align-items: center; grid-template-columns: .9fr 1.1fr; }
.step:nth-child(even) .step-text { order: 2; }
.step-text h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; }
.step-text h3::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: 600 .8rem/1 var(--font-mono); color: var(--accent-ink); letter-spacing: .12em; margin-bottom: .9em; }
.step-text p { color: var(--ink-2); }
.step-text .how { background: var(--paper-2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: .95rem; }
.step-text .how strong { color: var(--ink); }
@media (max-width: 860px) { .step { grid-template-columns: 1fr; } .step:nth-child(even) .step-text { order: 0; } }

/* Calculator */
.calc { display: grid; gap: 22px; grid-template-columns: 300px 1fr; align-items: start; }
.calc-inputs { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.calc-inputs h3 { margin-bottom: .8em; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: .6em .75em; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field.row { grid-template-columns: 1fr 1fr; }
.field.row > div { display: grid; gap: 6px; }
.toggle { display: flex; align-items: center; gap: .6em; font-size: .95rem; margin: 6px 0 2px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.scard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; position: relative; }
.scard.best { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.scard .best-badge { position: absolute; top: -10px; right: 12px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--green); color: #fff; padding: .35em .6em; border-radius: 999px; display: none; }
.scard.best .best-badge { display: inline-block; }
.scard h4 { font-family: var(--font-body); font-size: .95rem; margin-bottom: .6em; color: var(--ink-2); }
.scard .driver { display: grid; gap: 4px; margin-bottom: 10px; }
.scard .driver label { font-size: .75rem; color: var(--muted); }
.scard .driver input { font: inherit; font-family: var(--font-mono); font-size: 1.05rem; width: 100%; padding: .4em .6em; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.ladder { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.ladder li { display: flex; justify-content: space-between; gap: 8px; padding: .28em 0; border-top: 1px dashed var(--line); color: var(--ink-2); }
.ladder li:first-child { border-top: 0; }
.ladder li span:last-child { font-family: var(--font-mono); color: var(--ink); }
.ladder li.final { font-weight: 700; color: var(--ink); }
.ladder li.final span:last-child { color: var(--accent-ink); }
.calc-note { font-size: .92rem; color: var(--muted); margin-top: 14px; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } .calc-inputs { position: static; } }

/* Gallery */
.gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gallery-item { display: block; text-decoration: none; color: inherit; }
.gallery-item .shot { transition: transform .2s ease; }
.gallery-item:hover .shot { transform: translateY(-3px); }
.gallery-item figcaption strong { color: var(--ink); font-weight: 600; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: none; width: auto; }
dialog.lightbox[open] { display: flex; flex-direction: column; align-items: center; }
dialog.lightbox::backdrop { background: rgba(16, 13, 11, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb-frame { position: relative; box-sizing: content-box; padding: 12px; background: var(--card); border-radius: 2px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .2); }
.lb-frame img { display: block; width: calc(100% + 24px); max-width: none; height: auto; margin: -12px; clip-path: inset(12px); border-radius: 0; background: transparent; }
.lb-caption { color: #efe9df; text-align: center; margin-top: 14px; font-size: .95rem; max-width: 90vw; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); border: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.lb-btn:hover { background: rgba(0, 0, 0, .8); }
.lb-prev { left: -14px; } .lb-next { right: -14px; }
.lb-close { position: absolute; top: -14px; right: -14px; border: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }

/* Checklist / two-column prose */
.cols { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols h3 { margin-top: .2em; }
.cols ul { padding-left: 1.1em; color: var(--ink-2); }
.cols li { margin: .35em 0; }
.cols li::marker { color: var(--accent); }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 700; flex: none; }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-2); margin: .8em 0 0; max-width: 70ch; }

/* Contact */
.contact { display: grid; gap: 32px; grid-template-columns: .8fr 1.2fr; align-items: start; }
.contact form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; margin-top: 10px; font-size: .95rem; }
.form-status.ok { color: var(--green); font-weight: 600; }
.form-status.err { color: #b4321f; }
.field .error { color: #b4321f; font-size: .85rem; display: none; }
.field.invalid .error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #b4321f; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--ink-2); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .gallery-item .shot, .btn { transition: none; } }
@media print { .site-header, .hero-cta, .contact form, .lightbox { display: none !important; } .shot { box-shadow: none; } }


/* ============================================================ Workshop edition: textures, depth, character */
:root { --paper: #e9dcc3; --paper-2: #dfd0b2; --card: #fbf5ea; --ink: #231f1b; --ink-2: #4a423a; --muted: #6f655a; --line: rgba(35, 31, 27, .16);
  --accent: #c8601e; --accent-ink: #8a3f10; --accent-soft: rgba(200, 96, 30, .16); --green: #2f6b5a; --green-soft: rgba(47, 107, 90, .16);
  --wood: #7a4b25; --leather: #5a3a24; --pencil: #4b4844; --font-hand: "Bradley Hand", "Noteworthy", "Chalkboard SE", "Marker Felt", cursive;
  --shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 14px 24px -16px rgba(35, 31, 27, .45), 0 40px 60px -40px rgba(35, 31, 27, .45), 0 0 0 1px rgba(35, 31, 27, .12); }
body { background: var(--paper); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9000; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 260px 260px; opacity: .09; mix-blend-mode: multiply; }
.top-edge { height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='180'%3E%3Cfilter id='w' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.11' numOctaves='4' seed='11' result='t'/%3E%3CfeColorMatrix in='t' type='saturate' values='0' result='g'/%3E%3CfeComponentTransfer in='g' result='c'%3E%3CfeFuncR type='linear' slope='1.6' intercept='-0.25'/%3E%3CfeFuncG type='linear' slope='1.6' intercept='-0.25'/%3E%3CfeFuncB type='linear' slope='1.6' intercept='-0.25'/%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3CfeFlood flood-color='%238d5a2e' result='f'/%3E%3CfeBlend in='f' in2='c' mode='multiply'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%238d5a2e'/%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"); background-size: 900px 180px; border-bottom: 2px solid #3f2412; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.site-header { background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom-color: rgba(35, 31, 27, .22); }
h1, h2 { text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.kicker { box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 2px 0 rgba(35, 31, 27, .08); }
.btn-primary { box-shadow: 0 2px 0 rgba(255, 255, 255, .12) inset, 0 8px 16px -8px rgba(35, 31, 27, .7); }
.btn-ghost { background: var(--card); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 4px 10px -6px rgba(35, 31, 27, .5); }
.badge { background: var(--card); box-shadow: 0 1px 0 #fff inset, 0 3px 8px -5px rgba(35, 31, 27, .5); }

/* Pencil notes and the rubber stamp */
.pencil-note { font-family: var(--font-hand); color: var(--pencil); font-size: 1.05rem; margin: 18px 0 0; display: flex; align-items: center; gap: 8px; max-width: 32ch; transform: rotate(-1.5deg); }
.pencil-note svg { flex: none; opacity: .8; }
.stamp { position: absolute; left: -5%; bottom: -5%; padding: 10px 14px; border: 3px double #b43a2a; border-radius: 6px; color: #b43a2a; font: 800 .82rem/1.05 var(--font-body); letter-spacing: .16em; text-transform: uppercase; text-align: center; transform: rotate(-9deg); opacity: .78; mix-blend-mode: multiply; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); -webkit-mask-size: 180px 180px; mask-size: 180px 180px; pointer-events: none; }

/* Stacked paper under the receipt; chips become tags on a string */
.receipt { box-shadow: 0 1px 0 #fff inset, 0 30px 45px -28px rgba(35, 31, 27, .7), 0 0 0 1px rgba(35, 31, 27, .08); }
.receipt::before { content: ""; position: absolute; inset: 8px -6px -6px 6px; background: #f1e8d6; border-radius: 4px; z-index: -1; transform: rotate(1.5deg); box-shadow: 0 10px 20px -14px rgba(35, 31, 27, .6); }
.chip { background: var(--card); border-color: rgba(35, 31, 27, .25); box-shadow: 0 1px 0 #fff inset, 0 10px 18px -12px rgba(35, 31, 27, .6); padding-left: 1.6em; }
.chip::before { content: ""; position: absolute; left: .7em; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(35, 31, 27, .45); }

/* Matted, taped and pinned screenshots */
.shot { box-shadow: var(--shadow); }
.matte { position: relative; background: var(--card); padding: 14px; border-radius: 6px; }
.matte img { border-radius: 3px; box-shadow: 0 0 0 1px rgba(35, 31, 27, .18); }
.taped::before, .taped::after { content: ""; position: absolute; top: -11px; width: 92px; height: 26px; background: rgba(255, 226, 140, .74); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); z-index: 3; }
.taped::before { left: 22px; transform: rotate(-6deg); }
.taped::after { right: 22px; transform: rotate(5deg); }
.pinned .shot { position: relative; background: var(--card); padding: 10px; border-radius: 3px; }
.pinned .shot img { border-radius: 2px; }
.pinned .shot::before { content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a73, #b4321f 60%, #7a1f12); box-shadow: 0 4px 5px rgba(0, 0, 0, .4), 0 0 0 1px rgba(0, 0, 0, .2); transform: translateX(-50%); z-index: 3; }
.pinned .shot::after { content: ""; position: absolute; top: 6px; left: calc(50% - 1px); width: 2px; height: 10px; background: rgba(0, 0, 0, .35); z-index: 2; }
.gallery-item:hover .shot { transform: translateY(-3px) rotate(-.4deg); }

/* Section textures */
.kraft-dark { background: var(--paper-2); box-shadow: inset 0 14px 30px -20px rgba(35, 31, 27, .35), inset 0 -14px 30px -20px rgba(35, 31, 27, .35); }
.pegboard { background: radial-gradient(circle at 14px 14px, rgba(35, 31, 27, .22) 3.2px, rgba(255, 255, 255, .08) 3.8px, transparent 4.4px) 0 0 / 28px 28px, #d8c39d; box-shadow: inset 0 14px 30px -20px rgba(35, 31, 27, .4), inset 0 -14px 30px -20px rgba(35, 31, 27, .4); }
.pegboard .section-head { background: var(--card); padding: 22px 26px; border-radius: 10px; box-shadow: var(--shadow); max-width: 68ch; }
.hang { position: relative; margin-top: 16px; background: var(--card); box-shadow: var(--shadow); transition: transform .2s ease; }
.hang::before { content: ""; position: absolute; top: -17px; left: 50%; width: 14px; height: 20px; border: 3px solid #5d5a56; border-bottom: 0; border-radius: 8px 8px 0 0; transform: translateX(-50%); box-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.hang:hover { transform: translateY(-3px) rotate(-.3deg); }
.hang .glyph { box-shadow: 0 1px 0 #fff inset; }
.ruler { height: 30px; margin: 0 0 36px; background-color: #efe4cf; background-image: repeating-linear-gradient(90deg, transparent 0 9px, rgba(35, 31, 27, .55) 9px 10px), repeating-linear-gradient(90deg, transparent 0 49px, rgba(35, 31, 27, .85) 49px 51px); background-size: 100% 9px, 100% 16px; background-repeat: repeat-x; border: 1px solid rgba(35, 31, 27, .35); border-radius: 3px; box-shadow: 0 1px 0 #fff inset, 0 6px 12px -8px rgba(35, 31, 27, .6); }
.graph { background-color: #f3eee0; background-image: linear-gradient(rgba(47, 107, 90, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 107, 90, .16) 1px, transparent 1px); background-size: 24px 24px; }
.graph .calc-inputs, .graph .scard { background: var(--card); box-shadow: var(--shadow); }
.graph .scard.best { border-color: var(--green); box-shadow: var(--shadow), 0 0 0 3px var(--green-soft); }
.cork { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='k' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='4' seed='5' result='t'/%3E%3CfeColorMatrix in='t' type='saturate' values='0' result='g'/%3E%3CfeComponentTransfer in='g' result='c'%3E%3CfeFuncR type='linear' slope='1.3' intercept='-0.1'/%3E%3CfeFuncG type='linear' slope='1.3' intercept='-0.1'/%3E%3CfeFuncB type='linear' slope='1.3' intercept='-0.1'/%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3CfeFlood flood-color='%23c9995c' result='f'/%3E%3CfeBlend in='f' in2='c' mode='multiply'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%23c9995c'/%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E"); background-size: 400px 400px; box-shadow: inset 0 0 0 10px #6b4423, inset 0 0 0 12px rgba(255, 255, 255, .15), inset 0 14px 30px -14px rgba(0, 0, 0, .45); }
.cork .section-head { background: var(--card); padding: 22px 26px; border-radius: 4px; box-shadow: var(--shadow); max-width: 68ch; transform: rotate(-.6deg); }
.cork .gallery-item figcaption { background: rgba(251, 245, 234, .85); padding: 6px 10px; border-radius: 4px; }
.index-cards details { background: var(--card); border: 0; border-radius: 6px; margin-bottom: 12px; padding: 14px 18px; box-shadow: var(--shadow); background-image: repeating-linear-gradient(transparent 0 27px, rgba(47, 107, 90, .18) 27px 28px); background-position: 0 44px; }
.index-cards details:last-of-type { border: 0; }
.index-cards summary { border-bottom: 2px solid rgba(180, 58, 42, .5); padding-bottom: 8px; }

/* Leather folio around the contact form */
.leather { background: var(--leather); border: 0; border-radius: 10px; padding: 22px; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 0 60px rgba(0, 0, 0, .35), 0 34px 50px -30px rgba(0, 0, 0, .7); }
.leather::before { content: ""; position: absolute; inset: 10px; border: 2px dashed rgba(255, 230, 190, .55); border-radius: 8px; pointer-events: none; }
.leather::after { content: ""; position: absolute; inset: 0; border-radius: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 260px 260px; opacity: .22; mix-blend-mode: overlay; pointer-events: none; }
.leather .sheet { position: relative; z-index: 1; background: var(--card); border-radius: 6px; padding: 18px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); }

/* Workbench footer with the goat */
.site-footer.workbench { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='180'%3E%3Cfilter id='w' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.11' numOctaves='4' seed='11' result='t'/%3E%3CfeColorMatrix in='t' type='saturate' values='0' result='g'/%3E%3CfeComponentTransfer in='g' result='c'%3E%3CfeFuncR type='linear' slope='1.6' intercept='-0.25'/%3E%3CfeFuncG type='linear' slope='1.6' intercept='-0.25'/%3E%3CfeFuncB type='linear' slope='1.6' intercept='-0.25'/%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3CfeFlood flood-color='%238d5a2e' result='f'/%3E%3CfeBlend in='f' in2='c' mode='multiply'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%238d5a2e'/%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"); background-size: 900px 180px; color: #f3e7d3; border-top: 5px solid #3f2412; box-shadow: inset 0 10px 20px -12px rgba(0, 0, 0, .6); }
.site-footer.workbench a { color: #ffe3bf; }
.site-footer.workbench .wrap { align-items: center; }
.burn { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: #2a170b; text-shadow: 0 1px 0 rgba(255, 220, 180, .35), 0 0 6px rgba(0, 0, 0, .35); letter-spacing: .02em; }
.burn .goat { color: #2a170b; filter: drop-shadow(0 1px 0 rgba(255, 220, 180, .35)); }
@media (max-width: 960px) { .stamp { left: auto; right: 2%; bottom: auto; top: -4px; } .pencil-note { transform: none; } }
@media (prefers-reduced-motion: reduce) { .hang, .gallery-item .shot { transition: none; } }

/* Fixes after the first review: square frames, the note beside the receipt, a printed tear-off line */
.shot, .shot img, .matte, .pinned .shot { border-radius: 2px; }
.matte picture { display: block; }
.matte img, .pinned .shot img { border-radius: 0; margin: -12px; width: calc(100% + 24px); max-width: none; clip-path: inset(12px); box-shadow: none; }
.pencil-note.viz-note { position: static; width: auto; max-width: 250px; margin: 0 0 6px 6%; display: flex; align-items: flex-end; gap: 6px; transform: rotate(-2deg); }
.pencil-note .arrow-right { display: none; }
.pencil-note .arrow-down { display: block; flex: none; }
.chip.c1 { left: auto; right: -2%; top: 4px; }
@media (max-width: 1100px) { .chip.c1 { display: none; } }
@media (max-width: 960px) { .pencil-note.viz-note { max-width: 70%; margin-left: 0; } }


/* ============================================================ goatppc.app edition: blueprint iPad, tape measure, lights, chalkboard, crate stencils, email */
/* Tape-measure scroll progress along the top edge */
.tape { position: fixed; top: 0; left: 0; right: 0; height: 9px; z-index: 60; pointer-events: none; }
.tape i { position: relative; display: block; height: 100%; width: var(--p, 0%); background-color: #f2c744;
  background-image: repeating-linear-gradient(90deg, transparent 0 7px, rgba(35, 31, 27, .75) 7px 8px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(35, 31, 27, .9) 39px 41px);
  background-size: 100% 4px, 100% 9px; background-repeat: repeat-x; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: width .12s linear; }
.tape i::after { content: ""; position: absolute; right: -3px; top: -1px; width: 6px; height: 11px; background: #5d5a56; border-radius: 1px; box-shadow: 0 1px 1px rgba(0, 0, 0, .4); }

/* The pull-chain lights switch */
.lights { position: relative; width: 34px; height: 44px; margin-left: 6px; background: none; border: 0; cursor: pointer; padding: 0; flex: none; }
.lights .chain { position: absolute; left: 50%; top: 0; width: 2px; height: 24px; margin-left: -1px; background: repeating-linear-gradient(180deg, #7a736a 0 3px, transparent 3px 5px); transition: height .25s ease; }
.lights .knob { position: absolute; left: 50%; top: 24px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e3d2b3, #6b5a44); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); transition: top .25s ease; }
.lights:hover .chain, .lights.pull .chain { height: 31px; }
.lights:hover .knob, .lights.pull .knob { top: 31px; }
.lights:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[data-lights="off"] { --paper: #26211d; --paper-2: #1f1a16; --card: #342d26; --ink: #f1e8d9; --ink-2: #dbcfbd; --muted: #b3a695; --line: rgba(241, 232, 217, .14);
  --accent: #e08a45; --accent-ink: #ffc28a; --accent-soft: rgba(224, 138, 69, .18); --green: #7dc3ab; --green-soft: rgba(125, 195, 171, .16); --pencil: #dbcfbd;
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 14px 24px -16px rgba(0, 0, 0, .85), 0 40px 60px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .08); color-scheme: dark; }
html[data-lights="off"] body::after { opacity: .14; mix-blend-mode: screen; }
html[data-lights="off"] h1, html[data-lights="off"] h2 { text-shadow: none; }
html[data-lights="off"] .pegboard { background-color: #4a3a2b; }
html[data-lights="off"] .pegboard, html[data-lights="off"] .cork, html[data-lights="off"] .top-edge, html[data-lights="off"] .site-footer.workbench { filter: brightness(.6); }
html[data-lights="off"] .ruler { background-color: #3b332c; }
html[data-lights="off"] .index-cards details { background-color: var(--card); background-image: repeating-linear-gradient(transparent 0 27px, rgba(125, 195, 171, .16) 27px 28px); }
html[data-lights="off"] .btn-primary { background: var(--accent); color: #1d1a17; }
html[data-lights="off"] .btn-primary:hover { background: var(--accent-ink); }
html[data-lights="off"] .lights .chain { background: repeating-linear-gradient(180deg, #d9cdbb 0 3px, transparent 3px 5px); }
html[data-lights="off"] .receipt::before { background: #d8ccb4; }
html[data-lights="off"] .cork .section-head, html[data-lights="off"] .pegboard .section-head { background: var(--card); }

/* Crate stencils numbering the sections */
main { counter-reset: crate; }
main > section .section-head::before { counter-increment: crate; content: "No. " counter(crate, decimal-leading-zero); display: inline-block; font: 800 .7rem/1 "Avenir Next Condensed", "Futura", var(--font-body); letter-spacing: .22em; text-transform: uppercase;
  border: 2px solid currentColor; padding: 5px 9px 4px; border-radius: 3px; transform: rotate(-3deg); opacity: .5; margin: 0 0 14px; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); -webkit-mask-size: 160px 160px; mask-size: 160px 160px; }

/* The stamp slams down */
.stamp { animation: slam .6s cubic-bezier(.2, .9, .3, 1.25) 1.2s both; }
@keyframes slam { 0% { transform: rotate(-9deg) scale(1.9); opacity: 0; } 70% { transform: rotate(-9deg) scale(.95); opacity: .85; } 100% { transform: rotate(-9deg) scale(1); opacity: .78; } }

/* Chalkboard for the math */
.chalkboard { background-color: #2b4a3e; color: #f4efe3; border-block: 12px solid #6b4423;
  background-image: radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, .07), transparent 55%), radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, .05), transparent 50%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), inset 0 0 120px rgba(0, 0, 0, .35); }
.chalkboard .kicker { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.chalkboard .section-head::before { color: #fff; }
.chalkboard h2, .chalkboard h3, .chalkboard .calc-inputs h3, .chalkboard .scard h4 { color: #fff; text-shadow: none; }
.chalkboard .lede, .chalkboard .muted, .chalkboard .calc-note, .chalkboard .cols p, .chalkboard .scard .driver label, .chalkboard .field label, .chalkboard .toggle { color: rgba(255, 255, 255, .82); }
.chalkboard .calc-inputs, .chalkboard .scard { background: rgba(255, 255, 255, .04); border: 2px solid rgba(255, 255, 255, .55); border-radius: 8px; box-shadow: none; color: #fff; }
.chalkboard .scard.best { border-color: #ffd86b; box-shadow: 0 0 0 3px rgba(255, 216, 107, .22); }
.chalkboard .scard .best-badge { background: #ffd86b; color: #2b2b2b; }
.chalkboard .field input, .chalkboard .scard .driver input { background: rgba(255, 255, 255, .08); color: #fff; border: 1px dashed rgba(255, 255, 255, .55); }
.chalkboard .field input:focus, .chalkboard .scard .driver input:focus { outline-color: #ffd86b; }
.chalkboard output { color: #fff; }
.chalkboard .ladder li { color: rgba(255, 255, 255, .82); border-top-color: rgba(255, 255, 255, .25); }
.chalkboard .ladder li span:last-child, .chalkboard .ladder li.final { color: #fff; }
.chalkboard .ladder li.final span:last-child, .chalkboard .calc-note strong { color: #ffd86b; }

/* iPad: real screenshots — a landscape frame beside two portraits, all the same height (4:3 against two 3:4) */
.ipad-stage { display: grid; grid-template-columns: 1.3333fr .75fr .75fr; gap: 22px; align-items: start; margin-bottom: 22px; }
.ipad-gallery { margin-bottom: 22px; }
.ipad-pair { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 44px; }
.ipad-notes { margin-top: 8px; }
@media (max-width: 900px) { .ipad-stage { grid-template-columns: 1fr 1fr; } .ipad-stage .gallery-item:first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .ipad-pair { grid-template-columns: 1fr 1fr; } .ipad-pair .gallery-item:last-child { grid-column: 1 / -1; width: 70%; justify-self: center; } }

/* Email instead of a form */
.mail-card { position: relative; }
.mail-to { font-size: 1.05rem; margin: 0 0 6px; }
.mail-to .hand { font-family: var(--font-hand); color: var(--pencil); margin-right: .35em; font-size: 1.3rem; }
.mail-address { font-family: var(--font-mono); font-weight: 600; color: var(--accent-ink); text-decoration: none; border-bottom: 2px solid var(--accent); }
.mail-body { font-family: var(--font-hand); color: var(--pencil); font-size: 1.35rem; margin: 8px 0 20px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mail-status { min-height: 1.3em; margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } .tape i, .lights .chain, .lights .knob { transition: none; } }
/* Lights off: dark graph paper with the same teal rule as the index cards; only the screenshots dim, the text keeps its contrast */
html[data-lights="off"] .graph { background-color: #211c18; background-image: linear-gradient(rgba(125, 195, 171, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 195, 171, .13) 1px, transparent 1px); }
html[data-lights="off"] .graph .shot { filter: brightness(.7); }
