:root {
  --paper: #FFF8EC;
  --card: #FBF5E6;
  --ink: #1B1A17;
  --muted: #6B6253;
  --line: #E7DCC6;
  --red: #C8102E;
  --blue: #1F4E9C;
  --yellow: #F2B705;
  --green: #1E7B34;
  --orange: #E06A00;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
a { color: var(--blue); font-weight: 700; }
a:hover { color: #163A75; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.display { font-family: 'Alfa Slab One', Georgia, serif; font-weight: 400; letter-spacing: 0.2px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 12px; }
.brand { font-family: 'Alfa Slab One', Georgia, serif; font-size: 28px; color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--red); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border: 3px solid var(--ink); border-radius: 14px;
  background: var(--red); color: #fff; text-decoration: none;
  font-family: 'Alfa Slab One', Georgia, serif; font-size: 18px; font-weight: 400;
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
}
.btn:hover { color: #fff; transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.secondary:hover { color: var(--ink); }
.btn[aria-disabled="true"] { background: var(--card); color: var(--muted); box-shadow: none; cursor: default; transform: none; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.02; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead { font-size: 20px; color: #3D382F; margin: 0 0 28px; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .note { font-size: 14px; color: var(--muted); font-weight: 600; }

/* Score card */
.scorecard {
  width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 5 / 7;
  border: 6px solid var(--ink); border-radius: 18px; background: var(--card); padding: 10px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 7px 7px 0 var(--ink); transform: rotate(-3deg);
}
.scorecard .face { position: relative; flex: 1; border: 3px solid var(--ink); border-radius: 8px; background: var(--yellow); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.scorecard .num { position: absolute; top: 8px; left: 12px; font-family: 'Alfa Slab One', Georgia, serif; font-size: 56px; line-height: 1; color: var(--ink); }
.scorecard .verdict { position: absolute; right: -8px; bottom: 22px; transform: rotate(-12deg); border: 4px solid var(--red); border-radius: 8px; padding: 2px 10px; background: var(--card); color: var(--red); font-family: 'Alfa Slab One', Georgia, serif; font-size: 18px; }
.scorecard .label { border: 3px solid var(--ink); border-radius: 8px; padding: 6px 4px; text-align: center; font-family: 'Alfa Slab One', Georgia, serif; font-size: 20px; letter-spacing: 1px; }
.scorecard .icon { width: 58%; height: auto; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-family: 'Alfa Slab One', Georgia, serif; font-weight: 400; font-size: clamp(28px, 4.5vw, 40px); line-height: 1.1; margin: 0 0 24px; }
h3 { font-size: 20px; margin: 0 0 6px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 22px; }
.step .n { display: inline-flex; width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: var(--paper); align-items: center; justify-content: center; font-family: 'Alfa Slab One', Georgia, serif; margin-bottom: 12px; }
.step p { margin: 0; color: #3D382F; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pillar { display: flex; gap: 16px; align-items: flex-start; }
.pillar .oct { flex-shrink: 0; width: 56px; height: 56px; background: var(--ink); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); display: flex; align-items: center; justify-content: center; color: #fff; }
.pillar p { margin: 0; color: #3D382F; }
.scale { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.scale span { flex: 1; }
.scale span:nth-child(1) { background: var(--red); }
.scale span:nth-child(2) { background: var(--orange); }
.scale span:nth-child(3) { background: var(--yellow); }
.scale span:nth-child(4) { background: var(--green); }
.scale-labels + .pillars { margin-top: 28px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }

/* Prose pages */
.prose { padding: 24px 0 72px; }
.prose h1 { font-family: 'Alfa Slab One', Georgia, serif; font-weight: 400; font-size: clamp(32px, 6vw, 48px); line-height: 1.1; margin: 16px 0 8px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose .updated { color: var(--muted); font-weight: 600; font-size: 15px; }
.prose li { margin-bottom: 6px; }

/* Footer */
footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

/* Reto */
.reto { min-height: 100vh; background: var(--yellow); }
.reto .wrap { max-width: 480px; padding-bottom: 40px; }
.reto .top { padding-bottom: 8px; }
.reto .badge { font-size: 12px; font-weight: 800; background: var(--ink); color: var(--yellow); border-radius: 999px; padding: 6px 12px; letter-spacing: 1px; }
.reto .who { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; line-height: 1.3; margin: 8px 0 20px; }
.reto .avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.reto .scorecard { max-width: 220px; margin-bottom: 26px; }
.reto .scorecard .face { background: #E9DFC8; }
.reto .scorecard.revealed .face { background: var(--face, var(--yellow)); }
.reto .scorecard.revealed { animation: flip .45s ease-out; }
@keyframes flip { from { transform: rotate(-3deg) rotateY(90deg); } to { transform: rotate(-3deg) rotateY(0); } }
.panel { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.panel label { font-family: 'Alfa Slab One', Georgia, serif; font-size: 21px; }
.guess { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.guess output { font-family: 'Alfa Slab One', Georgia, serif; font-size: 56px; line-height: 1; }
.guess span { font-weight: 800; color: var(--muted); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 999px; background: #F1E6CF; outline: none; margin: 8px 0; }
input[type=range]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; border-radius: 999px; background: var(--red); border: 4px solid var(--ink); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 30px; height: 30px; border-radius: 999px; background: var(--red); border: 4px solid var(--ink); cursor: pointer; }
.ends { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }
.panel .verdict-title { font-family: 'Alfa Slab One', Georgia, serif; font-size: 26px; margin: 0; }
.panel p { margin: 0; }
.seals { display: flex; gap: 6px; flex-wrap: wrap; }
.seal { width: 60px; height: 60px; background: var(--ink); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); color: #fff; font-size: 8px; font-weight: 800; line-height: 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 2px solid var(--ink); border-radius: 14px; min-height: 48px; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; }
.reto .small { text-align: center; font-size: 13px; font-weight: 700; color: #5A4A10; margin-top: 18px; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 16px; padding-bottom: 48px; }
  .hero .art { order: -1; }
  .scorecard { max-width: 220px; }
  .steps, .pillars { grid-template-columns: 1fr; }
  .top nav { gap: 12px; }
  .top nav a:not(:last-child) { display: none; }
  .scorecard .verdict { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
