/* =========================
   GetMyQuiz – Clean facelift
   ========================= */

:root{
  /* Core */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --text: #0f172a;          /* slate-900 */
  --muted: #475569;         /* slate-600 */
  --muted-2: #64748b;       /* slate-500 */
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

  /* Brand */
  --brand: #2563eb;         /* blue-600 */
  --brand-2: #7c3aed;       /* violet-600 */
  --brand-soft: rgba(37, 99, 235, 0.10);

  /* Radius */
  --r-xl: 18px;
  --r-lg: 14px;
  --r-md: 12px;

  /* Layout */
  --container: 1100px;
}

/* Dark mode (optional, respects system setting) */
@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --surface: rgba(255,255,255,0.06);
    --surface-2: rgba(255,255,255,0.04);
    --text: #e8eefc;
    --muted: rgba(232,238,252,0.75);
    --muted-2: rgba(232,238,252,0.60);
    --border: rgba(255,255,255,0.14);
    --shadow: 0 12px 30px rgba(0,0,0,0.35);
    --brand-soft: rgba(110, 231, 255, 0.12);
  }
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(124, 58, 237, 0.13), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(37, 99, 235, 0.14), transparent 60%),
    var(--bg);
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

main.container{
  padding: 28px 0 42px;
}

/* =========================
   Header / Nav
   ========================= */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.brand-mark{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
}
.brand-text{ font-size: 18px; }

.nav{
  display:flex;
  align-items:center;
  gap: 8px;
}

.nav-link{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
}
.nav-link:hover{
  background: var(--surface-2);
  color: var(--text);
  outline: 1px solid var(--border);
}

.nav-link.is-active{
  color: var(--text);
  background: var(--brand-soft);
  outline: 1px solid color-mix(in oklab, var(--brand) 40%, transparent);
}

.header-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

/* Dropdown */
.nav-dropdown{ position: relative; }
.chev{ opacity: .7; margin-left: 4px; font-size: 12px; }

.dropdown{
  display:none;
  position:absolute;
  left: 0;
  top: 46px;
  min-width: 240px;
  border-radius: 14px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav-dropdown:hover .dropdown{ display:block; }

.dropdown-link{
  display:block;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 650;
}
.dropdown-link:hover{
  background: var(--surface-2);
  color: var(--text);
  outline: 1px solid var(--border);
}

/* Mobile menu */
.menu-btn{
  display:none;
  align-items:center;
  gap:8px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 800;
  color: var(--text);
}
.menu-btn:hover{ box-shadow: var(--shadow); }

.mobile-nav{
  display:none;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 60%, transparent);
}
.mobile-nav .container{
  padding: 12px 0 14px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-link{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 750;
  color: var(--muted);
}
.mobile-link:hover{ color: var(--text); box-shadow: var(--shadow); }

/* Responsive: collapse desktop nav */
@media (max-width: 900px){
  .nav{ display:none; }
  .header-actions{ display:none; }
  .menu-btn{ display:inline-flex; }
  .mobile-nav.is-open{ display:block; }
}

/* =========================
   Buttons
   ========================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}
.btn:hover{
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.btn:active{ transform: translateY(0); }

.btn-primary{
  border: 1px solid color-mix(in oklab, var(--brand) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in oklab, var(--brand) 90%, white 10%), color-mix(in oklab, var(--brand-2) 90%, white 10%));
  color: white;
}
.btn-ghost{
  background: transparent;
}

/* =========================
   Typography
   ========================= */

h1{
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 10px;
  letter-spacing: -0.8px;
  line-height: 1.05;
}
h2{
  font-size: 24px;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
h3{
  margin: 0 0 6px;
  font-size: 18px;
}
p{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.muted{ color: var(--muted); }

/* =========================
   Layout blocks
   ========================= */

.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
}

.badges{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.badge{
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 16px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.card p{ margin: 0; }

.meta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
}

.card .actions{
  margin-top: 8px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Stats tiles */
.kpi{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 12px;
}
.tile .num{ font-size: 22px; font-weight: 950; }
.tile .lbl{ color: var(--muted-2); font-size: 13px; font-weight: 750; }

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  padding: 26px 0 18px;
  margin-top: 42px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px){
  .footer-grid{ grid-template-columns: 1fr; }
}
.footer-title{
  font-weight: 950;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.footer-links{
  list-style:none;
  padding:0;
  margin:0;
}
.footer-links li{ margin: 7px 0; }
.footer-links a{
  color: var(--muted);
  font-weight: 750;
}
.footer-links a:hover{ color: var(--text); }

.footer-bottom{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 12px;
  color: var(--muted-2);
  font-weight: 650;
}

/* Ad slot placeholder */
.ad-slot{
  border: 1px dashed color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: var(--r-xl);
  padding: 12px;
  background: var(--surface-2);
}
.ad-label{
  display:inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-2);
  font-weight: 800;
  margin-bottom: 8px;
}

/* Quiz print helpers */
.no-print {}

/* Print styles (keep your quiz sheets clean) */
@media print {
  body { background: #fff !important; color: #000 !important; }

  .site-header,
  .site-footer,
  .header-actions,
  .ad-slot,
  .btn,
  .no-print {
    display: none !important;
  }

  main.container{
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .panel, .card{
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  h1, h2, h3 { color:#000 !important; }
  p, .muted { color:#111 !important; }

  a { text-decoration:none !important; color:#000 !important; }

  .page-break { page-break-before: always; }
  .avoid-break { break-inside: avoid; page-break-inside: avoid; }

  .print-meta { margin: 8px 0 14px; font-size: 12px; color:#111 !important; }
  .question { margin: 12px 0; }
  .options { margin: 6px 0 0 18px; }
}


/* --- Visual elements --- */
.media {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-head{
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.icon-badge{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

@media print {
  .media { display:none !important; }
  .icon-badge { border: none !important; }
}  

/* ===== Quiz page polish ===== */
.quiz-top {
  display: grid;
  gap: 12px;
}

.quiz-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quiz-title h1 {
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.02);
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
}

.quiz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(0,0,0,.015);
}

.quiz-toolbar .left,
.quiz-toolbar .right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.quiz-toolbar .hint {
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

.q-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.q-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--paper);
  padding: 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

.q-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.q-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--accent-ink);
  background: rgba(31,78,216,.10);
  border: 1px solid rgba(31,78,216,.18);
  flex: 0 0 auto;
}

.q-text {
  font-weight: 750;
  color: var(--ink);
}

.q-options {
  margin: 10px 0 0 42px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.q-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-weight: 650;
}

.q-letter {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.02);
  color: var(--muted);
  font-weight: 900;
  flex: 0 0 auto;
}

.answer-block {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.answer-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.answer-item:last-child { border-bottom: 0; }

.answer-a {
  color: var(--ink);
  font-weight: 800;
}

/* Print: keep answers on new page */
@media print {
  .quiz-toolbar, .format-switch, .no-print { display: none !important; }
  .q-item { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .q-options { margin-left: 18px !important; }
  .q-num { border: 0 !important; background: transparent !important; }
}
