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

:root {
  color-scheme: light;
  --text: #172033;
  --muted: #5c667a;
  --line: #d7dce5;
  --panel: #ffffff;
  --page: #f4f7f9;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e0f2f1;
  --warning: #8a5a00;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 28px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 360px),
    var(--page);
}

button, input, textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 820px);
  margin: 0 auto;
}

.intro {
  padding: 20px 0 18px;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.04;
}

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

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.08);
}

.compact-panel {
  padding: 16px 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

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

.role-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #ffffff;
  cursor: pointer;
}

.role-tab[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 800;
}

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

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.counter, .hint, .status {
  color: var(--muted);
  font-size: 0.92rem;
}

.counter {
  white-space: nowrap;
}

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

.badge-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: #ffffff;
  cursor: pointer;
}

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

.badge-button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 700;
}

.hint {
  margin: 14px 0 0;
}

.field-label {
  display: block;
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.field-label:first-of-type {
  margin-top: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  line-height: 1.55;
}

input {
  min-height: 48px;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

#implementationNotes,
#developerAdditions,
#customerAdditions {
  min-height: 118px;
}

textarea:focus,
input:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  padding: 14px 18px;
  color: #ffffff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  padding: 10px 14px;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.secondary-button:hover {
  background: #cce9e7;
}

.status {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--warning);
}

@media (max-width: 700px) {
  body {
    padding: 18px;
  }

  .panel {
    padding: 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .field-grid,
  .copy-row,
  .role-tabs {
    grid-template-columns: 1fr;
  }

  .secondary-button {
    width: 100%;
  }
}
