:root {
  --ink: #17201f;
  --muted: #60706c;
  --line: #d7dfdc;
  --panel: #ffffff;
  --paper: #eef4f1;
  --field: #fbfcfa;
  --teal: #087f75;
  --teal-dark: #055f58;
  --gold: #d29a2e;
  --rose: #ba3e4d;
  --blue: #356fc0;
  --shadow: 0 18px 45px rgba(19, 32, 30, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

html {
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 12px auto 0;
  padding: 0 14px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(19, 32, 30, 0.08);
  backdrop-filter: blur(18px);
}

.site-brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-brand {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  padding: 6px;
}

.site-header nav {
  gap: 6px;
}

.site-header nav a {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: #41534f;
  font-size: 0.88rem;
  font-weight: 800;
}

.site-header nav a:hover {
  background: rgba(8, 127, 117, 0.08);
  color: var(--teal-dark);
}

.hero-section,
.market-section {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 64px 24px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 34px;
  align-items: center;
  min-height: auto;
  padding-top: 76px;
  padding-bottom: 56px;
}

.hero-badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 11px;
  border: 1px solid rgba(8, 127, 117, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  color: #0f1d1b;
  font-size: clamp(2.45rem, 4.6vw, 4.85rem);
  line-height: 1;
}

.hero-lede {
  max-width: 660px;
  margin: 20px 0 0;
  color: #475b56;
  font-size: 1.08rem;
  line-height: 1.55;
}

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

.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
}

.primary-link {
  padding: 0 20px;
  background: var(--teal);
  color: #ffffff;
}

.secondary-link {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-strip span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #c9d6d2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #40534f;
  font-size: 0.84rem;
  font-weight: 850;
}

.hero-product {
  overflow: hidden;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(19, 32, 30, 0.14);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #112724;
  color: #eef7f4;
  font-weight: 850;
}

.preview-toolbar strong {
  color: #9ce4d7;
  font-size: 1.3rem;
}

.preview-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
}

.preview-column {
  min-height: auto;
  padding: 18px;
  border-radius: 8px;
  background: #f0f6f3;
}

.preview-label,
.case-kicker,
.plan-name {
  display: block;
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-column h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  line-height: 1.08;
}

.preview-column ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-column li {
  padding: 10px 12px;
  border: 1px solid #d3ded9;
  border-radius: 8px;
  background: #ffffff;
  color: #31433f;
  font-weight: 750;
}

.preview-document {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f9fbfa);
}

.doc-line {
  height: 13px;
  width: 76%;
  border-radius: 999px;
  background: #d6e0dc;
}

.doc-line.wide {
  width: 94%;
  background: var(--teal);
}

.doc-line.short {
  width: 48%;
  background: var(--gold);
}

.doc-stamp {
  align-self: flex-start;
  margin-top: 20px;
  padding: 10px 13px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  color: var(--teal-dark);
  font-weight: 900;
  rotate: -2deg;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading h2,
.conversion-band h2 {
  color: #14221f;
  font-size: clamp(1.9rem, 3.2vw, 3.05rem);
  line-height: 1.06;
}

.use-case-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.use-case-grid article,
.pricing-grid article {
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(19, 32, 30, 0.07);
}

.use-case-grid h3,
.pricing-grid h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.use-case-grid p,
.pricing-grid p,
.conversion-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.conversion-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 36px;
  align-items: end;
  padding-top: 44px;
  padding-bottom: 44px;
  border: 1px solid rgba(23, 32, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.conversion-band p {
  font-size: 1.1rem;
}

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

.pricing-grid strong {
  display: block;
  margin-bottom: 14px;
  font-size: 2.5rem;
  line-height: 1;
}

.featured-plan {
  border-color: rgba(8, 127, 117, 0.35) !important;
  background: #edf7f4 !important;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.builder-intro {
  max-width: 760px;
  margin-bottom: 24px;
}

.builder-intro h2 {
  margin: 0;
  color: #14221f;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.06;
}

.builder-intro p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.56fr);
  gap: 16px;
  align-items: start;
}

.rail {
  display: none !important;
}

.rail,
.builder,
.result-panel {
  min-height: 0;
  border: 1px solid rgba(23, 32, 31, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(19, 32, 30, 0.1);
  backdrop-filter: blur(16px);
}

.rail,
.result-panel {
  position: sticky;
  top: 24px;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px;
  border-radius: 8px;
}

.builder {
  padding: 24px;
  border-radius: 8px;
}

.result-panel {
  padding: 22px;
  border-radius: 8px;
  top: 92px;
}

.brand,
.builder-header,
.panel-top,
.status-row,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.brand {
  align-items: flex-start;
  justify-content: flex-start;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: #102724;
}

.brand-mark span {
  border-radius: 3px;
  background: #e7f1ee;
}

.brand-mark span:nth-child(2) {
  background: var(--gold);
}

.brand-mark span:nth-child(3) {
  background: var(--teal);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 1.62rem;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 1.28rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 0.96rem;
}

.proof-visual {
  position: relative;
  height: 180px;
}

.folder {
  position: absolute;
  border-radius: 8px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  box-shadow: 0 16px 28px rgba(23, 32, 31, 0.12);
}

.folder::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 18px;
  width: 92px;
  height: 24px;
  border-radius: 7px 7px 0 0;
  background: inherit;
  border: inherit;
  border-bottom: 0;
}

.folder.back {
  inset: 48px 10px 18px 52px;
  rotate: 7deg;
  background: #e6ece8;
}

.folder.middle {
  inset: 34px 26px 24px 26px;
  rotate: -5deg;
  background: #d8ebe6;
}

.folder.front {
  inset: 58px 6px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 34px 24px;
  background: #ffffff;
}

.folder-line {
  height: 10px;
  width: 70%;
  border-radius: 999px;
  background: #cbd7d3;
}

.folder-line.wide {
  width: 92%;
  background: var(--teal);
}

.folder-line.short {
  width: 44%;
  background: var(--gold);
}

.rail-copy p,
.source-note,
.fine-print {
  color: var(--muted);
  line-height: 1.52;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.metric-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.metric-grid strong {
  display: block;
  font-size: 1.5rem;
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.source-note {
  margin-top: auto;
  padding: 14px;
  border-left: 3px solid var(--gold);
  background: #fff9ea;
  font-size: 0.86rem;
}

.ghost-button,
.actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.ghost-button {
  padding: 0 14px;
}

.case-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

label,
legend {
  color: #283936;
  font-size: 0.88rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  outline: 0;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.48;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 117, 0.12);
}

fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 248, 245, 0.72);
}

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

.check-grid label {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #31433f;
  font-size: 0.85rem;
  font-weight: 650;
}

.check-grid input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.extension-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.extension-box summary {
  min-height: 48px;
  padding: 14px 16px;
  color: var(--teal-dark);
  font-weight: 850;
  cursor: pointer;
}

.extension-box[open] {
  padding-bottom: 16px;
}

.extension-box[open] summary {
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.extension-box label,
.extension-box .fine-print {
  display: block;
  margin: 0 16px 14px;
}

.extension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.extension-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 16px;
}

.extension-actions button,
.import-control {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.extension-actions button:first-child {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.import-control input {
  display: none;
}

.score-ring {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--teal) var(--score-angle, 245deg), #e5ece9 0);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.status-row {
  margin: 18px 0;
}

.status-row span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: #edf4f1;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.output-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.4;
}

#letterOutput {
  min-height: 360px;
  color: #243431;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.actions {
  align-items: stretch;
}

.actions button {
  flex: 1;
  padding: 0 10px;
}

.actions button:first-child {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.fine-print {
  margin: 14px 0 0;
  font-size: 0.78rem;
}

@media (max-width: 1180px) {
  .hero-section,
  .conversion-band {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

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

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

  .rail,
  .result-panel {
    position: static;
    min-height: auto;
  }

  .proof-visual {
    height: 150px;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: calc(100% - 24px);
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-section,
  .market-section {
    padding: 40px 12px;
  }

  .hero-section {
    gap: 28px;
  }

  .hero-copy h1 {
    font-size: 2.38rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .preview-body {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .preview-column,
  .preview-document {
    min-height: auto;
  }

  .use-case-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 12px 12px 40px;
  }

  .rail,
  .builder,
  .result-panel {
    padding: 16px;
  }

  .brand,
  .builder-header,
  .panel-top,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sample-actions {
    justify-content: stretch;
  }

  .sample-actions button {
    flex: 1;
  }

  .form-grid,
  .check-grid,
  .metric-grid,
  .extension-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.38rem;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .rail,
  .builder,
  .actions,
  .fine-print {
    display: none;
  }

  .app-shell,
  .workspace,
  .result-panel {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
