:root {
    --ink: #283646;
    --muted: #5f7181;
    --line: #d1d2d4;
    --soft: #f4f8fb;
    --teal: #40c6ed;
    --teal-dark: #283646;
    --gold: #6cc7b4;
    --blue-mid: #6590b7;
    --danger: #a93232;
    --white: #fff;
    --shadow: 0 12px 30px rgba(40, 54, 70, .10);
    font-family: "Nexa", Aptos, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--soft); }
a { color: inherit; }
button, input, textarea { font: inherit; }
.content-width, .topbar-inner { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; width: 168px; max-width: 45vw; color: var(--ink); text-decoration: none; overflow: hidden; }
.brand img { display: block; width: 168px; max-width: 100%; height: auto; aspect-ratio: 3300 / 1531; object-fit: contain; }
.folio { color: var(--muted); font-size: 13px; font-weight: 600; }
.hero-band { background: var(--ink); color: var(--white); border-bottom: 5px solid var(--teal); }
.hero-content { min-height: 300px; padding-block: 50px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 64px; }
.eyebrow { display: block; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-band .eyebrow { color: var(--teal); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: 0; margin-bottom: 18px; }
.hero-content > div > p { max-width: 640px; color: #d1d2d4; font-size: 18px; margin-bottom: 0; }
.service-facts { margin: 0; border-left: 1px solid #6590b7; padding-left: 28px; display: grid; gap: 16px; }
.service-facts div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; }
.service-facts dt { color: #a9c8df; font-size: 12px; text-transform: uppercase; font-weight: 700; }
.service-facts dd { margin: 0; font-weight: 650; }
.survey-form { padding-block: 24px 64px; }
.form-section { background: var(--white); border: 1px solid var(--line); padding: 34px; margin-top: 24px; box-shadow: 0 4px 15px rgba(40,54,70,.05); border-radius: 6px; }
.section-heading { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.section-heading > span { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; background: var(--ink); color: white; border-radius: 4px; font-weight: 800; border-bottom: 4px solid var(--teal); }
.section-heading h2 { font-size: 22px; margin-bottom: 4px; }
.section-heading p { color: var(--muted); margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.span-2 { grid-column: span 2; }
.field { display: grid; gap: 7px; color: var(--ink); font-weight: 650; font-size: 13px; }
.field input, .field textarea { width: 100%; border: 1px solid #bdcbd0; background: white; color: var(--ink); padding: 12px 13px; border-radius: 4px; outline: none; font-weight: 400; transition: border .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(64,198,237,.20); }
.scale-key { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 24px; }
.scale-key span { background: var(--soft); border: 1px solid var(--line); padding: 5px 9px; color: var(--muted); font-size: 12px; border-radius: 3px; }
.scale-key b { color: var(--ink); }
.rating-group { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.rating-group h3 { font-size: 15px; color: var(--blue-mid); text-transform: uppercase; letter-spacing: .05em; }
.rating-row { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: 1fr 270px; gap: 24px; align-items: center; border-bottom: 1px solid #edf1f2; min-height: 66px; }
.rating-row legend { display: contents; font-size: 14px; }
.rating-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.rating-options label { cursor: pointer; }
.rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.rating-options span { display: grid; place-items: center; width: 42px; height: 38px; border: 1px solid #b9c8cc; border-radius: 4px; background: white; font-weight: 750; transition: .15s; }
.rating-options input:checked + span { background: var(--ink); border-color: var(--ink); color: white; box-shadow: 0 0 0 3px rgba(64,198,237,.22); }
.rating-options label:hover span { border-color: var(--teal); }
.confirmation { display: flex; align-items: flex-start; gap: 12px; background: #eef8fb; border: 1px solid #9bdff3; padding: 18px; margin-top: 22px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.confirmation input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--teal); margin-top: 2px; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.submit-row p { margin: 0; color: var(--muted); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 4px; border: 1px solid transparent; font-weight: 750; text-decoration: none; cursor: pointer; }
.button-primary { background: var(--ink); color: white; border-bottom-color: var(--teal); }
.button-primary:hover { background: var(--blue-mid); }
.button-secondary { background: white; color: var(--ink); border-color: #b9c8cc; }
.alert { padding: 16px 18px; border-radius: 4px; margin: 22px 0; font-size: 14px; }
.alert ul { margin-bottom: 0; }
.alert-error { border: 1px solid #e2b8b8; background: #fff2f2; color: #7f2525; }
.alert-success { border: 1px solid #a8d8c8; background: #edf8f3; color: #165d46; }
.site-footer { min-height: 70px; background: var(--ink); color: #a9bac1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-inline: max(20px, calc((100% - 1120px) / 2)); font-size: 12px; }
.setup-shell { width: min(900px, calc(100% - 40px)); margin: 44px auto 64px; }
.setup-intro { margin-bottom: 24px; }
.setup-intro h1, .login-panel h1, .success-panel h1 { font-size: 36px; margin: 5px 0 10px; }
.setup-intro p { color: var(--muted); max-width: 700px; }
.panel, .login-panel, .success-panel { background: white; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 6px; }
.form-panel { padding: 34px; }
.form-panel h2 { font-size: 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin: 28px 0 20px; }
.form-panel h2:first-of-type { margin-top: 0; }
.form-panel .button { margin-top: 24px; }
.login-shell, .success-shell { min-height: calc(100vh - 146px); display: grid; place-items: center; padding: 40px 20px; }
.login-panel, .success-panel { width: min(460px, 100%); padding: 38px; }
.login-panel > p, .success-panel > p { color: var(--muted); }
.login-panel .button { width: 100%; margin-top: 18px; }
.text-link { display: block; margin-top: 18px; color: var(--teal-dark); text-align: center; font-size: 13px; }
.success-panel { text-align: center; }
.success-icon { margin: 0 auto 24px; width: 64px; height: 64px; display: grid; place-items: center; background: var(--teal); color: white; border-radius: 50%; font-size: 30px; font-weight: 800; }
.reference { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; font-size: 13px; }
.admin-nav { display: flex; gap: 22px; font-size: 13px; font-weight: 650; }
.admin-nav a { text-decoration: none; }
.dashboard { padding-block: 44px 70px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.dashboard-header h1 { font-size: 36px; margin: 5px 0; }
.dashboard-header p, .section-title p { color: var(--muted); margin-bottom: 0; }
.action-row { display: flex; gap: 10px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0; }
.metric { background: white; border: 1px solid var(--line); border-top: 3px solid var(--teal); padding: 20px; border-radius: 4px; }
.metric > span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.metric strong { display: block; font-size: 31px; margin: 8px 0 2px; }
.metric strong small { color: var(--muted); font-size: 14px; }
.metric p { color: var(--muted); font-size: 12px; margin: 0; }
.progress { height: 5px; background: var(--line); margin: 12px 0 7px; overflow: hidden; }
.progress i, .score-bar i { display: block; height: 100%; background: var(--blue-mid); }
.dashboard-section { background: white; border: 1px solid var(--line); padding: 26px; margin-top: 20px; border-radius: 5px; }
.section-title h2 { margin-bottom: 2px; font-size: 20px; }
.results-table-wrap { overflow-x: auto; margin-top: 20px; }
.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table th { color: var(--muted); text-align: left; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; border-bottom: 2px solid var(--line); padding: 10px; }
.results-table td { border-bottom: 1px solid #edf1f2; padding: 12px 10px; }
.results-table td:nth-child(2) { display: flex; align-items: center; gap: 10px; }
.participants td:nth-child(2) { display: table-cell; }
.score-bar { width: 130px; height: 7px; background: var(--line); }
.empty { text-align: center; color: var(--muted); padding: 30px !important; }
.icon-button { width: 30px; height: 30px; border: 0; background: #fff0f0; color: var(--danger); border-radius: 3px; cursor: pointer; font-size: 20px; }
.report-toolbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; gap: 10px; padding: 12px; background: rgba(40,54,70,.97); }
.report-sheet { width: 210mm; min-height: 297mm; margin: 28px auto; padding: 18mm; background: white; box-shadow: var(--shadow); }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--teal); padding-bottom: 18px; }
.report-header .brand { width: 150px; }
.report-header .brand img { width: 150px; }
.report-meta { display: grid; text-align: right; gap: 3px; color: var(--muted); font-size: 10px; }
.report-meta strong { color: var(--ink); font-size: 12px; }
.report-title { padding: 26px 0 18px; }
.report-title span { color: var(--teal); font-size: 11px; text-transform: uppercase; font-weight: 800; }
.report-title h1 { font-size: 29px; margin: 6px 0 0; }
.report-facts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.report-facts div { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.report-facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.report-facts span, .report-facts strong { display: block; }
.report-facts span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.report-facts strong { font-size: 11px; margin-top: 2px; }
.report-section { margin-top: 24px; break-inside: avoid; }
.report-section h2 { font-size: 15px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.report-section p { font-size: 11px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.report-metrics div { background: var(--soft); padding: 10px; border-top: 2px solid var(--blue-mid); }
.report-metrics strong, .report-metrics span { display: block; }
.report-metrics strong { font-size: 22px; }
.report-metrics span { font-size: 9px; color: var(--muted); }
.executive-copy { margin-top: 13px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.report-table th, .report-table td { padding: 5px 7px; border-bottom: 1px solid var(--line); text-align: left; }
.report-table th { background: var(--ink); color: white; }
.group-row td { background: #eaf5fa; color: var(--ink); font-weight: 800; text-transform: uppercase; font-size: 9px; }
.comment-list { display: grid; gap: 8px; }
.comment-list blockquote { margin: 0; border-left: 3px solid var(--gold); background: var(--soft); padding: 9px 12px; break-inside: avoid; }
.comment-list p { margin-bottom: 3px; }
.comment-list cite { color: var(--muted); font-size: 9px; font-style: normal; }
.muted { color: var(--muted); }
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 34px; text-align: center; }
.signatures div > span { display: block; border-top: 1px solid var(--ink); }
.signatures strong, .signatures small { display: block; font-size: 10px; }
.signatures small { color: var(--muted); }
.report-footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 24px; color: var(--muted); font-size: 9px; }
@media (max-width: 800px) {
    .content-width, .topbar-inner { width: min(100% - 24px, 1120px); }
    .hero-content { grid-template-columns: 1fr; gap: 28px; padding-block: 36px; }
    .service-facts { border-left: 0; border-top: 1px solid #6590b7; padding: 20px 0 0; }
    .form-section { padding: 22px 16px; }
    .form-grid, .metrics-grid { grid-template-columns: 1fr 1fr; }
    .rating-row { grid-template-columns: 1fr; gap: 8px; padding-block: 13px; }
    .rating-options { width: 100%; }
    .rating-options span { width: 100%; }
    .dashboard-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
    .folio { display: none; }
    h1 { font-size: 32px; }
    .form-grid, .metrics-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .scale-key { display: grid; grid-template-columns: 1fr 1fr; }
    .section-heading { gap: 12px; }
    .submit-row, .action-row { align-items: stretch; flex-direction: column; }
    .submit-row .button, .action-row .button { width: 100%; }
    .admin-nav a:first-child { display: none; }
}
@media print {
    @page { size: A4; margin: 10mm; }
    body { background: white; }
    .report-toolbar, body > .site-footer { display: none !important; }
    .report-sheet { width: auto; min-height: auto; margin: 0; padding: 0; box-shadow: none; }
}
