/* ==========================================================================
   mermaid2pptx — minimal, airy interface
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --bg-tint: #f1f6f8;
  --card: #ffffff;
  --paper: #ffffff;
  --ink: #0f1e28;
  --ink-2: #47606f;
  --ink-3: #7a919d;
  --line: rgba(15, 40, 60, 0.09);
  --line-strong: rgba(15, 40, 60, 0.16);
  --brand: #2fa98f;
  --brand-ink: #12735f;
  --brand-soft: #e8f7f2;
  --accent: #3a8ac4;
  --accent-soft: #eaf3fa;
  --shadow-sm: 0 1px 2px rgba(15, 40, 60, 0.05);
  --shadow-md: 0 1px 2px rgba(15, 40, 60, 0.04), 0 14px 34px -18px rgba(15, 40, 60, 0.28);
  --radius: 20px;
  --radius-sm: 12px;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", "Hiragino Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1180px;
}

[data-theme="dark"] {
  --bg: #0d1821;
  --bg-tint: #101e29;
  --card: #14222e;
  --ink: #eaf3f8;
  --ink-2: #a9c0cd;
  --ink-3: #7f97a5;
  --line: rgba(190, 220, 235, 0.12);
  --line-strong: rgba(190, 220, 235, 0.22);
  --brand: #46c3a6;
  --brand-ink: #9ae4d2;
  --brand-soft: rgba(70, 195, 166, 0.14);
  --accent: #6db4e6;
  --accent-soft: rgba(109, 180, 230, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
textarea,
input {
  font: inherit;
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 24px;
}

.shell--narrow {
  max-width: 840px;
}

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 15.5px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--brand-ink);
}

[data-theme="dark"] .brand-mark {
  color: var(--brand);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline-start: 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.site-nav a {
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.head-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.lang-icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.lang-select {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0 20px 0 0;
  height: 100%;
  font-size: 13px;
  cursor: pointer;
  max-width: 132px;
}

.lang-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-inline-end: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

[dir="rtl"] .lang-wrap::after {
  transform: translateY(-70%) rotate(-135deg);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 46px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -12% -10% 34%;
  background: url("../img/hero-bg.jpg") right center / cover no-repeat;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(120% 110% at 82% 30%, #000 30%, transparent 72%);
  mask-image: radial-gradient(120% 110% at 82% 30%, #000 30%, transparent 72%);
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to right, transparent 2%, #000 26%),
    radial-gradient(120% 110% at 82% 30%, #000 30%, transparent 72%);
  mask-image: linear-gradient(to right, transparent 2%, #000 26%),
    radial-gradient(120% 110% at 82% 30%, #000 30%, transparent 72%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

[dir="rtl"] .hero::before {
  transform: scaleX(-1);
  inset: -20% 34% -10% -12%;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 46px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 14px;
}

[data-theme="dark"] .eyebrow {
  color: var(--brand);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.5;
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 47px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 20ch;
}

.lede {
  font-size: 17px;
  line-height: 1.66;
  color: var(--ink-2);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.hero-badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  font-size: 12.5px;
  color: var(--ink-2);
}

.hero-badges li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-frame {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero-frame-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-tint) 60%, transparent);
}

.hero-frame-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hero-frame-body {
  position: relative;
  height: 218px;
  background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 15px 15px;
}

.mini-box,
.mini-diamond {
  position: absolute;
  border: 1.6px solid var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 88%, transparent);
}

.mini-box {
  border-radius: 7px;
}

.mini-a {
  left: 26px;
  top: 34px;
  width: 62px;
  height: 30px;
}

.mini-b {
  right: 30px;
  top: 122px;
  width: 74px;
  height: 32px;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 90%, transparent);
}

.mini-diamond {
  left: 50%;
  top: 46%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: #c9a45f;
  background: #fdf6e7;
  transform: rotate(45deg);
  border-radius: 6px;
}

[data-theme="dark"] .mini-diamond {
  background: #2a2517;
  border-color: #a98c4f;
}

.mini-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
  opacity: 0.75;
}

/* ------------------------------------------------------------------- CTA */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: linear-gradient(135deg, #34b79b 0%, #2a9d94 55%, #2b8fae 100%);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(31, 141, 122, 0.9);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(31, 141, 122, 0.95);
}

.btn-primary:disabled {
  opacity: 0.62;
  cursor: progress;
  transform: none;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* ----------------------------------------------------------------- studio */

.section {
  padding: 56px 0;
  scroll-margin-top: 78px;
}

#tool,
#features,
#howto,
#faq {
  scroll-margin-top: 78px;
}

.section--tool {
  padding-top: 44px;
}

.section--tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 26px;
}

.section-head h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 62ch;
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: 486px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pane--code {
  border-inline-end: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-tint) 42%, var(--card));
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.pane-head h3 {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip svg {
  width: 14px;
  height: 14px;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chip--quiet {
  padding: 0 7px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-3);
}

.mini-select {
  height: 28px;
  max-width: 168px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.editor {
  flex: 1;
  width: 100%;
  min-height: 260px;
  padding: 14px 16px 18px;
  border: 0;
  background: transparent;
  resize: none;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.68;
  color: var(--ink);
  tab-size: 4;
  outline: none;
}

.editor::selection {
  background: color-mix(in srgb, var(--brand) 26%, transparent);
}

.preview {
  flex: 1;
  min-height: 300px;
  margin: 0;
  padding: 22px;
  display: flex;
  overflow: auto;
  background-color: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 40, 60, 0.085) 1px, transparent 0);
  background-size: 15px 15px;
}

/* auto margins keep oversized diagrams scrollable instead of clipping their top */
.preview > * {
  margin: auto;
}

.preview[data-state="busy"] {
  opacity: 0.55;
}

.preview svg {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.preview-empty,
.preview-error {
  display: grid;
  gap: 8px;
  place-items: center;
  text-align: center;
  color: #7a919d;
  font-size: 13.5px;
  padding: 30px 10px;
}

.preview-error {
  color: #b4453f;
  max-width: 100%;
}

.preview-error strong {
  font-size: 14px;
}

.preview-error pre {
  max-width: 100%;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fdf1f0;
  color: #8c3a35;
  font-family: var(--mono);
  font-size: 11.5px;
  text-align: start;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pane-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 6px 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

.status-line[data-tone="error"] {
  color: #b4453f;
}

.stats {
  font-variant-numeric: tabular-nums;
  text-align: end;
}

/* --------------------------------------------------------------- controls */

.controls {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.mode-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-group legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.mode-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mode-card {
  position: relative;
  display: block;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.mode-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.mode-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-body {
  display: grid;
  gap: 3px;
}

.mode-name {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.mode-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.mode-card.is-active {
  border-color: color-mix(in srgb, var(--brand) 66%, transparent);
  background: color-mix(in srgb, var(--brand-soft) 72%, var(--card));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.mode-card:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.mode-card.is-active .mode-name {
  color: var(--brand-ink);
}

[data-theme="dark"] .mode-card.is-active .mode-name {
  color: var(--brand);
}

.export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.field {
  display: grid;
  gap: 5px;
  min-width: 132px;
  flex: 1 1 132px;
}

.field label {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field select {
  appearance: none;
  height: 40px;
  padding: 0 30px 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--bg);
  background-image: linear-gradient(45deg, transparent 49%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 51%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-size: 13.5px;
  cursor: pointer;
}

[dir="rtl"] .field select {
  padding: 0 11px 0 30px;
  background-position: 17px 18px, 12px 18px;
}

.field select:hover {
  border-color: var(--line-strong);
}

.btn-export {
  flex: 0 0 auto;
  height: 46px;
  padding-inline: 24px;
}

.engine-line {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-3);
  min-height: 18px;
}

/* -------------------------------------------------------------- ad slot */

.ad-slot {
  margin: 30px auto 0;
  padding-block: 16px;
  text-align: center;
  min-height: 104px;
}

.ad-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0.75;
}

.ad-slot ins {
  display: block;
  min-height: 76px;
}

/* -------------------------------------------------------------- features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

[data-theme="dark"] .feature-icon {
  color: var(--brand);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature h3 {
  font-size: 16px;
  margin-bottom: 7px;
}

.feature p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.62;
}

/* ----------------------------------------------------------------- steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 44px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 650;
}

.step h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.step p {
  font-size: 14px;
  color: var(--ink-2);
}

/* ----------------------------------------------------------------- table */

.mode-table-wrap {
  padding: 6px 0 0;
}

.mode-table-title {
  font-size: 19px;
  margin-bottom: 4px;
}

.mode-table-sub {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.mode-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  font-size: 14px;
}

.mode-table thead th {
  padding: 12px 18px;
  text-align: start;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--bg-tint) 80%, transparent);
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}

.mode-table tbody th,
.mode-table tbody td {
  padding: 13px 18px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  color: var(--ink-2);
  vertical-align: top;
}

.mode-table tbody th {
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.mode-table tbody tr:last-child th,
.mode-table tbody tr:last-child td {
  border-bottom: 0;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-inline-end: 8px;
  vertical-align: 1px;
}

.dot--smart {
  background: var(--brand);
}

.dot--faithful {
  background: var(--accent);
}

.dot--exact {
  background: #9a8cd4;
}

/* ------------------------------------------------------------------- faq */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 17px 34px 17px 0;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--brand-ink);
}

[data-theme="dark"] .faq summary:hover {
  color: var(--brand);
}

.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-inline-end: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq p {
  padding: 0 0 18px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 74ch;
}

/* ---------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
  padding-top: 40px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 36px;
  padding-bottom: 30px;
}

.foot-brand p {
  margin-top: 10px;
  max-width: 40ch;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.65;
}

.foot-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.foot-links h4 {
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 650;
}

.foot-links a {
  display: block;
  padding: 2px 0;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.foot-links a:hover {
  color: var(--ink);
}

.foot-time {
  display: block;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 13px;
}

.foot-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ------------------------------------------------------- toast / overlay */

.toast {
  position: fixed;
  inset-inline: 0;
  bottom: 26px;
  margin-inline: auto;
  width: max-content;
  max-width: min(92vw, 460px);
  padding: 11px 18px;
  border-radius: 12px;
  background: #10222c;
  color: #eef6fa;
  font-size: 13.5px;
  box-shadow: 0 18px 40px -18px rgba(6, 20, 28, 0.8);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-tone="error"] {
  background: #7f2b26;
}

.toast[data-tone="warn"] {
  background: #7a5a1d;
}

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(3px);
}

.drop-card {
  padding: 30px 38px;
  border: 2px dashed color-mix(in srgb, var(--brand) 60%, transparent);
  border-radius: 20px;
  background: var(--card);
  font-size: 15px;
  color: var(--ink-2);
}

.noscript {
  margin: 24px auto;
  max-width: 720px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
  color: var(--ink-2);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: 2;
  }

  .hero-frame {
    max-width: 400px;
  }

  .studio {
    grid-template-columns: minmax(0, 1fr);
  }

  .pane--code {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .editor {
    min-height: 200px;
  }

  .feature-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .shell {
    padding-inline: 18px;
  }

  .hero {
    padding-top: 40px;
  }

  .section {
    padding: 40px 0;
  }

  .mode-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn-export {
    width: 100%;
  }

  .mode-table {
    font-size: 13px;
  }

  .mode-table thead th,
  .mode-table tbody th,
  .mode-table tbody td {
    padding: 11px 12px;
  }

  .foot-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .pane-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-block: 9px;
  }

  .pane-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .mini-select {
    flex: 1 1 100%;
    max-width: none;
  }

  .chip {
    flex: 0 0 auto;
  }

  .pane-foot {
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .head-inner {
    gap: 10px;
  }

  .brand-name {
    display: none;
  }

  .lang-select {
    max-width: 96px;
  }

  .hero-badges li {
    font-size: 11.5px;
  }

  .btn-export {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
