/* خط الطلاب: هوية «الطريق». ورق فاتح، أسفلت، وأصفر خط الطريق. قائمة الطلاب تُرسم طريقاً بمحطات. */
@font-face { font-family: 'Readex Pro'; font-style: normal; font-display: swap; font-weight: 160 700; src: url(/fonts/readex-pro-arabic-wght-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Readex Pro'; font-style: normal; font-display: swap; font-weight: 160 700; src: url(/fonts/readex-pro-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #F3F5F8; --surface: #FFFFFF; --ink: #1F2C3A; --ink-2: #3A4858; --muted: #5B6878; --line: #DDE3EA; --line-strong: #B9C3CF;
  --road: #46525F; --lane: #FFC629; --lane-soft: #FFF6D6; --lane-ink: #6B4E00;
  --go: #127A4A; --go-soft: #E2F3EA; --go-ink: #0E5E39;
  --no: #C73A28; --no-soft: #FBE8E5; --no-ink: #9C2A1B;
  --wait: #7C8896; --wait-soft: #E9EDF2; --wait-ink: #4A5665;
  --link: #1A56B0; --focus: #1B6FE0;
  --r1: 12px; --r2: 20px; --page: 34rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Readex Pro', system-ui, 'Segoe UI', Tahoma, sans-serif; font-size: 1rem; line-height: 1.7; font-weight: 400; overflow-wrap: break-word; }
a { color: var(--link); text-underline-offset: 3px; }
p { margin: 0 0 10px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 30; }
.skip:focus { top: 8px; }

/* —— الهيكل —— */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--page); margin-inline: auto; padding: 12px 16px 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.top-acts { display: flex; align-items: center; gap: 8px; }
.top-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.bell-n, .tab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--no); color: #fff; font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center; }
.bell-n { position: absolute; top: 2px; inset-inline-start: 22px; }
.page { max-width: var(--page); margin-inline: auto; padding: 8px 16px 112px; }
.page-wide { max-width: 46rem; }
.is-landing .page, .is-landing .top { max-width: 46rem; }
.tabs { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tab { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; font-size: .75rem; line-height: 1.4; color: var(--muted); text-decoration: none; }
.tab .ic { box-sizing: content-box; padding: 3px 16px; border-radius: 999px; }
.tab[aria-current] { color: var(--ink); font-weight: 600; }
.tab[aria-current] .ic { background: var(--lane); }
.tab-n { position: absolute; top: 5px; inset-inline-start: calc(50% + 10px); }
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; padding: 0 16px 36px; font-size: .875rem; }
.foot a { color: var(--muted); }
.flash { max-width: calc(var(--page) - 32px); margin: 8px auto 0; padding: 12px 16px; border-radius: var(--r1); font-weight: 600; width: calc(100% - 32px); }
.flash-toast { position: fixed; z-index: 40; top: 10px; inset-inline: 0; margin-top: 0; border: 1.5px solid currentColor; }
.flash-ok { background: var(--go-soft); color: var(--go-ink); }
.flash-bad { background: var(--no-soft); color: var(--no-ink); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.back .ic { width: 18px; height: 18px; }

/* —— الخط والعناوين —— */
.h1 { font-size: 1.75rem; line-height: 1.4; font-weight: 700; margin: 4px 0 8px; }
.h2 { font-size: 1.25rem; line-height: 1.5; font-weight: 700; margin: 0 0 8px; }
.h3 { font-size: 1.0625rem; line-height: 1.5; font-weight: 600; margin: 0 0 6px; }
.h2 a, .h3 a { color: inherit; text-decoration-color: var(--line-strong); }
.form + .h3, .form + .rule { margin-top: 20px; }
.lead { font-size: 1.0625rem; color: var(--ink-2); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.block { margin-top: 30px; }
.stack { display: grid; gap: 12px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.inline { display: inline; margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.panel p { margin: 0; }
.note { background: var(--lane-soft); border: 1px solid #F0DC97; border-radius: var(--r1); padding: 12px 14px; }
.note p:last-child { margin-bottom: 0; }
.rule { list-style: none; margin: 0; padding: 0; }
.rule > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rule > li:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 40px 12px; display: grid; gap: 8px; justify-items: center; color: var(--ink-2); }
.more > summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.more[open] > summary { margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 16px 0; }
.kv dt { font-size: .8125rem; color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.doc ul { padding-inline-start: 22px; margin: 0 0 18px; }
.doc li { margin-bottom: 6px; }
.doc .h2 { margin-top: 22px; }

/* —— الأيقونات —— */
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* —— الأزرار —— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 18px; border: 1.5px solid transparent; border-radius: var(--r1); font-weight: 600; font-size: 1rem; line-height: 1.4; text-decoration: none; cursor: pointer; background: var(--surface); color: var(--ink); transition: background-color .12s, border-color .12s, color .12s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--lane); color: var(--ink); }
.btn-main:hover { background: #F5B90F; }
.btn-go { background: var(--go); color: #fff; }
.btn-no { background: var(--no); color: #fff; }
.btn-line { border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--ink-2); }
.btn-quiet { background: transparent; color: var(--link); padding-inline: 8px; font-weight: 500; }
.btn-big { min-height: 56px; font-size: 1.125rem; border-radius: 16px; }
.btn-s { min-height: 40px; padding: 4px 12px; font-size: .9rem; border-radius: 10px; }
.btn-s .ic { width: 18px; height: 18px; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

/* —— النماذج —— */
.form { display: grid; gap: 16px; margin: 0; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-l { font-weight: 600; font-size: .95rem; padding: 0; }
.field-l i { font-style: normal; font-weight: 400; color: var(--muted); }
.field-h { font-size: .8125rem; color: var(--muted); }
.in { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r1); background: var(--surface); }
.in:focus-visible { border-color: var(--focus); outline-offset: 0; border-radius: var(--r1); }
.in[readonly] { background: var(--paper); font-size: .875rem; }
.ta { min-height: 0; resize: vertical; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; display: inline-flex; }
.check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.check input:checked + span { background: var(--lane); border-color: var(--road); font-weight: 600; }
.check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.checks-col { flex-direction: column; flex-wrap: nowrap; max-height: 17rem; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--paper); }
.checks-col .check, .checks-col .check span { width: 100%; }
.checks-col .check span { border-radius: 10px; }
.addrow { display: flex; gap: 8px; }
.addrow .in { flex: 1; min-width: 0; }
.pick-n:empty { display: none; }
.pick-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--road); color: #fff; font-size: .75rem; font-weight: 700; }
.upload { display: inline-block; cursor: pointer; }
.upload input:focus-visible + .btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.rate { border: 0; padding: 0; margin: 0; }
.rate legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 6px; }
.rate-stars { display: flex; gap: 8px; }
.rate-stars label { position: relative; }
.rate-stars input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rate-stars span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; }
.rate-stars input:checked + span { background: var(--lane); border-color: var(--road); }
.rate-stars input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* —— الشارات —— */
.chip { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; line-height: 1.75; white-space: nowrap; }
.chip-yes { background: var(--go-soft); color: var(--go-ink); }
.chip-no { background: var(--no-soft); color: var(--no-ink); }
.chip-wait { background: var(--wait-soft); color: var(--wait-ink); }
.chip-late { background: #FFE9A8; color: var(--lane-ink); }
.chip-plain { background: #E6EAF0; color: var(--ink-2); }
.vbadge { display: inline-flex; align-items: center; gap: 4px; color: var(--go-ink); font-weight: 600; font-size: .875rem; }
.vbadge .ic { width: 18px; height: 18px; }
.vbadge-off { color: var(--muted); font-weight: 400; }
.rating { display: inline-flex; align-items: center; gap: 4px; }
.rating .ic { width: 18px; height: 18px; color: #D99A00; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--wait-soft); }
.avatar-none { display: grid; place-items: center; background: var(--lane); font-weight: 700; font-size: 1.25rem; }
.avatar-s { width: 42px; height: 42px; font-size: 1rem; }
.seg { display: flex; gap: 4px; padding: 4px; margin: 10px 0; background: #E3E8EE; border-radius: 14px; }
.seg-i { flex: 1; padding: 8px 10px; border-radius: 10px; text-align: center; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.seg-i[aria-current] { background: var(--surface); color: var(--ink); }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap .seg-i { flex: none; }

/* —— الطريق: توقيع الموقع —— */
.route { position: relative; list-style: none; margin: 16px 0; padding: 0; }
.route::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; width: 22px; border-radius: 11px; background: var(--road); }
.route::after { content: ''; position: absolute; inset-block: 12px; inset-inline-start: 21px; width: 2px; background: repeating-linear-gradient(to bottom, var(--lane) 0 9px, transparent 9px 20px); }
.stop { position: relative; padding-inline-start: 56px; }
.stop-row { display: flex; align-items: center; gap: 10px; min-height: 62px; padding-block: 9px; border-bottom: 1px solid var(--line); list-style: none; }
summary.stop-row { cursor: pointer; }
summary.stop-row::-webkit-details-marker { display: none; }
.stop-n { position: absolute; z-index: 1; inset-inline-start: 4px; top: 13px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 3px solid var(--go); font-weight: 700; font-size: .95rem; line-height: 1; transition: border-color .2s, background-color .2s, color .2s; }
.stop-main { display: grid; flex: 1; min-width: 0; }
.stop-name { font-weight: 600; font-size: 1.0625rem; line-height: 1.5; }
.stop-where { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.stop-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 46%; }
.is-wait .stop-n { border-color: var(--wait); }
.is-no .stop-n { border: 3px dashed var(--no); background: var(--paper); color: var(--muted); }
.is-no .stop-name { color: var(--muted); }
.stop-acts { display: grid; gap: 10px; padding: 12px 0 16px; border-bottom: 1px solid var(--line); }
.stop-acts form[data-mark] { display: grid; grid-template-columns: 1fr 1fr; }
.stop details[open] > .stop-row { border-bottom-color: transparent; }
.route-end { position: relative; display: flex; align-items: center; min-height: 52px; padding-inline-start: 56px; font-weight: 600; }
.route-end::before { content: ''; position: absolute; z-index: 1; inset-inline-start: 10px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 7px; background: var(--lane); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--road); }
.route-start { border-bottom: 1px solid var(--line); }

/* شريط الخط: المناطق بالترتيب ثم الوجهة */
.strip { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 10px 0; padding: 0; }
.strip li { display: inline-flex; align-items: center; font-size: .9rem; font-weight: 500; }
.strip li::before { content: ''; flex: none; width: 10px; height: 10px; margin-inline-end: 6px; border-radius: 50%; border: 2.5px solid var(--road); background: var(--surface); }
.strip li:not(:last-child)::after { content: ''; flex: none; width: 16px; height: 3px; margin-inline: 8px; border-radius: 2px; background: var(--road); }
.strip .strip-end { font-weight: 700; }
.strip .strip-end::before { border-radius: 3px; background: var(--lane); }

/* —— العدّادات —— */
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.count { display: flex; flex-direction: column-reverse; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.count dt { font-size: .8125rem; color: var(--muted); }
.count dd { margin: 0; font-size: 2.125rem; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.count-yes dd { color: var(--go-ink); }
.count-wait dd { color: var(--wait-ink); }
.count-no dd { color: var(--no-ink); }

/* —— سؤال الحضور —— */
.ask, .mine { margin-block: 16px; padding: 18px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
.mine { padding-bottom: 16px; }
.mine .h2 { margin: 0; }
.ask-q { font-size: 1.5rem; line-height: 1.45; font-weight: 700; margin: 0; }
.ask-meta { color: var(--muted); margin: 0 0 14px; }
.ask-form { margin: 0; }
.ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ask-btns .btn { min-height: 60px; font-size: 1.25rem; border-width: 2px; }
.ask-btns .btn-go:not(.is-on) { background: var(--surface); color: var(--go-ink); border-color: var(--go); }
.ask-btns .btn-no:not(.is-on) { background: var(--surface); color: var(--no-ink); border-color: var(--no); }
.ask-more { display: flex; gap: 8px; margin-top: 10px; }
.ask-more .btn { flex: 1; }
.ask-more .btn.is-on { background: var(--lane); border-color: var(--road); }
.ask-state { margin: 14px 0 0; font-weight: 600; }
.ask-lock { margin: 2px 0 0; font-size: .875rem; color: var(--muted); }
.ask-lock.is-locked { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--lane-soft); color: var(--lane-ink); }
.ask-today { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line-strong); }
.ask-foot { display: grid; gap: 2px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.ask-foot .btn { justify-content: flex-start; padding-inline: 0; }
.ask-line { display: inline-flex; align-items: center; gap: 6px; }
.ask-line .ic { width: 18px; height: 18px; }
.ask.is-busy { opacity: .6; pointer-events: none; }

/* —— بطاقة خط في البحث —— */
.linecard { display: grid; gap: 8px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
.linecard .h3, .linecard .strip, .linecard p { margin: 0; }
.cta { margin-top: 22px; }
.route-note { margin-top: 12px; }
.req p { margin: 0 0 6px; }
.notice { display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.notice.is-new b::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: var(--no); }
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.docs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.home-more { margin-top: 22px; }

/* —— الصفحة الأولى —— */
.hero { padding-block: 6px 4px; }
.hero-h { font-size: clamp(2.25rem, 11vw, 3.5rem); line-height: 1.3; font-weight: 700; margin: 6px 0 8px; }
.hero-in .hero-h { font-size: 2rem; }
.demo { display: grid; gap: 12px; margin-block: 20px; }
.demo-ask, .demo-list { padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
.demo-cap { margin: 0 0 6px; font-size: .8125rem; color: var(--muted); }
.demo .ask-q { margin-bottom: 12px; }
.demo .route { margin-block: 8px 10px; }
.demo .stop-row { min-height: 56px; padding-block: 6px; }
.demo .stop-n { top: 10px; }
.demo-sum { margin: 0; font-weight: 600; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.steps { position: relative; list-style: none; margin: 14px 0 0; padding: 0; counter-reset: step; }
.steps::before { content: ''; position: absolute; inset-block: 4px; inset-inline-start: 11px; width: 22px; border-radius: 11px; background: var(--road); }
.steps li { position: relative; display: grid; padding: 4px 0 20px; padding-inline-start: 56px; counter-increment: step; }
.steps li:last-child { padding-bottom: 6px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 4px; top: 4px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--lane); border: 3px solid var(--surface); font-weight: 700; line-height: 1; }
.steps span { color: var(--ink-2); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.facts li { position: relative; padding-inline-start: 22px; }
.facts li::before { content: ''; position: absolute; inset-inline-start: 0; top: .62em; width: 10px; height: 10px; border-radius: 3px; background: var(--lane); box-shadow: 0 0 0 2px var(--road); }

@media (min-width: 44rem) {
  .demo { grid-template-columns: 1fr 1fr; align-items: start; }
  .doors { max-width: 30rem; }
}
@media (max-width: 22rem) {
  .doors, .ask-btns { grid-template-columns: 1fr; }
  .stop-chips { max-width: 40%; }
}

/* حافلة صغيرة تعبر الطريق مرة واحدة عند فتح الصفحة الأولى */
.demo .route > .bus { position: absolute; z-index: 2; inset-inline-start: 14px; top: 0; width: 16px; height: 24px; border-radius: 5px; background: var(--lane); box-shadow: 0 0 0 2px var(--road); animation: trip 2.6s cubic-bezier(.5, 0, .3, 1) .35s both; }
@keyframes trip { from { top: 0; opacity: 1; } 92% { opacity: 1; } to { top: calc(100% - 26px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}
@media print { .tabs, .top-acts, .foot, .back, .seg, .stop-acts { display: none !important; } body { background: #fff; } .page { padding-bottom: 0; } }
