/* Paper Tiles site: the Kertas palette (design/directions/kertas/NOTES.md) and Bricolage Grotesque (OFL,
   fonts/OFL.txt). No inline styles anywhere: the CSP (src/_headers) allows only this file. Light only, like the game.
   The brand mark is three CSS paper squares until the logo is picked (decision #17). */
@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 500 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #2F2A25; --ink2: #6B6157; --desk: #ECE3D2; --sheet: #FFFDF7;
  --grid: #D3DEE8; --grid2: #BFD0DE; --margin: #E7A79C; --kraft: #CDB48C;
  --primary: #F6CF5C; --hi: rgba(255, 221, 64, .52); --link: #2F5F9E;
  --red: #E2654F; --yellow: #F3C94F; --teal: #4AA39B; --blue: #5A84C8; --purple: #9876BC; --green: #84B56C;
  --shadow: 0 2px 0 rgba(47, 42, 37, .18), 0 8px 18px rgba(47, 42, 37, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--desk);
  font: 500 17px/1.6 'Bricolage', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 9; }
.skip:focus { left: 8px; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; }
.mark { display: inline-grid; grid-template-columns: repeat(2, 11px); gap: 2px; transform: rotate(-4deg); }
.mark i { display: block; width: 11px; height: 11px; border-radius: 2px; box-shadow: 0 1px 0 rgba(47, 42, 37, .3); }
.mark i:nth-child(1) { background: var(--red); }
.mark i:nth-child(2) { background: var(--yellow); }
.mark i:nth-child(3) { background: var(--teal); }
.mark i:nth-child(4) { background: transparent; box-shadow: none; }
nav { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 650; font-size: 15px; }
nav a { color: var(--ink2); text-decoration: none; }
nav a:hover { color: var(--ink); text-decoration: underline; }

/* the notebook sheet: squared paper with a red margin line */
.sheet {
  background-color: var(--sheet);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: 6px; box-shadow: var(--shadow);
}

/* hero */
.hero { text-align: center; padding: 34px 20px 36px; margin-top: 10px; position: relative; }
.hero::before, .hero::after { content: ''; position: absolute; top: -9px; width: 92px; height: 22px; background: rgba(243, 201, 79, .75); }
.hero::before { left: 8%; transform: rotate(-5deg); }
.hero::after { right: 8%; transform: rotate(4deg); background: rgba(74, 163, 155, .55); }
.hero h1 { font-size: clamp(30px, 7vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 6px 0 10px; font-weight: 800; }
.hl { background: linear-gradient(176deg, transparent 0 46%, var(--hi) 46% 92%, transparent 92%); padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lead { font-size: clamp(17px, 2.6vw, 20px); color: var(--ink2); max-width: 620px; margin: 0 auto; }
.store { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 12px 22px; border-radius: 12px;
  background: var(--primary); color: var(--ink); text-decoration: none; font-weight: 800; box-shadow: 0 3px 0 rgba(47, 42, 37, .35); }
.store small { display: block; font-weight: 600; font-size: 12.5px; line-height: 1.1; }
.store strong { display: block; font-size: 19px; line-height: 1.15; }
.store svg { width: 24px; height: 24px; }
p.store { cursor: default; }
.note { margin-top: 14px; font-size: 14px; color: var(--ink2); }

/* features: paper cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 30px 16px 36px; list-style: none; margin: 0 auto; }
.card { background: var(--sheet); border-radius: 6px; padding: 18px 18px 16px; box-shadow: var(--shadow); border-top: 6px solid var(--c, var(--yellow)); }
.card:nth-child(6n+1) { --c: var(--red); } .card:nth-child(6n+2) { --c: var(--yellow); } .card:nth-child(6n+3) { --c: var(--teal); }
.card:nth-child(6n+4) { --c: var(--blue); } .card:nth-child(6n+5) { --c: var(--purple); } .card:nth-child(6n+6) { --c: var(--green); }
.card h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.25; font-weight: 800; }
.card p { margin: 0; color: var(--ink2); font-size: 15.5px; line-height: 1.5; }

/* faq */
.faq { padding-bottom: 40px; }
.faq > h2 { font-size: clamp(22px, 4vw, 30px); margin: 0 0 14px; font-weight: 800; }
.faq details { background: var(--sheet); border-radius: 6px; box-shadow: var(--shadow); padding: 12px 16px; margin: 0 0 10px; }
.faq summary { font-weight: 750; cursor: pointer; }
.faq details p { margin: 8px 0 2px; color: var(--ink2); }

/* legal pages */
.page-head { padding-bottom: 8px; }
.page-head h1 { font-size: clamp(28px, 5vw, 40px); margin: 14px 0 4px; letter-spacing: -.02em; font-weight: 800; }
.page-head p { margin: 0 0 8px; color: var(--ink2); font-size: 15px; }
.prose { background: var(--sheet); border-radius: 6px; box-shadow: var(--shadow); padding: 8px 24px 24px 40px; margin-bottom: 40px;
  background-image: linear-gradient(90deg, transparent 22px, var(--margin) 22px, var(--margin) 24px, transparent 24px); }
.prose h2 { font-size: 21px; margin: 28px 0 6px; font-weight: 800; scroll-margin-top: 12px; }
.prose p, .prose li { color: var(--ink2); }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 22px; }
.summary { background: #FFF3C4; border-radius: 4px; padding: 12px 16px 4px; margin: 18px 0 10px; box-shadow: 0 2px 0 rgba(47, 42, 37, .12); }
.summary ul { margin: 6px 0 8px; }
.toc { margin: 14px 0; font-size: 15px; }
.toc ol { columns: 2 220px; padding-left: 22px; margin: 6px 0 0; }

/* 404 */
.lost { text-align: center; padding: 40px 20px 60px; margin: 10px auto 40px; }
.lost h1 { font-size: clamp(26px, 5vw, 38px); margin: 0 0 8px; }

/* footer */
.foot { background: var(--sheet); padding: 22px 0 28px; font-size: 15px; box-shadow: 0 -1px 0 rgba(47, 42, 37, .12); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between; }
.foot nav { gap: 14px 18px; }
.foot .copy { margin: 0; color: var(--ink2); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 520px) {
  body { font-size: 16px; }
  .prose { padding: 4px 14px 18px 30px; background-image: linear-gradient(90deg, transparent 14px, var(--margin) 14px, var(--margin) 16px, transparent 16px); }
  .hero::before, .hero::after { width: 64px; }
}
