:root {
  --bg: #ffffff;
  --bg_alt: #f7f7f8;
  --bg_elev: #ffffff;
  --text: #0a0a0a;
  --text_muted: #525866;
  --text_subtle: #6b7280;
  --border: #e5e7eb;
  --border_strong: #d1d5db;
  --accent: #0a0a0a;
  --accent_hover: #1f1f1f;
  --accent_text: #ffffff;
  --success: #0a7a3b;
  --radius: 8px;
  --radius_sm: 6px;
  --shadow_sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow_md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --max_width: 1140px;
  --font_sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font_mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font_sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

a:hover {
  color: var(--text_muted);
}

.container {
  max-width: var(--max_width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site_header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255, 255, 255, 0.85);
}

.header_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.2px;
  color: var(--text);
}

.brand_mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent_text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
}

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

.nav a {
  color: var(--text_muted);
  font-size: 14px;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.menu_btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border_strong);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.menu_btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

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

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

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

.nav_mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  box-shadow: var(--shadow_md);
}

.nav_mobile a {
  display: block;
  padding: 14px 24px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.nav_mobile a:last-child {
  border-bottom: 0;
}

.nav_mobile a:hover,
.nav_mobile a:active {
  background: var(--bg_alt);
  color: var(--text);
}

.nav_mobile.open {
  display: block;
}

/* Hero */
.hero {
  padding: 64px 0 32px;
  text-align: center;
}

.hero_eyebrow {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text_muted);
  background: var(--bg_alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero p.lede {
  margin: 0 auto;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text_muted);
}

.hero_meta {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text_subtle);
}

.hero_meta_item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

/* Tool */
.tool {
  margin: 32px auto 80px;
}

.tool_card {
  background: var(--bg_elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow_sm);
  overflow: hidden;
}

.tool_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}

.pane {
  display: flex;
  flex-direction: column;
}

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

.pane_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg_alt);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.1px;
}

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

.pane_actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pane_body {
  flex: 1;
  display: flex;
}

textarea.editor {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  padding: 18px;
  font-family: var(--font_sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  min-height: 320px;
}

textarea.editor::placeholder {
  color: var(--text_subtle);
}

.output_text {
  width: 100%;
  padding: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  min-height: 320px;
}

.output_empty {
  color: var(--text_subtle);
  font-style: normal;
}

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

.counts {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--text_muted);
}

.counts strong {
  color: var(--text);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius_sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  user-select: none;
  white-space: nowrap;
}

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

.btn_primary {
  background: var(--accent);
  color: var(--accent_text);
  border-color: var(--accent);
}

.btn_primary:hover {
  background: var(--accent_hover);
  border-color: var(--accent_hover);
}

.btn_primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn_ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border_strong);
}

.btn_ghost:hover {
  background: var(--bg_alt);
}

.btn_link {
  background: transparent;
  color: var(--text_muted);
  border: 0;
  padding: 0 6px;
  height: auto;
  font-size: 13px;
}

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

.btn_lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

/* Sections */
section.block {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

section.block_alt {
  background: var(--bg_alt);
}

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

.block_head h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.block_head p {
  margin: 0;
  color: var(--text_muted);
  font-size: 17px;
  line-height: 1.6;
}

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

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step_num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent_text);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 16px;
}

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

.step p {
  margin: 0;
  color: var(--text_muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  background: var(--bg);
  padding: 28px 24px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.feature p {
  margin: 0;
  color: var(--text_muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.feature_icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg_alt);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text);
}

.feature_icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Use cases */
.usecases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.usecase {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
  display: flex;
  gap: 14px;
}

.usecase_tag {
  flex-shrink: 0;
  padding: 4px 8px;
  background: var(--bg_alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  height: 22px;
  white-space: nowrap;
}

.usecase p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text_muted);
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
}

.faq_item {
  border-top: 1px solid var(--border);
}

.faq_item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq_q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  color: var(--text);
}

.faq_q::-webkit-details-marker {
  display: none;
}

.faq_q .chev {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--text_muted);
  border-bottom: 2px solid var(--text_muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-right: 4px;
}

details[open] .faq_q .chev {
  transform: rotate(-135deg);
}

.faq_a {
  padding: 0 4px 22px;
  color: var(--text_muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Long content */
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.prose h2 {
  font-size: 24px;
  margin: 36px 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 18px;
  margin: 28px 0 8px;
  font-weight: 600;
}

.prose p {
  margin: 0 0 16px;
  color: var(--text);
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

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

/* Footer */
.site_footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  background: var(--bg);
}

.footer_grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer_col h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text);
}

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

.footer_col li {
  margin-bottom: 8px;
  font-size: 14px;
}

.footer_col a {
  color: var(--text_muted);
}

.footer_col a:hover {
  color: var(--text);
}

.footer_bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text_subtle);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow_md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 880px) {
  .tool_grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .pane + .pane {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  textarea.editor,
  .output_text {
    min-height: 220px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .usecases {
    grid-template-columns: 1fr;
  }
  .footer_grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .nav {
    gap: 18px;
  }
  .hero {
    padding: 48px 0 24px;
  }
  section.block {
    padding: 56px 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .nav {
    display: none;
  }
  .menu_btn {
    display: inline-flex;
  }
  .header_inner {
    height: 60px;
  }
  .hero {
    padding: 36px 0 20px;
  }
  .hero h1 {
    font-size: 30px;
    line-height: 1.15;
  }
  .hero p.lede {
    font-size: 16px;
  }
  .hero_meta {
    gap: 12px;
    margin-top: 14px;
  }
  .tool {
    margin: 24px auto 56px;
  }
  .tool_card {
    border-radius: 10px;
  }
  .pane_header {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .pane_actions {
    gap: 4px;
  }
  .btn_link {
    padding: 6px 8px;
    font-size: 13px;
  }
  textarea.editor,
  .output_text {
    padding: 14px;
    font-size: 15px;
    min-height: 200px;
  }
  .tool_footer {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }
  .counts {
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
  }
  .tool_footer .btn {
    width: 100%;
    height: 46px;
    font-size: 15px;
  }
  .block_head {
    margin-bottom: 28px;
  }
  .block_head h2 {
    font-size: 24px;
  }
  .block_head p {
    font-size: 15px;
  }
  section.block {
    padding: 44px 0;
  }
  .step,
  .feature {
    padding: 22px 20px;
  }
  .footer_grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer_bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }
  .faq_q {
    font-size: 15px;
    padding: 18px 4px;
  }
  .faq_a {
    font-size: 14px;
  }
  .prose {
    font-size: 15px;
  }
  .prose h2 {
    font-size: 22px;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 14px;
  }
  .brand span:not(.brand_mark) {
    font-size: 16px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .hero_meta {
    flex-direction: column;
    gap: 6px;
  }
  textarea.editor,
  .output_text {
    min-height: 180px;
  }
  .pane_label {
    font-size: 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .btn_link {
    min-height: 36px;
  }
}
