/* File: public/stylesheets/tour.css
   The Qadras tour (Oct 16 2026): one school day, stop by stop, on sample
   screens with made-up students. views/tour.ejs, public/javascripts/tour.js. */

:root {
  --ink: #14213d;
  --ink-2: #4a5573;
  --ink-3: #6b7490;
  --board: #f6f7fb;
  --paper: #ffffff;
  --line: #dce0ec;
  --violet: #6c63ff;
  --violet-ink: #4b43d6;
  --pass: #ffc93c;
  --pass-ink: #4d3a00;
  --alert: #e5484d;
  --app-navy: #1a3a6b;
  --app-blue: #2a52a0;
  --ok: #2f855a;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
a { color: var(--violet-ink); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Top bar ───────────────────────────────────────────────────────────── */
.tb {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 0 auto; padding: 18px 24px;
}
.tb-brand { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.tb-links { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.tb-links a { color: var(--ink-2); text-decoration: none; }
.tb-links a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; border: 2px solid transparent;
  font: 600 1rem/1 var(--body); padding: 12px 18px; cursor: pointer; text-decoration: none;
}
.btn-go { background: var(--violet); color: #fff !important; }
.btn-go:hover { background: var(--violet-ink); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink-3); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn[hidden] { display: none; }
.tb .btn { padding: 9px 14px; font-size: .92rem; }

/* ── Intro ─────────────────────────────────────────────────────────────── */
.intro { max-width: 1240px; margin: 0 auto; padding: 28px 24px 8px; }
.intro h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 14px; max-width: 14ch;
}
.intro p { margin: 0; max-width: 60ch; color: var(--ink-2); font-size: 1.08rem; }
.ref-note {
  display: inline-block; margin-top: 14px; padding: 6px 12px; border-radius: 8px;
  background: #fff4d6; color: var(--pass-ink); font-size: .92rem;
}

/* ── The day: schedule rail + stage ────────────────────────────────────── */
.day {
  max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start;
}
.rail-wrap { position: sticky; top: 20px; }
.rail { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; border-left: 2px solid var(--line); }
.rail li { margin: 0; }
.rail button {
  display: grid; grid-template-columns: 72px 1fr; align-items: baseline; gap: 6px;
  width: 100%; text-align: left; background: none; border: 0; border-radius: 8px;
  padding: 7px 8px; cursor: pointer; color: var(--ink-3); font: inherit;
}
.rail button:hover { color: var(--ink); background: rgba(108, 99, 255, .06); }
.rail .t { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; font-size: .98rem; }
.rail .n { font-size: .95rem; line-height: 1.3; }
.rail button[aria-current="step"] { color: var(--ink); }
.rail button[aria-current="step"] .t { color: var(--violet-ink); }
.rail button.seen:not([aria-current="step"]) .t { color: var(--ink-2); }
.rail li.alert-stop button[aria-current="step"] .t { color: var(--alert); }
/* The bell: a marker that slides to the stop you are on. */
.rail-now {
  position: absolute; left: -7px; top: 0; width: 16px; height: 16px; border-radius: 50%;
  background: var(--violet); border: 3px solid var(--board);
  box-shadow: 0 0 0 2px var(--violet);
  transition: transform .45s cubic-bezier(.3, .7, .2, 1);
  display: none;
}
.js .rail-now { display: block; }
.rail-end { margin-top: 18px; padding-left: 20px; }

.stage { min-width: 0; }
.stop { scroll-margin-top: 20px; }
.js .stop[hidden], .js .end[hidden] { display: none; }
.stop + .stop, .stop + .end { margin-top: 72px; }   /* without JavaScript every stop is on the page */
.js .stop + .stop, .js .stop + .end { margin-top: 0; }
.stop-head { max-width: 68ch; }
.stop-time {
  margin: 0; font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--violet-ink);
}
.stop.is-alert .stop-time { color: var(--alert); }
.stop-head h2 { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.15; letter-spacing: -0.015em; margin: 10px 0 8px; }
.stop-head p.cap { margin: 0; color: var(--ink-2); font-size: 1.05rem; }

.stop-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; margin-top: 22px; align-items: start; }

/* The sample screen, scaled to fit (tour.js sets --s). */
.frame {
  margin: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px -24px rgba(20, 33, 61, .35);
  overflow: hidden; position: relative;
}
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbfbfe; }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d6d9e4; display: block; }
.frame-bar span { margin-left: 8px; font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.frame-bar .sample { margin-left: auto; padding-left: 8px; font-size: .74rem; color: var(--ink-3); flex: none; }
.fit { overflow: hidden; }
.js .fit { overflow: hidden; }
.canvas { width: 760px; transform-origin: 0 0; padding: 24px; font-size: 14px; line-height: 1.4; color: #1f2937; }
.no-js .fit { overflow-x: auto; }

/* Pins: yellow, like a hall-pass slip. */
.pin-at { position: relative; }
.pin {
  position: absolute; z-index: 3; top: -12px; right: -12px;
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff;
  background: var(--pass); color: var(--pass-ink); font: 700 15px/1 var(--body);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 3px 10px rgba(20, 33, 61, .28);
  transform: scale(var(--ps, 1));        /* tour.js keeps pins tappable when the screen is scaled down */
}
.pin.on { background: var(--ink); color: #fff; transform: scale(calc(var(--ps, 1) * 1.12)); }
.pin-l { right: auto; left: -12px; }
.pin-b { top: auto; bottom: -12px; }

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notes li {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
}
.notes li .k {
  width: 26px; height: 26px; border-radius: 50%; background: var(--pass); color: var(--pass-ink);
  font: 700 13px/26px var(--body); text-align: center;
}
.notes li.on { background: var(--paper); border-color: var(--line); }
.notes li.on .k { background: var(--ink); color: #fff; }
.notes li p { margin: 0; font-size: .97rem; line-height: 1.45; }

.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.tour-nav .count { color: var(--ink-3); font-size: .95rem; font-variant-numeric: tabular-nums; }
.no-js .tour-nav { display: none; }

/* ── The end ───────────────────────────────────────────────────────────── */
.end { padding: 8px 0 0; max-width: 62ch; }
.end h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 12px; }
.end p { color: var(--ink-2); font-size: 1.08rem; margin: 0 0 20px; }
.end .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.end .small { font-size: .95rem; color: var(--ink-3); }

.foot { max-width: 1240px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.foot a { color: var(--ink-2); }

/* ── Sample app screens (made-up data) ─────────────────────────────────── */
.mk-nav { display: flex; align-items: center; gap: 16px; background: var(--app-navy); color: #fff; margin: -24px -24px 16px; padding: 10px 24px; font-size: 13px; }
.mk-nav b { font-size: 15px; }
.mk-nav span { opacity: .75; }
.mk-nav .r { margin-left: auto; opacity: .9; }
.mk-row { display: flex; gap: 14px; align-items: flex-start; }
.mk-col { flex: 1; min-width: 0; }
.mk-card { background: #fff; border: 1px solid #e3e7ef; border-radius: 10px; padding: 12px; }
.mk-h { font-weight: 700; font-size: 14px; margin: 0 0 8px; color: #111827; }
.mk-sub { color: #6b7280; font-size: 12px; }
.mk-list { display: grid; gap: 6px; }
.mk-li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 8px; background: #f7f8fb; }
.mk-btn { display: inline-block; border-radius: 7px; padding: 5px 10px; font-weight: 600; font-size: 12px; background: var(--app-blue); color: #fff; }
.mk-btn.g { background: #c6f6d5; color: #22543d; }
.mk-btn.r { background: #fed7d7; color: #822727; }
.mk-btn.o { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.mk-chip { display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; background: #eef0ff; color: #3730a3; }
.mk-tog { display: inline-flex; gap: 3px; }
.mk-tog i { font-style: normal; width: 26px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: #eef0f4; color: #6b7280; }
.mk-tog i.p { background: #c6f6d5; color: #22543d; }
.mk-tog i.a { background: #fed7d7; color: #822727; }
.mk-tog i.t { background: #feebc8; color: #7b341e; }
.mk-video { background: #0f1b33; border-radius: 10px; height: 168px; display: flex; align-items: center; justify-content: center; color: #fff; position: relative; }
.mk-video .play { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.mk-video .cap { position: absolute; left: 12px; bottom: 10px; font-size: 12px; opacity: .85; }
.mk-pdf { background: #fff; border: 1px solid #e3e7ef; border-radius: 8px; padding: 12px; width: 190px; flex: none; box-shadow: 4px 4px 0 #eef0f6; }
.mk-pdf .ln { height: 6px; border-radius: 3px; background: #e5e7eb; margin: 6px 0; }
.mk-pdf .ln.s { width: 60%; }
.mk-pdf .ln.k { background: #fbcfe8; width: 30%; }
.mk-arrow { align-self: center; font-size: 22px; color: #9ca3af; flex: none; }
.mk-q { border: 1px solid #e3e7ef; border-radius: 9px; padding: 10px; margin-bottom: 8px; }
.mk-q .opt { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; }
.mk-q .opt i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cbd5e1; display: inline-block; }
.mk-q .opt.c i { border-color: var(--ok); background: var(--ok); }
.mk-q .opt.c { color: var(--ok); font-weight: 600; }
.mk-game { background: #191a3a; color: #fff; border-radius: 10px; padding: 14px; }
.mk-bar { height: 22px; border-radius: 6px; margin: 6px 0; display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 700; color: #191a3a; }
.mk-cardp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 76px; height: 96px; border-radius: 10px; margin-right: 8px; font-size: 11px; font-weight: 700; color: #191a3a; }
.mk-ring { width: 64px; height: 64px; border-radius: 50%; border: 6px solid #3b3d75; border-top-color: #ffc93c; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.mk-grid { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.mk-grid th { font-weight: 600; color: #6b7280; text-align: left; padding: 3px 4px; }
.mk-grid td { text-align: center; padding: 5px 4px; border-radius: 5px; }
.mk-grid td.n { text-align: left; font-weight: 600; color: #111827; background: none; }
.mk-grid td.y { background: #c6f6d5; color: #22543d; }
.mk-grid td.x { background: #fed7d7; color: #822727; }
.mk-grid td.w { background: #fefcbf; color: #744210; }
.mk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mk-table th { text-align: left; font-weight: 600; color: #4b5563; padding: 6px 6px; border-bottom: 2px solid #e5e7eb; vertical-align: bottom; }
.mk-table td { padding: 6px; border-bottom: 1px solid #f0f1f4; }
.mk-b { display: inline-block; border-radius: 5px; padding: 2px 7px; font-weight: 600; font-size: 11.5px; }
.mk-b.g { background: #d9ead3; color: #1e4620; }
.mk-b.y { background: #fff2cc; color: #5c4400; }
.mk-b.r { background: #f4cccc; color: #6b1d1d; }
.mk-b.b { background: #c9daf8; color: #173f7a; }
.mk-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mk-tile { border-radius: 10px; padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 600; border: 2px solid transparent; }
.mk-tile .av { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 6px; background: rgba(0,0,0,.08); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.mk-tile.s0 { background: #e6f6ec; }
.mk-tile.s1 { background: #fff6d6; }
.mk-tile.s2 { background: #ffe7d1; }
.mk-tile.s3 { background: #fde2e2; }
.phone-at { flex: none; }
.mk-phone { width: 270px; flex: none; border-radius: 30px; border: 9px solid #111827; background: #f5f6fa; overflow: hidden; }
.mk-phone .top { background: var(--app-navy); color: #fff; padding: 12px 14px 10px; font-weight: 700; font-size: 14px; }
.mk-phone .top small { display: block; font-weight: 500; opacity: .75; font-size: 11px; }
.mk-phone .body { padding: 10px; display: grid; gap: 8px; }
.mk-phone .tabs { display: flex; justify-content: space-around; border-top: 1px solid #e5e7eb; background: #fff; padding: 8px 0 10px; font-size: 10.5px; color: #6b7280; }
.mk-phone .tabs b { color: var(--app-navy); }
.mk-stat { font-size: 22px; font-weight: 800; color: var(--app-navy); line-height: 1; }
.mk-red .top { background: #b42318; }
.mk-big { display: block; text-align: center; border-radius: 10px; padding: 12px; font-weight: 700; font-size: 13px; }
.mk-scan { height: 110px; border-radius: 10px; background: repeating-linear-gradient(45deg, #1f2937 0 10px, #273244 10px 20px); position: relative; }
.mk-scan::after { content: ''; position: absolute; left: 40px; right: 40px; top: 20px; bottom: 20px; border: 3px solid #ffc93c; border-radius: 8px; }
.mk-call { font-size: 30px; font-weight: 800; letter-spacing: .02em; color: var(--app-navy); }

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .stop-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .tb { padding: 14px 16px; }
  .tb-links .hide-sm { display: none; }
  .intro { padding: 16px 16px 4px; }
  .day { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px 16px 48px; }
  .stage, .stop { scroll-margin-top: 66px; }
  .rail-wrap { position: sticky; top: 0; z-index: 5; background: var(--board); margin: 0 -16px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
  .rail { display: flex; gap: 4px; overflow-x: auto; border-left: 0; padding: 0; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail button { display: block; width: auto; white-space: nowrap; padding: 6px 10px; border: 1px solid var(--line); background: var(--paper); }
  .rail .n { display: none; }
  .rail button[aria-current="step"] { border-color: var(--violet); }
  .rail-now, .js .rail-now { display: none; }
  .rail-end { display: none; }
  .stop-time { font-size: 2.1rem; }
  .stop-head h2 { font-size: 1.4rem; }
  .tour-nav .btn { padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .rail-now { transition: none; }
  .pin.on { transform: scale(var(--ps, 1)); }
}

/* ── Two tours (Oct 19 2026, lib/tour.js): For teachers / For school leaders ── */
.tour-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; }
.tour-switch a { padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink-2); text-decoration: none; }
.tour-switch a:hover { color: var(--ink); }
.tour-switch a[aria-current="page"] { background: var(--ink); color: #fff; }
.tour-switch a:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.end .small a { font-weight: 600; }
