:root {
  --ink: #133b40;
  --ink-deep: #0b2d31;
  --gold: #d3ad66;
  --coral: #db7c63;
  --sage: #9eb4a5;
  --paper: #f5f4f0;
  --line: #d8ddd9;
  --muted: #637376;
  --white: #fffefb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
.site-header {
  position: relative;
  min-height: 154px;
  display: grid;
  grid-template-columns: 112px 1fr 160px;
  align-items: center;
  gap: 24px;
  padding: 20px clamp(24px, 6vw, 100px);
  color: #f8f6ed;
  background: var(--ink);
  overflow: hidden;
}
.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 150px;
  height: 14px;
  background: linear-gradient(90deg, var(--coral) 0 33%, var(--gold) 33% 66%, var(--sage) 66%);
}
.brand-mark {
  width: 92px;
  height: 92px;
  display: block;
  object-fit: contain;
}
.brand-copy { text-align: center; position: relative; z-index: 1; }
.brand-copy h1 {
  margin: 0;
  font: 400 clamp(1.65rem, 3vw, 2.55rem)/1.1 Georgia, serif;
  letter-spacing: .02em;
}
.brand-copy p {
  margin: 8px 0 0;
  color: #e6dfcf;
  font-size: .88rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.header-space { min-width: 0; }
.page-shell { max-width: 1030px; margin: 0 auto; padding: 68px 26px 92px; }
.article {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.article h2 {
  margin: 0 0 26px;
  font: 400 clamp(2rem, 4vw, 3.25rem)/1.15 Georgia, serif;
  color: var(--ink);
}
.article h3 {
  margin: 50px 0 12px;
  font: 400 clamp(1.45rem, 3vw, 2rem)/1.2 Georgia, serif;
}
.article p { max-width: 680px; margin: 0 auto 18px; color: #4d5f61; }
.rule { width: 74px; height: 2px; margin: 0 auto 25px; background: var(--gold); }
.access-box {
  margin: 54px auto 0;
  padding: 31px 28px 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.access-box p { margin-bottom: 22px; }
.button {
  display: inline-flex;
  min-width: 140px;
  justify-content: center;
  align-items: center;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--white);
  background: var(--ink);
  font-size: .78rem;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: .2s ease;
}
.button:hover { color: var(--ink); background: transparent; }
.button.secondary { color: var(--ink); background: transparent; }
.button.secondary:hover { color: var(--white); background: var(--ink); }
.site-footer { padding: 22px; color: #d9e2de; background: var(--ink-deep); text-align: center; font-size: .78rem; }

.generator-shell { max-width: 900px; margin: 0 auto; }
.generator-intro { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.generator-intro h2 { margin-bottom: 18px; }
.generator-intro p { font-size: .96rem; }
.form-card {
  padding: clamp(24px, 5vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(19, 59, 64, .06);
}
.progress { display: flex; gap: 5px; margin: 0 auto 36px; }
.progress span { height: 4px; flex: 1; background: #e4e8e4; }
.progress span.active { background: var(--gold); }
.step { display: none; }
.step.active { display: block; }
.step h3 { margin: 0 0 12px; font: 400 1.6rem Georgia, serif; }
.step-copy { margin: 0 0 24px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.field.full { grid-column: 1 / -1; }
label { display: block; color: var(--ink); font-size: .82rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfbf8;
  border: 1px solid #cdd6d2;
  border-radius: 2px;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(211, 173, 102, .48); border-color: var(--gold); }
.button-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.button-row .button { cursor: pointer; }
.question { padding: 22px 0; border-bottom: 1px solid #e4e8e4; }
.question:last-child { border-bottom: 0; }
.check-question { display: flex; align-items: flex-start; gap: 13px; margin: 0; padding: 19px 0; color: var(--ink); border-bottom: 1px solid #e4e8e4; cursor: pointer; font-weight: 600; }
.check-question:last-child { border-bottom: 0; }
.check-question input { width: 18px; height: 18px; flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer; }
.check-question span { display: block; }
.result { display: none; text-align: center; }
.result.active { display: block; }
.result .type-number { margin: 0 auto 12px; font: 400 4rem/1 Georgia, serif; color: var(--coral); }
.result h3 { margin-bottom: 12px; }
.result p { max-width: 600px; margin: 0 auto 18px; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.note { margin-top: 18px; color: var(--muted); font-size: .78rem; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

.report-page { background: var(--paper); }
.report-shell { max-width: 980px; margin: 0 auto; padding: 38px 26px 70px; }
.report-header { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 20px 0 26px; border-bottom: 1px solid var(--line); }
.report-brand { display: flex; align-items: center; gap: 18px; }
.report-brand img { width: 74px; height: 74px; object-fit: contain; }
.report-brand p { margin: 0 0 3px; color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.report-brand h1 { margin: 0; font: 400 clamp(1.45rem, 3vw, 2rem)/1.1 Georgia, serif; }
.report-brand small { color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.report-meta { color: var(--muted); font-size: .78rem; text-align: right; }
.report-intro { padding: 34px 0 26px; text-align: center; }
.report-intro h2 { margin: 0 0 10px; font: 400 clamp(1.8rem, 4vw, 2.6rem) Georgia, serif; }
.report-intro p { max-width: 660px; margin: 0 auto; color: var(--muted); }
.report-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; align-items: start; }
.report-card { padding: 25px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(19, 59, 64, .05); }
.report-card h3 { margin: 0 0 20px; font: 400 1.35rem Georgia, serif; }
.report-map-image { display: block; width: min(100%, 440px); height: auto; margin: 0 auto; }
.report-score { padding: 13px 0; border-bottom: 1px solid #e4e8e4; }
.report-score:last-child { border-bottom: 0; }
.report-score-line { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font-size: .84rem; }
.report-score-line span { flex: 1; color: var(--muted); text-align: right; }
.report-score-line b { min-width: 22px; color: var(--coral); text-align: right; }
.report-bar { height: 5px; margin-top: 8px; background: #e5e9e5; }
.report-bar i { display: block; height: 100%; background: var(--gold); }
.report-winner { margin-top: 22px; padding: 17px; color: var(--ink); background: #eef2ed; border-left: 3px solid var(--gold); }
.report-winner strong { display: block; margin-bottom: 4px; font: 400 1.1rem Georgia, serif; }
.report-identification { margin-top: 22px; }
.report-identification-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.report-identification h4 { margin: 0 0 7px; color: var(--ink); font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; }
.report-identification p { margin: 0; color: var(--muted); font: 400 .96rem/1.55 Georgia, serif; }
.verbs-title { margin-top: 28px !important; }
.report-verbs { display: flex; flex-wrap: wrap; gap: 9px; }
.report-verb { padding: 8px 12px; color: var(--ink); background: #eef2ed; border: 1px solid #d5dfda; font-size: .84rem; }
.report-verb b { color: var(--coral); }
.report-profile { margin-top: 22px; }
.report-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; }
.report-profile-item small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.report-profile-item span { color: var(--ink); font-size: .9rem; }
.report-note { margin: 24px 0 0; color: var(--muted); font-size: .78rem; }
.report-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.report-actions .button { cursor: pointer; }

@media print {
  .report-page { background: #fff; }
  .report-shell { max-width: none; padding: 0; }
  .report-card { box-shadow: none; }
  .report-actions { display: none; }
}

@media (max-width: 650px) {
  .site-header { grid-template-columns: 70px 1fr; min-height: 126px; padding: 18px 20px; gap: 14px; }
  .header-space { display: none; }
  .brand-mark { width: 65px; height: 65px; }
  .brand-copy { text-align: left; }
  .brand-copy p { font-size: .66rem; letter-spacing: .09em; }
  .page-shell { padding: 46px 17px 65px; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .button-row { flex-direction: column-reverse; }
  .button-row .button { width: 100%; }
  .report-shell { padding: 25px 17px 45px; }
  .report-header { align-items: flex-start; flex-direction: column; }
  .report-meta { text-align: left; }
  .report-layout { grid-template-columns: 1fr; }
  .report-identification-grid { grid-template-columns: 1fr; }
  .report-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Original-style identification step and printable A4 report */
.identification-page { max-width: none; color: #334155; }
.identification-page h3 { margin: 0; color: #1e293b; font: 700 1.55rem/1.25 Arial, Helvetica, sans-serif; text-align: center; }
.identification-page .rule { width: 100px; margin: 24px auto 27px; background: #999; }
.identification-page > p { color: #475569; font-size: 1rem; text-align: center; }
.identification-fields { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
.identification-page .field label { color: #475569; font-size: .95rem; font-weight: 400; }
.identification-page .field select { height: 50px; margin-top: 7px; padding: 8px 12px; color: #1d2939; background: #fff; border: 1px solid #d0d5dd; border-radius: 8px; font-size: .95rem; }
.required-mark { color: #b42318; font-weight: 700; }
.verb-instruction { margin: 34px auto 0; color: #475569; font-size: 1rem; text-align: center; }
.identification-page .button-row { margin-top: 32px; }

.report-page { min-width: 0; color: #111827; background: #fff; font-family: Arial, Helvetica, sans-serif; }
.report-sheet { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 0 9.5mm 8mm; overflow: hidden; background: #fff; }
.pdf-header { height: 22mm; margin: 0 -9.5mm; padding: 3.8mm 9.5mm; display: flex; align-items: center; justify-content: space-between; gap: 7mm; color: #f8fafc; background: #285d65; }
.pdf-brand { display: flex; min-width: 74mm; align-items: center; gap: 2.4mm; }
.pdf-brand-mark { width: 13mm; height: 13mm; color: #f8fafc; flex: 0 0 auto; }
.pdf-brand-name { font-size: 6.5mm; font-weight: 300; line-height: 1; white-space: nowrap; }
.pdf-brand-subtitle { margin-top: 1.2mm; font-size: 2.3mm; letter-spacing: .03em; white-space: nowrap; }
.pdf-heading { flex: 1; text-align: center; font-size: 6mm; font-weight: 300; letter-spacing: .03em; white-space: nowrap; }
.pdf-heading small { display: block; margin-top: 2mm; font-size: 2.7mm; letter-spacing: .28em; }
.pdf-person-data { height: 43mm; padding-top: 7mm; display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
.pdf-data-column { display: flex; flex-direction: column; gap: 1.4mm; }
.pdf-data-row { min-height: 7.8mm; display: grid; grid-template-columns: 32mm 1fr; gap: 1.1mm; align-items: stretch; }
.pdf-data-label, .pdf-data-value { display: flex; align-items: center; min-width: 0; padding: 1.2mm 2.2mm; border: .35mm solid #285d65; font-size: 3.4mm; line-height: 1.1; }
.pdf-data-label { color: #f8fafc; background: #285d65; border-radius: 2mm 0 0 2mm; letter-spacing: .02em; white-space: nowrap; }
.pdf-data-value { color: #111827; border-radius: 0 2mm 2mm 0; overflow: hidden; white-space: nowrap; }
.pdf-empty-label { color: transparent; border-color: transparent; background: transparent; }
.pdf-map-section { position: relative; height: 145mm; }
.pdf-media { position: absolute; top: 0; right: 18mm; width: 15mm; border: .35mm solid #285d65; text-align: center; }
.pdf-media span { display: block; padding: 1.4mm 1mm; color: #f8fafc; background: #285d65; font-size: 2.7mm; letter-spacing: .03em; }
.pdf-media strong { display: block; padding: 2.5mm 1mm; color: #111827; font-size: 4mm; font-weight: 400; }
.enneagram-map { display: block; width: 134mm; height: 125mm; margin: 9mm auto 0; overflow: visible; }
.map-outer, .map-lines line { fill: none; stroke: #111; stroke-width: 3.2; }
.map-type-number { fill: #111; font-family: Arial, Helvetica, sans-serif; font-size: 18px; }
.map-score-circle { fill: #fff; stroke: #285d65; stroke-width: 3; }
.map-score { fill: #111; font-family: Arial, Helvetica, sans-serif; font-size: 18px; }
.pdf-result-data { min-height: 48mm; padding-top: 3mm; }
.pdf-result-block { width: 100%; }
.pdf-verb-block { width: 87mm; }
.pdf-section-title { display: inline-block; margin-bottom: 1mm; padding: 1mm 2.2mm; color: #285d65; border: .35mm solid #285d65; border-radius: 2mm; font-size: 3.2mm; line-height: 1; }
.pdf-result-row { min-height: 7.2mm; display: grid; grid-template-columns: 14mm 1fr; gap: 1.2mm; margin-bottom: 1.2mm; }
.pdf-result-label, .pdf-result-value { display: flex; align-items: center; padding: 1.1mm 2.2mm; border: .35mm solid #285d65; font-size: 3.2mm; line-height: 1.15; }
.pdf-result-label { color: #f8fafc; background: #285d65; border-radius: 2mm; letter-spacing: .04em; }
.pdf-result-value { border-radius: 2mm; overflow: hidden; }
.pdf-phrase-block { margin-top: 2mm; }
.pdf-phrase-block .pdf-result-row { grid-template-columns: 14mm 1fr; }
.report-actions { width: 210mm; max-width: calc(100% - 32px); margin: 12px auto 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.report-actions .button { cursor: pointer; }
.email-note { flex-basis: 100%; margin: 0; color: #475569; font-size: .86rem; text-align: center; }

@page { size: A4 portrait; margin: 0; }
@media print {
  .report-page { width: 210mm; min-height: 297mm; }
  .report-sheet { margin: 0; }
  .screen-only { display: none !important; }
}

@media (max-width: 800px) {
  .report-sheet { width: 100%; min-height: 0; padding: 0 17px 30px; overflow: visible; }
  .pdf-header { height: auto; min-height: 125px; margin: 0 -17px; padding: 18px 17px; flex-direction: column; align-items: flex-start; }
  .pdf-heading { width: 100%; text-align: left; font-size: 1.35rem; white-space: normal; }
  .pdf-heading small { font-size: .65rem; letter-spacing: .12em; }
  .pdf-brand-name { font-size: 1.45rem; }
  .pdf-brand-subtitle { font-size: .65rem; }
  .pdf-person-data { height: auto; grid-template-columns: 1fr; gap: 6px; padding-top: 22px; }
  .pdf-data-row { grid-template-columns: 125px 1fr; min-height: 40px; }
  .pdf-data-label, .pdf-data-value { padding: 6px 8px; font-size: .83rem; }
  .pdf-map-section { height: 560px; }
  .enneagram-map { width: min(100%, 560px); height: auto; margin-top: 70px; }
  .pdf-media { right: 0; }
  .pdf-result-data { min-height: 0; }
  .report-actions { width: auto; max-width: calc(100% - 32px); }
}
