:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-soft: #f0ebe2;
  --ink: #22201e;
  --muted: #68625c;
  --line: #d9d0c4;
  --red: #8c2633;
  --red-dark: #681923;
  --gold: #a78343;
  --deep: #292523;
  --white: #ffffff;
  --shadow: 0 12px 34px rgba(57, 44, 35, 0.08);
  --radius: 8px;
  --header-height: 68px;
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + env(safe-area-inset-top) + 16px);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 280px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p,
figure,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: 0;
}

p:last-child,
ul:last-child {
  margin-bottom: 0;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--red-dark);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(45, 35, 29, 0.07);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border: 1px solid var(--red-dark);
  border-radius: 19px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 750;
}

.brand-text span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  position: fixed;
  z-index: 9998;
  top: calc(var(--header-height) + env(safe-area-inset-top));
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  padding: 18px 16px 40px;
  background: var(--bg);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding-inline: 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}

@media (max-width: 979px) {
  body {
    padding-top: calc(var(--header-height) + env(safe-area-inset-top));
  }

  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
  }

  section[id] {
    scroll-margin-top: calc(var(--header-height) + env(safe-area-inset-top) + 16px);
  }
}

.hero {
  padding: 22px 0 48px;
  overflow: hidden;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-copy {
  display: contents;
}

.hero-copy .eyebrow {
  order: 1;
}

.hero-copy h1 {
  order: 2;
}

.hero-name-en {
  order: 3;
}

.hero-subtitle {
  order: 4;
}

.hero-visual {
  order: 5;
}

.hero-intro {
  order: 6;
}

.hero-stats {
  order: 7;
}

.hero-copy .button {
  order: 8;
}

.hero-actions {
  order: 8;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 2px;
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 48px;
  font-weight: 700;
}

.hero-name-en {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 17px;
  font-weight: 700;
}

.hero-subtitle {
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 720;
  line-height: 1.55;
}

.hero-intro {
  max-width: 590px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 16px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 590px;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stat {
  display: grid;
  min-width: 0;
  padding: 11px 7px;
  text-align: center;
}

.hero-stat:nth-child(even) {
  border-left: 1px solid var(--line);
}

.hero-stat:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.hero-stat strong {
  color: var(--red-dark);
  font-size: 24px;
  line-height: 1.1;
}

.hero-stat span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}

.button-primary {
  align-self: flex-start;
  color: var(--white);
  background: var(--red);
  box-shadow: 0 8px 20px rgba(140, 38, 51, 0.18);
}

.button-primary:focus-visible,
.button-primary:hover {
  background: var(--red-dark);
}

.button-secondary {
  color: var(--red-dark);
  background: var(--surface);
  border-color: var(--line);
}

.button-secondary:focus-visible,
.button-secondary:hover {
  background: #eee8df;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}

.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  width: 100%;
  min-width: 0;
  max-width: 430px;
  align-items: start;
  margin: 14px auto 0;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-compare {
  gap: 9px;
}

.hero-view {
  position: relative;
  display: grid;
  min-width: 0;
  margin: 0;
  place-items: center;
  overflow: visible;
}

.hero-view img {
  width: min(78%, 290px);
  height: auto;
  min-width: 0;
  max-width: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 160ms ease;
}

.hero-view img.is-switching {
  opacity: 0;
}

.view-label {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 50%;
  padding: 3px 8px;
  color: var(--white);
  background: rgba(42, 37, 34, 0.84);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  transform: translateX(-50%);
}

.pair-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  place-items: center;
  color: var(--red);
  line-height: 1;
}

@media (max-width: 979px) {
  .hero-visual {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .hero-view {
    width: 100%;
  }

  .hero-view img {
    height: auto;
  }

  .pair-link {
    order: 2;
    margin-block: -2px;
  }

  .hero-view-front {
    order: 1;
  }

  .hero-view-back {
    order: 3;
  }
}

.pair-link b {
  font-size: 25px;
}

.pair-link span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.compare-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.compare-button {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}

.compare-button.is-active {
  color: var(--white);
  background: var(--red);
  border-color: var(--red-dark);
}

.compare-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.section {
  padding: clamp(44px, 10vw, 72px) 0;
}

.section-tinted {
  background: var(--surface-soft);
}

#about {
  padding-bottom: clamp(36px, 8vw, 48px);
}

#design {
  padding-top: clamp(36px, 8vw, 48px);
}

.section-heading {
  max-width: 710px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 14px;
  font-size: 30px;
}

.section-heading > p:last-child {
  color: var(--muted);
}

.problem-grid,
.format-grid,
.application-grid {
  display: grid;
  gap: 14px;
}

.info-card,
.format-card,
.application-card,
.quality-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 7px 20px rgba(56, 44, 37, 0.04);
}

.info-card,
.application-card {
  padding: 24px 20px;
}

.card-index {
  display: block;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.info-card h3,
.format-card h3,
.application-card h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.info-card p,
.format-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.pair-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
  max-width: 760px;
  align-items: center;
  margin-bottom: 24px;
}

.pair-node {
  display: grid;
  min-width: 0;
  align-content: start;
  justify-items: center;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.pair-node img {
  width: 100%;
  height: auto;
  max-width: 220px;
  margin-bottom: 9px;
  object-fit: contain;
}

.pair-node span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.pair-node strong {
  margin-top: 2px;
  color: var(--red-dark);
  font-size: 25px;
  line-height: 1.15;
}

.pair-arrow {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 4px;
}

.pair-arrow span {
  display: none;
}

.pair-arrow b {
  color: var(--red);
  font-size: 11px;
}

.pair-arrow::after {
  content: "↔";
  color: var(--red);
  font-size: 28px;
  line-height: 1;
}

.format-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 20px;
}

.format-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.format-thumb img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  margin: auto;
}

.format-thumb-rgb {
  background: #ffffff;
}

.format-thumb-rgba,
.checkerboard {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #dedbd5 25%, transparent 25%),
    linear-gradient(-45deg, #dedbd5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dedbd5 75%),
    linear-gradient(-45deg, transparent 75%, #dedbd5 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.format-thumb-mask {
  background: #292929;
}

.format-copy {
  min-width: 0;
}

.format-card h3 {
  margin-bottom: 2px;
  font-size: 17px;
  line-height: 1.3;
}

.format-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.format-card p {
  font-size: 13px;
  line-height: 1.5;
}

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

.image-card {
  min-width: 0;
  margin-bottom: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 7px 20px rgba(56, 44, 37, 0.04);
}

.image-stage {
  display: grid;
  aspect-ratio: 3 / 4;
  padding: 7px;
  place-items: center;
  overflow: hidden;
}

.image-stage-light {
  background: #f3f1ed;
}

.image-stage-dark {
  background: #171717;
}

.image-stage-placeholder {
  min-height: 0;
  color: var(--muted);
  background: #f3f1ed;
  border: 1px dashed #cfc5b8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.image-stage-placeholder.image-stage-dark {
  color: #d9d2cb;
  background: #171717;
  border-color: #5b534d;
}

.image-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-card figcaption {
  padding: 10px 6px 11px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.sample-note {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.overview-section {
  color: var(--white);
  background: var(--deep);
}

.section-heading-light .eyebrow {
  color: #d3b473;
}

.section-heading-light > p:last-child {
  color: #cfc7be;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #5b534d;
  border-left: 1px solid #5b534d;
}

.overview-stat {
  display: grid;
  min-height: 104px;
  align-content: center;
  padding: 15px;
  border-right: 1px solid #5b534d;
  border-bottom: 1px solid #5b534d;
}

.overview-stat strong {
  color: #e0bd74;
  font-size: 32px;
  line-height: 1.1;
}

.overview-stat span {
  margin-top: 7px;
  color: #d9d2cb;
  font-size: 13px;
  font-weight: 650;
}

.overview-stat small {
  margin-top: 2px;
  color: #bdb3aa;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.overview-note {
  max-width: 770px;
  margin: 20px 0 0;
  color: #d9d2cb;
  font-size: 14px;
}

.overview-note p {
  margin-bottom: 7px;
}

.overview-note strong {
  color: #e0bd74;
  font-size: 13px;
}

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

.category-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 7px 20px rgba(56, 44, 37, 0.04);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.category-card:active {
  transform: translateY(1px);
}

.category-image {
  display: grid;
  aspect-ratio: 4 / 5;
  padding: 8px;
  place-items: center;
  background: #eeeae4;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-meta {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.category-meta span {
  display: block;
  margin-bottom: 2px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.category-meta h3 {
  margin: 0;
  font-size: 16px;
}

.workflow-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  gap: 15px;
  padding: 8px 0;
}

.workflow-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 54px;
  bottom: -2px;
  left: 22px;
  width: 1px;
  background: var(--line);
}

.workflow-list .workflow-phase {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 18px 0 8px;
}

.workflow-list .workflow-phase::after {
  display: none;
}

.workflow-phase span {
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 3px;
  color: var(--red);
  background: transparent;
  border-radius: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
}

.workflow-phase strong {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.3;
}

.workflow-list span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.workflow-list strong {
  min-width: 0;
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 14px;
}

.workflow-list strong small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.workflow-list li.workflow-phase {
  grid-column: 1 / -1;
  display: block;
  padding: 18px 0 8px;
}

.workflow-list li.workflow-phase::after {
  display: none;
  content: none;
}

.workflow-list li.workflow-phase span {
  display: block;
  width: auto;
  height: auto;
  margin: 0 0 3px;
  color: var(--red);
  background: transparent;
  border-radius: 0;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.06em;
}

.workflow-list li.workflow-phase strong {
  display: block;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.3;
}

.workflow-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.workflow-result div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.workflow-result strong {
  color: var(--red-dark);
  font-size: 21px;
  line-height: 1.1;
}

.workflow-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.quality-card {
  display: grid;
  min-width: 0;
  min-height: 132px;
  align-content: center;
  justify-items: center;
  padding: 18px 14px;
  text-align: center;
}

.quality-card strong {
  display: block;
  white-space: nowrap;
  color: var(--red-dark);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.1;
}

.quality-card span {
  margin-top: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}

.quality-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.quality-notes {
  max-width: 830px;
  margin-top: 22px;
  padding-left: 17px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-size: 14px;
}

.quality-notes p {
  margin-bottom: 7px;
}

.quality-notes strong {
  color: var(--ink);
}

.application-card ul {
  margin: 17px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.application-card li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.application-card .application-description {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.boundary-section {
  border-top: 5px solid var(--red);
  background: #fbf8f2;
}

.boundary-layout {
  display: grid;
  gap: 26px;
}

.boundary-layout .section-heading {
  margin-bottom: 0;
}

.boundary-content {
  padding: 22px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-content p {
  margin-bottom: 10px;
  font-weight: 750;
}

.boundary-content ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.boundary-content li {
  position: relative;
  padding-left: 15px;
  color: var(--muted);
  font-size: 14px;
}

.boundary-content li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
}

.access-section {
  text-align: center;
}

.access-inner {
  padding: 30px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.access-inner .section-heading {
  margin-inline: auto;
  margin-bottom: 25px;
}

.access-actions {
  display: grid;
  gap: 10px;
  max-width: 660px;
  margin-inline: auto;
}

.access-status {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #eeebe6;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-align: left;
}

.access-status span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.access-status strong {
  flex: 0 0 auto;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 750;
}

.site-footer {
  padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  color: #d9d2cb;
  background: #1f1d1b;
}

.footer-inner {
  display: grid;
  gap: 20px;
}

.footer-inner strong {
  color: var(--white);
  font-size: 15px;
}

.footer-inner p {
  margin: 5px 0 0;
  font-size: 12px;
}

.back-to-top {
  position: fixed;
  z-index: 900;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  visibility: hidden;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border: 1px solid var(--red-dark);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(73, 25, 31, 0.24);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background 180ms ease;
  cursor: pointer;
}

.back-to-top.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--red-dark);
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(140, 38, 51, 0.34);
  outline-offset: 3px;
}

@media (max-width: 339px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .brand-text span {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

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

  .boundary-content ul {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 520px) {
  .container {
    width: min(100% - 40px, var(--container));
  }

  .hero-view {
    height: 330px;
  }

  .hero-compare .hero-view {
    height: auto;
  }

  .hero-compare .hero-view img {
    width: min(70%, 320px);
  }

  .hero-visual {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    grid-template-rows: auto;
    padding: 18px;
  }

  .hero-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-stat {
    border-top: 0;
  }

  .hero-stat:nth-child(n + 3) {
    border-top: 0;
  }

  .hero-stat + .hero-stat {
    border-left: 1px solid var(--line);
  }

  .pair-link {
    display: grid;
    gap: 4px;
  }

  .pair-link span {
    display: none;
  }

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

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

  .overview-stat {
    min-height: 116px;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 768px) {
  :root {
    --header-height: 76px;
  }

  .section {
    padding: 76px 0;
  }

  .hero {
    padding: 40px 0 68px;
  }

  .hero h1 {
    font-size: 62px;
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .hero-visual {
    min-height: 0;
  }

  .hero-view {
    height: 380px;
  }

  .hero-compare .hero-view {
    height: auto;
  }

  .hero-compare .hero-view img {
    width: min(70%, 360px);
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-heading h2 {
    font-size: 38px;
  }

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

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

  .format-card {
    grid-template-columns: 1fr;
  }

  .sample-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .image-card figcaption {
    font-size: 14px;
  }

  .category-grid {
    gap: 18px;
  }

  .category-meta {
    padding: 15px;
  }

  .category-meta h3 {
    font-size: 18px;
  }

  .workflow-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .workflow-list li {
    display: block;
  }

  .workflow-list li:not(:last-child)::after {
    top: 22px;
    right: -18px;
    bottom: auto;
    left: 46px;
    width: calc(100% - 28px);
    height: 1px;
  }

  .workflow-list span {
    margin-bottom: 13px;
  }

  .workflow-list strong {
    display: block;
    min-height: 0;
  }

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

  .boundary-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    align-items: center;
    gap: 54px;
  }

  .access-inner {
    padding: 40px;
  }
}

@media (min-width: 980px) {
  body.nav-open {
    overflow: auto;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    visibility: visible;
    flex-direction: row;
    padding: 0;
    background: transparent;
    opacity: 1;
    transform: none;
    gap: 4px;
  }

  .site-nav a {
    min-height: 44px;
    padding: 0 13px;
    border: 0;
    border-radius: 4px;
    color: var(--muted);
    font-size: 14px;
    transition: color 160ms ease, background 160ms ease;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    color: var(--red-dark);
    background: #eee8df;
  }

  .hero {
    min-height: 0;
    display: block;
  }

  .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
    align-items: center;
    gap: 48px;
  }

  .hero-copy {
    display: block;
  }

  .hero-visual {
    margin: 0;
    max-width: none;
    padding: 20px 14px;
  }

  .hero-view {
    width: 100%;
  }

  .hero-intro {
    margin-top: 0;
  }

  .hero-stats {
    margin-top: 0;
  }

  .hero-actions {
    margin-top: 0;
  }

  .hero-compare .hero-view img {
    width: min(72%, 430px);
  }

  .pair-link span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    writing-mode: vertical-rl;
  }

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

  .workflow-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .workflow-list li:not(:last-child)::after {
    right: -18px;
    width: calc(100% - 28px);
  }

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

@media (hover: hover) and (pointer: fine) {
  .info-card,
  .format-card,
  .image-card,
  .category-card,
  .application-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  }

  .info-card:hover,
  .format-card:hover,
  .image-card:hover,
  .category-card:hover,
  .application-card:hover {
    border-color: #c5b8a8;
    box-shadow: 0 14px 32px rgba(56, 44, 37, 0.09);
    transform: translateY(-3px);
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
