:root {
  color-scheme: light;
  --paper: #ece7dd;
  --surface: #f3efe7;
  --navy: #142433;
  --sage: #667b6b;
  --muted: #4d5a5d;
  --line: #14243326;
  --display: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--navy); background: var(--paper); font: 16px Inter, Arial, sans-serif; }
header:has(.brand-bar) { border-bottom: 1px solid var(--line); }
.brand-bar { max-width: 1120px; min-height: 75px; margin: auto; padding: 14px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.brand-bar img { display: block; width: min(220px, 58vw); height: auto; }
.brand-bar a, .resource { color: var(--navy); text-underline-offset: .2em; }
.brand-bar a:last-child { font-size: .875rem; font-weight: 600; }
main { line-height: 1.55; width: min(100%, 730px); margin: auto; padding: clamp(26px, 6vw, 60px) 20px 54px; }
h1 { margin: 0; font: 400 clamp(42px, 7vw, 68px)/1.07 var(--display); }
h2 { margin: 0 0 18px; font: 400 29px/1.2 var(--display); }
.intro { max-width: 48ch; color: var(--muted); }
.note, form > p { color: var(--muted); font-size: .875rem; }
.panel, .result { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: clamp(16px, 4vw, 25px); }
.panel + .panel { margin-top: 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.goal { margin-top: 16px; }
.goal legend { color: var(--muted); font-size: .875rem; }
.goal:first-of-type > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.question { margin-bottom: 15px; }
label, legend { font-size: .95rem; font-weight: 600; }
label { display: block; }
label.choice { font-weight: 400; display: flex; gap: 8px; align-items: baseline; }
input, select, textarea, button { font: inherit; }
input[type=checkbox] { accent-color: var(--sage); }
input:not([type=checkbox]), select, textarea { width: 100%; padding: 10px; margin-top: 5px; color: var(--navy); background: #fffdf8; border: 1px solid #7e857f; border-radius: 3px; }
textarea { min-height: 90px; }
.money { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
main button { padding: 11px 18px; border: 1px solid var(--navy); border-radius: 3px; background: var(--navy); color: var(--paper); font-weight: 600; cursor: pointer; }
button.secondary { background: transparent; color: var(--navy); }
main nav { position: static; display: flex; padding: 0; gap: 10px; flex-wrap: wrap; margin-top: 18px; background: none; border: 0; box-shadow: none; }
.resource { display: inline-block; margin-top: 6px; font-size: .9rem; }
summary { cursor: pointer; font-weight: 600; }
details[open] > summary { margin-bottom: 14px; }
.result details { margin-top: 16px; }
.result dl { margin: 0; }
.result dt { font-weight: 700; margin-top: 10px; }
.result dd { margin: 0; }
#form-error { color: #932b22; font-weight: 650; }
:focus-visible { outline: 2px solid #526d5b; outline-offset: 3px; }
[aria-invalid=true] { outline: 2px solid #932b22; }
.send-form { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.send-form button { margin-top: 12px; }
button:disabled { opacity: .62; cursor: wait; }
.admin-main { width: min(100%, 940px); }
.admin-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 20px 0; }
.admin-filters label:first-child { flex: 1 1 250px; }
.record-list { padding: 0; list-style: none; }
.record-list li { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.record-list a, .dashboard a { color: var(--navy); }
.dashboard dd { overflow-wrap: anywhere; }
.dashboard summary { margin-top: 16px; }

.checkup-main .resource { text-decoration: underline; }
html[lang=ar] body, html[lang=ar] .checkup-main :is(h1, h2, h3) { font-family: Cairo, Arial, sans-serif; letter-spacing: normal; }
html[dir=rtl] .checkup-main input[type=email] { direction: ltr; text-align: right; }
