/* The whole site's look: the landing page's colours and type, shared by every page. */
:root { color-scheme: light dark; --bg: #fafaf8; --fg: #1d1d1b; --muted: #5c5c58; --line: #e2e2dc; --accent: #3b7a1f; --panel: #f1f1ec; }
@media (prefers-color-scheme: dark) { :root { --bg: #141413; --fg: #ededea; --muted: #a3a39e; --line: #2c2c2a; --accent: #8fd16a; --panel: #1f1f1d; } }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
}
main { max-width: 40rem; margin: 0 auto; padding: 3rem 16px 4rem; }
a { color: inherit; }
h1 { font-size: clamp(2.25rem, 9vw, 3.5rem); margin: 0 0 0.25rem; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; }
.muted, time { color: var(--muted); }
.tagline { font-size: 1.125rem; margin: 0 0 2.5rem; }

/* A devlog page (Artist's approved look, 2026-10-08): slim top bar, the two neighbours at the top only, the
   header as on the home page, and a back-to-top button. Phone sizes below 600px. */
main.post { max-width: 680px; padding: 40px 32px 96px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar a { text-decoration: none; }
.topbar .mark { width: 141px; height: 21px; }
.all { font-size: 14px; color: var(--muted); }
.all:hover { color: var(--fg); text-decoration: underline; }
.neighbours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.nb { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.nb.next { grid-template-columns: minmax(0, 1fr) 96px; text-align: right; }
.nb .pic { border-radius: 6px; }
.nb img { display: block; width: 96px; height: 50px; object-fit: cover; }
.nb.next .pic { order: 2; }
.nb .dir { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); }
.nb.next .dir { justify-content: flex-end; }
.nb .dir svg { width: 14px; height: 14px; flex: none; }
/* The title stops at two lines with an ellipsis (the -webkit- names are the standard way, in every browser). */
.nb .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
main.post a:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 10px; }
.head { margin-top: 48px; }
.head h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.01em; margin: 6px 0 0; }
article p { margin: 18px 0 0; }
article h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 0; }
article img, article video { display: block; width: 100%; height: auto; margin: 22px 0 0; border-radius: 8px; }
article figure { margin: 0; }
article figcaption { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.feedback { color: var(--muted); }

/* Back to top, no script. The page clips its overflow; the button rides sticky inside an invisible column that
   starts two screens down, so it is off screen until a screen has been scrolled, then sits centred at the window's bottom
   and rests at the page's end. A page under two screens has no button. clip, not hidden, which breaks sticky. */
.page { position: relative; overflow: clip; }
.totop-track { position: absolute; top: 200vh; top: 200svh; bottom: 24px; left: calc(50% - 22px); width: 44px; pointer-events: none; }
.totop { position: sticky; top: calc(100vh - 68px); top: calc(100svh - 68px); display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--fg); border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14); pointer-events: auto; box-sizing: border-box; }
.totop svg { width: 18px; height: 18px; }
.totop:hover { border-color: var(--muted); }
.totop:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 600px) {
  main.post { padding: 24px 16px 64px; }
  .topbar .mark { width: 118px; height: 18px; }
  .neighbours { gap: 8px; margin-top: 20px; }
  .nb, .nb.next { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  .nb .pic { display: none; }
  .nb .t { -webkit-line-clamp: 3; font-size: 14px; }
  .head { margin-top: 36px; }
  .head h1 { font-size: 27px; }
  article h2 { font-size: 20px; }
  .totop-track { bottom: 16px; }
  .totop { top: calc(100vh - 60px); top: calc(100svh - 60px); }
}
.placeholder { border: 1px dashed var(--muted); color: var(--muted); padding: 1rem; margin: 1.25rem 0; border-radius: 6px; }

/* Two pictures side by side, smaller, stacking on narrow phones. */
article .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; margin: 22px 0 0; }
article .pair img { margin: 0; }
@media (max-width: 30rem) { article .pair { grid-template-columns: minmax(0, 1fr); } }

/* Main page (Artist's approved look, 2026-10-08): the newest devlog large, the rest in a two-column grid.
   Each devlog is one link; a card's picture is devlog-NNN/card.jpg. Phone sizes below 600px. */
main.front { max-width: 680px; padding: 72px 32px 96px; }
main.front h1 { margin: 0; line-height: 0; }
.mark { display: block; width: 282px; height: 42px; }
main.front .tagline { margin: 20px 0 0; font-size: 19px; color: var(--muted); }
main.front a { text-decoration: none; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.section { margin: 64px 0 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.feature, .card { display: block; }
.feature .pic { border-radius: 10px; }
.card .pic { border-radius: 8px; }
.feature img, .card img { display: block; width: 100%; height: auto; }
.feature .meta { margin-top: 18px; }
.feature .t { display: block; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin-top: 6px; }
.feature .d { display: block; max-width: 44rem; color: var(--muted); font-size: 18px; margin-top: 8px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 32px; }
.card .meta { margin-top: 14px; }
.card .t { display: block; font-size: 20px; font-weight: 650; line-height: 1.3; margin-top: 4px; }
.card .d { display: block; color: var(--muted); font-size: 16px; margin-top: 6px; }
main.front a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 8px; }
@media (max-width: 600px) {
  main.front { padding: 40px 16px 64px; }
  .mark { width: 235px; height: 35px; }
  main.front .tagline { font-size: 17px; margin-top: 16px; }
  .section { margin-top: 44px; }
  .feature .t { font-size: 24px; }
  .feature .d { font-size: 17px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .card .t { font-size: 19px; }
}

/* Hover and keyboard focus on every devlog card (Artist's hover A, his 2026-10-08): the picture zooms a little inside
   its frame, the title turns green and underlines; neighbour cards also fill with the panel colour and a green border.
   Reduced motion keeps the colours and drops the zoom and the transitions. */
.pic { display: block; overflow: hidden; }
.pic img { transition: transform .25s ease; }
.feature .t, .card .t, .nb .t { transition: color .15s; }
.nb { transition: background-color .15s, border-color .15s; }
:is(.feature, .card, .nb):is(:hover, :focus-visible) .pic img { transform: scale(1.05); }
:is(.feature, .card, .nb):is(:hover, :focus-visible) .t { color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nb:is(:hover, :focus-visible) { background: var(--panel); border-color: var(--accent); }
main a:is(.feature, .card, .nb):focus-visible { outline: 2px solid var(--fg); outline-offset: 6px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) {
  .pic img, .feature .t, .card .t, .nb .t, .nb { transition: none; }
  :is(.feature, .card, .nb):is(:hover, :focus-visible) .pic img { transform: none; }
}
