/* Pixel Pete — pixelpete.hausofbean.com. Figma: "Pixel Pete — Website".
 * Tokens mirror app/pixelpete/motion/palette.py (tests/test_site.py checks they match).
 * Rule from the palette: one orange thing per screen. Ink and cream do the rest. */

@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/static/fonts/Silkscreen-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/static/fonts/Silkscreen-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1a120e;
  --panel: #110b08;
  --edge: #342822;
  --grid: #261c17;
  --charcoal: #4b413b;
  --muted: #8a7e74;
  --cream: #ece7da;
  --orange: #ff8a3d;
  --sun: #ff9a52;
  --ember: #462614;
  --buy: #2fb86a;
  --wait: #ffc23d;
  --skip: #e5484d;
  --hard: 4px 4px 0 var(--ink);
  --gutter: 16px;
  --max: 1120px;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --mono: "Cascadia Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--wait); outline-offset: 2px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px { font-family: var(--pixel); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* --- top bar and footer ------------------------------------------------------------------ */
.bar { background: var(--orange); color: var(--ink); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 18px; letter-spacing: .02em; }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.nav { display: flex; gap: 20px; font-weight: 700; font-size: 14px; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.nav .wide { display: none; }

.foot { border-top: 1px solid var(--edge); margin-top: 48px; padding: 32px 0 40px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 700; color: var(--cream); font-size: 14px; margin-bottom: 10px; }
.foot nav a, .foot p a { text-decoration: none; }
.foot p { margin: 6px 0; line-height: 1.5; }

/* --- buttons and chips ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 14px/1 "Inter", sans-serif; padding: 11px 14px; border-radius: 6px;
  text-decoration: none; border: 2px solid var(--edge); color: var(--cream); background: transparent; cursor: pointer;
}
.btn.solid { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn.cta {
  width: 100%; background: var(--orange); color: var(--ink); border: 2px solid var(--ink);
  font-weight: 900; font-size: 17px; padding: 16px; border-radius: 8px; box-shadow: var(--hard);
}
.btn.cta.dark { background: var(--ink); color: var(--cream); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.verdict {
  display: inline-block; font: 900 12px/1 "Inter", sans-serif; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); padding: 5px 8px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.verdict.buy { background: var(--buy); } .verdict.wait { background: var(--wait); } .verdict.skip { background: var(--skip); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 13px; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 2px solid var(--edge); font-weight: 700; font-size: 13px; text-decoration: none; }
.chip[aria-current="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.dot { width: 8px; height: 8px; display: inline-block; }
.dot.buy { background: var(--buy); } .dot.wait { background: var(--wait); } .dot.skip { background: var(--skip); }

/* --- Pete and his speech bubble ---------------------------------------------------------- */
.sun { background: var(--orange) url("/brand/endcard-bg.png") center / cover no-repeat; color: var(--ink); }
.says { display: flex; align-items: center; gap: 14px; }
.says .pete { width: 120px; height: 120px; flex: none; image-rendering: pixelated; }
.bubble {
  position: relative; flex: 1; background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: var(--hard); padding: 12px 14px 14px; font-weight: 500; font-size: 15px; line-height: 1.4;
}
.bubble::before { content: ""; position: absolute; left: -11px; top: 50%; width: 10px; height: 10px; background: var(--cream); border: 3px solid var(--ink); transform: translateY(-50%); }
.bubble .px { color: var(--orange); font-size: 12px; display: block; margin-bottom: 4px; }
.bubble p { margin: 0; }

/* --- home hero --------------------------------------------------------------------------- */
.hero { padding-top: 28px; padding-bottom: 32px; }
.hero h1 { font-weight: 900; font-size: 36px; line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px; text-align: center; }
.hero .socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
/* Grid and flex children default to min-width: auto, so one long word or a 100%-wide input
   can push a column past the phone's edge. Let them shrink instead. */
.hero-grid > *, .says > *, .card > *, .split > *, .two > *, .article-grid > *, .landing .grid > *, .inline-guide > *, .guide .top > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }

/* --- the guide card and its cartridge ---------------------------------------------------- */
.guide { background: var(--panel); border: 2px solid var(--orange); border-radius: 12px; padding: 20px; color: var(--cream); }
.guide .eyebrow { color: var(--wait); font-size: 13px; }
.guide h2 { font-weight: 900; font-size: 24px; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
.guide h2 a { text-decoration: none; }
.guide .top { display: flex; align-items: center; gap: 16px; margin: 14px 0 16px; }
.promises { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.promises li { display: flex; gap: 10px; align-items: baseline; font-weight: 500; font-size: 15px; line-height: 1.35; }
.promises li::before { content: ""; width: 10px; height: 10px; background: var(--buy); flex: none; transform: translateY(1px); }
.cart {
  width: 104px; flex: none; background: var(--charcoal); padding: 7px 8px 9px; border-radius: 3px 12px 3px 3px;
  box-shadow: 5px 5px 0 var(--ink); transform: rotate(-4deg);
}
.cart .ridges { display: flex; gap: 4px; justify-content: center; margin-bottom: 6px; }
.cart .ridges i { width: 12px; height: 3px; background: rgba(26, 18, 14, .5); }
.cart .label { background: var(--ink); color: var(--cream); border-radius: 3px; overflow: hidden; }
.cart .art { height: 44px; background: var(--orange) url("/brand/endcard-bg.png") center 70% / 260% no-repeat; }
.cart .label div { padding: 5px 6px 7px; }
.cart .label .px { color: var(--sun); font-size: 7px; display: block; }
.cart .label b { display: block; font-weight: 900; font-size: 10px; line-height: 1.1; }
.cart.big { width: 200px; }
.cart.big .art { height: 80px; }
.cart.big .label .px { font-size: 9px; }
.cart.big .label b { font-size: 16px; }
.cart.big .ridges i { width: 22px; height: 4px; }

form.get { display: grid; gap: 12px; }
form.get label.px { font-size: 12px; }
input[type="email"] {
  width: 100%; font: 400 16px/1.2 "Inter", sans-serif; padding: 14px; border-radius: 8px;
  background: var(--ink); color: var(--cream); border: 2px solid var(--edge);
}
input[type="email"]::placeholder { color: var(--muted); }
form.contact input[type="text"], form.contact textarea {
  width: 100%; font: 400 16px/1.4 "Inter", sans-serif; padding: 14px; border-radius: 8px;
  background: var(--ink); color: var(--cream); border: 2px solid var(--edge); resize: vertical;
}
form.contact label.px { margin-top: 4px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
.error { background: var(--skip); color: var(--ink); font-weight: 700; padding: 10px 12px; border-radius: 6px; font-size: 14px; }

/* --- sections ---------------------------------------------------------------------------- */
section { padding-top: 36px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.head h2, .title { font-weight: 900; font-size: 26px; letter-spacing: -.02em; margin: 0; }
h1.title { font-size: 36px; margin: 6px 0 10px; }
.head a { color: var(--sun); font-weight: 700; font-size: 14px; text-decoration: none; }
.disclosure { font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.4; }
.disclosure.box { background: var(--panel); border: 1px solid var(--edge); border-radius: 8px; padding: 10px 12px; color: rgba(236, 231, 218, .75); }

/* --- gear cards -------------------------------------------------------------------------- */
.gear { display: grid; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 12px; display: flex; gap: 14px; }
.card .photo { width: 84px; height: 84px; border-radius: 8px; background: var(--ember); flex: none; object-fit: cover; }
.card.skip .photo { opacity: .5; }
.card .body { flex: 1; display: grid; gap: 6px; align-content: start; }
.card h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; }
.card p { margin: 0; font-size: 13px; color: rgba(236, 231, 218, .75); line-height: 1.35; }
.card .row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.card .row .btn { padding: 9px 12px; font-size: 13px; }
.empty { color: var(--muted); padding: 16px 0; }

/* --- posts ------------------------------------------------------------------------------- */
.post-card { display: block; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; text-decoration: none; }
.post-card .thumb { background: var(--grid); padding: 22px 16px; font-family: var(--mono); color: var(--sun); font-size: 13px; text-align: center; }
.post-card .thumb span { display: block; color: var(--buy); font-size: 12px; margin-top: 6px; }
.post-card .meta { padding: 12px 16px 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.post-card h3 { margin: 6px 16px 16px; font-size: 19px; line-height: 1.25; }
.quests { list-style: none; padding: 0; margin: 0; }
.quests li a { display: flex; gap: 12px; padding: 14px 0; border-bottom: 2px solid var(--edge); text-decoration: none; }
.quests .date { font-family: var(--mono); color: var(--muted); font-size: 13px; padding-top: 2px; }
.quests .px { font-size: 11px; color: var(--sun); }
.quests b { display: block; font-size: 16px; line-height: 1.3; }

/* --- about / player 2 / hire ------------------------------------------------------------- */
.about { background: var(--ember); border-radius: 12px; padding: 20px; display: grid; gap: 14px; }
.about .who { display: flex; align-items: center; gap: 12px; }
.about .who .photo { width: 88px; height: 88px; flex: none; border-radius: 10px; border: 3px solid var(--sun); background: var(--charcoal); object-fit: cover; }
.about .who .badge { width: 40px; height: 40px; image-rendering: pixelated; }
.about h3 { margin: 0; font-weight: 900; font-size: 18px; }
.about .role { color: var(--sun); font-weight: 500; font-size: 13px; }
.about p { margin: 0; line-height: 1.45; }
.skills { display: grid; gap: 7px; }
.skills .px { color: var(--sun); font-size: 12px; }
.skill { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: rgba(236, 231, 218, .7); }
.skill span { width: 96px; }
.bars { display: flex; gap: 3px; }
.bars i { width: 15px; height: 9px; background: var(--ink); }
.bars i.on { background: var(--sun); }
.hire { display: grid; gap: 10px; border-top: 1px solid rgba(255, 138, 61, .4); padding-top: 14px; }
.hire.box { border: 2px solid var(--orange); border-radius: 12px; padding: 18px; background: var(--ember); }
.two .hire.box { margin-top: 24px; }
.hire .px { color: var(--sun); font-size: 12px; }
.hire b { font-size: 18px; }
.hire p { margin: 0; color: rgba(236, 231, 218, .8); font-size: 14px; }
.hire .btn { justify-self: start; }

.sun-flat { background: var(--orange); color: var(--ink); }
.lede { font-weight: 500; font-size: 17px; line-height: 1.45; margin: 0; }
.about-hero h1 { text-align: left; font-size: 32px; margin: 18px 0 10px; }
/* pete-cutout.png is 1280px square with its art in x 128-1152, y 320-1280: the negative margins
   trim that padding so Pete sits flush with the heading. */
.about-hero .says { --p: 160px; }
.hero.about-hero .says .pete { width: var(--p); height: var(--p); margin: calc(var(--p) * -.25) calc(var(--p) * -.1) 0; }
@media (min-width: 720px) { .about-hero .says { --p: 200px; } }

/* --- landing page ------------------------------------------------------------------------ */
.landing { padding-top: 20px; padding-bottom: 28px; }
.landing .fine { color: var(--ink); opacity: .75; }
.crumbs { font-size: 12px; font-weight: 500; opacity: .7; margin: 0 0 12px; }
.crumbs a { text-decoration: none; }
.landing .px.eyebrow { font-size: 13px; }
.landing h1 { font-weight: 900; font-size: 34px; line-height: 1.02; letter-spacing: -.02em; margin: 10px 0 14px; }
.landing .lede { font-weight: 500; font-size: 16px; line-height: 1.45; margin: 0; }
.landing form.get { margin-top: 22px; }
.landing input[type="email"] { background: var(--cream); color: var(--ink); border-color: var(--ink); }
.landing input[type="email"]::placeholder { color: var(--charcoal); }
.preview { display: flex; justify-content: center; align-items: center; padding: 28px 0 8px; }
.preview .sheets { display: flex; margin-left: -28px; }
.sheet { width: 82px; background: var(--cream); padding: 8px; box-shadow: 4px 4px 0 var(--ink); display: grid; gap: 5px; margin-left: -28px; }
.sheet:nth-child(1) { transform: rotate(4deg); } .sheet:nth-child(2) { transform: rotate(-2deg); } .sheet:nth-child(3) { transform: rotate(6deg); }
.sheet .px { color: var(--orange); font-size: 6px; }
.sheet i { height: 4px; background: rgba(26, 18, 14, .25); }
.sheet i.hl { background: rgba(255, 138, 61, .6); }
.toc { list-style: none; padding: 0; margin: 0; }
.toc li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--edge); font-weight: 500; }
.toc .n { font-family: var(--mono); color: var(--sun); font-size: 13px; }
.toc .t { flex: 1; }
.toc .p { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; font-weight: 500; line-height: 1.4; }
.ticks li::before { content: ""; width: 10px; height: 10px; background: var(--buy); flex: none; }
.faq { display: grid; gap: 12px; }
.faq div { background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 14px 16px; }
.faq b { display: block; margin-bottom: 6px; }
.faq p { margin: 0; color: rgba(236, 231, 218, .75); font-size: 14px; line-height: 1.45; }
.author { background: var(--ember); border-radius: 12px; padding: 16px; display: flex; gap: 14px; }
.author .photo { width: 52px; height: 52px; border-radius: 50%; background: var(--charcoal); flex: none; }
.author p { margin: 4px 0 0; color: rgba(236, 231, 218, .8); font-size: 14px; }
.price { font-weight: 900; font-size: 22px; }

/* --- thank-you --------------------------------------------------------------------------- */
.unlocked { padding-top: 28px; padding-bottom: 32px; text-align: center; }
.unlocked .px.big { font-size: 22px; margin-bottom: 16px; display: block; }
.unlocked .says { text-align: left; margin-bottom: 18px; }

/* --- article ----------------------------------------------------------------------------- */
.article { padding-top: 28px; max-width: 700px; }
.article .px.eyebrow { color: var(--sun); font-size: 12px; }
.article h1 { font-weight: 900; font-size: 32px; line-height: 1.04; letter-spacing: -.02em; margin: 10px 0 14px; }
.byline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.byline img { width: 32px; height: 32px; image-rendering: pixelated; }
.video { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 12px 16px 12px 12px; margin: 16px 0; text-decoration: none; }
.video .thumb { width: 72px; height: 128px; border-radius: 6px; background: var(--orange) url("/brand/endcard-bg.png") center / cover; display: grid; place-items: center; flex: none; }
.video .thumb span { background: var(--ink); color: var(--cream); border-radius: 999px; padding: 6px 9px 6px 11px; font-size: 13px; }
.prose { font-size: 17px; line-height: 1.6; color: rgba(236, 231, 218, .92); }
.prose h1, .prose h2 { font-weight: 900; font-size: 24px; letter-spacing: -.01em; color: var(--cream); margin: 28px 0 10px; line-height: 1.2; }
.prose h3 { font-size: 19px; margin: 22px 0 8px; color: var(--cream); }
.prose a { color: var(--sun); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--edge); border-radius: 4px; padding: 1px 5px; }
.prose pre { background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 13px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose blockquote { margin: 18px 0; padding: 12px 16px; background: var(--ember); border-left: 4px solid var(--orange); border-radius: 0 8px 8px 0; }
.prose blockquote p { margin: 0; }
.prose img, .prose figure img { border-radius: 10px; border: 1px solid var(--edge); }
.prose figure { margin: 18px 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.prose li.task { list-style: none; margin-left: -22px; display: flex; gap: 10px; }
.prose li.task .box { width: 14px; height: 14px; border: 2px solid var(--cream); flex: none; transform: translateY(5px); }
.prose li.task.done .box { background: var(--buy); border-color: var(--buy); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--edge); padding: 8px 6px; text-align: left; }
/* Pygments classes (markdown.py), in Pete's code colours (types/howto/draw.py) */
.k, .kd, .kn, .kr, .kt, .kc, .ow { color: var(--orange); }
.nf, .nc, .nb { color: var(--wait); }
.s, .s1, .s2, .sa, .sb, .sd, .ss, .dl { color: #f2c38b; }
.si, .mi, .mf, .m { color: var(--sun); }
.c, .c1, .cm, .cs, .ch { color: var(--muted); font-style: italic; }
.inline-guide { display: flex; gap: 14px; align-items: center; background: var(--ember); border: 2px solid var(--orange); border-radius: 12px; padding: 14px; margin: 24px 0; text-decoration: none; }
.inline-guide .px { color: var(--wait); font-size: 11px; }
.inline-guide b { display: block; font-size: 15px; line-height: 1.35; margin: 6px 0 10px; }
.inline-guide .btn { padding: 11px 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); border-radius: 6px; width: auto; }
.share { color: var(--muted); font-weight: 700; font-size: 14px; }

.legal { max-width: 700px; padding-top: 28px; }
.legal h1 { font-weight: 900; font-size: 32px; letter-spacing: -.02em; }
.legal p, .legal li { line-height: 1.6; color: rgba(236, 231, 218, .9); }

/* --- wider screens ----------------------------------------------------------------------- */
@media (min-width: 720px) {
  .gear.grid { grid-template-columns: repeat(2, 1fr); }
  .faq { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  :root { --gutter: 40px; }
  .nav .wide { display: inline; }
  .nav { gap: 32px; font-size: 15px; }
  .bar .wrap { padding-top: 18px; padding-bottom: 18px; }
  .brand { font-size: 20px; }
  .brand img { width: 36px; height: 36px; }
  .hero { padding-top: 56px; padding-bottom: 64px; }
  .hero-grid { grid-template-columns: 1fr 460px; align-items: center; gap: 56px; }
  .hero h1 { font-size: 60px; text-align: left; letter-spacing: -.03em; }
  .hero .socials { justify-content: flex-start; }
  .hero .says .pete { width: 180px; height: 180px; }
  .hero .bubble { font-size: 18px; }
  .hero .guide { border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
  section { padding-top: 64px; }
  .head h2, .title { font-size: 36px; }
  h1.title { font-size: 52px; }
  .gear.grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .gear.grid .card { flex-direction: column; }
  .gear.grid .card .photo { width: 100%; height: auto; aspect-ratio: 1; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .landing { padding-top: 56px; padding-bottom: 64px; }
  .landing .grid { display: grid; grid-template-columns: 1fr 480px; gap: 64px; align-items: center; }
  .landing h1 { font-size: 52px; }
  .landing .lede { font-size: 19px; }
  .landing form.get { max-width: 520px; }
  .two { display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: start; }
  .article-grid { display: grid; grid-template-columns: 700px 1fr; gap: 64px; align-items: start; }
  .article-grid aside { position: sticky; top: 24px; padding-top: 28px; display: grid; gap: 20px; }
  .article h1 { font-size: 46px; }
  .about-hero h1 { font-size: 52px; }
}
