/* Shared brand layer: bundled fonts + the look of public and student pages (teacher pages use teacher.css on top). */
@font-face {
  font-family: "Figtree";
  src: url("vendor/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
  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;
}
@font-face {
  font-family: "Figtree";
  src: url("vendor/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("vendor/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}


body:not(.teacher) { font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif; }
body:not(.teacher) h1, body:not(.teacher) h2, body:not(.teacher) .navbar .brand { font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; letter-spacing: -.01em; }
body:not(.teacher) .navbar .brand { font-size: 1.25rem; }
body:not(.teacher) .card { border-radius: 16px; box-shadow: 0 2px 10px rgba(20,33,61,.06); border: 1px solid #e3e8f1; }
body:not(.teacher) .btn { border-radius: 10px; padding: 10px 18px; font-family: inherit; font-weight: 600; background: #3454d1; }
body:not(.teacher) .btn-secondary { background: #fff; color: #1e2f57; border: 1px solid #cdd5e5; }
body:not(.teacher) .btn-secondary:hover { background: #f1f4fb; }
body:not(.teacher) input:focus, body:not(.teacher) select:focus, body:not(.teacher) textarea:focus { outline: 2px solid #d9ad4e; outline-offset: 1px; }

/* sign-in and sign-up */
body.auth-page { background: radial-gradient(700px 360px at 85% -5%, rgba(217,173,78,.22), transparent 70%), radial-gradient(600px 360px at 0% 0%, rgba(52,84,209,.14), transparent 70%), #f3f5fa; background-repeat: no-repeat; background-attachment: fixed; }
.auth-card { max-width: 440px; margin: 36px auto; padding: 30px 28px; }
.auth-card .auth-mark { display: block; margin: 0 0 10px; }
.auth-card h2 { font-size: 1.7rem; margin-bottom: 4px; }
.auth-card .auth-sub { margin: 0 0 14px; color: #5f6b86; }
body:not(.teacher) .auth-card .btn { width: 100%; text-align: center; margin-top: 18px; padding: 12px; background: #14213d; }
body:not(.teacher) .auth-card .btn:hover { background: #1d3166; }
.auth-card a { color: #2943ab; text-underline-offset: 3px; }
.auth-card .btn-secondary { background: #fff; color: #1e2f57; }

/* student home */
.s-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 28px 30px; margin-bottom: 20px; color: #e8edfb;
  background: radial-gradient(480px 240px at 95% -10%, rgba(217,173,78,.36), transparent 70%), radial-gradient(380px 260px at -5% 110%, rgba(84,120,255,.28), transparent 70%), linear-gradient(135deg, #14213d, #1d3166);
  box-shadow: 0 12px 30px rgba(20,33,61,.22); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 22px; align-items: center; }
.s-hero .kick { margin: 0 0 6px; color: #e8c978; font-style: italic; font-size: .95rem; }
.s-hero h1 { margin: 0 0 6px; color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.s-hero p.sub { margin: 0 0 14px; color: #c7d2ef; }
.s-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.s-chips div { min-width: 84px; padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); }
.s-chips b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.5rem; line-height: 1.1; color: #fff; }
.s-chips span { font-size: .8rem; color: #b8c4e6; }
.s-chips .hot { background: rgba(217,173,78,.22); border-color: rgba(232,201,120,.55); } .s-chips .hot b { color: #ffd978; }
.s-join { background: linear-gradient(180deg, #fffdf8, #fbf3df); border: 1.5px solid #dfc27f; border-radius: 16px; padding: 16px 18px; color: #3b2f12; min-width: 270px; }
.s-join label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: #7a5712; }
.s-join .row { display: flex; gap: 8px; } .s-join input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #d9c690; border-radius: 10px; text-transform: uppercase; letter-spacing: .08em; font: inherit; }
.s-join .btn { margin: 0; background: #14213d; }
.s-enrolled { margin: 8px 0 0; font-size: .82rem; color: #6b5a33; }
.s-panel h2 { font-size: 1.3rem; margin: 0 0 12px; }
.s-tests { list-style: none; margin: 0; padding: 0; }
.s-test { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px 0; border-top: 1px solid #e8ecf4; }
.s-test:first-child { border-top: 0; }
.s-dot { width: 11px; height: 11px; border-radius: 50%; background: #cdd5e5; }
.s-dot.live { background: #12805c; box-shadow: 0 0 0 4px rgba(18,128,92,.18); } .s-dot.todo { background: #b8862b; } .s-dot.done { background: #3454d1; }
.s-title { font-weight: 700; font-size: 1.04rem; color: #14213d; }
.s-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .86rem; color: #5f6b86; margin-top: 2px; align-items: center; }
.s-desc { font-size: .86rem; color: #6b7390; margin-top: 3px; }
.s-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.s-actions form { margin: 0; } .s-actions .btn { margin: 0; }
.s-empty { text-align: center; padding: 30px 10px; color: #5f6b86; }
@media (max-width: 760px) { .s-hero { grid-template-columns: 1fr; padding: 22px 18px; } .s-join { min-width: 0; } .s-test { grid-template-columns: 12px 1fr; } .s-actions { grid-column: 2; justify-content: flex-start; } }

/* landing page buttons keep their own look (brand.css would otherwise turn them into plain blue buttons) */
body:not(.teacher) a.lp2-btn { background: #b8862b; color: #1a1408; border-radius: 8px; padding: 13px 26px; font-weight: 600; }
body:not(.teacher) a.lp2-btn:hover { background: #cc9a34; }
body:not(.teacher) a.lp2-btn-ghost { background: transparent; color: #f5f2ea; border: 1.5px solid #b9c2d6; border-radius: 8px; padding: 12px 24px; font-weight: 500; }
body:not(.teacher) a.lp2-btn-ghost:hover { background: transparent; border-color: #d9ad4e; }
@media (max-width: 640px) { body:not(.teacher) .nav-links a[href^="#"] { display: none; } }
body:not(.teacher) a.lp2-about-cta { background: transparent; color: #f5f2ea; border: 1.5px solid #b9c2d6; border-radius: 8px; padding: 10px 20px; width: auto; }

/* ---- UPI payment box (register + My plan) ---- */
.pay-box { background: #fbf7ea; border: 1px solid #e3d6a6; border-radius: 12px; padding: 16px; margin: 10px 0; color: #2a2a2a; }
.pay-box .pay-title { margin: 0 0 8px; font-weight: 700; color: #14213d; }
.pay-box .pay-upi { margin: 0 0 12px; font-size: .92rem; }
.pay-box .pay-upi code { background: #fff; border: 1px solid #e3d6a6; border-radius: 6px; padding: 2px 8px; word-break: break-all; }
.pay-box .pay-qr { display: inline-block; background: #fff; border: 1px solid #e3d6a6; border-radius: 12px; padding: 10px; text-align: center; }
.pay-box .pay-qr svg { display: block; width: 180px; height: 180px; max-width: 100%; }
.pay-box .pay-qr span { display: block; margin-top: 6px; font-size: .8rem; color: #5b6478; }
body:not(.teacher) .pay-box a.pay-btn, body:not(.teacher) .auth-card .pay-box a.pay-btn, .pay-box a.pay-btn {
  display: block; width: 100%; box-sizing: border-box; text-align: center; margin: 12px 0 4px; padding: 14px 16px;
  background: #b8862b; color: #14213d; font-weight: 700; font-size: 1rem; border-radius: 10px; text-decoration: none; border: 0; }
.pay-box a.pay-btn:hover { background: #d9ad4e; color: #14213d; }
.pay-box .pay-only-phone { display: none; }
.pay-box .pay-only-desktop { display: block; }
.pay-box .pay-steps { margin: 12px 0 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.5; }
.pay-box .pay-steps li { margin: 6px 0; }
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .pay-box .pay-only-desktop { display: none; }
  .pay-box .pay-only-phone { display: block; }
}

/* ---- phones: one-row navbar, full-width hero buttons ---- */
@media (max-width: 640px) {
  body:not(.teacher) .navbar { padding: 12px 16px; gap: 10px; }
  body:not(.teacher) .navbar .brand { font-size: 1.05rem; white-space: nowrap; }
  body:not(.teacher) .navbar { flex-wrap: wrap; row-gap: 8px; }
  body:not(.teacher) .nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; white-space: nowrap; }
  /* logged-in: more links than fit beside the brand, so they get their own wrapped row */
  body:not(.teacher) .nav-links:has(.nav-user) { flex: 1 1 100%; flex-wrap: wrap; row-gap: 8px; white-space: normal; }
  body:not(.teacher) .nav-links a, body:not(.teacher) .nav-links .nav-user { margin-left: 0; font-size: .85rem; }
  body:not(.teacher) .nav-links a[href="/"] { display: none; }
  body:not(.teacher) .nav-links .nav-logout { padding-left: 0; margin-left: 0; }
  .lp2-cta { flex-direction: column; align-items: stretch; }
  .lp2-cta .btn { text-align: center; }
  .lp2-final .btn { display: block; margin: 10px auto 0; max-width: 340px; text-align: center; }
}

/* navbar is tight on phones: the install button lives in the footer there */
@media (max-width: 640px) { .navbar [data-install-app] { display: none !important; } }

/* ghost button on the light "Ready to run your first test?" band: dark text and border */
body:not(.teacher) .lp2-final a.lp2-btn-ghost { color: #14213d; border: 1.5px solid #14213d; background: transparent; }
body:not(.teacher) .lp2-final a.lp2-btn-ghost:hover { background: #14213d; color: #f5f2ea; border-color: #14213d; }
body:not(.teacher) .lp2-final a.lp2-btn-ghost:focus-visible { outline: 3px solid #b8862b; outline-offset: 3px; }

/* ================= student polish ================= */
/* test rows become soft cards that answer the pointer */
.s-tests { display: grid; gap: 10px; }
body:not(.teacher) .s-test { background: #fff; border: 1px solid #e3e8f4; border-radius: 14px; padding: 16px 18px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
body:not(.teacher) .s-test:first-child { border-top: 1px solid #e3e8f4; }
body:not(.teacher) .s-test:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(20,33,61,.45); border-color: #cbd5ee; }
.s-dot.live { animation: s-pulse 1.8s ease-out infinite; }
@keyframes s-pulse { 0% { box-shadow: 0 0 0 0 rgba(18,128,92,.45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(18,128,92,0); } }

/* the one entrance moment: hero chips rise in a row, once */
.s-chips div { animation: s-rise .6s cubic-bezier(.2,.7,.2,1) both; }
.s-chips div:nth-child(2) { animation-delay: .09s; } .s-chips div:nth-child(3) { animation-delay: .18s; }
@keyframes s-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* admit cards look like tickets with a tear-off stub */
.admit-tickets { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 14px; }
.admit-ticket { display: flex; background: #fff; border: 1px solid #e0d3a8; border-radius: 16px; position: relative; overflow: hidden; box-shadow: 0 8px 22px -16px rgba(20,33,61,.5); }
.admit-ticket::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #b8862b; }
.ticket-main { flex: 1; min-width: 0; padding: 18px 18px 18px 24px; display: flex; flex-direction: column; gap: 4px; }
.ticket-main strong { font-family: "Bricolage Grotesque", "Figtree", sans-serif; font-size: 1.15rem; color: #14213d; }
.ticket-tag { color: #8a6516; font-size: .8rem; font-weight: 600; }
.ticket-meta { color: #5f6b86; font-size: .88rem; }
.ticket-stub { position: relative; display: flex; align-items: center; padding: 0 18px; border-left: 2px dashed #e0d3a8; background: #fbf7ea; }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: #f4f6fb; border: 1px solid #e0d3a8; }
.ticket-stub::before { top: -9px; } .ticket-stub::after { bottom: -9px; }
.ticket-stub .btn { margin: 0; white-space: nowrap; }
@media (max-width: 520px) {
  .admit-ticket { flex-direction: column; }
  .ticket-stub { border-left: 0; border-top: 2px dashed #e0d3a8; padding: 14px 18px; }
  .ticket-stub::before, .ticket-stub::after { top: -9px; bottom: auto; }
  .ticket-stub::before { left: -9px; } .ticket-stub::after { left: auto; right: -9px; }
  .ticket-stub .btn { width: 100%; text-align: center; }
}

/* phone: slim top bar + bottom tab bar, like an app */
.tabbar { display: none; }
@media (max-width: 640px) {
  body:not(.teacher) .nav-links.is-auth > a, body:not(.teacher) .nav-links.is-auth > .nav-user { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: #14213d; border-top: 2px solid #d9ad4e; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: #aab5cf; text-decoration: none; font-size: .72rem; border-radius: 10px; transition: color .15s, background .15s; }
  .tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: #ffd978; background: rgba(255,255,255,.07); }
  body:not(.teacher):has(.tabbar) { padding-bottom: 72px; }
  body:not(.teacher) .navbar:has(.nav-links.is-auth) { flex-wrap: nowrap; }
  body:not(.teacher) .nav-links.is-auth, body:not(.teacher) .nav-links.is-auth:has(.nav-user) { flex: 0 0 auto; flex-wrap: nowrap; }
}
.admit-tickets, .admit-ticket + .admit-ticket { }
.container p.muted a { color: #2943ab; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .s-dot.live, .s-chips div { animation: none; } body:not(.teacher) .s-test { transition: none; } }

/* wide tables scroll inside their card on phones instead of stretching the page */
@media (max-width: 760px) {
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* error pages */
.err-wrap { max-width: 520px; margin: 8vh auto; padding: 0 20px; text-align: center; }
.err-code { font-family: "Bricolage Grotesque", "Figtree", sans-serif; font-weight: 800; font-size: clamp(4.5rem, 20vw, 7.5rem); line-height: 1; margin: 0; color: #14213d; letter-spacing: -.03em; }
.err-code span { color: #b8862b; }
.err-wrap h1 { font-size: 1.5rem; margin: 10px 0 8px; color: #14213d; }
.err-wrap p { color: #5f6b86; margin: 0 0 22px; }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.err-actions .btn { margin: 0; }
