:root {
  color-scheme: light;
  --page: #f3f6f4;
  --surface: #ffffff;
  --surface-muted: #eef4f0;
  --text: #17211d;
  --muted: #53625b;
  --border: #c8d4ce;
  --accent: #175b46;
  --accent-hover: #0f4837;
  --focus: #0b57d0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  min-width: 0;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

button {
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 0.7rem;
  color: #ffffff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.button-secondary {
  color: var(--accent);
  background: var(--surface);
}

.button-secondary:hover {
  color: #ffffff;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(calc(100% - 2rem), 64rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  color: #ffffff;
  background: var(--text);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  padding-block: clamp(2.5rem, 8vw, 5rem) clamp(4rem, 10vw, 7rem);
  color: #ffffff;
  background: var(--accent);
}

.home-header {
  padding-block: clamp(1rem, 3vw, 2rem) clamp(2rem, 5vw, 3.5rem);
}

.eyebrow,
.step-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  color: #d4eee4;
}

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

h1 {
  max-width: 16ch;
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.home-header h1 {
  max-width: 25ch;
  margin-bottom: 0.65rem;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

h4 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.intro,
.view-header > p:last-child {
  max-width: 58ch;
}

.intro {
  margin-bottom: 0;
  color: #e8f5ef;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.home-header .intro {
  max-width: 76ch;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-benefits li {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-precision {
  max-width: 76ch;
  margin: 0.65rem 0 0;
  color: #e8f5ef;
  font-size: 0.85rem;
}

.hero-how {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  margin-top: 0.55rem;
}

.hero-how-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
}

.hero-how ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.5rem;
  margin: 0;
  padding-left: 1.2rem;
  color: #e8f5ef;
  font-size: 0.85rem;
}

main {
  position: relative;
  margin-top: clamp(-4rem, -5vw, -2.5rem);
  padding-bottom: 3rem;
}

.home-main {
  margin-top: clamp(-2rem, -3vw, -1.25rem);
}

.view {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: 0 1.2rem 3rem rgb(21 54 42 / 12%);
}

.view-header {
  margin-bottom: 1.5rem;
}

.view-header > p:last-child,
.panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.step-label {
  color: var(--accent);
}

.panel {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface-muted);
}

.section-nav {
  margin-bottom: 1.5rem;
}

.section-nav-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-link {
  width: 100%;
  height: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.7rem;
  color: var(--accent);
  background: var(--surface);
  font-size: 0.9rem;
  text-align: left;
}

.section-link:hover,
.section-link[aria-current="step"] {
  color: #ffffff;
  background: var(--accent);
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.form-section {
  scroll-margin-top: 1rem;
}

.form-subtitle {
  grid-column: 1 / -1;
  margin: 0.5rem 0 -0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-weight: 800;
}

.form-grid > .form-subtitle:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section-guidance {
  max-width: 76ch;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 700;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid #6f7f77;
  border-radius: 0.55rem;
  color: var(--text);
  background: var(--surface);
}

.field textarea {
  min-height: 6rem;
  resize: vertical;
}

.choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.choice-list {
  display: grid;
  gap: 0.6rem;
}

.choice-group .field-help {
  margin-top: 0.6rem;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.choice-option input {
  flex: 0 0 auto;
  margin-top: 0.3rem;
}

.information-message {
  margin: 1.25rem 0 0;
  padding: 1rem;
  border-left: 0.25rem solid var(--accent);
  color: var(--text);
  background: var(--surface);
}

.livrables-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.deliverable-card {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.deliverable-actions {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.deliverable-delete-confirmation {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface-muted);
}

.deliverable-delete-confirmation > p {
  color: var(--text);
  font-weight: 700;
}

.deal-summary {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.summary-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.summary-item {
  display: grid;
  gap: 0.2rem;
}

.summary-item dt {
  font-weight: 700;
}

.summary-item dd {
  margin: 0;
}

.section-navigation {
  justify-content: space-between;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-actions {
  align-items: center;
}

.clear-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.inline-confirmation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.summary-panel {
  margin-top: 1.5rem;
}

.memo-text {
  min-height: 8rem;
  margin: 1.5rem 0 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  color: var(--text);
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  cursor: text;
}

.copy-feedback {
  min-height: 1.6em;
  margin: 1rem 0 0;
  color: var(--accent);
  font-weight: 700;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
}

.legal-header {
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

.legal-header h1 {
  max-width: 20ch;
}

.legal-warning {
  max-width: 46rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid #f4cf65;
  border-radius: 0.7rem;
  color: #302400;
  background: #fff4c8;
  font-weight: 800;
}

.legal-intro {
  max-width: 64ch;
  color: #e8f5ef;
}

.legal-back-link {
  display: inline-block;
  color: #ffffff;
  font-weight: 700;
}

.legal-content {
  display: grid;
  gap: 1rem;
}

.legal-section {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: 0 1.2rem 3rem rgb(21 54 42 / 8%);
}

.legal-section > :last-child {
  margin-bottom: 0;
}

.legal-details {
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0 0;
}

.legal-details div {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.legal-details dt {
  font-weight: 800;
}

.legal-details dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

@media (min-width: 42rem) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 30rem) {
  .container {
    width: min(calc(100% - 1rem), 64rem);
  }

  .site-header {
    padding-top: 2.5rem;
  }

  .home-header {
    padding-block: 0.75rem 1.5rem;
  }

  .home-header h1 {
    max-width: none;
    margin-bottom: 0.35rem;
    font-size: 1.55rem;
  }

  .home-header .intro {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .hero-benefits {
    gap: 0.25rem;
    margin-top: 0.4rem;
  }

  .hero-benefits li {
    padding: 0.1rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .hero-precision {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .hero-how {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem;
    margin-top: 0.35rem;
  }

  .hero-how-title {
    font-size: 0.72rem;
  }

  .hero-how ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding-left: 1rem;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .view {
    padding: 0.75rem;
    border-radius: 0.8rem;
  }

  .view-header {
    margin-bottom: 0.75rem;
  }

  .view-header h2 {
    margin-bottom: 0.3rem;
    font-size: 1.35rem;
  }

  .view-header > p:last-child {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .section-nav {
    margin-bottom: 0.75rem;
  }

  .section-nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .section-link {
    min-height: 2.25rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .panel {
    padding: 0.75rem;
  }

  .panel > p {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .form-grid {
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

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

  #previous-section {
    grid-column: 1;
  }

  #next-section {
    grid-column: 2;
  }

  .actions button {
    width: 100%;
  }

  .clear-actions > button,
  .clear-actions .inline-confirmation,
  .clear-actions .inline-confirmation button {
    width: 100%;
  }
}
