:root {
  --ink: #141925;
  --muted: #485466;
  --line: #dce4ee;
  --paper: #f1f3f7;
  --panel: #ffffff;
  --navy-950: #061638;
  --navy-900: #032271;
  --blue-800: #09398f;
  --blue-700: #0852a2;
  --blue-500: #426ed2;
  --sky-300: #9cb5cd;
  --amber: #f4c65d;
  --danger: #cc4050;
  --success: #20a56b;
  --shadow: 0 18px 45px rgba(6, 22, 56, 0.14);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 42px);
  color: #fff;
  background: var(--navy-950);
}

.brand-lockup,
.app-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup {
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: auto;
  border-radius: 4px;
}

.app-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 750;
}

.app-nav a,
.nav-button {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.nav-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.flash-wrap {
  max-width: var(--max);
  margin: 18px auto 0;
  padding: 0 24px;
}

.flash {
  margin: 0 0 10px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-weight: 750;
}

.flash.notice {
  color: #073f2a;
  background: #dff7ed;
}

.flash.alert {
  color: #60131f;
  background: #ffe4e8;
}

.band {
  padding: clamp(46px, 7vw, 84px) 0;
}

.band.dark {
  color: #fff;
  background:
    radial-gradient(circle at 25% 45%, rgba(8, 82, 162, 0.9), rgba(8, 82, 162, 0.1) 45%, transparent 62%),
    linear-gradient(135deg, var(--navy-950), var(--blue-800));
}

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

.hero {
  min-height: 560px;
  display: grid;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sky-300);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.lead {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.meta-row,
.button-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-row {
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.button,
input[type="submit"],
button.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--navy-950);
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.button.blue,
input[type="submit"] {
  color: #fff;
  background: var(--blue-800);
}

.button.danger {
  color: #fff;
  background: var(--danger);
}

.button:disabled,
button:disabled,
input[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: end;
  margin-bottom: 26px;
}

.section-head p {
  max-width: 560px;
}

.section-minihead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 1px 0 rgba(20, 25, 37, 0.03);
}

.form-panel {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-weight: 850;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

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

.hint,
.field-error {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.field-error {
  color: var(--danger);
  font-weight: 800;
}

.list-row,
.agenda-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child,
.agenda-row:last-child {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue-800);
  background: #eaf2fb;
  font-size: 11px;
  font-weight: 900;
}

.pill.amber {
  color: var(--navy-950);
  background: var(--amber);
}

.pill.danger {
  color: #fff;
  background: var(--danger);
}

.question-editor {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.question-editor:last-child {
  border-bottom: 0;
}

.field-warning {
  margin: 0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #5a3500;
  background: #fff2c8;
  font-size: 13px;
  font-weight: 800;
}

.email-preview {
  max-width: 360px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
}

.audit-preview {
  max-width: 420px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.operator-warning {
  display: inline-flex;
  margin: 18px 0 0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--navy-950);
  background: var(--amber);
  font-weight: 900;
}

.status-note {
  display: inline-flex;
  margin: 18px 0 0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 900;
}

.setup-checklist {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
}

.status-dot.complete {
  background: var(--success);
}

.status-dot.blocked {
  background: var(--danger);
}

.nested-rows {
  display: grid;
  gap: 14px;
}

.nested-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #fbfcfe;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
}

.table th,
.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  color: var(--muted);
  background: #fff;
}

@media (max-width: 820px) {
  .app-header,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.two,
  .grid.three,
  .list-row,
  .agenda-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}
