/* tinyfingers.fi: one stylesheet, no web fonts, no imports, nothing fetched from elsewhere.
   Light, warm and calm: the cream of the TinyFingers Paint app (#ece6d8) with a deep brown ink.
   Contrast (WCAG): ink 12.6:1 on bg, muted 6.6:1, link 6.3:1; on panel all higher. */
:root {
  --bg: #ece6d8;
  --panel: #f8f4ea;
  --ink: #2b2218;
  --muted: #5a4d3a;
  --link: #8a3a00;
  --accent: #f0b44c;
  --line: #cfc4ad;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 ui-rounded, "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

/* Hidden above the page, not to its side, so right-to-left text never widens the page. */
.skip { position: absolute; inset-inline-start: 8px; top: 8px; transform: translateY(-300%); background: var(--ink); color: var(--panel); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { transform: none; }

/* Header: brand, nav, language picker */
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.bar { max-width: 960px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: 0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.top nav { flex: 1 1 auto; }
.top nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; }
.top nav a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 16px; }
.top nav a:hover { background: var(--bg); }
.top nav a[aria-current="page"] { background: var(--ink); color: var(--panel); }
.top nav a[aria-current="true"] { background: var(--bg); box-shadow: inset 0 0 0 2px var(--ink); }
.lang { position: relative; margin-inline-start: auto; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 15px; background: var(--bg); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 10; list-style: none; margin: 0; padding: 6px; min-width: 160px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(43, 34, 24, 0.18); }
.lang a { display: block; padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.lang a:hover, .lang a:focus-visible { background: var(--bg); }
.lang a[aria-current="page"] { font-weight: 800; }

/* Page */
main { max-width: 960px; margin: 0 auto; padding: 44px 20px 56px; }
h1, h2.h1-like { font-size: 40px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em; } /* h2.h1-like: the 404 page's 2nd and 3rd language, level 2 with the first's look */
h2 { font-size: 26px; line-height: 1.25; margin: 44px 0 10px; }
h3 { font-size: 20px; margin: 22px 0 6px; }
.lead { font-size: 21px; max-width: 40em; }
.muted, .note { color: var(--muted); }
.note { font-size: 15px; }
section { scroll-margin-top: 16px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; margin: 16px 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.cards { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cards .card { margin: 0; }
.cards h3 { margin-top: 0; }
.hero-app { display: flex; gap: 22px; align-items: flex-start; }
.hero-app img { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line); flex: none; }

.btn { display: inline-block; background: var(--accent); color: var(--ink); font-weight: 800; text-decoration: none; padding: 10px 22px; border-radius: 14px; border: 2px solid var(--ink); }
.btn:hover { background: #f6c76f; }
.btn.ghost { background: transparent; }
.btn.soon { border-style: dashed; border-color: var(--muted); background: transparent; color: var(--muted); font-weight: 600; }
.btns { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 16px 0 0; }
.list { padding-inline-start: 22px; }
.list li { margin: 6px 0; }

table { border-collapse: collapse; width: 100%; margin: 16px 0; background: var(--panel); border-radius: 12px; overflow: hidden; }
th, td { text-align: start; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
code { font-size: 0.92em; overflow-wrap: anywhere; }
caption { text-align: start; color: var(--muted); font-size: 15px; padding: 0 0 6px; caption-side: top; }
th { color: var(--muted); font-weight: 700; font-size: 15px; }

.gallery { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.gallery img { display: block; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }

/* Video poster; /_site.js swaps in the player on a tap */
.yt { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.yt img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.yt .play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 76px; height: 76px; border-radius: 50%; background: rgba(43, 34, 24, 0.82); border: 2px solid var(--accent); transition: transform 0.15s; }
.yt .play::after { content: ""; position: absolute; left: 30px; top: 20px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent var(--accent); }
.yt:hover .play, .yt:focus-visible .play { transform: scale(1.08); }
.yt:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.yt-player { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; }

.foot { border-top: 1px solid var(--line); background: var(--panel); }
.foot p { max-width: 960px; margin: 0 auto; padding: 18px 20px; font-size: 15px; color: var(--muted); }

@media (max-width: 560px) {
  html, body { font-size: 17px; }
  h1, h2.h1-like { font-size: 32px; }
  h2 { font-size: 23px; }
  main { padding-top: 28px; }
  .lead { font-size: 19px; }
  .hero-app { flex-direction: column; }
  .yt .play { width: 56px; height: 56px; }
  .yt .play::after { left: 21px; top: 15px; border-width: 12px 0 12px 19px; }
}
@media (prefers-reduced-motion: reduce) { .yt .play { transition: none; } }

/* Early Years page: platform badges, the section list, the screenshot strip and the wide pictures */
.badges { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 2px 12px; font-size: 15px; color: var(--muted); }
.plat { display: inline-block; font-size: 13px; font-weight: 700; color: var(--panel); background: var(--muted); border-radius: 999px; padding: 0 9px; margin-inline-end: 4px; }
.jump { margin: 22px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 15px; }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.callout { border-inline-start: 4px solid var(--accent); }
ul.wide { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
ul.wide img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.shots { overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 20px; padding: 0 20px 10px; margin: 0 -20px; }
.shots:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }
.shots ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.shots li { flex: 0 0 62%; max-width: 250px; scroll-snap-align: start; }
.shots img { display: block; width: 100%; height: auto; aspect-ratio: 608 / 1081; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
@media (min-width: 760px) { .shots { overflow: visible; margin: 0; padding: 0; } .shots li { flex: 1 1 0; max-width: none; } }
@media (max-width: 560px) { ul.wide { grid-template-columns: 1fr; } }

/* App pages (/apps/paint/, /apps/rescue/): the hero beside its icon, and the home-version note set apart from the pitch */
.app-hero { display: flex; gap: 24px; align-items: flex-start; margin: 0 0 6px; }
.app-hero img { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line); flex: none; }
.app-hero h1 { margin-top: 0; }
.card.apart { background: transparent; border: 2px dashed var(--muted); }
@media (max-width: 560px) { .app-hero { flex-direction: column; gap: 14px; } }
