:root {
  --st-bg: #FAF9F5;
  --st-surface: #FFFFFF;
  --st-alt: #F3F1EA;
  --st-ink: #1C1B18;
  --st-muted: #5C5952;
  --st-line: rgba(28, 27, 24, 0.12);
  --st-accent: #C96442;
  --st-accent-ink: #FFFFFF;
  --st-ok-bg: rgba(22, 128, 72, 0.1);
  --st-ok-ink: #136B3B;
}

html[data-theme="dark"] {
  --st-bg: #1F1E1C;
  --st-surface: #282623;
  --st-alt: #24221F;
  --st-ink: #F5F2EB;
  --st-muted: #B6B0A4;
  --st-line: rgba(245, 242, 235, 0.14);
  --st-accent: #D97757;
  --st-accent-ink: #181715;
  --st-ok-bg: rgba(74, 222, 128, 0.14);
  --st-ok-ink: #86EFAC;
}

* { box-sizing: border-box; }

body.st-body {
  margin: 0;
  background: var(--st-bg);
  color: var(--st-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.st-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.st-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--st-ink);
  font-weight: 700;
  font-size: 18px;
}

.st-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--st-accent);
  color: var(--st-accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

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

.st-nav a {
  color: var(--st-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.st-nav a[aria-current="page"],
.st-nav a:hover {
  color: var(--st-ink);
}

.st-hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--st-line);
}

.st-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
}

.st-demo-frame {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 16px;
  overflow: hidden;
}

.st-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--st-alt);
  object-fit: cover;
}

.st-demo-cap {
  padding: 12px 16px;
  border-top: 1px solid var(--st-line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.st-demo-cap span {
  color: var(--st-muted);
}

.st-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.st-visual-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.st-visual-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--st-alt);
}

.st-visual-body {
  padding: 16px 18px;
}

.st-visual-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.st-visual-body p {
  margin: 0;
  font-size: 14px;
  color: var(--st-muted);
}

.st-badge--alert {
  background: rgba(201, 100, 66, 0.16);
  color: var(--st-accent);
}

.st-wa-shell {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.st-wa-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--st-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.st-wa-feed {
  padding: 16px;
  min-height: 280px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--st-bg);
}

.st-wa-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.st-wa-msg--user {
  align-self: flex-end;
  background: var(--st-accent);
  color: var(--st-accent-ink);
}

.st-wa-msg--bot {
  align-self: flex-start;
  background: var(--st-surface);
  color: var(--st-ink);
  border: 1px solid var(--st-line);
}

.st-wa-compose {
  padding: 12px;
  border-top: 1px solid var(--st-line);
  display: flex;
  gap: 10px;
}

.st-wa-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.st-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--st-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.st-hero h1 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  font-weight: 500;
  max-width: 820px;
}

.st-lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--st-muted);
  max-width: 720px;
}

.st-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--st-accent);
  background: var(--st-accent);
  color: var(--st-accent-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

.st-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.st-proof {
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--st-line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.st-proof dt {
  font-size: 12px;
  color: var(--st-muted);
}

.st-proof dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.st-section {
  padding: 56px 0;
}

.st-section--alt {
  background: var(--st-alt);
  border-top: 1px solid var(--st-line);
  border-bottom: 1px solid var(--st-line);
}

.st-head {
  margin-bottom: 28px;
}

.st-head h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 500;
}

.st-head p {
  margin: 0;
  color: var(--st-muted);
  max-width: 660px;
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.st-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.st-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.st-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--st-ok-bg);
  color: var(--st-ok-ink);
  white-space: nowrap;
}

.st-card p {
  margin: 0;
  font-size: 14px;
  color: var(--st-muted);
}

.st-card-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--st-ink);
}

.st-card-actions {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.st-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}

.st-form,
.st-result-box {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 22px;
}

.st-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.st-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.st-field label {
  font-size: 13px;
  font-weight: 600;
}

.st-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--st-line);
  background: var(--st-bg);
  color: var(--st-ink);
  font: inherit;
  font-size: 14px;
}

.st-textarea {
  min-height: 92px;
  resize: vertical;
}

.st-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.st-out {
  margin: 0;
  padding: 16px;
  border-radius: 10px;
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 460px;
  overflow: auto;
}

.st-closing {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.st-closing h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.st-closing p {
  margin: 0;
  color: var(--st-muted);
  max-width: 560px;
}

.st-foot {
  border-top: 1px solid var(--st-line);
  padding: 24px 0;
  font-size: 13px;
  color: var(--st-muted);
}

.st-foot-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.st-foot nav {
  display: flex;
  gap: 16px;
}

.st-foot a {
  color: var(--st-muted);
  text-decoration: none;
}

@media (max-width: 860px) {
  .st-hero-grid { grid-template-columns: 1fr; }
  .st-workbench { grid-template-columns: 1fr; }
  .st-row { grid-template-columns: 1fr; }
}
