/* mowallid check — mobile first, Arabic-first (RTL), no external assets. */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #16211d;
  --muted: #4d5f58;
  --line: #d3dbd6;
  --line-strong: #8e9c95;
  --brand: #0d5c46;
  --brand-soft: #e7f2ed;
  --ok: #1b6b3a;
  --ok-soft: #e8f4ec;
  --warn: #7a4a00;
  --warn-soft: #fdf1dc;
  --danger: #a3181b;
  --danger-soft: #fbeaea;
  --info: #0b5375;
  --info-soft: #e8f1f6;
  --focus: #0b61c9;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgba(22, 33, 29, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

html[dir="rtl"] body {
  line-height: 1.75;
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.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;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  display: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  inset-inline-start: 0.5rem;
  top: -4rem;
  z-index: 20;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  min-height: 44px;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Header */
.site-header {
  background: var(--surface);
  border-block-end: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 52rem;
  margin-inline: auto;
  padding: 0.625rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand .icon {
  color: var(--brand);
}

.lang-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.875rem;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-toggle:hover {
  background: var(--brand-soft);
}

.site-nav {
  max-width: 52rem;
  margin-inline: auto;
  padding: 0 0.75rem 0.5rem;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--bg);
}

.site-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

/* Main */
main {
  max-width: 52rem;
  margin-inline: auto;
  padding: 1rem 1rem 3rem;
}

/* Banners */
.banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 52rem;
  margin: 0 auto 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--warn);
  border-inline-start-width: 6px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--ink);
}

.banner .icon {
  color: var(--warn);
  margin-block-start: 0.15rem;
}

.banner strong {
  display: block;
}

.banner p {
  margin: 0.25rem 0;
}

.banner--error {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.banner--error .icon {
  color: var(--danger);
}

.banner--notice {
  border-color: var(--info);
  background: var(--info-soft);
}

.banner--notice .icon {
  color: var(--info);
}

/* Official limit card */
.limit-card {
  margin-block: 0.75rem 1.25rem;
  padding: 1rem;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.limit-card__title {
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.limit-card__grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 34rem) {
  .limit-card__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.limit-card__label {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.limit-card__value {
  display: block;
  font-size: 1.25rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

.limit-card .help {
  margin: 0.5rem 0 0;
}

.limit-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

@media (min-width: 48rem) {
  .banner {
    margin-inline: 0;
  }
}

/* Steps */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
}

.steps li[aria-current="step"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}

.steps li:not([aria-current="step"]) .step-num {
  background: var(--muted);
}

/* Cards and sections */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

@media (min-width: 40rem) {
  .step {
    padding: 1.5rem;
  }
}

.step-intro {
  color: var(--muted);
}

h2:focus,
h1:focus {
  outline: none;
}

/* Form */
.field {
  margin: 0 0 1.25rem;
  min-width: 0;
}

.field--tight {
  margin-block-end: 0.5rem;
}

fieldset {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  min-width: 0;
}

legend,
.field > label,
.field > .label {
  display: block;
  font-weight: 700;
  margin-block-end: 0.375rem;
  padding: 0;
}

.field input,
.field select,
.field textarea,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field input[type="radio"],
.field input[type="checkbox"] {
  width: 1.375rem;
  height: 1.375rem;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  border-width: 2px;
}

.help {
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.error {
  margin: 0.375rem 0 0;
  color: var(--danger);
  font-weight: 700;
  font-size: 1rem;
}

.error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-inline-end: 0.375rem;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1;
}

.choices {
  display: grid;
  gap: 0.5rem;
}

.choices--inline {
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  font-weight: 400;
  cursor: pointer;
}

.choice:hover {
  border-color: var(--brand);
}

.choice:has(input:checked) {
  border-color: var(--brand);
  border-width: 2px;
  background: var(--brand-soft);
}

#amps-other-field {
  margin-block-start: 0.75rem;
}

.optional {
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem;
  margin-block: 1.5rem;
  background: var(--bg);
}

.optional > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.optional[open] > summary {
  margin-block-end: 0.5rem;
}

.optional .field:first-of-type {
  margin-block-start: 0.75rem;
}

.extras {
  display: grid;
  gap: 0.75rem;
  margin-block: 0.75rem;
}

.extra-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--surface);
}

@media (min-width: 34rem) {
  .extra-row {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

.form-error-summary {
  border: 2px solid var(--danger);
  border-radius: 0.5rem;
  background: var(--danger-soft);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 700;
  margin-block-end: 1rem;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 2px solid transparent;
  border-radius: 0.625rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: #0a4a39;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-secondary:hover {
  background: var(--brand-soft);
}

.btn-quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-quiet:hover {
  background: var(--bg);
}

.btn-small {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Status */
.status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  margin-block: 1rem;
  border: 1px solid;
  border-inline-start-width: 8px;
  border-radius: var(--radius);
  background: var(--surface);
}

.status .icon {
  width: 2rem;
  height: 2rem;
  margin-block-start: 0.15rem;
}

.status strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.35;
}

.status p {
  margin: 0.375rem 0 0;
}

.status--ok {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.status--ok .icon {
  color: var(--ok);
}

.status--warning {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.status--warning .icon {
  color: var(--warn);
}

.status--violation {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.status--violation .icon {
  color: var(--danger);
}

.status--unavailable {
  border-color: var(--info);
  background: var(--info-soft);
}

.status--unavailable .icon {
  color: var(--info);
}

/* Comparison table */
.table-wrap {
  margin-block: 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

caption {
  text-align: start;
  font-weight: 700;
  padding-block-end: 0.5rem;
}

th,
td {
  padding: 0.625rem 0.5rem;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

thead th {
  font-weight: 700;
  border-block-end: 2px solid var(--line-strong);
}

td.num,
th.num {
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

td.num {
  direction: ltr;
  text-align: end;
}

/* Mobile: turn table rows into labelled cards, keeping table semantics. */
@media (max-width: 43.99rem) {
  .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .compare,
  .compare tbody,
  .compare tr,
  .compare td,
  .compare th {
    display: block;
    width: auto;
  }

  .compare tr {
    border: 1px solid var(--line);
    border-radius: 0.625rem;
    padding: 0.375rem 0.75rem;
    margin-block-end: 0.75rem;
    background: var(--surface);
  }

  .compare th[scope="row"],
  .compare td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    border: 0;
    padding: 0.375rem 0;
    text-align: start;
  }

  .compare th[scope="row"] {
    font-size: 1.0625rem;
    border-block-end: 1px solid var(--line);
  }

  .compare td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
  }

  .compare td.num {
    text-align: end;
  }
}

/* Findings */
.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.findings li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--surface);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge--ok {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--warning {
  border-color: var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
}

.badge--violation {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--info {
  border-color: var(--info);
  background: var(--info-soft);
  color: var(--info);
}

.findings li > span:last-child {
  flex: 1 1 12rem;
}

.notes {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.25rem;
}

.disclaimer-line {
  margin-block-start: 1.5rem;
  padding: 0.75rem 1rem;
  border-inline-start: 4px solid var(--line-strong);
  background: var(--bg);
  font-weight: 600;
}

/* Complaint / report */
.report-brief {
  margin-block: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.report-brief__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.report-brief__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.report-brief__refs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.report-brief__refs strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.report-brief__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.875rem;
  margin-block-start: 0.875rem;
}

.report-brief__grid > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.report-brief__grid span {
  color: var(--muted);
  font-size: 0.875rem;
}

.report-brief__grid strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.complaint-meta {
  display: grid;
  gap: 0.75rem;
  margin-block-end: 1rem;
}

@media (min-width: 34rem) {
  .complaint-meta {
    grid-template-columns: 1fr 1fr;
  }
}

#complaint-text {
  min-height: 18rem;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
}

.complaint-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 1rem;
}

.feedback {
  min-height: 1.5rem;
  margin-block: 0.5rem 0;
  font-weight: 700;
  color: var(--brand);
}

.note-text {
  color: var(--muted);
}

.print-note {
  margin-block: 0.875rem 0;
  padding: 0.75rem 0.875rem;
  border-inline-start: 3px solid var(--brand);
  border-radius: 0.5rem;
  background: var(--brand-soft);
}

/* Tariff page */
.meta-line {
  color: var(--muted);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  margin-block: 1rem;
}

.tariffs th,
.tariffs td {
  border-block-end: 1px solid var(--line);
}

.tariffs td[dir="auto"] {
  min-width: 9rem;
}

.tariffs a {
  white-space: nowrap;
}

/* About page */
.prose h2 {
  margin-block-start: 1.75rem;
}

.prose ul,
.prose ol {
  padding-inline-start: 1.25rem;
  margin: 0 0 1rem;
}

.prose li {
  margin-block-end: 0.5rem;
}

.formula {
  display: block;
  padding: 0.75rem;
  margin-block: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg);
  font-family: ui-monospace, "Cascadia Mono", "Courier New", monospace;
  font-size: 1rem;
  overflow-x: auto;
  white-space: normal;
}

/* Footer */
.site-footer {
  border-block-start: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem 1rem 2rem;
}

.footer-inner {
  max-width: 52rem;
  margin-inline: auto;
}

.footer-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.footer-source {
  margin: 0;
  color: var(--muted);
}

/* Print: full A4 report. */
.print-area {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 12mm 13mm 14mm;
  }

  body {
    background: #fff;
    color: #18231d;
  }

  .site-header,
  .site-nav,
  .site-footer,
  .steps,
  .actions,
  .complaint-tools,
  .report-brief,
  .print-note,
  .banner,
  .skip-link,
  .no-print {
    display: none !important;
  }

  body.complaint-ready > *:not(.print-area) {
    display: none !important;
  }

  body.complaint-ready .print-area {
    display: block !important;
    overflow: visible;
    color: #18231d;
    background: #fff;
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
    font-size: 9pt;
    line-height: 1.42;
    white-space: normal;
  }

  body.complaint-ready #step-complaint,
  .check-bar,
  .result-viz,
  .verdict,
  .metrics,
  .bars,
  .breakdown,
  .result-unavailable {
    display: none !important;
  }

  .step {
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  body[data-page="checker"][data-step="1"] main {
    padding-block-end: 0;
  }

  .pr,
  .pr * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pr {
    width: 100%;
    color: #18231d;
    orphans: 3;
    widows: 3;
  }

  .pr a {
    color: #14532d;
    text-decoration: underline;
    text-underline-offset: 1px;
  }

  .pr-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8mm;
    padding-bottom: 3.5mm;
    border-bottom: 2.2pt solid #14532d;
  }

  .pr-brand {
    display: flex;
    align-items: center;
    gap: 3mm;
    min-width: 0;
  }

  .pr-brand__mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 10mm;
    height: 10mm;
    border-radius: 2mm;
    background: #14532d;
    color: #fff;
  }

  .pr-brand__mark svg {
    width: 6mm;
    height: 6mm;
    fill: currentColor;
  }

  .pr-brand__text {
    display: grid;
    gap: 0.8mm;
    min-width: 0;
  }

  .pr-brand__text strong {
    color: #14532d;
    font-size: 11.5pt;
    line-height: 1.1;
  }

  .pr-brand__text span {
    max-width: 82mm;
    color: #5b685f;
    font-size: 7.5pt;
    line-height: 1.25;
  }

  .pr-doc-meta {
    display: grid;
    flex: 0 0 auto;
    gap: 0.8mm;
    text-align: end;
    color: #5b685f;
    font-size: 7.5pt;
    white-space: nowrap;
  }

  .pr-doc-meta strong {
    color: #14532d;
    font-size: 9pt;
    font-variant-numeric: tabular-nums;
  }

  .pr-intro {
    padding: 5mm 0 4mm;
    border-bottom: 0.8pt solid #d7e1da;
  }

  .pr-kicker {
    margin: 0;
    color: #14532d;
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  .pr-intro h1 {
    margin: 1.5mm 0 1.2mm;
    color: #18231d;
    font-size: 22pt;
    line-height: 1.08;
    letter-spacing: -0.015em;
  }

  .pr-independent-note {
    margin: 0 0 3mm;
    color: #5b685f;
    font-size: 7.8pt;
  }

  .pr-status-row {
    display: flex;
    align-items: flex-start;
    gap: 3.5mm;
  }

  .pr-status {
    display: inline-block;
    flex: 0 0 auto;
    padding: 1.6mm 3.2mm;
    border: 0.8pt solid currentColor;
    border-radius: 99px;
    font-size: 7.5pt;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .pr-status--high {
    background: #fbe9e9;
    color: #8c2929;
  }

  .pr-status--low {
    background: #eaf3fb;
    color: #285c83;
  }

  .pr-status--ok {
    background: #e9f6ed;
    color: #14532d;
  }

  .pr-status--unavailable {
    background: #f2f2ee;
    color: #5d625b;
  }

  .pr-status-row p {
    margin: 0;
    color: #344239;
    font-size: 8.8pt;
    line-height: 1.4;
  }

  .pr-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
    margin-top: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-card {
    min-width: 0;
    padding: 3.5mm;
    border: 0.8pt solid #d7e1da;
    border-radius: 2.5mm;
    background: #f8faf9;
  }

  .pr-card--accent {
    background: #f0f7f2;
  }

  .pr-card h2,
  .pr-section h2 {
    margin: 0 0 2.5mm;
    padding-bottom: 1.2mm;
    border-bottom: 0.8pt solid #d7e1da;
    color: #14532d;
    font-size: 9.5pt;
    line-height: 1.2;
    page-break-after: avoid;
    break-after: avoid;
  }

  .pr-key {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.3pt;
  }

  .pr-key th,
  .pr-key td {
    padding: 1.2mm 0;
    border-bottom: 0.6pt solid #e3eae5;
    text-align: start;
    vertical-align: top;
  }

  .pr-key tr:last-child th,
  .pr-key tr:last-child td {
    border-bottom: 0;
  }

  .pr-key th {
    width: 44%;
    color: #5b685f;
    font-weight: 400;
  }

  .pr-key td {
    color: #1f2b24;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .pr-readings {
    display: grid;
    gap: 2mm;
  }

  .pr-reading {
    display: grid;
    gap: 0.4mm;
    padding-bottom: 1.8mm;
    border-bottom: 0.6pt solid #d7e5db;
  }

  .pr-reading:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .pr-reading span {
    color: #5b685f;
    font-size: 7.5pt;
  }

  .pr-reading strong {
    color: #14532d;
    font-size: 11.5pt;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .pr-reading--high strong {
    color: #8c2929;
  }

  .pr-section {
    margin-top: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-breakdown {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.2pt;
    font-variant-numeric: tabular-nums;
  }

  .pr-table th,
  .pr-table td {
    padding: 1.8mm 2mm;
    border: 0.6pt solid #d7e1da;
    text-align: start;
    vertical-align: top;
  }

  .pr-table thead th {
    background: #14532d;
    color: #fff;
    font-size: 7.2pt;
    font-weight: 700;
  }

  .pr-table tbody th {
    background: #f5f8f6;
    font-weight: 600;
  }

  .pr-table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-breakdown__row--total th,
  .pr-breakdown__row--total td {
    background: #edf5ef;
    color: #14532d;
    font-weight: 700;
  }

  .pr-findings {
    display: grid;
    gap: 1.8mm;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .pr-finding {
    display: flex;
    align-items: flex-start;
    gap: 2.5mm;
    padding: 2mm 2.5mm;
    border-inline-start: 2pt solid #b57a28;
    border-radius: 1.5mm;
    background: #fbf8f0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-finding--high {
    border-inline-start-color: #a13232;
    background: #fdf1f1;
  }

  .pr-finding--warning {
    border-inline-start-color: #b57a28;
    background: #fbf8f0;
  }

  .pr-finding--info {
    border-inline-start-color: #3b6f8d;
    background: #f1f7fa;
  }

  .pr-finding__badge {
    flex: 0 0 auto;
    padding: 1mm 2mm;
    border-radius: 99px;
    background: #fff;
    color: #5b4422;
    font-size: 6.7pt;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .pr-finding p {
    margin: 0;
    color: #344239;
    font-size: 8.1pt;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .pr-empty {
    margin: 0;
    color: #5b685f;
    font-size: 8.3pt;
  }

  .pr-message {
    break-inside: auto;
    page-break-inside: auto;
  }

  .pr-message__body {
    padding: 3.5mm;
    border: 0.8pt solid #d7e1da;
    border-radius: 2.5mm;
    background: #fff;
    color: #26342b;
    font-size: 8.4pt;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .pr-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6mm;
    margin-top: 5mm;
    padding-top: 3.5mm;
    border-top: 1.4pt solid #14532d;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-signoff {
    min-width: 0;
  }

  .pr-signoff p {
    margin: 0 0 1.3mm;
    color: #4f5e55;
    font-size: 7.4pt;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .pr-prepared-for {
    display: flex;
    gap: 1.5mm;
    align-items: baseline;
  }

  .pr-prepared-for strong {
    color: #18231d;
    font-size: 9pt;
  }

  .pr-stamp {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40mm;
    height: 40mm;
    margin-block: 2.5mm;
    margin-inline-end: 3mm;
    border: 2.2pt solid #14532d;
    border-radius: 50%;
    color: #14532d;
    transform: rotate(-7deg);
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr-stamp__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 32mm;
    height: 32mm;
    padding: 2mm;
    border: 0.8pt solid #14532d;
    border-radius: 50%;
    text-align: center;
    line-height: 1.15;
  }

  .pr-stamp__site {
    max-width: 28mm;
    font-size: 5.4pt;
    font-weight: 700;
    letter-spacing: 0.03em;
  }

  .pr-stamp__inner strong {
    margin: 0.8mm 0;
    font-size: 7.2pt;
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .pr-stamp__inner > span:not(.pr-stamp__site):not(.pr-stamp__ref) {
    font-size: 5pt;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .pr-stamp__ref {
    margin-top: 0.8mm;
    font-size: 4.8pt;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
  }

  .pr[lang="ar"] .pr-kicker,
  .pr[lang="ar"] .pr-stamp__inner,
  .pr[lang="ar"] .pr-stamp__inner strong,
  .pr[lang="ar"] .pr-stamp__inner > span {
    letter-spacing: 0;
    text-transform: none;
  }

  .pr-disclaimer {
    margin-top: 3mm;
    padding-top: 2.5mm;
    border-top: 0.6pt solid #d7e1da;
    color: #617067;
    font-size: 6.9pt;
    line-height: 1.4;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pr[lang="ar"] .pr-stamp__inner strong {
    font-size: 8pt;
  }

  .pr[lang="ar"] .pr-stamp__inner > span:not(.pr-stamp__site):not(.pr-stamp__ref) {
    font-size: 5.5pt;
  }
}

/* ------------------------------------------------------------------ refresh */

:root {
  color-scheme: light;
  --brand-strong: #0a4a39;
  --on-brand: #ffffff;
  --on-danger: #ffffff;
}

body[data-page="checker"][data-step="1"] main {
  padding-block-end: 7rem;
}

body[data-page="checker"][data-step="1"] .site-footer {
  padding-block-end: 5rem;
}

.skip-link {
  color: var(--on-brand);
}

/* Step indicator */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.375rem;
}

.steps li {
  justify-content: center;
  min-width: 0;
  padding: 0.375rem 0.5rem;
  font-size: 1rem;
  white-space: nowrap;
}

.steps li > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.steps li[data-done="true"] {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}

.steps li[data-done="true"] .step-num {
  background: var(--ok);
  color: var(--on-brand);
}

.step-num {
  color: var(--on-brand);
  font-size: 0.9375rem;
}

/* Cards and form */
.step {
  padding: 1.25rem;
}

.manual-heading {
  margin-block: 1.75rem 1rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--line);
}

.manual-heading h2 {
  font-size: 1.125rem;
}

.manual-heading .help {
  margin-block-end: 0;
}

.field input,
.field select,
.field textarea,
textarea {
  min-height: 48px;
  border-radius: 0.75rem;
  color: var(--ink);
  font-size: 1rem;
  caret-color: var(--brand);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field select option {
  background: var(--surface);
  color: var(--ink);
}

.choice {
  min-height: 48px;
  border-radius: 0.75rem;
  background: var(--surface);
}

.error::before {
  color: var(--on-danger);
}

.more-details {
  margin-block-start: 1.75rem;
  padding: 0.75rem 1rem;
  border-style: dashed;
  background: transparent;
}

.more-details > summary {
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
}

.more-details > summary::-webkit-details-marker {
  display: none;
}

.more-details > summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
}

.more-details[open] > summary::after {
  content: "−";
}

.form-end {
  display: flex;
  justify-content: center;
  margin-block-start: 1.25rem;
}

/* Sticky check action */
.check-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  display: none;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  border-block-start: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -8px 24px rgba(22, 33, 29, 0.12);
}

.check-bar .btn {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}

body[data-page="checker"][data-step="1"] .check-bar {
  display: block;
}

/* Buttons */
.btn {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.btn-large {
  min-height: 56px;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 1.0625rem;
}

.btn-primary {
  color: var(--on-brand);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn:active {
  transform: translateY(1px);
}

/* Result verdict */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-block: 1rem 1.5rem;
  padding: 1rem;
  border: 1px solid;
  border-inline-start-width: 8px;
  border-radius: 0.875rem;
  background: var(--surface);
}

.verdict .icon {
  width: 2rem;
  height: 2rem;
  margin-block-start: 0.1rem;
}

.verdict strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.35;
}

.verdict p {
  margin: 0.375rem 0 0;
  font-size: 1rem;
}

.verdict--ok,
.verdict--low {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.verdict--ok .icon,
.verdict--low .icon {
  color: var(--ok);
}

.verdict--high {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.verdict--high .icon {
  color: var(--danger);
}

.verdict--unavailable {
  border-color: var(--info);
  background: var(--info-soft);
}

.verdict--unavailable .icon {
  color: var(--info);
}

.result-unavailable {
  margin-block: 0 1.5rem;
  padding: 0.875rem 1rem;
  border-inline-start: 6px solid var(--info);
  border-radius: 0.625rem;
  background: var(--info-soft);
  font-weight: 600;
}

/* Result visualization */
.viz-title {
  margin-block: 1.75rem 0.75rem;
  font-size: 1.125rem;
}

.bars {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--bg);
}

.bar-row {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.bar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 0.75rem;
}

.bar-meta > span {
  font-weight: 600;
}

.bar-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bar-amount {
  flex: none;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.bar-track {
  flex: 1;
  min-width: 0;
  height: 0.875rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill--official,
.bar-fill--ok {
  background: var(--ok);
}

.bar-fill--high {
  background: var(--danger);
}

.metrics {
  display: grid;
  gap: 0.75rem;
  margin-block: 1rem 0;
}

.metric {
  min-width: 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface);
}

.metric-label,
.metric-note {
  display: block;
  color: var(--muted);
}

.metric-label {
  font-weight: 600;
}

.metric-value {
  display: block;
  margin-block: 0.125rem 0.25rem;
  font-size: 1.5rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}

.metric-note {
  font-size: 1rem;
}

.breakdown {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface);
}

.breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.75rem;
  padding: 0.875rem 1rem;
  border-block-end: 1px solid var(--line);
}

.breakdown-row:last-child {
  border-block-end: 0;
}

.breakdown-label {
  grid-column: 1 / -1;
  font-weight: 700;
}

.breakdown-value {
  min-width: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}

.breakdown-row--total {
  background: var(--brand-soft);
}

.breakdown-row--total .breakdown-value {
  color: var(--ink);
  font-weight: 700;
}

@media (min-width: 34rem) {
  .step {
    padding: 1.75rem;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 48rem) {
  .steps {
    gap: 0.75rem;
  }

  .steps li {
    padding: 0.5rem 1rem;
  }
}

/* Motion */
.steps li,
.step-num,
.choice,
.btn {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease, opacity 160ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  .step.is-active {
    animation: step-in 280ms ease both;
  }

  .check-bar {
    animation: bar-up 240ms ease both;
  }
}

@keyframes step-in {
  from {
    opacity: 0.65;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bar-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .step.is-active,
  .check-bar {
    animation: none;
  }

  .bar-fill,
  .btn,
  .choice,
  .step-num,
  .steps li{
    transition: none;
  }
}

/* ------------------------------------------------------------- mobile template */

:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --ink: #16231c;
  --muted: #56675e;
  --line: #dce6de;
  --line-strong: #9bafa3;
  --brand: #0d6547;
  --brand-strong: #084d35;
  --brand-soft: #e5f4ec;
  --ok: #176c3a;
  --ok-soft: #e6f4eb;
  --warn: #7a4a00;
  --warn-soft: #fff4dd;
  --danger: #a8272a;
  --danger-soft: #fdecec;
  --info: #205f7a;
  --info-soft: #e9f4f8;
  --radius: 1.25rem;
  --shadow: 0 12px 40px rgba(26, 54, 36, 0.07);
}

html {
  background-color: var(--bg);
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(70rem 32rem at 50% -10rem, #e7f5ed 0, rgba(231, 245, 237, 0) 68%);
  background-repeat: no-repeat;
}

.btn,
.choice,
.lang-toggle,
.site-nav a,
.more-details > summary {
  touch-action: manipulation;
}

/* Header and navigation */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-block-end: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    backdrop-filter: blur(14px);
  }
}

.bar {
  max-width: 56rem;
  padding: 0.65rem 1rem;
}

.brand {
  min-width: 0;
  gap: 0.6rem;
  font-weight: 800;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand .icon {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0.38rem;
  border-radius: 0.7rem;
  background: var(--brand-soft);
  color: var(--brand);
}

.lang-toggle {
  flex: none;
  min-width: auto;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.site-nav {
  max-width: 56rem;
  gap: 0.25rem;
  padding: 0.1rem 1rem 0.65rem;
}

.site-nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.site-nav a[aria-current="page"] {
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}

/* Main canvas and progress rail */
main {
  max-width: 56rem;
  padding: 1.25rem 1rem 4rem;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 56rem;
  margin: 0 auto 1.25rem;
  padding: 0;
}

.steps::before {
  content: "";
  position: absolute;
  inset-inline: 16.6667%;
  top: 1rem;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.steps li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-width: 0;
  padding: 0 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.steps li[aria-current="step"] {
  background: transparent;
  border: 0;
  color: var(--brand);
  font-weight: 800;
}

.steps li[data-done="true"] {
  background: transparent;
  border: 0;
  color: var(--ok);
}

.steps li:not([aria-current="step"]):not([data-done="true"]) .step-num {
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
}

.steps li[aria-current="step"] .step-num {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.steps li[data-done="true"] .step-num {
  background: var(--ok);
  color: var(--on-brand);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.step-num {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--bg);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 800;
}

/* Typography and cards */
h1 {
  font-size: clamp(1.65rem, 5vw, 2.15rem);
  font-weight: 800;
  line-height: 1.25;
}

.step > h2,
#result-title,
#complaint-title {
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  font-weight: 800;
}

.step-intro {
  max-width: 40rem;
  font-size: 1.0625rem;
}

.step {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.manual-heading {
  margin-block: 1.75rem 1.25rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px dashed var(--line-strong);
}

.manual-heading h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

/* Field surfaces */
.field > label {
  margin-block-end: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
textarea {
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 0.95rem;
  background: #fbfdfb;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.choice {
  min-height: 52px;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 0.95rem;
  background: #fbfdfb;
}

.limit-card {
  border: 1px solid #d3e8da;
  border-radius: 1rem;
  background: #f0faf4;
}

.limit-card__title {
  color: var(--brand);
  font-size: 0.9375rem;
}

.limit-card__value {
  font-size: 1.35rem;
}

.more-details {
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 1rem;
  background: var(--surface);
}

.more-details > summary {
  font-weight: 700;
}

/* Sticky action */
.check-bar {
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  border-block-start: 0;
  background: rgba(244, 247, 242, 0.94);
  box-shadow: 0 -12px 30px rgba(22, 35, 28, 0.1);
}

@supports (backdrop-filter: blur(1px)) {
  .check-bar {
    backdrop-filter: blur(12px);
  }
}

.check-bar .btn {
  min-height: 58px;
  border-radius: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(13, 101, 71, 0.2);
}

/* Result surfaces */
.verdict {
  padding: 1.1rem;
  border: 0;
  border-inline-start-width: 0;
  border-radius: 1.25rem;
  box-shadow: inset 0 0 0 1px var(--line);
}

.verdict--ok,
.verdict--low {
  background: linear-gradient(135deg, #e4f4ea 0%, #f8fdf9 100%);
  box-shadow: inset 0 0 0 1px #cde5d6;
}

.verdict--high {
  background: linear-gradient(135deg, #fdecec 0%, #fff9f9 100%);
  box-shadow: inset 0 0 0 1px #f0cccc;
}

.verdict--unavailable {
  background: linear-gradient(135deg, #e9f4f8 0%, #f9fcfd 100%);
  box-shadow: inset 0 0 0 1px #cce4ee;
}

.verdict .icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.45rem;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(22, 35, 28, 0.08);
}

.verdict strong {
  font-size: clamp(1.3rem, 4vw, 1.5rem);
  font-weight: 800;
}

.result-unavailable {
  border: 0;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px #cce4ee;
}

.viz-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.bars {
  padding: 1rem;
  border-radius: 1.1rem;
  background: #f8fbf9;
}

.bar-track {
  height: 1rem;
}

.metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.metric {
  padding: 0.85rem;
  border: 0;
  border-radius: 1rem;
  background: #f6faf7;
  box-shadow: inset 0 0 0 1px var(--line);
}

.metric-value {
  font-size: clamp(1.2rem, 4vw, 1.45rem);
}

.metric-note {
  font-size: 0.9375rem;
}

.breakdown {
  border-radius: 1rem;
}

.breakdown-row {
  padding: 0.85rem 1rem;
}

.form-info {
  display: grid;
  gap: 0.9rem;
  margin-block-start: 1.5rem;
}

.form-info .banner,
.form-info .limit-card {
  max-width: none;
  margin: 0;
}

/* Phone-first layout */
@media (max-width: 47.99rem) {
  main {
    padding: 0.75rem 1rem 3rem;
  }

  body[data-page="checker"] main {
    padding-block-end: 3rem;
  }

  body[data-page="checker"][data-step="1"] main {
    padding-block-end: 8rem;
  }

  body[data-page="checker"] .step {
    margin-inline: -1rem;
    padding: 1.25rem 1rem 1.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .step > h2,
  #result-title,
  #complaint-title {
    font-size: 1.5rem;
  }

  .steps {
    margin-block: 0.4rem 1rem;
  }

  .steps li {
    font-size: 0.9375rem;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }

  .check-bar {
    padding-inline: 1rem;
  }
}

@media (max-width: 22rem) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------- warm cream theme */

:root {
  color-scheme: light;
  --bg: #faf5ef;
  --surface: #fffdfa;
  --surface-soft: #fbf5ec;
  --surface-strong: #ffffff;
  --ink: #221a12;
  --secondary: #4a3b2c;
  --muted: #8a7a66;
  --line: #eadfd0;
  --line-strong: #d8c7b4;
  --brand: #14532d;
  --brand-strong: #0c3b20;
  --brand-soft: #e7f0e8;
  --primary: #1d150d;
  --primary-hover: #2f2318;
  --on-primary: #ffffff;
  --on-brand: #ffffff;
  --on-danger: #ffffff;
  --ok: #3d7a3f;
  --ok-soft: #e9f3e6;
  --warn: #14532d;
  --warn-soft: #e7f0e8;
  --danger: #b03a2e;
  --danger-soft: #fbe9e5;
  --info: #4a3b2c;
  --info-soft: #f7ede2;
  --focus: #14532d;
  --radius: 20px;
  --shadow: 0 10px 34px rgba(120, 80, 40, 0.07);
  --font-sans: "Plus Jakarta Sans", "Avenir Next", Avenir, "Century Gothic", Futura, "Trebuchet MS", "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

html {
  background-color: var(--bg);
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(64rem 30rem at 50% -8rem, rgba(20, 83, 45, 0.14) 0, rgba(20, 83, 45, 0) 68%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(20, 83, 45, 0.24);
  color: var(--ink);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.025em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
  letter-spacing: normal;
}

.brand,
.btn,
.lang-toggle,
.steps li,
.step-num,
.metric-value,
.limit-card__value,
.bar-amount,
.meta-line {
  font-family: var(--font-sans);
}

a {
  color: var(--brand-strong);
}

a:hover {
  color: var(--brand);
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* Header and navigation */
.site-header {
  background: rgba(250, 245, 239, 0.9);
  border-block-end: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(120, 80, 40, 0.02);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    backdrop-filter: blur(16px) saturate(1.05);
  }
}

.brand {
  color: var(--ink);
  font-weight: 800;
}

.brand .icon {
  border-radius: 0.75rem;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.lang-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 3px 14px rgba(120, 80, 40, 0.06);
}

.lang-toggle:hover {
  border-color: #c7dccd;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.site-nav a {
  color: var(--secondary);
}

.site-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.site-nav a[aria-current="page"] {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 12px rgba(29, 21, 13, 0.14);
}

.skip-link {
  border-radius: 0 0 14px 14px;
  background: var(--primary);
  color: var(--on-primary);
}

/* Hero, progress rail and cards */
body[data-page="checker"] #step-form {
  background-image: radial-gradient(38rem 18rem at 50% -4rem, rgba(20, 83, 45, 0.1) 0, rgba(20, 83, 45, 0) 72%);
}

body[data-page="checker"] #form-title {
  color: var(--ink);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  html[dir="rtl"] body[data-page="checker"] #form-title {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to left, var(--brand) 0 21%, var(--ink) 25% 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }

  html[dir="ltr"] body[data-page="checker"] #form-title {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, var(--brand) 0 21%, var(--ink) 25% 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.step {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-intro {
  color: var(--secondary);
}

.steps::before {
  background: var(--line);
}

.steps li {
  color: var(--muted);
}

.steps li[aria-current="step"] {
  color: var(--ink);
}

.steps li[data-done="true"] {
  color: var(--ok);
}

.steps li:not([aria-current="step"]):not([data-done="true"]) .step-num {
  border-color: var(--bg);
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
}

.steps li[aria-current="step"] .step-num {
  border-color: var(--bg);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.steps li[data-done="true"] .step-num {
  border-color: var(--bg);
  background: var(--ok);
  color: var(--on-primary);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.manual-heading {
  border-block-start-color: var(--line);
}

.help,
.note-text {
  color: var(--muted);
}

/* Inputs and selectable controls */
.field input,
.field select,
.field textarea,
textarea {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
}

.field input:hover,
.field select:hover,
.field textarea:hover,
textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
textarea:focus {
  border-color: var(--brand);
  background: var(--bg);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.16);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field input[aria-invalid="true"]:focus,
.field select[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(176, 58, 46, 0.14);
}

.field input::placeholder,
.field textarea::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.field select option {
  background: var(--surface-strong);
  color: var(--ink);
}

.field input[type="radio"],
.field input[type="checkbox"] {
  width: 1.375rem;
  height: 1.375rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  accent-color: var(--brand);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled,
textarea:disabled {
  border-color: var(--line);
  background: #f3ebe0;
  color: var(--muted);
  cursor: not-allowed;
  -webkit-text-fill-color: var(--muted);
}

.choice {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--secondary);
  font-weight: 600;
}

.choice:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.choice:has(input:focus-visible) {
  outline: 3px solid rgba(20, 83, 45, 0.4);
  outline-offset: 2px;
}

.choice:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.choice:has(input:checked) {
  border: 1.5px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 6px 16px rgba(29, 21, 13, 0.14);
}

.choice:has(input:checked):hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: var(--on-primary);
}

.more-details {
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.more-details > summary {
  color: var(--ink);
}

.more-details > summary:hover {
  color: var(--brand-strong);
}

.more-details > summary::after {
  border-color: #d1e3d5;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.extra-row {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--surface);
}

/* Buttons */
.btn {
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: normal;
}

.btn-primary,
.check-bar .btn {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 8px 22px rgba(29, 21, 13, 0.18);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.check-bar .btn:hover,
.check-bar .btn:focus-visible {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: var(--on-primary);
}

.btn-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--secondary);
  box-shadow: 0 4px 14px rgba(120, 80, 40, 0.05);
}

.btn-secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.btn-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--secondary);
}

.btn-quiet:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn-primary:disabled,
.btn-primary[aria-disabled="true"],
.check-bar .btn:disabled,
.check-bar .btn[aria-disabled="true"] {
  border-color: var(--line);
  background: #f3ebe0;
  color: var(--muted);
  box-shadow: none;
  opacity: 1;
}

.btn:disabled:hover,
.btn[aria-disabled="true"]:hover,
.btn-primary:disabled:hover,
.btn-primary[aria-disabled="true"]:hover,
.check-bar .btn:disabled:hover,
.check-bar .btn[aria-disabled="true"]:hover {
  border-color: var(--line);
  background: #f3ebe0;
  color: var(--muted);
}

.btn:focus,
.btn:focus-visible,
.lang-toggle:focus,
.lang-toggle:focus-visible,
.site-nav a:focus,
.site-nav a:focus-visible,
.more-details > summary:focus,
.more-details > summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.check-bar .btn {
  box-shadow: 0 12px 28px rgba(29, 21, 13, 0.22);
}

.check-bar .btn {
  border-radius: 999px;
}

.check-bar {
  border-block-start: 1px solid var(--line);
  background: rgba(250, 245, 239, 0.92);
  box-shadow: 0 -12px 30px rgba(120, 80, 40, 0.1);
}

@supports (backdrop-filter: blur(1px)) {
  .check-bar {
    backdrop-filter: blur(16px) saturate(1.05);
  }
}

/* Notices, warnings and information cards */
.banner {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--secondary);
  box-shadow: 0 6px 22px rgba(120, 80, 40, 0.04);
}

.banner .icon {
  width: 0.6rem;
  height: 0.6rem;
  margin-block-start: 0.55rem;
  padding: 0;
  border-radius: 50%;
  background: var(--brand);
  color: transparent;
  fill: none;
  stroke: none;
  flex: 0 0 0.6rem;
}

.banner strong {
  color: var(--ink);
}

.banner p {
  color: var(--secondary);
}

.banner a {
  color: var(--brand-strong);
}

.banner--error {
  border-color: #eccbc4;
  background: var(--danger-soft);
}

.banner--error .icon {
  background: var(--danger);
}

.banner--error strong {
  color: var(--danger);
}

.banner--notice {
  border-color: var(--line);
  background: var(--surface-strong);
}

.banner--notice .icon {
  background: var(--brand);
}

.limit-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.limit-card__title {
  color: var(--brand-strong);
}

.limit-card__label {
  color: var(--muted);
}

.limit-card__value {
  color: var(--brand-strong);
  font-weight: 800;
}

.limit-card a {
  color: var(--brand-strong);
}

.form-error-summary {
  border: 1px solid #e8c4bd;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
}

.error {
  color: var(--danger);
}

.error::before {
  background: var(--danger);
  color: var(--on-danger);
}

/* Result states */
.verdict {
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--secondary);
  box-shadow: none;
}

.verdict--ok,
.verdict--low {
  border-color: #cde2c9;
  background: var(--ok-soft);
  color: var(--ok);
  box-shadow: none;
}

.verdict--high {
  border-color: #eccbc4;
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: none;
}

.verdict--unavailable {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--secondary);
  box-shadow: none;
}

.verdict--ok .icon,
.verdict--low .icon,
.verdict--high .icon,
.verdict--unavailable .icon {
  color: inherit;
}

.verdict strong,
.verdict p {
  color: inherit;
}

.verdict .icon {
  border: 1px solid rgba(120, 80, 40, 0.06);
  background: var(--surface-strong);
  box-shadow: 0 4px 14px rgba(120, 80, 40, 0.08);
}

.result-unavailable {
  border: 1px solid var(--line);
  border-inline-start-width: 0;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--secondary);
}

/* Comparison and numbers */
.bars {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: none;
}

.bar-meta > span {
  color: var(--secondary);
}

.bar-amount {
  color: var(--brand-strong);
  font-weight: 800;
}

.bar-row:last-child .bar-amount {
  color: var(--ink);
}

.bar-track {
  border: 1px solid var(--line);
  background: var(--bg);
}

.bar-fill--official {
  background: var(--brand);
}

.bar-fill--ok,
.bar-fill--high {
  background: var(--primary);
}

.metric {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(120, 80, 40, 0.04);
}

.metric-label {
  color: var(--muted);
}

.metric-value {
  color: var(--brand-strong);
  font-weight: 800;
}

.metric-note {
  color: var(--secondary);
}

.breakdown {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(120, 80, 40, 0.04);
}

.breakdown-label {
  color: var(--ink);
}

.breakdown-value {
  color: var(--secondary);
}

.breakdown-row--total {
  background: var(--brand-soft);
}

.breakdown-row--total .breakdown-value {
  color: var(--brand-strong);
}

.disclaimer-line {
  border-inline-start: 3px solid var(--brand);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--secondary);
  font-weight: 600;
}

.feedback {
  color: var(--brand-strong);
}

/* Badges and the remaining status variants */
.badge {
  border-color: var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--secondary);
}

.badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--brand);
}

.badge--ok::before {
  background: var(--ok);
}

.badge--warning::before {
  background: var(--brand);
}

.badge--violation::before {
  background: var(--danger);
}

.badge--info::before {
  background: var(--brand);
}

.status {
  border: 1px solid var(--line);
  border-inline-start-width: 1px;
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--secondary);
}

.status--ok {
  border-color: #cde2c9;
  background: var(--ok-soft);
  color: var(--ok);
}

.status--warning {
  border-color: #d1e3d5;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.status--violation {
  border-color: #eccbc4;
  background: var(--danger-soft);
  color: var(--danger);
}

.status--unavailable {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--secondary);
}

.status--ok .icon,
.status--warning .icon,
.status--violation .icon,
.status--unavailable .icon {
  color: inherit;
}

/* Tariff table and information pages */
.table-scroll {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

thead th {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-block-end: 1px solid var(--line);
}

th,
td {
  border-block-end-color: var(--line);
}

.tariffs tbody tr:hover {
  background: var(--surface-soft);
}

.meta-line {
  color: var(--secondary);
}

.formula {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: normal;
}

.prose h2 {
  color: var(--ink);
}

/* Footer */
.site-footer {
  border-block-start: 1px solid var(--line);
  background: var(--bg);
  color: var(--secondary);
}

.footer-source {
  color: var(--muted);
}

@media (forced-colors: active) {
  html[dir] body[data-page="checker"] #form-title {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    background: none;
  }

  .banner .icon {
    background: CanvasText;
    color: CanvasText;
  }
}

/* Sticky action arrangement */
body[data-page="checker"][data-step="1"] #step-form {
  padding-block-end: calc(6rem + env(safe-area-inset-bottom));
}

body[data-page="checker"][data-step="1"] .check-bar {
  display: flex;
  align-items: center;
}

.check-bar .btn {
  width: auto;
  min-width: min(13rem, 100%);
  max-width: 100%;
  margin-inline: 0;
  margin-left: auto;
  margin-right: 0;
  padding-inline: 1.75rem;
}

/* Keep the floating action anchored to the form column, not the viewport edge. */
body[data-page="checker"][data-step="1"] .check-bar {
  padding-inline: max(1rem, calc((100% - 56rem) / 2 + 1rem));
  background: var(--bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
}

/* Stable viewport dock. The bar lives outside main so Safari cannot use the
   long form section as its fixed-position containing block. */
body[data-page="checker"] .check-bar {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 100vw;
  padding: 0;
  border: 0;
  background: var(--bg);
  box-shadow: 0 -12px 30px rgba(120, 80, 40, 0.1);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
}

body[data-page="checker"][data-step="1"] .check-bar {
  display: block;
}

.check-bar__inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}

.check-bar__inner .btn {
  width: auto;
  min-width: min(13rem, 100%);
  max-width: 100%;
  margin-left: auto;
  margin-right: 0;
  padding-inline: 1.75rem;
}
