:root {
  --navy-950: #071522;
  --navy-900: #0b2238;
  --navy-800: #123754;
  --navy-700: #1b4e70;
  --gold-600: #ae7a21;
  --gold-500: #c99943;
  --gold-300: #e6c987;
  --cream: #f7f3ea;
  --paper: #fffdfa;
  --ink: #18242e;
  --muted: #64727e;
  --line: #dde3e7;
  --success: #2d7b62;
  --warning: #b46c29;
  --danger: #ae4a49;
  --shadow: 0 18px 54px rgba(8, 31, 49, .12);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(201,153,67,.13), transparent 28rem),
    linear-gradient(180deg, #f9f7f1 0, #f3f6f7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.skip-link { position: fixed; left: 1rem; top: -5rem; background: #fff; color: var(--navy-900); padding: .75rem 1rem; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.site-header, .site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; gap: .75rem; align-items: center; color: inherit; text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { letter-spacing: .16em; font-size: .95rem; color: var(--navy-900); }
.brand small { font-size: .68rem; color: var(--muted); margin-top: .18rem; }
.brand-mark { width: 50px; height: 42px; display: inline-grid; place-items: center; flex: none; }
.brand-mark img { width: 50px; height: 42px; object-fit: contain; }
.privacy-badge { display: inline-flex; gap: .45rem; align-items: center; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--success); }
.privacy-badge span { font-size: .55rem; }

.app-shell { max-width: 1180px; min-height: calc(100vh - 150px); margin: 0 auto; padding: 2rem; }
.view { animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; min-height: 690px; padding: 3rem 0 6rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--gold-600); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2 { color: var(--navy-950); line-height: 1.12; }
.hero h1 { max-width: 680px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 5.4vw, 5.3rem); font-weight: 500; letter-spacing: -.045em; margin-bottom: 1.5rem; }
.lead { color: var(--muted); font-size: clamp(1.04rem, 1.4vw, 1.22rem); max-width: 680px; }
.lead.compact { max-width: 740px; }
.feature-row { display: flex; gap: 2.4rem; margin-top: 3rem; }
.feature-row div { display: flex; flex-direction: column; border-left: 2px solid var(--gold-300); padding-left: .85rem; }
.feature-row strong { color: var(--navy-900); font-size: 1.55rem; line-height: 1; }
.feature-row span { color: var(--muted); font-size: .78rem; margin-top: .3rem; }

.card { background: rgba(255,253,250,.92); border: 1px solid rgba(11,34,56,.09); border-radius: var(--radius); box-shadow: var(--shadow); }
.start-card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.field { margin-bottom: 1.2rem; }
.field-grid { display: grid; grid-template-columns: .76fr 1.24fr; gap: 1rem; }
label { display: block; font-size: .84rem; font-weight: 750; color: var(--navy-900); margin-bottom: .42rem; }
label span { font-weight: 500; color: var(--muted); }
input[type="text"], input[type="date"], textarea {
  width: 100%; border: 1px solid #cbd4da; border-radius: 11px; background: #fff;
  padding: .86rem .95rem; color: var(--ink); outline: none; transition: border .18s, box-shadow .18s;
}
input:focus, textarea:focus { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(27,78,112,.12); }
.consent-box { margin: 1.3rem 0; padding: 1rem; border-radius: 12px; background: #f1f5f5; }
.consent-box label { display: flex; gap: .7rem; align-items: flex-start; margin: 0; color: #4d5e69; font-weight: 550; }
.consent-box input { margin-top: .23rem; accent-color: var(--navy-800); }
.local-note { margin: .9rem 0 0; color: var(--muted); text-align: center; font-size: .72rem; }

.button {
  appearance: none; border: 0; border-radius: 10px; padding: .84rem 1.15rem;
  font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(201,153,67,.45); outline-offset: 2px; }
.button.primary { color: white; background: var(--navy-900); box-shadow: 0 8px 20px rgba(11,34,56,.18); }
.button.primary:hover { background: var(--navy-800); }
.button.secondary { color: var(--navy-900); background: #fff; border: 1px solid #cdd6dc; }
.button.ghost { color: var(--muted); background: transparent; }
.button.full { width: 100%; }
.button.small { padding: .65rem .88rem; font-size: .82rem; }

.progress-wrap { position: sticky; top: .5rem; z-index: 5; background: rgba(249,247,241,.92); backdrop-filter: blur(10px); padding: 1rem 0; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-bottom: .5rem; }
.progress-track { height: 7px; border-radius: 99px; background: #dce3e7; overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-500), var(--navy-700)); transition: width .35s ease; }
.section-heading { margin: 3rem 0 2rem; }
.section-heading h1 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.03em; font-size: clamp(2.3rem, 4vw, 4rem); margin-bottom: 1rem; }
.scale-legend { display: flex; justify-content: space-between; gap: 1rem; background: var(--navy-950); color: rgba(255,255,255,.76); padding: .8rem 1rem; border-radius: 11px; font-size: .73rem; margin-bottom: 1rem; }
.scale-legend strong { color: var(--gold-300); margin-right: .2rem; }
.questions-list { display: grid; gap: 1rem; }
.question-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; box-shadow: 0 6px 24px rgba(10,35,53,.055); }
.question-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.question-card legend { display: block; width: 100%; font-weight: 700; color: var(--navy-900); font-size: 1.02rem; margin-bottom: 1rem; }
.question-number { color: var(--gold-600); margin-right: .45rem; }
.score-options { display: grid; grid-template-columns: repeat(11, 1fr); gap: .42rem; }
.score-options input { position: absolute; opacity: 0; pointer-events: none; }
.score-options label {
  display: grid; place-items: center; min-height: 39px; margin: 0; border: 1px solid #d5dde2; border-radius: 9px;
  color: var(--muted); background: #fff; font-size: .8rem; transition: .15s;
}
.score-options label:hover { border-color: var(--gold-500); color: var(--navy-900); }
.score-options input:focus-visible + label { outline: 3px solid rgba(201,153,67,.4); outline-offset: 1px; }
.score-options input:checked + label { color: #fff; background: var(--navy-800); border-color: var(--navy-800); box-shadow: 0 5px 12px rgba(18,55,84,.2); }
.actions { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0 4rem; }
.notice { border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0; font-size: .85rem; }
.notice.error { color: #842e2e; background: #fff0ef; border: 1px solid #efc6c2; }

.summary-strip { background: var(--navy-950); color: #fff; padding: 1rem 1.25rem; border-radius: 13px; display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.summary-strip span { color: rgba(255,255,255,.68); }
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.review-card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 1.25rem; }
.review-card header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.review-card h2 { font-size: 1.06rem; margin: 0; }
.review-card button { color: var(--navy-700); background: transparent; border: 0; font-weight: 750; font-size: .78rem; }
.review-card ol { margin: 0; padding-left: 1.35rem; color: var(--muted); font-size: .81rem; }
.review-card li { padding: .24rem 0; }
.review-card li strong { color: var(--navy-900); float: right; margin-left: 1rem; }

.report-toolbar { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.report-document { background: var(--paper); border-radius: 4px; box-shadow: var(--shadow); padding: clamp(1.5rem, 5vw, 4rem); }
.report-header { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 1.5rem; border-bottom: 2px solid var(--navy-900); }
.report-brand { display: flex; align-items: center; gap: .7rem; }
.report-brand > div { display: flex; flex-direction: column; }
.report-brand strong { letter-spacing: .14em; color: var(--navy-900); }
.report-brand span:not(.brand-mark) { font-size: .65rem; color: var(--muted); }
.report-title-block { text-align: right; }
.report-title-block p { text-transform: uppercase; letter-spacing: .12em; color: var(--gold-600); font-weight: 800; font-size: .67rem; margin-bottom: .4rem; }
.report-title-block h1 { font-family: Georgia, serif; font-weight: 500; margin: 0; font-size: 1.7rem; }
.report-identity { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.identity-item span { display: block; color: var(--muted); text-transform: uppercase; font-size: .62rem; font-weight: 800; letter-spacing: .09em; }
.identity-item strong { color: var(--navy-900); font-size: .9rem; }
.identity-item.full { grid-column: 1 / -1; }
.report-overview { display: grid; grid-template-columns: .78fr 1.22fr; gap: 1.5rem; margin: 2rem 0; }
.score-panel, .radar-panel { border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; }
.score-panel { background: #f7f4ec; }
.score-panel h2 { font-size: 1.2rem; margin-bottom: .55rem; }
.score-panel > p:last-child { color: var(--muted); font-size: .82rem; }
.score-ring {
  --score-angle: 0deg; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--navy-800) var(--score-angle), #dfe5e5 0); margin: 1rem 0 1.1rem; position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 10px; border-radius: inherit; background: #f7f4ec; }
.score-ring strong { position: relative; z-index: 1; font-family: Georgia, serif; color: var(--navy-900); font-size: 2rem; }
.score-ring small { font-family: Inter, sans-serif; color: var(--muted); font-size: .66rem; }
.radar-panel h2 { font-size: 1rem; margin-bottom: .5rem; }
.radar-chart { min-height: 300px; display: grid; place-items: center; }
.radar-chart svg { width: 100%; max-width: 480px; height: auto; overflow: visible; }
.report-section { margin-top: 2.2rem; }
.report-section h2 { font-family: Georgia, serif; font-weight: 500; font-size: 1.55rem; margin-bottom: .5rem; }
.section-title-row { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.legend-pills { display: flex; flex-wrap: wrap; justify-content: end; gap: .35rem; }
.legend-pills span { padding: .25rem .45rem; border-radius: 99px; font-size: .58rem; font-weight: 800; }
.critical { color: #943e3d; background: #f9e4e2; }
.attention { color: #91551e; background: #f9ead8; }
.developing { color: #315b78; background: #e1edf4; }
.strength { color: #286b56; background: #ddf0e9; }
.dimension-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.result-row { border: 1px solid var(--line); border-left: 4px solid var(--status-color); border-radius: 10px; padding: .9rem 1rem; }
.result-row header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.result-row h3 { margin: 0; color: var(--navy-900); font-size: .9rem; }
.result-row .value { color: var(--status-color); font-weight: 850; font-size: 1.05rem; }
.result-row .result-label { display: inline-block; margin: .25rem 0 .35rem; color: var(--status-color); font-size: .64rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.result-row p { margin: 0; color: var(--muted); font-size: .73rem; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.insight-card { border-radius: 14px; padding: 1.3rem; }
.insight-card h2 { font-family: Inter, sans-serif; font-size: 1rem; }
.insight-card p, .insight-card li { color: #52616c; font-size: .8rem; }
.insight-card ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.strength-card { background: #edf7f3; border: 1px solid #cce6dc; }
.priority-card { background: #fff5e9; border: 1px solid #efddc5; }
.plan-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: 1.4rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.plan-section p { color: var(--muted); font-size: .8rem; }
.plan-section textarea { resize: vertical; min-height: 170px; background: #fff; }
.report-footer { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); }
.report-footer p { margin: 0; max-width: 65%; font-size: .62rem; }
.report-footer p:last-child { text-align: right; max-width: 35%; }
.site-footer { color: var(--muted); font-size: .68rem; border-top: 1px solid rgba(11,34,56,.08); }
.report-next { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 1.25rem 0 2rem; padding: 1.5rem; color: #fff; background: var(--navy-900); border-radius: 16px; }
.report-next h2 { color: #fff; font-size: 1.3rem; margin: 0 0 .45rem; }
.report-next p { color: #dce6ec; max-width: 42rem; margin: 0; }
.report-next .button { background: var(--gold-500); color: var(--navy-950); text-decoration: none; white-space: nowrap; }

@media (max-width: 780px) {
  .site-header, .site-footer, .app-shell { padding-left: 1rem; padding-right: 1rem; }
  .privacy-badge { font-size: .62rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .feature-row { gap: 1rem; justify-content: space-between; }
  .field-grid, .review-grid, .report-overview, .dimension-results, .two-column, .plan-section { grid-template-columns: 1fr; }
  .scale-legend { font-size: .62rem; }
  .score-options { gap: .22rem; }
  .score-options { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
  .score-options label { min-height: 44px; border-radius: 7px; font-size: .9rem; }
  .report-next { flex-direction: column; align-items: flex-start; }
  .report-next .button { white-space: normal; }
  .summary-strip { flex-direction: column; }
  .report-toolbar { align-items: flex-start; }
  .report-toolbar > div { display: flex; flex-direction: column; gap: .4rem; }
  .report-header { align-items: flex-start; gap: 1rem; }
  .report-title-block h1 { font-size: 1.25rem; }
  .report-identity { grid-template-columns: 1fr 1fr; }
  .section-title-row, .report-footer { align-items: flex-start; flex-direction: column; }
  .legend-pills { justify-content: start; }
  .report-footer p, .report-footer p:last-child { max-width: 100%; text-align: left; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .site-header, .site-footer { display: none !important; }
  .app-shell { max-width: none; padding: 0; min-height: 0; }
  .view:not(#report-view), #report-view.hidden { display: none !important; }
  #report-view { display: block !important; }
  .report-document { box-shadow: none; padding: 0; }
  .report-header { padding-bottom: 8mm; }
  .report-overview { grid-template-columns: .72fr 1.28fr; gap: 6mm; margin: 7mm 0; }
  .score-panel, .radar-panel { padding: 5mm; break-inside: avoid; }
  .score-ring { width: 27mm; height: 27mm; }
  .radar-chart { min-height: 64mm; }
  .radar-chart svg { max-height: 68mm; }
  .report-section { margin-top: 7mm; }
  .dimension-results { grid-template-columns: 1fr 1fr; }
  .result-row, .insight-card { break-inside: avoid; }
  .two-column { grid-template-columns: 1fr 1fr; }
  .plan-section { grid-template-columns: .75fr 1.25fr; break-inside: avoid; }
  textarea { border: 1px solid #aaa; min-height: 38mm !important; overflow: hidden; }
  .report-footer { break-inside: avoid; }
}
