:root {
  --bg: #ffffff;
  --ink: #10252b;
  --muted: #526267;
  --line: #d7e0e2;
  --soft: #f4f8f8;
  --teal: #185e64;
  --teal-dark: #10474c;
  --oxblood: #8c1623;
  --oxblood-dark: #6d101a;
  --rose: #f0dedf;
  --focus: #0f766e;
  --shadow: 0 18px 45px rgba(16, 37, 43, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

button,
a,
input,
select,
textarea {
  outline-color: var(--focus);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(215, 224, 226, 0.8);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.1;
}

.brand span span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--teal);
  border-radius: 7px;
  color: var(--teal);
}

.brand-mark svg,
.section-icon svg,
.flow-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.header-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-links a {
  text-decoration: none;
}

.header-links a:hover {
  color: var(--teal);
}

.section-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: center;
  min-height: calc(100vh - 79px);
  padding: clamp(48px, 8vw, 92px) 0;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

.hero p {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

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

.price-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--oxblood);
  border-radius: var(--radius);
  background: var(--soft);
}

.price-strip strong {
  color: var(--oxblood);
}

.price-strip span {
  color: var(--muted);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 19px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button-primary:hover {
  background: var(--oxblood-dark);
}

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

.button-secondary:hover {
  border-color: var(--teal);
}

.boundary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}

.boundary-list li,
.private-note {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.pack-preview {
  position: relative;
  min-height: 450px;
  border-radius: 50%;
  background: #deedef;
}

.preview-folder {
  position: absolute;
  right: 28px;
  bottom: 58px;
  width: 72%;
  height: 58%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.preview-card {
  position: absolute;
  width: min(280px, 58%);
  min-height: 280px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.preview-card h2 {
  margin: 20px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.preview-card p,
.preview-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.preview-index {
  top: 82px;
  left: 20px;
  z-index: 2;
}

.preview-index ul {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.preview-index li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
}

.preview-index li span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
}

.preview-letter {
  right: 0;
  top: 40px;
  transform: rotate(1.5deg);
}

.line {
  height: 9px;
  margin-top: 11px;
  border-radius: 99px;
  background: #d8e0e2;
}

.line.long {
  width: 92%;
}

.line.medium {
  width: 72%;
}

.problem-band,
.included-band {
  background: var(--soft);
}

.problem-layout,
.included-layout {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
  padding: 58px 0;
}

.section-icon {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
}

.section-icon.warning {
  color: var(--oxblood);
  background: var(--rose);
}

.section-icon.shield {
  color: #fff;
  background: var(--teal);
}

h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
}

h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.25;
}

.problem-layout p,
.included-layout p,
.boundary-section p,
.intake-heading p,
.site-footer p {
  color: var(--muted);
  margin: 0;
}

.strong-line {
  color: var(--ink) !important;
  font-weight: 700;
  margin-top: 12px !important;
}

.flow-section,
.boundary-section,
.intake-section {
  padding: 58px 0;
}

.flow-section > h2 {
  text-align: center;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 24px;
}

.flow-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.flow-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.flow-icon.teal {
  background: var(--teal);
}

.flow-icon.oxblood {
  background: var(--oxblood);
}

.flow-card p {
  color: var(--muted);
}

.flow-card ul {
  padding: 18px 0 0;
  margin: 18px 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.flow-card li {
  margin-top: 8px;
  color: var(--ink);
}

.flow-card li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.flow-card:nth-child(2) li::before {
  background: var(--oxblood);
}

.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-weight: 700;
}

.text-button.red {
  color: var(--oxblood);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.benefit-grid > div {
  min-height: 130px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

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

.boundary-grid p {
  min-height: 70px;
  padding: 18px;
  border-left: 3px solid var(--oxblood);
  background: var(--soft);
}

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

.intake-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend,
label {
  color: var(--ink);
  font-weight: 700;
}

legend {
  width: 100%;
  margin-bottom: 2px;
}

.radio-row {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  font-weight: 400;
}

.field {
  min-width: 0;
}

.field-wide,
.consent-row,
.form-actions {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #cbd6d9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.consent-row label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
}

.form-error {
  min-height: 24px;
  margin: 0;
  color: var(--oxblood);
  font-weight: 700;
}

.confirmation {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: var(--soft);
}

.success-panel {
  border-left-color: var(--oxblood);
}

.confirmation p {
  color: var(--muted);
}

pre {
  overflow: auto;
  max-height: 320px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  white-space: pre-wrap;
}

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

.site-footer {
  background: var(--teal-dark);
  color: #fff;
}

.footer-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  padding: 42px 0;
}

.site-footer h2 {
  font-size: 1.35rem;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.82);
}

.footer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 56px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.placeholder-page {
  min-height: 100vh;
  padding: clamp(44px, 8vw, 96px) 0;
}

.placeholder-page h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.05;
}

.placeholder-page p {
  max-width: 760px;
  color: var(--muted);
}

.admin-token-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 760px;
  margin: 24px 0;
  padding: 18px;
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
  }

  .header-links {
    display: none;
  }

  .hero,
  .problem-layout,
  .included-layout,
  .footer-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .pack-preview {
    min-height: 360px;
  }

  .preview-card {
    width: 64%;
    padding: 20px;
  }

  .preview-index {
    left: 0;
  }

  .flow-grid,
  .benefit-grid,
  .boundary-grid,
  form {
    grid-template-columns: 1fr;
  }

  .benefit-grid > div {
    min-height: auto;
  }

  .intake-heading {
    display: block;
  }

  .private-note {
    display: inline-flex;
    margin-top: 14px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 16px;
  }

  .section-shell {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-actions,
  .button,
  .form-actions,
  .confirmation-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .boundary-list li {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .pack-preview {
    min-height: 300px;
  }

  .preview-card {
    min-height: 220px;
    font-size: 0.85rem;
  }

  .preview-letter {
    right: -4px;
  }

  fieldset {
    display: block;
  }

  .radio-row {
    display: flex;
  }
}
