:root {
  --ink: #2b4052;
  --ink-2: #344a5c;
  --teal: #456779;
  --teal-bright: #7f9faf;
  --gold: #9caeb9;
  --paper: #ffffff;
  --canvas: #f0f4f7;
  --muted: #586d7c;
  --line: #dde5eb;
  --danger: #a43b38;
  --success: #1f7a55;
  --shadow: 0 20px 60px rgba(16, 34, 56, 0.10);
  font-family: Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); line-height: 1.7; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }
.ltr { direction: ltr; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.nav { width: min(1180px, calc(100% - 32px)); min-height: 74px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--ink); color: white; display: grid; place-items: center; font-size: 1.35rem; box-shadow: inset 0 -4px 0 var(--teal-bright); }
.brand-copy { line-height: 1.25; }
.brand-copy small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { text-decoration: none; padding: 10px 14px; border-radius: 10px; font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.nav-links a:hover, .nav-links a:focus-visible { background: #eaf0f5; outline: none; }
.nav-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 10px; padding: 9px 12px; cursor: pointer; }

.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.hero { position: relative; overflow: hidden; padding: 70px 0 54px; background: linear-gradient(135deg, #344a5c, #4d687b); color: white; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 18% 12%, rgba(169,190,203,.18), transparent 35%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 800; font-size: .88rem; letter-spacing: .02em; }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); }
.hero h1 { margin: 16px 0; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: 1.12; letter-spacing: -.035em; max-width: 780px; }
.hero h1 span, .hero .eyebrow { color: #d0e1eb; }
.hero p { margin: 0; max-width: 680px; color: #d9e5eb; font-size: 1.08rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { border: 0; border-radius: 12px; padding: 13px 20px; min-height: 48px; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--teal); color: white; box-shadow: 0 8px 20px rgba(69,103,121,.15); }
.hero .button-primary { background: #dce8ef; color: #2b4052; }
.button-dark { background: var(--ink); color: white; }
.button-light { background: white; color: var(--ink); }
.button-outline { background: transparent; color: inherit; border: 1px solid currentColor; }
.button-danger { background: #fff0ef; color: var(--danger); border: 1px solid #f0cac7; }
.button-small { min-height: 38px; padding: 8px 12px; font-size: .84rem; border-radius: 9px; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.hero-panel { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 24px; padding: 28px; backdrop-filter: blur(12px); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
.hero-panel h2 { margin: 0 0 8px; font-size: 1.25rem; }
.hero-panel p { font-size: .9rem; margin-bottom: 18px; }
.code-inline { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.code-inline input { direction: ltr; text-align: center; letter-spacing: .1em; text-transform: uppercase; }

.section { padding: 72px 0; }
.section-tight { padding: 42px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.25; }
.section-heading p { margin: 0; color: var(--muted); max-width: 620px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 8px 30px rgba(16,34,56,.05); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; }
.metric { border-top: 4px solid var(--teal); }
.metric strong { display: block; font-size: 2rem; color: var(--ink); margin-bottom: 4px; }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #e6eef4; color: var(--teal); font-weight: 900; margin-bottom: 18px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { position: relative; padding: 22px 18px 18px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; color: var(--teal); font-weight: 900; font-size: 1.4rem; margin-bottom: 10px; }

.form-shell { width: min(760px, calc(100% - 32px)); margin: 48px auto; }
.form-card { background: white; border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 5vw, 46px); box-shadow: var(--shadow); }
.form-card h1, .form-card h2 { margin-top: 0; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-weight: 800; font-size: .92rem; }
.field small { color: var(--muted); }
.input, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"], textarea, select {
  width: 100%; border: 1px solid #cbd8dc; border-radius: 11px; background: white; color: var(--ink); padding: 12px 13px; min-height: 48px; outline: none;
}
textarea { min-height: 108px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,125,117,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notice { border-radius: 12px; padding: 13px 15px; margin: 14px 0; background: #edf6f6; border: 1px solid #c9e3e0; color: #195d58; }
.notice-error { background: #fff0ef; border-color: #f0cac7; color: var(--danger); }
.notice-success { background: #eef9f3; border-color: #c9ead8; color: var(--success); }

.assessment-layout { min-height: 100vh; }
.assessment-top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.assessment-top-inner { width: min(1180px, calc(100% - 24px)); margin: auto; min-height: 78px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.progress-track { height: 9px; border-radius: 999px; background: #e3ebed; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); transition: width .25s ease; }
.assessment-main { width: min(980px, calc(100% - 28px)); margin: 36px auto 80px; }
.assessment-meta { display: grid; grid-template-columns: 1fr 1fr 180px; gap: 14px; margin-bottom: 26px; }
.axis-kicker { color: var(--teal); font-weight: 900; }
.axis-title { font-size: clamp(1.65rem, 4vw, 2.5rem); margin: 8px 0 4px; line-height: 1.25; }
.question-list { display: grid; gap: 14px; margin-top: 24px; }
.question { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 20px; transition: border .2s, box-shadow .2s; }
.question.answered { border-color: #a9bdca; box-shadow: 0 5px 20px rgba(69,103,121,.06); }
.question-head { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; }
.question-number { width: 38px; height: 38px; display: grid; place-items: center; background: #eef4f5; color: var(--teal); border-radius: 10px; font-weight: 900; }
.question h3 { margin: 0 0 4px; font-size: 1rem; }
.question p { color: var(--muted); margin: 0; font-size: .9rem; }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 18px; }
.rating button { border: 1px solid #d4dfe2; background: #f9fbfb; color: var(--ink-2); border-radius: 10px; padding: 9px 6px; min-height: 46px; cursor: pointer; font-weight: 800; }
.rating button:hover, .rating button:focus-visible { border-color: var(--teal); outline: none; }
.rating button.selected { background: var(--teal); border-color: var(--teal); color: white; box-shadow: 0 6px 14px rgba(69,103,121,.14); }
.rating-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: 7px; }
.assessment-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.save-status { color: var(--muted); font-size: .85rem; }
.confirm-box { display: flex; align-items: start; gap: 10px; padding: 14px; background: #fff9e9; border: 1px solid #ead6a9; border-radius: 12px; margin-top: 18px; }

.report-bg { background: #e9eff1; padding: 34px 0 70px; }
.report-toolbar { width: min(210mm, calc(100% - 28px)); margin: 0 auto 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.report-sheet { width: min(210mm, calc(100% - 28px)); min-height: 297mm; margin: 0 auto 22px; padding: 16mm 15mm 14mm; background: white; box-shadow: 0 18px 45px rgba(16,34,56,.12); position: relative; overflow: hidden; }
.report-sheet::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 8px; background: linear-gradient(90deg, var(--gold), var(--teal), var(--ink)); }
.report-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.report-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.report-page-title { font-size: .82rem; color: var(--muted); }
.report-title-block { padding: 38px 0 26px; }
.report-title-block h1 { margin: 0 0 10px; font-size: 2.25rem; line-height: 1.25; }
.report-title-block p { color: var(--muted); margin: 0; }
.score-hero { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: center; background: var(--ink); color: white; padding: 30px; border-radius: 18px; }
.score-ring { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--teal-bright) var(--score-angle, 0deg), rgba(255,255,255,.14) 0); }
.score-ring::after { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--ink); }
.score-value { position: relative; z-index: 1; text-align: center; font-size: 2.3rem; font-weight: 900; line-height: 1; }
.score-value small { display: block; font-size: .72rem; color: #b8cbd5; margin-top: 9px; }
.score-copy h2 { font-size: 2rem; margin: 0 0 8px; color: #78dbd1; }
.score-copy p { margin: 0; color: #d7e3e8; }
.meta-table { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.meta-item { padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.meta-item span { display: block; color: var(--muted); font-size: .78rem; }
.meta-item strong { display: block; margin-top: 3px; }
.report-section-title { margin: 22px 0 14px; font-size: 1.25rem; padding-right: 12px; border-right: 4px solid var(--teal); }
.domain-bars, .axis-bars { display: grid; gap: 15px; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 64px; gap: 12px; align-items: center; }
.bar-track { height: 11px; border-radius: 99px; background: #e6edef; overflow: hidden; }
.bar-value { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); }
.bar-score { font-weight: 900; text-align: left; }
.report-callout { padding: 18px; border-radius: 14px; background: #edf7f6; border: 1px solid #c9e4e1; margin-top: 20px; }
.findings { display: grid; gap: 12px; }
.finding { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; align-items: start; }
.finding-score { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--teal); font-weight: 900; }
.finding.opportunity .finding-score { background: var(--danger); }
.finding h3 { margin: 0; font-size: .92rem; }
.finding p { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.finding small { color: var(--muted); }
.advisory { white-space: pre-wrap; padding: 19px; border: 1px solid var(--line); border-radius: 13px; min-height: 110px; color: var(--ink-2); }
.empty-state { color: var(--muted); border: 1px dashed #bccace; padding: 24px; text-align: center; border-radius: 12px; }
.report-footer { position: absolute; bottom: 9mm; right: 15mm; left: 15mm; display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; border-top: 1px solid var(--line); padding-top: 8px; }
.pdf-rendering .report-sheet { width: 210mm; min-height: 297mm; padding: 16mm 15mm 14mm; margin: 0; box-shadow: none; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 245px 1fr; }
.admin-sidebar { background: var(--ink); color: white; padding: 28px 20px; }
.admin-sidebar .brand { color: white; }
.admin-sidebar nav { display: grid; gap: 7px; margin-top: 34px; }
.admin-sidebar button { text-align: right; border: 0; background: transparent; color: #c9d8df; padding: 11px 13px; border-radius: 10px; cursor: pointer; }
.admin-sidebar button.active, .admin-sidebar button:hover { background: rgba(255,255,255,.1); color: white; }
.admin-main { padding: 34px; overflow-x: hidden; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
.stat strong { display: block; font-size: 2rem; }
.table-wrap { margin-top: 20px; overflow: auto; background: white; border: 1px solid var(--line); border-radius: 15px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .88rem; }
th { background: #eff5f6; font-size: .78rem; color: var(--muted); }
.status { display: inline-flex; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 800; background: #edf2f3; }
.status.pending { background: #fff4d8; color: #8b641f; }
.status.approved, .status.active { background: #e7f6ee; color: #216a4b; }
.status.rejected, .status.stopped { background: #fff0ef; color: var(--danger); }
.status.used { background: #e8eef7; color: #3d5684; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer { position: fixed; inset: 0; z-index: 70; background: rgba(16,34,56,.48); display: grid; place-items: center; padding: 20px; }
.drawer-panel { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: white; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.drawer-panel a, .notice, td { overflow-wrap: anywhere; }

.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.concept { background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 35px rgba(16,34,56,.07); }
.concept-preview { height: 330px; padding: 18px; position: relative; overflow: hidden; }
.concept-body { padding: 22px; }
.concept-body h2 { margin: 0 0 8px; }
.concept-body ul { padding-right: 20px; color: var(--muted); }
.mini-top { height: 34px; border-radius: 8px; background: rgba(255,255,255,.9); margin-bottom: 12px; }
.mini-hero { height: 112px; border-radius: 12px; padding: 15px; }
.mini-line { height: 8px; border-radius: 99px; margin: 8px 0; background: currentColor; opacity: .25; }
.mini-line.short { width: 55%; }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini-card { height: 82px; border-radius: 10px; background: rgba(255,255,255,.85); }
.concept-formal .concept-preview { background: #edf2f3; color: #102238; }
.concept-formal .mini-hero { background: #102238; color: white; border-right: 5px solid #c38a2d; }
.concept-modern .concept-preview { background: #071b25; color: #74e2d5; }
.concept-modern .mini-hero { background: linear-gradient(135deg,#0e3340,#0c786f); }
.concept-modern .mini-card { background: #12303d; border: 1px solid #1e4e59; }
.concept-simple .concept-preview { background: #fffaf0; color: #4e391b; }
.concept-simple .mini-hero { background: #e9f5ef; }
.concept-simple .mini-card { background: white; border: 2px solid #ead7a9; }
.recommended { display: inline-flex; color: var(--teal); background: #e7f6f4; padding: 4px 9px; border-radius: 99px; font-size: .78rem; font-weight: 900; }

.site-footer { padding: 30px 0; background: var(--ink); color: #c7d5dc; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-inner p { margin: 0; }

@media (max-width: 900px) {
  .hero-grid, .grid-3, .concept-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .assessment-meta { grid-template-columns: 1fr 1fr; }
  .assessment-meta .field:last-child { grid-column: 1 / -1; }
  .score-hero { grid-template-columns: 150px 1fr; }
  .score-ring { width: 140px; height: 140px; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .admin-sidebar nav { margin: 0; display: flex; overflow-x: auto; }
  .admin-sidebar nav { min-width: 0; }
}

@media (max-width: 680px) {
  .nav-links { display: none; position: absolute; top: 68px; right: 16px; left: 16px; background: white; padding: 10px; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .nav-toggle { display: block; }
  .hero { padding-top: 46px; }
  .hero h1 { font-size: 2.35rem; }
  .hero-grid { gap: 32px; }
  .section { padding: 52px 0; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 10px; }
  .steps, .form-row, .meta-table, .assessment-meta { grid-template-columns: 1fr; }
  .assessment-meta .field:last-child { grid-column: auto; }
  .code-inline { grid-template-columns: 1fr; }
  .assessment-top-inner { grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; }
  .assessment-top-inner .progress-meta { grid-column: 1 / -1; grid-row: 2; }
  .question { padding: 16px; }
  .rating { gap: 5px; }
  .rating button { min-width: 0; padding: 8px 2px; }
  .assessment-nav { align-items: stretch; flex-direction: column-reverse; }
  .assessment-nav .button { width: 100%; }
  .report-bg { padding-top: 20px; }
  .report-sheet { width: calc(100% - 16px); min-height: auto; padding: 24px 18px 70px; }
  .score-hero { grid-template-columns: 1fr; text-align: center; }
  .score-ring { margin: auto; }
  .bar-row { grid-template-columns: 1fr 54px; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .finding { grid-template-columns: 38px 1fr; }
  .finding small { grid-column: 2; }
  .footer-inner { display: block; text-align: center; }
  .admin-main { padding: 22px 14px; }
  .admin-sidebar { flex-direction: column; align-items: stretch; }
  .admin-sidebar nav { flex-wrap: wrap; }
  .admin-heading { align-items: start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 0; }
  body { background: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .no-print, .report-toolbar, .site-header { display: none !important; }
  .report-bg { padding: 0; background: white; }
  .report-sheet { width: 210mm; height: 297mm; min-height: 297mm; margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .report-sheet:last-child { page-break-after: auto; }
}
