:root {
  --ink: #18201d;
  --muted: #5c6963;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --line: #d8ded5;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #d84f35;
  --gold: #c88a15;
  --leaf: #4f7f45;
  --shadow: 0 18px 45px rgba(24, 32, 29, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 46%),
    linear-gradient(180deg, #fffefa 0%, var(--paper) 100%);
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 24px;
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.control-panel,
.results-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.control-panel {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 24px;
  border-radius: 8px;
}

.results-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 8px;
}

.brand-row,
.results-head,
.section-title-row,
.card-title-row,
.map-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-row {
  align-items: flex-start;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  font-weight: 900;
  letter-spacing: 0;
}

.kicker,
.eyebrow {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1;
}

h2 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

h4 {
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.summary {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.audit-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c9d3cc;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  padding: 12px 13px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

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

.primary-action,
.preset-row button,
.icon-button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
  font-weight: 850;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
}

.primary-action:hover {
  background: var(--teal-dark);
}

svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.preset-row button {
  border-radius: 6px;
  color: var(--teal-dark);
  background: #e8f2ed;
}

.preset-row button:hover {
  background: #d9ebe4;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
  min-width: 320px;
}

.metric-grid div {
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.metric-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 1.45rem;
  font-weight: 900;
}

.metric-grid small {
  color: var(--muted);
  font-weight: 750;
}

.map-band {
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.map-band > div:first-child {
  max-width: 260px;
}

.map-band p:last-child {
  margin: 0;
  color: var(--muted);
}

.opportunity-map {
  position: relative;
  flex: 1;
  min-height: 164px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(216, 79, 53, 0.14) 0 1px, transparent 1px 25%),
    linear-gradient(0deg, rgba(15, 118, 110, 0.12) 0 1px, transparent 1px 25%),
    #f7f4eb;
  background-size: 25% 25%;
}

.opportunity-map::before,
.opportunity-map::after {
  position: absolute;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.opportunity-map::before {
  content: "readiness";
  left: 12px;
  bottom: 10px;
}

.opportunity-map::after {
  content: "value";
  right: 12px;
  top: 10px;
}

.map-dot {
  --dot-size: 42px;
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--dot-size);
  height: var(--dot-size);
  transform: translate(-50%, 50%);
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(24, 32, 29, 0.22);
  font-weight: 900;
}

.map-dot:nth-child(2n) {
  background: var(--teal);
}

.map-dot:nth-child(3n) {
  background: var(--gold);
}

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

.opportunity-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--leaf);
  font-weight: 900;
}

.opportunity-body p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.card-title-row span {
  min-width: 42px;
  color: var(--coral);
  font-weight: 900;
  text-align: right;
}

.score-track {
  height: 8px;
  margin: 10px 0 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf0ea;
}

.score-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

dl div {
  padding: 10px;
  border-radius: 6px;
  background: #f6f5ef;
}

dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

dd {
  margin: 3px 0 0;
  font-weight: 900;
}

.first-step {
  margin-bottom: 0;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}

.asset-section,
.plan-section,
.launch-section {
  display: grid;
  gap: 14px;
}

.launch-section {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-band {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #cfdad2;
  border-radius: 8px;
  background: #f5f8f2;
}

.policy-band p {
  margin-bottom: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.policy-band strong {
  color: var(--teal-dark);
}

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

.connector-card {
  display: grid;
  gap: 10px;
  min-height: 198px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.connector-card.active,
.connector-card.build-ready {
  border-left-color: var(--teal);
}

.connector-card.needs-authorization {
  border-left-color: var(--coral);
}

.connector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.connector-head h4,
.connector-card p,
.connector-card small,
.connector-card em {
  margin: 0;
}

.connector-head span {
  flex: 0 0 auto;
  max-width: 112px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.connector-card p {
  color: var(--teal-dark);
  font-weight: 850;
}

.connector-card small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.connector-card em {
  color: var(--coral);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.claude-packet {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  min-width: 0;
}

.claude-packet p {
  margin-bottom: 0;
  color: var(--teal-dark);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.claude-packet pre {
  max-height: 280px;
  min-width: 0;
  margin: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--muted);
  font: 0.88rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  border-radius: 6px;
  color: #fff;
  background: var(--coral);
}

.icon-button:hover,
.icon-button.copied {
  background: var(--leaf);
}

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

.asset-grid article {
  min-height: 156px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.asset-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

ol {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: plan;
}

ol li {
  min-height: 142px;
  position: relative;
  padding: 42px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  line-height: 1.38;
}

ol li::before {
  counter-increment: plan;
  content: counter(plan);
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

@media (max-width: 1040px) {
  .shell,
  .results-head,
  .map-band,
  .asset-grid,
  .connector-grid,
  ol {
    grid-template-columns: 1fr;
  }

  .shell {
    display: grid;
  }

  .control-panel {
    position: static;
  }

  .results-head,
  .map-band {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid {
    min-width: 0;
  }

  .map-band > div:first-child {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 12px;
  }

  .control-panel,
  .results-panel {
    padding: 18px;
  }

  .split-fields,
  .preset-row,
  .metric-grid,
  dl {
    grid-template-columns: 1fr;
  }

  .opportunity-card {
    grid-template-columns: 1fr;
  }
}
