@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/IBMPlexMono-Bold.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1a1a1a;
  --paper: #f5f0e8;
  --red: #DA0000;
  --grey: #666;
  --max-w: 680px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  padding: 2rem 1.5rem 4rem;
}

.wrap { max-width: var(--max-w); margin: 0 auto; }

/* --- Skip link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 1.5rem; top: 1rem; }

/* --- Language nav --- */
.lang-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  text-transform: none;
  letter-spacing: 0.01em;
}
.lang-bar a {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 0.25rem 0.4rem;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lang-bar a:hover { background: var(--ink); color: var(--paper); }
.lang-bar a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* --- Sticker image --- */
.sticker-wrap { text-align: center; margin: 2rem 0 3rem; }
.sticker-wrap img { max-width: 280px; width: 100%; height: auto; }

/* --- Translation note --- */
.translation-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--grey);
  margin-bottom: 2rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--grey);
  border-bottom: 1px solid var(--grey);
}

/* --- Typography --- */
h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 3rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 3px solid var(--red);
}

p { margin-bottom: 1rem; }

.lede {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* --- Callout (blockquote) --- */
blockquote.callout {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--red);
  margin: 1.5rem 0;
  padding: 0;
  padding-left: 1rem;
  border: none;
  border-left: 4px solid var(--red);
}

/* --- Footnote references --- */
sup a {
  color: var(--red);
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
}
sup a:hover { text-decoration: underline; }

/* --- Footnotes section --- */
.footnotes {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 3px solid var(--ink);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--grey);
}
.footnotes ol { padding-left: 1.5rem; }
.footnotes li { margin-bottom: 0.5rem; }
.footnotes li a.fn-url { color: var(--grey); word-break: break-all; }
.footnotes li a.fn-back {
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
  margin-left: 0.3rem;
}
.footnotes li a.fn-back:hover { text-decoration: underline; }

/* --- Footer --- */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--grey);
}
footer a { color: var(--grey); }

/* --- Copy link button --- */
.copy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.4rem 0.8rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 0.5rem;
  vertical-align: middle;
  transition: background 0.15s;
}
.copy-link:hover { background: var(--red); }
.copy-link svg { width: 14px; height: 14px; fill: currentColor; }

/* --- Sticker download block --- */
.sticker-download {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grey);
}
.sticker-download h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}
.sticker-download .shop-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--grey);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.sticker-download .shop-link a { color: var(--ink); }
.sticker-download .shop-link a:hover { color: var(--red); }
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.sticker-card {
  border: 2px solid var(--ink);
  padding: 1rem;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  line-height: 1.4;
}
.sticker-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.6rem;
}
.sticker-card .card-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}
.sticker-card .card-desc {
  color: var(--grey);
  margin-bottom: 0.6rem;
}
.sticker-card .card-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.sticker-card .card-links a {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.2rem 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.sticker-card .card-links a:hover {
  background: var(--ink);
  color: var(--paper);
}

/* --- License --- */
.license {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--grey);
  text-align: center;
}
.license a { color: var(--grey); }

/* --- RTL --- */
[dir="rtl"] blockquote.callout { border-left: none; padding-left: 0; border-right: 4px solid var(--red); padding-right: 1rem; }
[dir="rtl"] .footnotes ol { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .footnotes li a.fn-back { margin-left: 0; margin-right: 0.3rem; }
[dir="rtl"] sup a { direction: ltr; }
[dir="rtl"] .copy-link { margin-left: 0; margin-right: 0.5rem; }

/* --- Focus --- */
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* --- Responsive --- */
@media (max-width: 600px) {
  html { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  body { padding: 1.5rem 1rem 3rem; }
  .sticker-wrap img { max-width: 200px; }
  .sticker-grid { grid-template-columns: 1fr; max-width: 280px; margin: 1rem auto 0; }
  .sticker-download h3 { text-align: center; }
}
