/* rm2kdev.net — one stylesheet for the whole site. */

:root {
  --red: #F43232;          /* brand red: mascot, accents, large fills */
  --red-bar: #E02D2D;      /* header + buttons: white text passes AA on it */
  --red-bar-hover: #C92626;
  --red-ink: #C42222;      /* links and small red text on light ground */
  --bg: #FFFFFF;
  --surface: #F6F3F2;
  --surface-2: #EFEAE8;
  --ink: #1C1A1A;
  --ink-2: #474242;
  --ink-3: #6A6362;
  --line: #E6E0DE;
  --code-bg: #1F1B1B;
  --code-ink: #F3EEEC;
  --word-bg: #1C1A1A;
  --shadow: 0 1px 2px rgb(28 26 26 / .06), 0 6px 18px -6px rgb(28 26 26 / .16);
  --shadow-lift: 0 2px 4px rgb(28 26 26 / .08), 0 14px 30px -10px rgb(28 26 26 / .28);

  --font-display: "Montserrat", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-code: "JetBrains Mono", Consolas, monospace;

  --wrap: 1180px;
  --measure: 70ch;
  --radius: 12px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red-ink: #FF7A72;
    --bg: #151313;
    --surface: #1E1B1B;
    --surface-2: #272323;
    --ink: #F2EEED;
    --ink-2: #CFC8C6;
    --ink-3: #A79E9C;
    --line: #322D2C;
    --code-bg: #262121;
    --word-bg: #2A2525;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 18px -6px rgb(0 0 0 / .5);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / .35), 0 14px 30px -10px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
  scrollbar-color: var(--ink-3) var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
.site-footer { flex: none; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--red-ink); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); }
time, .count { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 760px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 1rem; }

/* ---------- header ---------- */
.site-header { background: var(--red-bar); color: #fff; }
.site-header-inner { display: flex; align-items: center; gap: 2rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; margin-right: auto; }
.brand-mascot { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px rgb(255 255 255 / .9); transition: transform .5s var(--ease-out); }
.brand:hover .brand-mascot { transform: rotate(-12deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 800 1.55rem/1 var(--font-display); letter-spacing: -.01em; }
.brand-tag { font: 600 .78rem/1.3 var(--font-body); letter-spacing: .04em; margin-top: .2rem; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .5rem .8rem; border-radius: 8px;
  color: #fff; text-decoration: none; font: 700 .98rem/1 var(--font-body);
}
.site-nav a:hover { background: rgb(0 0 0 / .14); }
.site-nav a[aria-current="page"] { background: #fff; color: var(--red-bar); }
.header-support {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 999px;
  border: 2px solid rgb(255 255 255 / .85); color: #fff; text-decoration: none; font: 700 .9rem/1 var(--font-body);
  transition: background .2s, color .2s;
}
.header-support:hover { background: #fff; color: var(--red-bar); }

@media (max-width: 860px) {
  .site-header-inner { flex-wrap: wrap; gap: .25rem 1rem; padding-top: .8rem; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -.5rem; }
  .site-nav ul { padding: .2rem 0 .7rem; }
  .site-nav a { white-space: nowrap; padding: .5rem .55rem; font-size: .95rem; }
  .site-nav ul { justify-content: space-between; }
  .brand-tag { display: none; }
  .brand-mascot { width: 38px; height: 38px; }
  .brand-name { font-size: 1.35rem; }
}

/* ---------- page furniture ---------- */
.page-title { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem); font-weight: 800; margin: 0 0 .5rem; }
.page-head { padding-block: 3rem 1.75rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); margin: 0; max-width: 60ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font: 600 .9rem/1.4 var(--font-body); color: var(--ink-3); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--red-ink); text-decoration: underline; }
.section-title { font-size: 1.6rem; margin: 3.5rem 0 1.25rem; }
.button {
  display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px;
  background: var(--red-bar); color: #fff; text-decoration: none; font: 700 1rem/1.1 var(--font-body);
  box-shadow: 0 2px 6px -1px rgb(150 20 20 / .35); transition: background .2s, transform .2s var(--ease-out);
}
.button:hover { background: var(--red-bar-hover); transform: translateY(-1px); }
.more-link { display: inline-block; font: 700 1.05rem var(--font-body); margin-top: 2.25rem; }
.note { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.25rem; color: var(--ink-2); }

/* ---------- home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; padding-block: 3rem 5rem; }
.home .page-title { margin-bottom: 1.5rem; }
@media (max-width: 980px) { .home { grid-template-columns: 1fr; gap: 3rem; } }

/* cards */
.card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.5rem; align-items: start; padding-block: 1.6rem; border-top: 1px solid var(--line); }
.card-cover { display: block; text-decoration: none; }
/* 860 x 320 is the shape of the old rm2kdev feature banners; every card uses it so the big words never crop. */
.card-media {
  aspect-ratio: 860 / 320; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow); transition: box-shadow .35s var(--ease-out), transform .35s var(--ease-out);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
.card-media--fit { background: var(--surface); }
.card-media--fit img { object-fit: contain; }
.card-media--video { background: #111; }
.card:hover .card-media { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card:hover .card-media img { transform: scale(1.03); }
.card-media--word { display: grid; place-items: center; background: var(--word-bg); color: #fff; position: relative; }
.card-media--word::after { content: ""; position: absolute; left: 50%; bottom: 18%; width: 2.5rem; height: 4px; margin-left: -1.25rem; background: var(--red); border-radius: 2px; }
.card-media--word[data-topic="tutorials"], .card-media--word[data-topic="japanese"] { background: #3A3333; }
.card-media--word[data-topic="postmortems"], .card-media--word[data-topic="tools"] { background: #4A4040; }
.tile-word { font: 900 1.6rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; padding-bottom: .4rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .35rem; font: 600 .9rem/1.4 var(--font-body); color: var(--ink-3); }
.topic-link { color: var(--red-ink); text-decoration: none; }
.topic-link:hover { text-decoration: underline; }
.card-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 .45rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--red-ink); }
.card-excerpt { margin: 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card--lead { grid-template-columns: 1fr; gap: 1.25rem; border-top: 0; padding-top: 0; padding-bottom: 2rem; }
.card--lead .card-media { border-radius: var(--radius); }
.card--lead .tile-word { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.card--lead .card-title { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.35rem); font-weight: 800; }
.card--lead .card-excerpt { font-size: 1.15rem; -webkit-line-clamp: 4; }

.card-list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.5rem 2rem; padding-bottom: 5rem; }
.card-list--grid .card { grid-template-columns: 1fr; gap: 1rem; border-top: 0; padding: 0; align-content: start; }
.card-list--grid .tile-word { font-size: 2rem; }

@media (max-width: 760px) {
  .card { grid-template-columns: 1fr; gap: .9rem; padding-block: 1.5rem; }
  .tile-word { font-size: 2rem; }
  .card-title { font-size: 1.2rem; }
  .card-excerpt { -webkit-line-clamp: 2; font-size: 1rem; }
  .card-list--grid { gap: 2rem; }
}


/* sidebar */
.sidebar { display: flex; flex-direction: column; gap: 2.25rem; padding-top: .5rem; }
.sidebar h2 { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 .8rem; }
.about { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; }
.about img { width: 88px; height: 88px; border-radius: 50%; display: block; margin-bottom: 1rem; }
.about h2 { font-size: 1.35rem; text-transform: none; letter-spacing: -.01em; color: var(--ink); margin-bottom: .5rem; }
.about p { margin: 0 0 1.1rem; font-size: 1rem; color: var(--ink-2); }
.social-list { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.social-list a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg); color: var(--ink); box-shadow: var(--shadow); transition: background .2s, color .2s, transform .3s var(--ease-out);
}
.social-list a:hover { background: var(--red-bar); color: #fff; transform: translateY(-2px); }
.side-list ul { list-style: none; margin: 0; padding: 0; }
.side-list a {
  display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.side-list a:hover { color: var(--red-ink); }
.count { color: var(--ink-3); font-weight: 600; }
.support { border: 2px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.support h2 { font-size: 1.15rem; text-transform: none; letter-spacing: -.01em; color: var(--ink); }
.support p { margin: 0 0 1rem; font-size: 1rem; color: var(--ink-2); }

/* ---------- post ---------- */
.post-main { padding-block: 3rem 4rem; }
.post, .post-foot { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.post-head h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 1rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; color: var(--ink-3); font: 600 1rem/1.4 var(--font-body); }
.post-cover { margin: 2rem 0 0; }
.post-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }

.prose { margin-top: 2.25rem; overflow-wrap: break-word; }
.prose::after { content: ""; display: table; clear: both; }
.prose > * { margin-block: 0 1.25rem; }
.prose h2 { font-size: 1.65rem; font-weight: 800; margin: 2.75rem 0 1rem; }
.prose h3 { font-size: 1.3rem; font-weight: 700; margin: 2.25rem 0 .75rem; }
.prose h4 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--red); }
.prose img { border-radius: 8px; }
.prose blockquote { margin-inline: 0; padding: .25rem 0 .25rem 1.25rem; border-left: 1px solid var(--line); color: var(--ink-2); font-style: italic; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; display: block; overflow-x: auto; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: .5rem .75rem; text-align: left; vertical-align: top; }
.prose code { font: 400 .88em var(--font-code); background: var(--surface-2); padding: .12em .35em; border-radius: 5px; }
.prose pre {
  background: var(--code-bg); color: var(--code-ink); padding: 1.1rem 1.25rem; border-radius: 10px;
  overflow-x: auto; font: 400 .9rem/1.6 var(--font-code); tab-size: 4; margin-inline: -1rem;
}
.prose pre code { background: none; padding: 0; font: inherit; color: inherit; }
.code-block { position: relative; margin-inline: -1rem; }
.code-block pre { margin: 0; padding-top: 2.75rem; }
.copy-code {
  position: absolute; top: .55rem; right: .55rem; font: 700 .8rem/1 var(--font-body); color: var(--code-ink);
  background: rgb(255 255 255 / .1); border: 0; border-radius: 6px; padding: .45rem .65rem; cursor: pointer;
  transition: background .2s;
}
.copy-code:hover { background: rgb(255 255 255 / .2); }
.copy-code[data-copied] { background: var(--red-bar); color: #fff; }
.prose pre::selection, .prose pre *::selection { background: var(--red); color: #fff; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: .92rem; color: var(--ink-3); margin-top: .5rem; }
.prose .columns { columns: 3 13rem; column-gap: 2rem; list-style: none; padding: 0; font-size: 1rem; }
.prose .columns li { break-inside: avoid; }
@media (min-width: 640px) {
  .prose .alignleft { float: left; max-width: 45%; margin: .35rem 1.75rem 1rem 0; }
  .prose .alignright { float: right; max-width: 45%; margin: .35rem 0 1rem 1.75rem; }
}
.prose .alignleft img, .prose .alignright img { display: block; }

/* video facade */
.video { margin-inline: 0; }
.video-link, .video iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: #000; border: 0; box-shadow: var(--shadow);
}
.video-link img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; opacity: .88; transition: opacity .3s, transform .6s var(--ease-out); }
.video-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 14px;
  background: var(--red-bar); color: #fff; font-size: 0; transition: transform .3s var(--ease-out), background .2s;
  box-shadow: 0 6px 20px -4px rgb(0 0 0 / .5);
}
.video-play::after { content: ""; position: absolute; left: 31px; top: 16px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.video-link:hover img { opacity: 1; transform: scale(1.02); }
.video-link:hover .video-play { transform: scale(1.08); background: var(--red-bar-hover); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.gallery a { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s var(--ease-out); }
.gallery a:hover img { transform: scale(1.05); }

/* post footer */
.post-foot { margin-top: 3.5rem; display: grid; gap: 2rem; }
.series { background: var(--surface); border-radius: var(--radius); padding: 1.5rem 1.6rem; }
.series h2 { font-size: 1.15rem; margin: 0 0 .9rem; display: flex; justify-content: space-between; gap: 1rem; }
.series h2 span { font: 600 .9rem var(--font-body); color: var(--ink-3); white-space: nowrap; }
.series ol { margin: 0; padding-left: 1.5rem; font-size: 1.02rem; }
.series li { padding: .2rem 0; }
.series li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.series li[aria-current] { font-weight: 700; }
.series li[aria-current]::marker { color: var(--red); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a {
  display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .3s var(--ease-out);
}
.pager a:hover { border-color: var(--red); box-shadow: var(--shadow); }
.pager span { font: 600 .88rem var(--font-body); color: var(--red-ink); }
.pager strong { font: 700 1.05rem/1.3 var(--font-display); }
.pager-newer { text-align: right; }
.post-cta { display: flex; gap: 1.25rem; align-items: center; border-top: 1px solid var(--line); padding-top: 2rem; }
.post-cta img { border-radius: 50%; flex: none; }
.post-cta h2 { font-size: 1.2rem; margin: 0 0 .25rem; }
.post-cta p { margin: 0; color: var(--ink-2); font-size: 1.02rem; }
@media (max-width: 620px) {
  .pager { grid-template-columns: 1fr; }
  .pager-newer { text-align: left; }
  .post-cta { align-items: flex-start; }
  .post-cta img { width: 56px; height: 56px; }
  .prose pre { margin-inline: -1.25rem; border-radius: 0; }
  .code-block { margin-inline: -1.25rem; }
  .code-block pre { margin-inline: 0; }
}

/* ---------- archive ---------- */
.archive { padding-bottom: 5rem; max-width: 900px; }
.archive-tools { margin-top: 1.75rem; display: grid; gap: 1rem; }
.archive-tools:not([hidden]) { display: grid; }
.search input {
  width: 100%; max-width: 30rem; font: 400 1.05rem var(--font-body); color: var(--ink); background: var(--bg);
  padding: .75rem 1rem; border: 2px solid var(--line); border-radius: 10px; transition: border-color .2s;
}
.search input:focus { outline: none; border-color: var(--red); }
.search input::placeholder { color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font: 700 .95rem/1 var(--font-body); color: var(--ink); background: var(--surface); border: 0; cursor: pointer;
  padding: .6rem .9rem; border-radius: 999px; transition: background .2s, color .2s;
}
.chip span { font-weight: 600; color: var(--ink-3); margin-left: .2rem; font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--red-bar); color: #fff; }
.chip[aria-pressed="true"] span { color: #fff; }
.archive-empty { color: var(--ink-2); }
.year { margin-top: 2.5rem; }
.year-title { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.25rem); font-weight: 900; letter-spacing: -.03em; margin: 0 0 .5rem; display: flex; align-items: baseline; gap: 1rem; }
.year-title span { font: 600 1rem var(--font-body); letter-spacing: 0; color: var(--ink-3); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.row time { color: var(--ink-3); font-weight: 600; font-size: .95rem; }
.row a { color: var(--ink); text-decoration: none; font-weight: 600; }
.row a:hover { color: var(--red-ink); text-decoration: underline; }
.row-topic { font: 600 .85rem var(--font-body); color: var(--ink-3); }
@media (max-width: 620px) {
  .row { grid-template-columns: 1fr; gap: .1rem; }
  .row time { order: 2; font-size: .85rem; }
  .row-topic { display: none; }
}

/* ---------- topic pages ---------- */
.topic-tabs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.topic-tabs a { display: block; padding: .55rem .9rem; border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.topic-tabs a:hover { background: var(--surface-2); }
.topic-tabs a[aria-current="page"] { background: var(--red-bar); color: #fff; }
.topic-page .page-head { padding-bottom: 2.5rem; }

/* ---------- games, downloads, contact ---------- */
.games-page { padding-bottom: 5rem; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.game img { width: 100%; max-width: 165px; aspect-ratio: 1; object-fit: cover; border-radius: 22%; box-shadow: var(--shadow); display: block; }
.game h2 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
.game h2 a { color: var(--ink); text-decoration: none; }
.game h2 a:hover { color: var(--red-ink); text-decoration: underline; }
.game-links { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 0; font-weight: 600; font-size: .95rem; }
.software-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 2.5rem; }
.software-list li { display: flex; }
.software-list a { flex: 1; display: flex; flex-direction: column; gap: .2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.software-list strong { font: 700 1.1rem var(--font-display); color: var(--ink); }
.software-list span { color: var(--ink-2); font-size: 1rem; }
.software-list a:hover strong { color: var(--red-ink); }

.downloads-page { padding-bottom: 5rem; }
.download { padding-block: 2rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.download:target { background: var(--surface); border-radius: var(--radius); padding-inline: 1.5rem; margin-inline: -1.5rem; }
.download h2 { font-size: 1.4rem; margin: 0 0 .25rem; }
.download .prose { margin-top: .75rem; }
.download .prose > * { margin-bottom: .6rem; }

.contact-list { list-style: none; padding: 0; margin: 0 0 5rem; display: grid; gap: .75rem; }
.contact-list a {
  display: flex; align-items: center; gap: 1.25rem; padding: 1.2rem 1.4rem; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none; transition: background .2s, transform .3s var(--ease-out);
}
.contact-list a:hover { background: var(--surface-2); transform: translateX(4px); }
.contact-list a > span { display: flex; flex-direction: column; }
.contact-list strong { font: 700 1.15rem var(--font-display); }
.contact-list a > span > span { color: var(--ink-2); font-size: 1rem; }
.contact-list .icon { color: var(--red); flex: none; }

.narrow.wrap { padding-bottom: 4rem; }
.not-found { text-align: center; padding-block: 5rem; }
.not-found img { border-radius: 50%; margin-bottom: 1.5rem; }
.not-found .lede { margin-inline: auto; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2rem; padding-block: 3rem 2rem; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand img { border-radius: 50%; }
.footer-brand p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.footer-brand strong { font: 800 1.3rem var(--font-display); color: var(--ink); }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: .3rem 0 .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer nav a { color: var(--ink); text-decoration: none; font-size: 1rem; display: inline-flex; align-items: center; gap: .55rem; }
.site-footer nav a:hover { color: var(--red-ink); text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.25rem 2rem; box-shadow: inset 0 1px 0 var(--line); font-size: .95rem; color: var(--ink-3); }
.footer-base p { margin: 0; }
.footer-base a { color: var(--ink-3); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

.icon { flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- ads (Google AdSense, 336 x 280) ---------- */
.ad { text-align: center; }
.ad-label { margin: 0 0 .4rem; font: 600 .75rem/1 var(--font-body); color: var(--ink-3); }
.ad .adsbygoogle { max-width: 100%; min-height: 280px; background: var(--surface); border-radius: 8px; }
.ad--lead { margin: 2rem auto 0; }
.ad--side { margin: 0; }
