/* ==========================================================================
   兽语翻译 · shouyufy.com
   设计语言：Showa Sekkei 风格（深洋红 / 白 / 米灰 / 直角 / 网格 / 大留白）
   ========================================================================== */

:root {
  --primary: #a92b5f;
  --primary-hover: #444444;
  --bg: #ffffff;
  --bg-alt: #f2f0ef;
  --bg-muted: #ebe6e2;
  --ink: #222222;
  --ink-2: #6b6b6b;
  --ink-3: #a6a6a6;
  --line: #a6a6a6;
  --line-soft: #d9d2cc;
  --inverse: #ffffff;
  --font-sans: "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "Heebo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", "Cascadia Code", "Consolas", "Liberation Mono", monospace;
  --wrap: 1100px;
  --ease: ease-out;
  --fast: 0.2s;
  --base: 0.4s;
  --shadow-header: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

::selection {
  background: var(--primary);
  color: var(--inverse);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mono,
.num {
  font-family: var(--font-num);
}

.nowrap {
  white-space: nowrap;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 4000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--inverse);
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: var(--inverse);
  flex: 0 0 auto;
}

.brand__mark svg {
  width: 23px;
  height: 23px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand__en {
  margin-top: 5px;
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--ink-2);
}

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

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.site-nav a:hover {
  color: var(--primary);
  opacity: 0.82;
}

.site-nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 500;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 0;
  height: 2px;
  background: var(--primary);
}

.site-nav .nav-cta {
  margin-left: 10px;
  padding: 0 18px;
  min-height: 42px;
  background: var(--primary);
  color: var(--inverse);
  font-weight: 500;
}

.site-nav .nav-cta:hover {
  background: var(--primary-hover);
  color: var(--inverse);
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg);
}

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

@media (max-width: 1100px) {
  .site-nav a {
    padding-inline: 8px;
    font-size: 13px;
  }

  .site-nav a[aria-current="page"]::after {
    left: 8px;
    right: 8px;
  }
}

@media (max-width: 980px) {
  .header__inner {
    min-height: 68px;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: 12px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-float);
  }

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

  .site-header.is-nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav a {
    min-height: 48px;
    padding: 0 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--bg-muted);
  }

  .site-nav a[aria-current="page"]::after {
    display: none;
  }

  .site-nav .nav-cta {
    justify-content: center;
    margin: 16px 0 0;
    padding: 0 18px;
    border-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Typography / shared bits
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--primary);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.28;
  text-wrap: balance;
}

h2 {
  font-size: 27px;
  line-height: 1.35;
}

h3 {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.5;
}

.lede {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.8;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--bg-muted);
}

.section--alt {
  background: var(--bg-alt);
}

.section--flush {
  border-bottom: 0;
}

.section--tight {
  padding: 48px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  max-width: 580px;
}

.section-head__lead {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.section-head__lead p {
  margin: 0 0 12px;
}

.section-head__lead p:last-child {
  margin-bottom: 0;
}

.section-head--single {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.section-head--single h2 {
  max-width: none;
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
}

.text-link {
  color: var(--primary);
  text-decoration: underline;
}

.text-link:hover {
  color: var(--primary-hover);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  transition: transform var(--fast) var(--ease);
}

.link-arrow:hover {
  color: var(--primary);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--inverse);
}

.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--inverse);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--inverse);
}

.btn--light {
  background: var(--inverse);
  border-color: var(--inverse);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--inverse);
}

.btn--outline-light {
  background: transparent;
  border-color: var(--ink-3);
  color: var(--inverse);
}

.btn--outline-light:hover {
  background: var(--inverse);
  border-color: var(--inverse);
  color: var(--ink);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(34, 34, 34, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 34, 34, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 104px;
  height: 8px;
  background: var(--primary);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 940px;
  margin: 0 0 20px;
  font-size: clamp(32px, 4.7vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.012em;
}

.hero h1 .accent {
  color: var(--primary);
  white-space: nowrap;
}

.hero__lead {
  max-width: 790px;
  margin: 0 0 32px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.85;
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 12px;
}

.hero__note li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__note li::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--primary);
}

.page-hero {
  padding: 16px 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.24;
}

.page-hero__lead {
  max-width: 780px;
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.85;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.page-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-hero__meta span + span::before {
  content: "/";
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Tool
   -------------------------------------------------------------------------- */

.tool {
  position: relative;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.tool::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 84px;
  height: 4px;
  background: var(--primary);
}

.tool__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 20px;
  background: var(--ink);
  color: var(--inverse);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--inverse);
}

.tool__bar-label {
  font-weight: 500;
}

.tool__status {
  margin-left: auto;
  max-width: 62%;
  overflow: hidden;
  color: #dedede;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.tool__status[data-state="ok"] {
  color: var(--inverse);
}

.tool__status[data-state="error"] {
  color: #ffc2d6;
}

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

.tool__panel {
  min-width: 0;
  padding: 24px;
}

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

.tool__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.tool__head label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.count {
  flex: 0 0 auto;
  padding: 3px 8px;
  background: var(--bg-alt);
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11px;
  line-height: 1.4;
}

.tool__textarea {
  display: block;
  width: 100%;
  min-height: 232px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg-alt);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
  caret-color: var(--primary);
}

.tool__textarea::placeholder {
  color: var(--ink-2);
  opacity: 1;
}

.tool__textarea:focus {
  border-color: var(--primary);
  background: var(--bg);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tool__textarea--output {
  background: var(--bg);
  cursor: default;
  caret-color: transparent;
}

.tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.field-hint {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.tool__settings {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
}

.settings__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.settings__title {
  font-size: 14px;
  font-weight: 600;
}

.settings__title span {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 400;
}

.link-btn {
  min-height: 32px;
  padding: 4px 0;
  color: var(--primary);
  font-size: 12px;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--primary-hover);
}

.settings__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.chars-input {
  flex: 1 1 320px;
  min-width: 0;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg-alt);
  font-family: var(--font-sans);
  font-size: 21px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  outline: none;
}

.chars-input:focus {
  border-color: var(--primary);
  background: var(--bg);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.char-map {
  display: flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--bg);
}

.char-map__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  min-height: 56px;
  padding: 3px;
  border-left: 1px solid var(--line-soft);
}

.char-map__cell:first-child {
  border-left: 0;
}

.char-map__digit {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 10px;
  line-height: 1;
}

.char-map__char {
  margin-top: 3px;
  color: var(--primary);
  font-size: 21px;
  line-height: 1.1;
}

.char-map__cell.is-empty .char-map__char {
  color: var(--ink-3);
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.preset {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 12px;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.preset:hover {
  border-color: var(--ink);
  background: var(--bg);
}

.preset:active {
  transform: translateY(1px);
}

.debug {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.debug summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
}

.debug summary::marker {
  color: var(--primary);
}

.debug__body {
  margin-top: 8px;
}

.debug__row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.debug__row:last-child {
  border-bottom: 0;
}

.debug__label {
  color: var(--ink-2);
  font-size: 12px;
}

.debug__value {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.debug__empty {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.debug__error {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--primary);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 3000;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-left: 4px solid var(--primary);
  background: var(--ink);
  color: var(--inverse);
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Content modules
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 24px;
}

.split > *,
.article-layout > *,
.prose,
.section-head > *,
.grid > * {
  min-width: 0;
}

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

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

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 48px;
  align-items: start;
}

.split--reverse {
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
}

.side-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.side-card--alt {
  background: var(--bg-alt);
}

.side-card__label {
  margin: 0 0 14px;
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}

.side-card p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.side-card p:last-child {
  margin-bottom: 0;
}

.side-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 13px;
}

.side-list li:last-child {
  border-bottom: 0;
}

.side-list strong {
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature {
  position: relative;
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: transform var(--base) var(--ease), border-color var(--fast) var(--ease);
}

.feature:hover {
  z-index: 1;
  border-color: var(--ink);
  transform: translateY(-2px);
}

.feature__no {
  display: block;
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.feature h3 {
  margin: 14px 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.step__no {
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.step h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.85;
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0 0;
}

.flow__item {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.flow__item:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -17px;
  z-index: 2;
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 14px;
  line-height: 1;
  transform: translateY(-50%);
}

.flow__label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flow__box {
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 22px 24px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
}

.stat__num {
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
}

.stat__label {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}

.callout {
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  background: var(--bg-alt);
}

.callout h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.callout p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.callout p:last-child {
  margin-bottom: 0;
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.fit {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.fit__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fit__label::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--primary);
}

.fit ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fit li {
  position: relative;
  margin: 0;
  padding: 7px 0 7px 16px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.fit li::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--ink-3);
}

.fit--no .fit__label::before {
  background: var(--ink-3);
}

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

.dialect {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: transform var(--base) var(--ease), border-color var(--fast) var(--ease);
}

.dialect:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.dialect__chars {
  margin: 0;
  color: var(--primary);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.dialect__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.dialect__desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.dialect__meta {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.dialect__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.dialect__link:hover {
  text-decoration: underline;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.use {
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.use__no {
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.use h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.use p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--bg);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

.compare-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--ink);
  color: var(--inverse);
  font-size: 13px;
  font-weight: 500;
}

.compare-table tbody th {
  width: 140px;
  background: var(--bg-alt);
  font-weight: 600;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table .is-accent {
  color: var(--primary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Articles / post cards
   -------------------------------------------------------------------------- */

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

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

.post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--base) var(--ease), border-color var(--fast) var(--ease);
}

.post-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.post-card__cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  overflow: hidden;
  background: var(--primary);
}

.post-card__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
}

.post-card__cover--ink {
  background: var(--ink);
}

.post-card__cover--beige {
  background: var(--bg-muted);
}

.post-card__cover--beige::before {
  background-image:
    linear-gradient(to right, rgba(34, 34, 34, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 34, 34, 0.08) 1px, transparent 1px);
}

.post-card__char {
  position: relative;
  z-index: 1;
  color: var(--inverse);
  font-size: 92px;
  font-weight: 700;
  line-height: 1;
}

.post-card__cover--beige .post-card__char {
  color: var(--primary);
}

.post-card__issue {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: var(--inverse);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.post-card__cover--beige .post-card__issue {
  color: var(--ink);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.post-card__meta {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.post-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
}

.post-card p {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.post-card .link-arrow {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   Breadcrumbs, page layout, prose
   -------------------------------------------------------------------------- */

.breadcrumb {
  padding-top: 16px;
  font-size: 12px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--ink-3);
}

.breadcrumb a {
  color: var(--ink-2);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

.prose {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.85;
}

.prose > p {
  margin: 0 0 20px;
}

.prose > p:first-child {
  font-size: 17px;
  color: var(--ink);
}

.prose h2 {
  margin: 56px 0 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 27px;
  scroll-margin-top: 96px;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin: 32px 0 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  scroll-margin-top: 96px;
}

.prose h4 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 8px;
}

.prose li > ul,
.prose li > ol {
  margin-top: 8px;
  margin-bottom: 4px;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--primary-hover);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose em {
  font-style: normal;
  border-bottom: 1px solid var(--primary);
}

.prose code {
  padding: 2px 6px;
  background: var(--bg-muted);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.prose pre {
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  border-left: 4px solid var(--primary);
  background: var(--ink);
  color: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--primary);
  color: var(--ink-2);
  font-size: 16px;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

.prose table th,
.prose table td {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.prose table thead th {
  background: var(--ink);
  color: var(--inverse);
  font-weight: 500;
}

.prose table tbody th {
  background: var(--bg-alt);
  font-weight: 600;
}

.prose .note {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  background: var(--bg-alt);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.prose .note strong {
  color: var(--ink);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(220px, 1fr);
  gap: 56px;
  align-items: start;
  padding: 40px 0 72px;
}

.article-head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-head h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.3;
}

.article-head__lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.85;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta span + span::before {
  content: "/";
  color: var(--ink-3);
}

.article-toc {
  position: sticky;
  top: 100px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.article-toc__title {
  margin: 0 0 12px;
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.article-toc li {
  counter-increment: toc;
  border-bottom: 1px solid var(--line-soft);
}

.article-toc li:last-child {
  border-bottom: 0;
}

.article-toc a {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--primary);
  font-family: var(--font-num);
  font-size: 10px;
  line-height: 1.9;
}

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

.article-aside__block {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.article-aside__block p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.article-aside__block .btn {
  width: 100%;
}

.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 11px;
}

.author-box {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.author-box__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--primary);
  color: var(--inverse);
  font-size: 18px;
  font-weight: 700;
}

.author-box h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.author-box p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.article-nav a {
  padding: 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.article-nav a:hover {
  border-color: var(--primary);
}

.article-nav span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-nav strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-list {
  border-top: 1px solid var(--line);
}

.faq {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
}

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

.faq summary:hover .faq__q {
  color: var(--primary);
}

.faq__q {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
  transition: color var(--fast) var(--ease);
}

.faq__icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 4px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
  transition: transform var(--fast) var(--ease);
}

.faq__icon::before {
  width: 18px;
  height: 2px;
}

.faq__icon::after {
  width: 2px;
  height: 18px;
}

.faq[open] .faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq[open] .faq__q {
  color: var(--primary);
}

.faq__a {
  padding: 0 56px 20px 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.faq__a p {
  margin: 0 0 12px;
}

.faq__a p:last-child {
  margin-bottom: 0;
}

.faq__a a {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  padding: 56px 0;
  background: var(--ink);
  color: var(--inverse);
}

.cta-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 104px;
  height: 8px;
  background: var(--primary);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-band h2 {
  max-width: 680px;
  margin: 0 0 12px;
  color: var(--inverse);
  font-size: 30px;
  line-height: 1.35;
}

.cta-band p {
  max-width: 620px;
  margin: 0;
  color: #d7d7d7;
  font-size: 14px;
  line-height: 1.8;
}

.cta-band .eyebrow {
  color: var(--inverse);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: 56px;
  border-top: 1px solid var(--line);
  background: var(--bg-muted);
  color: var(--ink);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr);
  gap: 48px;
  padding-bottom: 40px;
}

.footer__brand .brand {
  margin-bottom: 16px;
}

.footer__tagline {
  max-width: 380px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
}

.footer__note {
  max-width: 400px;
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--primary);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.8;
}

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

.footer__title {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__col a {
  display: block;
  min-height: 32px;
  padding: 5px 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
}

.footer__col a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
}

.footer__bottom p {
  margin: 0;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__legal a {
  color: var(--ink);
  text-decoration: none;
}

.footer__legal a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Floating / utility
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-float);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity var(--fast) var(--ease),
    visibility var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--inverse);
}

.not-found {
  padding: 80px 0 96px;
}

.not-found__code {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-num);
  font-size: clamp(72px, 16vw, 180px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.not-found h1 {
  margin: 24px 0 16px;
  font-size: clamp(26px, 4vw, 38px);
}

.not-found p {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.85;
}

.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .site-nav .nav-cta {
    margin-left: 6px;
    padding-inline: 14px;
  }
}

@media (max-width: 980px) {
  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 44px 0 48px;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
  }

  .section-head h2 {
    max-width: none;
  }

  .split,
  .split--reverse {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

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

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

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

  .flow__item:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -19px;
    transform: translateX(50%);
  }

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

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-top: 32px;
  }

  .article-aside {
    order: 2;
  }

  .article-toc {
    position: static;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cta-band__inner {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(calc(100% - 36px), var(--wrap));
  }

  .hero h1 {
    font-size: clamp(30px, 7.4vw, 38px);
    line-height: 1.3;
  }

  .page-hero h1 {
    line-height: 1.3;
  }

  .hero__lead,
  .page-hero__lead,
  .lede {
    font-size: 16px;
  }

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

  .tool__panel + .tool__panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tool__panel {
    padding: 20px;
  }

  .tool__textarea {
    min-height: 190px;
  }

  .tool__status {
    max-width: 52%;
    font-size: 10px;
  }

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

  .stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .feature-grid,
  .use-grid,
  .dialect-grid,
  .post-grid,
  .post-grid--2,
  .grid--2,
  .grid--3,
  .grid--4,
  .fit-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .use-grid {
    border-left: 0;
    border-top: 0;
  }

  .feature,
  .use {
    border-left: 1px solid var(--line);
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

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

  .cta-band {
    padding: 40px 0;
  }

  .cta-band h2 {
    font-size: 24px;
  }

  .hero__note {
    gap: 6px 16px;
  }

  .debug__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .page-hero__meta {
    gap: 6px 14px;
  }

  .page-hero__meta span + span::before {
    content: none;
  }

  .article-meta {
    gap: 6px 14px;
  }

  .article-meta span + span::before {
    content: none;
  }

  .faq__a {
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 32px), var(--wrap));
  }

  .brand__text {
    font-size: 16px;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
  }

  .brand__mark svg {
    width: 20px;
    height: 20px;
  }

  .hero {
    padding: 36px 0 40px;
    background-size: 56px 56px;
  }

  .hero::before {
    width: 64px;
    height: 6px;
  }

  .section {
    padding: 44px 0;
  }

  .page-hero {
    padding-bottom: 32px;
  }

  .tool__bar {
    padding-inline: 14px;
    letter-spacing: 0.1em;
  }

  .tool__status {
    max-width: 100%;
    flex-basis: 100%;
    margin-left: 18px;
    text-align: left;
  }

  .tool__bar {
    flex-wrap: wrap;
  }

  .tool__panel,
  .tool__settings {
    padding: 16px;
  }

  .tool__textarea {
    min-height: 170px;
    padding: 12px;
    font-size: 15px;
  }

  .btn {
    min-height: 44px;
    padding-inline: 12px;
    font-size: 13px;
  }

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

  .tool__actions .btn {
    width: 100%;
  }

  .tool__actions .btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .chars-input {
    flex-basis: 100%;
    font-size: 20px;
  }

  .char-map {
    width: 100%;
  }

  .char-map__cell {
    flex: 1;
    width: auto;
  }

  .stats {
    margin: 24px 0;
  }

  .stat {
    padding: 16px;
  }

  .stat__num {
    font-size: 30px;
  }

  .footer__top {
    padding-bottom: 32px;
  }

  .footer__cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .to-top {
    right: 16px;
    bottom: 16px;
  }

  .toast {
    bottom: 20px;
  }

  .prose h2 {
    font-size: 24px;
    margin-top: 44px;
  }

  .prose h3 {
    font-size: 18px;
  }

  .article-head h1 {
    font-size: 27px;
  }

  .post-card__cover {
    height: 150px;
  }

  .post-card__char {
    font-size: 76px;
  }

  .dialect__chars {
    font-size: 30px;
  }
}

@media (max-width: 380px) {
  .site-nav {
    padding-inline: 16px;
  }

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

  .tool__actions .btn {
    flex: 1 1 auto;
  }

  .stat__num {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
