:root {
  color-scheme: light;
  --ink: #1f2328;
  --muted: #67707a;
  --line: #dfe3e7;
  --panel: #ffffff;
  --page: #f4f1eb;
  --a: #e98f96;
  --b: #8fcf9b;
  --c: #8fb9df;
  --d: #f2d26b;
  --axis: #d7dde3;
  --axis-dark: #7f8892;
  --accent: #2f5f7f;
  --soft: #faf8f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
a {
  font: inherit;
}

.app-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.intro-hero {
  display: grid;
  grid-template-columns: minmax(0, 780px);
  gap: 30px;
  align-content: center;
  min-height: min(520px, calc(100vh - 40px));
  padding: 42px 0 34px;
}

.intro-hero h1 {
  max-width: 760px;
  font-size: clamp(2.75rem, 5vw, 4.5rem);
}

.intro-lede {
  max-width: 620px;
  margin: 22px 0 0;
  color: #3f4851;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.55;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.intro-actions span {
  color: var(--muted);
  font-size: 0.94rem;
}

.intro-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.access-page {
  display: grid;
  align-content: center;
  min-height: min(520px, calc(100vh - 40px));
}

.access-page[hidden] {
  display: none;
}

.access-card {
  width: min(100%, 580px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid #ded7cd;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 55px rgba(62, 52, 42, 0.08);
}

.access-card h1 {
  max-width: 490px;
  margin: 8px 0 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.access-card > p:not(.eyebrow) {
  max-width: 440px;
  color: #3f4851;
  font-size: 1.06rem;
  line-height: 1.55;
}

.access-form {
  display: grid;
  gap: 12px;
  max-width: 300px;
  margin-top: 28px;
}

.access-form label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.access-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #b9b3aa;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0.08em;
}

.access-status {
  min-height: 1.4em;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.access-status[data-tone="error"] {
  color: #a33d3d;
}

.survey-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding-top: 16px;
}

.check-view {
  width: min(100%, 760px);
  margin: 0 auto;
  padding-top: 16px;
}

.check-shell {
  display: grid;
  gap: 24px;
  width: min(100%, 680px);
}

.calibration-list {
  display: grid;
  gap: 14px;
}

.calibration-item {
  padding: 24px;
  border: 1px solid #d8e1e7;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(62, 52, 42, 0.06);
}

.calibration-item p {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.35;
}

.calibration-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.calibration-option {
  position: relative;
}

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

.calibration-option span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #c6d4de;
  border-radius: 999px;
  color: #40505d;
  background: #fff;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
}

.calibration-option input:checked + span {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.calibration-option input:focus-visible + span {
  outline: 3px solid rgba(47, 95, 127, 0.28);
  outline-offset: 2px;
}

.survey-header {
  display: block;
}

.survey-header .header-note {
  max-width: 560px;
  margin: 12px 0 0;
}

.text-button {
  display: inline-flex;
  align-items: center;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 750;
  cursor: pointer;
}

.text-button::before {
  content: "<";
  margin-right: 8px;
  color: #8a7f72;
}

.text-button:hover {
  color: #1f4850;
}

.intro-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid #ded7cd;
  color: #5f6871;
  font-size: 0.94rem;
  font-weight: 700;
  list-style: none;
}

.intro-cues li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.intro-cues li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.survey-header {
  padding-top: 28px;
  border-top: 1px solid #ded7cd;
}

.app-header,
.report-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

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

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

h1 {
  margin-bottom: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: 0;
}

.header-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
}

.survey-form {
  display: grid;
  gap: 18px;
}


.person-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  background: #fbfaf7;
  border: 1px solid #e6e0d7;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgb(31 35 40 / 0.05);
}

.name-field {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid #e7eaee;
  border-radius: 8px;
}

.name-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.name-field em {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #235a7c;
  font-size: 0.67rem;
  font-style: normal;
  text-transform: uppercase;
}

.name-field input {
  width: 100%;
  height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  background: #fff;
}

.name-field input:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(125 92 52 / 0.16);
}

.name-field input:invalid:not(:placeholder-shown) {
  border-color: #bf6f55;
}

.name-field small {
  color: var(--muted);
  font-size: 0.78rem;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 760px;
  padding: 4px 2px;
  color: #56606a;
  font-size: 0.82rem;
  line-height: 1.45;
}

.consent-field input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.consent-field a,
.site-footer a {
  color: var(--accent);
}

.honeypot-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.question-card {
  display: grid;
  width: 100%;
  gap: 12px;
  padding: 26px;
  background: #fff;
  border: 1px solid rgb(255 255 255 / 0.9);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgb(31 35 40 / 0.07);
}


.question-title {
  margin: 0;
  max-width: 760px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}

.rank-guide {
  display: block;
  max-width: 640px;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

.rank-guide-bottom {
  margin-top: -2px;
}

.rank-list {
  display: grid;
  gap: 8px;
  width: min(100%, 640px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 13px 14px 13px 17px;
  border: 1px solid #b8cad6;
  border-radius: 10px;
  background: #eaf1f4;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.5) inset;
  user-select: none;
  touch-action: pan-y;
  cursor: grab;
  will-change: transform;
}

.rank-item:hover {
  border-color: #8ca5b8;
  background: #f4f8fa;
  box-shadow: 0 10px 22px rgb(68 55 38 / 0.08);
}

.rank-item.dragging {
  cursor: grabbing;
  background: #fff;
  box-shadow: 0 18px 40px rgb(31 35 40 / 0.22);
  transform: scale(1.015);
}

.rank-placeholder {
  border: 1px dashed #94a9ba;
  border-radius: 8px;
  background: rgb(47 95 127 / 0.08);
  list-style: none;
}

.is-ranking,
.is-ranking * {
  cursor: grabbing !important;
}

.rank-text {
  min-width: 0;
  line-height: 1.4;
  font-size: 1rem;
}

.rank-handle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #2f5f7f;
  font-size: 1.65rem;
  line-height: 1;
  touch-action: none;
}

.form-actions,
.screen-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 7px;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: #244e69;
}

.ghost-button {
  border: 1px solid #bcc3cc;
  background: #fff;
  color: #2e3338;
}

.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.email-status {
  min-height: 22px;
  margin: -4px auto 12px;
  width: min(8.5in, 100%);
  color: var(--muted);
  text-align: right;
}

.final-notice {
  margin: 0 auto 18px;
  padding: 14px 16px;
  border: 1px solid #cfe3d8;
  border-radius: 8px;
  background: #f5fbf7;
  color: #24473b;
  font-weight: 750;
  text-align: center;
}

.email-status[data-tone="error"] {
  color: #b64242;
  border-color: #ead0c8;
  background: #fff7f4;
}

.report-page,
.final-page {
  width: min(11in, 100%);
  min-height: 8.5in;
  margin: 0 auto;
  padding: 0.38in;
  background: #fff;
  border: 1px solid #e0ddd6;
  box-shadow: 0 18px 50px rgb(59 54 45 / 0.12);
}

.report-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ebe6de;
}

.report-header h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.1;
}

.report-meta {
  text-align: right;
  color: var(--muted);
}

.report-meta p {
  margin-bottom: 4px;
}

.report-body {
  display: grid;
  gap: 16px;
}

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

.chart-panel {
  border: 1px solid #e3ded5;
  border-radius: 8px;
  background: #fffdf8;
  padding: 12px;
  box-shadow: 0 8px 20px rgb(48 43 35 / 0.06);
}

.chart-panel h3 {
  margin-bottom: 10px;
  color: #565b60;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pie-axis,
.pie-abcd {
  width: 100%;
  aspect-ratio: 1;
}

.pie-axis svg,
.pie-abcd svg {
  display: block;
  width: 100%;
  height: 100%;
}

.bar-panel {
  min-height: 310px;
}

.bar-chart {
  height: 258px;
}

.bar-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.report-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #ebe6de;
  color: var(--muted);
  font-size: 0.78rem;
}

.axis-label {
  fill: #34383d;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.abcd-label {
  fill: #30343a;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.bar-label {
  fill: #4e555c;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.bar-tick {
  fill: #7b8289;
  font-size: 12px;
  font-weight: 650;
}

.bar-gridline {
  stroke: #e2e3e4;
  stroke-width: 1;
}

.bar-baseline {
  stroke: #5b6065;
  stroke-width: 1.4;
}

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

.selection-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.selection-shell > div {
  width: min(100%, 760px);
  margin-inline: auto;
}

.selection-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selection-summary {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.selection-summary h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.selection-summary p {
  margin-bottom: 0;
  color: var(--muted);
}

.email-to-field {
  display: grid;
  gap: 5px;
  margin-top: 2px;
}

.email-to-field span {
  color: #3d454d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-to-field input {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  background: #fff;
  font-size: 0.88rem;
}

.email-to-field input:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(47 95 127 / 0.16);
}

.selection-list {
  display: grid;
  gap: 30px;
  max-width: none;
  width: 100%;
  text-align: left;
}

.selection-card {
  padding-bottom: 26px;
  border-bottom: 1px solid #ded8cf;
  text-align: left;
}

.selection-card h2 {
  margin: 0 0 5px;
  color: #29343a;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 650;
}

.selection-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e1dbd2;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.72);
}

.selection-limit {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.selection-limit[data-limit-reached="true"] {
  color: #9d6b26;
}

.selection-lines {
  display: grid;
  gap: 8px;
}

.selection-line {
  position: relative;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 13px 52px 13px 15px;
  border: 1px solid #d9e0e4;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.selection-line::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 20px;
  height: 20px;
  border: 2px solid #b7c1cb;
  border-radius: 5px;
  transform: translateY(-50%);
}

.selection-line:hover {
  border-color: #8fa8b0;
}

.selection-line:focus-visible {
  outline: 3px solid rgb(47 95 103 / 0.16);
  outline-offset: 2px;
}

.selection-line.is-selected {
  border-color: #73bd91;
  background: #f4fbf6;
}

.selection-line.is-selected::after {
  border-color: #31be62;
  background: #31be62;
  box-shadow: inset 0 0 0 4px #31be62;
}

.selection-line.is-selected::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 21px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translateY(-65%) rotate(-45deg);
}

.final-document {
  display: grid;
  justify-content: center;
}

.final-summary {
  display: grid;
  gap: 22px;
}

.pdf-page {
  width: min(8.5in, 100%);
  min-height: 10.65in;
  padding: 0.4in 0.46in;
  background: #fffdf8;
  border: 1px solid #e5ded4;
  box-shadow: 0 22px 60px rgb(59 54 45 / 0.12);
  position: relative;
  overflow: hidden;
}

.pdf-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 8px 0 14px;
  border-top: 1px solid #ded7cd;
  border-bottom: 0;
}

.pdf-header h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 650;
  line-height: 0.98;
}

.pdf-subtitle {
  max-width: 440px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.style-marker {
  min-width: 124px;
  margin: 42px 0 0;
  padding: 12px 10px;
  border-top: 1px solid #d6cec2;
  border-bottom: 1px solid #d6cec2;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: right;
}

.pattern-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pattern-block {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-top: 6px solid;
  background: #f8f9fa;
}

.pattern-block strong {
  font-size: 1.4rem;
}

.pattern-block span {
  color: var(--muted);
  font-size: 0.82rem;
}

.report-intro {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #f7f3ea;
  border: 1px solid #eadfcd;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
}

.report-intro h3,
.report-intro p {
  margin-bottom: 0;
}

.final-charts {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.final-chart-panel {
  border: 1px solid #e3dacf;
  border-radius: 4px;
  background: #fffefa;
  padding: 12px;
  box-shadow: 0 8px 24px rgb(59 54 45 / 0.06);
}

.final-chart-panel h3 {
  margin-bottom: 6px;
  color: #56616b;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.final-bar-chart {
  height: 215px;
}

.final-bar-chart svg,
.final-chart-panel svg {
  display: block;
  width: 100%;
  height: 100%;
}

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

.final-pie-grid .final-chart-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 132px;
}

.final-pie-grid .final-chart-panel h3 {
  order: 2;
  margin: 8px 0 0;
  color: #2e383f;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
}

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

.final-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
  row-gap: 14px;
}

.summary-grid .final-section,
.final-section-grid .final-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.final-section h3 {
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8e1d7;
  color: #2e383f;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.18rem;
  font-weight: 650;
}

.final-section ul {
  margin: 0;
  padding-left: 18px;
}

.final-section li {
  margin-bottom: 5px;
}

.empty-summary {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 30px;
  padding: 18px 0 0;
  border-top: 1px solid #ded7cd;
  color: var(--muted);
  font-size: 0.78rem;
}

.policy-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.policy-shell h1 {
  max-width: 640px;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

.policy-lede {
  max-width: 650px;
  margin: 18px 0 38px;
  color: #4d5761;
  font-size: 1.12rem;
}

.policy-shell section {
  max-width: 680px;
  margin: 0 0 28px;
}

.policy-shell h2 {
  margin-bottom: 8px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.55rem;
  font-weight: 650;
}

.policy-shell section p {
  color: #4f5861;
}

@media (max-width: 850px) {
  .app-header,
  .report-header {
    display: grid;
  }

  .intro-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 18px;
  }

  .report-page {
    padding: 18px;
  }

  .pdf-page {
    padding: 22px;
  }

  .selection-shell {
    grid-template-columns: 1fr;
  }

  .person-fields {
    grid-template-columns: 1fr;
  }

  .calibration-item {
    padding: 20px;
  }

  .site-footer {
    display: grid;
  }

}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .survey-view,
  .report-view,
  .writing-view,
  .screen-actions,
  .email-status,
  .site-footer {
    display: none !important;
  }

  .final-view:not([hidden]) {
    display: block !important;
  }

  .report-view:not([hidden]) {
    display: block !important;
  }

  .report-view[hidden],
  .final-view[hidden] {
    display: none !important;
  }

  .report-view:not([hidden]) .report-page {
    width: 11in;
    min-height: 8.5in;
    border: 0;
    box-shadow: none;
    padding: 0.35in;
    page: chart;
  }

  .final-document {
    display: block;
  }

  .final-summary {
    display: block;
    gap: 0;
  }

  .pdf-page {
    width: 100%;
    min-height: 0;
    height: auto;
    border: 0;
    box-shadow: none;
    padding: 0.25in 0.34in;
    break-after: page;
    page-break-after: always;
  }

  .pdf-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .report-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .report-header h2 {
    font-size: 1.45rem;
  }

  .report-body {
    gap: 12px;
  }

  .bar-panel {
    min-height: 260px;
  }

  .bar-chart {
    height: 212px;
  }

  .pie-row {
    gap: 10px;
  }

  .chart-panel {
    padding: 8px;
  }

  .chart-panel h3 {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .report-footer {
    margin-top: 10px;
    padding-top: 7px;
    font-size: 0.68rem;
  }

  .pdf-header h2 {
    font-size: 1.72rem;
    line-height: 0.98;
  }

  .pdf-header {
    margin-bottom: 9px;
    padding: 4px 0 6px;
  }

  .pdf-subtitle {
    max-width: 4.65in;
    margin-top: 5px;
    font-size: 0.69rem;
    line-height: 1.2;
  }

  .style-marker {
    min-width: 0;
    margin-top: 18px;
    padding: 6px 4px;
    font-size: 1rem;
    letter-spacing: 0.08em;
  }

  .final-charts {
    gap: 6px;
    margin-bottom: 9px;
  }

  .final-chart-panel {
    padding: 5px;
    border-radius: 3px;
    box-shadow: none;
  }

  .final-chart-panel h3 {
    margin-bottom: 3px;
    font-size: 0.62rem;
  }

  .final-bar-chart {
    height: 136px;
  }

  .final-pie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .final-pie-grid .final-chart-panel {
    min-height: 86px;
  }

  .final-pie-grid .final-chart-panel h3 {
    margin-top: 3px;
    font-size: 0.56rem;
  }

  .report-intro {
    margin-bottom: 7px;
    padding: 7px 9px;
  }

  .final-section-grid {
    column-gap: 0.34in;
    row-gap: 0.1in;
  }

  .final-section h3 {
    margin-bottom: 4px;
    padding-bottom: 3px;
    font-size: 0.86rem;
  }

  .final-section li {
    margin-bottom: 2px;
    font-size: 0.66rem;
    line-height: 1.22;
  }

  .final-section li,
  .report-intro p {
    font-size: 0.66rem;
    line-height: 1.22;
  }

  .report-intro h3 {
    margin-bottom: 2px;
    font-size: 0.9rem;
  }

  @page {
    margin: 0;
  }

  @page chart {
    size: letter landscape;
    margin: 0;
  }

  @page profile {
    size: letter portrait;
    margin: 0;
  }
}
