/* Self-hosted, latin subset, SIL OFL 1.1 (see public/fonts/OFL-*.txt). */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Static style pages under /styles/, the gallery and /tools. Tokens match src/styles.css
   (DESIGN.md: warm white, plum ink, sand lines, one coral action, bold sans titles). */
:root {
  --paper: #faf9f6;
  --bone: #f1f0eb;
  --ink: #211922;
  --muted: #62625b;
  --accent: #ed6f5c;
  --link: #b8412f;
  --line: #e5e5e0;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 22px var(--font-display);
  letter-spacing: -0.02em;
}
.brand img {
  border-radius: 10px;
}
a {
  color: var(--link);
}
.eyebrow {
  margin: 36px 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 14px;
  font: 700 44px/1.08 var(--font-display);
  letter-spacing: -0.03em;
}
.lead {
  max-width: 640px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
}
h2 {
  margin: 36px 0 6px;
  font: 700 26px/1.2 var(--font-display);
  letter-spacing: -0.02em;
}
header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
p,
ol,
ul {
  max-width: 640px;
  margin: 0 0 12px;
}
ol,
ul {
  padding-left: 20px;
}
li + li {
  margin-top: 4px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.button:hover {
  background: #e25f4b;
}
.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 30px 0 8px;
}
figure {
  margin: 0;
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--bone);
}
figcaption {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
}
.note {
  color: var(--muted);
  font-size: 13px;
}
.faq {
  max-width: 640px;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  min-height: 44px;
  padding: 11px 0;
  font-weight: 600;
  cursor: pointer;
}
.faq details p {
  margin: 0 0 14px;
}
.jump {
  max-width: none;
  font-size: 14px;
}
section + section {
  margin-top: 8px;
}
/* Reserved AdSense unit (packages/shared ADSENSE); not rendered at all until an ID is set. */
.ad {
  min-height: 120px;
  margin: 32px 0;
}
.others {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  max-width: none;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
footer {
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 560px) {
  h1 {
    font-size: 34px;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  header {
    flex-wrap: wrap;
  }
  .button {
    width: 100%;
  }
}
.tools {
  padding: 0;
  list-style: none;
}
.tools > li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.tools h2 {
  margin: 0 0 4px;
}
.tools p {
  margin: 0 0 10px;
  color: var(--muted);
}
.tools h3 {
  margin: 16px 0 4px;
  font: 600 14px var(--font-body);
}
.tool-pages {
  margin: 0;
  padding-left: 20px;
}

/* Free whole-photo converter on /styles/pixel-art (public/pixel-art-tool.js). Ink buttons: the coral action stays the AI edit. */
.px-tool {
  margin: 32px 0 8px;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: var(--bone);
}
.px-tool h2 {
  margin-top: 0;
}
.px-note {
  max-width: 640px;
}
.px-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 20px;
  margin: 14px 0 6px;
}
.px-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.px-field > label {
  font-size: 13px;
  font-weight: 600;
}
.px-field input[type='range'] {
  width: 220px;
  max-width: 100%;
  min-height: 44px;
  accent-color: var(--ink);
}
.px-field select {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.px-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bone);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.px-button:hover {
  background: #3a2f3b;
}
/* The real file input stays focusable, just visually hidden; its label is the button. */
.px-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.px-file-input:focus-visible + .px-button,
.px-button:focus-visible,
.px-field select:focus-visible,
.px-field input[type='range']:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.px-stage {
  margin: 12px 0;
}
.px-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--paper);
  image-rendering: pixelated;
}
.px-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: none;
}
.px-tool[hidden],
.px-stage[hidden],
.px-downloads[hidden] {
  display: none;
}
@media (max-width: 560px) {
  .px-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .px-field input[type='range'] {
    width: 100%;
  }
  .px-button {
    width: 100%;
  }
}

.px-compare {
  margin: 36px 0 16px;
}
.px-compare h3 {
  margin: 28px 0 4px;
  font: 700 18px / 1.25 var(--font-display);
  letter-spacing: -0.02em;
}
.px-compare .pair {
  margin-top: 14px;
}
.px-pixelated {
  image-rendering: pixelated;
}
