/* Kwikly: black and champagne, matched to the Mrz Stamens family */
:root {
  --noir-950: #0e1630;
  --noir-900: #17233F;
  --noir-800: #17233F;
  --noir-700: #24345c;
  --noir-500: #5E6A8A;
  --noir-100: #e3e7f0;
  --noir-50: #f2f4f9;
  --champ: #FF6F3C;
  --champ-600: #e2531f;
  --champ-300: #ff9a72;
  --champ-100: #fff0e9;
  --champ-light: #ff9a72;
  --kente-gold: #FF6F3C;
  --kente-green: #17233F;
  --kente-red: #5E6A8A;
  --ok: #1f8a5b;
  --ok-100: #e7efe6;
  --red: #b42318;
  --red-100: #fde8e7;
  --cream: #f6f7fb;
  --paper: #ffffff;
  --ink: #17233F;
  --muted: #5E6A8A;
  --line: #e3e7f0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(8, 7, 7, 0.06), 0 8px 24px rgba(8, 7, 7, 0.07);
  --display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --kente: repeating-linear-gradient(90deg,
      var(--champ) 0 22px, #080707 22px 28px, var(--champ-300) 28px 40px,
      #080707 40px 46px, var(--noir-500) 46px 66px, #eef1f8 66px 70px,
      var(--champ) 70px 78px, #080707 78px 92px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--noir-700); }
a:hover { color: var(--noir-500); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.5em; color: var(--noir-900); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }

/* Kente band */
.kente-band { display: none; }

/* Header */
.site-header { background: var(--noir-900); color: #fff; position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; }
.brand:hover { color: #fff; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand span b { color: var(--champ-300); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: #d9d1c6; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav .btn { margin-left: 4px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 8px; padding: 7px 10px; font: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--noir-900); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 3px solid var(--champ); }
  .nav.open { display: flex; }
  .nav .btn { margin: 6px 0 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.98rem/1 var(--body); padding: 13px 20px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--champ); color: #fff; }
.btn-accent:hover { background: var(--champ-600); color: #fff; }
.btn-primary { background: var(--noir-800); color: #fff; }
.btn-primary:hover { background: var(--noir-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--noir-800); border-color: var(--noir-800); }
.btn-ghost:hover { background: var(--noir-50); color: var(--noir-800); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #8f1c12; color: #fff; }
.btn-green { background: var(--ok); color: #fff; }
.btn-green:hover { background: #3b553d; color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 0.88rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Hero */
.hero { background: var(--noir-900); color: #fff; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,111,60,0.18), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(94,106,138,0.35), transparent 45%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: italic; color: var(--champ-300); }
.hero p.lead { font-size: 1.15rem; color: #d9d1c6; max-width: 34em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 0.78rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--champ-300); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--champ); border-radius: 2px; }
.section .eyebrow { color: var(--champ-600); }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; color: #eef1f8; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; }
.hero-points li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--champ) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23080707' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 36px; } }

/* Hero card illustration */
.hero-art { position: relative; }
.hero-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px rgba(0,0,0,0.35); position: relative; }
.hero-card + .hero-card { margin: -18px 0 0 48px; }
.hero-card .row { display: flex; gap: 14px; align-items: center; }
.hero-card .meta { font-size: 0.85rem; color: var(--muted); }
.bubble { background: var(--noir-50); border-radius: 14px 14px 14px 4px; padding: 10px 14px; font-size: 0.92rem; margin-top: 10px; }
.bubble.me { background: var(--champ-100); border-radius: 14px 14px 4px 14px; margin-left: 40px; }
.hidden-chip { display: inline-block; font-size: 0.78rem; background: var(--noir-800); color: #fff; padding: 1px 8px; border-radius: 6px; }
.pattern-tile { position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; opacity: 0.9; z-index: -1; }

/* Avatar */
.avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--noir-900); background: var(--champ-100); box-shadow: inset 0 0 0 3px var(--champ); }
.avatar.lg { width: 76px; height: 76px; font-size: 1.7rem; }

/* Sections */
.section { padding: 76px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--noir-900); color: #eef1f8; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { .section { padding: 52px 0; } }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.icon-badge { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--noir-800); color: var(--champ-300); margin-bottom: 16px; }
.icon-badge svg { width: 24px; height: 24px; }

.step-num { font-family: var(--display); font-size: 2.4rem; color: var(--champ); line-height: 1; margin-bottom: 10px; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--noir-50); color: var(--noir-800); font-size: 0.85rem; font-weight: 500; border: 1px solid var(--noir-100); }
.pill.champ { background: var(--champ-100); border-color: #ffd3c2; color: #b0421a; }
.pill.green { background: var(--ok-100); border-color: #cfdccd; color: #3b553d; }
.pill.red { background: var(--red-100); border-color: #efc7bf; color: #8a2f20; }
.pill.grey { background: #f1f0ec; border-color: #e3e0d6; color: #57554f; }

.exam-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.exam-strip .exam { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 22px; font-family: var(--display); font-size: 1.3rem; color: var(--noir-900); box-shadow: var(--shadow); }
.exam-strip .exam small { display: block; font: 500 0.78rem/1.3 var(--body); color: var(--muted); }

.quote-block { border-left: 4px solid var(--champ); padding: 6px 0 6px 20px; font-family: var(--display); font-size: 1.3rem; color: var(--noir-900); }

/* Forms */
.form-card { background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 32px; }
@media (max-width: 600px) { .form-card { padding: 22px 18px; } }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 600; font-size: 0.93rem; color: var(--noir-900); }
.field .hint { font-size: 0.83rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #d5dae6; border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--noir-500); box-shadow: 0 0 0 4px rgba(255,111,60,0.18); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { position: relative; }
.check-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.check-pill span { display: inline-block; padding: 7px 13px; border-radius: 999px; border: 1.5px solid #d5dae6; background: #fff; font-size: 0.9rem; cursor: pointer; user-select: none; }
.check-pill input:checked + span { background: var(--noir-800); color: #fff; border-color: var(--noir-800); }
.check-pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(255,111,60,0.25); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; margin-bottom: 12px; }
.agree input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--noir-800); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: var(--red-100); color: #7d2a1d; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.93rem; margin-bottom: 14px; }
.form-ok { background: var(--ok-100); color: #3b553d; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.93rem; margin-bottom: 14px; }
.file-drop { border: 2px dashed #cdd3e1; border-radius: var(--radius-sm); padding: 14px; background: var(--cream); }
.file-drop input { font-size: 0.9rem; max-width: 100%; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-family: var(--display); font-size: 1.15rem; color: var(--noir-900); margin-bottom: 12px; padding: 0; }
.form-section { padding-top: 18px; margin-top: 8px; border-top: 1px solid var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.success-panel { text-align: center; padding: 30px 10px; }
.success-panel .tick { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--ok-100); display: grid; place-items: center; color: var(--ok); }

/* Footer */
.site-footer { background: var(--noir-950); color: #a49b91; padding: 48px 0 28px; font-size: 0.93rem; }
.site-footer a { color: #eef1f8; text-decoration: none; }
.site-footer a:hover { color: var(--champ-300); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: #fff; font-family: var(--body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* Legal pages */
.legal { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px; margin: 40px auto 64px; box-shadow: var(--shadow); }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal li { margin-bottom: 6px; }
@media (max-width: 600px) { .legal { padding: 24px 18px; margin: 20px auto 40px; } }
.legal-note { background: var(--champ-100); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.9rem; margin-bottom: 24px; }

/* App shell (dashboards) */
.app-body { background: #f6f3ea; }
.app-top { background: #fff; border-bottom: 1px solid var(--line); }
.app-top .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 28px; flex-wrap: wrap; }
.app-top h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 16px; font: 600 0.95rem var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--noir-800); }
.tab.active { color: var(--noir-900); border-bottom-color: var(--champ); }
.tab .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--champ); color: var(--noir-950); font-size: 0.75rem; line-height: 20px; text-align: center; }
.app-main { padding: 28px 0 64px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; padding: 9px 12px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: #fff; border: 1px dashed #d6d0c0; border-radius: var(--radius); }

/* Application and tutor cards */
.app-card { display: flex; flex-direction: column; gap: 12px; }
.app-card .top { display: flex; gap: 14px; align-items: center; }
.app-card .name { font-family: var(--display); font-size: 1.15rem; color: var(--noir-900); font-weight: 600; }
.app-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rate { font-family: var(--display); font-size: 1.15rem; color: var(--noir-900); }
.rate small { font: 500 0.8rem var(--body); color: var(--muted); }
.status { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.status.pending { background: var(--champ-100); color: #b0421a; }
.status.approved, .status.active { background: var(--ok-100); color: #3b553d; }
.status.declined, .status.suspended { background: var(--red-100); color: #8a2f20; }
.status.invited { background: var(--noir-100); color: var(--noir-800); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.vbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--ok-100); color: #3b553d; }
.vbadge svg { width: 13px; height: 13px; }
.vbadge.none { background: #f1f0ec; color: #6b6960; font-weight: 500; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,7,7,0.55); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 720px; box-shadow: 0 30px 80px rgba(0,0,0,0.3); position: relative; }
.modal-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px 26px; }
.modal-foot { padding: 16px 26px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-close { background: var(--noir-50); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--noir-800); flex: none; }
@media (max-width: 600px) { .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; } .modal-backdrop { padding: 12px 8px; } }
.detail-grid { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 0.94rem; }
.detail-grid dt { color: var(--muted); font-weight: 500; }
.detail-grid dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 1fr; } .detail-grid dd { margin-bottom: 8px; } }
.box { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-top: 16px; }
.box h4 { font-family: var(--body); font-size: 0.95rem; margin-bottom: 10px; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; flex-wrap: wrap; }

/* Messaging */
.inbox { display: grid; grid-template-columns: 320px 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 560px; box-shadow: var(--shadow); }
.thread-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 72vh; }
.thread-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; }
.thread-item:hover { background: var(--cream); }
.thread-item.active { background: var(--noir-50); box-shadow: inset 4px 0 0 var(--champ); }
.thread-item .t-name { font-weight: 700; color: var(--noir-900); display: flex; justify-content: space-between; gap: 8px; }
.thread-item .t-sub { font-size: 0.82rem; color: var(--muted); }
.thread-item .t-prev { font-size: 0.87rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--champ); display: inline-block; flex: none; margin-top: 7px; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.thread-head .who { font-weight: 700; color: var(--noir-900); }
.msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; max-height: 58vh; background: #fcfbf7; }
.msg { max-width: 78%; }
.msg .meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 3px; }
.msg .body { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.msg.mine { align-self: flex-end; }
.msg.mine .meta { text-align: right; }
.msg.mine .body { background: var(--noir-800); color: #fff; border-color: var(--noir-800); border-radius: 14px 14px 4px 14px; }
.msg.student .body { background: var(--champ-100); border-color: #ffd3c2; }
.msg.system { align-self: center; max-width: 92%; text-align: center; }
.msg.system .body { background: transparent; border: 0; color: var(--muted); font-size: 0.85rem; padding: 4px; }
.msg .flag-note { font-size: 0.75rem; color: var(--red); margin-top: 3px; }
.msg.mine .flag-note { text-align: right; }
.compose { border-top: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 8px; }
.compose textarea { min-height: 70px; }
.compose .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice { font-size: 0.82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.notice svg { width: 15px; height: 15px; flex: none; color: var(--champ-600); }
.back-link { display: none; }
@media (max-width: 820px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.show-thread .thread-list { display: none; }
  .inbox:not(.show-thread) .thread { display: none; }
  .back-link { display: inline-flex; }
  .thread-list { max-height: none; }
  .msg { max-width: 92%; }
}

/* Toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--noir-900); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200; max-width: calc(100% - 32px); font-size: 0.93rem; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 16px; background: var(--noir-900); position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(255,111,60,0.16), transparent 40%), radial-gradient(circle at 15% 85%, rgba(94,106,138,0.35), transparent 45%); }
.auth-card { position: relative; background: #fff; border-radius: 20px; padding: 34px; width: 100%; max-width: 440px; box-shadow: 0 30px 60px rgba(0,0,0,0.35); }
.auth-card .kente-band { display: none; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; } .auth-card .kente-band { display: none; } }

.loading { display: grid; place-items: center; padding: 60px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--noir-100); border-top-color: var(--noir-700); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sign-doc { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; background: #fff; font-size: 0.95rem; }
.sign-doc h1 { font-size: 1.4rem; margin-top: 10px; }
.sign-doc h2 { font-size: 1.1rem; margin-top: 1.2em; }
.sign-doc section + section { margin-top: 28px; padding-top: 18px; border-top: 2px solid var(--champ-100); }

details > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--noir-900); }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--champ-600); }
details[open] > summary::after { content: "\2212"; }


/* Kwikly look: bold geometric headings, rounded friendly corners */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); line-height: 1.06; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.5rem); }
h3 { font-size: 1.3rem; }
.hero h1 em { font-weight: 800; }
.btn { border-radius: 999px; font-size: 0.95rem; font-weight: 600; padding: 13px 22px; }
.btn-sm { padding: 9px 15px; font-size: 0.85rem; }
.nav a:not(.btn) { font-size: 0.95rem; }
.brand { font-size: 1.45rem; font-weight: 800; }
.brand span { white-space: nowrap; }
.eyebrow { letter-spacing: 0.14em; font-weight: 600; }
.section.dark { background: var(--noir-900); }
.hero, .site-header, .auth-wrap { background: var(--noir-950); }
.site-footer { background: #0e1630; }
.form-card, .card, .modal, .legal, .inbox, .auth-card, .hero-card { border-radius: 16px; }
.exam-strip .exam, .icon-badge { border-radius: 12px; }
.icon-badge { background: var(--noir-800); color: var(--champ); }
.step-num { color: var(--champ-600); font-weight: 700; }
.tab.active { border-bottom-color: var(--champ); }
.check-pill input:checked + span { background: var(--noir-800); border-color: var(--noir-800); color: #fff; }
.pill, .check-pill span { border-radius: 999px; }
.avatar { background: var(--noir-800); color: var(--champ-300); box-shadow: inset 0 0 0 2px var(--champ); }
.msg.mine .body { background: var(--noir-800); border-color: var(--noir-800); }
.vbadge { border-radius: 3px; }
@media (max-width: 480px) { .brand { font-size: 1.2rem; } .brand span small { display: none; } }

/* Kente accents: gold, green, red and black from the cloth */
.grid > .card:nth-child(3n+1) .icon-badge { background: var(--kente-green); color: #fff; }
.grid > .card:nth-child(3n+2) .icon-badge { background: var(--kente-red); color: #fff; }
.grid > .card:nth-child(3n+3) .icon-badge { background: var(--kente-gold); color: #fff; }
.grid > .card:nth-child(4n+1) .step-num { color: var(--kente-gold); }
.grid > .card:nth-child(4n+2) .step-num { color: var(--kente-green); }
.grid > .card:nth-child(4n+3) .step-num { color: var(--kente-red); }
.grid > .card:nth-child(4n+4) .step-num { color: var(--champ-600); }
.exam-strip .exam { border-top: 4px solid var(--kente-gold); }
.exam-strip .exam:nth-child(3n+2) { border-top-color: var(--kente-green); }
.exam-strip .exam:nth-child(3n+3) { border-top-color: var(--kente-red); }
.eyebrow::before { background: linear-gradient(90deg, var(--kente-gold) 0 34%, var(--kente-green) 34% 67%, var(--kente-red) 67%); }


.nav a.btn-accent, .nav a.btn-accent:hover { color: #fff; }

/* ---------- Shared bits for lessons, homework and admin ---------- */
.list-head { font-size: 1.35rem; margin: 26px 0 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--cream); }
.row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 600px) { .row-4 { grid-template-columns: 1fr 1fr; } }
.sel-sm { width: auto; padding: 6px 10px; font-size: 0.88rem; display: inline-block; }
.pay-choice { display: grid; gap: 10px; }
.pay-choice .btn { width: 100%; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.upload-row input[type=file] { flex: 1; min-width: 180px; font-size: 0.88rem; }
.upload-row select { width: auto; }
.setup-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--kente-green); }
.report-card { background: var(--cream); border: 1px solid var(--line); border-left: 4px solid var(--kente-gold); padding: 16px 18px; border-radius: 4px; }
.stars { display: flex; gap: 6px; }
.stars label { position: relative; }
.stars input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.stars span { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid #d5dae6; border-radius: 4px; cursor: pointer; font-weight: 600; }
.stars input:checked + span { background: var(--noir-800); color: var(--champ-300); border-color: var(--noir-800); }
.stars input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201,168,106,.4); }

/* Lessons list */
.lesson-card { display: flex; gap: 18px; align-items: flex-start; }
.lesson-when { flex: none; width: 62px; text-align: center; border: 1px solid var(--line); border-top: 4px solid var(--kente-green); padding: 8px 0; background: var(--cream); }
.lesson-when .lw-day { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--noir-900); }
.lesson-when .lw-mon { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.lesson-info { flex: 1; min-width: 0; }

/* Homework */
.hw-credits { font-size: 0.95rem; margin-bottom: 8px; }
.hw-credits .big { font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--noir-900); margin-right: 6px; }
.hw-plan { border-top: 4px solid var(--kente-gold); }
.hw-answer { margin-top: 12px; background: var(--cream); border-left: 4px solid var(--kente-green); padding: 12px 14px; }
.hw-follow { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.hw-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 860px) { .hw-top { grid-template-columns: 1fr !important; } }

/* ---------- Lesson room ---------- */
.lesson-body { background: #efe9de; }
.lesson-head-meta { display: flex; align-items: center; gap: 14px; }
.lesson-clock { color: var(--champ-300); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.lesson-main { padding: 18px 0 40px; }
.lesson-room { max-width: 1480px; margin: 0 auto; padding: 0 16px; }
.lesson-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lesson-title h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.lesson-grid { display: grid; grid-template-columns: minmax(300px, 0.9fr) 1.4fr; gap: 16px; align-items: start; }
.lesson-grid.focus-board { grid-template-columns: 300px 1fr; }
.video-box { position: relative; background: #0e1630; border-radius: 6px; aspect-ratio: 4 / 3; overflow: hidden; }
.lesson-grid.focus-board .video-box { aspect-ratio: 3 / 4; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: radial-gradient(circle at 70% 20%, rgba(255,111,60,.16), transparent 50%), #0e1630; }
.lesson-tools { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0 14px 14px; min-width: 0; }
.tool-tabs { margin-top: 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tool-focus { margin-left: auto; color: var(--champ-600); }
.tool-panel { min-width: 0; }
@media (max-width: 900px) {
  .lesson-grid, .lesson-grid.focus-board { grid-template-columns: 1fr; }
  .video-box, .lesson-grid.focus-board .video-box { aspect-ratio: 16 / 10; }
  .tool-focus { display: none; }
  .lesson-clock { font-size: 0.72rem; }
}

/* Whiteboard */
.wb-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 0 10px; }
.wb-group { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.wb-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; color: var(--ink); padding: 0; }
.wb-btn svg { width: 18px; height: 18px; }
.wb-btn:hover { border-color: var(--champ); }
.wb-btn.on { background: var(--noir-800); color: var(--champ-300); border-color: var(--noir-800); }
.wb-btn.wb-txt { width: auto; padding: 0 10px; font: 600 0.85rem var(--body); }
.wb-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cfc8b9; cursor: pointer; padding: 0; }
.wb-swatch.on { box-shadow: 0 0 0 2px var(--noir-800); }
.wb-select { width: auto; padding: 6px 8px; font-size: 0.85rem; }
.wb-pageno { font-size: 0.85rem; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.wb-symbols { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 0 8px; }
.wb-symbols button { min-width: 32px; height: 30px; border: 1px solid var(--line); background: var(--cream); border-radius: 4px; cursor: pointer; font-size: 1rem; }
.wb-stage { position: relative; width: 100%; border: 1px solid #d5dae6; border-radius: 4px; overflow: hidden; touch-action: none; background: #fff; }
.wb-stage canvas { position: absolute; left: 0; top: 0; }
.wb-live { cursor: crosshair; }
.wb-textinput { position: absolute; min-width: 160px; max-width: 70%; padding: 2px 4px; border: 1.5px dashed var(--champ) !important; background: rgba(255,255,255,.92) !important; font-family: "Inter", system-ui, sans-serif; line-height: 1.25; resize: none; overflow: hidden; border-radius: 2px !important; box-shadow: none !important; z-index: 2; }

.price-card { border-top: 4px solid var(--kente-green); }
.price-card.featured { border-top-color: var(--kente-gold); }
.price-big { font-family: var(--display); font-size: 2.8rem; line-height: 1.05; color: var(--noir-900); margin-bottom: 6px; }
.price-big small { font: 400 1rem var(--body); color: var(--muted); }
.section.dark .card p { color: var(--muted); }
.safety-light { background: var(--paper); border-top: 1px solid var(--line); }
.safety-light .card { background: var(--noir-800) !important; }

/* Readable labels on light backgrounds */
.app-top .eyebrow, .app-main .eyebrow, .lesson-title .eyebrow, .modal .eyebrow, .legal .eyebrow, .auth-card .eyebrow, .safety-light .eyebrow { color: var(--champ-600); }
.video-placeholder .eyebrow { color: var(--champ-300); }
@media (max-width: 600px) {
  .lesson-body .brand span { display: none; }
  .lesson-head-meta { gap: 10px; }
  .tool-tabs .tab { padding: 10px 10px; }
}

.apply-page { padding-top: 48px; }
.apply-cta h2 { color: #fff; }
.apply-cta p { color: var(--noir-100); }

/* Kwikly brand */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--champ); }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; text-transform: lowercase; }
.brand span b { color: var(--champ); font-weight: 800; }
.brand span small { display: inline-block; margin-left: 7px; font: 500 0.62rem/1 var(--body); letter-spacing: 0.32em; text-transform: uppercase; color: #aeb6cc; vertical-align: middle; }
.site-footer .brand span small { color: #aeb6cc; }
.mark { width: 36px; height: 36px; }
.icon-badge { color: #fff; }
.avatar { background: var(--champ-100); box-shadow: inset 0 0 0 3px var(--champ); color: var(--noir-900); }
.eyebrow::before { background: var(--champ) !important; }
.footer-rayden { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; color: #c3c9da; }
.footer-rayden a { color: #fff; }
/* Rotating exam strip */
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .exam-strip { flex-wrap: nowrap; width: max-content; animation: kw-marquee 32s linear infinite; justify-content: flex-start; }
.marquee:hover .exam-strip { animation-play-state: paused; }
.marquee .exam { flex: none; }
@keyframes kw-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .exam-strip { animation-duration: 90s; } }
/* Apply chooser */
.chooser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .chooser { grid-template-columns: 1fr; } }
.choice { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.choice:hover { border-color: var(--champ); transform: translateY(-2px); color: var(--ink); }
.choice h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.choice p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.choice .go { font-weight: 700; color: var(--champ-600); }
.choice .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--champ); color: #fff; font-size: 1.4rem; font-weight: 800; }
.choice:nth-child(2) .ico { background: var(--noir-900); }
.choice:nth-child(3) .ico { background: var(--noir-500); }
/* Dashboard shell (admin, tutor, parent) */
@media (min-width: 1000px) {
  .app-body .app-top { position: fixed; left: 0; top: 66px; bottom: 0; width: 248px; overflow-y: auto; background: var(--noir-900); color: #fff; padding: 22px 0; border: 0; z-index: 30; }
  .app-body .app-top .wrap { padding: 0 16px; max-width: none; display: block; }
  .app-body .app-top h1 { color: #fff; font-size: 1.25rem; }
  .app-body .app-top .muted, .app-body .app-top p { color: #b9c0d4; }
  .app-body .app-top .eyebrow { color: var(--champ-300); }
  .app-body .app-top .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); margin-top: 10px; }
  .app-body .app-top .tabs { flex-direction: column; border: 0; gap: 2px; margin-top: 18px; overflow: visible; }
  .app-body .app-top .tab { text-align: left; width: 100%; color: #c9cfe0; border: 0; border-radius: 10px; padding: 11px 14px; background: transparent; margin: 0; }
  .app-body .app-top .tab:hover { background: rgba(255,255,255,.07); color: #fff; }
  .app-body .app-top .tab.active, .app-body .app-top .tab[aria-selected="true"] { background: var(--champ); color: #fff; }
  .app-body .app-main { margin-left: 248px; }
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); border-left: 4px solid var(--champ); }
.stat b { display: block; font: 700 1.7rem/1.1 var(--display); color: var(--noir-900); }
.stat span { font-size: .85rem; color: var(--muted); }
.stat:nth-child(2) { border-left-color: var(--noir-900); } .stat:nth-child(3) { border-left-color: var(--noir-500); } .stat:nth-child(4) { border-left-color: #1f8a5b; }
.who-switch { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 18px; }
.who-switch a { text-decoration: none; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.who-switch a.active { background: var(--champ); color: #fff; }
.ref-row { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 2px; margin-bottom: 10px; background: var(--cream); }
.id-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.id-compare figure { margin: 0; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.id-compare img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 6px; }
.id-compare figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.pay-choice { display: grid; gap: 10px; }
.pay-choice .btn { width: 100%; border-radius: 14px; padding: 14px 16px; }
