/* Pitacor site - "Papel e tinta", same tokens as the Web template (Assets/WebGLTemplates/Pitacor/TemplateData/style.css).
   Source: Tools/Site/site.css (copied to Site/assets/site.css by Tools/Site/build_site.py). */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/baloo2-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/baloo2-extrabold.woff2") format("woff2");
}

:root {
  --paper: #FFF6E5;
  --paper-dk: #F0DFC0;
  --ink: #1D1D1D;
  --ink-soft: #4A4036;
  --orange: #FF5A36;
  --amber: #FFB000;
  --sky: #3FA7FF;
  --mint: #4DD4AC;
  --pink: #FF6B9D;
  --violet: #8B6CFF;
  --board: #8A8A8A;
  --font: "Baloo 2", ui-rounded, "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(29, 29, 29, .07) 1.3px, transparent 1.8px);
  background-size: 22px 22px;
  padding: 0 max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left));
}

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, .btn:focus-visible { outline: 4px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 12px;
  font-weight: 800;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ header */

.top { max-width: 880px; margin: 0 auto; padding: 18px 0 6px; }
.top-row { display: flex; align-items: center; gap: 14px; }
.brand { display: block; margin-right: auto; line-height: 0; text-decoration: none; }
.brand img { width: clamp(128px, 32vw, 168px); height: auto; transition: transform .2s var(--pop); }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }
.lang { font-weight: 800; font-size: 16px; white-space: nowrap; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background: var(--orange);
  border: 4px solid var(--ink);
  border-radius: 14px;
  padding: 8px 20px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 18px; }
.tabs a {
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 2px 14px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.tabs a:hover { background: var(--paper-dk); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.tabs a[aria-current="page"] { background: var(--amber); }

@media (max-width: 520px) {
  .top-row { flex-wrap: wrap; }
  .btn-play { font-size: 16px; padding: 6px 14px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px 6px 8px 2px; margin-right: -16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 0 0 auto; }
}

/* ------------------------------------------------------------------ content sheet */

.sheet {
  max-width: 880px;
  margin: 18px auto 0;
  padding: clamp(22px, 5vw, 48px) clamp(18px, 5vw, 56px) clamp(26px, 5vw, 52px);
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--ink);
}

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(34px, 7vw, 52px); margin-bottom: 10px; }
h2 { font-size: clamp(25px, 4.6vw, 32px); margin: 40px 0 12px; }
h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent, var(--orange));
  border: 2px solid var(--ink);
}
section:nth-of-type(6n+2) { --accent: var(--sky); }
section:nth-of-type(6n+3) { --accent: var(--mint); }
section:nth-of-type(6n+4) { --accent: var(--pink); }
section:nth-of-type(6n+5) { --accent: var(--violet); }
section:nth-of-type(6n+6) { --accent: var(--amber); }
h3 { font-size: 21px; margin: 26px 0 6px; }

p, ul, ol, dl, table, figure { margin: 0 0 14px; }
.lead { font-size: clamp(19px, 3.6vw, 22px); color: var(--ink-soft); }
.updated { font-size: 15px; color: var(--ink-soft); }
strong { font-weight: 800; }
small { font-size: 15px; }

ul { padding-left: 0; list-style: none; }
ul > li { position: relative; padding-left: 28px; margin-bottom: 6px; }
ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .55em;
  width: 12px;
  height: 12px;
  border-radius: 58% 42% 55% 45% / 47% 58% 42% 53%;
  background: var(--accent, var(--orange));
  border: 2px solid var(--ink);
}

/* Numbered steps: ink-outlined paint coins. */
ol { padding-left: 0; list-style: none; counter-reset: step; }
ol > li { position: relative; counter-increment: step; padding-left: 50px; margin-bottom: 14px; min-height: 36px; }
ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent, var(--amber));
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 800;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
}

code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; padding: 1px 6px; background: var(--paper); border: 2px solid var(--paper-dk); border-radius: 6px; word-break: break-all; }

kbd {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  padding: 0 7px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 7px;
  box-shadow: 2px 2px 0 var(--ink);
}

.note {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  rotate: -.4deg;
}
.note > :last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: separate; border-spacing: 0; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 2px solid var(--paper-dk); }
th { font-weight: 800; background: var(--paper); }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ------------------------------------------------------------------ hero (About) */

.hero { display: flex; align-items: center; gap: 22px; margin-bottom: 8px; }
.hero > div { flex: 1 1 auto; }
.hero img { flex: 0 0 auto; width: clamp(110px, 24vw, 180px); height: auto; rotate: 6deg; }
@media (max-width: 520px) { .hero { flex-direction: column-reverse; align-items: flex-start; } }

/* ------------------------------------------------------------------ scoring diagram (real palette) */

.score-fig { margin: 20px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.score-grid {
  display: grid;
  grid-template-columns: repeat(5, 46px);
  grid-auto-rows: 46px;
  gap: 3px;
  padding: 10px;
  background: var(--board);
  border: 4px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
}
.score-grid i { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-style: normal; }
.score-grid b {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--ink);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}
.score-grid .z0 { outline: 4px solid var(--ink); outline-offset: -2px; }
.score-grid .z0 b { background: var(--amber); font-size: 16px; }
.score-grid .z2 b { opacity: .85; }
.score-fig figcaption { flex: 1 1 220px; font-weight: 800; color: var(--ink-soft); }
@media (max-width: 400px) { .score-grid { grid-template-columns: repeat(5, 38px); grid-auto-rows: 38px; } }

/* ------------------------------------------------------------------ footer */

.foot { max-width: 880px; margin: 0 auto; padding: 34px 0 40px; text-align: center; }
.foot p { margin: 0 0 12px; }
.foot-play { margin-bottom: 22px !important; }
.foot-links { font-weight: 800; }
.foot-links a { white-space: nowrap; }
.foot-small { font-size: 15px; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
