:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #64706d;
  --soft: #f4f6f8;
  --panel: #ffffff;
  --line: #d7dedb;
  --teal: #0f766e;
  --teal-soft: #dff5f1;
  --coral: #d94f3d;
  --coral-soft: #ffe9e5;
  --gold: #b7791f;
  --gold-soft: #fff3cf;
  --blue: #285ec7;
  --blue-soft: #e6efff;
  --violet: #6750a4;
  --violet-soft: #eee9ff;
  --shadow: 0 18px 48px rgba(23, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(244, 246, 248, 0.9)),
    var(--soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
a.button:focus-visible {
  outline: 3px solid rgba(40, 94, 199, 0.28);
  outline-offset: 2px;
}

.shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  background: rgba(244, 246, 248, 0.9);
  backdrop-filter: blur(16px);
}

.brand-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--teal);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(23, 33, 31, 0.06);
}

.brand-text {
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1.05;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.status-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.tabs {
  display: grid;
  grid-auto-columns: minmax(118px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  white-space: nowrap;
}

.tab[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.workspace {
  display: grid;
  gap: 18px;
  padding-top: 12px;
}

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

.metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(23, 33, 31, 0.04);
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 850;
  line-height: 1;
}

.metric-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.panel-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.25;
}

.panel-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.panel-body {
  padding: 16px;
}

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

.issue-button {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.issue-button strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.83rem;
  line-height: 1.2;
}

.issue-button span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.issue-button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.field.full {
  grid-column: 1 / -1;
}

.control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

textarea.control {
  min-height: 154px;
  resize: vertical;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

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

.button.coral {
  border-color: var(--coral);
  color: var(--coral);
}

.button.blue {
  border-color: var(--blue);
  color: var(--blue);
}

.button.violet {
  border-color: var(--violet);
  color: var(--violet);
}

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

.summary-box {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.summary-box.strength-box {
  background: #fff;
}

.summary-box.strength-box.strong {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.summary-box.strength-box.ready {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.summary-box.strength-box.needs {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.summary-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-value {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.3;
}

.summary-value .score {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.summary-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.strength-meter {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(23, 33, 31, 0.1);
}

.strength-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.next-move {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--violet);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--violet-soft);
  color: #332956;
  font-size: 0.87rem;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.open {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.soon {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge.urgent,
.badge.past {
  background: var(--coral-soft);
  color: var(--coral);
}

.badge.recovered,
.badge.sent {
  background: var(--teal-soft);
  color: var(--teal);
}

.message-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.subject-line {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.message-output {
  min-height: 260px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.notes-list,
.step-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.note,
.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
  color: #34413e;
  font-size: 0.87rem;
  line-height: 1.45;
}

.step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 850;
}

.claims-header,
.content-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.claims-list,
.playbook-grid,
.growth-grid,
.pricing-grid,
.content-grid {
  display: grid;
  gap: 12px;
}

.claims-list {
  margin-top: 12px;
}

.claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.claim-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
}

.claim-meta,
.claim-outcome {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.claim-actions {
  display: flex;
  min-width: 230px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

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

.playbook-card,
.growth-card,
.pricing-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(23, 33, 31, 0.04);
}

.card-kicker {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.card-title {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.3;
}

.card-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

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

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

.price {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 900;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  list-style: none;
}

.feature-list li {
  border-left: 3px solid var(--teal);
  padding-left: 9px;
}

.pricing-card.featured {
  border-color: var(--teal);
  background: linear-gradient(180deg, #ffffff, #f0fbf8);
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.content-copy {
  min-height: 156px;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.mini-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.84rem;
}

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

.mini-table th {
  background: #f9fafb;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.mini-table tr:last-child td {
  border-bottom: 0;
}

.footer-note {
  margin: 20px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.footer-note a {
  color: var(--teal);
  font-weight: 800;
}

@media (max-width: 980px) {
  .metrics,
  .builder-grid,
  .growth-grid,
  .pricing-grid,
  .content-grid,
  .playbook-grid {
    grid-template-columns: 1fr;
  }

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

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

  .brand-row,
  .panel-header,
  .claim-row {
    display: grid;
  }

  .status-pill {
    justify-self: start;
  }

  .metrics,
  .form-grid,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    grid-auto-columns: minmax(104px, 1fr);
  }

  .claim-actions {
    min-width: 0;
    justify-content: flex-start;
  }

  .button,
  .tab {
    width: 100%;
  }
}
