:root {
  --green-900: #0f3d24;
  --green-800: #14532d;
  --green-700: #1b6b3a;
  --green-600: #22854a;
  --green-100: #e3f1e7;
  --green-50: #f2f8f3;
  --gold: #d9a21b;
  --gold-100: #fbf1d6;
  --ink: #1b2420;
  --ink-2: #4a5650;
  --ink-3: #7a857f;
  --line: #dde4df;
  --bg: #f6f7f4;
  --card: #ffffff;
  --red: #b42318;
  --red-100: #fde8e6;
  --amber: #b54708;
  --amber-100: #fef0c7;
  --blue: #175cd3;
  --blue-100: #e0eaff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 4px 16px rgba(16, 40, 24, .06);
  --font: "Noto Sans Ethiopic", "Nyala", "Ebrima", "Abyssinica SIL", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15.5px; }
a { color: var(--green-700); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .86em; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; }

/* ---------- top bar ---------- */
.flag-strip { height: 5px; background: linear-gradient(90deg, #078930 0 33.3%, #fcdd09 33.3% 66.6%, #da121a 66.6%); }
.topbar { background: var(--green-800); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; padding: 12px 20px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand svg { flex: none; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { display: block; font-size: .8rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.lang-toggle { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; flex: none; }
.lang-toggle button { background: none; border: 0; color: #fff; padding: 4px 12px; cursor: pointer; font-size: .85rem; }
.lang-toggle button[aria-pressed="true"] { background: var(--gold); color: var(--green-900); font-weight: 600; }
.topbar .who { font-size: .85rem; opacity: .9; text-align: right; }

/* ---------- hero + tabs (public) ---------- */
.hero { background: linear-gradient(160deg, var(--green-800), var(--green-700) 60%, #2d7a3f); color: #fff; }
.hero .wrap { max-width: 1180px; margin: 0 auto; padding: 36px 20px 64px; }
.hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: .3em; }
.hero p { max-width: 680px; opacity: .92; margin: 0; }
.hero .date { display: inline-block; margin-top: 14px; font-size: .85rem; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 999px; }

.tabs { max-width: 1180px; margin: -36px auto 0; padding: 0 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-bottom: 0; padding: 10px 18px; border-radius: 10px 10px 0 0; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--green-800); box-shadow: inset 0 3px 0 var(--gold); }

main.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 48px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* ---------- stepper ---------- */
.steps { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .9rem; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-2); font-weight: 700; font-size: .8rem; }
.steps li + li::after { order: -1; content: ""; width: 24px; height: 2px; background: var(--line); }
.steps li.on { color: var(--green-800); font-weight: 600; }
.steps li.on::before { background: var(--green-700); color: #fff; }
.steps li.done::before { background: var(--green-100); color: var(--green-800); content: "✓"; }

/* ---------- category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; text-align: left; transition: border-color .15s, background .15s; }
.cat:hover { border-color: var(--green-600); }
.cat[aria-checked="true"] { border-color: var(--green-700); background: var(--green-50); box-shadow: 0 0 0 3px var(--green-100); }
.cat .ico { flex: none; width: 36px; height: 36px; border-radius: 9px; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; font-size: 1.15rem; }
.cat.restricted .ico { background: var(--red-100); color: var(--red); }
.cat strong { display: block; font-size: .95rem; line-height: 1.35; }
.cat small { color: var(--ink-3); font-size: .78rem; }

/* ---------- forms ---------- */
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.full { grid-column: 1 / -1; }
label.f { display: block; }
label.f > span { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--ink-2); }
label.f > span em { color: var(--red); font-style: normal; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
textarea { min-height: 140px; resize: vertical; }
.hint { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--green-700); flex: none; }

.switch-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--gold-100); border-color: #f0dc9c; }

.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--ink-3); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--green-600); background: var(--green-50); }
.files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: .88rem; }
.files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; border: 1.5px solid transparent; background: var(--green-700); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s; white-space: nowrap; }
.btn:hover { background: var(--green-800); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--green-800); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--green-600); background: var(--green-50); }
.btn.gold { background: var(--gold); color: var(--green-900); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.link { background: none; color: var(--green-700); padding: 0; border: 0; }
.actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; }

.alert { padding: 12px 14px; border-radius: 8px; font-size: .92rem; margin: 12px 0; }
.alert.err { background: var(--red-100); color: var(--red); }
.alert.ok { background: var(--green-100); color: var(--green-900); }
.alert.info { background: var(--blue-100); color: #102a56; }
.alert.warn { background: var(--amber-100); color: #7a2e0e; }

/* ---------- success ---------- */
.success { text-align: center; padding: 24px 0; }
.success .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 14px; }
.code-box { display: inline-flex; align-items: center; gap: 12px; margin: 14px 0; padding: 12px 20px; background: var(--gold-100); border: 1.5px dashed var(--gold); border-radius: 10px; font-size: clamp(1.2rem, 4vw, 1.7rem); font-weight: 700; color: var(--green-900); flex-wrap: wrap; justify-content: center; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--line); color: var(--ink-2); }
.st-received { background: var(--blue-100); color: var(--blue); }
.st-review { background: var(--amber-100); color: var(--amber); }
.st-investigation { background: #f4ebff; color: #6927da; }
.st-resolved { background: var(--green-100); color: var(--green-800); }
.st-rejected { background: #f2f4f7; color: #475467; }
.st-appealed { background: var(--red-100); color: var(--red); }
.st-closed { background: #eaecf0; color: #344054; }
.pr-high { background: var(--red-100); color: var(--red); }
.pr-normal { background: #f2f4f7; color: #475467; }
.pr-low { background: #f2f4f7; color: #98a2b3; }
.badge.overdue { background: var(--red); color: #fff; }
.badge.lock { background: #1d2939; color: #fff; }
.badge.sample { background: var(--gold-100); color: #7a5a00; }

/* ---------- tracking ---------- */
.track-form { display: flex; gap: 10px; max-width: 560px; }
.track-form input { text-transform: uppercase; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 20px 0; }
.progress div { text-align: center; font-size: .8rem; color: var(--ink-3); }
.progress div::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.progress div.on { color: var(--green-800); font-weight: 600; }
.progress div.on::before { background: var(--green-600); }
.progress div.bad::before { background: var(--ink-3); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 36px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--green-600); }
.timeline li.citizen::before { border-color: var(--gold); }
.timeline li.internal::before { border-color: var(--ink-3); border-style: dashed; }
.timeline .when { font-size: .78rem; color: var(--ink-3); }
.timeline .body { margin-top: 4px; background: var(--bg); padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; word-wrap: break-word; }
.timeline li.internal .body { background: #fffbeb; border: 1px dashed #f0dc9c; }

.stars { display: inline-flex; gap: 4px; }
.stars button { background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--line); padding: 0 2px; line-height: 1; }
.stars button.on { color: var(--gold); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.info-grid .card h3 { font-size: 1rem; color: var(--green-800); }
.info-grid .card p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.num { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--green-900); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }

footer.site { text-align: center; color: var(--ink-3); font-size: .82rem; padding: 24px 20px 36px; }

/* ---------- staff layout ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 69px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 16px 10px; }
.side button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; text-align: left; }
.side button:hover { background: var(--bg); }
.side button[aria-current="true"] { background: var(--green-100); color: var(--green-900); font-weight: 700; }
.side .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 7px; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.content { padding: 24px; min-width: 0; }
.content h2 { font-size: 1.3rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: default; }
.kpi[data-go] { cursor: pointer; }
.kpi[data-go]:hover { border-color: var(--green-600); }
.kpi .v { font-size: 1.7rem; font-weight: 700; color: var(--green-900); line-height: 1.2; }
.kpi .l { font-size: .82rem; color: var(--ink-3); }
.kpi.alert-k .v { color: var(--red); }

.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 36px; align-items: center; gap: 10px; font-size: .86rem; }
.bar-row .track { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--green-600); border-radius: 5px; }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters select, .filters input { width: auto; padding: 7px 10px; font-size: .88rem; }
.filters input[type=search] { min-width: 200px; flex: 1; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .84rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: #fff; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--green-50); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--bg); }
tbody tr.sel { background: var(--green-50); }
td .subj { font-weight: 600; display: block; }
tr:last-child td { border-bottom: 0; }

.drawer { position: fixed; inset: 0 0 0 auto; width: min(760px, 100vw); background: var(--bg); box-shadow: -8px 0 30px rgba(0,0,0,.15); overflow-y: auto; z-index: 20; transform: translateX(100%); transition: transform .2s; }
.drawer.open { transform: none; }
.drawer-head { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 12px; align-items: center; z-index: 1; }
.drawer-body { padding: 20px; display: grid; gap: 16px; }
.scrim { position: fixed; inset: 0; background: rgba(16, 24, 20, .35); z-index: 15; }
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; word-wrap: break-word; min-width: 0; }
.desc { white-space: pre-wrap; background: var(--bg); padding: 12px; border-radius: 8px; word-wrap: break-word; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.att { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: .86rem; background: #fff; }

.login-wrap { min-height: calc(100vh - 69px); display: grid; place-items: center; padding: 20px; }
.login-wrap .card { width: min(400px, 100%); padding: 28px; }

.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(16,24,20,.4); z-index: 30; padding: 16px; }
.modal .card { width: min(460px, 100%); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: flex; gap: 4px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side button { width: auto; white-space: nowrap; }
  .side hr { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar .wrap { padding: 10px 16px; gap: 10px; }
  .brand-text span { display: none; }
  .hero .wrap { padding: 24px 16px 56px; }
  .tabs { padding: 0 16px; }
  .tabs button { padding: 8px 12px; font-size: .88rem; }
  main.wrap { padding: 0 16px 32px; }
  .panel { padding: 18px; border-radius: 0 0 var(--radius) var(--radius); }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .track-form { flex-direction: column; }
  .progress div { font-size: .7rem; }
  dl.kv { grid-template-columns: 1fr; gap: 0 0; }
  dl.kv dd { margin-bottom: 8px; }
  .topbar .who { display: none; }
}
@media print {
  .topbar, .tabs, .hero, footer, .actions, .no-print { display: none !important; }
  .panel { box-shadow: none; border: 0; }
}

.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.actions.center { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.brand .logo { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 2px; box-shadow: 0 0 0 2px rgba(255,255,255,.25); object-fit: cover; }

/* ---------- simple form (low-literacy friendly) ---------- */
.q { padding: 4px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.q-title { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; margin-bottom: 14px; }
.q-num { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.q-hint { color: var(--ink-2); margin: -6px 0 14px; }
.q-err { margin-top: 14px; font-size: 1rem; }
#q1 .cat { padding: 16px; min-height: 76px; align-items: center; }
#q1 .cat .ico { width: 48px; height: 48px; font-size: 1.6rem; border-radius: 12px; }
#q1 .cat strong { font-size: 1.02rem; }
#q1 .cat[aria-checked="true"] .ico::after { content: "✓"; position: absolute; top: 6px; right: 10px; color: var(--green-700); font-weight: 700; }

.big-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 130px; padding: 16px 10px;
  border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font-weight: 700; font-size: 1.05rem; color: var(--green-900); transition: border-color .15s, transform .1s; }
.choice:hover { border-color: var(--green-600); }
.choice:active { transform: scale(.98); }
.choice.voice { background: var(--green-50); border-color: var(--green-600); }
.big-ico { font-size: 2.6rem; line-height: 1; }

.recorder { display: flex; align-items: center; gap: 18px; margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--red-100); }
.rec-btn { flex: none; width: 84px; height: 84px; border-radius: 50%; border: 5px solid #fff; background: var(--red); cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(180,35,24,.35); }
.rec-dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: border-radius .15s, width .15s, height .15s; }
.recorder.on .rec-dot { border-radius: 5px; width: 26px; height: 26px; }
.recorder.on .rec-btn { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(180,35,24,.15); } }
.rec-info { display: flex; flex-direction: column; gap: 2px; }
.rec-info strong { font-size: 1.05rem; }
.rec-time { font-size: 1.8rem; font-weight: 700; color: var(--red); }

.big-text { margin-top: 16px; font-size: 1.05rem; min-height: 120px; }
.media-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.media-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg); border-radius: 12px; flex-wrap: wrap; }
.media-ico { font-size: 1.5rem; }
.media-item audio { flex: 1; min-width: 200px; height: 40px; }
.media-item video { flex: 1; min-width: 200px; max-height: 260px; border-radius: 8px; background: #000; }
.media-item img { max-height: 90px; border-radius: 8px; }
.photo-btn { margin-top: 14px; }

.phone-input { font-size: 1.5rem !important; padding: 14px 16px !important; letter-spacing: .04em; max-width: 360px; }
.anon-line { font-size: .92rem; color: var(--ink-2); }
.send-big { width: 100%; padding: 18px; font-size: 1.25rem; border-radius: 14px; }
.upload-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.upload-bar div { height: 100%; width: 0; background: var(--green-600); transition: width .2s; }
.center-text { text-align: center; }

.media-att { display: grid; gap: 10px; }
.media-att audio, .media-att video { width: 100%; }
.media-att video { max-height: 360px; background: #000; border-radius: 8px; }

@media (max-width: 640px) {
  .big-choices { gap: 8px; }
  .choice { min-height: 108px; font-size: .92rem; padding: 12px 6px; }
  .big-ico { font-size: 2.2rem; }
  .q-title { font-size: 1.2rem; }
  #q1 .cat-grid { grid-template-columns: 1fr 1fr; }
  #q1 .cat { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 110px; }
}
.phone-input + .q-hint { margin: 8px 0 0; }

/* in-page video recorder */
.vrec { margin-top: 16px; border-radius: 16px; overflow: hidden; background: #111; }
.vrec-stage { position: relative; aspect-ratio: 4 / 3; max-height: 60vh; background: #000; }
.vrec-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vrec-stage video.mirror { transform: scaleX(-1); }
.vrec-icon { position: absolute; top: 10px; left: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 1.2rem; cursor: pointer; }
.vrec-icon.right { left: auto; right: 10px; }
.vrec-icon:disabled { opacity: .3; cursor: default; }
.vrec-live { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(180,35,24,.9); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .05em; }
.vrec-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vrec.on .vrec-live { display: inline-flex; }
.vrec-bar { display: flex; align-items: center; gap: 18px; padding: 14px 18px; background: var(--red-100); }
.vrec.on .rec-dot { border-radius: 5px; width: 26px; height: 26px; }
.vrec.on .rec-btn { animation: pulse 1.2s ease-in-out infinite; }

/* =====================================================================
   Design layer v2 — Noto Sans Ethiopic, palette taken from the logo
   (gold sun, green field, blue water), larger type and touch targets.
   ===================================================================== */
@font-face {
  font-family: "Noto Sans Ethiopic";
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-ethiopic-ethiopic.woff2) format("woff2");
  unicode-range: U+1200-139F, U+2D80-2DDF, U+AB00-AB2F, U+1E7E0-1E7FF;
}
@font-face {
  font-family: "Noto Sans Ethiopic";
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-ethiopic-latin.woff2) format("woff2");
  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 {
  --green-900: #0b3320;
  --green-800: #104a2c;
  --green-700: #17693b;
  --green-600: #1f8a4c;
  --green-100: #dff1e5;
  --green-50: #f1f8f3;
  --gold: #f0b429;
  --gold-600: #c98a06;
  --gold-100: #fdf3d7;
  --field-blue: #4a73a1;
  --blue-100: #e3ecf7;
  --ink: #16211b;
  --ink-2: #3f4b44;
  --ink-3: #6f7a73;
  --line: #e2e7e3;
  --bg: #f4f6f2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 51, 32, .05), 0 8px 24px -8px rgba(11, 51, 32, .12);
  --shadow-lg: 0 2px 4px rgba(11, 51, 32, .04), 0 24px 48px -16px rgba(11, 51, 32, .22);
  --font: "Noto Sans Ethiopic", "Nyala", "Ebrima", system-ui, sans-serif;
}

body { font-family: var(--font); font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.005em; }
.i { flex: none; display: block; }

/* header + hero read as one block */
.topbar { background: var(--green-900); }
.topbar .wrap { padding: 14px 24px; }
.brand-text strong { font-size: 1.12rem; font-weight: 700; }
.brand-text span { font-size: .82rem; opacity: .75; font-weight: 400; }
.brand .logo { width: 48px; height: 48px; }
.lang-toggle { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.lang-toggle button { padding: 6px 14px; font-weight: 600; }

.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, #17693b 0%, #104a2c 45%, #0b3320 100%); }
.hero::after { /* the logo's striped sun-over-field disc, echoed as a quiet backdrop */
  content: ""; position: absolute; right: -120px; top: -90px; width: 520px; height: 520px; border-radius: 50%; opacity: .16; pointer-events: none;
  background:
    repeating-linear-gradient(-8deg, transparent 0 22px, rgba(255,255,255,.9) 22px 26px),
    linear-gradient(180deg, var(--gold) 0 38%, #3fae5a 38% 68%, var(--field-blue) 68% 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 44px 24px 84px; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: .35em; }
.hero p { font-size: 1.08rem; max-width: 640px; opacity: .9; line-height: 1.75; }
.hero .date { margin-top: 18px; padding: 5px 14px; font-size: .88rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); }

.tabs { margin-top: -54px; padding: 0 24px; gap: 6px; position: relative; z-index: 2; }
.tabs button { padding: 12px 22px; font-size: 1rem; border-radius: 14px 14px 0 0; background: rgba(255,255,255,.14); color: #fff; border: 0; backdrop-filter: blur(4px); }
.tabs button:hover { background: rgba(255,255,255,.22); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--green-800); box-shadow: inset 0 3px 0 var(--gold); }

main.wrap { padding: 0 24px 56px; }
.panel { border: 0; border-radius: 0 20px 20px 20px; box-shadow: var(--shadow-lg); padding: 36px; }

/* questions as soft cards */
.q { background: #fbfcfa; border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 28px; margin-bottom: 18px; }
.q-title { font-size: 1.45rem; gap: 14px; margin-bottom: 18px; }
.q-num { width: 42px; height: 42px; font-size: 1.1rem; font-weight: 700; background: var(--green-700); box-shadow: 0 0 0 4px var(--gold-100), 0 0 0 5px var(--gold); }
.q-hint { font-size: 1rem; margin: -8px 0 18px; }

/* category tiles */
#q1 .cat-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
#q1 .cat { position: relative; min-height: 86px; padding: 14px 16px; gap: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(11,51,32,.04); transition: border-color .15s, box-shadow .15s, transform .15s, background .15s; }
#q1 .cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9d6cd; }
#q1 .cat strong { font-size: 1.02rem; font-weight: 600; line-height: 1.4; }
#q1 .cat small { font-size: .8rem; line-height: 1.4; display: block; margin-top: 2px; }
#q1 .cat .ico { width: 52px; height: 52px; border-radius: 14px; font-size: 0; }
#q1 .cat .ico::after { content: none; }
.tone-green .ico { background: var(--green-100); color: var(--green-700); }
.tone-gold  .ico { background: var(--gold-100); color: var(--gold-600); }
.tone-blue  .ico { background: var(--blue-100); color: var(--field-blue); }
.tone-red   .ico { background: var(--red-100); color: var(--red); }
.tone-grey  .ico { background: #eef0ee; color: var(--ink-2); }
#q1 .cat[aria-checked="true"] { border: 2px solid var(--green-600); background: var(--green-50); box-shadow: 0 0 0 4px var(--green-100); transform: none; }
.cat .tick { position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; background: var(--green-600); color: #fff; display: none; place-items: center; box-shadow: 0 0 0 3px #fff; }
.cat[aria-checked="true"] .tick { display: grid; }

/* voice / video / write */
.big-choices { gap: 14px; }
.choice { min-height: 176px; gap: 12px; border: 1.5px solid var(--line); border-radius: 20px; background: #fff; font-size: 1.12rem; font-weight: 700; color: var(--ink); box-shadow: 0 1px 2px rgba(11,51,32,.04); transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9d6cd; }
.choice .ring { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; }
.choice.voice .ring { background: var(--green-100); color: var(--green-700); }
.choice.vid .ring { background: var(--blue-100); color: var(--field-blue); }
.choice.txt .ring { background: var(--gold-100); color: var(--gold-600); }
.choice.voice { background: #fff; border-color: var(--line); }
.choice .tag { font-size: .74rem; font-weight: 600; color: var(--green-700); background: var(--green-100); padding: 1px 10px; border-radius: 999px; margin-top: -4px; }
.choice.active { border: 2px solid var(--green-600); box-shadow: 0 0 0 4px var(--green-100); transform: none; }
.photo-btn { border-style: dashed; border-radius: 999px; padding: 10px 20px; color: var(--ink-2); gap: 10px; }
.recorder { border-radius: 20px; padding: 20px 22px; }
.rec-btn { width: 92px; height: 92px; }
.vrec { border-radius: 20px; }
.vrec-icon { display: grid; place-items: center; }
.media-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.media-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); }
.media-item.video .media-ico { background: var(--blue-100); color: var(--field-blue); }
.media-item.photo .media-ico { background: var(--gold-100); color: var(--gold-600); }
.media-item .btn { gap: 6px; }
.big-text { border-radius: 14px; }

/* phone */
.phone-wrap { position: relative; max-width: 380px; }
.phone-wrap .i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--green-700); pointer-events: none; }
.phone-input { width: 100%; max-width: none; padding-left: 56px !important; font-size: 1.55rem !important; font-weight: 600; border-radius: 14px !important; letter-spacing: .06em; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=search], select, textarea { border-radius: 12px; padding: 12px 14px; }
label.f > span { font-size: .92rem; }
.anon-line { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }

/* send */
.send-big { margin-top: 6px; padding: 20px; min-height: 68px; font-size: 1.3rem; font-weight: 700; border-radius: 18px; gap: 12px;
  background: linear-gradient(180deg, var(--green-600), var(--green-700)); box-shadow: 0 10px 24px -10px rgba(23,105,59,.7); }
.send-big:hover { background: linear-gradient(180deg, var(--green-700), var(--green-800)); }
.upload-bar { height: 10px; border-radius: 5px; }

.btn { border-radius: 12px; font-weight: 600; }
.card { border-radius: 18px; }
.code-box { border-radius: 16px; font-weight: 800; }
footer.site { font-size: .88rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar .wrap { padding: 10px 16px; }
  .brand .logo { width: 42px; height: 42px; }
  .hero::after { width: 300px; height: 300px; right: -110px; top: -60px; }
  .hero .wrap { padding: 28px 16px 72px; }
  .hero p { font-size: 1rem; }
  .tabs { padding: 0 12px; margin-top: -50px; gap: 4px; }
  .tabs button { padding: 10px 12px; font-size: .88rem; }
  main.wrap { padding: 0 12px 32px; }
  .panel { padding: 14px; border-radius: 0 0 18px 18px; }
  .q { padding: 18px 14px 20px; border-radius: 16px; }
  .q-title { font-size: 1.22rem; }
  .q-num { width: 36px; height: 36px; font-size: 1rem; }
  #q1 .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  #q1 .cat { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 124px; padding: 14px 12px; }
  #q1 .cat .ico { width: 46px; height: 46px; }
  #q1 .cat strong { font-size: .95rem; }
  .choice { min-height: 136px; font-size: .95rem; border-radius: 16px; }
  .choice .ring { width: 58px; height: 58px; }
  .choice .ring .i { width: 28px; height: 28px; }
  .choice .tag { display: none; }
  .phone-wrap { max-width: none; }
}
[data-icon] { display: inline-flex; }
.choice .ring[data-icon] { display: grid; }
.phone-wrap + .q-hint { margin: 10px 0 0; }

/* language picker */
.lang-select { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 0 10px 0 12px; height: 38px; cursor: pointer; }
.lang-select:hover { background: rgba(255,255,255,.16); }
.lang-select select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font-weight: 600; font-size: .9rem;
  padding: 0 18px 0 0; cursor: pointer; outline: none; width: auto; box-shadow: none; }
.lang-select::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; opacity: .8; }
.lang-select select option { color: var(--ink); background: #fff; }
.lang-select:focus-within { box-shadow: 0 0 0 3px rgba(240,180,41,.45); }

/* phones: three equal tabs that wrap their own text; brand name wraps instead of being cut */
@media (max-width: 640px) {
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .tabs button { padding: 10px 6px; font-size: .82rem; line-height: 1.3; text-align: center; white-space: normal; display: flex; align-items: center; justify-content: center; min-height: 52px; }
  .brand-text strong { white-space: normal; font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lang-select { height: 36px; padding: 0 8px 0 10px; }
  .lang-select select { font-size: .82rem; max-width: 118px; }
  .topbar .wrap { gap: 8px; }
}

/* five-language toggle */
.lang-toggle.multi button { padding: 6px 12px; white-space: nowrap; }
.lang-toggle.multi button + button { border-left: 1px solid rgba(255,255,255,.18); }
.lang-toggle.multi button[aria-pressed="true"] + button, .lang-toggle.multi button + button[aria-pressed="true"] { border-left-color: transparent; }
.lang-toggle.multi button:not([aria-pressed="true"]):hover { background: rgba(255,255,255,.12); }
@media (max-width: 640px) {
  .topbar .wrap:has(.lang-toggle.multi) { flex-wrap: wrap; }
  .topbar .wrap:has(.lang-toggle.multi) .spacer { display: none; }
  .topbar .wrap:has(.lang-toggle.multi) .brand { flex: 1; }
  .lang-toggle.multi { order: 3; width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lang-toggle.multi button { padding: 7px 2px; font-size: .8rem; text-align: center; overflow: hidden; text-overflow: ellipsis; }
}

/* code on top, Amharic name underneath */
.lang-toggle.multi { border-radius: 14px; align-items: stretch; }
.lang-toggle.multi button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.15; padding: 5px 12px; }
.lang-toggle.multi button b { font-size: .86rem; font-weight: 800; letter-spacing: .04em; }
.lang-toggle.multi button small { font-size: .68rem; font-weight: 500; opacity: .85; white-space: nowrap; }
@media (max-width: 640px) {
  .lang-toggle.multi button { padding: 6px 2px; }
  .lang-toggle.multi button small { font-size: .64rem; }
}
