/*!
 * 大小写转换器 · 全站样式
 * 设计基调：giftee Group 的克制配色、细线分隔与充裕留白。
 */
:root {
  --brand: #e76746;
  --brand-strong: #c94f30;
  --brand-deep: #a63d20;
  --brand-soft: #f08b71;
  --brand-wash: #fff3ef;
  --ink: #232323;
  --ink-soft: #4f4f4f;
  --muted: #6c6c6c;
  --bg: #ffffff;
  --bg-soft: #f6f6f6;
  --bg-mid: #eeeeee;
  --line: #dddddd;
  --line-soft: #eeeeee;
  --dark: #3f3f3f;
  --dark-line: #5a5a5a;
  --white: #ffffff;
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-pill: 102px;
  --wrap: 1180px;
  --header-h: 84px;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --fast: 0.18s;
  --medium: 0.32s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

body.nav-locked {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

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

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

button {
  cursor: pointer;
}

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

::selection {
  background: var(--brand);
  color: #fff;
}

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

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

.sr-only {
  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: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: top var(--fast) var(--ease);
}

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

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 26px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transition:
    background-color var(--medium) var(--ease),
    border-color var(--medium) var(--ease),
    color var(--medium) var(--ease),
    transform var(--medium) var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  transition: transform var(--fast) var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

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

.btn--primary {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}

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

.btn--secondary {
  background: var(--bg);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--bg-soft);
  border-color: var(--ink);
}

.btn--ghost {
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  color: var(--brand-deep);
}

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

.btn--small {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: var(--radius-md);
}

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

.btn--light:hover {
  background: #ffe9e2;
  border-color: #ffe9e2;
}

.btn--outline-light {
  background: transparent;
  border-color: rgba(35, 35, 35, 0.45);
  color: var(--ink);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: var(--ink);
}

.text-link {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--fast) var(--ease);
}

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

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 600;
}

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header.is-scrolled {
  border-bottom-color: #cfcfcf;
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  line-height: 1;
}

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

.brand__text {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

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

.nav-link {
  position: relative;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--medium) var(--ease);
}

.nav-link:hover {
  color: var(--brand-deep);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--brand-deep);
}

.nav-cta {
  margin-left: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  align-items: center;
  justify-content: center;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 19px;
}

.nav-toggle__bars span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--medium) var(--ease);
}

.site-header.is-nav-open .nav-toggle__bars span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__bars span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.hero::before {
  content: "Aa";
  position: absolute;
  top: -36px;
  right: -2vw;
  z-index: 0;
  color: var(--bg-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(250px, 34vw, 470px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.1em;
  pointer-events: none;
  user-select: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 168px;
  background: var(--brand);
}

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

.hero__head {
  max-width: 840px;
  margin: 0 auto 40px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(48px, 6.2vw, 76px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 span {
  display: inline-block;
  color: var(--brand);
}

.hero__lead {
  max-width: 710px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
  text-wrap: balance;
}

/* ---------- Tool ---------- */
.tool {
  border: 1px solid #cfcfcf;
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}

.tool__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
}

.tool__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tool__sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tool__privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.tool__privacy svg {
  width: 13px;
  height: 13px;
}

.tool__modes {
  display: grid;
  gap: 10px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfb;
}

.mode-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mode-group__label {
  flex: 0 0 62px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  transition:
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.mode-chip code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.mode-chip:hover {
  border-color: #bdbdbd;
  background: var(--bg-soft);
}

.mode-chip[aria-pressed="true"] {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
}

.mode-chip[aria-pressed="true"] code {
  color: rgba(255, 255, 255, 0.78);
}

.tool__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: stretch;
  padding: 24px 26px;
}

.editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.editor__head,
.editor__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #fcfcfc;
}

.editor__head {
  border-bottom: 1px solid var(--line-soft);
}

.editor__foot {
  border-top: 1px solid var(--line-soft);
}

.editor__label {
  font-size: 13px;
  font-weight: 600;
}

.editor__count {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.editor textarea {
  display: block;
  width: 100%;
  min-height: 252px;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
  outline: 0;
}

.editor textarea::placeholder {
  color: #9a9a9a;
}

.editor textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.editor__note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.tool__swap {
  display: grid;
  place-items: center;
}

.swap-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  transition:
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
}

.swap-btn:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: var(--brand-wash);
}

.swap-btn svg {
  width: 17px;
  height: 17px;
}

.tool__options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 13px 26px;
  border-top: 1px solid var(--line);
  background: #fbfbfb;
}

.option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
}

.option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand-strong);
}

.tool__options-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tool__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 26px;
  border-top: 1px solid var(--line);
}

.stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 42px;
}

.stat__label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat__value {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.ratio {
  min-width: 170px;
}

.ratio__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.ratio__meter {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-mid);
  appearance: none;
  -webkit-appearance: none;
}

.ratio__meter::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--bg-mid);
}

.ratio__meter::-webkit-progress-value {
  border-radius: inherit;
  background: var(--brand);
  transition: inline-size var(--medium) var(--ease);
}

.ratio__meter::-moz-progress-bar {
  border-radius: inherit;
  background: var(--brand);
}

.tool__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tool__hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 10px 26px 14px;
  border-top: 1px dashed var(--line);
}

.mode-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.mode-hint code {
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10.5px;
}

.tool__note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* ---------- Proof strip ---------- */
.proof {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

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

.proof__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px;
  border-left: 1px solid var(--line);
}

.proof__item:first-child {
  border-left: 0;
  padding-left: 0;
}

.proof__item:last-child {
  padding-right: 0;
}

.proof__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--brand-wash);
  color: var(--brand-deep);
}

.proof__icon svg {
  width: 15px;
  height: 15px;
}

.proof__title {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
}

.proof__text {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- Sections ---------- */
.section {
  padding: 92px 0;
}

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

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

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

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

.section-head--stack {
  display: block;
  max-width: 780px;
  padding-top: 0;
  border-top: 0;
}

.section-head--split {
  align-items: start;
}

.section-head__aside {
  max-width: 540px;
  justify-self: end;
}

.section-head__aside p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--brand);
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.6vw, 43px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.22;
  text-wrap: balance;
}

.section-lead {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
}

h3 {
  letter-spacing: -0.01em;
}

/* ---------- Editorial split ---------- */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: start;
  gap: 54px;
}

.editorial__main {
  max-width: 740px;
}

.editorial__main > p {
  margin: 0 0 17px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.9;
}

.editorial__main > p:first-child {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

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

.editorial__aside {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.aside-label {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.aside-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.aside-list li:last-child {
  padding-bottom: 0;
}

.aside-list strong {
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Format list ---------- */
.format-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.format-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}

.format-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfb;
}

.format-panel__num {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
}

.format-panel__head h3 {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 600;
}

.format-panel__head p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

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

.format-list li + li {
  border-top: 1px solid var(--line-soft);
}

.format-list a {
  display: grid;
  grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1.5fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  transition: background-color var(--fast) var(--ease);
}

.format-list a:hover {
  background: var(--bg-soft);
}

.format-list__name {
  font-size: 13px;
  font-weight: 600;
}

.format-list code {
  overflow: hidden;
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-list svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

caption {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  line-height: 1.65;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fcfcfc;
}

td strong {
  color: var(--ink);
}

td code,
th code {
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}

.table-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

/* ---------- Use cases ---------- */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.usecase {
  display: flex;
  flex-direction: column;
  min-height: 218px;
  padding: 26px;
  background: var(--bg);
  transition: background-color var(--fast) var(--ease);
}

.usecase:hover {
  background: var(--bg-soft);
}

.usecase__num {
  margin-bottom: 28px;
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.usecase h3 {
  margin: 0 0 9px;
  font-size: 18px;
  font-weight: 600;
}

.usecase p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.usecase__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
}

.usecase__link svg {
  width: 13px;
  height: 13px;
  transition: transform var(--fast) var(--ease);
}

.usecase:hover .usecase__link svg {
  transform: translateX(3px);
}

/* ---------- Pitfalls ---------- */
.pitfalls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  border-top: 1px solid var(--line);
}

.pitfall {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.pitfall__num {
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.9;
}

.pitfall h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.pitfall p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.pitfall code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 0.92em;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.step__num {
  display: block;
  margin-bottom: 28px;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

/* ---------- Limitation panel ---------- */
.limits {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}

.limits__intro {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.limits__intro p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.limits__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  overflow: hidden;
}

.limit {
  padding: 22px;
  background: var(--bg);
}

.limit__mark {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 11px;
}

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

.limit p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

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

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

.faq-item summary {
  position: relative;
  padding: 19px 44px 19px 0;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  cursor: pointer;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 5px;
  color: var(--brand-deep);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--brand-deep);
}

.faq-a {
  max-width: 820px;
  padding: 0 44px 22px 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.85;
}

.faq-a p {
  margin: 0 0 11px;
}

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

.faq-a a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------- Notes / cards ---------- */
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.note-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  transition: background-color var(--fast) var(--ease);
}

.note-card:hover {
  background: var(--bg-soft);
}

.note-card__glyph {
  display: flex;
  align-items: flex-end;
  height: 118px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg-soft);
  background-size: 34px 34px;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 43px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.85;
}

.note-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.note-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

.note-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.note-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
}

.note-card__link svg {
  width: 13px;
  height: 13px;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: 68px 0;
  background: var(--brand);
  color: var(--ink);
}

.cta::before {
  content: "Aa";
  position: absolute;
  right: -20px;
  bottom: -82px;
  color: rgba(255, 255, 255, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 330px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.1em;
  pointer-events: none;
}

.cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.cta h2 {
  max-width: 650px;
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 46px);
}

.cta p {
  max-width: 620px;
  margin: 0;
  color: rgba(35, 35, 35, 0.8);
  font-size: 15px;
  line-height: 1.75;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 50px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.page-hero::before {
  content: "Aa";
  position: absolute;
  right: 2vw;
  top: -40px;
  color: var(--bg-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(160px, 22vw, 300px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.1em;
  pointer-events: none;
}

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

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 7px;
  color: #a8a8a8;
}

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

.page-hero h1 {
  max-width: 920px;
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.14;
  text-wrap: balance;
}

.page-hero__lead {
  max-width: 780px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
  text-wrap: pretty;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.4;
}

.badge--accent {
  border-color: #f0c3b7;
  background: var(--brand-wash);
  color: var(--brand-deep);
}

.page-tool {
  padding: 40px 0 72px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Content / article layout ---------- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  align-items: start;
  gap: 64px;
}

.content-main {
  min-width: 0;
}

.article {
  max-width: 800px;
}

.article > p,
.article > ul,
.article > ol {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.9;
}

.article p {
  margin: 0 0 17px;
}

.article h2 {
  margin: 52px 0 16px;
  padding-top: 4px;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.35;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  margin: 32px 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

.article ul,
.article ol {
  margin: 0 0 19px;
  padding-left: 1.35em;
}

.article li {
  margin-bottom: 8px;
  padding-left: 2px;
}

.article li::marker {
  color: var(--brand);
}

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

.article a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article a:hover {
  color: var(--ink);
}

.article code {
  padding: 1px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 0.9em;
  white-space: break-spaces;
}

.article blockquote {
  margin: 26px 0;
  padding: 3px 0 3px 20px;
  border-left: 3px solid var(--brand);
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.85;
}

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

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-soft);
}

.callout__label {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.callout p + p {
  margin-top: 8px;
}

.example-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.example-pair > div {
  min-width: 0;
  padding: 13px 15px;
}

.example-pair > div + div {
  border-left: 1px solid var(--line);
  background: #fcfcfc;
}

.example-pair span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.example-pair code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.toc__title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.toc li + li {
  margin-top: 7px;
}

.toc a {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  transition: color var(--fast) var(--ease);
}

.toc a:hover {
  color: var(--brand-deep);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.article-header h1 {
  margin-bottom: 16px;
}

.article-header .page-hero__lead {
  margin-bottom: 18px;
}

.back-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* ---------- Related / link lists ---------- */
.link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.link-list a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 18px;
  background: var(--bg);
  text-decoration: none;
  transition: background-color var(--fast) var(--ease);
}

.link-list a:hover {
  background: var(--bg-soft);
}

.link-list strong {
  color: var(--ink);
  font-size: 14px;
}

.link-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* ---------- Article cards index ---------- */
.article-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  overflow: hidden;
}

.article-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg);
  transition: background-color var(--fast) var(--ease);
}

.article-row:hover {
  background: var(--bg-soft);
}

.article-row__glyph {
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.article-row h2 {
  margin: 0 0 5px;
  font-size: 19px;
  line-height: 1.45;
}

.article-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.article-row__meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- 404 ---------- */
.not-found {
  padding: 100px 0 120px;
}

.not-found__inner {
  max-width: 680px;
  text-align: center;
}

.not-found__code {
  display: block;
  margin-bottom: 18px;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(84px, 16vw, 160px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.not-found h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 44px);
}

.not-found p {
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.not-found__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 58px 0 0;
  background: var(--dark);
  color: #fff;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 46px;
  padding-bottom: 44px;
}

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

.footer__brand .brand__mark {
  background: var(--brand);
}

.footer__brand .brand__text {
  color: #fff;
}

.footer__tagline {
  max-width: 360px;
  margin: 0 0 14px;
  color: #d6d6d6;
  font-size: 13px;
  line-height: 1.8;
}

.footer__note {
  max-width: 370px;
  margin: 0;
  color: #bdbdbd;
  font-size: 11.5px;
  line-height: 1.7;
}

.footer__title {
  margin: 0 0 15px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footer__col a {
  display: block;
  width: fit-content;
  margin-bottom: 9px;
  color: #d6d6d6;
  font-size: 13px;
  line-height: 1.5;
  transition: color var(--fast) var(--ease);
}

.footer__col a:hover {
  color: #ffc1b2;
}

.footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--dark-line);
}

.footer__bottom p {
  margin: 0;
  color: #bdbdbd;
  font-size: 11px;
  line-height: 1.7;
}

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

.footer__legal a {
  color: #d6d6d6;
  font-size: 11px;
}

.footer__legal a:hover {
  color: #ffc1b2;
}

/* ---------- Utilities ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity var(--medium) var(--ease),
    transform var(--medium) var(--ease),
    border-color var(--fast) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition:
    opacity var(--medium) var(--ease),
    transform var(--medium) var(--ease);
}

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

.mt-0 {
  margin-top: 0 !important;
}

.mt-32 {
  margin-top: 32px;
}

.mb-0 {
  margin-bottom: 0 !important;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  :root {
    --header-h: 72px;
  }

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

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

  .nav-toggle {
    display: 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 - var(--header-h));
    overflow-y: auto;
    padding: 10px 20px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

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

  .nav-link {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
  }

  .nav-link::after {
    left: 2px;
    right: auto;
    bottom: 7px;
    width: 28px;
  }

  .nav-cta {
    margin: 14px 0 0;
    align-self: flex-start;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    gap: 32px;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .toc {
    position: static;
    order: -1;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
  }

  .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .toc li + li {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .hero h1 {
    font-size: clamp(42px, 9vw, 62px);
  }

  .tool__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .tool__swap {
    padding: 2px 0;
  }

  .swap-btn {
    transform: rotate(90deg);
  }

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

  .proof__item {
    padding: 18px 20px;
  }

  .proof__item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

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

  .editorial,
  .limits {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .limits__intro {
    position: static;
  }

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

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

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

  .step {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  .step__num {
    margin: 0;
  }

  .step__body {
    padding-top: 4px;
  }

  .cta__inner {
    display: block;
  }

  .cta__actions {
    margin-top: 24px;
  }

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

  .article-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .article-row__meta {
    grid-column: 2;
    margin-top: -10px;
  }

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

  .footer__brand {
    grid-column: 1 / -1;
  }
}

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

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

  .hero::before {
    top: -10px;
    right: -20px;
    font-size: 240px;
  }

  .hero::after {
    height: 96px;
    width: 4px;
  }

  .hero__head {
    margin-bottom: 28px;
  }

  .hero h1 {
    margin-bottom: 14px;
    font-size: clamp(34px, 10.5vw, 52px);
  }

  .hero__lead {
    font-size: 15.5px;
    line-height: 1.75;
  }

  .tool__head {
    padding: 16px 16px;
  }

  .tool__title {
    font-size: 16px;
  }

  .tool__sub {
    font-size: 12px;
  }

  .tool__privacy {
    padding: 5px 9px;
    font-size: 10px;
  }

  .tool__modes {
    padding: 13px 16px;
  }

  .mode-group {
    display: block;
  }

  .mode-group__label {
    display: block;
    margin-bottom: 7px;
    padding-top: 0;
  }

  .chips {
    gap: 6px;
  }

  .mode-chip {
    padding: 7px 11px;
    font-size: 12px;
  }

  .mode-chip code {
    display: none;
  }

  .tool__body {
    padding: 16px;
  }

  .editor textarea {
    min-height: 190px;
    font-size: 13px;
  }

  .tool__options {
    padding: 12px 16px;
    gap: 8px 14px;
  }

  .tool__options-label {
    width: 100%;
  }

  .tool__footer {
    padding: 13px 16px;
  }

  .stats {
    gap: 14px;
  }

  .ratio {
    min-width: 150px;
  }

  .tool__hint-row {
    display: block;
    padding: 10px 16px 14px;
  }

  .mode-hint {
    display: block;
  }

  .mode-hint code {
    display: inline-block;
    margin-top: 4px;
  }

  .tool__note {
    margin-top: 6px;
  }

  .proof__inner {
    display: block;
  }

  .proof__item,
  .proof__item:nth-child(odd),
  .proof__item:last-child {
    padding: 15px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .proof__item:first-child {
    border-top: 0;
  }

  .section {
    padding: 56px 0;
  }

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

  .section-head {
    display: block;
    margin-bottom: 30px;
  }

  .section-head__aside {
    margin-top: 20px;
  }

  h2 {
    font-size: clamp(27px, 7vw, 34px);
  }

  .section-lead {
    font-size: 15px;
  }

  .editorial__main > p:first-child {
    font-size: 18px;
  }

  .format-list a {
    grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1.4fr) 14px;
    gap: 8px;
    padding: 12px 16px;
  }

  .format-panel__head {
    padding: 18px 16px;
  }

  .usecase-grid,
  .limits__grid,
  .note-grid,
  .link-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .usecase {
    min-height: 0;
    padding: 22px;
  }

  .usecase__num {
    margin-bottom: 18px;
  }

  .pitfalls {
    column-gap: 0;
  }

  .pitfall {
    padding: 20px 0;
  }

  .table-wrap {
    border-radius: var(--radius-sm);
  }

  table {
    min-width: 600px;
    font-size: 13px;
  }

  th,
  td {
    padding: 11px 13px;
  }

  .cta {
    padding: 48px 0;
  }

  .cta::before {
    font-size: 230px;
    bottom: -54px;
  }

  .page-hero {
    padding: 38px 0 36px;
  }

  .page-hero h1 {
    font-size: clamp(34px, 9vw, 44px);
  }

  .page-hero__lead {
    font-size: 15.5px;
  }

  .page-tool {
    padding: 30px 0 52px;
  }

  .article {
    font-size: 15px;
  }

  .article h2 {
    margin-top: 40px;
  }

  .article h3 {
    margin-top: 26px;
  }

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

  .example-pair > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .article-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px;
  }

  .article-row__glyph {
    font-size: 26px;
  }

  .article-row h2 {
    font-size: 17px;
  }

  .article-row__meta {
    display: none;
  }

  .footer__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-bottom: 32px;
  }

  .footer__brand {
    grid-column: auto;
  }

  .footer__bottom {
    display: block;
  }

  .footer__bottom p + p {
    margin-top: 5px;
  }

  .footer__legal {
    margin-top: 12px;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }

  .toast {
    bottom: 66px;
    width: max-content;
    max-width: calc(100% - 32px);
  }
}

@media (max-width: 480px) {
  .tool__head {
    display: block;
  }

  .tool__privacy {
    margin-top: 10px;
  }

  .tool__footer {
    display: block;
  }

  .tool__actions {
    margin-top: 12px;
  }

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

  .stats {
    justify-content: space-between;
  }

  .ratio {
    flex: 1 0 100%;
    min-width: 0;
  }

  .btn {
    padding: 13px 20px;
  }

  .cta__actions .btn {
    width: 100%;
  }
}

@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;
  }
}

@media print {
  .site-header,
  .site-nav,
  .nav-toggle,
  .tool__options,
  .tool__actions,
  .to-top,
  .toast,
  .site-footer,
  .cta {
    display: none !important;
  }

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

  .tool,
  .editor {
    border-color: #999;
  }

  a {
    text-decoration: underline;
  }
}

/* ---------- RMB / English tool tabs ---------- */
.tool__noscript {
  margin: 0;
  padding: 10px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-size: 12px;
  line-height: 1.6;
}
.tool-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.tool-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 66px;
  padding: 14px 26px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background-color var(--fast) var(--ease);
}

.tool-tab:last-child {
  border-right: 0;
}

.tool-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  transition: background-color var(--fast) var(--ease);
}

.tool-tab:hover {
  background: #f1f1f1;
}

.tool-tab[aria-selected="true"] {
  background: var(--bg);
}

.tool-tab[aria-selected="true"]::after {
  background: var(--brand);
}

.tool-tab__label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.tool-tab__note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.tool-panel[hidden] {
  display: none !important;
}

.rmb-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 18px;
  padding: 24px 26px;
}

.rmb-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.rmb-card--result {
  background: #fbfbfb;
}

.rmb-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 30px;
  margin-bottom: 12px;
}

.rmb-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.rmb-head-note {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.amount-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color var(--fast) var(--ease);
}

.amount-field:focus-within {
  border-color: var(--brand);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.amount-field__currency {
  flex: 0 0 auto;
  color: var(--brand-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
}

.amount-field input {
  width: 100%;
  min-width: 0;
  padding: 16px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.3;
  outline: 0;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.amount-field input::placeholder {
  color: #9a9a9a;
  font-weight: 400;
}

.field-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.field-error {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-left: 2px solid var(--brand-strong);
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-size: 12px;
  line-height: 1.6;
}

.field-error[hidden] {
  display: none;
}

.amount-samples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.amount-samples__label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sample-chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  transition:
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
}

.sample-chip:hover {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-deep);
}

.rmb-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: auto;
  padding-top: 20px;
}

.rmb-actions__note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.rmb-output {
  display: flex;
  flex: 1;
  align-items: flex-start;
  min-height: 92px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(21px, 2.8vw, 28px);
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.rmb-output.is-empty {
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
}

.rmb-output.is-error {
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 500;
}

.rmb-small-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.rmb-small-row__label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.rmb-small-row__value {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rmb-result-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.rmb-result-foot .btn svg {
  width: 15px;
  height: 15px;
}

.rmb-result-foot__note {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.btn--ghost:disabled:hover {
  background: transparent;
  color: var(--brand-deep);
}

.rmb-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--line);
  background: #fbfbfb;
}

.rmb-tips p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.rmb-tips strong {
  color: var(--ink-soft);
  font-weight: 600;
}

@media (max-width: 900px) {
  .rmb-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rmb-output {
    min-height: 62px;
  }
}

@media (max-width: 720px) {
  .tool-tab {
    min-height: 60px;
    padding: 12px 14px;
  }

  .tool-tab__label {
    font-size: 13.5px;
  }

  .tool-tab__note {
    font-size: 10px;
  }

  .rmb-grid {
    gap: 12px;
    padding: 16px;
  }

  .rmb-card {
    padding: 16px;
  }

  .amount-field {
    padding: 0 12px;
  }

  .amount-field input {
    padding: 13px 0;
    font-size: 23px;
  }

  .amount-field__currency {
    font-size: 21px;
  }

  .rmb-output {
    min-height: 54px;
    font-size: 21px;
  }

  .rmb-tips {
    grid-template-columns: minmax(0, 1fr);
    padding: 13px 16px 16px;
  }

  .rmb-result-foot {
    display: block;
  }

  .rmb-result-foot .btn {
    width: 100%;
  }

  .rmb-result-foot__note {
    display: block;
    margin-top: 8px;
  }
}

/* Long contact address in the footer */
.footer__col a[href^="mailto:"] {
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
