/* ==========================================================================
   PixelRecovery — design system
   Zero dependencies. One file. Dark/light via data-theme.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
  color-scheme: light;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --bg: #f6f7f9;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --surface-3: #e8ebf1;

  --text: #0a0e17;
  --text-soft: #414b5c;
  --text-mute: #667085;

  --line: #e2e6ee;
  --line-strong: #cbd2df;

  --accent: #4b45e0;
  --accent-ink: #ffffff;
  --accent-soft: #ecebff;
  --accent-line: #c9c5ff;
  --accent-2: #0e9db8;

  --ok: #14804a;
  --ok-soft: #e6f6ee;
  --warn: #a15c00;
  --warn-soft: #fff4e0;
  --danger: #c02b2b;
  --danger-soft: #fdecec;

  --grid: rgba(10, 14, 23, 0.055);
  --shadow-sm: 0 1px 2px rgba(10, 14, 23, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(10, 14, 23, 0.18);
  --shadow-lg: 0 30px 70px -30px rgba(10, 14, 23, 0.35);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --wrap: 1120px;
  --wrap-narrow: 760px;

  --step: clamp(0.95rem, 0.9rem + 0.2vw, 1.0625rem);
  --h1: clamp(2.15rem, 1.45rem + 2.9vw, 3.5rem);
  --h2: clamp(1.65rem, 1.3rem + 1.5vw, 2.45rem);
  --h3: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #070a10;
  --bg-elevated: #0b1018;
  --surface: #0e141f;
  --surface-2: #131a27;
  --surface-3: #1a2231;

  --text: #eef2f8;
  --text-soft: #b3bdcd;
  --text-mute: #8592a6;

  --line: #1d2534;
  --line-strong: #2c374b;

  --accent: #8f95ff;
  --accent-ink: #080b14;
  --accent-soft: #161b32;
  --accent-line: #303872;
  --accent-2: #35d3ea;

  --ok: #4ade80;
  --ok-soft: #0d2318;
  --warn: #fbbf24;
  --warn-soft: #241a06;
  --danger: #f87171;
  --danger-soft: #2a1010;

  --grid: rgba(238, 242, 248, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 40px -16px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}

/* 2. Reset ----------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
}

input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
  font-weight: 700;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 3. Utilities ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 0.5rem + 2.2vw, 2rem);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: clamp(3rem, 2rem + 5vw, 5.5rem);
}

.section--tight {
  padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
}

.section--alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.lead {
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.28rem);
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 62ch;
}

.muted {
  color: var(--text-mute);
}

.small {
  font-size: 0.85rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

.stack > * + * {
  margin-top: 1rem;
}

.stack-lg > * + * {
  margin-top: 2rem;
}

.center {
  text-align: center;
}

.center .lead {
  margin-inline: auto;
}

/* 4. Buttons --------------------------------------------------------------- */

.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--btn-border);
  border-radius: 11px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--surface-2);
  box-shadow: none;
}

.btn--sm {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  font-size: 0.86rem;
  border-radius: 9px;
}

.btn--lg {
  min-height: 54px;
  padding: 0.95rem 1.7rem;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* 5. Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header {
    background: var(--bg);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-mark rect {
  fill: var(--text);
}

.brand-mark rect.lit {
  fill: var(--accent);
}

.brand span b {
  color: var(--accent);
  font-weight: inherit;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.lang-select {
  appearance: none;
  height: 40px;
  padding: 0 2rem 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23808b9e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 12px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-select:hover {
  border-color: var(--line-strong);
}

.nav-toggle {
  display: none;
}

/* 6. Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 6vw, 6rem) clamp(3rem, 2rem + 5vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(900px, 120vw);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  opacity: 0.85;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 1rem + 3.5vw, 3.5rem);
  align-items: center;
}

.hero h1 {
  font-size: var(--h1);
  letter-spacing: -0.035em;
  margin-top: 1.1rem;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lead {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 0.98rem + 0.55vw, 1.3rem);
}

.hero-actions {
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-mute);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-list svg {
  width: 15px;
  height: 15px;
  color: var(--ok);
  flex: none;
}

/* Hero visual */

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  max-height: 480px;
}

.pixel-panel {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 10px;
  padding: 26px;
  overflow: hidden;
}

.pixel-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, var(--accent-soft), transparent 60%);
  opacity: 0.9;
}

.pixel-cell {
  position: relative;
  border-radius: 7px;
  background: var(--surface-3);
  opacity: 0.55;
  transition: background-color 0.6s var(--ease), opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.pixel-cell.lit {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 24px -2px var(--accent);
  transform: scale(1.04);
}

.pixel-cell.lit-2 {
  background: var(--accent-2);
  opacity: 1;
  box-shadow: 0 0 22px -4px var(--accent-2);
}

.pixel-cell.lit-3 {
  background: var(--danger);
  opacity: 0.9;
}

.hero-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.hero-badge--a {
  top: 8%;
  left: -2%;
}

.hero-badge--b {
  bottom: 10%;
  right: -2%;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.hero-badge--b .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* 7. Cards ----------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

a.card {
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.card h3 {
  font-size: var(--h3);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.card .card-cta {
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: 0.87rem;
  font-weight: 650;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.card .card-cta svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s var(--ease);
}

a.card:hover .card-cta svg {
  transform: translateX(3px);
}

.card--feature {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
}

.card-tag {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 700;
}

/* 8. Section headers ------------------------------------------------------- */

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.section-head h2 {
  font-size: var(--h2);
  margin-top: 0.75rem;
}

.section-head p {
  margin-top: 0.9rem;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

/* 9. Steps ----------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  position: relative;
  padding: 1.4rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.steps h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}

.steps p {
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* 10. Prose ---------------------------------------------------------------- */

.prose {
  max-width: 70ch;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2 {
  font-size: var(--h2);
  margin-top: 3rem;
  scroll-margin-top: 90px;
}

.prose h3 {
  font-size: var(--h3);
  margin-top: 2rem;
}

.prose p,
.prose li {
  color: var(--text-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose strong {
  color: var(--text);
  font-weight: 650;
}

.prose blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.5rem 0;
}

.prose th,
.prose td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  font-weight: 650;
}

.prose td {
  color: var(--text-soft);
}

.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-scroll table {
  margin: 0;
  min-width: 520px;
}

/* 11. FAQ ------------------------------------------------------------------ */

.faq-list {
  display: grid;
  gap: 0.6rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-weight: 650;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: var(--surface-2);
}

.faq-item summary::after {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq-item .faq-body {
  padding: 0 1.25rem 1.2rem;
  color: var(--text-soft);
  font-size: 0.94rem;
  max-width: 68ch;
}

.faq-item .faq-body > * + * {
  margin-top: 0.8rem;
}

/* 12. Callout -------------------------------------------------------------- */

.callout {
  display: flex;
  gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 0.9rem;
  color: var(--text-soft);
}

.callout svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

.callout strong {
  color: var(--text);
}

.callout--warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}

.callout--warn svg {
  color: var(--warn);
}

.callout--danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

.callout--danger svg {
  color: var(--danger);
}

/* 13. Breadcrumbs ---------------------------------------------------------- */

.breadcrumbs {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-mute);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--text-mute);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* 14. Tool page shell ------------------------------------------------------ */

.tool-head {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) 1.5rem;
}

.tool-head h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  margin-top: 0.9rem;
}

.tool-head .lead {
  margin-top: 1rem;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.tool-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

/* 15. Dead pixel test ------------------------------------------------------ */

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
  overflow: hidden;
}

.swatch:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-line);
}

.swatch:focus-visible {
  outline-offset: 3px;
}

.swatch-chip {
  position: relative;
  display: block;
  height: 74px;
  flex: none;
  border-bottom: 1px solid var(--line);
}

.swatch-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.14));
}

.swatch-name {
  display: block;
  padding: 0.55rem 0.7rem 0;
  font-weight: 650;
  font-size: 0.86rem;
}

.swatch-note {
  display: block;
  padding: 0.1rem 0.7rem 0.65rem;
  font-size: 0.68rem;
  color: var(--text-mute);
  line-height: 1.3;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  background: #000;
  color: #fff;
  touch-action: none;
  overscroll-behavior: none;
}

.stage.is-open {
  display: block;
}

.stage[data-cursor="hidden"] {
  cursor: none;
}

.stage-hud {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.8rem, 2vw, 1.5rem);
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.74) 58%,
    rgba(0, 0, 0, 0) 100%
  );
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  z-index: 2;
}

.stage-hud.is-hidden {
  opacity: 0;
}

.stage-hud > * {
  pointer-events: auto;
}

.stage-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.stage-info strong {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.stage-info .sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.25);
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: background-color 0.15s;
}

.stage-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.stage-btn svg {
  width: 16px;
  height: 16px;
}

.stage-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
  max-width: min(90vw, 460px);
}

.stage-hint.is-hidden {
  opacity: 0;
}

.stage-hint kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
}

.stage-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  z-index: 1;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.stage-tap:focus-visible,
.stage-tap:hover {
  opacity: 1;
}

.stage-tap--prev {
  left: 0;
}

.stage-tap--next {
  right: 0;
}

.stage-tap svg {
  width: 30px;
  height: 30px;
}

.stage-progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.stage-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: currentColor;
  transition: width 0.2s linear;
}

/* 16. Fixer ---------------------------------------------------------------- */

.fixer-layout {
  display: grid;
  gap: 1rem;
}

.workspace {
  position: relative;
  min-height: clamp(420px, 62vh, 640px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 40%, var(--surface-2), transparent 70%),
    var(--surface);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.workspace.is-fullscreen {
  border-radius: 0;
  border: 0;
  min-height: 100vh;
  background: #000;
}

.workspace-hint {
  position: absolute;
  inset: 0 0 auto 0;
  display: grid;
  place-items: center;
  padding: 1.1rem 2rem 0;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.88rem;
  pointer-events: none;
  transition: opacity 0.3s;
}

.workspace.is-running .workspace-hint {
  opacity: 0;
}

.fixer-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.fixer-box.is-dragging {
  cursor: grabbing;
}

.fixer-box canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.fixer-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.55;
}

.fixer-crosshair::before,
.fixer-crosshair::after {
  content: "";
  position: absolute;
  background: #fff;
  mix-blend-mode: difference;
}

.fixer-crosshair::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.fixer-crosshair::after {
  left: 50%;
  top: 0;
  height: 100%;
  width: 1px;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  cursor: nwse-resize;
  touch-action: none;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.55) 50%);
}

.fixer-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.control > label,
.control > .control-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.control output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.control select,
.control input[type="number"] {
  height: 40px;
  padding: 0 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  font-size: 0.86rem;
}

input[type="range"] {
  width: 100%;
  height: 40px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--accent);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
}

.fixer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timer {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
  min-width: 5.5ch;
}

.timer small {
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

.timer-progress {
  flex: 1 1 180px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  min-width: 120px;
}

.timer-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s linear;
}

.seg {
  display: flex;
  width: 100%;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  gap: 2px;
}

.seg button {
  flex: 1 1 auto;
  min-height: 34px;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.seg button[aria-pressed="true"] {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* 17. Monitor tests -------------------------------------------------------- */

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}

.test-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
}

.test-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.test-card .tc-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface-2);
  flex: none;
  color: var(--accent);
}

.test-card .tc-icon svg {
  width: 20px;
  height: 20px;
}

.test-card h3 {
  font-size: 0.94rem;
  margin-bottom: 0.2rem;
}

.test-card p {
  font-size: 0.79rem;
  color: var(--text-mute);
  line-height: 1.45;
}

.screen-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.screen-info div {
  padding: 0.85rem 1rem;
  background: var(--surface);
}

.screen-info dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.screen-info dd {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pattern-stage {
  background: #000;
}

.pattern-layer {
  position: absolute;
  inset: 0;
}

.pattern-layer--text {
  display: grid;
  place-items: center;
  padding: 6vw;
  background: #fff;
  color: #000;
}

.pattern-layer--text .text-sample {
  max-width: 900px;
  width: 100%;
}

.pattern-layer--text h2 {
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  margin-bottom: 1rem;
}

.pattern-layer--text p {
  font-size: clamp(0.85rem, 1.4vw, 1.1rem);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.pattern-layer--text .fine {
  font-size: 10px;
  line-height: 1.35;
  font-family: var(--font-mono);
}

.pattern-layer--grid {
  background-image: linear-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: #000;
}

.pattern-layer--grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0 40px, rgba(255, 255, 255, 0.9) 40px 41px, transparent 41px),
    radial-gradient(circle at 50% 50%, transparent 0 120px, rgba(255, 255, 255, 0.9) 120px 121px, transparent 121px);
}

.pattern-layer--gradient-gray {
  background: linear-gradient(90deg, #000 0%, #fff 100%);
}

.pattern-layer--steps {
  background: repeating-linear-gradient(
    90deg,
    #000 0 6.25%,
    #111 6.25% 12.5%,
    #222 12.5% 18.75%,
    #333 18.75% 25%,
    #444 25% 31.25%,
    #555 31.25% 37.5%,
    #666 37.5% 43.75%,
    #777 43.75% 50%,
    #888 50% 56.25%,
    #999 56.25% 62.5%,
    #aaa 62.5% 68.75%,
    #bbb 68.75% 75%,
    #ccc 75% 81.25%,
    #ddd 81.25% 87.5%,
    #eee 87.5% 93.75%,
    #fff 93.75% 100%
  );
}

.pattern-layer--rgb {
  background: linear-gradient(
    180deg,
    #f00 0 33.33%,
    #0f0 33.33% 66.66%,
    #00f 66.66% 100%
  );
}

.pattern-layer--rgb-smooth {
  background: linear-gradient(180deg, #f00 0 33.33%, #0f0 33.33% 66.66%, #00f 66.66% 100%);
  background-blend-mode: screen;
}

.pattern-layer--uniformity {
  background: #808080;
}

.pattern-layer--black {
  background: #000;
}

.pattern-layer--white {
  background: #fff;
}

.pattern-layer--canvas canvas {
  width: 100%;
  height: 100%;
}

.pattern-note {
  position: absolute;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  max-width: min(92vw, 560px);
  padding: 0.6rem 0.9rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  text-align: center;
  backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.4s;
}

.pattern-note.is-hidden {
  opacity: 0;
}

/* 18. Ad slots & consent --------------------------------------------------- */

.ad-slot {
  display: grid;
  place-items: center;
  margin-block: 2rem;
  padding: 0.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  min-height: 280px;
  overflow: hidden;
}

.ad-slot--footer {
  min-height: 120px;
  margin-block: 1.5rem;
}

.ad-slot .ad-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.consent {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 300;
  width: min(680px, calc(100vw - 2rem));
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  display: none;
}

.consent.is-open {
  display: block;
}

.consent p {
  font-size: 0.84rem;
  color: var(--text-soft);
}

.consent p a {
  white-space: nowrap;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.consent-actions .btn {
  min-height: 40px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

/* 19. Affiliate ------------------------------------------------------------ */

.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.affiliate-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.affiliate-item .aff-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.affiliate-item h3 {
  font-size: 0.95rem;
}

.affiliate-item p {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* 20. Footer --------------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  padding-block: 3rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-brand p {
  margin-top: 0.9rem;
  font-size: 0.86rem;
  color: var(--text-mute);
  max-width: 34ch;
}

.footer-col h3 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-col a {
  font-size: 0.86rem;
  color: var(--text-soft);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--text-mute);
}

.footer-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
}

.footer-langs a {
  color: var(--text-mute);
  text-decoration: none;
}

.footer-langs a[aria-current="true"] {
  color: var(--text);
  font-weight: 650;
}

/* 21. Misc ----------------------------------------------------------------- */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 550;
  color: var(--text-soft);
}

.toc {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc h2 {
  font-size: 0.72rem !important;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 0.7rem !important;
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.87rem;
  display: grid;
  gap: 0.35rem;
}

.toc a {
  color: var(--text-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.guide-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: start;
}

.guide-layout--flip {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.guide-aside {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 1rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.related {
  display: grid;
  gap: 0.6rem;
}

.related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.87rem;
  font-weight: 550;
  text-decoration: none;
}

.related a:hover {
  border-color: var(--accent-line);
  color: var(--text);
}

.related svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--text-mute);
}

.notfound {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 60vh;
  padding-block: 4rem;
}

.notfound .big {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 2rem + 12vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.05em;
}

/* 22. Motion & print ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .consent,
  .stage,
  .tool-meta {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* 23. Responsive ----------------------------------------------------------- */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual {
    max-height: 380px;
    order: -1;
  }

  .pixel-panel {
    width: min(100%, 330px);
  }

  .hero-badge--a {
    left: 0;
  }

  .hero-badge--b {
    right: 0;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-aside {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .guide-aside .toc {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .fixer-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-nav {
    position: fixed;
    inset: 66px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem clamp(1rem, 4vw, 1.5rem) 1.25rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0.6rem;
    font-size: 0.98rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-tools .lang-select {
    display: none;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .hero {
    padding-block: 2.5rem 3rem;
  }

  .tool-head {
    padding-top: 1.5rem;
  }

  .stage-hud {
    padding: 0.9rem;
  }

  .stage-info .hide-mobile {
    display: none;
  }

  .swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fixer-controls {
    grid-template-columns: 1fr;
  }

  .fixer-bar {
    gap: 0.6rem;
  }

  .timer {
    font-size: 1.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .ad-slot {
    min-height: 250px;
  }
}

@media (max-width: 420px) {
  .btn-row .btn {
    width: 100%;
  }

  .swatches {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .swatch {
    min-height: 92px;
    padding: 0.65rem;
  }
}

/* 24. Additions ------------------------------------------------------------ */

.icon-sun,
.icon-moon {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.small-heading {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 600;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.check-list svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 3px;
  color: var(--text-mute);
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, var(--accent-soft), var(--surface) 72%);
}

.cta-band h2 {
  font-size: var(--h2);
}

.cta-band p {
  margin-top: 0.5rem;
  color: var(--text-soft);
  max-width: 54ch;
}

.footer-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-soft);
  font-size: 0.86rem;
  text-align: left;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

#fixer-play .js-pause {
  display: none;
}

#fixer-play[data-state="running"] .js-play {
  display: none;
}

#fixer-play[data-state="running"] .js-pause {
  display: block;
}

.stage-btn[data-prev] svg {
  transform: rotate(180deg);
}

.stage-hint {
  z-index: 3;
}

.stage-progress {
  z-index: 4;
}

.stage-hud {
  z-index: 3;
}

.pattern-note {
  z-index: 2;
}

#fixer-app:fullscreen,
#fixer-app.is-fullscreen {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
  background: var(--bg);
  overflow: hidden;
}

#fixer-app:fullscreen .workspace,
#fixer-app.is-fullscreen .workspace {
  flex: 1 1 auto;
  min-height: 0;
}

#fixer-app:fullscreen .fixer-bar,
#fixer-app:fullscreen .fixer-controls,
#fixer-app.is-fullscreen .fixer-bar,
#fixer-app.is-fullscreen .fixer-controls {
  flex: none;
}

@media (max-width: 640px) {
  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-band .btn {
    width: 100%;
  }
}

/* Rhythm inside generated sections (guide / legal pages). */
:where(.prose section) > * + * {
  margin-top: 1.15rem;
}

:where(.prose section) > h2 + * {
  margin-top: 1.15rem;
}

.nav-langs {
  display: none;
}

@media (max-width: 760px) {
  .nav-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    margin-top: 0.6rem;
    padding: 0.9rem 0.6rem 0.2rem;
    border-top: 1px solid var(--line);
  }

  .nav-langs a {
    padding: 0 !important;
    font-size: 0.82rem;
    color: var(--text-mute);
  }

  .nav-langs a[aria-current="true"] {
    color: var(--text);
    font-weight: 650;
  }
}

/* Japanese typography: tighter display sizes, phrase-aware line breaks. */
html[lang="ja"] {
  --h1: clamp(1.85rem, 1.3rem + 2.1vw, 3.05rem);
  --h2: clamp(1.4rem, 1.2rem + 0.9vw, 1.95rem);
}

html[lang="ja"] body {
  line-height: 1.85;
  letter-spacing: 0.01em;
}

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] .hero h1 {
  line-break: strict;
  word-break: auto-phrase;
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .fixer-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .fixer-bar .timer,
  .fixer-bar .timer-progress,
  .fixer-bar #fixer-play {
    grid-column: 1 / -1;
  }

  .fixer-bar .timer-progress {
    order: 2;
  }

  .fixer-bar #fixer-play {
    order: 3;
    width: 100%;
  }

  .fixer-bar #fixer-reset,
  .fixer-bar #fixer-fullscreen {
    order: 4;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .seg {
    flex-wrap: wrap;
  }

  .seg button {
    flex: 1 1 45%;
  }
}

/* Language picker affordance: a globe makes the control readable even when
   the current value is written in a language the visitor does not speak. */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-globe {
  position: absolute;
  left: 0.6rem;
  width: 15px;
  height: 15px;
  color: var(--text-mute);
  pointer-events: none;
}

.lang-picker .lang-select {
  padding-left: 2rem;
}

@media (max-width: 760px) {
  .header-tools .lang-picker {
    display: none;
  }

  .nav-langs {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.6rem;
    padding: 0.9rem 0.6rem 0.2rem;
    border-top: 1px solid var(--line);
  }

  .nav-langs-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-mute);
  }

  .nav-langs-label svg {
    width: 14px;
    height: 14px;
  }

  .nav-langs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
  }
}

/* Language suggestion toast: shown only after an explicit language switch. */
.lang-toast {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(380px, calc(100vw - 2rem));
  padding: 0.65rem 0.7rem 0.65rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  font-size: 0.84rem;
  animation: langToastIn 0.3s var(--ease);
}

.lang-toast[hidden] {
  display: none;
}

.lang-toast-icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
}

.lang-toast-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
}

.lang-toast-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.lang-toast-arrow {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--text-mute);
}

.lang-toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  margin-left: 0.15rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-mute);
}

.lang-toast-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lang-toast-close svg {
  width: 15px;
  height: 15px;
}

@keyframes langToastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-toast {
    animation: none;
  }
}

@media (max-width: 760px) {
  .lang-toast {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: none;
  }
}
