/* VPPA doodle kit — the sketchbook style from the recording whiteboards and the living-room TV launcher:
   paper + dot grid, black ink, one crimson accent, Archivo (condensed caps) + Caveat (handwriting),
   rough.js frames drawn by doodle.js. Shared by the doodle homepage draft and prospect pages.
   Fonts: pages link Google Fonts "Archivo:wdth,wght@62..125,300..800" + "Caveat:wght@500;700". */

:root {
  --paper: #eeeadf; --paper2: #f7f3ea; --paper3: #e4dfd1;
  --ink: #1c1b18; --soft: #5c5850; --faint: #8f897c;
  --acc: #b3243b; --acc-soft: rgba(179, 36, 59, .14); --acc-mid: rgba(179, 36, 59, .32);
  --on-acc: #fbf7ef;
  --dot: rgba(28, 27, 24, .12);
  --tape: rgba(255, 255, 255, .55);
  --cond: "Archivo", "Arial Narrow", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
/* Chalkboard variant (theme toggle) */
.dark {
  --paper: #1b1a17; --paper2: #252320; --paper3: #2e2c28;
  --ink: #ece6d8; --soft: #b0a999; --faint: #7d776b;
  --acc: #e8566a; --acc-soft: rgba(232, 86, 106, .16); --acc-mid: rgba(232, 86, 106, .36);
  --on-acc: #1b1a17;
  --dot: rgba(236, 230, 216, .09);
  --tape: rgba(255, 255, 255, .12);
}

html { background: var(--paper); scroll-behavior: smooth; overflow-x: clip; }
body.dd {
  margin: 0; overflow-x: clip; color: var(--ink); font-family: var(--cond); font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.2px);
  background-size: 28px 28px;
  transition: background-color .3s, color .3s;
}
.dd *, .dd *::before, .dd *::after { box-sizing: border-box; }
.dd img { max-width: 100%; display: block; }
.dd a { color: inherit; text-decoration: none; }
.dd ::selection { background: var(--acc); color: var(--on-acc); }

/* ---------- type ---------- */
.dd-cond { font-variation-settings: "wdth" 62; font-weight: 720; text-transform: uppercase; letter-spacing: -.01em; line-height: .9; }
.dd-hand { font-family: var(--hand); font-weight: 600; }
.dd-acc { color: var(--acc); }
.dd-soft { color: var(--soft); }
.dd-label { font-variation-settings: "wdth" 100; font-weight: 650; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.dd-mark { background: linear-gradient(transparent 55%, var(--acc-mid) 55%, var(--acc-mid) 90%, transparent 90%); padding: 0 .08em; }

/* section header: big handwritten number + condensed caps label (whiteboard .sec) */
.dd-sec { display: flex; align-items: flex-end; gap: 14px; }
.dd-sec .n { font-family: var(--hand); font-weight: 700; font-size: 84px; line-height: .7; color: var(--acc); }
.dd-sec .t { font-variation-settings: "wdth" 70; font-weight: 700; font-size: 20px; letter-spacing: .16em; text-transform: uppercase; padding-bottom: 4px; }

/* ---------- rough frames (doodle.js injects svg.rf as first child) ---------- */
[data-rough] { position: relative; isolation: isolate; }
svg.rf { position: absolute; z-index: -1; overflow: visible; pointer-events: none; }
svg.rf .st { color: var(--rf-stroke, var(--ink)); }
svg.rf .fl { color: var(--rf-fill, var(--paper2)); }
svg.rf .sh { color: var(--rf-shadow, var(--ink)); }
svg.rf .st path { transition: stroke-dashoffset 1.2s var(--ease); }
[data-rough].dd-pending svg.rf .st path { stroke-dashoffset: var(--len) !important; }
[data-rough].dd-pending svg.rf .fl, [data-rough].dd-pending svg.rf .sh { opacity: 0; }
svg.rf .fl, svg.rf .sh { transition: opacity .6s var(--ease) .35s; }

/* ---------- buttons ---------- */
.dd .dd-btn, .dd-btn {
  display: inline-flex; align-items: center; gap: .55em; cursor: pointer; border: 0; background: none;
  font-family: var(--cond); font-variation-settings: "wdth" 80; font-weight: 700; font-size: 18px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--on-acc); padding: 15px 28px 14px;
  --rf-fill: var(--acc); --rf-stroke: var(--ink);
  transition: transform .25s var(--ease);
}
.dd-btn:hover { transform: translate(-2px, -2px) rotate(-1deg); }
.dd-btn:active { transform: translate(1px, 1px); }
.dd-btn svg.arr { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dd .dd-btn.ghost, .dd-btn.ghost { color: var(--ink); --rf-fill: transparent; }
.dd-btn.sm { font-size: 15px; padding: 10px 18px 9px; }
.dd-btn.lg { font-size: 21px; padding: 19px 36px 18px; }

/* ---------- doodle icons (100x100 viewBox) ---------- */
.ic { display: block; overflow: visible; filter: url(#dd-wob); width: 100%; height: 100%; }
.ic * { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ic .t { stroke-width: 2; }
.ic .fa { fill: var(--acc); stroke: none; }
.ic .fs { fill: var(--acc-soft); }
.ic .fp { fill: var(--paper2); }
.ic .fi { fill: var(--ink); stroke: none; }
.ic .sa { stroke: var(--acc); }
.ic text { fill: var(--acc); stroke: none; font-family: var(--hand); font-weight: 700; }

/* ---------- taped paper note ---------- */
.dd-note { position: relative; background: var(--paper2); padding: 30px 28px 26px; transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 18px 32px -20px rgba(0,0,0,.45); }
.dd-note::before { content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; transform: translateX(-50%) rotate(-3deg);
  background: var(--tape); border: 1px solid rgba(0,0,0,.05); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- stamp ---------- */
.dd-stamp { transform: rotate(-12deg); }
.dd-stamp svg { width: 100%; height: 100%; overflow: visible; filter: url(#dd-wob); }
.dd-stamp circle { fill: none; stroke: var(--acc); stroke-width: 3; }
.dd-stamp text { fill: var(--acc); font-family: var(--cond); font-variation-settings: "wdth" 80; font-weight: 650; font-size: 13px; letter-spacing: 2.2px; }
.dd-stamp .sv { font-family: var(--hand); font-weight: 700; font-size: 46px; letter-spacing: 0; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(22px) rotate(var(--rr, 0deg)); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: rotate(var(--rr, 0deg)); }
.dd-note.rv { transform: translateY(22px) rotate(var(--r, 0deg)); }
.dd-note.rv.in { transform: rotate(var(--r, 0deg)); }

/* ---------- range slider (hand-drawn) ---------- */
input[type=range].dd-range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; outline: none; cursor: pointer; }
input[type=range].dd-range::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: var(--ink); }
input[type=range].dd-range::-moz-range-track { height: 3px; border-radius: 3px; background: var(--ink); }
input[type=range].dd-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 22px; margin-top: -10px; border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%; background: var(--acc); border: 2.5px solid var(--ink); transform: rotate(-8deg); }
input[type=range].dd-range::-moz-range-thumb { width: 22px; height: 20px; border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%; background: var(--acc); border: 2.5px solid var(--ink); }
input[type=range].dd-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--acc-soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .dd-note.rv { opacity: 1 !important; transform: rotate(var(--r, var(--rr, 0deg))) !important; transition: none !important; }
  svg.rf .st path { transition: none !important; }
  .dd-btn { transition: none; }
}
