/* The teacher page (IKR-144; mock-up docs/design/looks/teacher-onboarding.md): Ikra's own scheme, ivory paper in light
   and deep forest in dark, the app's fonts (Bricolage Grotesque, Readex Pro; OFL, in fonts/). The card is the app's
   sand card in both schemes (card.css rules below, shared with the admin). */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque.ttf") format("truetype"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro.ttf") format("truetype"); font-weight: 160 700; font-display: swap; }

:root {
  --bg: #F6F1E5; --surface: #FFFCF6; --sunken: #ECE4D2; --ink: #17261D; --ink2: #46574D; --ink3: #5D6C62; --line: #DDD3BD;
  --accent: #1F3D2B; --on-accent: #F4EEDF; --ok: #2F6B3A; --warn: #8A4A00; --warnbg: #FFE8C6; --err: #A3201A;
  --field: #958970; --shadow: 0 18px 40px -26px rgba(23,38,29,.45);
  --br: "Bricolage Grotesque", -apple-system, system-ui, sans-serif;
  --ar: "Readex Pro", "Bricolage Grotesque", system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11211A; --surface: #1A3125; --sunken: #0D1A14; --ink: #F4EEDF; --ink2: #CAD3C7; --ink3: #A3B3A8; --line: #2B4A3A;
    --accent: #E8DCC4; --on-accent: #1F3D2B; --ok: #9FD08A; --warn: #FEB805; --warnbg: #4D3711; --err: #FFA79B;
    --field: #5E7366; --shadow: 0 18px 40px -26px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--br); -webkit-font-smoothing: antialiased; min-height: 100vh; }
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--ar); }
:lang(ar) { font-family: var(--ar); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.devstrip { background: var(--warnbg); color: var(--warn); font: 650 12px/1 var(--ui); text-align: center; padding: 8px 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.word { display: flex; align-items: center; gap: 8px; font: 600 15px var(--br); color: var(--ink); text-decoration: none; }
/* The drawn wordmark اقرأ (docs/brand/logo, the same paths as the site's top bar), in the text colour. */
.word .logo { display: block; height: 30px; width: auto; aspect-ratio: 154 / 131; flex: none; direction: ltr; color: var(--ink); }
.word .lat { color: var(--ink2); font-weight: 550; }
.langpick { position: relative; }
.langpick select { appearance: none; -webkit-appearance: none; border: 0; font: 600 13px var(--ui); color: var(--ink); padding: 8px 14px; border-radius: 999px; background: var(--sunken); cursor: pointer; }
.langpick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main { outline: none; }
.single { max-width: 440px; margin: 0 auto; }
.layout { display: block; }
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: start; }
  .layout .side { position: sticky; top: 16px; }
  .layout .form { max-width: 560px; }
  .mobile-only { display: none !important; }
}
@media (max-width: 899px) { .desktop-only { display: none !important; } }

.steps { display: flex; gap: 6px; margin: 6px 0 8px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--ink); }
.stepl { display: flex; justify-content: space-between; font: 600 13px var(--ui); color: var(--ink2); min-height: 18px; }
.stepl .saved { color: var(--ok); }
.stepl .unsaved { color: var(--warn); }

.t-h { font: 750 32px/1.06 var(--br); letter-spacing: -.025em; margin: 14px 0 8px; font-variation-settings: "wdth" 92; outline: none; }
.t-h.s { font-size: 26px; }
[dir="rtl"] .t-h { font-family: var(--ar); letter-spacing: 0; font-weight: 700; }
.t-p { color: var(--ink2); font-size: 16px; line-height: 1.45; margin: 0 0 16px; }
.small { font: 500 13px/1.4 var(--ui); color: var(--ink2); }
[dir="rtl"] .small { font-family: var(--ar); }
.center { text-align: center; }

/* Fields */
.f { margin: 0 0 16px; }
/* IKR-171: the name in the other script, under "Full name" (a sunken group on the form). */
.names-panel { background: var(--sunken); border-radius: 18px; padding: 14px 14px 2px; margin: 0 0 16px; }
.names-panel h3 { font: 650 16px/1.3 var(--br); margin: 0 0 2px; }
[dir="rtl"] .names-panel h3 { font-family: var(--ar); }
.names-panel > .help { margin: 0 0 6px; }
.f > label, .f > .lbl { display: block; font: 600 14px/1.3 var(--br); color: var(--ink); margin: 0 0 6px; }
.in { width: 100%; min-height: 50px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 13px 14px; font: 450 16px/1.35 var(--br); color: var(--ink); }
[dir="rtl"] .in { font-family: var(--ar); }
textarea.in { min-height: 120px; resize: vertical; line-height: 1.45; }
.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.in[aria-invalid="true"] { border-color: var(--err); }
select.in { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 36px; }
[dir="rtl"] select.in { background-position: 15px 22px, 20px 22px; }
.help { font: 450 13px/1.35 var(--ui); color: var(--ink2); margin-top: 6px; display: flex; justify-content: space-between; gap: 10px; }
[dir="rtl"] .help { font-family: var(--ar); }
.msg { font: 550 13px/1.35 var(--ui); color: var(--err); margin-top: 6px; }
.msg:empty { display: none; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="password"] { direction: ltr; text-align: right; }

.seg { display: flex; background: var(--sunken); border-radius: 13px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; font: 600 14px/1 var(--br); padding: 12px 6px; border-radius: 10px; color: var(--ink2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg button:disabled { cursor: not-allowed; opacity: .6; }
.seg .arl { font-family: var(--ar); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 15px/1 var(--br); padding: 11px 15px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); display: inline-flex; gap: 7px; align-items: center; background: none; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip svg { width: 16px; height: 16px; }
.chip .arl { font-family: var(--ar); }

.panel { background: var(--surface); border-radius: 20px; padding: 4px 16px; box-shadow: var(--shadow); margin: 0 0 16px; }
.panel.pad { padding: 16px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font: 600 15px/1.3 var(--br); color: var(--ink); }
.row .s { font: 450 13px/1.35 var(--ui); color: var(--ink2); margin-top: 2px; }
[dir="rtl"] .row .s { font-family: var(--ar); }
.row .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sunken); color: var(--ink2); }
.row .dot.ok { background: var(--ok); color: var(--bg); }
.row .dot.warn { background: var(--warn); color: var(--bg); }
.row .dot svg { width: 13px; height: 13px; }
.row .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 13px var(--ui); flex: none; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--line); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.switch input:checked + span { background: #34C759; }
.switch input:checked + span::after { inset-inline-start: 22px; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons: the app's pill with its round end */
.btn { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 62px; border-radius: 31px; background: var(--accent); color: var(--on-accent); border: 0; padding: 0 7px; padding-inline-start: 26px; font: 650 18px/1 var(--br); margin: 18px 0 6px; cursor: pointer; text-decoration: none; text-align: start; }
[dir="rtl"] .btn { font-family: var(--ar); }
.btn .end { width: 48px; height: 48px; border-radius: 50%; background: var(--on-accent); color: var(--accent); display: grid; place-items: center; flex: none; }
.btn .end svg { width: 22px; height: 22px; }
[dir="rtl"] .btn .end svg.arrow { transform: scaleX(-1); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:focus-visible, .btn2:focus-visible, .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn2 { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border-radius: 26px; border: 1.5px solid var(--line); background: none; color: var(--ink); font: 600 16px/1 var(--br); margin: 10px 0 0; cursor: pointer; text-decoration: none; }
.btn2 svg { width: 18px; height: 18px; }
.link { color: var(--ink); font: 600 15px var(--br); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); background: none; border: 0; padding: 0; cursor: pointer; }
[dir="rtl"] .link { font-family: var(--ar); }
.links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 14px 0; }

.notice { border-radius: 16px; padding: 14px 16px; background: var(--warnbg); color: var(--ink); font-size: 15px; line-height: 1.45; margin: 0 0 16px; }
.notice b { display: block; font-weight: 700; margin-bottom: 3px; color: var(--warn); }
.notice q { display: block; margin: 6px 0; }
.mark { color: var(--warn); font: 650 12px var(--ui); margin-inline-start: 6px; }
.okline { display: flex; gap: 8px; align-items: center; color: var(--ok); font: 650 15px var(--br); }
.okline svg { width: 20px; height: 20px; }

.otp { display: flex; gap: 8px; margin: 6px 0 4px; direction: ltr; }
.otp input { width: 46px; height: 58px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; font: 700 24px var(--br); color: var(--ink); padding: 0; }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.thumb { width: 96px; height: 120px; border-radius: 12px; object-fit: cover; display: block; border: 2px solid transparent; padding: 0; background: var(--sunken); cursor: pointer; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.addthumb { width: 96px; height: 120px; border-radius: 12px; border: 1.5px dashed var(--field); display: grid; place-items: center; color: var(--ink2); font: 600 12px/1.3 var(--ui); text-align: center; background: none; cursor: pointer; padding: 6px; }
.addthumb svg { width: 22px; height: 22px; display: block; margin: 0 auto 4px; }
.ijazah-fields { margin-top: 4px; }

.rec { display: flex; align-items: center; gap: 14px; }
.recbtn { width: 72px; height: 72px; border-radius: 50%; background: #C8322A; display: grid; place-items: center; color: #fff; flex: none; border: 0; cursor: pointer; box-shadow: 0 0 0 6px color-mix(in srgb, #C8322A 18%, transparent); }
.recbtn svg { width: 28px; height: 28px; }
.timer { font: 700 22px/1 var(--br); font-variant-numeric: tabular-nums; }
audio { width: 100%; margin-top: 10px; }

.photo-row { display: flex; gap: 14px; align-items: center; }
.photo-row .portrait { flex: none; }
.photo-row .btn2 { height: auto; min-height: 52px; padding: 10px 16px; line-height: 1.2; text-align: center; }

/* The card beside the form, its switch and meter, and the folded bar */
.under { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 2px 6px; }
.under .seg { flex: none; width: 230px; }
.under .seg button { padding: 8px 0; font-size: 13px; }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 10px 0 4px; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 2px; transition: width .25s; }
.next { font: 550 13px/1.35 var(--ui); color: var(--ink2); margin-bottom: 16px; }
[dir="rtl"] .next { font-family: var(--ar); }
.next b { color: var(--ink); font-weight: 650; }
.cardbox { margin: 8px 0 0; }
.cardbox.forest { background: #1F3D2B; border-radius: 28px; padding: 16px; }
.compact { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; background: #E8DCC4; color: #1F3D2B; border-radius: 18px; padding: 10px 12px; margin: 0 0 14px; box-shadow: var(--shadow); }
/* Steps 1 and 4: the bar floats at the top once the full card has scrolled away; it never takes room in the page. */
.compact.floating { position: fixed; top: 8px; left: 16px; right: 16px; margin: 0; z-index: 20; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
.compact.floating.on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .compact.floating, .compact.floating.on { transition: none; transform: none; } }
.compact .kc-compact-in { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.compact .grow { flex: 1; min-width: 0; }
.compact .t { font: 700 15px/1.2 var(--br); }
.compact .s { font: 500 12px/1.3 var(--ui); color: #46574D; margin-top: 2px; }
.compact .open { font: 650 13px var(--br); color: #1F3D2B; padding: 8px 12px; border-radius: 999px; background: rgba(31,61,43,.09); border: 0; cursor: pointer; flex: none; }

dialog.sheet { border: 0; padding: 0; width: min(560px, 100vw); max-width: 100vw; max-height: 92vh; border-radius: 24px 24px 0 0; margin: auto auto 0; background: var(--bg); color: var(--ink); }
@media (min-width: 900px) { dialog.sheet { border-radius: 24px; margin: auto; } }
dialog.sheet::backdrop { background: rgba(10,20,14,.5); }
.sheet-in { padding: 14px 16px 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { font: 700 18px var(--br); margin: 0; }
.sheet.forestsheet { background: #1F3D2B; color: #F4EEDF; }
.sheet.forestsheet .link { color: #F4EEDF; }

/* Landing, welcome, waiting */
.inviter { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 16px 0 6px; }
.tour { display: flex; flex-direction: column; align-items: center; text-align: center; }
/* A whole iPhone screen (1206 × 2622), never cropped. */
.tour .pic { width: 200px; aspect-ratio: 1206 / 2622; border-radius: 30px; overflow: hidden; margin: 6px auto 18px; box-shadow: var(--shadow); background: #1F3D2B; }
.tour .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ink); width: 20px; border-radius: 4px; }
.timeline { margin: 4px 0 16px; padding: 0; list-style: none; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 0 0 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--sunken); color: var(--ink2); }
.timeline .tdot.done { background: var(--ok); color: var(--bg); }
.timeline .tdot.now { background: var(--accent); color: var(--on-accent); }
.timeline .tdot svg { width: 14px; height: 14px; }
.timeline .t { font: 650 15px/1.3 var(--br); }
.timeline .s { font: 450 13px/1.35 var(--ui); color: var(--ink2); }
footer.foot { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.busy { opacity: .6; pointer-events: none; }
.fade { animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } .meter i, .switch span, .switch span::after { transition: none; } }


/* The approved page (docs/design/looks/teacher-approved-page.md): the card as an inactive preview, the test app, news. */
.approved .okline { margin-top: 8px; }
.nextstep { background: var(--surface); border-radius: 16px; padding: 12px 14px; margin: 0 0 18px; box-shadow: var(--shadow); }
.nextstep b { display: block; font: 650 15px/1.3 var(--br); color: var(--ink); }
.nextstep span { font: 450 13px/1.4 var(--ui); color: var(--ink2); }
.preview .kc-st { display: none; }
.preview .kc-call { background: #CFC6B4; color: #3F463F; pointer-events: none; }
.preview .kc-call .end { background: #E6DFD0; color: #6B706A; }
.cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 10px 4px 0; }
.cap .link { flex: none; }
.sec { font: 700 20px/1.2 var(--br); letter-spacing: -.01em; color: var(--ink); margin: 34px 2px 10px; }
.tryapp .tf-t { font: 650 17px/1.3 var(--br); color: var(--ink); }
.tryapp .purpose { font: 450 14px/1.4 var(--ui); color: var(--ink2); margin: 6px 0 0; }
.howto { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: howto; }
.howto li { counter-increment: howto; display: flex; gap: 10px; font: 450 14px/1.4 var(--ui); color: var(--ink2); margin: 6px 0; }
.howto li::before { content: counter(howto); width: 20px; height: 20px; border-radius: 50%; background: var(--sunken); color: var(--ink); font: 700 12px/20px var(--ui); text-align: center; flex: none; }
.elsewhere { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 16px 0 4px; font: 600 15px/1.35 var(--br); color: var(--ink); }
.elsewhere .link { flex: none; }
.android { margin: 12px 0 0; }
.news .row { align-items: flex-start; }
.news .when { font: 600 12px/1.2 var(--ui); color: var(--ink2); margin-bottom: 3px; }
.news .by { font: 500 12px/1.2 var(--ui); color: var(--ink2); margin-top: 6px; }
.changeask { margin-top: 26px; }
[dir="rtl"] .sec, [dir="rtl"] .tryapp .tf-t, [dir="rtl"] .nextstep b, [dir="rtl"] .elsewhere { font-family: var(--ar); letter-spacing: 0; }
[dir="rtl"] .howto li, [dir="rtl"] .purpose, [dir="rtl"] .nextstep span { font-family: var(--ar); }

/* IKR-278: the open door (docs/design/looks/apply-to-teach.md): the landing (one column since the shorter application), "First, about you". */
.topbar .tb-end { display: flex; align-items: center; gap: 14px; }
.topbar .tb-end .link { font-size: 14px; }
.seg.pick { background: none; padding: 0; gap: 10px; }
.seg.pick button { min-height: 52px; background: var(--surface); border: 1.5px solid var(--field); color: var(--ink); font-size: 16px; border-radius: 14px; }
.seg.pick button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: none; }
.seg.pick button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.backrow { text-align: center; margin: 12px 0 0; }
.lead-in { padding-top: clamp(20px, 7vh, 72px); }
.lead-in .t-h { font-size: clamp(34px, 5.2vw, 46px); margin-bottom: 12px; text-wrap: balance; }
.lead-in .t-p { font-size: 17px; margin-bottom: 26px; }
[dir="rtl"] .lead-in .t-h { line-height: 1.22; margin-bottom: 16px; }
.lead-in .closed-note { font-size: 15px; margin: 18px 0 0; }
.womennote { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; background: var(--sunken); padding: 12px 14px; margin-top: 10px; font: 500 14px/1.4 var(--br); color: var(--ink); }
.womennote svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ok); }
select.in { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23808a80' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1.5 1.75 4.5 4.5 4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 12px 8px; background-position: right 16px center; }
[dir="rtl"] select.in { background-position: left 16px center; }
.ts { display: flex; justify-content: center; margin: 18px 0; min-height: 0; }
