:root {
  --blue: #315aca;
  --blue-dark: #2446a5;
  --ink: #1d2942;
  --muted: #65728a;
  --line: #e4e9f2;
  --bg: #f5f7fc;
  --soft: #eef3ff;
  --green: #157761;
  --amber: #8b5d12;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #81b4d2;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: var(--blue);
}
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 40px;
}
.brand strong {
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.brand-icon {
  display: flex;
  align-items: end;
  gap: 4px;
  background: var(--blue);
  width: 42px;
  height: 45px;
  padding: 11px;
  border-radius: 13px;
}
.brand-icon i {
  display: block;
  width: 5px;
  background: #fff;
  border-radius: 3px;
  height: 14px;
}
.brand-icon i:nth-child(2) {
  height: 21px;
}
.brand-icon i:nth-child(3) {
  height: 26px;
}
.nav-label {
  font-size: 11px;
  color: #8c96a8;
  padding: 0 14px 9px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 5px;
  text-align: right;
  color: var(--muted);
  min-height: 48px;
}
.nav-item.active {
  background: var(--soft);
  color: var(--blue);
  font-weight: bold;
}
.nav-item:hover {
  background: var(--bg);
}
svg.icon {
  width: 21px;
  height: 21px;
  vertical-align: middle;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: bold;
  background: #eeeafa;
  color: var(--blue);
  flex: none;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spread {
  justify-content: space-between;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
}
.topbar .muted {
  font-size: 12px;
}
.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: #3a9a80;
  border-radius: 50%;
  margin-left: 6px;
}
.content {
  max-width: 1290px;
  margin: auto;
  padding: 38px 42px 50px;
}
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: bold;
  margin: 0 0 5px;
}
h1 {
  font-size: 28px;
  line-height: 1.5;
  margin: 0 0 6px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 19px;
  margin: 0 0 6px;
  line-height: 1.6;
}
h3 {
  font-size: 16px;
  margin: 0 0 4px;
}
p {
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  min-height: 46px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 8px #315aca15;
}
.btn.primary:hover {
  background: var(--blue-dark);
}
.btn:hover {
  border-color: #a9b9dc;
}
.btn.text {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 8px 4px;
}
.btn.tiny {
  padding: 8px 13px;
  min-height: 42px;
  font-size: 12px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat b {
  font-size: 30px;
  line-height: 1.4;
  display: block;
  font-weight: 500;
}
.stat .icon-wrap {
  background: var(--soft);
  color: var(--blue);
  padding: 12px;
  border-radius: 13px;
}
.stat:nth-child(2) .icon-wrap {
  background: #fff5e7;
  color: #a97b34;
}
.stat:nth-child(3) .icon-wrap {
  background: #ebf7f2;
  color: var(--green);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
}
.resume {
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 22px;
  border: 1px solid #d9e3fc;
  background: linear-gradient(105deg, #f0f4ff, #fff 70%);
  padding: 22px 26px;
  border-radius: 16px;
}
.resume .resume-body {
  flex: 1;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f3f8;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
}
.badge.blue {
  background: #edf2ff;
  color: var(--blue);
}
.badge.green {
  background: #eaf7f1;
  color: var(--green);
}
.badge.amber {
  background: #fff4df;
  color: var(--amber);
}
.mini-progress {
  width: 140px;
  height: 6px;
  background: #dee7fa;
  border-radius: 10px;
  overflow: hidden;
}
.mini-progress span {
  display: block;
  background: var(--blue);
  height: 100%;
  border-radius: 10px;
}
.section-head {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.search {
  position: relative;
  min-width: 280px;
}
.search input {
  padding-right: 41px;
}
.search svg {
  position: absolute;
  right: 13px;
  top: 13px;
  color: #8c98aa;
}
.field input,
.field select,
.field textarea,
.search input {
  width: 100%;
  border: 1px solid #dce3ed;
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  padding: 11px 13px;
  min-height: 47px;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.search input:focus {
  border-color: var(--blue);
}
.search input {
  padding-right: 42px;
  background: #fafbfe;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 7px;
}
.field label span {
  color: var(--muted);
  font-weight: normal;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}
th {
  font-size: 12px;
  font-weight: normal;
  color: var(--muted);
  background: #f8fafe;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 18px 16px;
  border-bottom: 1px solid #edf0f5;
  font-size: 13px;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 14px;
}
.patient-cell {
  display: flex;
  gap: 12px;
  align-items: center;
}
.patient-cell .avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
  background: #f0edfa;
  color: #7b61a7;
}
.patient-cell small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.demo-strip {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
.empty {
  text-align: center;
  padding: 35px;
  color: var(--muted);
}
.steps {
  display: flex;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 24px;
  gap: 14px;
}
.step {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  font-size: 12px;
  color: var(--muted);
}
.step:after {
  content: '';
  height: 1px;
  background: var(--line);
  flex: 1;
  margin-right: 6px;
}
.step:last-child:after {
  display: none;
}
.step span {
  height: 29px;
  width: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f3f8;
}
.step.active {
  color: var(--blue);
  font-weight: bold;
}
.step.active span {
  background: var(--blue);
  color: white;
}
.step.done span {
  background: #e5f3ed;
  color: var(--green);
}
.age-box {
  padding: 15px 18px;
  background: var(--soft);
  border-radius: 10px;
  color: var(--blue);
  font-size: 13px;
}
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.check-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 13px;
  border-radius: 10px;
  flex: 1;
  font-size: 13px;
  cursor: pointer;
}
.check-tile input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
  flex: none;
}
.footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.error {
  color: #ac3940;
  background: #fff1f1;
  padding: 12px;
  border-radius: 9px;
  margin-bottom: 16px;
  font-size: 13px;
}
.notice {
  background: #f1f5fd;
  border: 1px solid #e0e8f8;
  color: #526788;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12px;
}
.assessment-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 22px;
}
.domain-nav {
  padding: 17px 12px;
  align-self: start;
}
.domain-label {
  font-size: 11px;
  padding: 12px 12px 5px;
  color: #8a96a9;
}
.subnav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  text-align: right;
}
.subnav.active {
  background: var(--soft);
  color: var(--blue);
  font-weight: bold;
}
.subnav:hover {
  background: #f4f6fa;
}
.subnav small {
  font-size: 10px;
}
.question-list {
  margin-top: 18px;
}
.question {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.question:last-child {
  border: 0;
}
.question-heading {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}
.qnum {
  font-size: 11px;
  background: #f0f3f8;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
}
.question legend {
  font-size: 14px;
  font-weight: bold;
  padding: 0;
}
.question fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.score {
  position: relative;
  cursor: pointer;
}
.score input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.score span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  padding: 11px 7px;
  font-size: 12px;
  min-height: 48px;
  color: var(--muted);
}
.score b {
  font-size: 18px;
  font-weight: 500;
}
.score input:checked + span {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--blue);
}
.score input:focus-visible + span {
  outline: 3px solid #82a4ff;
  outline-offset: 3px;
}
.score input:hover + span {
  border-color: #a2b7e8;
}
.estimated {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 11px;
}
.estimated input {
  accent-color: var(--blue);
}
.score-summary {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px 0;
}
.score-summary b {
  font-size: 20px;
  color: var(--blue);
}
.progress-full {
  height: 7px;
  background: #edf1f8;
  border-radius: 20px;
  overflow: hidden;
}
.progress-full span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 20px;
  transition: width 0.2s;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.report-head {
  border-bottom: 2px solid var(--blue);
  padding-bottom: 20px;
  margin-bottom: 22px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  font-size: 13px;
}
.report-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.report-note {
  padding: 14px 18px;
  border-right: 3px solid #bdccec;
  background: #f6f8fe;
  font-size: 12px;
  margin: 20px 0;
}
.report-card {
  margin-bottom: 22px;
}
.report-card th,
.report-card td {
  padding: 11px;
  font-size: 12px;
}
.report-card td strong {
  font-size: 13px;
}
.placeholder {
  color: #8a94a8;
  font-size: 11px;
}
.norms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.norm {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.norm b {
  display: block;
  font-size: 25px;
  font-weight: 400;
  color: #9aa6ba;
}
.history-row {
  padding: 18px;
  border-right: 2px solid #cdd9ef;
  margin-right: 10px;
  position: relative;
}
.history-row:before {
  content: '';
  position: absolute;
  right: -6px;
  top: 27px;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  background: var(--blue);
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.help-grid li {
  margin: 12px 0;
  font-size: 14px;
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 18px;
}
.report-only {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  background: #213454;
  color: #fff;
  border-radius: 11px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 20;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%);
}
@media (min-width: 1700px) {
  .content {
    padding-top: 50px;
  }
  .topbar {
    padding: 0 65px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 12px;
  }
  .content {
    padding: 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .assessment-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .norms {
    grid-template-columns: 1fr 1fr;
  }
  .scores {
    gap: 6px;
  }
  .score span {
    gap: 6px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 16px 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .brand {
    margin: 0 0 12px;
  }
  .brand strong {
    font-size: 27px;
  }
  .brand-icon {
    height: 38px;
    width: 38px;
    padding: 8px;
  }
  .sidebar nav {
    display: flex;
    gap: 6px;
  }
  .nav-item {
    justify-content: center;
    margin: 0;
    padding: 9px;
    font-size: 12px;
    min-height: 42px;
  }
  .nav-label,
  .sidebar-foot {
    display: none;
  }
  .topbar {
    height: 55px;
    padding: 0 20px;
  }
  .topbar .muted {
    font-size: 10px;
  }
  .content {
    padding: 24px 18px;
  }
  .page-head {
    align-items: start;
    gap: 12px;
  }
  h1 {
    font-size: 24px;
  }
  .page-head p {
    font-size: 12px;
  }
  .btn {
    padding: 10px 14px;
    font-size: 12px;
  }
  .grid3 {
    gap: 8px;
  }
  .stat {
    padding: 13px;
    display: block;
  }
  .stat b {
    font-size: 24px;
  }
  .stat .small {
    font-size: 10px;
  }
  .stat .icon-wrap {
    display: none;
  }
  .resume {
    padding: 17px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .resume .resume-body {
    min-width: 180px;
  }
  .resume .mini-progress {
    width: 100px;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
  }
  .search {
    width: 100%;
    min-width: 0;
  }
  .card {
    padding: 18px;
  }
  .form-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .steps {
    gap: 8px;
    padding: 14px 10px;
  }
  .step {
    font-size: 10px;
    gap: 6px;
    flex-direction: column;
  }
  .step:after {
    display: none;
  }
  .step span {
    width: 26px;
    height: 26px;
  }
  .assessment-layout {
    display: block;
  }
  .domain-nav {
    display: flex;
    overflow: auto;
    gap: 6px;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 9px;
    border-radius: 10px;
  }
  .domain-label {
    display: none;
  }
  .subnav {
    width: auto;
    white-space: nowrap;
    gap: 8px;
    padding: 8px 10px;
  }
  .question {
    padding: 18px 0;
  }
  .scores {
    gap: 7px;
  }
  .score span {
    flex-direction: column;
    gap: 0;
    padding: 8px 4px;
  }
  .score b {
    font-size: 20px;
  }
  .report-grid {
    grid-template-columns: 1fr 1fr;
  }
  .report-card {
    padding: 15px;
  }
  .report-card td,
  .report-card th {
    font-size: 10px;
    padding: 9px;
  }
  .norm {
    padding: 12px;
  }
  .options {
    display: block;
  }
  .check-tile {
    margin-bottom: 9px;
  }
  .toolbar {
    gap: 7px;
  }
  .footer-actions {
    align-items: center;
  }
  .topbar strong {
    font-size: 12px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 14mm;
  }
  body {
    background: white;
    font-size: 11px;
  }
  .sidebar,
  .topbar,
  .no-print,
  #toast,
  .steps,
  .page-head,
  .demo-strip {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content {
    padding: 0;
    max-width: none;
  }
  .card {
    border: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .report-only {
    display: block;
  }
  .report-card {
    margin-bottom: 18px;
  }
  .report-card td,
  .report-card th {
    font-size: 10px;
    padding: 7px;
  }
  .report-grid {
    grid-template-columns: repeat(3, 1fr);
    font-size: 11px;
  }
  .report-head {
    margin-top: 10px;
  }
  .report-note {
    padding: 10px;
    font-size: 10px;
  }
  tr,
  .norm,
  .report-head,
  .report-grid {
    break-inside: avoid;
  }
  thead {
    display: table-header-group;
  }
  .norms {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer-note {
    font-size: 9px;
  }
  .report-table {
    overflow: visible;
  }
  .norm b {
    font-size: 20px;
  }
  h2 {
    font-size: 15px;
  }
  button {
    display: none !important;
  }
}
@media (max-width: 760px) {
  .page-head {
    flex-direction: column;
  }
  .page-head .toolbar {
    width: 100%;
  }
  .page-head .toolbar .btn {
    flex: 1;
  }
  .section-head .badge {
    align-self: flex-start;
  }
}
@media print {
  .report-note {
    break-inside: avoid;
  }
  h2,
  h3 {
    break-after: avoid;
  }
}

/* Namaa v2 visual system. Cairo files are self-hosted under the SIL OFL in fonts/OFL.txt. */
@font-face {
  font-family: Cairo;
  src: url('fonts/cairo-arabic.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011,
    U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: Cairo;
  src: url('fonts/cairo-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --blue: #624795;
  --blue-dark: #4c3679;
  --cyan: #4b98bc;
  --ink: #293449;
  --muted: #647187;
  --line: #dfe3ed;
  --bg: #f6f7fb;
  --soft: #f0ecf9;
  --green: #16715e;
  --amber: #946018;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(41, 52, 73, 0.03), 0 8px 28px rgba(41, 52, 73, 0.055);
}
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    Cairo,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 15px;
  line-height: 1.75;
  background: linear-gradient(180deg, #fbfbfe 0, #f4f6fb 34rem);
  letter-spacing: 0;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font-family: inherit;
}
.skip-link {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 10px;
  transform: translateY(-150%);
  box-shadow: var(--shadow);
}
.skip-link:focus {
  transform: none;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.shell {
  grid-template-columns: 248px minmax(0, 1fr);
}
.workspace {
  min-width: 0;
}
.sidebar {
  padding: 28px 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-left-color: var(--line);
}
.brand {
  margin: 0 8px 34px;
}
.brand strong {
  font-size: 30px;
  font-weight: 700;
}
.brand small {
  font-size: 11px;
  letter-spacing: 0.01em;
}
.brand-icon {
  background: linear-gradient(145deg, #56add0 0%, #6672b2 48%, #78449a 100%);
  box-shadow: 0 8px 20px rgba(98, 71, 149, 0.22);
}
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: none;
}
.nav-label {
  font-weight: 600;
}
.nav-item {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 13px;
  font-weight: 500;
}
.nav-item.active {
  background: var(--soft);
  color: var(--blue);
  border-color: #e1d8f0;
}
.nav-item:hover {
  background: #f5f3fa;
}
.sidebar-foot strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 2px;
}
.topbar {
  height: 72px;
  padding: 0 42px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
}
.topbar > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.topbar small {
  color: var(--muted);
  font-size: 11px;
}
.topbar strong {
  font-size: 14px;
}
.status-dot {
  background: #4aa18c;
}
.content {
  max-width: 1320px;
  padding: 42px 48px 54px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.03em;
}
.page-head {
  margin-bottom: 30px;
}
.page-head h1 {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.page-head > .toolbar {
  align-self: center;
}
.page-head > .toolbar:empty {
  display: none;
}
.page-head .muted {
  font-size: 14px;
  max-width: 640px;
}
.card {
  border-color: var(--line);
  box-shadow: var(--shadow);
  padding: 26px;
}
.btn {
  border-color: #dce2ec;
  border-radius: 11px;
  min-height: 44px;
  padding: 9px 17px;
  font-weight: 600;
  box-shadow: 0 1px 1px rgba(41, 52, 73, 0.03);
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 5px 16px rgba(98, 71, 149, 0.18);
}
.btn.primary:hover {
  background: var(--blue-dark);
}
.btn.danger,
.btn.danger-quiet:hover {
  background: #a44242;
  border-color: #a44242;
  color: #fff;
}
.btn.danger-quiet {
  color: #9d3d3d;
  background: #fff6f5;
  border-color: #f0d5d2;
}
.field input,
.field select,
.field textarea,
.search input {
  border-color: #d9e0eb;
  border-radius: 10px;
  min-height: 49px;
  padding: 11px 14px;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.search input:focus {
  border-color: #8a72b5;
  box-shadow: 0 0 0 3px rgba(98, 71, 149, 0.12);
  outline: 0;
}
.field label {
  font-weight: 600;
}
.field small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.search input {
  background: white;
}
.grid3 {
  gap: 16px;
}
.stat {
  border-color: rgba(214, 220, 233, 0.9);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.stat b {
  font-size: 29px;
  font-weight: 650;
}
.stat .icon-wrap {
  background: #f0ecf9;
  color: var(--blue);
}
.resume {
  border-color: #e0d9ef;
  background: linear-gradient(110deg, #f3effa, #fff 72%);
  box-shadow: var(--shadow);
}
.badge {
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
}
.badge.blue {
  background: #eeeaf7;
  color: #624795;
}
.progress-full span,
.mini-progress span {
  background: linear-gradient(90deg, #4b98bc, #7054a1);
}
.steps {
  box-shadow: var(--shadow);
  border-color: rgba(214, 220, 233, 0.9);
}
.step span {
  font-weight: 600;
}
.step.active {
  color: var(--blue);
}
.step.active span {
  background: var(--blue);
}
.age-box,
.notice {
  background: #f4f2fa;
  border-color: #e4deee;
  color: #4c5270;
}
.question {
  padding: 23px 0;
}
.question legend {
  font-size: 15px;
  font-weight: 600;
}
.score span {
  border-color: #dce2ec;
  min-height: 52px;
}
.score input:checked + span {
  color: var(--blue);
  border-color: #7459a6;
  background: #f3effa;
  box-shadow: 0 0 0 1px #7459a6;
}
.domain-nav {
  position: sticky;
  top: 92px;
}
.subnav.active {
  background: #f0ecf9;
  color: #624795;
}
.report-note {
  border-right-color: #7b65ab;
  background: #f7f5fb;
}
.norm {
  background: #fbfaff;
}
.report-head {
  border-bottom-color: var(--blue);
}
.profile-grid {
  display: grid;
  gap: 22px;
}
.comparison-card > .section-head > .icon {
  color: var(--blue);
  width: 27px;
  height: 27px;
}
.compare-dates {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  background: #f7f8fc;
  border: 1px solid var(--line);
  padding: 13px 16px;
  border-radius: 11px;
  margin-bottom: 16px;
  font-size: 12px;
}
.comparison-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.comparison-picker .field {
  margin: 0;
}
.comparison-card td,
.comparison-card th {
  white-space: nowrap;
}
.table-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 13px 0 0;
}
.comparison-empty .icon {
  width: 30px;
  height: 30px;
  color: var(--blue);
  margin-bottom: 8px;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}
.settings-grid .field {
  margin-bottom: 19px;
}
.settings-grid .form-grid {
  gap: 14px;
}
.clinic-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  margin: 10px 0;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
}
.clinic-logo-preview img {
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
}
.clinic-logo-error {
  color: #9b2c2c;
  min-height: 1em;
}
.clinic-watermark-option {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 19px;
}
.data-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.data-action p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0;
}
.data-action + .notice {
  margin-top: 20px;
}
.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.archive-row:last-child {
  border-bottom: 0;
}
.review-fields,
.selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0;
}
.review-fields .field {
  padding: 18px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.note-field {
  margin-top: 20px;
}
.selection-grid > div {
  padding: 18px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.selection-grid span,
.selection-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.selection-grid strong {
  font-size: 22px;
  color: var(--blue);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(31, 35, 62, 0.48);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  position: relative;
  width: min(500px, 100%);
  background: #fff;
  border: 1px solid #dfe3ed;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(31, 35, 62, 0.22);
  outline: 0;
}
.modal h2 {
  font-size: 22px;
}
.modal > p:not(.eyebrow) {
  color: var(--muted);
}
.modal-close {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 7px;
  color: var(--muted);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff7ed;
  border: 1px solid #f0dfc9;
  padding: 14px;
  border-radius: 11px;
  font-size: 13px;
}
.confirm-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex: none;
  margin-top: 2px;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .content {
    padding: 32px;
  }
  .topbar {
    padding: 0 32px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    overflow: auto;
  }
  .nav-item {
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
    white-space: nowrap;
  }
  .nav-item .icon {
    width: 18px;
    height: 18px;
  }
  .topbar > div {
    display: block;
  }
  .topbar small {
    display: block;
  }
  .content {
    padding: 24px 16px;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .profile-grid {
    display: block;
  }
  .profile-grid > .card + .card {
    margin-top: 16px;
  }
  .review-fields,
  .selection-grid {
    grid-template-columns: 1fr;
  }
  .data-action,
  .archive-row {
    align-items: flex-start;
  }
  .archive-row {
    flex-direction: column;
  }
  .modal {
    padding: 25px 20px;
  }
  .scores {
    grid-template-columns: 1fr;
  }
  .score span {
    flex-direction: row;
  }
  .report-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .grid3 {
    grid-template-columns: 1fr;
  }
  .stat {
    display: flex;
  }
  .sidebar nav {
    grid-template-columns: repeat(5, 76px);
  }
  .topbar .muted {
    max-width: 48%;
    text-align: left;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  .footer-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .footer-actions .btn {
    width: 100%;
  }
}
body {
  font-size: 16px;
}
.small,
.field small,
.table-caption,
.data-action p {
  font-size: 13px;
  color: #5d687e;
}
.muted {
  color: #647187;
}
.search input {
  padding-inline-start: 14px;
  padding-inline-end: 44px;
}
.search svg {
  inset-inline-end: 14px;
  inset-inline-start: auto;
  pointer-events: none;
}
.entry-mode {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}
.source-progress {
  margin-bottom: 18px;
  padding: 16px 18px;
}
.protocol-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 14px;
}
.protocol-control label { font-weight: 700; }
.protocol-control select { max-width: 100%; }
.protocol-control .small { flex-basis: 100%; }
.protocol-notice,
.age-cap-summary {
  background: #fff8e9;
  border: 1px solid #ead8aa;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
}
.protocol-notice p,
.age-cap-summary p { margin: 4px 0 0; }
.age-cap-summary summary { cursor: pointer; font-weight: 700; }
.clinical-items .question[hidden] { display: none !important; }
.source-progress .progress-full {
  margin: 10px 0 8px;
}
.source-progress p {
  margin: 0;
}
[data-clinical-guidance] {
  position: sticky;
  top: 12px;
  z-index: 5;
}
.route-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f0f5fb;
  border: 1px solid #d7e4f2;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 0;
  box-shadow: 0 6px 22px rgba(41, 52, 73, .09);
}
.route-callout.route-warning {
  background: #fff8e9;
  border-color: #ead8aa;
}
.route-callout.route-error {
  background: #fff1ef;
  border-color: #e4c0ba;
}
.route-callout.route-pending {
  background: #f4f7f8;
}
.route-callout p {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0;
}
.route-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #59677f;
  background: #f8f9fc;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 10px;
  font-size: 12px;
}
.clinical-items .question-heading > span:last-child {
  white-space: normal;
  line-height: 1.9;
}
.raw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.critical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.critical-entry {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.critical-entry .field {
  margin: 0;
}
.critical-note {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}
.critical-note small {
  color: var(--muted);
  font-weight: 400;
}
.critical-note textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
}
.issues {
  background: #fff7e9;
  border: 1px solid #eddfc7;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}
.issues li {
  margin: 7px 0;
}
.issues li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.readiness-notice {
  margin: 18px 0;
  padding: 15px 18px;
  border: 1px solid #e7c986;
  border-radius: 12px;
  background: #fff8e8;
  color: #65501f;
}
.readiness-notice p {
  margin: 4px 0 0;
}
.readiness-notice.danger {
  border-color: #e6b8b8;
  background: #fff1f1;
  color: #7a2929;
}
.badge.red {
  background: #fde8e8;
  color: #9b2c2c;
}
.critical-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.critical-row p {
  margin: 7px 0 0;
  white-space: pre-wrap;
}
.provenance dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}
.provenance dl > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f9fc;
}
.provenance dt {
  color: var(--muted);
  font-size: 12px;
}
.provenance dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.clinical-report .provenance bdi {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.provenance code {
  font-size: 11px;
  white-space: normal;
}
.loading-card {
  text-align: center;
  padding: 60px 24px;
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e2ddef;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: namaa-spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes namaa-spin {
  to {
    transform: rotate(360deg);
  }
}
.clinical-report bdi {
  white-space: nowrap;
}
.clinical-report .norm b {
  color: var(--ink);
  font-weight: 600;
}
.clinical-report .norm.featured {
  background: #f0ecf9;
  border-color: #d8cbed;
}
.score-profile {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfaff;
  break-inside: avoid;
}
.score-profile-axis {
  display: flex;
  justify-content: space-between;
  direction: ltr;
  margin-left: 173px;
  margin-right: 168px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.score-profile-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) 70px 79px;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  min-width: 0;
}
.score-profile-label {
  font-weight: 600;
  line-height: 1.5;
}
.score-profile-track {
  height: 15px;
  border-radius: 99px;
  background: #e9eaf2;
  overflow: hidden;
}
.score-profile-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b98bc, #7451a5);
}
.score-profile-row.is-composite .score-profile-fill {
  background: linear-gradient(90deg, #577fb9, #624795);
}
.score-profile-row.is-motor .score-profile-fill {
  background: linear-gradient(90deg, #4b98bc, #5f78b8);
}
.score-profile-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  line-height: 1.4;
}
.score-profile-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.clinical-report .report-card {
  margin-bottom: 20px;
}
.clinical-report {
  position: relative;
  isolation: isolate;
}
.clinical-report > :not(.clinic-report-watermark) {
  position: relative;
  z-index: 1;
}
.clinic-report-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.clinic-report-branding img,
.clinic-report-logo {
  display: block;
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
}
.clinic-report-branding > div {
  min-width: 0;
}
.clinic-report-branding p {
  margin: 2px 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.clinic-report-watermark {
  position: absolute;
  top: 420px;
  left: 50%;
  width: min(42%, 320px);
  max-height: 320px;
  transform: translate(-50%, -50%);
  object-fit: contain;
  opacity: .04;
  pointer-events: none;
  z-index: 2;
}
.pre-wrap {
  white-space: pre-wrap;
}
@media (max-width: 900px) {
  .raw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .critical-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .score-profile { padding: 15px 12px; }
  .score-profile-axis {
    margin-left: 0;
    margin-right: 0;
  }
  .score-profile-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    margin: 14px 0;
  }
  .score-profile-track { grid-column: 1 / -1; grid-row: 2; }
  .score-profile-note { grid-column: 1 / -1; }
  .raw-grid {
    grid-template-columns: 1fr;
  }
  .critical-grid {
    grid-template-columns: 1fr;
  }
  .comparison-picker,
  .provenance dl {
    grid-template-columns: 1fr;
  }
  .issues li {
    align-items: flex-start;
    flex-direction: column;
  }
  .route-callout {
    align-items: flex-start;
    flex-direction: column;
  }
  .entry-mode .btn {
    flex: 1;
  }
}
@media print {
  .score-profile {
    padding: 10px 12px;
    background: #fff;
  }
  .score-profile-row { margin: 6px 0; }
  .score-profile-track {
    background: #e9eaf2 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .score-profile-fill {
    background: #624795 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body {
    font-family: Cairo, sans-serif;
    background: #fff;
  }
  .skip-link {
    display: none !important;
  }
  .selection-grid {
    grid-template-columns: 1fr 1fr;
  }
  .report-card {
    box-shadow: none;
  }
  .entry-mode {
    display: none;
  }
}

@media print {
  .clinical-report .table-wrap {
    overflow: visible;
  }
  .clinical-report table {
    table-layout: fixed;
  }
  .clinical-report th,
  .clinical-report td,
  .clinical-report td .badge {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .clinical-report .readiness-notice {
    break-inside: avoid;
  }
  .clinical-report .report-card {
    padding: 0;
    border: 0;
    margin-bottom: 16px;
  }
  .clinical-report .report-card td,
  .clinical-report .report-card th {
    padding: 6px 7px;
  }
  .clinical-report .norms {
    display: flex;
    gap: 8px;
  }
  .clinical-report .norm {
    flex: 1;
    min-width: 0;
    padding: 10px;
    font-size: 11px;
  }
  .clinical-report .norm small {
    display: block;
    font-size: 9px;
    line-height: 1.8;
  }
  .clinical-report .norm .badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .clinic-report-branding img,
  .clinic-report-logo {
    max-width: 72px;
    max-height: 72px;
  }
  .clinic-report-watermark {
    position: fixed;
    top: 50%;
    width: 240px;
    opacity: .04;
  }
}
