
        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background-color: #f4f6f9;
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .header-bar {
            width: 100%;
            max-width: 960px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        .tilbake-knapp {
            text-decoration: none;
            background-color: #e2e8f0;
            color: #1e293b;
            padding: 8px 14px;
            border-radius: 6px;
            font-weight: bold;
            font-size: 14px;
        }
        .tilbake-knapp:hover {
            background-color: #cbd5e1;
        }
        .main-wrapper {
            display: flex;
            gap: 20px;
            max-width: 960px;
            width: 100%;
            align-items: flex-start;
            flex-wrap: wrap;
        }
        .quiz-panel {
            flex: 2;
            min-width: 340px;
            background: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .side-panel {
            flex: 1;
            min-width: 270px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        .card {
            background: white;
            padding: 18px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .top-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e2e8f0;
        }
        .navn-felt input {
            padding: 6px 10px;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            font-size: 14px;
            width: 160px;
        }
        .stats-bar {
            background: #f8fafc;
            padding: 10px 14px;
            border-radius: 8px;
            font-weight: bold;
            font-size: 14px;
            color: #334155;
            display: flex;
            justify-content: space-around;
            margin-bottom: 16px;
            border: 1px solid #e2e8f0;
        }
        .modus-rad {
            margin-bottom: 18px;
        }
        select {
            padding: 8px 12px;
            font-size: 15px;
            border-radius: 6px;
            border: 1px solid #cbd5e1;
            width: 100%;
            margin-top: 5px;
        }
        .oppgave-boks {
            background: #f8fafc;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            padding: 22px 18px;
            text-align: center;
            margin-bottom: 18px;
        }
        #oppgave-nr {
            font-size: 13px;
            color: #64748b;
            font-weight: bold;
            text-transform: uppercase;
            margin-bottom: 8px;
        }
        #oppgave-tekst {
            font-size: 17px;
            color: #334155;
            margin-bottom: 14px;
        }
        #funksjon-visning {
            font-family: 'Cambria Math', 'Times New Roman', serif;
            font-size: 26px;
            color: #0f172a;
            margin: 10px 0;
        }
        .math-var {
            font-style: italic;
        }
        .sup-exp {
            font-size: 0.68em;
            vertical-align: super;
            line-height: 0;
            position: relative;
            top: -0.35em;
        }
        .frac {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            vertical-align: middle;
            margin: 0 3px;
            font-size: 0.85em;
        }
        .frac > span:first-child {
            border-bottom: 1.5px solid currentColor;
            padding: 0 4px 1px 4px;
        }
        .frac > span:last-child {
            padding: 1px 4px 0 4px;
        }
        .sqrt-wrap {
            display: inline-flex;
            align-items: stretch;
        }
        .sqrt-sym {
            font-size: 1.15em;
            line-height: 1;
        }
        .sqrt-rad {
            border-top: 1.5px solid currentColor;
            padding: 0 3px;
        }
        .svar-rad {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }
        .svar-rad input {
            padding: 10px;
            font-size: 17px;
            width: 140px;
            text-align: center;
            border: 2px solid #cbd5e1;
            border-radius: 6px;
        }
        .btn {
            padding: 10px 16px;
            font-size: 15px;
            font-weight: bold;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            color: white;
        }
        .btn-sjekk { background-color: #16a34a; }
        .btn-sjekk:hover { background-color: #15803d; }
        .btn-fasit { background-color: #d97706; }
        .btn-fasit:hover { background-color: #b45309; }
        .btn-animer { background-color: #8b5cf6; }
        .btn-animer:hover { background-color: #7c3aed; }
        .btn-neste { background-color: #64748b; }
        .btn-neste:hover { background-color: #475569; }
        .btn-neste.klar { background-color: #2563eb; }
        .btn-neste.klar:hover { background-color: #1d4ed8; }
        .btn-avslutt {
            background-color: #dc2626;
            width: 100%;
            margin-top: 10px;
            padding: 12px;
        }
        .btn-avslutt:hover { background-color: #b91c1c; }
        #status {
            text-align: center;
            font-weight: bold;
            font-size: 15px;
            min-height: 22px;
            margin-top: 10px;
        }
        #losning-boks {
            display: none;
            background: #fefce8;
            border: 1px solid #fde047;
            border-radius: 8px;
            padding: 14px;
            margin-top: 14px;
            font-size: 15px;
            line-height: 1.6;
            color: #1e293b;
        }
        .hint-tekst {
            font-size: 13px;
            color: #64748b;
            text-align: center;
            margin-top: 10px;
        }
        .regel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .regel-liste {
            font-family: 'Cambria Math', 'Times New Roman', serif;
            font-size: 15px;
            line-height: 2.1;
            color: #1e293b;
        }
        .calc-display {
            width: 100%;
            box-sizing: border-box;
            padding: 10px;
            font-size: 20px;
            text-align: right;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            margin-bottom: 8px;
            background: #f8fafc;
        }
        .calc-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        .calc-btn {
            padding: 10px;
            font-size: 15px;
            font-weight: bold;
            border: 1px solid #cbd5e1;
            background: #f1f5f9;
            border-radius: 6px;
            cursor: pointer;
        }
        .calc-btn:hover { background: #e2e8f0; }
        .calc-use {
            width: 100%;
            margin-top: 8px;
            padding: 8px;
            background: #0284c7;
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: bold;
            cursor: pointer;
        }
        #oppsummering-skjerm {
            display: none;
            max-width: 600px;
            width: 100%;
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            text-align: center;
        }
        .rapport-boks {
            background: #f8fafc;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 18px;
            text-align: left;
            font-family: monospace;
            font-size: 14px;
            white-space: pre-wrap;
            margin: 18px 0;
            line-height: 1.5;
        }
    
        /* Søk hjelp på nett */
        .btn-sok-nett { background: #0284c7 !important; color: #fff !important; border-color: #0284c7 !important; }
        .btn-sok-nett:hover { background: #0369a1 !important; }
    
.s1-uttrykk{font-family:"Cambria Math","Times New Roman",serif;font-size:22px;color:#0f172a;margin:12px 0;line-height:2}
.s1-m{font-family:"Cambria Math","Times New Roman",serif;font-size:1.1em;white-space:nowrap}
.s1-brok{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;margin:0 4px;line-height:1.25}
.s1-brok>span:first-child{border-bottom:2px solid currentColor;padding:0 6px}.s1-brok>span:last-child{padding:0 6px}
.s1-steg{margin:10px 0;padding:10px 14px;border-left:4px solid #0d9488;background:#f0fdfa;border-radius:8px;text-align:left}
.s1-steg b{display:block;color:#0f766e;margin-bottom:2px}.s1-steg .m{font-family:"Cambria Math","Times New Roman",serif;font-size:18px;margin-top:4px}
