:root {
  --ink: #101827;
  --muted: #5d6878;
  --line: #d8e0ea;
  --paper: #f5f8fb;
  --white: #fff;
  --navy: #092241;
  --teal: #007f78;
  --teal-soft: #e6f4f2;
  --amber: #f4b520;
  --red: #a93426;
  --green: #16735b;
  --shadow: 0 20px 44px rgba(16, 24, 39, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a { color: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
}

.brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  color: var(--teal);
}

nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

nav a { text-decoration: none; }

main {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 34px;
  align-items: center;
  min-height: 520px;
  padding: 44px 0 36px;
}

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

h1 {
  max-width: 560px;
  color: var(--navy);
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.hero p {
  max-width: 590px;
  color: var(--muted);
  font-size: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.button.secondary,
.button.muted {
  background: white;
  color: var(--navy);
  border-color: var(--line);
}

.button.muted {
  color: var(--muted);
  cursor: not-allowed;
}

.button.small { width: 100%; margin-top: 16px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.command-panel,
.pack-card,
.price-card,
.guardrail-card,
.table-shell {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.command-panel { padding: 20px; }

.panel-head,
.pack-card-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-head strong,
.section-head h2 {
  color: var(--navy);
}

.panel-head span,
.stripe-state span,
.state {
  background: var(--teal-soft);
  color: var(--teal);
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.metric-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 13px;
  overflow-wrap: anywhere;
}

.metric-grid strong {
  display: block;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
}

.metric-grid span,
small {
  color: var(--muted);
  font-size: 13px;
}

.credit-card {
  border-left: 4px solid var(--amber);
  background: #fff7df;
  padding: 16px;
}

.credit-card strong,
.credit-card span,
.credit-card small {
  display: block;
}

.credit-card span,
.credit-card small {
  color: var(--muted);
  margin-top: 4px;
}

.access-form {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 14px;
}

.access-form label {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.access-row input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 0 10px;
  font: inherit;
}

.access-form .remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.access-form.unlocked {
  border-color: rgba(22, 115, 91, .35);
  background: #edf8f3;
}

.muted-action {
  border-color: var(--line);
  background: white;
  color: var(--muted);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.workflow div {
  min-height: 108px;
  border-top: 3px solid var(--teal);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 14px;
}

.workflow strong,
.workflow span,
.scenario-list strong,
.scenario-list span {
  display: block;
}

.workflow span,
.scenario-list span,
.pack-card p,
.price-card p {
  color: var(--muted);
}

.section {
  padding: 38px 0;
}

.section-head {
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.1;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
  margin-bottom: 0;
}

.compact {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--navy);
  background: #f9fbfd;
}

td small {
  display: block;
  margin-top: 4px;
}

.fit {
  color: var(--green);
  font-weight: 900;
}

.pack-grid,
.pricing-grid,
.document-grid,
.release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pack-card,
.price-card,
.guardrail-card,
.release-card {
  padding: 18px;
}

.release-card {
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(16, 24, 39, .05);
}

.document-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(16, 24, 39, .05);
  overflow-wrap: anywhere;
}

.document-card strong {
  color: var(--navy);
}

.document-card span,
.document-card small {
  color: var(--muted);
}

.document-card a {
  width: fit-content;
  max-width: 100%;
  color: var(--teal);
  font-weight: 800;
}

.document-card * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pack-card {
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}

.pack-card.selected,
.pack-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.state.review { background: #fff7df; color: #8a5b00; }
.state.locked { background: #e9eef5; color: #314155; }
.state.draft { background: #eef6fb; color: var(--navy); }

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

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

dd {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  text-transform: capitalize;
}

.section-list,
.approval-list,
.scenario-list {
  display: grid;
  gap: 10px;
}

.section-list div,
.approval-row,
.scenario-list div {
  border: 1px solid var(--line);
  background: #fbfcfe;
  padding: 12px;
}

.section-list span,
.approval-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  align-items: start;
}

.approval-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.guardrail-card {
  border-top: 4px solid var(--amber);
}

.guardrail-card.danger {
  border-top-color: var(--red);
}

.operator-console {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 2px solid var(--line);
}

.operator-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 420px);
  gap: 20px;
  align-items: end;
}

.operator-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 32px;
}

.operator-head p {
  margin: 0;
  color: var(--muted);
}

.operator-section {
  background: #fbfcfe;
}

.pack-detail,
.signup-result,
.queue-panel,
.archive-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: white;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(16, 24, 39, .05);
  min-width: 0;
  overflow-wrap: anywhere;
}

.pack-detail strong,
.pack-detail span,
.queue-panel strong,
.queue-panel span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pack-detail li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.pack-detail li button {
  min-height: 30px;
  border: 1px solid var(--line);
  background: #f8fbfd;
  color: var(--navy);
  font-weight: 800;
  white-space: nowrap;
}

.section-editor-list {
  display: grid;
  gap: 14px;
  margin: 10px 0 16px;
}

.section-authoring-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  padding: 14px;
}

.section-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-editor-head strong,
.section-editor-head span {
  display: block;
}

.section-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.section-authoring-form label {
  display: grid;
  gap: 5px;
  color: var(--navy);
  font-weight: 800;
}

.section-authoring-form input,
.section-authoring-form select,
.section-authoring-form textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  padding: 9px 10px;
  font: inherit;
  color: var(--navy);
  background: white;
}

.section-authoring-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.buyer-question-panel {
  display: grid;
  gap: 12px;
  margin: 10px 0 16px;
}

.question-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.question-stats div {
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 10px;
}

.question-stats strong,
.question-stats span {
  display: block;
}

.question-stats strong {
  color: var(--navy);
  font-size: 20px;
}

.buyer-question-import,
.buyer-question-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  padding: 14px;
}

.buyer-question-import label,
.buyer-question-row label {
  display: grid;
  gap: 5px;
  color: var(--navy);
  font-weight: 800;
}

.buyer-question-import textarea,
.buyer-question-row input,
.buyer-question-row select,
.buyer-question-row textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  padding: 9px 10px;
  font: inherit;
  color: var(--navy);
  background: white;
}

.buyer-question-import textarea,
.buyer-question-row textarea {
  resize: vertical;
  line-height: 1.45;
}

.buyer-question-list {
  display: grid;
  gap: 12px;
}

.buyer-question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.buyer-question-head strong,
.buyer-question-head span {
  display: block;
}

.section-summary,
.section-draft {
  grid-column: 1 / -1;
}

.requirement-list {
  display: grid;
  gap: 8px;
  border-left: 3px solid var(--amber);
  padding-left: 12px;
}

.requirement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 10px;
}

.requirement-row small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.section-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.section-editor-actions span {
  flex: 1 1 260px;
}

.pack-detail span,
.signup-result,
.queue-panel span,
.archive-panel span {
  color: var(--muted);
}

.archive-panel {
  display: grid;
  gap: 14px;
}

.archive-status {
  display: grid;
  gap: 5px;
}

.archive-status strong {
  color: var(--navy);
}

.archive-status small {
  color: var(--muted);
}

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

.archive-grid div,
.archive-checklist div {
  min-width: 0;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 12px;
}

.archive-grid strong,
.archive-checklist strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
}

.archive-grid span,
.archive-checklist span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.archive-actions span {
  flex: 1 1 260px;
  min-width: 0;
}

.action-result {
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  padding: 9px 11px;
  color: var(--teal);
  font-weight: 800;
}

.action-result.blocked {
  border-left-color: var(--red);
  background: #fff2f1;
  color: var(--red);
}

.action-result.success {
  border-left-color: var(--teal);
}

.activity-rail {
  display: grid;
  gap: 8px;
}

.activity-rail div {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fbfcfe;
  padding: 10px;
}

.activity-rail strong,
.activity-rail span {
  display: block;
}

.activity-rail span {
  color: var(--muted);
  margin-top: 3px;
}

.queue-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.queue-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 12px;
  overflow-wrap: anywhere;
}

.queue-grid strong {
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
}

.queue-list {
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--teal);
  padding-left: 12px;
  margin-bottom: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.local-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.local-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: #f8fbfd;
  color: var(--navy);
  font-weight: 800;
  padding: 0 12px;
}

.inline-action {
  min-height: 34px;
  border: 1px solid var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 800;
  padding: 0 10px;
  white-space: nowrap;
}

.inline-action:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f8fbfd;
}

.local-note {
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  padding: 8px 10px;
  color: var(--teal);
  font-weight: 800;
}

.signup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: white;
  border: 1px solid var(--line);
  padding: 16px;
}

.signup-form label {
  display: grid;
  gap: 5px;
  color: var(--navy);
  font-weight: 800;
}

.signup-form label.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signup-form label.policy {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.signup-form input,
.signup-form select {
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 0 10px;
  font: inherit;
}

.signup-form input[type="file"] {
  padding: 10px;
}

.signup-form .button,
.signup-form .check {
  align-self: end;
}

.price {
  color: var(--teal);
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  margin: 10px 0;
}

.price span {
  color: var(--muted);
  font-size: 15px;
}

.price-card ul {
  min-height: 150px;
  margin: 14px 0;
  padding-left: 19px;
  color: var(--muted);
}

.stripe-state {
  display: grid;
  gap: 4px;
}

@media (max-width: 980px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }
  .workflow,
  .pack-grid,
  .pricing-grid,
  .document-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  h1 { font-size: 44px; }
}

@media (min-width: 1224px) {
  .app-header {
    padding-left: calc((100% - 1180px) / 2);
    padding-right: calc((100% - 1180px) / 2);
  }
}

@media (max-width: 680px) {
  .app-header {
    position: static;
    height: auto;
    align-items: flex-start;
    padding: 14px;
  }
  nav { display: none; }
  main { width: min(100% - 28px, 1180px); }
  .hero { min-height: auto; padding-top: 32px; }
  h1 { font-size: 36px; }
  .metric-grid,
  .queue-grid,
  .archive-grid,
  .archive-checklist,
  .section-editor-grid,
  .question-stats,
  .access-row,
  .workflow,
  .pack-grid,
  .pricing-grid,
  .document-grid,
  .release-grid,
  dl,
  .signup-form {
    grid-template-columns: 1fr;
  }
  .section-head {
    display: block;
  }
  .operator-head {
    grid-template-columns: 1fr;
  }
  .section-editor-head {
    flex-direction: column;
  }
  .buyer-question-head {
    flex-direction: column;
  }
  .requirement-row {
    grid-template-columns: 1fr;
  }
  .section-head h2 {
    margin-bottom: 8px;
  }
  .table-shell {
    overflow-x: auto;
  }
  table {
    min-width: 760px;
  }
}
