/* Layout: a school timetable — a strip of days across the top, lesson times
   down the right edge, and the teachers of each slot side by side so the
   student picks one. Chalkboard green carries the brand; red means live. */
:root {
  --paper: #F4F6F1;
  --surface: #FFFFFF;
  --sunk: #EAEEE7;
  --ink: #17252A;
  --muted: #56676A;
  --line: #D8DFD7;
  --board: #1D5C4A;
  --board-ink: #FFFFFF;
  --board-soft: #E1EEE8;
  --chalk: #B9770E;
  --chalk-soft: #FBF0D9;
  --live: #C3362B;
  --live-ink: #FFFFFF;
  --live-soft: #FBE4E1;
  --live-text: #B32D23;
  --ok: #2B7A4B;
  --ok-soft: #E2F2E8;
  --warn: #8A5A00;
  --warn-soft: #FFF1D2;
  --shadow: 0 1px 2px rgba(23, 37, 42, .06), 0 2px 8px rgba(23, 37, 42, .05);
  --font-display: "Cairo", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  --font-body: "Cairo", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  --r: 12px;
  --r-sm: 8px;
  --wrap: 1120px;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1513; --surface: #16201D; --sunk: #1C2824; --ink: #E5EDE9; --muted: #9DAEA8; --line: #2A3732;
    --board: #5BC39A; --board-ink: #0A1A13; --board-soft: #1A3129; --chalk: #E7B456; --chalk-soft: #33280F;
    --live: #FF6F61; --live-ink: #2A0703; --live-soft: #3B1C19; --live-text: #FF8A7E; --ok: #6BD39C; --ok-soft: #173023;
    --warn: #F0C26A; --warn-soft: #33290F; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1513; --surface: #16201D; --sunk: #1C2824; --ink: #E5EDE9; --muted: #9DAEA8; --line: #2A3732;
  --board: #5BC39A; --board-ink: #0A1A13; --board-soft: #1A3129; --chalk: #E7B456; --chalk-soft: #33280F;
  --live: #FF6F61; --live-ink: #2A0703; --live-soft: #3B1C19; --live-text: #FF8A7E; --ok: #6BD39C; --ok-soft: #173023;
  --warn: #F0C26A; --warn-soft: #33290F; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.7 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--board); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; text-wrap: balance; margin: 0; }
h1 { font: 800 clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem)/1.3 var(--font-display); }
h2 { font: 700 1.25rem/1.4 var(--font-display); }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--board); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--board); color: var(--board-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.loading { padding-block: 48px; color: var(--muted); text-align: center; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: var(--wrap); margin-inline: auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 700 1.2rem/1 var(--font-display); }
.brand-mark { width: 30px; height: 30px; color: var(--board); flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.auth { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 560px) {
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav a { flex: 1; text-align: center; padding: 6px 4px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--board); color: var(--board-ink); border-color: var(--board); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--board); }
.btn-live { background: var(--live); color: var(--live-ink); border-color: var(--live); }
.btn-live:hover { filter: brightness(1.06); border-color: var(--live); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--board); }
.btn-ghost:hover { background: var(--board-soft); border-color: transparent; }
.btn-danger { color: var(--live); }
.btn-danger.arm { background: var(--live); color: var(--live-ink); border-color: var(--live); }
.btn-sm { min-height: 34px; padding: 4px 10px; font-size: .875rem; border-radius: 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- banners & toasts ---------- */
.banner { padding: 8px var(--gutter); text-align: center; font-size: .92rem; border-bottom: 1px solid var(--line); }
.banner-demo { background: var(--chalk-soft); color: var(--warn); }
.banner-demo button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0 4px; }
.banner-notice { background: var(--board-soft); color: var(--ink); }
.toasts { position: fixed; inset-inline: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 8px; z-index: 60; pointer-events: none; padding-inline: 16px; }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 520px; animation: pop .2s ease-out; }
.toast.err { background: var(--live); color: var(--live-ink); }
@keyframes pop { from { transform: translateY(8px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- home ---------- */
.hero { padding-block: 28px 8px; display: grid; gap: 10px; }
.hero p { color: var(--muted); max-width: 60ch; }
.mine { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--board-soft); }
.mine b { font-family: var(--font-display); font-size: 1.1rem; }
.section { padding-block: 20px; display: grid; gap: 14px; }
.section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-head .muted { font-size: .9rem; }
.stages { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; align-content: start; }
.stage h2 { font-size: 1.1rem; }
.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.grade-chip {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 12px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  text-decoration: none; font-weight: 600; line-height: 1.35;
}
.grade-chip:hover { border-color: var(--board); background: var(--board-soft); }
.grade-chip.cur { border-color: var(--board); box-shadow: inset 0 0 0 1px var(--board); }
.tag-exam { font-size: .72rem; font-weight: 700; color: var(--warn); letter-spacing: .02em; }
.cta { display: grid; gap: 10px; padding: 20px; border-radius: var(--r); border: 1px dashed var(--board); background: var(--surface); }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.steps3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: s; }
.steps3 li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; }
.steps3 { padding: 0; margin: 0; }
.steps3 li b::before { counter-increment: s; content: counter(s) ". "; color: var(--board); }

/* ---------- live strip ---------- */
.live-strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.dot-live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 var(--live); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }

/* ---------- grade page ---------- */
.page-head { padding-block: 22px 6px; display: grid; gap: 8px; }
.crumbs { font-size: .9rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill-exam { background: var(--chalk-soft); color: var(--warn); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--live-soft); color: var(--live); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 8px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--board); }

.days { display: flex; gap: 6px; overflow-x: auto; padding: 14px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.day {
  flex: none; width: 64px; display: grid; justify-items: center; gap: 0; padding: 8px 4px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; scroll-snap-align: start; line-height: 1.3;
}
.day .wd { font-size: .78rem; color: var(--muted); }
.day .dn { font: 700 1.3rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.day .ct { font-size: .72rem; color: var(--muted); min-height: 1.2em; }
.day.has .ct { color: var(--board); font-weight: 700; }
.day[aria-pressed="true"] { background: var(--board); border-color: var(--board); color: var(--board-ink); }
.day[aria-pressed="true"] .wd, .day[aria-pressed="true"] .ct { color: var(--board-ink); }
.day.today:not([aria-pressed="true"]) { border-color: var(--board); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-block: 4px 10px; }
.chip { flex: none; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .9rem; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.day-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-block: 6px 2px; }
.day-title h2 { font-size: 1.15rem; }

.slots { display: grid; gap: 0; padding-bottom: 24px; }
.slot { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding-block: 14px; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; }
.slot-time { display: grid; align-content: start; justify-items: start; gap: 0; position: sticky; top: 76px; align-self: start; }
.slot-time b { font: 700 1.35rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.slot-time span { font-size: .85rem; color: var(--muted); }
.slot-time small { margin-top: 6px; font-size: .75rem; color: var(--board); font-weight: 700; background: var(--board-soft); padding: 1px 8px; border-radius: 999px; }
.slot-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (max-width: 520px) {
  .slot { grid-template-columns: 1fr; gap: 8px; }
  .slot-time { position: static; display: flex; align-items: baseline; gap: 8px; }
  .slot-time small { margin-top: 0; }
}

/* ---------- session card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px;
  display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow); min-width: 0;
}
.card.s-live { border-color: color-mix(in srgb, var(--live) 55%, var(--line)); }
.card.s-cancelled { opacity: .62; }
.card.s-cancelled h3 { text-decoration: line-through; }
.card-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.subj { font-size: .82rem; font-weight: 700; color: var(--board); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card h3 { overflow-wrap: anywhere; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who:hover span { text-decoration: underline; }
.meta { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.card .act .btn { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.badge.b-live { background: var(--live); color: var(--live-ink); }
.badge.b-live .dot-live { background: var(--live-ink); }
.badge.b-soon { background: var(--live-soft); color: var(--live-text); }
.badge.b-upcoming { background: var(--board-soft); color: var(--board); }
.badge.b-replay, .badge.b-recorded { background: var(--ok-soft); color: var(--ok); }
.badge.b-cancelled { background: var(--sunk); color: var(--muted); }
.av { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; background: var(--board-soft); color: var(--board); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; overflow: hidden; }
.av-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.av-md { width: 40px; height: 40px; font-size: 1rem; }

.empty { padding: 28px 16px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); display: grid; gap: 10px; justify-items: center; }

/* ---------- recordings ---------- */
.vids { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); padding-block: 8px 24px; }
.vid { display: grid; gap: 6px; text-decoration: none; color: var(--ink); min-width: 0; }
.thumb { aspect-ratio: 16 / 9; width: 100%; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--board); color: var(--board-ink); display: grid; place-items: center; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { font: 700 1.05rem/1.4 var(--font-display); padding: 12px; text-align: center; }
.thumb .play { position: absolute; inset-inline-start: 8px; bottom: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 6px; }
.vid h3 { font-size: .98rem; overflow-wrap: anywhere; }
.vid:hover h3 { text-decoration: underline; }

/* ---------- session page ---------- */
.sess { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 320px; padding-block: 18px 32px; align-items: start; }
@media (max-width: 900px) { .sess { grid-template-columns: minmax(0, 1fr); } }
.player { aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: #0B1210; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player .ph { color: #E5EDE9; text-align: center; padding: 20px; display: grid; gap: 10px; justify-items: center; }
.player .ph b { font: 700 1.25rem/1.4 var(--font-display); }
.player .ph .big { font: 700 2rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.player .ph .btn { color: var(--ink); }
.desc { white-space: pre-line; overflow-wrap: anywhere; max-width: 70ch; }
.side { display: grid; gap: 14px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; min-width: 0; }
.box h2 { font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.alts { display: grid; gap: 8px; }
.alt { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 8px; border-radius: 10px; border: 1px solid var(--line); min-width: 0; }
.alt:hover { border-color: var(--board); }
.alt div { min-width: 0; }
.alt b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt span { font-size: .8rem; color: var(--muted); }
details.report summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
details.report[open] summary { margin-bottom: 10px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; max-width: 720px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .84rem; color: var(--muted); }
.field .err-msg { font-size: .84rem; color: var(--live); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.6; }
.input:focus { outline: 2px solid var(--board); outline-offset: 0; border-color: var(--board); }
.input[aria-invalid="true"] { border-color: var(--live); }
input[type="url"].input, input[type="email"].input { direction: ltr; text-align: right; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; flex: 1 1 200px; }
.seg input { accent-color: var(--board); width: 18px; height: 18px; }
.seg label:has(input:checked) { border-color: var(--board); background: var(--board-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { accent-color: var(--board); width: 20px; height: 20px; margin-top: 4px; flex: none; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--board-soft); font-size: .92rem; display: grid; gap: 4px; }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.bad { background: var(--live-soft); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-block: 22px 8px; }
.dash-head .who-big { display: grid; gap: 2px; min-width: 0; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.list { display: grid; gap: 8px; }
.item {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
}
.item .when { display: grid; line-height: 1.3; font-variant-numeric: tabular-nums; }
.item .when b { font: 700 1rem/1.3 var(--font-display); }
.item .when span { font-size: .8rem; color: var(--muted); }
.item .what { display: grid; gap: 2px; min-width: 0; }
.item .what b { overflow-wrap: anywhere; }
.item .what .row { font-size: .82rem; color: var(--muted); gap: 6px; }
.item .tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item.cancelled { opacity: .65; }
@media (max-width: 680px) {
  .item { grid-template-columns: 76px minmax(0, 1fr); }
  .item .tools { grid-column: 1 / -1; justify-content: flex-start; }
}
.linkflag { font-weight: 700; }
.linkflag.ok { color: var(--ok); }
.linkflag.no { color: var(--warn); }

/* ---------- teacher / directory ---------- */
.prof { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-block: 22px 6px; }
.prof .info { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.tgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); padding-block: 12px 24px; }
.tcard { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.tcard:hover { border-color: var(--board); }
.tcard div { min-width: 0; display: grid; }
.tcard b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard span { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- admin ---------- */
.atable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.atable { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
.atable th, .atable td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.atable th { font-size: .8rem; color: var(--muted); font-weight: 700; background: var(--sunk); }
.atable tr:last-child td { border-bottom: 0; }
.atable .email { direction: ltr; unicode-bidi: plaintext; font-size: .85rem; }

/* ---------- guide / prose ---------- */
.prose { max-width: 72ch; display: grid; gap: 14px; padding-block: 8px 32px; }
.prose h2 { margin-top: 12px; }
.prose ol, .prose ul { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 6px; }
.prose code, .kbd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .88em; background: var(--sunk); padding: 1px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.path { display: inline; direction: ltr; unicode-bidi: isolate; font-weight: 700; }
.sign-in { max-width: 520px; margin: 32px auto; text-align: center; justify-items: center; }
.g-btn { background: var(--surface); color: var(--ink); border: 1px solid var(--line); min-height: 48px; padding-inline: 20px; font-weight: 700; }
.g-btn svg { width: 20px; height: 20px; }

.foot { padding-block: 24px 36px; border-top: 1px solid var(--line); margin-top: 24px; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.foot a { color: var(--muted); }
.email { direction: ltr; unicode-bidi: plaintext; }
h1[tabindex="-1"]:focus, #view:focus { outline: none; }
