/* The website's own pages (the front page, how to play, the techniques, privacy, terms; English and
   Turkish), beside the game. The colors, the font and the header are in header.css, which the game's
   own page loads too; this is the rest. */

* { box-sizing: border-box; }
/* Room for a scroll bar on both sides, so the header sits exactly where it does over the game. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable both-edges; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Nunito, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--primary); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 800; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 54px); letter-spacing: -0.5px; }
h2 { font-size: clamp(26px, 4vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.button { white-space: nowrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 17px; text-decoration: none;
}
.button:hover { filter: brightness(1.06); }
.button.soft { background: var(--primary-soft); color: var(--primary); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

/* The first screen: what it is, and a phone showing a game. */
.hero { padding: 24px 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.hero .lead { font-size: 20px; color: var(--muted); margin-top: 16px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .note { margin-top: 14px; font-size: 15px; color: var(--muted); }
.hero .stores { margin-top: 16px; }
.store { display: inline-block; line-height: 0; }
.store img { display: block; }
.phone {
  width: min(320px, 78vw); margin: 0 auto; padding: 10px; border-radius: 38px;
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.phone img { border-radius: 30px; width: 100%; height: auto; }
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
}

section { padding: 48px 0; }
.section-head { max-width: 40em; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 18px; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.card .tag { color: var(--text); font-weight: 700; margin-top: 6px; font-size: 16px; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }

.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 0.8fr 1.2fr; }
}
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.list b { display: block; font-weight: 800; }
.list span { color: var(--muted); font-size: 16px; }

.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style-position: outside; }
.faq details p { color: var(--muted); padding-bottom: 16px; }

.band { background: var(--primary); color: #fff; border-radius: 24px; padding: 36px 28px; text-align: center; }
.band p { opacity: 0.9; margin: 10px auto 22px; max-width: 32em; }
.band .button { background: #fff; color: var(--primary); }

/* Privacy policy and terms. */
.doc { padding-top: 16px; padding-bottom: 56px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); }
.doc .updated { color: var(--muted); margin-top: 8px; }
.doc h2 { font-size: 22px; margin-top: 36px; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 22px; }
.doc li { margin-top: 6px; }
.doc .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-top: 20px; }

/* How to play and the techniques (site_learn.py). */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 800; font-size: 15px; line-height: 1.4;
}
h2 .pill { font-size: 20px; padding: 6px 16px; }
.doc .lead { font-size: 19px; color: var(--muted); margin-top: 14px; }
.doc .meta { margin-top: 12px; }
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
.step { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; text-decoration: none; color: var(--text); font-weight: 800; line-height: 1.3; }
.step small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.step:hover { border-color: var(--primary); }
.step.next { grid-column: 2; text-align: right; }
.card.link { display: block; text-decoration: none; color: var(--text); }
.card.link:hover { border-color: var(--primary); }
.card.link h3 { color: var(--primary); }
.doc .list { padding-left: 0; }
.list.levels li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.list.levels b { display: inline-flex; }
.list.levels span { color: var(--text); }
.steps-list { counter-reset: step; }
.steps-list li { counter-increment: step; position: relative; padding-left: 60px; }
.steps-list li::before {
  content: counter(step); position: absolute; left: 16px; top: 15px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
section.level { padding: 24px 0; }
/* A level's pill as a link (to its page). */
.pill-link { text-decoration: none; display: inline-flex; }
.pill-link .pill:hover { border-color: var(--primary); }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* A level's page: its puzzle beside the first screen. */
.level-board { margin: 0 auto; width: 100%; max-width: 440px; }
/* The daily page's week, as the game's calendar shows one: each day with its level's dot. */
.week-board { margin: 0 auto; width: 100%; max-width: 460px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px 16px; box-shadow: var(--shadow); }
.week-strip div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 14px; background: var(--surface-alt); }
.week-strip small { font-size: 12px; font-weight: 700; color: var(--muted); }
.week-strip b { font-size: 20px; font-weight: 800; }
.week-strip i, .week-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.week-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.week-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Board pictures (scripts/make-site-art.ts): a real puzzle, with the step it's about. */
figure.board { margin: 24px 0 8px; }
figure.board figcaption { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 440px; }
.board-art { width: 100%; max-width: 440px; height: auto; display: block; font-family: Nunito, sans-serif; }
.board-art text { text-anchor: middle; dominant-baseline: central; }
.board-art .bg { fill: var(--board); }
.board-art .u { fill: var(--tint); }
.board-art .u2 { fill: var(--tint2); }
.board-art .u3 { fill: var(--tint3); }
.board-art .pc { fill: var(--tint-strong); }
.board-art .xc { fill: var(--danger-soft); }
.board-art .ac { fill: var(--answer); }
.board-art .g { stroke: var(--line-thin); stroke-width: 1; }
.board-art .G { stroke: var(--line-thick); stroke-width: 2; stroke-linecap: square; }
.board-art .v { font-size: 22px; font-weight: 700; fill: var(--text); }
.board-art .va { fill: var(--primary); font-weight: 800; }
.board-art .n { font-size: 10.5px; font-weight: 700; fill: var(--muted); }
.board-art .np, .board-art .nz { fill: #fff; }
.board-art .nx { fill: var(--danger); }
.board-art .cp { fill: var(--primary); }
.board-art .cz { fill: var(--orange); }
.board-art .cx { fill: var(--danger-soft); }
.board-art .sx { stroke: var(--danger); stroke-width: 1.6; }
.board-art .ring { fill: none; stroke: var(--orange); stroke-width: 2.5; }
.board-art .hl { stroke: var(--orange); stroke-width: 2.5; stroke-linecap: round; opacity: 0.75; }
.board-art .x { stroke: var(--danger); stroke-width: 2.5; stroke-linecap: round; opacity: 0.8; }
.board-art .ls, .board-art .lw { stroke: var(--link); stroke-width: 2.2; stroke-linecap: round; }
.board-art .lw { stroke-dasharray: 4 4; }
.board-art .lab { font-size: 12px; font-weight: 800; fill: var(--muted); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
footer a { color: var(--muted); }
footer .copy { margin-left: auto; }

/* The page about playing with friends: who a mode suits, over its name, and its way in. */
.card .who { color: var(--muted); font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.card-go { margin-top: 14px; font-weight: 800; }
.card-go a { text-decoration: none; }
.more-link { margin-top: 18px; font-weight: 800; }
.more-link a { text-decoration: none; }

/* A level's board is a way into the game: the play button over it, "tap" on a phone, "click" with a mouse. */
.board-play { position: relative; display: block; border-radius: 12px; color: inherit; text-decoration: none; }
.board-play:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.board-play .tap {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 17px;
  padding: 12px 22px 12px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(20, 40, 90, 0.28);
  transition: transform 0.15s ease;
}
.board-play:hover .tap { transform: translate(-50%, -50%) scale(1.05); }
.board-play .tap svg { width: 22px; height: 22px; fill: currentColor; }
.board-play .t-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .board-play .t-touch { display: none; }
  .board-play .t-mouse { display: inline; }
}

/* The stores' badges: an iPhone sees only Apple's, an Android phone only Google Play's, anything else
   both (html.ios, html.android: make-site.py's PLATFORM_SCRIPT). */
.store-apple, .store-play { display: inline-block; line-height: 0; }
.hero .stores { display: flex; flex-wrap: wrap; gap: 12px; }
html.android .store-apple, html.ios .store-play { display: none; }
/* A technique's lesson in the game, under its explanation. */
.lesson-card { margin: 32px 0 8px; padding: 22px 24px; border-radius: 20px; background: var(--primary-soft); }
.lesson-card h3 { margin: 0 0 6px; }
.lesson-card p { margin: 0 0 16px; }
