/* AKITU Driving School
   Design system: design-system/akitu/MASTER.md ("Civic clarity") */

@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;   /* the site is designed light-only: stop dark mode recolouring form fields */
  --navy: #13265c;
  --navy-dark: #0c1a40;
  --link: #1d3a8a;
  --gold: #e0aa45;
  --brick: #b5442f;
  --page: #fcfcfd;
  --surface: #fefefe;
  --grey-50: #f4f5f8;
  --grey-100: #e9ecf1;
  --line: #d9dde4;
  --ink: #15171f;
  --ink-soft: #4f5566;
  --on-navy: #f7f8fb;
  --on-navy-soft: #c9d0e4;
  --ok: #1f6b45;
  --err: #a8271f;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 400 18px/1.65 var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: inherit; font-weight: 700; line-height: 1.2; margin: 0 0 .6em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(2.25rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 70ch; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(600px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 0; top: 0; transform: translateY(-200%); }
.skip:focus { transform: none; inset-inline-start: 1rem; top: .5rem; z-index: 99; background: var(--gold); color: var(--ink); padding: .6rem 1rem; font-weight: 700; }
.hidden { display: none !important; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--ink-soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Utility bar + header ---------- */
.utility { background: var(--navy-dark); color: var(--on-navy-soft); font-size: .88rem; }
.utility .wrap { display: flex; justify-content: space-between; gap: 1rem; min-height: 40px; align-items: center; flex-wrap: wrap; }
.utility a { color: var(--on-navy); font-weight: 600; }
.utility .phones { display: flex; gap: 1.2rem; }
@media (max-width: 640px) { .utility .lang { display: none; } .utility .wrap { justify-content: center; } }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header::after { content: ""; display: block; height: 4px; background: var(--navy); box-shadow: inset 0 -1px 0 var(--gold); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--navy); text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand b { display: block; font-size: 1.3rem; letter-spacing: .04em; line-height: 1.1; }
.brand small { display: block; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink); font-weight: 600; font-size: .98rem; text-decoration: none; padding: .4rem 0; border-bottom: 3px solid transparent; }
.nav a:not(.btn):hover { color: var(--link); border-bottom-color: var(--link); }
.nav .btn { padding-block: .55rem; }
@media (max-width: 900px) { .nav .hide-sm { display: none; } .nav { gap: 1rem; } }
@media (max-width: 480px) { .brand small { display: none; } .brand b { font-size: 1.1rem; } .brand img { width: 36px; height: 36px; } }

.breadcrumbs { background: var(--grey-50); border-bottom: 1px solid var(--line); font-size: .9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .7rem 0; }
.breadcrumbs li + li::before { content: "›"; margin-inline-end: .4rem; color: var(--ink-soft); }
.breadcrumbs [aria-current] { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.35rem; border-radius: 4px; border: 2px solid transparent; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-lapis { background: var(--navy); color: var(--on-navy); }
.btn-lapis:hover { background: var(--navy-dark); text-decoration: underline; }
.btn-gold { background: var(--gold); color: var(--ink); }
.sso { display: grid; gap: .6rem; margin-bottom: 1rem; }
.btn-sso { width: 100%; background: #fff; color: var(--ink); border-color: #b1b4b6; }
.btn-sso:hover { border-color: var(--navy); text-decoration: underline; }
.sso-or { display: flex; align-items: center; gap: .75rem; margin: .4rem 0 0; color: var(--ink-soft, #505a5f); font-size: .95rem; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; border-top: 1px solid #b1b4b6; }
.btn-gold:hover { background: #ecbd60; text-decoration: underline; }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--navy); }
.btn-ghost:hover { background: var(--grey-50); }
.on-navy .btn-ghost { color: var(--on-navy); }
.on-navy .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-small { min-height: 40px; padding: .45rem .95rem; font-size: .93rem; }
.btn-danger { background: transparent; color: var(--err); border-color: currentColor; }
.btn[disabled] { opacity: .5; cursor: not-allowed; text-decoration: none; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 700; font-size: .98rem; margin: 0 0 .35rem; }
.field { margin-bottom: 1.2rem; }
.hint { font-size: .9rem; color: var(--ink-soft); margin-top: .3rem; }
input, select, textarea { width: 100%; min-height: 48px; padding: .65rem .85rem; border: 2px solid #6b7184; border-radius: 4px; font: 1rem var(--font); background: var(--surface); color: var(--ink); }
textarea { min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--navy); }
.checkbox { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; }
.checkbox input { width: 24px; min-height: 24px; height: 24px; margin-top: .1rem; flex: none; accent-color: var(--navy); }
.code-input { font-size: 1.7rem; letter-spacing: .45em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

.msg { padding: .9rem 1rem; border-radius: 4px; margin: 0 0 1rem; font-weight: 600; border: 1px solid; }
.msg:empty { display: none; }
.msg.ok { background: #eaf5ee; color: var(--ok); border-color: #b9dcc6; }
.msg.err { background: #fcecea; color: var(--err); border-color: #f0c3bd; }
.msg.info { background: #edf1fa; color: var(--navy); border-color: #c8d3ee; }

/* =====================================================================
   HOME
   ===================================================================== */
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-grey { background: var(--grey-50); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

/* Hero: navy panel + full-height photo */
.hero { padding: 0; background: var(--navy); color: var(--on-navy); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 520px; }
.hero-text { padding-block: clamp(3rem, 6vw, 5rem); padding-inline: max(1.25rem, calc((100vw - 1200px) / 2)) clamp(1.25rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { color: var(--on-navy); max-width: 18ch; }
.hero .lead { color: var(--on-navy-soft); max-width: 46ch; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 2rem; }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .5rem 2rem; margin: 0; padding: 1.2rem 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .95rem; color: var(--on-navy); }
.facts b { display: block; font-size: 1.15rem; color: var(--gold); }
.hero-photo { margin: 0; position: relative; background: var(--navy-dark); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem 1rem; background: rgba(12, 26, 64, .82); color: var(--on-navy); font-size: .85rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 4 / 3; order: -1; }
  .hero-text { padding-inline: 1.25rem; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* Key tasks */
.tasks { padding: 0; transform: translateY(-2.5rem); margin-bottom: -2.5rem; position: relative; z-index: 2; }
.task-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.task { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom: 4px solid var(--navy); border-radius: 6px; padding: 1.3rem 1.2rem; color: var(--ink); text-decoration: none; box-shadow: 0 6px 18px -12px rgba(19, 38, 92, .35); transition: border-color .15s; }
.task:hover { border-bottom-color: var(--gold); }
.task:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; }
.task svg { width: 36px; height: 36px; flex: none; }
.task h3 { font-size: 1.08rem; margin: 0 0 .2rem; color: var(--link); }
.task p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 960px) { .task-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .task-grid { grid-template-columns: 1fr; } .tasks { transform: none; margin: 1.5rem 0 0; } }

/* Price table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; background: var(--surface); }
caption { text-align: start; font-weight: 700; padding-bottom: .6rem; color: var(--ink-soft); }
th, td { text-align: start; padding: .95rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--grey-100); color: var(--navy); font-size: .9rem; border-bottom: 2px solid var(--navy); }
.price-table td.price { font-weight: 700; font-size: 1.15rem; color: var(--navy); white-space: nowrap; }
.price-table td .desc { display: block; font-size: .92rem; color: var(--ink-soft); }
.price-table td:last-child { text-align: end; white-space: nowrap; }
.notes { margin: 1.4rem 0 0; padding-inline-start: 1.2rem; color: var(--ink-soft); }
.notes li { margin-bottom: .35rem; }
@media (max-width: 640px) {
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); padding: .6rem 0; }
  .price-table td { border: 0; padding: .3rem .6rem; }
  .price-table td:first-child { grid-column: 1 / -1; }
  .price-table td:last-child { grid-column: 1 / -1; text-align: start; }
}

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; top: 24px; inset-inline-start: 24px; inset-inline-end: 33%; height: 2px; background: var(--line); }
.steps li { position: relative; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: var(--on-navy); font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem; box-shadow: 0 0 0 6px var(--page); }
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .steps::before { display: none; } }

/* Why us */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.feature svg { width: 40px; height: 40px; margin-bottom: .9rem; }
.feature h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature p { color: var(--ink-soft); font-size: .97rem; margin: 0; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Callout */
.callout { display: flex; gap: 1rem; align-items: flex-start; background: #edf1fa; border: 1px solid #c8d3ee; border-radius: 6px; padding: 1.3rem 1.4rem; margin-top: 2.5rem; }
.callout svg { width: 28px; height: 28px; flex: none; margin-top: .15rem; }
.callout h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.callout p { margin: 0; color: var(--ink); }

/* Student gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--grey-100); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; gap: .6rem; } }
.gallery-more { margin-top: 1.6rem; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split img { width: 100%; height: auto; border-radius: 6px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.6rem; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.6rem; }
.contact dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .8rem 1.5rem; }
.contact dt { font-weight: 700; color: var(--navy); }
.contact dd { margin: 0; }
.contact .phone-big { font-size: 1.35rem; font-weight: 700; }
.contact .sign { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .contact dl { grid-template-columns: 1fr; gap: .1rem; } .contact dd { margin-bottom: .7rem; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy-soft); font-size: .95rem; border-top: 4px solid var(--gold); }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.site-footer h2 { font-size: 1rem; color: var(--on-navy); margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--on-navy); }
.site-footer .brand { color: var(--on-navy); margin-bottom: .8rem; }
.site-footer .brand small { color: var(--on-navy-soft); }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .15); padding: 1.1rem 0 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; font-size: .85rem; }
@media (max-width: 760px) { .footer-main { grid-template-columns: 1fr; } }

/* =====================================================================
   APP PAGES (sign in, account, booking, owner dashboard)
   ===================================================================== */
.page { padding: clamp(2rem, 5vw, 3rem) 0 4.5rem; }
.page-title { margin-bottom: 1.4rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.3rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--grey-50); border: 1px solid var(--line); border-radius: 6px; padding: 1.2rem; }
.card .price { font-size: 1.8rem; font-weight: 700; color: var(--navy); margin: .3rem 0; }
.card .price small { font-size: .95rem; font-weight: 400; color: var(--ink-soft); }
.tabs { display: flex; gap: .2rem; margin-bottom: 1.4rem; border-bottom: 2px solid var(--line); }
.tabs button { background: none; border: 0; min-height: 48px; padding: .6rem 1rem; font: 600 1rem var(--font); color: var(--ink-soft); cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }
.qr { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .8rem; width: 220px; height: 220px; margin: 1rem auto; }
.secret { font-family: ui-monospace, monospace; background: var(--grey-50); border: 1px solid var(--line); padding: .55rem .75rem; border-radius: 4px; word-break: break-all; font-size: .9rem; }
.lesson-options { display: grid; gap: .7rem; }
.lesson-option { display: flex; gap: .8rem; align-items: flex-start; border: 2px solid var(--line); border-radius: 6px; padding: .95rem 1rem; cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.lesson-option input { width: 22px; min-height: 22px; height: 22px; margin-top: .15rem; flex: none; accent-color: var(--navy); }
.lesson-option:has(input:checked) { border-color: var(--navy); background: #edf1fa; }
.lesson-option b { display: block; color: var(--navy); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; margin-top: .5rem; }
.slot { min-height: 48px; border: 2px solid var(--line); border-radius: 4px; background: var(--surface); font: 600 .98rem var(--font); cursor: pointer; color: var(--ink); }
.slot:hover { border-color: var(--navy); }
.slot[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.empty { color: var(--ink-soft); font-style: italic; }
.loading { color: var(--ink-soft); }
.booking-list { list-style: none; padding: 0; margin: 0; }
.booking-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.booking-list li:last-child { border-bottom: 0; }
.status { font-size: .85rem; font-weight: 700; padding: .15rem .6rem; border-radius: 4px; background: var(--grey-100); text-transform: capitalize; }
.status.confirmed { background: #eaf5ee; color: var(--ok); }
.status.cancelled { background: #fcecea; color: var(--err); }
td select { min-height: 40px; padding: .3rem .5rem; font-size: .92rem; width: auto; }
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar h2 { margin: 0 auto 0 0; }
.mt { margin-top: 1.8rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.45rem; }
.done-mark { width: 64px; height: 64px; margin-bottom: 1rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.nav .btn-lapis, .nav .btn-lapis:hover { color: var(--on-navy); border-bottom: 2px solid transparent; }

/* Real AKITU logo (cropped from the car sign) */
.brand .logo { width: auto; height: 72px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(19, 38, 92, .18); }
.site-header .wrap { min-height: 96px; }
.site-footer .brand .logo { height: 76px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
@media (max-width: 480px) { .brand .logo { height: 50px; } .site-header .wrap { min-height: 72px; } }

/* Land headings below the sticky header when jumping to a section */
section[id] { scroll-margin-top: 104px; }
@media (max-width: 480px) { section[id] { scroll-margin-top: 80px; } }
.price-table tr.placeholder td { color: var(--ink-soft); }

/* Owner dashboard: price editor */
.edit-table td { vertical-align: middle; }
.edit-table td:first-child { min-width: 260px; }
.edit-table td:first-child input { margin-bottom: .4rem; font-weight: 600; }
.edit-table textarea { min-height: 64px; font-size: .92rem; }
.edit-table td:nth-child(3) { white-space: nowrap; }
.edit-table td:nth-child(3) input { width: 110px; display: inline-block; }
.edit-table .dollar { font-weight: 700; margin-right: .3rem; }
.edit-table input[type="checkbox"] { width: 24px; height: 24px; min-height: 24px; accent-color: var(--navy); }


/* =====================================================================
   LANGUAGES: Assyrian (East Syriac Adiabene), Classical Syriac
   (Estrangelo Edessa), Arabic (Noto Sans Arabic). Meltho fonts are
   Beth Mardutho's unmodified files; licence in fonts/meltho-license.txt.
   Each font only downloads when its script appears on the page.
   ===================================================================== */
@font-face { font-family: "East Syriac Adiabene"; src: url("../fonts/SyrCOMAdiabene.otf") format("opentype"); font-display: swap; unicode-range: U+0700-074F, U+0860-086F, U+0300-036F, U+200C-200F, U+25CC; }
@font-face { font-family: "Estrangelo Edessa"; src: url("../fonts/SyrCOMEdessa.otf") format("opentype"); font-display: swap; unicode-range: U+0700-074F, U+0860-086F, U+0300-036F, U+200C-200F, U+25CC; }
@font-face { font-family: "Noto Sans Syriac Eastern"; src: url("../fonts/noto-sans-syriac-eastern-syriac-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0700-074F, U+0860-086F, U+0300-036F; }
@font-face { font-family: "Noto Sans Syriac Eastern"; src: url("../fonts/noto-sans-syriac-eastern-syriac-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0700-074F, U+0860-086F, U+0300-036F; }
@font-face { font-family: "Noto Sans Syriac"; src: url("../fonts/noto-sans-syriac-syriac-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0700-074F, U+0860-086F, U+0300-036F; }
@font-face { font-family: "Noto Sans Syriac"; src: url("../fonts/noto-sans-syriac-syriac-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0700-074F, U+0860-086F, U+0300-036F; }
@font-face { font-family: "Noto Sans Arabic"; src: url("../fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Noto Sans Arabic"; src: url("../fonts/noto-sans-arabic-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

html[lang="aii"] { --font: "East Syriac Adiabene", "Noto Sans Syriac Eastern", "Public Sans", "Noto Sans Arabic", system-ui, sans-serif; }
html[lang="syc"] { --font: "Estrangelo Edessa", "Noto Sans Syriac", "Public Sans", "Noto Sans Arabic", system-ui, sans-serif; }
html[lang="ar"]  { --font: "Noto Sans Arabic", "Public Sans", system-ui, sans-serif; }
/* Syriac type is drawn small for its size; give it room to breathe. */
html[lang="aii"] body, html[lang="syc"] body { font-size: 21px; line-height: 1.85; }
html[lang="aii"] h1, html[lang="syc"] h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); }
html[lang="ar"] body { line-height: 1.8; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }

/* Right-to-left details */
html[dir="rtl"] .breadcrumbs li + li::before { content: "‹"; }
[data-biz*="phone"], [data-biz="email-link"], .price, td.price { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="password"], html[dir="rtl"] .code-input, html[dir="rtl"] .secret { direction: ltr; }
html[dir="rtl"] .card .price, html[dir="rtl"] td.price { text-align: end; }

/* Language menu in the top strip */
.lang-switch { display: inline-flex; align-items: center; gap: .4rem; color: var(--on-navy); }
.lang-switch svg { width: 18px; height: 18px; flex: none; }
.lang-switch select { width: auto; min-height: 34px; padding: .15rem 1.9rem .15rem .6rem; font: 600 .88rem "Public Sans", "Noto Sans Arabic", "Noto Sans Syriac Eastern", system-ui, sans-serif; color: var(--on-navy); background-color: transparent; border: 1px solid rgba(255, 255, 255, .45); border-radius: 4px; cursor: pointer; }
.lang-switch select:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.lang-switch option { color: var(--ink); background: var(--surface); }
.utility .wrap { gap: .6rem 1.2rem; }
@media (max-width: 640px) {
  .utility .wrap { justify-content: space-between; padding-block: .35rem; }
  .utility .phones a + a { display: none; }
}

/* Syriac scripts read smaller than Latin at the same size: lift small UI text */
html:is([lang="aii"],[lang="syc"]) :is(.nav a, .btn, .utility, .facts li, .breadcrumbs, .site-footer, label, th, .tile p, small) { font-size: 1.18em; }
html:is([lang="aii"],[lang="syc"]) .utility a[href^="tel"] { font-size: .85em; }

/* Card payments */
.pay-box { margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 6px; background: var(--grey-50); }
.pay-box p { margin: .4rem 0; }
.pay-panel h1 { margin-top: 0; }
.pay-summary { border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; padding-bottom: .5rem; }
.pay-summary .price { font-size: 1.35rem; font-weight: 700; color: var(--navy); }
.card-element { min-height: 120px; margin-bottom: 1.25rem; }
.btn-block { width: 100%; justify-content: center; }
.pay-lock { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: .75rem; }
.deposit-row { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1rem; }
.deposit-row h3 { margin: 0 0 .25rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.money-input { display: inline-flex; align-items: center; gap: .25rem; }
.money-input input { width: 7.5rem; direction: ltr; }

/* =====================================================================
   MOTION (level 2): calm, quick, never bouncy. Everything below is
   switched off for people who ask their device to reduce motion.
   ===================================================================== */
:root { --ease: cubic-bezier(.22, .61, .36, 1); }

@media (prefers-reduced-motion: no-preference) {
  /* Scroll reveal (classes added by js/motion.js) */
  .motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
  .motion .reveal.in { opacity: 1; transform: none; }
  .motion .split > .reveal:nth-child(2) { transform: translateY(18px) scale(.985); }
  .motion .split > .reveal.in:nth-child(2) { transform: none; }

  /* Hero entrance */
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
  .hero h1 { animation: rise .7s var(--ease) both; }
  .hero .lead { animation: rise .7s var(--ease) .1s both; }
  .hero .actions { animation: rise .7s var(--ease) .2s both; }
  .hero .facts li { animation: rise .6s var(--ease) both; }
  .hero .facts li:nth-child(1) { animation-delay: .32s; }
  .hero .facts li:nth-child(2) { animation-delay: .40s; }
  .hero .facts li:nth-child(3) { animation-delay: .48s; }
  .hero .facts li:nth-child(4) { animation-delay: .56s; }
  .hero-photo { overflow: hidden; }
  .hero-photo img { animation: settle 1.4s var(--ease) both; }
  .page h1, .prose h1 { animation: rise .6s var(--ease) both; }

  /* Header: soft shadow once you scroll */
  .site-header { transition: box-shadow .25s var(--ease); }
  .site-header.scrolled { box-shadow: 0 8px 24px -16px rgba(19, 38, 92, .45); }

  /* Nav links: underline slides in from the centre */
  .nav a:not(.btn) { border-bottom-color: transparent !important; background: linear-gradient(currentColor, currentColor) 50% 100% / 0 3px no-repeat; transition: background-size .25s var(--ease), color .15s; }
  .nav a:not(.btn):hover { background-size: 100% 3px; }

  /* Buttons: lift on hover, press on click */
  .btn { transition: background-color .15s, color .15s, border-color .15s, transform .2s var(--ease), box-shadow .2s var(--ease); }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(19, 38, 92, .55); }
  .btn:active { transform: translateY(0) scale(.98); box-shadow: none; transition-duration: .06s; }
  .btn:disabled, .btn[disabled] { transform: none; box-shadow: none; }

  /* Task tiles: lift, icon nudges forward */
  .task { transition: border-color .15s, transform .25s var(--ease), box-shadow .25s var(--ease); }
  .task:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(19, 38, 92, .5); }
  .task svg { transition: transform .25s var(--ease); }
  .task:hover svg { transform: translateX(3px) scale(1.06); }
  [dir="rtl"] .task:hover svg { transform: translateX(-3px) scale(1.06); }

  /* Price rows */
  .price-table tbody tr { transition: background-color .2s var(--ease); }
  .price-table tbody tr:hover { background: var(--grey-50); }

  /* Steps: the joining line draws across, numbers pop in */
  .motion .steps::before { transform: scaleX(0); transform-origin: left center; transition: transform 1.1s var(--ease) .2s; }
  [dir="rtl"] .motion .steps::before { transform-origin: right center; }
  .motion .steps:has(li.in)::before { transform: scaleX(1); }
  .motion .steps li.reveal::before { transform: scale(.6); transition: transform .5s var(--ease) calc(var(--d, 0ms) + .1s); }
  .motion .steps li.reveal.in::before { transform: none; }

  /* Feature icons */
  .feature svg { transition: transform .3s var(--ease); }
  .feature:hover svg { transform: translateY(-3px); }

  /* Student photos: gentle zoom */
  .gallery li { overflow: hidden; border-radius: 6px; }
  .gallery img { transition: transform .5s var(--ease), filter .5s var(--ease); }
  .gallery li:hover img { transform: scale(1.05); }

  /* Booking: time slots and lesson choices */
  .slot { transition: border-color .15s, background-color .15s, color .15s, transform .15s var(--ease); }
  .slot:hover { transform: translateY(-1px); }
  .slot[aria-pressed="true"] { animation: pick .3s var(--ease); }
  @keyframes pick { 40% { transform: scale(1.05); } }

  /* Messages slide in */
  .msg:not(.hidden) { animation: rise .35s var(--ease) both; }

  /* Success: star mark on booking, tick on payment */
  #done:not(.hidden) .done-mark { animation: pop .6s var(--ease) both; }
  #done:not(.hidden) .done-mark polygon { transform-origin: 36px 36px; animation: spin-in .9s var(--ease) .15s both; }
  @keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
  @keyframes spin-in { from { transform: rotate(-90deg) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
  #pay-done:not(.hidden) .pay-tick { animation: pop .6s var(--ease) both; }
  #pay-done:not(.hidden) .pay-tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s var(--ease) .35s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }

  /* Language menu and form fields */
  .lang-switch select, input, select, textarea { transition: border-color .15s, box-shadow .2s var(--ease); }
}
.pay-tick { width: 64px; height: 64px; margin-bottom: 1rem; }

/* Track your instructor */
.track-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; align-items: start; }
.track-map { height: min(62vh, 560px); border-radius: 6px; border: 1px solid var(--line); background: var(--grey-100); z-index: 0; }
.track-panel { margin: 0; }
.trk-head { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin: .2rem 0 .4rem; }
.trk-head.ok { color: var(--ok); }
.trk-sub { color: var(--ink-soft); font-weight: 600; margin: 0; }
.trk-eta { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 700; color: var(--navy); line-height: 1.1; margin: .2rem 0 .3rem; font-variant-numeric: tabular-nums; }
.trk-auto { margin-top: 1rem; font-size: .9rem; }
.map-pin { display: grid !important; place-items: center; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 4px 12px rgba(19, 38, 92, .35); }
.map-pin svg { width: 60%; height: 60%; }
.map-car { background: var(--gold); color: var(--ink); }
.map-home { background: var(--navy); color: var(--on-navy); }
.leaflet-marker-icon.map-car { transition: transform 1s linear; }
@media (max-width: 860px) { .track-grid { grid-template-columns: 1fr; } .track-map { height: 52vh; } }
@media (prefers-reduced-motion: reduce) { .leaflet-marker-icon.map-car { transition: none; } }

/* Instructor on the way (My account) */
.otw { display: flex; gap: .9rem; align-items: center; background: var(--navy); color: var(--on-navy); border-radius: 6px; padding: .8rem 1rem; margin: .4rem 0 .6rem; text-decoration: none; }
.otw:hover { background: var(--navy-dark); }
.otw svg { width: 30px; height: 30px; flex: none; color: var(--gold); }
.otw b { display: block; color: var(--on-navy); }
.otw span { color: var(--on-navy-soft); font-size: .95rem; }
@media (prefers-reduced-motion: no-preference) { .otw { animation: rise .4s var(--ease) both; } }

/* Melbourne address picker */
.addr { position: relative; }
.addr.ok input { border-color: var(--ok); }
.addr-list { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 4px); margin: 0; padding: .25rem 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 28px -12px rgba(19, 38, 92, .4); max-height: 18rem; overflow-y: auto; }
.addr-list li { padding: .6rem .85rem; cursor: pointer; line-height: 1.35; }
.addr-list li[aria-selected="true"], .addr-list li:hover { background: var(--grey-50); color: var(--navy); }
.addr-note { margin: .35rem 0 0; font-size: .92rem; }
.addr-note.ok { color: var(--ok); }
.addr-note.err { color: var(--err, #b3261e); }

/* ---------- Messages ---------- */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; height: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--brick); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1; vertical-align: middle; text-decoration: none; }
.badge.hidden { display: none; }
.chat-layout { display: grid; gap: 1.5rem; }
.chat-layout.is-admin { grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; }
.chat { display: flex; flex-direction: column; max-width: 820px; }
.chat-head { display: flex; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: .8rem; }
.chat-title { font-size: 1.35rem; margin: 0; }
.chat-head .hint { margin: .2rem 0 0; }
.chat-thread { list-style: none; margin: 0; padding: .25rem .1rem; display: flex; flex-direction: column; gap: .5rem; height: min(58vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.chat-day { align-self: center; font-size: .8rem; font-weight: 600; color: var(--ink-soft); background: var(--grey-50); border-radius: 999px; padding: .15rem .7rem; margin: .4rem 0; }
.chat-empty { margin: auto; color: var(--ink-soft); font-style: italic; }
.bubble { max-width: min(78%, 560px); padding: .6rem .85rem .45rem; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble-text { white-space: pre-wrap; display: block; }
.bubble-meta { display: block; font-size: .75rem; margin-top: .2rem; opacity: .8; text-align: end; }
.bubble.mine { align-self: flex-end; background: var(--navy); color: var(--on-navy); border-end-end-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: var(--grey-100); color: var(--ink); border-end-start-radius: 4px; }
.chat-composer { display: flex; gap: .6rem; align-items: flex-end; border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .6rem; }
.chat-composer textarea { flex: 1; min-height: 52px; max-height: 200px; resize: vertical; font: inherit; padding: .7rem .8rem; border: 2px solid var(--ink-soft); border-radius: 4px; }
.chat-composer textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.chat-inbox-title { font-size: 1.2rem; }
.thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; max-height: 62vh; overflow-y: auto; }
.thread-item { position: relative; display: grid; gap: .15rem; width: 100%; text-align: start; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: .6rem 2.4rem .6rem .7rem; cursor: pointer; }
.thread-item:hover { background: var(--grey-50); }
.thread-item.active { background: var(--grey-100); border-color: var(--line); }
.thread-item:focus-visible { outline: 3px solid var(--gold); }
.thread-top { display: flex; justify-content: space-between; gap: .5rem; }
.thread-top .hint { margin: 0; white-space: nowrap; }
.thread-last { font-size: .9rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-item.unread .thread-last { color: var(--ink); font-weight: 600; }
.thread-item .badge { position: absolute; inset-inline-end: .7rem; top: 50%; transform: translateY(-50%); }
#msg-link { white-space: nowrap; display: inline-flex; align-items: center; gap: .25rem; }
.msg-icon { display: none; }
@media (max-width: 520px) {
  #msg-link .msg-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .msg-icon { display: inline-flex; }
}
@media (max-width: 899px) {
  .chat-layout.is-admin { grid-template-columns: 1fr; }
  .chat-layout.is-admin:not(.open) .chat { display: none; }
  .chat-layout.is-admin.open .chat-inbox { display: none; }
}
@media (min-width: 900px) { #back { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .bubble.new { animation: bubble-in .25s var(--ease, ease-out); }
  @keyframes bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- Suburbs we cover (dashboard) ---------- */
.areas-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .5rem 0 .8rem; }
.areas-count { margin: 0; font-weight: 700; }
.area-search { position: relative; max-width: 520px; margin-bottom: 1rem; }
.area-search label { display: block; font-weight: 600; margin-bottom: .3rem; }
.area-search input { width: 100%; font: inherit; padding: .7rem .8rem; border: 2px solid var(--ink-soft); border-radius: 4px; }
.area-search input:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.area-results { position: absolute; z-index: 20; inset-inline: 0; top: 100%; margin: .2rem 0 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(19,38,92,.15); }
.area-results.hidden { display: none; }
.area-results button { display: flex; justify-content: space-between; gap: 1rem; width: 100%; padding: .55rem .7rem; font: inherit; text-align: start; background: none; border: 0; border-radius: 4px; cursor: pointer; color: var(--ink); }
.area-results button:hover, .area-results button:focus { background: var(--grey-50); outline: 2px solid var(--gold); }
.area-results .hint { margin: 0; }
.area-results .empty { padding: .5rem .7rem; }
.area-chips { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .35rem .5rem .35rem .85rem; font: 600 .93rem/1.2 var(--font); color: var(--ink); background: #fbefd2; border: 1px solid #ecd39a; border-radius: 999px; cursor: pointer; }
.chip:hover { background: #f7e3b3; }
.chip:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; }
.chip-x { display: inline-flex; align-items: center; justify-content: center; width: 1.4em; height: 1.4em; border-radius: 999px; font-size: 1.05rem; line-height: 1; }
.chip:hover .chip-x { background: rgba(0,0,0,.08); }
.area-map { height: min(60vh, 480px); border: 1px solid var(--line); border-radius: 6px; }
.area-map .leaflet-interactive { cursor: pointer; }
.area-legend { display: flex; gap: 1.2rem; margin: .6rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.area-legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-inline-end: .35rem; vertical-align: -2px; border: 1px solid #7d8597; }
.sw-pick { background: #dfe7df; }
.sw-picked { background: #e0aa45; border-color: #9a6a12 !important; }
.area-list { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: 1.5rem; }
.area-list li { break-inside: avoid; padding: .1rem 0; }

/* ---------- Reviews ---------- */
.rv-summary { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 600; }
.stars { color: #c98a12; letter-spacing: .08em; font-size: 1.15rem; line-height: 1; white-space: nowrap; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.review-list.single, .review-list.admin { grid-template-columns: 1fr; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.2rem; }
.review.hidden { display: none; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-bottom: .5rem; }
.review-head .hint { margin: 0; }
.review-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-reply { margin-top: .8rem; padding: .7rem .9rem; background: var(--grey-50); border-inline-start: 3px solid var(--gold); border-radius: 4px; }
.review-reply p { margin: .2rem 0 0; white-space: pre-wrap; }
.review.is-hidden { opacity: .75; border-style: dashed; }
.pill-hidden { display: inline-block; margin: .6rem 0 0; padding: .15rem .6rem; font-size: .85rem; font-weight: 700; color: var(--err); background: #fcecea; border-radius: 999px; }
.review-list.admin .field { margin-top: .7rem; }
.review-list.admin textarea { width: 100%; font: inherit; padding: .6rem .7rem; border: 2px solid var(--ink-soft); border-radius: 4px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
#reviews { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
#reviews.hidden { display: none; }
.review-panel textarea { width: 100%; font: inherit; padding: .7rem .8rem; border: 2px solid var(--ink-soft); border-radius: 4px; }
/* Star picker: 5 → 1 in the markup, shown reversed so hovering fills to the left */
.star-input { border: 0; padding: 0; margin: 0 0 1rem; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.star-input legend { float: left; width: 100%; font-weight: 600; margin-bottom: .3rem; }
[dir="rtl"] .star-input legend { float: right; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.2rem; line-height: 1; color: #c9ccd4; cursor: pointer; padding: .1rem; border-radius: 4px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #e0aa45; }
.star-input input:focus-visible + label { outline: 3px solid var(--navy); }

/* Keep map layers (Leaflet uses z-index 400–1000) inside the map box,
   so they never draw over the sticky header when scrolling. */
.area-map, .track-map, .leaflet-container { position: relative; z-index: 0; isolation: isolate; }

/* Typed and autofilled text always dark on white, whatever the device theme */
input, select, textarea { -webkit-text-fill-color: var(--ink); caret-color: var(--navy); }
input::placeholder, textarea::placeholder { color: #6b7184; -webkit-text-fill-color: #6b7184; opacity: 1; }
input:-webkit-autofill, input:-webkit-autofill:focus, select:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px #fffbe9 inset; box-shadow: 0 0 0 1000px #fffbe9 inset;
}
.lang-switch select { -webkit-text-fill-color: currentColor; }
