:root {
  --bg: #f3ede2;
  --bg-deep: #ebe3d4;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #ffffff;
  --surface-float: rgba(255, 255, 255, 0.92);
  --text: #0c1322;
  --text-soft: #1f2937;
  --muted: #5a6473;
  --muted-2: #8089a0;
  --line: rgba(12, 19, 34, 0.1);
  --line-soft: rgba(12, 19, 34, 0.06);
  --accent: #0f766e;
  --accent-strong: #0b5b54;
  --accent-glow: rgba(15, 118, 110, 0.18);
  --accent-soft: rgba(15, 118, 110, 0.1);
  --gold: #c7a87b;
  --gold-soft: rgba(199, 168, 123, 0.22);
  --shadow-sm: 0 1px 2px rgba(12, 19, 34, 0.04), 0 4px 12px rgba(12, 19, 34, 0.05);
  --shadow-md: 0 8px 24px rgba(12, 19, 34, 0.06), 0 24px 56px rgba(12, 19, 34, 0.06);
  --shadow-lg: 0 12px 32px rgba(12, 19, 34, 0.08), 0 40px 80px rgba(12, 19, 34, 0.1);
  --shadow-glow: 0 18px 36px rgba(15, 118, 110, 0.16);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --max: 1200px;
  --font-sans: "Inter", "Spline Sans", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --font-display: "Inter", "Spline Sans", "Segoe UI", system-ui, -apple-system,
    sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Consolas",
    "Liberation Mono", "Menlo", monospace;
  --leading-tight: 1.06;
  --leading-snug: 1.25;
  --leading-normal: 1.55;
  --leading-relaxed: 1.75;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 280ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 16px;
  line-height: var(--leading-normal);
  font-feature-settings: "ss01", "cv11", "cv02", "cv03";
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -8%, rgba(15, 118, 110, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 6%, rgba(199, 168, 123, 0.22), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(15, 118, 110, 0.08), transparent 60%),
    linear-gradient(180deg, #faf6ee 0%, var(--bg) 38%, var(--bg-deep) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.08 0 0 0 0 0.13 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.45'/></svg>");
  opacity: 0.5;
  mix-blend-mode: multiply;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

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

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

::selection {
  background: rgba(15, 118, 110, 0.22);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 16px;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  z-index: 200;
  font-weight: 600;
  font-size: 0.9rem;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.site-shell {
  width: min(var(--max), calc(100vw - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: linear-gradient(180deg, rgba(243, 237, 226, 0.78), rgba(243, 237, 226, 0.6));
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, var(--accent) 0%, #0b5b54 60%, #083f3a 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 26px rgba(15, 118, 110, 0.28);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.3), transparent 60%);
  pointer-events: none;
}

.brand-name {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.brand-name small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(12, 19, 34, 0.05);
  color: var(--text);
}

.nav a[aria-current="page"] {
  background: var(--text);
  color: #fff;
}

.hero {
  padding: clamp(64px, 10vw, 120px) 0 clamp(40px, 6vw, 72px);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62));
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.hero h1 {
  margin: 22px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 700;
  max-width: 16ch;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 0%, #1f8f86 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: var(--leading-relaxed);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.hero-meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.005em;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(15, 118, 110, 0.26);
  color: #fff;
}

.button-secondary {
  background: var(--surface-strong);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.button-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--line);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: rgba(12, 19, 34, 0.04);
  color: var(--text);
}

.button-arrow::after {
  content: "→";
  margin-left: 4px;
  transition: transform var(--dur) var(--ease);
}

.button-arrow:hover::after {
  transform: translateX(3px);
}

.hero-panel {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.56) 60%, rgba(243, 237, 226, 0.7));
  border: 1px solid rgba(12, 19, 34, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.16), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(199, 168, 123, 0.18), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.22), transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.panel-window {
  position: absolute;
  inset: 20px;
  border-radius: calc(var(--radius-xl) - 12px);
  background: linear-gradient(180deg, rgba(252, 250, 246, 0.94), rgba(245, 239, 230, 0.86));
  border: 1px solid rgba(12, 19, 34, 0.08);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(12, 19, 34, 0.06);
  background: rgba(255, 255, 255, 0.5);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(12, 19, 34, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.window-dots span:nth-child(1) { background: #ef6a5b; }
.window-dots span:nth-child(2) { background: #f4be4f; }
.window-dots span:nth-child(3) { background: #61c454; }

.window-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.window-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.window-body {
  padding: 22px;
  display: grid;
  gap: 18px;
  align-content: start;
  overflow: auto;
}

.preview-surface {
  border-radius: var(--radius-md);
  border: 1px solid rgba(12, 19, 34, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 239, 230, 0.86));
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.preview-surface h2 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.preview-surface p {
  margin: 0 0 14px;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 0.95rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-field {
  display: grid;
  gap: 8px;
}

.mini-field label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mini-field input,
.mini-field textarea,
.mini-field select {
  width: 100%;
  border: 1px solid rgba(12, 19, 34, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.mini-field textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.mini-field input:focus,
.mini-field textarea:focus,
.mini-field select:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.surface-section {
  padding: clamp(48px, 7vw, 80px) 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head > div:first-child {
  max-width: 60ch;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
}

.section-head h2 + p,
.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}

.section-note {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 32ch;
  line-height: 1.6;
}

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

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

.panel {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(12, 19, 34, 0.08);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  display: block;
  color: inherit;
}

a.panel:hover,
a.panel:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 118, 110, 0.22);
  color: inherit;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.3;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.panel .panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--accent-strong);
  font-weight: 600;
}

.panel .panel-meta::after {
  content: "→";
  transition: transform var(--dur) var(--ease);
}

a.panel:hover .panel-meta::after {
  transform: translateX(3px);
}

.panel-feature {
  padding: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(243, 237, 226, 0.7));
}

.step-list,
.link-list,
.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list.panel {
  padding: 24px 28px;
}

.step-list li,
.link-list li {
  padding: 16px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.step-list li:last-child,
.link-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.step-list strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
  font-weight: 500;
  width: 100%;
  min-width: 0;
  padding-left: 2px;
  overflow-wrap: anywhere;
}

.link-list a::after {
  content: "→";
  color: var(--muted-2);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link-list a:hover::after {
  color: var(--accent-strong);
  transform: translateX(3px);
}

.link-list span {
  color: var(--muted);
  font-size: 0.92rem;
  display: inline-block;
  padding-left: 2px;
  overflow-wrap: anywhere;
}

.tool-page,
.content-page {
  padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 120px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.breadcrumb a {
  color: var(--accent-strong);
  font-weight: 500;
}

.breadcrumb span:not(:last-child) {
  color: var(--muted-2);
}

.content-hero,
.tool-head {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.content-hero h1,
.tool-page h1 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.045em;
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.02;
}

.content-hero p,
.tool-page .lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.06rem;
  max-width: 70ch;
}

.content-section {
  padding: 28px;
  margin-top: 24px;
}

.content-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.content-section p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.content-section + .content-section {
  margin-top: 18px;
}

.content-section ul,
.content-section ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.8;
}

.content-section li + li {
  margin-top: 6px;
}

.content-section li::marker {
  color: var(--accent);
}

.content-section code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
}

.content-section pre {
  margin: 14px 0 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f172a, #0a1020);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.content-section pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

.content-section .code-comment {
  color: #94a3b8;
}

.callout {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.18);
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

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

.callout-warn {
  background: rgba(199, 123, 56, 0.08);
  border-color: rgba(199, 123, 56, 0.24);
}

.callout-warn strong {
  color: #a35f1f;
}

.kv-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.kv-list li {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
}

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

.kv-list code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent-strong);
  word-break: break-all;
}

@media (max-width: 720px) {
  .kv-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 22px;
  margin-top: 32px;
}

.tool-layout > * {
  min-width: 0;
}

.tool-form,
.tool-results {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(12, 19, 34, 0.08);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tool-form {
  padding: 28px;
}

.tool-form > h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.field-toggle {
  padding-top: 4px;
}

.toggle-label {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  line-height: 1.35;
  font-size: 0.94rem;
}

.toggle-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
  border: 1.5px solid rgba(12, 19, 34, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  place-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.toggle-label input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 6px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease);
}

.toggle-label input[type="checkbox"]:checked {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  box-shadow: var(--shadow-glow);
}

.toggle-label input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.toggle-label input[type="checkbox"]:hover {
  border-color: rgba(15, 118, 110, 0.55);
}

.toggle-label input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.toggle-label span {
  white-space: normal;
}

.field .hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(12, 19, 34, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  padding: 14px 16px;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field textarea {
  min-height: 200px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  background: #fff;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.button-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.tool-results {
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 96px;
  min-width: 0;
}

.tool-results * {
  min-width: 0;
}

.tool-results > h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.tool-results pre {
  margin: 0;
  overflow: auto;
  max-width: 100%;
  width: 100%;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #0f172a, #0a1020);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.result-card {
  border-radius: 18px;
  padding: 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.14);
  width: 100%;
  box-sizing: border-box;
}

.result-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 600;
}

.result-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-card p,
.result-card li {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-item-meta strong,
.history-item-meta span,
.fix-snippet pre,
.fixes-list p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.history-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.history-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.history-item-meta strong {
  color: var(--text);
  font-weight: 600;
}

.history-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.faq-list details {
  border-top: 1px solid var(--line-soft);
  padding: 18px 0;
}

.faq-list details:first-child {
  border-top: 0;
  padding-top: 0;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

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

.faq-list summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
}

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

.faq-list p {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.subtle-divider {
  margin: 32px 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(12, 19, 34, 0.12), transparent);
}

.site-footer {
  padding: 56px 0 80px;
  color: var(--muted);
  margin-top: 64px;
}

.translate-switcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(12, 19, 34, 0.1);
  background: var(--surface-float);
  box-shadow: var(--shadow-md);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.translate-switcher[data-status="unavailable"] {
  opacity: 0.6;
}

.translate-switcher .translate-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 0 8px;
}

.translate-switcher .translate-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.translate-switcher button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.translate-switcher button:hover,
.translate-switcher button:focus-visible {
  background: rgba(12, 19, 34, 0.06);
  color: var(--text);
}

.translate-switcher button.is-active {
  background: var(--text);
  color: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
}

.footer-brand small {
  color: var(--muted-2);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.badge-soft {
  background: var(--gold-soft);
  color: #8a6a3a;
}

.badge-soft::before {
  background: var(--gold);
}

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

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

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero > * {
  animation: fade-up 700ms var(--ease) both;
}

.hero > *:nth-child(1) { animation-delay: 60ms; }
.hero-panel { animation-delay: 220ms; }
.hero > *:nth-child(2) { animation-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1040px) {
  .hero-grid,
  .tool-layout,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .tool-results {
    position: static;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-panel {
    min-height: 520px;
  }

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

@media (max-width: 760px) {
  :root {
    --radius-lg: 22px;
    --radius-xl: 28px;
  }

  .site-shell {
    width: min(var(--max), calc(100vw - 28px));
  }

  body {
    font-size: 15.5px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 0;
  }

  .nav {
    gap: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--shell-pad, 14px));
    padding: 0 4px 4px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    padding: 8px 12px;
    font-size: 0.88rem;
    flex-shrink: 0;
  }

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

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 2.8rem);
    letter-spacing: -0.04em;
    max-width: none;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1 1 auto;
    min-height: 48px;
    padding: 0 18px;
  }

  .hero-panel {
    min-height: 460px;
  }

  .panel-window {
    inset: 12px;
  }

  .window-body {
    padding: 16px;
  }

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

  .content-hero h1,
  .tool-page h1 {
    font-size: clamp(2rem, 7vw, 2.6rem);
    letter-spacing: -0.035em;
  }

  .tool-form,
  .tool-results,
  .content-section {
    padding: 22px;
  }

  .panel,
  .panel-feature {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-links {
    gap: 12px 18px;
  }

  .translate-switcher {
    right: 12px;
    bottom: 12px;
    padding: 6px;
  }

  .translate-switcher .translate-label {
    display: none;
  }

  .translate-switcher .translate-divider {
    display: none;
  }

  .translate-switcher button {
    padding: 0 10px;
    min-height: 30px;
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 2rem;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }
}
