:root {
  --bg: #07080c;
  --surface: #141820;
  --ink: #f3f6f8;
  --muted: #d5dde8;
  --accent: #c8fff4;
  --button: #0f766e;
  --button-ink: #ffffff;
  --focus: #c8fff4;
  --warn-bg: #3a2a08;
  --warn-ink: #fff1b8;
  --bad-bg: #3f151b;
  --bad-ink: #ffe4e8;
  --input: #0e131b;
  --bubble: #12312e;
  --line: #2a3444;
  --shadow: 0 0 0 1px rgba(200, 255, 244, 0.18), 0 24px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(45, 212, 191, 0.16), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
}

.skip:focus { top: 12px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

.brand {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.wrap, main.wrap { max-width: 960px; margin: 0 auto; padding: 12px 20px 48px; }

h1, h2, h3 { line-height: 1.2; }

h1 { font-size: 1.8rem; margin: 0 0 8px; }

.steps {
  display: flex;
  gap: 8px;
  max-width: 960px;
  margin: 16px auto 0;
  padding: 0 20px;
  list-style: none;
}

.steps li {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  text-align: center;
}

.steps li[aria-current="step"] {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.panel {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 16px;
}

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

.span-2 { grid-column: span 2; }

label { display: block; font-weight: 650; margin-bottom: 4px; }

input, textarea, button {
  font: inherit;
  color: var(--ink);
}

input, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
}

textarea { min-height: 120px; resize: vertical; }

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

button, .button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 700;
  cursor: pointer;
}

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

.note, .flag {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 10px;
  padding: 8px 10px;
}

.flag { display: inline-block; margin-left: 8px; }

.error {
  background: var(--bad-bg);
  color: var(--bad-ink);
  border-radius: 10px;
  padding: 8px 10px;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.bubble {
  max-width: 42rem;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--input);
}

.bubble.customer { margin-left: auto; background: var(--bubble); }

.log { min-height: 180px; }

.progress { font-weight: 700; color: var(--accent); }

.finding { margin: 0 0 12px; }

.finding a { color: var(--accent); }

dl { display: grid; grid-template-columns: 9rem 1fr; gap: 6px 12px; }

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

dd { margin: 0; }

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

.matrix section {
  background: var(--input);
  border-radius: 12px;
  padding: 12px;
}

.plain { padding-left: 18px; }

.report { white-space: pre-wrap; font-family: ui-monospace, monospace; }

.lede { font-size: 1.15rem; }

.hidden { display: none; }

@media (max-width: 720px) {
  .grid, .layout, .matrix, dl { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .steps { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

@media print {
  body, .print-doc {
    background: #ffffff;
    color: #142018;
  }
  .top, a { color: #142018; }
  .no-print { display: none !important; }
}
