    :root{
      --bg: #0b1220;
      --panel: rgba(255,255,255,.06);
      --panel2: rgba(255,255,255,.10);
      --text: rgba(255,255,255,.92);
      --muted: rgba(255,255,255,.70);
      --faint: rgba(255,255,255,.55);
      --border: rgba(255,255,255,.16);
      --good: rgba(64, 255, 175, .9);
      --warn: rgba(255, 210, 92, .95);
      --bad: rgba(255, 97, 97, .92);
      --shadow: 0 16px 48px rgba(0,0,0,.35);
      --radius: 18px;
      --focus: 0 0 0 3px rgba(120,170,255,.45);
      --maxw: 980px;
      font-synthesis: none;
      text-rendering: optimizeLegibility;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    *{ box-sizing: border-box; }

    body{
      margin:0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
      color: var(--text);
      background:
        radial-gradient(1200px 600px at 18% 10%, rgba(99,102,241,.28), transparent 60%),
        radial-gradient(1000px 520px at 85% 0%, rgba(56,189,248,.22), transparent 55%),
        radial-gradient(900px 520px at 50% 90%, rgba(34,197,94,.16), transparent 60%),
        linear-gradient(180deg, #070b14, var(--bg));
      min-height: 100vh;
    }

    html[data-theme="light"]{
      color-scheme: light;
      --bg: #f2f5fb;
      --panel: rgba(255,255,255,.78);
      --panel2: rgba(255,255,255,.90);
      --text: rgba(16,21,34,.98);
      --muted: rgba(16,21,34,.70);
      --faint: rgba(16,21,34,.58);
      --border: rgba(16,21,34,.14);
      --shadow: 0 14px 36px rgba(0,0,0,.12);
    }
    html[data-theme="light"] body{
      color: var(--text);
      background:
        radial-gradient(1200px 600px at 18% 10%, rgba(99,102,241,.12), transparent 60%),
        radial-gradient(1000px 520px at 85% 0%, rgba(56,189,248,.10), transparent 55%),
        radial-gradient(900px 520px at 50% 90%, rgba(34,197,94,.08), transparent 60%),
        linear-gradient(180deg, #f7f9fc, #eef2f8);
    }

    a{ color: inherit; }

    .wrap{ max-width: var(--maxw); margin: 0 auto; padding: 28px 18px 56px; }

    header{
      display:flex;
      flex-wrap:wrap;
      align-items:flex-end;
      justify-content:space-between;
      gap: 14px;
      margin-bottom: 16px;
    }

    .brand{
      display:flex;
      flex-direction:column;
      gap: 6px;
    }

    .brand h1{ font-size: 28px; margin:0; letter-spacing: .2px; }
    .brand p{ margin:0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 70ch; }

    .topActions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
    .langSelect{
      border:1px solid var(--border);
      background: rgba(255,255,255,.12);
      color: var(--text);
      border-radius: 12px;
      padding: 8px 10px;
      font-size: 13px;
      cursor:pointer;
    }
    .langSelect option{
      background: #111827;
      color: #ffffff;
    }

    .btn{
      appearance:none;
      border: 1px solid var(--border);
      color: var(--text);
      background: rgba(255,255,255,.05);
      padding: 10px 12px;
      border-radius: 12px;
      cursor:pointer;
      font-weight: 600;
      font-size: 14px;
      transition: transform .06s ease, background .15s ease, border-color .15s ease;
      user-select:none;
    }
    .btn:hover{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); }
    .btn:active{ transform: translateY(1px); }
    .btn:focus{ outline:none; box-shadow: var(--focus); }

    .btn.primary{
      background: linear-gradient(135deg, rgba(99,102,241,.60), rgba(56,189,248,.42));
      border-color: rgba(160,190,255,.35);
    }
    .btn.primary:hover{ background: linear-gradient(135deg, rgba(99,102,241,.68), rgba(56,189,248,.50)); }

    .btn.danger{
      background: rgba(255,97,97,.10);
      border-color: rgba(255,97,97,.32);
    }

    .grid{
      display:grid;
      grid-template-columns: 1.3fr .7fr;
      gap: 16px;
      align-items:start;
    }

    @media (max-width: 880px){
      .grid{ grid-template-columns: 1fr; }
    }

    .card{
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow:hidden;
    }

    .cardHeader{
      padding: 14px 16px;
      border-bottom: 1px solid rgba(255,255,255,.10);
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 10px;
    }

    html[data-theme="light"] .cardHeader{
      border-bottom-color: rgba(16,21,34,.12);
    }

    .cardHeader h2{ font-size: 16px; margin:0; }
    .pill{
      font-size: 12px;
      color: var(--muted);
      border: 1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.05);
      padding: 6px 10px;
      border-radius: 999px;
      white-space:nowrap;
    }

    .cardBody{ padding: 16px; }

    html[data-theme="light"] .card{
      background: rgba(255,255,255,.90);
      border-color: rgba(16,21,34,.12);
    }
    html[data-theme="light"] .opt,
    html[data-theme="light"] .sideItem,
    html[data-theme="light"] .resultsActions{
      background: rgba(0,0,0,.03);
      border-color: rgba(16,21,34,.12);
    }
    html[data-theme="light"] .btn{
      background: rgba(0,0,0,.04);
      border-color: rgba(16,21,34,.14);
      color: var(--text);
    }
    html[data-theme="light"] .btn.primary{
      color: #0b1220;
    }
    html[data-theme="light"] .pill{
      background: rgba(0,0,0,.04);
      border-color: rgba(16,21,34,.12);
    }

    .cornerControls{
      position: fixed;
      top: 16px;
      right: 16px;
      z-index: 999;
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .themeToggle{
      border: 1px solid var(--border);
      background: rgba(255,255,255,.10);
      color: var(--text);
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 16px;
      cursor: pointer;
      backdrop-filter: blur(6px);
    }

    .mobileMenu{
      position: fixed;
      top: 16px;
      right: 16px;
      z-index: 1000;
      display: none;
    }
    .mobileMenuBtn{
      border: 1px solid var(--border);
      background: rgba(255,255,255,.10);
      color: var(--text);
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 16px;
      cursor: pointer;
      backdrop-filter: blur(6px);
    }
    .mobileMenuPanel{
      position: absolute;
      right: 0;
      margin-top: 8px;
      min-width: 220px;
      background: #111827;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px;
      box-shadow: var(--shadow);
      display: none;
    }
    html[data-theme="light"] .mobileMenuPanel{
      background: #ffffff;
    }
    .mobileMenuBtn i{ font-size:18px; line-height:1; display:block; }
    .mobileMenu.open .mobileMenuPanel{ display: block; }
    .miniLabel{
      display:block;
      font-size:12px;
      color: var(--muted);
      margin: 2px 0 6px;
    }
    .miniSelect{
      width:100%;
      border:1px solid var(--border);
      background: rgba(255,255,255,.08);
      color: var(--text);
      border-radius: 12px;
      padding: 8px 10px;
      font-size: 13px;
      margin-bottom: 10px;
    }
    .miniSelect option{
      background: #111827;
      color: #ffffff;
    }
    html[data-theme="light"] .miniSelect option{
      background: #ffffff;
      color: #111827;
    }
    .miniBtn{
      width:100%;
      border:1px solid var(--border);
      background: rgba(255,255,255,.08);
      color: var(--text);
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 14px;
      cursor: pointer;
    }

    @media (max-width: 720px){
      .cornerControls{ display:none; }
      .mobileMenu{ display:block; }
    }

    .progress{
      height: 10px;
      background: rgba(255,255,255,.07);
      border: 1px solid rgba(255,255,255,.10);
      border-radius: 999px;
      overflow:hidden;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    }

    html[data-theme="light"] .progress{
      background: rgba(16,21,34,.06);
      border-color: rgba(16,21,34,.12);
      box-shadow: inset 0 1px 0 rgba(16,21,34,.08);
    }

    .bar{
      height:100%;
      width:0%;
      background: linear-gradient(90deg, rgba(99,102,241,.85), rgba(56,189,248,.70), rgba(34,197,94,.62));
      transition: width .25s ease;
    }

    .qTitle{ margin: 14px 0 0; font-size: 18px; line-height: 1.35; }
    .qHint{ margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

    .options{
      margin-top: 14px;
      display:grid;
      gap: 10px;
    }

    .opt{
      display:flex;
      gap: 10px;
      align-items:flex-start;
      padding: 12px 12px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.04);
      cursor:pointer;
      transition: background .12s ease, border-color .12s ease, transform .06s ease;
    }

    .opt:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); }
    .opt:active{ transform: translateY(1px); }

    .opt input{ margin-top: 2px; display:none; }

    .opt.selected{
      background: rgba(99,102,241,.18);
      border-color: rgba(160,190,255,.55);
      box-shadow: 0 0 0 2px rgba(99,102,241,.35) inset;
    }

    html[data-theme="light"] .opt.selected{
      background: rgba(99,102,241,.18);
      border-color: rgba(99,102,241,.45);
      box-shadow: 0 0 0 2px rgba(99,102,241,.25) inset;
    }

    .opt strong{ display:block; font-size: 13px; letter-spacing: .2px; color: var(--faint); }
    .opt span{ display:block; font-size: 14px; line-height: 1.35; }

    .navRow{ margin-top: 16px; display:flex; gap: 10px; justify-content:space-between; flex-wrap:wrap; }
    .leftNav, .rightNav{ display:flex; gap: 10px; }

    .sideCard .cardBody{ padding: 14px 14px 16px; }

    .sideList{
      margin: 0;
      padding: 0;
      list-style:none;
      display:grid;
      gap: 8px;
    }

    .sideItem{
      display:flex;
      gap: 10px;
      padding: 10px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,.10);
      background: rgba(0,0,0,.12);
      cursor: pointer;
    }

    .dot{
      width: 10px;
      height: 10px;
      margin-top: 3px;
      border-radius: 999px;
      background: rgba(255,255,255,.20);
      border: 1px solid rgba(255,255,255,.18);
      flex: 0 0 auto;
    }

    .dot.done{ background: rgba(34,197,94,.75); border-color: rgba(34,197,94,.65); }
    .dot.current{ background: rgba(56,189,248,.78); border-color: rgba(56,189,248,.65); }

    .sideItem .meta{ display:flex; flex-direction:column; gap: 4px; }
    .sideItem .meta .label{ font-size: 12px; color: var(--muted); }
    .sideItem .meta .value{ font-size: 13px; color: var(--text); }

    .resultsHeader{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 10px;
      flex-wrap:wrap;
      margin-top: 24px;
    }

    .resultsHeader p{ margin: 8px 0 0; color: var(--muted); font-size: 13px; max-width: 75ch; line-height: 1.45; }

    .resList{ display:grid; gap: 10px; margin-top: 14px; }
    .resTitle{ margin:0 0 5px 0; font-size:16px; color: var(--text); }
    .resMeta{ margin-bottom:5px; color: var(--muted); font-size:12px; }
    .resActions{ margin-top: 10px; display:flex; gap:10px; flex-wrap:wrap; }
    .btn.mini{
      padding: 8px 10px;
      font-size: 12.5px;
      border-radius: 10px;
    }

    .resultsActions{
      margin-top: 18px;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: rgba(255,255,255,.04);
    }
    .resultsActions h4{ margin:0 0 6px; font-size: 14px; letter-spacing: .2px; }
    .resultsActions p{ margin:0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
    .resultsActions .actionsRow{ display:flex; gap:12px; flex-wrap:wrap; }
    .resultsActions .actionsRow .btn{
      flex:1;
      padding: 14px 18px;
      font-size: 15px;
      text-align: center;
      border-radius: 14px;
    }

    .small{ font-size: 12px; color: var(--muted); }

    .footerNote{
      margin-top: 14px;
      color: rgba(255,255,255,.62);
      font-size: 12px;
      line-height: 1.5;
    }

    html[data-theme="light"] .footerNote{
      color: var(--muted);
    }

.hidden{display:none !important;}
    #langScreen{
      display: none;
    }

    #langScreen.active{
      display: block;
    }

    .langGrid{
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-top: 20px;
    }

    .langCard{
      background: var(--panel2);
      border: 2px solid var(--border);
      border-radius: 14px;
      padding: 20px;
      text-align: center;
      cursor: pointer;
      transition: all .2s ease;
    }

    .langCard:hover{
      background: var(--panel);
      border-color: rgba(160,190,255,.35);
      transform: translateY(-2px);
    }

    .langCard.selected{
      background: rgba(99,102,241,.20);
      border-color: rgba(99,102,241,.60);
    }

    .langCard h3{
      margin: 0;
      font-size: 16px;
      font-weight: 600;
    }

    #quizScreen {
      display: none;
    }

    .reportCard{ margin-top: 14px; padding: 16px; }
    .reportCard h2{ margin-top: 0; }
    .reportCard h3{ margin-top: 16px; }
    .reportCard ul{ margin: 8px 0 0 18px; }
    .reportCard p{ margin: 10px 0 0; }
    .reportCard button{ margin-top: 16px; }

    .reportCard .btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      padding: 12px 18px;
      border-radius: 14px;
      font-size: 15px;
      background: linear-gradient(135deg, rgba(99,102,241,.65), rgba(56,189,248,.50));
      border-color: rgba(160,190,255,.45);
    }
