/* 1. Variables - Dot Assessment app theme (source of truth) */
:root {
  --dot-deep-navy: #123f3a;        /* --dot-primary-dark */
  --dot-navy-soft: #1f6f63;        /* --dot-primary */
  --dot-lime-green: #D7F75B;       /* --dot-highlight: selected/recommended states (site lime) */
  --dot-lime-dark: #1f6f63;        /* --dot-primary */
  --dot-white: #ffffff;            /* --dot-surface */
  --dot-light-background: #fbfaf7; /* --dot-bg */
  --dot-card-background: #ffffff;  /* --dot-surface */
  --dot-text: #19302d;
  --dot-muted-text: #64736f;
  --dot-border: #dce5e2;
  --dot-form-border: #d7e1de;
  --dot-accent: #e45c5c;
  --dot-warning-background: rgba(228, 92, 92, 0.08);
  --dot-warning-border: #e45c5c;
  --dot-shadow: 0 16px 36px rgba(18, 63, 58, 0.12);
}

/* 2. Base layout */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--dot-light-background);
  color: var(--dot-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

button,
a {
  touch-action: manipulation;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  color: var(--dot-deep-navy);
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 12px;
  color: var(--dot-deep-navy);
  font-size: 1.08rem;
}

.page-width {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.main-layout {
  padding: 24px 20px 44px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--dot-lime-green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 3. Header / hero */
.assessment-hero {
  background: var(--dot-deep-navy);
  color: var(--dot-white);
  padding: 28px 20px 38px;
}

.header-layout {
  display: grid;
  gap: 34px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 44px;
  border: 2px solid var(--dot-lime-green);
  border-radius: 8px;
  color: var(--dot-lime-green);
  font-weight: 900;
}

.brand-line {
  max-width: 360px;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  text-align: right;
}

.hero-copy {
  max-width: 860px;
}

.subheadline {
  max-width: 780px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.tagline {
  margin-bottom: 0;
  color: var(--dot-lime-green);
  font-weight: 800;
}

.intro-panel,
.scorecard-form,
.results-report {
  background: var(--dot-white);
  border: 1px solid var(--dot-border);
  border-radius: 8px;
  box-shadow: var(--dot-shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 330px);
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.intro-panel p {
  margin-bottom: 0;
  color: var(--dot-muted-text);
}

.progress-box {
  display: grid;
  gap: 10px;
  color: var(--dot-deep-navy);
  font-weight: 800;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce5e2;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--dot-lime-green);
  transition: width 180ms ease;
}

/* 4. Forms */
.scorecard-form {
  margin-top: 20px;
  overflow: hidden;
}

.form-section {
  padding: 26px 24px;
  border-bottom: 1px solid var(--dot-border);
}

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

.field {
  display: grid;
  gap: 7px;
}

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

label,
legend {
  color: var(--dot-deep-navy);
  font-weight: 800;
}

.optional-text {
  color: var(--dot-muted-text);
  font-weight: 400;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--dot-form-border);
  border-radius: 8px;
  background: var(--dot-white);
  color: var(--dot-text);
  padding: 10px 12px;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(31, 111, 99, 0.45);
  outline-offset: 2px;
}

.radio-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--dot-border);
  border-radius: 8px;
}

.radio-field legend {
  padding: 0 6px;
}

.radio-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-title-row p {
  margin-bottom: 0;
  color: var(--dot-muted-text);
}

.validation-message {
  margin: 22px 24px 0;
  border: 1px solid var(--dot-warning-border);
  border-radius: 8px;
  background: var(--dot-warning-background);
  color: var(--dot-text);
  padding: 14px 16px;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding: 24px;
}

/* 5. Question cards */
.questions-container {
  display: grid;
  gap: 22px;
}

.question-section {
  border: 1px solid var(--dot-border);
  border-radius: 8px;
  background: #f5f8f7;
  padding: 18px;
}

.question-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.question-section-header h3 {
  margin-bottom: 0;
}

.question-section-header p {
  margin-bottom: 0;
  color: var(--dot-muted-text);
  font-weight: 800;
}

.question-list {
  display: grid;
  gap: 16px;
}

.question-card {
  margin: 0;
  border: 1px solid var(--dot-border);
  border-radius: 8px;
  background: var(--dot-white);
  padding: 18px;
}

.question-card legend {
  margin-bottom: 14px;
}

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

.answer-option {
  position: relative;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-option span {
  display: grid;
  align-content: start;
  min-height: 98px;
  border: 1px solid var(--dot-form-border);
  border-radius: 8px;
  background: var(--dot-white);
  color: var(--dot-text);
  padding: 12px;
  cursor: pointer;
}

.answer-option strong {
  display: block;
  margin-bottom: 4px;
  color: var(--dot-deep-navy);
}

.answer-option input:checked + span {
  border-color: var(--dot-lime-green);
  background: rgba(215, 247, 91, 0.14);
  box-shadow: inset 0 0 0 2px var(--dot-lime-green);
}

.answer-option input:focus-visible + span {
  outline: 3px solid rgba(31, 111, 99, 0.45);
  outline-offset: 2px;
}

/* 6. Results report */
.results-report {
  margin-top: 28px;
  padding: 26px;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--dot-border);
}

.score-badge {
  display: grid;
  justify-items: center;
  min-width: 160px;
  border-radius: 8px;
  background: var(--dot-deep-navy);
  color: var(--dot-white);
  padding: 14px 16px;
  text-align: center;
}

.score-badge strong {
  color: var(--dot-lime-green);
  font-size: 1.85rem;
  line-height: 1;
}

.score-badge span {
  margin-top: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.results-grid,
.section-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.results-grid {
  margin: 20px 0;
}

.result-card,
.section-score-card {
  border: 1px solid var(--dot-border);
  border-radius: 8px;
  background: var(--dot-card-background);
  padding: 14px;
}

.result-card span,
.section-score-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--dot-muted-text);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-card strong,
.section-score-card strong {
  color: var(--dot-deep-navy);
  font-size: 1.08rem;
}

.audit-note {
  margin: 4px 0 22px;
  border-left: 5px solid var(--dot-lime-green);
  border-radius: 8px;
  background: rgba(215, 247, 91, 0.16);
  color: var(--dot-deep-navy);
  padding: 14px 16px;
  font-weight: 700;
}

.report-block {
  margin-top: 24px;
}

.report-block p {
  margin-bottom: 0;
}

.weakest-explanation {
  display: grid;
  gap: 10px;
}

.weakest-explanation p {
  margin: 0;
  border-left: 4px solid var(--dot-lime-green);
  border-radius: 8px;
  background: #f5f8f7;
  padding: 12px 14px;
}

#nextSteps {
  margin: 0;
  padding-left: 22px;
}

#nextSteps li + li {
  margin-top: 8px;
}

.result-privacy-note {
  margin: 26px 0 0;
  color: var(--dot-muted-text);
  font-size: 0.95rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--dot-border);
}

.copy-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--dot-lime-dark);
  font-weight: 800;
}

/* 7. Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  color: var(--dot-deep-navy);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--dot-navy-soft);
  color: var(--dot-white);
}

.button-primary:hover {
  background: var(--dot-deep-navy);
}

.button-secondary {
  background: var(--dot-white);
  border-color: var(--dot-deep-navy);
}

.button-secondary:hover {
  background: var(--dot-light-background);
}

.button-quiet {
  background: transparent;
  border-color: transparent;
}

.button-quiet:hover {
  background: var(--dot-light-background);
}

/* 8. Print styles */
@media print {
  body {
    background: var(--dot-white);
    color: #000000;
  }

  .assessment-hero,
  .site-header,
  .intro-panel,
  .scorecard-form,
  .result-actions,
  .copy-status,
  .site-footer {
    display: none !important;
  }

  .main-layout {
    width: 100%;
    padding: 0;
  }

  .results-report {
    display: block !important;
    margin: 0;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .score-badge {
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
  }

  .score-badge strong {
    color: #000000;
  }

  .result-card,
  .section-score-card,
  .audit-note,
  .report-block {
    break-inside: avoid;
  }
}

/* 9. Responsive styles */
@media (max-width: 900px) {
  .intro-panel,
  .field-grid,
  .answer-grid,
  .results-grid,
  .section-score-grid {
    grid-template-columns: 1fr;
  }

  .answer-option span {
    min-height: auto;
  }

  .results-header,
  .brand-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-line {
    text-align: left;
  }

  .score-badge {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .assessment-hero {
    padding: 22px 16px 30px;
  }

  .main-layout {
    padding: 18px 12px 34px;
  }

  .intro-panel,
  .form-section,
  .form-actions,
  .results-report {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-actions,
  .result-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
