:root {
  --ink: #122033;
  --muted-ink: #536174;
  --line: #dce3eb;
  --soft: #f4f7fa;
  --panel: #ffffff;
  --accent: #174c76;
  --accent-dark: #0d314f;
  --accent-soft: #e9f2f8;
  --shadow: 0 24px 60px rgba(18, 32, 51, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--panel);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 42px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2.4vw, 30px);
  color: var(--muted-ink);
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(860px, calc(100% - 40px));
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 10vw, 130px) 0;
  background: #eef4f7;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero::before {
  z-index: -2;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  opacity: 0.75;
}

.hero::after {
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(23, 76, 118, 0.08), transparent 30%),
    linear-gradient(90deg, rgba(248, 251, 253, 0.78) 0%, rgba(248, 251, 253, 0.58) 48%, rgba(237, 243, 247, 0.44) 100%);
}

.section {
  padding: clamp(58px, 8vw, 96px) 0;
}

.intro-section {
  background: var(--soft);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(2.9rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

p {
  color: var(--muted-ink);
}

.lead {
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
}

.assessment-note,
.dimension-card,
.report-panel,
.report-section,
.summary-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.assessment-note {
  padding: 28px;
}

.assessment-note p:last-child {
  margin-bottom: 0;
}

.assessment-form {
  display: grid;
  gap: 44px;
}

.discipline-section {
  display: grid;
  gap: 20px;
}

.discipline-heading {
  max-width: 760px;
}

.dimension-card {
  padding: clamp(24px, 4vw, 36px);
}

.dimension-card legend {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.dimension-card legend span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.statement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.statement-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.rating-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rating-scale label {
  cursor: pointer;
}

.rating-scale input {
  position: absolute;
  opacity: 0;
}

.rating-scale span,
.rating-scale small {
  display: block;
  text-align: center;
}

.rating-scale span {
  padding: 10px;
  color: var(--accent-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 850;
}

.rating-scale small {
  margin-top: 4px;
  color: var(--muted-ink);
  font-size: 0.72rem;
}

.rating-scale input:checked + span {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.rating-scale input:focus-visible + span {
  outline: 3px solid rgba(23, 76, 118, 0.25);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
}

.validation-message {
  flex-basis: 100%;
  margin: 0;
  color: #9b1c1c;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 32px rgba(23, 76, 118, 0.22);
}

.button.secondary {
  color: var(--accent-dark);
  background: #fff;
  border-color: var(--line);
}

.results-section[hidden],
#assessment-stage[hidden] {
  display: none !important;
}

.report-panel {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(26px, 5vw, 52px);
}

.report-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.report-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.summary-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.summary-grid article {
  padding: 24px;
}

.summary-grid span {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-grid strong {
  display: block;
  margin: 12px 0 6px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.report-section {
  margin-top: 22px;
  padding: 24px;
  box-shadow: none;
}

.report-transition {
  display: grid;
  gap: 0;
  margin: 10px 0 4px;
  padding: 18px 22px 18px 24px;
  color: var(--accent-dark);
  background: linear-gradient(90deg, var(--accent-soft) 0%, #f7fafc 72%, transparent 100%);
  border: 1px solid #c9d9e6;
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  box-shadow: none;
}

.report-transition p {
  margin: 0;
  max-width: 68ch;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* Board report layout: continuous document body; Dimension Scorecard cells stay carded */
.report-layout-board {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 44px);
}

.report-layout-board .report-heading {
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--accent-dark);
}

.report-layout-board .report-heading h2 {
  letter-spacing: -0.03em;
}

.report-layout-board .report-section {
  margin-top: 0;
  padding: 28px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.report-layout-board .report-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.report-layout-board .report-section h3 {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 800;
}

.report-layout-board .report-section > p {
  max-width: 72ch;
  font-size: 1.02rem;
  line-height: 1.7;
}

.report-layout-board .next-step > p {
  max-width: none;
  width: 100%;
}

.report-layout-board .summary-grid {
  gap: 0;
  margin: 8px 0 4px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.report-layout-board .summary-grid article {
  padding: 18px 20px;
  background: var(--soft);
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.report-layout-board .summary-grid article:last-child {
  border-right: none;
}

.report-layout-board .executive-result-grid {
  margin-top: 24px;
}

.report-layout-board .rule-card {
  padding: 0 0 0 16px;
  background: transparent;
  border: none;
  border-left: 3px solid var(--accent);
  border-radius: 0;
}

.report-layout-board .rule-meta span {
  background: var(--soft);
  border-radius: 4px;
}

.report-layout-board .report-transition {
  margin: 0;
  padding: 14px 0 22px;
  color: var(--muted-ink);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-style: italic;
}

.report-layout-board .report-transition p {
  font-weight: 500;
}

.report-layout-board .score-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.report-layout-board .score-row:last-child {
  border-bottom: none;
}

/* Preserve Dimension Scorecard card cells in board layout */
.report-layout-board .dimension-matrix {
  margin-top: 8px;
}

.report-layout-board .dimension-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(18, 32, 51, 0.06);
}

.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-list,
.ranked-list,
.statement-extremes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.ranked-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.statement-extremes li {
  display: grid;
  gap: 4px;
}

.rule-grid {
  display: grid;
  gap: 14px;
}

.rule-grid.compact {
  margin-bottom: 18px;
}

.rule-card {
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.rule-card h4 {
  margin: 10px 0;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.rule-card p {
  margin-bottom: 10px;
}

.rule-card p:last-child {
  margin-bottom: 0;
}

.rule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rule-meta span {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-table {
  display: grid;
  gap: 14px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: center;
}

.score-row small {
  display: block;
  color: var(--muted-ink);
}

.score-pill {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-weight: 850;
}

.score-bar {
  height: 10px;
  overflow: hidden;
  background: var(--soft);
  border-radius: 999px;
}

.score-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--accent);
  border-radius: inherit;
}

.executive-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.executive-result-grid article p {
  margin-top: 8px;
  color: var(--muted-ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.executive-observation {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d7e2eb;
}

.executive-observation span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.executive-observation p {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.organisational-implications p {
  max-width: 68ch;
}

.next-step p {
  max-width: none;
  width: 100%;
}

.next-step-closing {
  margin-top: 18px;
  color: var(--muted-ink);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.5;
}

.theme-label {
  margin-bottom: 10px;
}

.section-note,
.section-interpretation {
  margin: 14px 0 18px;
  color: var(--muted-ink);
}

.report-build-stamp {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dimension-matrix {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dimension-cell {
  --cell-tone: var(--accent);
  display: grid;
  gap: 4px;
  min-height: 108px;
  padding: 12px 12px 12px 14px;
  border: 1px solid color-mix(in srgb, var(--cell-tone) 35%, #fff);
  border-left: 5px solid var(--cell-tone);
  border-radius: 12px;
  background: color-mix(in srgb, var(--cell-tone) 12%, #fff);
  color: #111;
}

.dimension-cell-number {
  color: #111;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dimension-cell strong {
  color: #111;
  font-size: 0.92rem;
  line-height: 1.25;
}

.dimension-subtitle {
  margin: 0;
  color: #111;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.dimension-cell span:nth-of-type(2) {
  color: #111;
  font-weight: 850;
}

.dimension-cell small {
  color: #111;
  font-weight: 700;
}

.dimension-cell.tone-not-present {
  --cell-tone: #C62828;
}

.dimension-cell.tone-emerging {
  --cell-tone: #EF6C00;
}

.dimension-cell.tone-established {
  --cell-tone: #F9A825;
}

.dimension-cell.tone-embedded {
  --cell-tone: #1976D2;
}

.dimension-cell.tone-intelligent {
  --cell-tone: #2E7D32;
}

.score-row.tone-not-present .score-bar span { background: #C62828; }
.score-row.tone-emerging .score-bar span { background: #EF6C00; }
.score-row.tone-established .score-bar span { background: #F9A825; }
.score-row.tone-embedded .score-bar span { background: #1976D2; }
.score-row.tone-intelligent .score-bar span { background: #2E7D32; }

.score-row.tone-not-present .score-pill,
.score-row.tone-emerging .score-pill,
.score-row.tone-established .score-pill,
.score-row.tone-embedded .score-pill,
.score-row.tone-intelligent .score-pill {
  color: #111;
}

.site-footer {
  padding: 54px clamp(20px, 5vw, 72px) 30px;
  color: #dce6ef;
  background: var(--ink);
}

.site-footer p,
.site-footer a {
  color: #c4cfdb;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 0.7fr));
  gap: 28px;
}

.site-footer h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 1.05rem;
}

.site-footer a {
  display: block;
  text-decoration: none;
}

.copyright {
  width: min(1120px, calc(100% - 40px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .split,
  .statement-card,
  .summary-grid,
  .executive-result-grid,
  .report-grid,
  .score-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .dimension-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-layout-board .summary-grid article {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .report-layout-board .summary-grid article:last-child {
    border-bottom: none;
  }

  .rating-scale {
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .container,
  .narrow,
  .report-panel,
  .copyright {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    padding: 18px 14px;
  }

  h1 {
    font-size: clamp(2.5rem, 15vw, 3.6rem);
  }

  .form-actions,
  .button {
    width: 100%;
  }
}

@media print {
  .site-header,
  .hero,
  .intro-section,
  #assessment-stage,
  .assessment-form,
  .form-actions,
  .site-footer,
  .print-button,
  .new-assessment-button,
  .layout-toggle-button {
    display: none !important;
  }

  .section,
  .results-section {
    padding: 0;
  }

  .report-panel,
  .report-section,
  .summary-grid article {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .report-panel,
  .report-section,
  .summary-grid article,
  .report-transition,
  .rule-card,
  .dimension-cell,
  .score-pill,
  .score-bar,
  .score-bar span {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-layout-board {
    border: none;
    border-radius: 0;
    padding: 0;
  }

  .report-layout-board .report-section {
    break-inside: avoid;
  }

  body {
    background: #fff;
  }

  .report-section {
    border-color: #c6d2df !important;
    background: #fff !important;
  }

  .summary-grid article {
    border-color: #c6d2df !important;
    background: #f4f8fb !important;
  }

  .summary-grid span,
  .executive-observation span,
  .report-layout-board .report-section h3 {
    color: #0f466f !important;
  }

  .report-transition {
    color: #123a5a !important;
    background: #eaf3f9 !important;
    border-color: #bdd3e6 !important;
    border-left-color: #1b5f90 !important;
  }

  .rule-card {
    background: #f5f9fd !important;
    border-color: #c8d6e5 !important;
  }

  .score-pill {
    color: #123a5a !important;
  }

  .dimension-cell {
    background: #f8fbfe !important;
  }

  .score-bar {
    border: 1px solid #c5ced8;
    background: #eef2f6 !important;
  }

  .score-bar span {
    background: var(--accent) !important;
  }
}
