:root {
  color-scheme: dark;
  --bg: #111111;
  --surface: #191919;
  --surface-raised: #202020;
  --surface-soft: #171717;
  --line: #303030;
  --line-strong: #444444;
  --text: #f5f5f5;
  --muted: #a6a6a6;
  --accent: #ffa500;
  --accent-hover: #ffb52e;
  --accent-soft: #2b2111;
  --danger: #ff6b5f;
  --ok: #44c47d;
  --page-gutter: clamp(16px, 4vw, 48px);
  --content-width: 1120px;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.site-header { border-bottom: 1px solid var(--line); background: rgba(17, 17, 17, .94); }
.header-inner {
  width: min(calc(100% - (2 * var(--page-gutter))), var(--content-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 6px;
  background: var(--accent);
  color: #111;
  font-weight: 900;
  font-size: 18px;
}
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { line-height: 1.2; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.compact-label { display: none; }
.site-nav > a { color: var(--muted); text-decoration: none; font-weight: 650; transition: color .15s ease; }
.site-nav > a:hover { color: var(--text); }
.mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid #684b13;
  border-radius: 5px;
  color: #ffc45b;
  background: #211b10;
  font-size: 12px;
  font-weight: 700;
}
.mode i, .support-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

main {
  width: min(calc(100% - (2 * var(--page-gutter))), var(--content-width));
  min-height: calc(100vh - 172px);
  margin: clamp(34px, 6vw, 76px) auto 56px;
}
.home-layout { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(440px, 1.18fr); gap: clamp(40px, 7vw, 96px); align-items: start; }
.intro { max-width: 760px; }
.home-intro { padding-top: 28px; }
.intro.compact { margin-bottom: 22px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; text-transform: uppercase; font-weight: 800; }
h1 { margin: 0 0 16px; font-size: clamp(34px, 4.8vw, 58px); line-height: 1.04; font-weight: 760; }
h2 { margin: 0; font-size: 21px; line-height: 1.25; }
.intro > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 17px; max-width: 610px; }
.tag-help { display: flex; align-items: center; gap: 14px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.tag-help p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tag-sample { flex: 0 0 auto; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-soft); font: 700 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }

.service-flow { min-width: 0; }
.flow-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.flow-tab { background: transparent; color: var(--muted); box-shadow: none; }
.flow-tab.active { background: var(--accent); color: #111; }
.flow-panel[hidden] { display: none; }
.flow-panel.active { animation: panel-in .18s ease-out; }
@keyframes panel-in { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .flow-panel.active { animation: none; } }

.panel { min-width: 0; padding: clamp(22px, 3vw, 34px); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 7px; }
.panel-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 25px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); }
.step { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #654812; border-radius: 5px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.panel.order { width: min(100%, 680px); margin: clamp(28px, 4vw, 50px) auto; }
.panel.order h1 { font-size: 42px; }
.panel.test { border-color: #684b13; }

form { display: grid; min-width: 0; gap: 17px; }
label { display: grid; min-width: 0; gap: 7px; font-weight: 650; }
label small, .muted { color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 12px;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input, select { height: 48px; padding-top: 0; padding-bottom: 0; }
textarea { min-height: 116px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #747474; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,165,0,.13); }
.tag-input { font: 750 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 4px; }
button, .button {
  min-width: 0;
  min-height: 48px;
  height: auto;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #111;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:hover, .button:hover { background: var(--accent-hover); }
button.secondary, .button.secondary { background: #292929; color: var(--text); border: 1px solid var(--line-strong); }
button.secondary:hover, .button.secondary:hover { background: #323232; border-color: #5a5a5a; }
button:disabled { opacity: .45; cursor: not-allowed; }

.support-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.support-cta > div { display: flex; align-items: center; gap: 12px; }
.support-cta strong, .support-cta span { display: block; }
.support-cta span { color: var(--muted); font-size: 13px; }
.support-cta .support-dot { flex: 0 0 7px; }
.support-cta .button { min-height: 42px; padding: 9px 15px; }

.alert, .success { border: 1px solid #70403a; background: #2b1d1b; border-radius: 5px; padding: 13px 15px; margin-bottom: 20px; }
.success { border-color: #286641; background: #17291f; }
.success p { color: #b9d9c6; margin: 5px 0 0; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 22px; }
.back:hover { color: var(--text); }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.empty { text-align: center; padding: 80px 0; }
.empty p { color: var(--muted); }
.break { overflow-wrap: anywhere; word-break: break-word; background: var(--surface-soft); border: 1px solid var(--line); padding: 14px; border-radius: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.support-form-panel { width: min(100%, 760px); }
.honeypot { position: absolute; left: -10000px; opacity: 0; }

.chat-shell { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-raised); padding: clamp(18px, 3vw, 30px); }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.chat-head h1 { font-size: clamp(26px, 4vw, 38px); margin: 0; }
.chat-status { color: var(--accent); font-size: 13px; font-weight: 750; }
.site-conversation { display: grid; gap: 12px; max-height: 52vh; min-height: 180px; overflow: auto; padding: 22px 2px; scroll-behavior: smooth; }
.site-message { max-width: 85%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; }
.site-message strong { font-size: 12px; color: var(--muted); }
.site-message p { white-space: pre-wrap; margin: 5px 0 0; }
.client-message { justify-self: end; background: var(--accent-soft); border-color: #684b13; }
.support-message { justify-self: start; background: #242424; }
.site-chat-form { display: flex; align-items: flex-end; gap: 10px; }
.site-chat-form textarea { min-height: 48px; max-height: 140px; resize: vertical; }
.site-chat-form button { flex: 0 0 auto; }

.error-page { min-height: calc(100vh - 256px); display: grid; place-items: center; padding: 28px 0 48px; text-align: center; }
.error-content { width: min(100%, 680px); }
.error-code { color: var(--accent); font-size: 220px; line-height: .82; font-weight: 900; font-variant-numeric: tabular-nums; }
.error-page .eyebrow { margin-top: 42px; }
.error-page h1 { margin: 0 auto 12px; font-size: 34px; line-height: 1.15; }
.error-joke { max-width: 570px; margin: 0 auto; color: var(--muted); font-size: 17px; }
.error-detail { display: inline-block; margin: 20px auto 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: #c9c9c9; font-size: 13px; }
.error-actions { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.error-actions .button { min-width: 176px; }

footer { width: min(calc(100% - (2 * var(--page-gutter))), var(--content-width)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #242424; color: #707070; }
footer a { color: #888; text-decoration: none; }

@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; gap: 30px; }
  .home-intro { padding-top: 0; }
  .home-intro h1 { max-width: 690px; }
  .tag-help { margin-top: 24px; }
  .columns { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --page-gutter: 14px; }
  .header-inner { min-height: 66px; }
  .brand { gap: 8px; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { display: none; }
  .site-nav { gap: 8px; }
  .site-nav > a { font-size: 13px; }
  .wide-label { display: none; }
  .compact-label { display: inline; }
  .mode { padding: 5px 7px; font-size: 11px; }
  .mode i { display: none; }
  main { margin: 28px auto 40px; min-height: calc(100vh - 162px); }
  h1 { font-size: 36px; }
  .intro > p:not(.eyebrow) { font-size: 16px; }
  .tag-help { align-items: flex-start; }
  .panel { padding: 20px; }
  .panel-head { margin-bottom: 22px; }
  .panel.order h1 { font-size: 36px; }
  .support-cta { display: grid; grid-template-columns: 1fr; }
  .support-cta .button { width: 100%; }
  .form-row, .site-chat-form { display: grid; grid-template-columns: 1fr; }
  .site-chat-form button { width: 100%; }
  .site-message { max-width: 94%; }
  .empty { padding: 56px 0; }
  .error-page { min-height: calc(100vh - 220px); padding-top: 14px; }
  .error-code { font-size: 128px; }
  .error-page .eyebrow { margin-top: 30px; }
  .error-page h1 { font-size: 28px; }
  .error-joke { font-size: 15px; }
  .error-actions { display: grid; grid-template-columns: 1fr; }
  .error-actions .button { width: 100%; }
}

@media (max-width: 400px) {
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .mode { max-width: 96px; text-align: center; line-height: 1.15; }
  h1 { font-size: 32px; }
  .panel-head .step { display: none; }
}
