:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #20231f;
  --muted: #656b61;
  --line: #d9d6cb;
  --panel: #ffffff;
  --green: #2f6f5e;
  --green-dark: #204f44;
  --amber: #a86724;
  --red: #aa3f38;
  --blue: #315d7c;
  --shadow: 0 20px 50px rgba(32, 35, 31, 0.08);
}

* {
  box-sizing: border-box;
}

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

button,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.productHeader {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.positioning {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.privacyPledge {
  border-left: 4px solid var(--green);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.privacyPledge strong,
.privacyPledge span {
  display: block;
}

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

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 20px;
  align-items: start;
}

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

.inputPane {
  min-height: 690px;
  display: flex;
  flex-direction: column;
}

.paneHeader,
.overview,
.sectionHeader {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.paneHeader {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.paneHeader p,
.sectionHeader p,
.emptyState p,
.scoreNote {
  margin-bottom: 0;
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 520px;
  flex: 1;
  resize: vertical;
  border: 0;
  padding: 20px;
  outline: none;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

textarea::placeholder {
  color: #8a8d84;
}

.inputFooter {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.counts strong {
  color: var(--ink);
}

.actions {
  display: flex;
  gap: 10px;
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 700;
}

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

.primaryButton {
  background: var(--green);
  color: white;
}

.primaryButton:hover {
  background: var(--green-dark);
}

.secondaryButton,
.ghostButton {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.ghostButton {
  color: var(--green);
}

.secondaryButton:hover,
.ghostButton:hover {
  border-color: var(--green);
}

.resultPane {
  padding: 20px;
  min-height: 690px;
}

.emptyState {
  display: grid;
  min-height: 640px;
  place-content: center;
  text-align: center;
  padding: 40px;
}

.overview {
  margin-bottom: 8px;
}

.scoreWrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.scoreRing {
  --score: 0deg;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--green) var(--score), #e8e5db 0);
  position: relative;
  flex: 0 0 auto;
}

.scoreRing::before {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
}

.scoreRing span {
  position: relative;
  font-size: 1.8rem;
  font-weight: 900;
}

.scoreNote {
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.metricsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.metric {
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.copyStatus {
  display: block;
  min-height: 22px;
  color: var(--green);
  font-weight: 700;
}

.purchaseCta {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 22px;
  padding: 16px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: #f3f8f5;
}

.purchaseCta h2 {
  margin-bottom: 4px;
}

.purchaseCta p {
  margin-bottom: 0;
  color: var(--muted);
}

.purchaseButton {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 0 15px;
  background: var(--green);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.purchaseButton:hover {
  background: var(--green-dark);
}

.sectionHeader {
  margin: 18px 0 10px;
}

.issuesList {
  display: grid;
  gap: 10px;
}

.issue,
.issueGroup {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.issue {
  padding: 14px;
}

.issueGroup {
  overflow: hidden;
}

.issueGroup summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.issueGroup summary::-webkit-details-marker {
  display: none;
}

.issueGroup summary::before {
  content: "+";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  font-weight: 900;
  flex: 0 0 auto;
}

.issueGroup[open] summary::before {
  content: "-";
}

.groupMain {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.groupMeta,
.miniLabel {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.groupBody {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.groupBody p {
  margin-bottom: 8px;
  color: #444941;
}

.representativeBlock {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.representativeBlock blockquote {
  margin-bottom: 0;
}

.allFindings {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.issueDetail {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.issueDetailHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

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

.category {
  font-weight: 850;
}

.severity {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.77rem;
  font-weight: 850;
}

.severityHigh {
  background: #f8e5e1;
  color: var(--red);
}

.severityMedium {
  background: #f6eadb;
  color: var(--amber);
}

.severityLow {
  background: #e8eff3;
  color: var(--blue);
}

blockquote {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  background: #fbfaf7;
  color: #363a34;
  font-family: Georgia, "Times New Roman", serif;
}

.issue p {
  margin-bottom: 8px;
  color: #444941;
}

.issue p:last-child {
  margin-bottom: 0;
}

.suggestionsList {
  margin: 0;
  padding-left: 20px;
  color: #444941;
}

.suggestionsList li + li {
  margin-top: 8px;
}

.calmNotice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: #fbfaf7;
}

.marketFooter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .productHeader,
  .workspace {
    grid-template-columns: 1fr;
  }

  .inputPane,
  .resultPane {
    min-height: auto;
  }

  .emptyState {
    min-height: 260px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding: 18px 0;
  }

  .paneHeader,
  .inputFooter,
  .overview,
  .purchaseCta {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    width: 100%;
  }

  .actions button,
  .overview button,
  .purchaseButton {
    flex: 1;
  }

  .metricsGrid {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 420px;
  }
}
