:root {
  --bg: #f5f6f2;
  --paper: #fff;
  --ink: #192d29;
  --muted: #66766e;
  --green: #174b3c;
  --lime: #d8eb9f;
  --line: #e0e6de;
  --orange: #a5632b;
  --red: #ac4943;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.7 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #7fa88e;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 4.1vw, 54px);
  letter-spacing: -1.6px;
  line-height: 1.22;
  font-weight: 550;
}
h2 {
  font-size: 25px;
  line-height: 1.4;
  font-weight: 550;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
small,
.small {
  font-size: 12px;
}
header {
  height: 82px;
  background: #ffffffdf;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 12px;
}
header .brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brandmark {
  width: 38px;
  height: 38px;
  border: 1px solid #2e6550;
  background: var(--green);
  color: var(--lime);
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 24px;
}
.brand strong {
  font-size: 19px;
  letter-spacing: 2px;
}
.brand span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  background: #eef3e7;
  border: 1px solid #dce7d2;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.dot {
  height: 6px;
  width: 6px;
  background: #779d50;
  border-radius: 50%;
  display: inline-block;
}
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 82px);
}
.sidebar {
  background: #fbfcf8;
  border-right: 1px solid var(--line);
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar label {
  font-size: 10px;
  color: #8c978f;
  letter-spacing: 2px;
  padding: 5px 15px 12px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  color: #61726a;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
}
.nav.active {
  background: #e8eee3;
  color: var(--green);
  font-weight: 600;
}
.nav b {
  font-size: 12px;
  font-weight: 400;
  color: #8b9b8d;
}
.sidebar-note {
  margin-top: auto;
  padding: 60px 15px 5px;
  color: #839087;
  font-size: 11px;
}
.sidebar-note strong {
  font-size: 12px;
  color: var(--green);
  display: block;
}
main {
  padding: 34px 44px 30px;
  max-width: 1400px;
  width: 100%;
  min-width: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #7d8a7e;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 12px 0 42px;
}
.hero h1 em {
  font-style: normal;
  color: #587859;
}
.hero p {
  color: var(--muted);
  font-size: 15px;
  max-width: 440px;
  margin: 24px 0;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  border-radius: 7px;
  padding: 11px 18px;
  font-size: 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1.5;
}
.btn.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn.light {
  background: var(--lime);
  border-color: var(--lime);
}
.btn.quiet {
  background: transparent;
  border: 0;
  padding: 9px 0;
}
.btn.danger {
  color: var(--red);
}
.hero-art {
  border-radius: 16px;
  padding: 28px;
  background: #174b3c;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 35px #123f2a10;
}
.hero-art:before {
  content: "";
  position: absolute;
  border: 1px solid #ffffff12;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  top: -115px;
  right: -80px;
  pointer-events: none;
}
.hero-art .eyebrow {
  color: #a9c5af;
}
.art-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero-art h3 {
  font-size: 19px;
  font-weight: 500;
}
.hero-art .subtitle {
  font-size: 11px;
  color: #b7cdc0;
}
.art-flow {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 25px 0;
}
.art-node {
  font-size: 11px;
  border: 1px solid #779884;
  background: #ffffff09;
  padding: 12px 9px;
  border-radius: 6px;
  flex: 1;
  text-align: center;
  max-width: 100px;
}
.art-line {
  height: 1px;
  min-width: 12px;
  background: #6e977f;
}
.art-result {
  background: #f2f5e9;
  color: var(--green);
  padding: 17px 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}
.art-result b {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -1px;
}
.art-result small {
  display: block;
  color: #758172;
  font-size: 10px;
}
.art-foot {
  font-size: 10px;
  color: #bdd0c1;
  margin-top: 17px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: end;
  margin: 18px 0;
}
.section-head p {
  color: var(--muted);
  font-size: 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 23px;
}
.card p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 9px;
}
.card-number {
  display: block;
  font-size: 11px;
  color: #91a18c;
  margin-bottom: 20px;
}
.card .big {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--green);
}
.line-box {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  gap: 25px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.line-box strong {
  color: var(--green);
}
footer {
  font-size: 11px;
  color: #8c968e;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 34px;
}
.page-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-title p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.field input,
.field select {
  width: 100%;
  border: 1px solid #d5ddd3;
  border-radius: 6px;
  background: white;
  padding: 11px;
  color: var(--ink);
  font-size: 16px;
}
.notice {
  padding: 13px 16px;
  border-left: 3px solid #bccd95;
  background: #eef2e7;
  font-size: 12px;
  color: #5c705e;
  margin: 20px 0;
}
.notice.warn {
  border-left-color: #c7935e;
  background: #fbf2e5;
  color: #845a30;
}
.checkline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0;
}
.checkline input {
  margin-top: 6px;
  accent-color: var(--green);
}
.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
}
.quiz-card {
  padding: 30px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  gap: 16px;
  margin-bottom: 14px;
}
.progress {
  height: 4px;
  background: #e7ece2;
  border-radius: 9px;
  margin-bottom: 32px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: #749164;
  transition: width 0.2s;
}
.quiz-card h2 {
  font-size: 24px;
  margin-bottom: 12px;
}
.help {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.options {
  display: grid;
  gap: 10px;
}
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 15px;
  font-size: 14px;
  cursor: pointer;
}
.option:has(input:checked) {
  background: #edf3e7;
  border-color: #8ba47c;
  color: #285239;
}
.option input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.num-input {
  width: 170px;
  max-width: 100%;
  padding: 14px;
  border: 1px solid #b7c5af;
  border-radius: 7px;
  font-size: 24px;
  color: var(--green);
}
.quiz-bottom {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
}
.rail {
  font-size: 12px;
  color: var(--muted);
}
.rail-step {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.rail-step.current {
  color: var(--green);
  font-weight: 600;
}
.rail-step span:first-child {
  color: #9aac92;
}
.rail h3 {
  margin-bottom: 10px;
}
.error {
  font-size: 13px;
  color: var(--red);
  margin-top: 12px;
  min-height: 20px;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.risk {
  font-size: 25px;
  line-height: 1.4;
  margin-top: 12px;
}
.risk.high {
  color: var(--red);
}
.risk.medium {
  color: var(--orange);
}
.risk.low {
  color: var(--green);
}
.report-section {
  margin-top: 30px;
}
.report-section h3 {
  margin-bottom: 14px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  background: #fff;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  min-width: 110px;
}
th {
  background: #eef1e9;
  color: #60705c;
  font-weight: 500;
}
td {
  color: #52625a;
}
td strong {
  color: var(--ink);
}
.finding {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.finding-head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.pill {
  font-size: 10px;
  background: #eaf0e5;
  border-radius: 4px;
  padding: 2px 7px;
  color: #597047;
}
.pill.high {
  color: #a74a41;
  background: #faeeea;
}
.pill.medium {
  color: #8c652e;
  background: #faf0e0;
}
.finding p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.finding .action {
  color: var(--green);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.history-row {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
}
.history-row .actions {
  margin: 0;
}
.history-row p {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #c8d3c1;
  border-radius: 10px;
}
.sources {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.source {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.source p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f3eee1;
  color: #8a703c;
  align-self: start;
}
.status.ok {
  background: #e9f1e5;
  color: #416742;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 500px;
  width: calc(100% - 30px);
  padding: 28px;
  color: var(--ink);
}
.dialog::backdrop {
  background: #102a2270;
}
.dialog h2 {
  font-size: 23px;
  margin-bottom: 10px;
}
.dialog p {
  font-size: 13px;
  color: var(--muted);
}
.dialog .actions {
  justify-content: flex-end;
}
.method-list {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}
.method-list li {
  margin: 10px 0;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 12px 22px;
  border-radius: 7px;
  z-index: 10;
  max-width: 90%;
  font-size: 13px;
}
.sample {
  background: #f8ebd4;
  color: #8b6837;
  padding: 9px 14px;
  font-size: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}
.muted {
  color: var(--muted);
}
.numberline {
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: 1px;
}
.print-only {
  display: none;
}
.source-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-top: 15px;
}
.answer-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.answer-list div {
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.answer-list span {
  color: var(--muted);
  display: block;
}
.coverage-bar {
  height: 5px;
  background: #e5eadf;
  margin-top: 14px;
  border-radius: 9px;
}
.coverage-bar i {
  display: block;
  background: #85a069;
  height: 5px;
  border-radius: 9px;
}
.mobile-label {
  display: none;
}
@media (min-width: 1500px) {
  main {
    padding-left: 64px;
    padding-right: 64px;
  }
  .hero {
    gap: 70px;
  }
}
@media (max-width: 1050px) {
  main {
    padding: 28px;
  }
  .layout {
    grid-template-columns: 180px 1fr;
  }
  .hero {
    gap: 24px;
  }
  .quiz-layout {
    grid-template-columns: 1fr;
  }
  .rail {
    display: none;
  }
  .hero-art {
    padding: 22px;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 20px;
  }
}
@media (max-width: 760px) {
  header {
    height: 70px;
    padding: 0 18px;
  }
  .brand span {
    display: none;
  }
  header .tag {
    font-size: 10px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    padding: 8px 12px;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    gap: 2px;
  }
  .sidebar label,
  .sidebar-note {
    display: none;
  }
  .nav {
    width: auto;
    white-space: nowrap;
    padding: 10px;
    font-size: 12px;
    gap: 6px;
  }
  .nav b {
    display: none;
  }
  main {
    padding: 24px 18px;
  }
  .breadcrumb {
    margin-bottom: 19px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 5px;
    padding-bottom: 24px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero p {
    margin: 18px 0;
  }
  .hero-art {
    padding: 24px;
  }
  .art-flow {
    padding: 20px 0;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card-number {
    margin-bottom: 8px;
  }
  .card {
    padding: 20px;
  }
  .line-box {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
  .form-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .report-summary {
    grid-template-columns: 1fr;
  }
  .report-summary .card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 15px;
  }
  .report-summary .card p {
    grid-column: 1/-1;
  }
  .report-summary .risk {
    margin: 0;
    font-size: 24px;
  }
  .quiz-card {
    padding: 22px 18px;
  }
  .quiz-card h2 {
    font-size: 22px;
  }
  .quiz-top {
    font-size: 10px;
  }
  .page-title {
    flex-wrap: wrap;
  }
  .history-row {
    align-items: start;
    flex-direction: column;
  }
  .answer-list {
    grid-template-columns: 1fr;
  }
  .source {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: start;
    flex-wrap: wrap;
  }
  .hero .actions .btn {
    flex: 1;
  }
  .print-only {
    display: none;
  }
  .tag {
    max-width: 170px;
  }
  .brand strong {
    font-size: 17px;
  }
}
@media print {
  header,
  .sidebar,
  footer,
  .actions,
  .no-print,
  .breadcrumb,
  .toast {
    display: none !important;
  }
  body,
  main {
    background: #fff;
    color: #000;
    margin: 0;
    padding: 0;
  }
  .layout {
    display: block;
  }
  main {
    max-width: none;
  }
  .card,
  .quiz-card {
    box-shadow: none;
    border-color: #ccc;
  }
  .report-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .report-summary .card {
    display: block;
  }
  .finding,
  .card,
  tr {
    break-inside: avoid;
  }
  .report-section {
    margin-top: 20px;
  }
  .print-only {
    display: block;
  }
  .table-wrap {
    overflow: visible;
  }
  .page-title h1 {
    font-size: 28px;
  }
  a {
    color: #333;
  }
  th,
  td {
    min-width: 0;
    padding: 8px;
  }
  .answer-list {
    grid-template-columns: 1fr 1fr;
  }
  @page {
    size: A4;
    margin: 16mm;
  }
}
/* CAT identity and language controls */
header .brand {
  color: var(--ink);
  text-decoration: none;
  gap: 10px;
  flex-shrink: 0;
}
.brandmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  gap: 0;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  font-family: Georgia, serif;
}
.brandmark .cat-c {
  font-size: 32px;
  line-height: 1;
  color: var(--lime);
  margin: 0;
  transform: translateX(2px);
}
.brandmark .cat-at {
  font-family: Arial, sans-serif;
  font-size: 9px;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--lime);
  margin: 2px 0 0 -4px;
  align-self: center;
}
.brandtype strong {
  font-size: 24px;
  letter-spacing: 3px;
  line-height: 1.1;
  display: block;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.7px;
  color: #516b5e;
  white-space: nowrap;
  margin-top: 4px;
  line-height: 1.3;
}
.brand-sub small {
  font-size: 8px;
  margin-left: 8px;
  border-left: 1px solid #bac7b6;
  padding-left: 8px;
  letter-spacing: 1px;
  color: #7f927a;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.language-switch {
  display: flex;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}
.language-switch button {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-width: 37px;
  min-height: 35px;
  font-size: 12px;
}
.language-switch button[aria-pressed="true"] {
  background: var(--green);
  color: white;
}
.country-search {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.country-search input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font-size: 16px;
  width: 100%;
  color: var(--ink);
  background: #fafbf7;
}
.country-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.country-options {
  max-height: 365px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 8px 4px 2px;
  grid-template-columns: 1fr 1fr;
}
.country-options .option {
  padding: 11px;
  font-size: 13px;
  min-height: 47px;
}
.country-options .option[hidden] {
  display: none;
}
.country-options .country-code {
  margin-left: auto;
  color: #849381;
  font-size: 10px;
}
.country-selection {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.country-selection span {
  background: #e9f0df;
  color: #45613b;
  font-size: 11px;
  border-radius: 4px;
  padding: 3px 8px;
}
.country-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
  grid-column: 1/-1;
}
html[lang="en"] h1 {
  letter-spacing: -1px;
}
html[lang="en"] .hero h1 {
  font-size: clamp(30px, 3.8vw, 49px);
}
html[lang="en"] .sidebar .nav {
  font-size: 13px;
}
html[lang="en"] .quiz-card h2 {
  font-size: 22px;
}
html[lang="en"] .hero-art h3 {
  font-size: 18px;
}
html[lang="en"] .card p {
  line-height: 1.65;
}
html[lang="en"] .art-result strong {
  font-size: 13px;
}
@media (max-width: 760px) {
  header {
    padding: 0 14px;
  }
  .brandtype strong {
    font-size: 22px;
  }
  .brand-sub {
    font-size: 8px;
    letter-spacing: 0.2px;
  }
  .brand-sub small {
    margin-left: 5px;
    padding-left: 5px;
    font-size: 7px;
  }
  .header-tools {
    gap: 8px;
  }
  .header-tag {
    display: none !important;
  }
  .brandmark {
    width: 36px;
    height: 39px;
  }
  .language-switch button {
    min-width: 34px;
    min-height: 38px;
  }
  .country-options {
    grid-template-columns: 1fr;
    max-height: 340px;
  }
  html[lang="en"] .hero h1 {
    font-size: 35px;
  }
  html[lang="en"] .nav {
    font-size: 11px;
  }
  .brand-sub {
    white-space: nowrap;
  }
}
@media print {
  .country-search,
  .country-options,
  .language-switch {
    display: none;
  }
}
/* CAC report analytics */
.risk-dashboard {
  margin: 25px 0 28px;
}
.risk-dashboard .section-head {
  margin-bottom: 18px;
}
.risk-dashboard .section-head h2 {
  font-size: 26px;
}
.score-overview {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
}
.score-main {
  background: #163f33;
  color: #f5f7ed;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 24px 28px;
  gap: 16px;
  min-width: 0;
}
.score-main .muted {
  color: #b4cabb;
}
.score-main h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 8px 0;
}
.score-main p {
  font-size: 12px;
  color: #b7cfbd;
}
.score-bands {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 9px;
  color: #c2d2bd;
}
.score-bands span {
  border-top: 2px solid #9fbc7d;
  padding-top: 5px;
}
.score-bands span:nth-child(2) {
  border-top-color: #d4b077;
}
.score-bands span:nth-child(3) {
  border-top-color: #ce8c76;
}
.risk-gauge {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  position: relative;
}
.risk-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.risk-gauge circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}
.gauge-track {
  stroke: #ffffff18;
}
.gauge-range {
  stroke: #a8bd8e55;
  stroke-dashoffset: 0;
}
.gauge-value {
  stroke: #d2e99c;
}
.risk-gauge.high .gauge-value {
  stroke: #e0a088;
}
.risk-gauge.medium .gauge-value {
  stroke: #e0c78a;
}
.risk-gauge.pending .gauge-range {
  stroke: #b5c8ab88;
  stroke-dashoffset: 0;
}
.gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.gauge-label strong {
  font-size: 35px;
  letter-spacing: -1px;
  font-weight: 500;
  line-height: 1.3;
}
.gauge-label span {
  font-size: 11px;
  color: #b7cbb8;
}
.gauge-label small {
  font-size: 10px;
  color: #aabfad;
  margin-top: 6px;
}
.score-mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  padding: 0 22px;
}
.score-mini > div {
  padding: 16px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 10px;
}
.score-mini > div + div {
  border-top: 1px solid var(--line);
}
.score-mini span {
  font-size: 12px;
  color: var(--muted);
}
.score-mini strong {
  font-size: 29px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.score-mini strong small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}
.score-mini p {
  font-size: 10px;
  color: #899782;
  grid-column: 1/-1;
}
.high {
  color: var(--red);
}
.medium {
  color: var(--orange);
}
.low {
  color: var(--green);
}
.pending {
  color: #7a8060;
}
.priority-strip {
  margin: 17px 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 18px;
  background: #f6ede6;
  border: 1px solid #e9d5c7;
  color: #925d42;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 11px;
}
.priority-strip strong {
  font-size: 12px;
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 18px;
  margin-top: 18px;
}
.chart-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
  min-width: 0;
}
.chart-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chart-heading h3 {
  font-size: 16px;
}
.risk-radar {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.radar-grid {
  stroke: #e2e7db;
  stroke-width: 1;
  fill: none;
}
.radar-axis {
  stroke: #e3e9df;
  stroke-width: 1;
}
.radar-label {
  font-family: inherit;
  font-size: 13px;
  fill: #435744;
}
.radar-score {
  font-size: 12px;
  fill: #6f7e64;
}
.radar-scale {
  fill: #a0ac95;
  font-size: 10px;
}
.radar-uncertainty {
  fill: #dfe8d380;
  stroke: #a6b797;
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}
.radar-area {
  fill: #779d6a35;
  stroke: #3c7054;
  stroke-width: 2;
}
.radar-point {
  fill: #3c7054;
  stroke: #fff;
  stroke-width: 1.5;
}
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.chart-legend i {
  width: 13px;
  height: 7px;
  display: inline-block;
}
.legend-solid {
  background: #759366;
}
.legend-range {
  background: repeating-linear-gradient(
    135deg,
    #e0e7d7,
    #e0e7d7 2px,
    #b8c6a8 2px,
    #b8c6a8 3px
  );
}
.chart-note {
  font-size: 10px;
  color: #85917c;
  line-height: 1.6;
  margin: 10px 0 0;
  text-align: center;
}
.dimension-row {
  margin-top: 19px;
  min-width: 0;
}
.dimension-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.dimension-heading strong {
  font-size: 18px;
  font-weight: 550;
  white-space: nowrap;
}
.dimension-heading small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.dimension-track {
  height: 8px;
  background: #eef1e9;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  margin-top: 9px;
}
.dimension-track > span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 5px;
}
.dimension-uncertainty {
  background: repeating-linear-gradient(
    135deg,
    #cbd5ba,
    #cbd5ba 3px,
    #e1e7d6 3px,
    #e1e7d6 6px
  );
}
.dimension-fill {
  background: #729866;
}
.dimension-fill.high {
  background: #bd7762;
}
.dimension-fill.medium {
  background: #be995c;
}
.dimension-fill.pending {
  background: #91a47e;
}
.dimension-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 10px;
  color: #839178;
}
.score-detail {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 10px;
  color: #58754b;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dimension-breakdown {
  border-top: 1px solid var(--line);
  padding: 22px 0 8px;
  margin-top: 25px;
}
.crs-dimension-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 26px;
}
.score-method {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.score-method summary {
  cursor: pointer;
  color: var(--green);
}
.score-method p {
  margin-top: 10px;
}
.score-item-list {
  max-height: 52vh;
  overflow: auto;
  margin-top: 15px;
  padding-right: 6px;
}
.score-item {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.score-item strong {
  font-size: 12px;
}
.score-item p {
  margin: 5px 0 8px !important;
  font-size: 12px;
}
.dimension-total {
  font-size: 27px;
  color: var(--green);
  font-weight: 500;
}
.dimension-total small {
  font-size: 11px;
  color: var(--muted);
  margin-left: 5px;
}
.chart-unavailable {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 80px 15px;
}
html[lang="en"] .score-main h3 {
  font-size: 17px;
}
html[lang="en"] .score-main p {
  font-size: 11px;
}
html[lang="en"] .score-bands {
  font-size: 8px;
  gap: 7px;
}
html[lang="en"] .dimension-heading {
  font-size: 11px;
}
html[lang="en"] .chart-heading h3 {
  font-size: 15px;
}
@media (max-width: 1100px) {
  .score-overview {
    grid-template-columns: 1fr;
  }
  .score-mini {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 25px;
  }
  .score-mini > div + div {
    border-top: 0;
  }
  .chart-grid {
    grid-template-columns: 1fr 1fr;
  }
  .score-main {
    padding: 22px;
  }
  .risk-gauge {
    width: 150px;
    height: 150px;
  }
  .crs-dimension-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 850px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .risk-radar {
    max-width: 360px;
  }
  .score-main h3 {
    font-size: 18px;
  }
  .risk-gauge {
    width: 135px;
    height: 135px;
  }
  .gauge-label strong {
    font-size: 30px;
  }
}
@media (max-width: 560px) {
  .risk-dashboard .section-head h2 {
    font-size: 23px;
  }
  .score-main {
    padding: 19px 17px;
    gap: 8px;
  }
  .score-main h3 {
    font-size: 16px;
    line-height: 1.4;
  }
  .score-main p {
    font-size: 10px;
  }
  .risk-gauge {
    width: 115px;
    height: 115px;
  }
  .gauge-label strong {
    font-size: 26px;
  }
  .gauge-label small {
    font-size: 8px;
  }
  .score-bands {
    font-size: 8px;
    gap: 7px;
    margin-top: 16px;
  }
  .score-mini {
    padding: 0 17px;
    gap: 14px;
  }
  .score-mini strong {
    font-size: 24px;
  }
  .score-mini > div {
    display: block;
  }
  .score-mini p {
    font-size: 9px;
  }
  .score-mini span {
    font-size: 11px;
  }
  .chart-panel {
    padding: 17px 12px;
  }
  .crs-dimension-grid {
    grid-template-columns: 1fr;
  }
  .dimension-heading {
    font-size: 12px;
  }
  .radar-label {
    font-size: 15px;
  }
  .radar-score {
    font-size: 14px;
  }
  .chart-note {
    font-size: 10px;
  }
  .priority-strip {
    font-size: 10px;
  }
  html[lang="en"] .score-main {
    flex-wrap: wrap;
  }
  html[lang="en"] .score-main > div:first-child {
    flex: 1;
    min-width: 130px;
  }
  html[lang="en"] .score-main h3 {
    font-size: 15px;
  }
  html[lang="en"] .score-bands {
    font-size: 7px;
  }
  html[lang="en"] .score-mini span {
    font-size: 10px;
  }
}
@media print {
  .score-overview {
    grid-template-columns: 1.5fr 1fr;
  }
  .score-main {
    background: #f0f3e8 !important;
    color: #163f33 !important;
    border: 1px solid #bbc9b3;
    print-color-adjust: exact;
  }
  .score-main .muted,
  .score-main p,
  .score-bands,
  .gauge-label span,
  .gauge-label small {
    color: #4e6450 !important;
  }
  .risk-gauge .gauge-track {
    stroke: #d6dfcb;
  }
  .score-main,
  .chart-panel,
  .score-mini {
    break-inside: avoid;
  }
  .chart-grid {
    grid-template-columns: 1fr 1fr;
  }
  .risk-radar {
    max-width: 300px;
  }
  .score-main {
    padding: 14px;
  }
  .risk-gauge {
    width: 125px;
    height: 125px;
  }
  .score-mini {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
  }
  .score-mini > div + div {
    border-top: 1px solid var(--line);
  }
  .crs-dimension-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .score-method {
    display: none;
  }
  .score-detail {
    display: none;
  }
  .risk-dashboard {
    break-after: auto;
  }
  .dimension-uncertainty,
  .dimension-fill,
  .radar-area,
  .radar-uncertainty {
    print-color-adjust: exact;
  }
  .score-main h3 {
    font-size: 16px;
  }
}

/* ---- v2: lead capture, sharing, accessibility ---------------------------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--green);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
}
.skip-link:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid #6f9a3c;
  outline-offset: 2px;
}
#content h1:focus,
#content h2:focus {
  outline: none;
}
.field textarea {
  width: 100%;
  border: 1px solid #d5ddd3;
  border-radius: 6px;
  padding: 11px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  resize: vertical;
}
.field [aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 2px #ac494322;
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  text-decoration: underline;
  font-size: inherit;
}
.report-toolbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 20px 14px;
  margin: 22px 0;
}
.report-toolbar .actions {
  margin-top: 14px;
}
.report-toolbar p {
  margin: 10px 0 0;
}
.report-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--green);
  color: #fff;
  border-radius: 14px;
  padding: 26px 30px;
  margin: 28px 0;
}
.report-cta h3 {
  color: #fff;
  margin: 6px 0;
}
.report-cta p {
  color: #d9e6dd;
  margin: 0;
  font-size: 13px;
}
.report-cta .eyebrow {
  color: var(--lime);
}
.report-cta .btn.primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--green);
  white-space: nowrap;
}
.shared-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.changed {
  color: var(--orange);
}
.file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-btn:focus-within {
  outline: 2px solid #6f9a3c;
  outline-offset: 2px;
}
.lead-dialog {
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.lead-form h2 {
  margin: 4px 0 6px;
}
.lead-form .lead-head p {
  margin: 0 0 18px;
}
.lead-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.chip-group {
  border: 0;
  padding: 0;
  margin: 16px 0 0;
}
.chip-group legend {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.chip {
  display: inline-flex;
  margin: 0 8px 8px 0;
  cursor: pointer;
}
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  border: 1px solid #d5ddd3;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  background: #fff;
  color: var(--ink);
}
.chip input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.chip input:focus-visible + span {
  outline: 2px solid #6f9a3c;
  outline-offset: 2px;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.consult-grid {
  align-items: start;
}
.consult-grid .lead-form .form-grid {
  grid-template-columns: 1fr;
}
.print-locked {
  display: none;
}
@media (max-width: 760px) {
  .lead-form .form-grid {
    grid-template-columns: 1fr;
  }
  .lead-dialog {
    padding: 22px 18px;
  }
  .report-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
  .report-toolbar {
    padding: 4px 14px 12px;
  }
  .report-toolbar .btn {
    flex: 1 1 calc(50% - 12px);
  }
}
@media print {
  /* Ctrl+P before leaving contact details prints a short notice instead of the report. */
  body:not(.print-unlocked) .layout,
  body:not(.print-unlocked) dialog {
    display: none !important;
  }
  body:not(.print-unlocked) .print-locked {
    display: block;
    padding: 40px;
    font-size: 16px;
  }
  .report-cta,
  .report-toolbar,
  .skip-link {
    display: none !important;
  }
  .sample {
    print-color-adjust: exact;
  }
}
.lead-more {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.lead-more summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--green);
}
.lead-more .form-grid {
  margin-top: 14px;
}

/* Brand mark aligned with the FOA kit (TRC): one serif letter on brand green. */
.brandmark { border: 1px solid #2e6550; }
.brandmark .cat-c { font-size: 24px; transform: none; }

/* Phones: same frame as the FOA kit (TRC) — brand letter visible, six-tab bar at the bottom. */
@media (max-width: 760px) {
  .brand .brandmark span { display: inline !important; }
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
    background: #fffffffa; border: 0; border-top: 1px solid var(--line); overflow: visible;
    box-shadow: 0 -6px 18px #1c2e2610;
  }
  .sidebar .nav {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0; font-size: 11px; white-space: nowrap; border-radius: 10px; min-width: 0;
  }
  .sidebar .nav b { display: block; font: 12px/1.2 Georgia, serif; color: #8c978f; }
  .sidebar .nav.active b { color: inherit; }
  main#content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.nav .short { display: none; }
@media (max-width: 760px) { .sidebar .nav .full { display: none; } .sidebar .nav .short { display: inline; } }
