/* The static pages (guides, the number generator, prices, privacy, terms): readable first, no JavaScript
   except the number generator. Same palette and faces as the app. */
@font-face { font-family: "Fredoka"; src: url(/fonts/fredoka.woff2) format("woff2"); font-weight: 300 700; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: Figtree; src: url(/fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
:root { --tomato: #ef4a37; --tomato-d: #c23523; --mint: #6fcfae; --mint-l: #c3ecdd; --butter: #ffd75e; --butter-l: #fff0b3; --sky: #7cb7ff; --sky-l: #cfe4ff;
  --ink: #1d1b22; --paper: #fbf6ec; --paper-d: #ece2cf; --muted: #5c5763;
  --display: "Fredoka", Figtree, ui-rounded, system-ui, sans-serif; --body: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
body { background-image: radial-gradient(rgba(29, 27, 34, .06) 1.1px, transparent 1.5px); background-size: 9px 9px; overflow-x: hidden; }
.top { display: flex; align-items: center; gap: 14px; max-width: 980px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--ink); font: 700 20px/1 var(--display); white-space: nowrap; }
.brand img { width: 38px; height: 38px; }
.links { display: none; gap: 18px; } .links a { font: 600 16px/1 var(--display); text-decoration: none; color: var(--ink); padding: 12px 2px; }
@media (min-width: 820px) { .links { display: flex; } }
.top .cta { margin-left: auto; }
main { max-width: 760px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
a { color: var(--ink); text-decoration-color: var(--tomato); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #3f7fd6; outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(36px, 5vw + 18px, 60px); margin: 10px 0 14px; }
h1 .hl { color: var(--tomato); text-shadow: .045em .04em 0 var(--ink); }
h2 { font-size: clamp(25px, 1.6vw + 19px, 34px); margin: 40px 0 12px; }
h3 { font-size: 21px; margin: 26px 0 8px; }
p, li { text-wrap: pretty; } p, ul, ol { margin: 0 0 16px; } li + li { margin-top: 6px; }
b, strong { font-weight: 700; }
.lede { font-size: clamp(18px, .6vw + 16px, 21px); }
.muted { color: var(--muted); } .small { font-size: 14px; }
.cta, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 3px solid var(--ink); border-radius: 14px;
  background: var(--tomato); color: var(--paper); font: 600 17px/1.1 var(--display); text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.cta:active, .btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.top .cta { min-height: 44px; padding: 8px 14px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.box { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 18px 20px; margin: 22px 0; box-shadow: 0 0 0 5px var(--paper), 6px 7px 0 5px rgba(29, 27, 34, .14); }
.box.butter { background: var(--butter-l); } .box.mint { background: var(--mint-l); } .box.sky { background: var(--sky-l); }
.box > :last-child { margin-bottom: 0; }
.box h2:first-child, .box h3:first-child { margin-top: 0; }
ol.steps { padding-left: 1.5em; } ol.steps li::marker { font: 700 1.1em var(--display); color: var(--tomato); }
ul.ideas { padding-left: 1.2em; } ul.ideas li::marker { color: var(--tomato); }
table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 16px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--paper-d); vertical-align: top; }
th { font: 600 15px/1.2 var(--display); border-bottom: 3px solid var(--ink); }
.table-wrap { overflow-x: auto; }
details { border-top: 2.5px solid var(--ink); padding: 4px 0; } details:last-of-type { border-bottom: 2.5px solid var(--ink); }
summary { font: 600 18px/1.3 var(--display); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 24px; }
.toc a { border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 12px; text-decoration: none; font: 600 14px/1.2 var(--display); min-height: 36px; display: inline-flex; align-items: center; background: var(--paper); }
.play { margin: 30px 0; text-align: center; }
.play p { margin-bottom: 10px; }
.foot { max-width: 980px; margin: 0 auto; padding: 26px 16px 40px; border-top: 3px solid var(--ink); font-size: 15px; }
.foot ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.foot .more { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
/* The number generator */
.tool { display: grid; gap: 18px; }
.tool textarea { width: 100%; min-height: 160px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); font: 17px/1.5 var(--body); color: var(--ink); resize: vertical; }
.tool label { display: block; font: 600 17px/1.3 var(--display); margin-bottom: 6px; }
.tool .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool input[type=number] { width: 100px; min-height: 48px; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 12px; background: var(--paper); font: 600 18px var(--display); }
.hatbox { position: relative; width: min(280px, 70vw); margin: 70px auto 0; }
.hatbox button { display: block; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; }
.results { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.results li { display: flex; gap: 10px; align-items: center; min-height: 48px; padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); font-weight: 600; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.results li b { font: 700 22px/1 var(--display); min-width: 1.4em; color: var(--tomato-d); }
.tool-sound { width: 44px; height: 44px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); display: grid; place-items: center; cursor: pointer; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .top, .foot, .play, .toc { display: none !important; } body { background: none; } .box { box-shadow: none; } }
