/* =============================================================================
   Design tokens
   -----------------------------------------------------------------------------
   Surfaces are near-black with a faint teal cast, and every divider is white at
   very low alpha rather than a solid grey — on a dark ground a hairline of white
   reads as a soft edge, where a fixed slate line reads as a hard box.

   The --op-* names below are aliases kept for markup written against the older
   palette; new work should use the semantic names.
   ========================================================================== */

:root {
    /* Backgrounds */
    --bg-deep:       #010811;
    --bg-main:       #06101C;
    --bg-card:       #081521;
    --bg-elevated:   #0D1F2B;
    --bg-active:     #0F2433;

    --bg:            var(--bg-main);
    --surface:       var(--bg-card);
    --surface-2:     var(--bg-elevated);
    --surface-hover: var(--bg-active);
    --nav-bg:        var(--bg-deep);

    /* Hairline & Borders */
    --border:        #1A2A35;
    --border-light:  #243746;
    --border-mid:    #1A2A35;
    --border-strong: #2A3E4D;

    /* Primary PRAVA Green */
    --green:         #02C076;
    --green-bright:  #05E08B;
    --green-dark:    #0C4943;
    --green-deep:    #052E2A;

    --accent:        var(--green);
    --accent-bright: var(--green-bright);
    --accent-dim:    var(--green-dark);
    --accent-glow:   rgba(2, 192, 118, 0.18);
    --accent-soft:   rgba(2, 192, 118, 0.10);

    /* Blue */
    --blue:          #088BEB;
    --blue-bright:   #25A1FF;
    --blue-dark:     #0A375C;

    /* Orange */
    --orange:        #F5AD05;
    --orange-bright: #FFC02E;
    --orange-dark:   #4A3403;

    /* Purple */
    --purple:        #9B6FE8;
    --purple-bright: #B477FF;
    --purple-dark:   #28174D;

    /* Red */
    --red:           #F54434;
    --red-bright:    #FF6052;
    --red-dark:      #4A120E;

    /* Text */
    --text-primary:   #E6EDF0;
    --text-secondary: #97ABB6;
    --text-muted:     #67727A;
    --text-disabled:  #495259;

    --text:  var(--text-primary);
    --muted: var(--text-secondary);
    --faint: var(--text-muted);

    /* Status */
    --ok:     var(--green);
    --danger: var(--red);
    --warn:   var(--orange);
    --info:   var(--blue);

    /* Effects */
    --green-glow: rgba(2, 192, 118, 0.18);
    --blue-glow:  rgba(8, 139, 235, 0.12);

    /* Ticket Status System Tokens */
    --status-completed:      #02C076;
    --status-completed-bg:   #0C4943;
    --status-progress:       #F5AD05;
    --status-progress-bg:    #4A3403;
    --status-not-started:    #67727A;
    --status-not-started-bg: #0D1F2B;

    /* Shape */
    --radius-card: 18px;
    --radius-lg:   20px;
    --radius-sm:   12px;
    --radius-pill: 999px;

    /* Elevation */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.50);

    --nav-h:    56px;
    --bottom-h: 62px;

    --font-display: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
    --font-body:    "Work Sans", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

    /* --- aliases for existing markup --- */
    --op-bg:        var(--bg);
    --op-surface:   var(--surface);
    --op-surface-2: var(--surface-2);
    --op-appbar:    var(--nav-bg);
    --op-primary:   var(--accent);
    --op-secondary: var(--info);
    --op-warning:   var(--warn);
    --op-error:     var(--danger);
    --op-text:      var(--text);
    --op-muted:     var(--muted);
    --op-line:      var(--border);
}

html.light-theme {
    /* Backgrounds */
    --bg-deep:       #ECF1F8;
    --bg-main:       #F5F8FC;
    --bg-card:       #FFFFFF;
    --bg-elevated:   #FFFFFF;
    --bg-active:     #F4F7FB;

    /* Hairline & Borders */
    --border:        #D5DEE8;
    --border-light:  #C3CFDC;
    --border-mid:    #D5DEE8;
    --border-strong: #B6C3D2;

    /* Primary PRAVA Orange */
    --green:         #EA580C;
    --green-bright:  #F97316;
    --green-dark:    #FFE4CC;
    --green-deep:    #FFF5EB;

    /* Accent overrides */
    --accent-glow:   rgba(234, 88, 12, 0.22);
    --accent-soft:   rgba(234, 88, 12, 0.10);

    /* Text */
    --text-primary:   #0F1A2A;
    --text-secondary: #4F6075;
    --text-muted:     #7488A0;
    --text-disabled:  #9CA3AF;

    /* Status backgrounds for light mode */
    --status-not-started-bg: #F4F7FB;
    --status-completed-bg: #FFE4CC;
    --status-progress-bg: #FEF3C7;
    
    --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* =============================================================================
   Colour tokens (generated). Every colour that used to be written inline is a variable:
   :root holds the original value, so the dark theme computes exactly as before; the
   html.light-theme block below gives each one its light-mode value. Prefix = role:
   --cbg background, --cfg text/icon, --cln border, --csh shadow.
   ============================================================================= */
:root {
    --cbg-000000: #000;
    --cbg-000000-a04: rgba(0,0,0,0.04);
    --cbg-000000-a08: rgba(0, 0, 0, 0.08);
    --cbg-000000-a18: rgba(0, 0, 0, 0.18);
    --cbg-000000-a34: rgba(0, 0, 0, .34);
    --cbg-000000-a45: rgba(0, 0, 0, .45);
    --cbg-000000-a55: rgba(0, 0, 0, 0.55);
    --cbg-000000-a65: rgba(0, 0, 0, 0.65);
    --cbg-000000-a78: rgba(0, 0, 0, .78);
    --cbg-00d9a2: #00D9A2;
    --cbg-00d9a2-a06: rgba(0, 217, 162, 0.06);
    --cbg-00d9a2-a1: rgba(0, 217, 162, 0.1);
    --cbg-00d9a2-a12: rgba(0, 217, 162, 0.12);
    --cbg-00f296: #00F296;
    --cbg-010811-a55: rgba(1, 8, 17, 0.55);
    --cbg-010912: #010912;
    --cbg-02060c-a88: rgba(2, 6, 12, .88);
    --cbg-020617-a94: rgba(2, 6, 23, 0.94);
    --cbg-02c076: #02C076;
    --cbg-02c076-a06: rgba(2, 192, 118, 0.06);
    --cbg-02c076-a08: rgba(2, 192, 118, 0.08);
    --cbg-02c076-a1: rgba(2, 192, 118, 0.10);
    --cbg-02c076-a12: rgba(2, 192, 118, 0.12);
    --cbg-02c076-a14: rgba(2, 192, 118, 0.14);
    --cbg-02c076-a15: rgba(2, 192, 118, 0.15);
    --cbg-02c076-a18: rgba(2, 192, 118, 0.18);
    --cbg-02c076-a22: rgba(2, 192, 118, 0.22);
    --cbg-02c076-a25: rgba(2, 192, 118, 0.25);
    --cbg-02c076-a52: rgba(2, 192, 118, 0.52);
    --cbg-02c076-a55: rgba(2, 192, 118, 0.55);
    --cbg-02c076-a82: rgba(2, 192, 118, 0.82);
    --cbg-02c076-a85: rgba(2, 192, 118, 0.85);
    --cbg-05080f: #05080f;
    --cbg-05080f-a0: rgba(5, 8, 15, 0);
    --cbg-05080f-a55: rgba(5, 8, 15, .55);
    --cbg-05080f-a92: rgba(5, 8, 15, .92);
    --cbg-05080f-a93: rgba(5, 8, 15, .93);
    --cbg-05080f-a97: rgba(5, 8, 15, .97);
    --cbg-05e08b: #05E08B;
    --cbg-060708: #060708;
    --cbg-06101c-a7: rgba(6, 16, 28, 0.7);
    --cbg-06101c-a95: rgba(6, 16, 28, 0.95);
    --cbg-06131a: #06131A;
    --cbg-061a18-a85: rgba(6, 26, 24, 0.85);
    --cbg-063d2f: #063D2F;
    --cbg-07151d: #07151D;
    --cbg-080d18-a86: rgba(8, 13, 24, .86);
    --cbg-080d18-a94: rgba(8, 13, 24, .94);
    --cbg-08111a: #08111A;
    --cbg-08131b: #08131B;
    --cbg-081521: #081521;
    --cbg-081521-a65: rgba(8, 21, 33, 0.65);
    --cbg-081521-a7: rgba(8, 21, 33, 0.7);
    --cbg-081521-a72: rgba(8, 21, 33, .72);
    --cbg-081521-a74: rgba(8, 21, 33, .74);
    --cbg-081521-a8: rgba(8, 21, 33, 0.8);
    --cbg-081521-a85: rgba(8, 21, 33, 0.85);
    --cbg-088beb: #088BEB;
    --cbg-088beb-a15: rgba(8, 139, 235, 0.15);
    --cbg-09131c: #09131C;
    --cbg-091724: #091724;
    --cbg-0a141e: #0A141E;
    --cbg-0a1923: #0A1923;
    --cbg-0a1a22: #0A1A22;
    --cbg-0a375c: #0A375C;
    --cbg-0b3152: #0B3152;
    --cbg-0c4943: #0C4943;
    --cbg-0d1f2b: #0D1F2B;
    --cbg-0d1f2b-a8: rgba(13, 31, 43, 0.8);
    --cbg-0d1f2b-a85: rgba(13, 31, 43, 0.85);
    --cbg-0e7c5a: #0E7C5A;
    --cbg-0f172a: #0F172A;
    --cbg-0f172a-a78: rgba(15, 23, 42, .78);
    --cbg-0f172a-a8: rgba(15, 23, 42, .8);
    --cbg-0f172a-a85: rgba(15, 23, 42, 0.85);
    --cbg-0f172a-a9: rgba(15, 23, 42, .9);
    --cbg-0f1924: #0F1924;
    --cbg-0f2e25: #0F2E25;
    --cbg-10222d: #10222D;
    --cbg-102a32: #102A32;
    --cbg-10b981: #10B981;
    --cbg-10b981-a08: rgba(16, 185, 129, 0.08);
    --cbg-10b981-a1: rgba(16, 185, 129, 0.1);
    --cbg-10b981-a12: rgba(16, 185, 129, .12);
    --cbg-10b981-a14: rgba(16, 185, 129, 0.14);
    --cbg-10b981-a16: rgba(16, 185, 129, 0.16);
    --cbg-10b981-a2: rgba(16, 185, 129, 0.2);
    --cbg-10b981-a3: rgba(16, 185, 129, .30);
    --cbg-11222e: #11222E;
    --cbg-131d2e: #131D2E;
    --cbg-14212e: #14212E;
    --cbg-16202a: #16202A;
    --cbg-18212a: #18212A;
    --cbg-19d69c: #19D69C;
    --cbg-19d69c-a15: rgba(25, 214, 156, 0.15);
    --cbg-1a1a2e: #1A1A2E;
    --cbg-1a2a35: #1A2A35;
    --cbg-1a2a35-a8: rgba(26, 42, 53, 0.8);
    --cbg-1e293b: #1E293B;
    --cbg-1e293b-a72: rgba(30, 41, 59, .72);
    --cbg-211522: #211522;
    --cbg-22d3ee: #22D3EE;
    --cbg-25e4a8: #25E4A8;
    --cbg-28174d: #28174D;
    --cbg-2a1521: #2A1521;
    --cbg-34d399: #34D399;
    --cbg-38bdf8: #38BDF8;
    --cbg-3b82f6: #3B82F6;
    --cbg-3b82f6-a07: rgba(59, 130, 246, .07);
    --cbg-3b82f6-a1: rgba(59, 130, 246, .10);
    --cbg-3b82f6-a14: rgba(59, 130, 246, 0.14);
    --cbg-475569: #475569;
    --cbg-4a120e: #4A120E;
    --cbg-4a1f22: #4A1F22;
    --cbg-4a2e0a: #4A2E0A;
    --cbg-4a3403: #4A3403;
    --cbg-555555: #555;
    --cbg-60a5fa: #60A5FA;
    --cbg-60a5fa-a08: rgba(96, 165, 250, 0.08);
    --cbg-60a5fa-a12: rgba(96, 165, 250, 0.12);
    --cbg-60a5fa-a16: rgba(96, 165, 250, 0.16);
    --cbg-64748b: #64748B;
    --cbg-67727a: #67727A;
    --cbg-7c2d12-a22: rgba(124, 45, 18, .22);
    --cbg-818cf8: #818CF8;
    --cbg-888888: #888;
    --cbg-94a3b8-a09: rgba(148, 163, 184, .09);
    --cbg-94a3b8-a1: rgba(148, 163, 184, 0.1);
    --cbg-94a3b8-a12: rgba(148, 163, 184, 0.12);
    --cbg-94a3b8-a16: rgba(148, 163, 184, 0.16);
    --cbg-94a3b8-a2: rgba(148, 163, 184, 0.2);
    --cbg-94a3b8-a26: rgba(148, 163, 184, .26);
    --cbg-97abb6: #97ABB6;
    --cbg-991b1b: #991B1B;
    --cbg-9b6cff: #9B6CFF;
    --cbg-9b6cff-a12: rgba(155, 108, 255, 0.12);
    --cbg-9b6fe8: #9B6FE8;
    --cbg-9b6fe8-a2: rgba(155, 111, 232, .20);
    --cbg-a78bfa: #A78BFA;
    --cbg-b91c1c: #B91C1C;
    --cbg-b91c1c-a15: rgba(185, 28, 28, 0.15);
    --cbg-c084fc: #C084FC;
    --cbg-c8c8c8-a6: rgba(200, 200, 200, 0.6);
    --cbg-d94343: #D94343;
    --cbg-e6edf0: #E6EDF0;
    --cbg-ef4444: #EF4444;
    --cbg-ef4444-a14: rgba(239, 68, 68, 0.14);
    --cbg-ef4444-a16: rgba(239, 68, 68, 0.16);
    --cbg-ef4444-a2: rgba(239, 68, 68, 0.2);
    --cbg-f07a1a: #F07A1A;
    --cbg-f07a1a-a08: rgba(240, 122, 26, 0.08);
    --cbg-f07a1a-a14: rgba(240, 122, 26, 0.14);
    --cbg-f07a1a-a18: rgba(240, 122, 26, 0.18);
    --cbg-f07a1a-a2: rgba(240, 122, 26, 0.20);
    --cbg-f472b6: #F472B6;
    --cbg-f54434: #F54434;
    --cbg-f54434-a1: rgba(245, 68, 52, 0.1);
    --cbg-f54434-a16: rgba(245, 68, 52, .16);
    --cbg-f54434-a2: rgba(245, 68, 52, 0.2);
    --cbg-f59e0b: #F59E0B;
    --cbg-f59e0b-a07: rgba(245, 158, 11, .07);
    --cbg-f59e0b-a09: rgba(245, 158, 11, 0.09);
    --cbg-f59e0b-a12: rgba(245, 158, 11, 0.12);
    --cbg-f59e0b-a14: rgba(245, 158, 11, 0.14);
    --cbg-f59e0b-a16: rgba(245, 158, 11, 0.16);
    --cbg-f5ad05: #F5AD05;
    --cbg-f5ad05-a1: rgba(245, 173, 5, 0.1);
    --cbg-f5ad05-a15: rgba(245, 173, 5, 0.15);
    --cbg-f5ad05-a16: rgba(245, 173, 5, 0.16);
    --cbg-f87171: #F87171;
    --cbg-f8fafc: #F8FAFC;
    --cbg-f97316: #F97316;
    --cbg-facc15: #FACC15;
    --cbg-ff1f5a: #FF1F5A;
    --cbg-ff1f5a-a07: rgba(255, 31, 90, 0.07);
    --cbg-ff1f5a-a1: rgba(255, 31, 90, 0.1);
    --cbg-ff8c2e: #FF8C2E;
    --cbg-ffc02e: #FFC02E;
    --cbg-ffffff: #ffffff;
    --cbg-ffffff-a0: rgba(255, 255, 255, 0);
    --cbg-ffffff-a02: rgba(255, 255, 255, 0.02);
    --cbg-ffffff-a03: rgba(255, 255, 255, 0.03);
    --cbg-ffffff-a04: rgba(255, 255, 255, 0.04);
    --cbg-ffffff-a05: rgba(255, 255, 255, 0.05);
    --cbg-ffffff-a06: rgba(255, 255, 255, 0.06);
    --cbg-ffffff-a07: rgba(255, 255, 255, 0.07);
    --cbg-ffffff-a08: rgba(255, 255, 255, 0.08);
    --cbg-ffffff-a1: rgba(255, 255, 255, 0.1);
    --cbg-ffffff-a12: rgba(255,255,255,0.12);
    --cbg-ffffff-a14: rgba(255, 255, 255, 0.14);
    --cbg-ffffff-a15: rgba(255,255,255,0.15);
    --cbg-ffffff-a16: rgba(255, 255, 255, 0.16);
    --cbg-ffffff-a18: rgba(255, 255, 255, 0.18);
    --cbg-ffffff-a22: rgba(255, 255, 255, 0.22);
    --cbg-ffffff-a3: rgba(255, 255, 255, 0.3);
    --cbg-ffffff-a35: rgba(255, 255, 255, 0.35);
    --cbg-ffffff-a55: rgba(255, 255, 255, 0.55);
    --cbg-ffffff-a7: rgba(255, 255, 255, 0.7);
    --cbg-ffffff-a75: rgba(255, 255, 255, 0.75);
    --cbg-ffffff-a82: rgba(255, 255, 255, 0.82);
    --cbg-ffffff-a85: rgba(255, 255, 255, 0.85);
    --cfg-000000: #000;
    --cfg-00c9a7: #00C9A7;
    --cfg-00d9a2: #00D9A2;
    --cfg-010811: #010811;
    --cfg-02c076: #02C076;
    --cfg-03100d: #03100D;
    --cfg-04120c: #04120C;
    --cfg-04121a: #04121A;
    --cfg-04130c: #04130C;
    --cfg-04231a: #04231A;
    --cfg-06131a-a85: rgba(6, 19, 26, 0.85);
    --cfg-071f26: #071F26;
    --cfg-087f78: #087F78;
    --cfg-088beb: #088BEB;
    --cfg-0a0f14: #0A0F14;
    --cfg-0a252b: #0A252B;
    --cfg-0d2232: #0D2232;
    --cfg-0d3035: #0D3035;
    --cfg-10b981: #10B981;
    --cfg-19d69c: #19D69C;
    --cfg-1a0e00: #1A0E00;
    --cfg-1a1200: #1A1200;
    --cfg-1a2a35: #1A2A35;
    --cfg-2a0606: #2A0606;
    --cfg-2a1500: #2A1500;
    --cfg-333333: #333;
    --cfg-3e87d0: #3E87D0;
    --cfg-4285f4: #4285F4;
    --cfg-475569: #475569;
    --cfg-5e8c8a: #5E8C8A;
    --cfg-64748b: #64748B;
    --cfg-67727a: #67727A;
    --cfg-6ee7b7: #6EE7B7;
    --cfg-737a84: #737A84;
    --cfg-7ba8a2: #7BA8A2;
    --cfg-8a9ba8: #8A9BA8;
    --cfg-8fa8b8: #8FA8B8;
    --cfg-93c5fd: #93C5FD;
    --cfg-94a3b8: #94A3B8;
    --cfg-97abb6: #97ABB6;
    --cfg-9aa4b2: #9AA4B2;
    --cfg-9b6cff: #9B6CFF;
    --cfg-9b6fe8: #9B6FE8;
    --cfg-9fd8ce: #9FD8CE;
    --cfg-a3f3d3: #A3F3D3;
    --cfg-a9b4be: #A9B4BE;
    --cfg-b0b4bc: #B0B4BC;
    --cfg-cbd5e1: #CBD5E1;
    --cfg-d1dce2: #D1DCE2;
    --cfg-e2e8f0: #E2E8F0;
    --cfg-e6edf0: #E6EDF0;
    --cfg-ef4444: #EF4444;
    --cfg-f1f5f9: #F1F5F9;
    --cfg-f54434: #F54434;
    --cfg-f59b00: #F59B00;
    --cfg-f59e0b: #F59E0B;
    --cfg-f5ad05: #F5AD05;
    --cfg-f7f7f7: #F7F7F7;
    --cfg-f87171: #F87171;
    --cfg-fbbf24: #FBBF24;
    --cfg-fca5a5: #FCA5A5;
    --cfg-ff1f5a: #FF1F5A;
    --cfg-ff4b4b: #FF4B4B;
    --cfg-ff654d: #FF654D;
    --cfg-ffffff: #FFFFFF;
    --cln-000000-a06: rgba(0,0,0,0.06);
    --cln-000000-a08: rgba(0,0,0,0.08);
    --cln-00d9a2: #00D9A2;
    --cln-00d9a2-a35: rgba(0, 217, 162, 0.35);
    --cln-02c076: #02C076;
    --cln-02c076-a25: rgba(2, 192, 118, 0.25);
    --cln-02c076-a3: rgba(2, 192, 118, 0.3);
    --cln-02c076-a35: rgba(2, 192, 118, 0.35);
    --cln-02c076-a5: rgba(2, 192, 118, 0.5);
    --cln-02c076-a7: rgba(2, 192, 118, 0.7);
    --cln-087a5b: #087A5B;
    --cln-088beb: #088BEB;
    --cln-088beb-a4: rgba(8, 139, 235, 0.4);
    --cln-10b981: #10B981;
    --cln-10b981-a3: rgba(16, 185, 129, .3);
    --cln-10b981-a4: rgba(16, 185, 129, 0.4);
    --cln-10b981-a55: rgba(16, 185, 129, .55);
    --cln-10b981-a6: rgba(16, 185, 129, 0.6);
    --cln-192532: #192532;
    --cln-19d69c: #19D69C;
    --cln-19d69c-a3: rgba(25, 214, 156, 0.3);
    --cln-19d69c-a35: rgba(25, 214, 156, 0.35);
    --cln-1a2a35: #1A2A35;
    --cln-1c3447: #1C3447;
    --cln-1d2a35: #1D2A35;
    --cln-1e293b: #1E293B;
    --cln-1e2a3d: #1E2A3D;
    --cln-1e5180: #1E5180;
    --cln-243044: #243044;
    --cln-263442: #263442;
    --cln-263b50: #263B50;
    --cln-2c3b52: #2C3B52;
    --cln-334155: #334155;
    --cln-35506b: #35506B;
    --cln-3b82f6: #3B82F6;
    --cln-3b82f6-a4: rgba(59, 130, 246, 0.4);
    --cln-60a5fa-a28: rgba(96, 165, 250, 0.28);
    --cln-64748b: #64748B;
    --cln-7c2d12: #7C2D12;
    --cln-94a3b8-a22: rgba(148, 163, 184, .22);
    --cln-94a3b8-a3: rgba(148, 163, 184, 0.3);
    --cln-94a3b8-a35: rgba(148, 163, 184, 0.35);
    --cln-9a6200: #9A6200;
    --cln-9b6cff: #9B6CFF;
    --cln-9b6fe8: #9B6FE8;
    --cln-b477ff-a35: rgba(180, 119, 255, .35);
    --cln-b91c1c: #B91C1C;
    --cln-d94343: #D94343;
    --cln-ef4444: #EF4444;
    --cln-ef4444-a42: rgba(239, 68, 68, 0.42);
    --cln-f54434: #F54434;
    --cln-f54434-a25: rgba(245, 68, 52, 0.25);
    --cln-f59b00-a3: rgba(245, 155, 0, 0.3);
    --cln-f59e0b-a3: rgba(245, 158, 11, 0.3);
    --cln-f59e0b-a35: rgba(245, 158, 11, .35);
    --cln-f5ad05: #F5AD05;
    --cln-f5ad05-a3: rgba(245, 173, 5, 0.3);
    --cln-ff1f5a: #FF1F5A;
    --cln-ff1f5a-a45: rgba(255, 31, 90, 0.45);
    --cln-ff3d6d: #FF3D6D;
    --cln-ffffff-a03: rgba(255, 255, 255, 0.03);
    --cln-ffffff-a05: rgba(255, 255, 255, 0.05);
    --cln-ffffff-a06: rgba(255,255,255,0.06);
    --cln-ffffff-a07: rgba(255, 255, 255, 0.07);
    --cln-ffffff-a08: rgba(255, 255, 255, 0.08);
    --cln-ffffff-a09: rgba(255, 255, 255, 0.09);
    --cln-ffffff-a1: rgba(255, 255, 255, 0.1);
    --cln-ffffff-a14: rgba(255, 255, 255, 0.14);
    --cln-ffffff-a15: rgba(255, 255, 255, 0.15);
    --cln-ffffff-a16: rgba(255, 255, 255, 0.16);
    --cln-ffffff-a18: rgba(255, 255, 255, 0.18);
    --cln-ffffff-a35: rgba(255, 255, 255, 0.35);
    --csh-000000-a15: rgba(0,0,0,0.15);
    --csh-000000-a2: rgba(0, 0, 0, 0.2);
    --csh-000000-a3: rgba(0, 0, 0, 0.3);
    --csh-000000-a35: rgba(0, 0, 0, 0.35);
    --csh-000000-a4: rgba(0,0,0,0.4);
    --csh-000000-a45: rgba(0, 0, 0, .45);
    --csh-000000-a5: rgba(0, 0, 0, 0.5);
    --csh-000000-a6: rgba(0, 0, 0, 0.6);
    --csh-02c076-a15: rgba(2, 192, 118, 0.15);
    --csh-02c076-a2: rgba(2, 192, 118, 0.2);
    --csh-02c076-a25: rgba(2, 192, 118, 0.25);
    --csh-02c076-a28: rgba(2, 192, 118, .28);
    --csh-02c076-a4: rgba(2, 192, 118, 0.4);
    --csh-02c076-a6: rgba(2, 192, 118, 0.6);
    --csh-02c076-a8: rgba(2, 192, 118, 0.8);
    --csh-088beb-a15: rgba(8, 139, 235, 0.15);
    --csh-10b981: #10B981;
    --csh-10b981-a0: rgba(16, 185, 129, 0);
    --csh-10b981-a35: rgba(16, 185, 129, .35);
    --csh-10b981-a42: rgba(16, 185, 129, 0.42);
    --csh-19d69c-a15: rgba(25, 214, 156, 0.15);
    --csh-19d69c-a25: rgba(25, 214, 156, .25);
    --csh-475569-a22: rgba(71, 85, 105, .22);
    --csh-94a3b8-a06: rgba(148, 163, 184, 0.06);
    --csh-9b6fe8-a15: rgba(155, 111, 232, 0.15);
    --csh-b91c1c-a3: rgba(185, 28, 28, 0.3);
    --csh-b91c1c-a35: rgba(185, 28, 28, 0.35);
    --csh-ef4444-a6: rgba(239, 68, 68, 0.6);
    --csh-f07a1a-a2: rgba(240, 122, 26, 0.2);
    --csh-f59b00-a22: rgba(245, 155, 0, 0.22);
    --csh-f59e0b-a3: rgba(245, 158, 11, 0.3);
    --csh-f59e0b-a4: rgba(245, 158, 11, 0.4);
    --csh-f5ad05-a15: rgba(245, 173, 5, 0.15);
    --csh-f5ad05-a25: rgba(245, 173, 5, .25);
    --csh-f5ad05-a35: rgba(245, 173, 5, 0.35);
    --csh-f5ad05-a6: rgba(245, 173, 5, 0.6);
    --csh-ff1f5a-a08: rgba(255, 31, 90, 0.08);
    --csh-ff1f5a-a1: rgba(255, 31, 90, 0.1);
    --csh-ff1f5a-a12: rgba(255, 31, 90, 0.12);
    --csh-ff1f5a-a22: rgba(255, 31, 90, 0.22);
    --csh-ff1f5a-a25: rgba(255, 31, 90, 0.25);
    --csh-ff1f5a-a3: rgba(255, 31, 90, 0.3);
    --csh-ff1f5a-a5: rgba(255, 31, 90, 0.5);
    --csh-ff1f5a-a65: rgba(255, 31, 90, 0.65);
}

html.light-theme {
    --cbg-000000: rgb(255, 255, 255);
    --cbg-000000-a04: rgba(255, 255, 255, 0.04);
    --cbg-000000-a08: rgba(255, 255, 255, 0.08);
    --cbg-000000-a18: rgba(255, 255, 255, 0.18);
    --cbg-000000-a34: rgba(255, 255, 255, 0.34);
    --cbg-000000-a45: rgba(255, 255, 255, 0.45);
    --cbg-000000-a55: rgba(255, 255, 255, 0.55);
    --cbg-000000-a65: rgba(255, 255, 255, 0.65);
    --cbg-000000-a78: rgba(255, 255, 255, 0.78);
    --cbg-00d9a2: rgb(233, 89, 12);
    --cbg-00d9a2-a06: rgba(233, 89, 12, 0.06);
    --cbg-00d9a2-a1: rgba(233, 89, 12, 0.1);
    --cbg-00d9a2-a12: rgba(233, 89, 12, 0.12);
    --cbg-00f296: rgb(233, 89, 12);
    --cbg-010811-a55: rgba(255, 255, 255, 0.55);
    --cbg-010912: rgb(255, 255, 255);
    --cbg-02060c-a88: rgba(255, 255, 255, 0.88);
    --cbg-020617-a94: rgba(255, 255, 255, 0.94);
    --cbg-02c076: rgb(233, 89, 12);
    --cbg-02c076-a06: rgba(233, 89, 12, 0.06);
    --cbg-02c076-a08: rgba(233, 89, 12, 0.08);
    --cbg-02c076-a1: rgba(233, 89, 12, 0.1);
    --cbg-02c076-a12: rgba(233, 89, 12, 0.12);
    --cbg-02c076-a14: rgba(233, 89, 12, 0.14);
    --cbg-02c076-a15: rgba(233, 89, 12, 0.15);
    --cbg-02c076-a18: rgba(233, 89, 12, 0.18);
    --cbg-02c076-a22: rgba(233, 89, 12, 0.22);
    --cbg-02c076-a25: rgba(233, 89, 12, 0.25);
    --cbg-02c076-a52: rgba(233, 89, 12, 0.52);
    --cbg-02c076-a55: rgba(233, 89, 12, 0.55);
    --cbg-02c076-a82: rgba(233, 89, 12, 0.82);
    --cbg-02c076-a85: rgba(233, 89, 12, 0.85);
    --cbg-05080f: rgb(255, 255, 255);
    --cbg-05080f-a0: rgba(255, 255, 255, 0.0);
    --cbg-05080f-a55: rgba(255, 255, 255, 0.55);
    --cbg-05080f-a92: rgba(255, 255, 255, 0.92);
    --cbg-05080f-a93: rgba(255, 255, 255, 0.93);
    --cbg-05080f-a97: rgba(255, 255, 255, 0.97);
    --cbg-05e08b: rgb(233, 89, 12);
    --cbg-060708: rgb(255, 255, 255);
    --cbg-06101c-a7: rgba(255, 255, 255, 0.7);
    --cbg-06101c-a95: rgba(255, 255, 255, 0.95);
    --cbg-06131a: rgb(255, 255, 255);
    --cbg-061a18-a85: rgba(253, 236, 226, 0.85);
    --cbg-063d2f: rgb(253, 236, 226);
    --cbg-07151d: rgb(255, 255, 255);
    --cbg-080d18-a86: rgba(255, 255, 255, 0.86);
    --cbg-080d18-a94: rgba(255, 255, 255, 0.94);
    --cbg-08111a: rgb(255, 255, 255);
    --cbg-08131b: rgb(255, 255, 255);
    --cbg-081521: rgb(255, 255, 255);
    --cbg-081521-a65: rgba(255, 255, 255, 0.65);
    --cbg-081521-a7: rgba(255, 255, 255, 0.7);
    --cbg-081521-a72: rgba(255, 255, 255, 0.72);
    --cbg-081521-a74: rgba(255, 255, 255, 0.74);
    --cbg-081521-a8: rgba(255, 255, 255, 0.8);
    --cbg-081521-a85: rgba(255, 255, 255, 0.85);
    --cbg-088beb: rgb(8, 139, 235);
    --cbg-088beb-a15: rgba(8, 139, 235, 0.15);
    --cbg-09131c: rgb(255, 255, 255);
    --cbg-091724: rgb(255, 255, 255);
    --cbg-0a141e: rgb(255, 255, 255);
    --cbg-0a1923: rgb(255, 255, 255);
    --cbg-0a1a22: rgb(255, 255, 255);
    --cbg-0a375c: rgb(242, 245, 248);
    --cbg-0b3152: rgb(255, 255, 255);
    --cbg-0c4943: rgb(253, 236, 226);
    --cbg-0d1f2b: rgb(255, 255, 255);
    --cbg-0d1f2b-a8: rgba(255, 255, 255, 0.8);
    --cbg-0d1f2b-a85: rgba(255, 255, 255, 0.85);
    --cbg-0e7c5a: rgb(233, 89, 12);
    --cbg-0f172a: rgb(255, 255, 255);
    --cbg-0f172a-a78: rgba(255, 255, 255, 0.78);
    --cbg-0f172a-a8: rgba(255, 255, 255, 0.8);
    --cbg-0f172a-a85: rgba(255, 255, 255, 0.85);
    --cbg-0f172a-a9: rgba(255, 255, 255, 0.9);
    --cbg-0f1924: rgb(255, 255, 255);
    --cbg-0f2e25: rgb(253, 236, 226);
    --cbg-10222d: rgb(255, 255, 255);
    --cbg-102a32: rgb(255, 255, 255);
    --cbg-10b981: rgb(233, 89, 12);
    --cbg-10b981-a08: rgba(233, 89, 12, 0.08);
    --cbg-10b981-a1: rgba(233, 89, 12, 0.1);
    --cbg-10b981-a12: rgba(233, 89, 12, 0.12);
    --cbg-10b981-a14: rgba(233, 89, 12, 0.14);
    --cbg-10b981-a16: rgba(233, 89, 12, 0.16);
    --cbg-10b981-a2: rgba(233, 89, 12, 0.2);
    --cbg-10b981-a3: rgba(233, 89, 12, 0.3);
    --cbg-11222e: rgb(255, 255, 255);
    --cbg-131d2e: rgb(255, 255, 255);
    --cbg-14212e: rgb(255, 255, 255);
    --cbg-16202a: rgb(255, 255, 255);
    --cbg-18212a: rgb(255, 255, 255);
    --cbg-19d69c: rgb(233, 89, 12);
    --cbg-19d69c-a15: rgba(233, 89, 12, 0.15);
    --cbg-1a1a2e: rgb(255, 255, 255);
    --cbg-1a2a35: rgb(255, 255, 255);
    --cbg-1a2a35-a8: rgba(255, 255, 255, 0.8);
    --cbg-1e293b: rgb(255, 255, 255);
    --cbg-1e293b-a72: rgba(255, 255, 255, 0.72);
    --cbg-211522: rgb(243, 236, 243);
    --cbg-22d3ee: rgb(34, 211, 238);
    --cbg-25e4a8: rgb(233, 89, 12);
    --cbg-28174d: rgb(237, 231, 248);
    --cbg-2a1521: rgb(245, 235, 240);
    --cbg-34d399: rgb(233, 89, 12);
    --cbg-38bdf8: rgb(56, 189, 248);
    --cbg-3b82f6: rgb(59, 130, 246);
    --cbg-3b82f6-a07: rgba(59, 130, 246, 0.07);
    --cbg-3b82f6-a1: rgba(59, 130, 246, 0.1);
    --cbg-3b82f6-a14: rgba(59, 130, 246, 0.14);
    --cbg-475569: rgb(216, 221, 229);
    --cbg-4a120e: rgb(250, 231, 229);
    --cbg-4a1f22: rgb(246, 233, 234);
    --cbg-4a2e0a: rgb(250, 241, 229);
    --cbg-4a3403: rgb(250, 244, 229);
    --cbg-555555: rgb(224, 224, 224);
    --cbg-60a5fa: rgb(70, 104, 145);
    --cbg-60a5fa-a08: rgba(70, 104, 145, 0.08);
    --cbg-60a5fa-a12: rgba(70, 104, 145, 0.12);
    --cbg-60a5fa-a16: rgba(70, 104, 145, 0.16);
    --cbg-64748b: rgb(90, 104, 125);
    --cbg-67727a: rgb(98, 109, 116);
    --cbg-7c2d12-a22: rgba(124, 45, 18, 0.22);
    --cbg-818cf8: rgb(60, 66, 124);
    --cbg-888888: rgb(107, 107, 107);
    --cbg-94a3b8-a09: rgba(91, 111, 138, 0.09);
    --cbg-94a3b8-a1: rgba(91, 111, 138, 0.1);
    --cbg-94a3b8-a12: rgba(91, 111, 138, 0.12);
    --cbg-94a3b8-a16: rgba(91, 111, 138, 0.16);
    --cbg-94a3b8-a2: rgba(91, 111, 138, 0.2);
    --cbg-94a3b8-a26: rgba(91, 111, 138, 0.26);
    --cbg-97abb6: rgb(94, 120, 134);
    --cbg-991b1b: rgb(153, 27, 27);
    --cbg-9b6cff: rgb(155, 108, 255);
    --cbg-9b6cff-a12: rgba(155, 108, 255, 0.12);
    --cbg-9b6fe8: rgb(155, 111, 232);
    --cbg-9b6fe8-a2: rgba(155, 111, 232, 0.2);
    --cbg-a78bfa: rgb(167, 139, 250);
    --cbg-b91c1c: rgb(185, 28, 28);
    --cbg-b91c1c-a15: rgba(185, 28, 28, 0.15);
    --cbg-c084fc: rgb(192, 132, 252);
    --cbg-c8c8c8-a6: rgba(81, 81, 81, 0.6);
    --cbg-d94343: rgb(217, 67, 67);
    --cbg-e6edf0: rgb(34, 50, 57);
    --cbg-ef4444: rgb(239, 68, 68);
    --cbg-ef4444-a14: rgba(239, 68, 68, 0.14);
    --cbg-ef4444-a16: rgba(239, 68, 68, 0.16);
    --cbg-ef4444-a2: rgba(239, 68, 68, 0.2);
    --cbg-f07a1a: rgb(240, 122, 26);
    --cbg-f07a1a-a08: rgba(240, 122, 26, 0.08);
    --cbg-f07a1a-a14: rgba(240, 122, 26, 0.14);
    --cbg-f07a1a-a18: rgba(240, 122, 26, 0.18);
    --cbg-f07a1a-a2: rgba(240, 122, 26, 0.2);
    --cbg-f472b6: rgb(244, 114, 182);
    --cbg-f54434: rgb(245, 68, 52);
    --cbg-f54434-a1: rgba(245, 68, 52, 0.1);
    --cbg-f54434-a16: rgba(245, 68, 52, 0.16);
    --cbg-f54434-a2: rgba(245, 68, 52, 0.2);
    --cbg-f59e0b: rgb(245, 158, 11);
    --cbg-f59e0b-a07: rgba(245, 158, 11, 0.07);
    --cbg-f59e0b-a09: rgba(245, 158, 11, 0.09);
    --cbg-f59e0b-a12: rgba(245, 158, 11, 0.12);
    --cbg-f59e0b-a14: rgba(245, 158, 11, 0.14);
    --cbg-f59e0b-a16: rgba(245, 158, 11, 0.16);
    --cbg-f5ad05: rgb(245, 173, 5);
    --cbg-f5ad05-a1: rgba(245, 173, 5, 0.1);
    --cbg-f5ad05-a15: rgba(245, 173, 5, 0.15);
    --cbg-f5ad05-a16: rgba(245, 173, 5, 0.16);
    --cbg-f87171: rgb(248, 113, 113);
    --cbg-f8fafc: rgb(248, 250, 252);
    --cbg-f97316: rgb(249, 115, 22);
    --cbg-facc15: rgb(250, 204, 21);
    --cbg-ff1f5a: rgb(255, 31, 90);
    --cbg-ff1f5a-a07: rgba(255, 31, 90, 0.07);
    --cbg-ff1f5a-a1: rgba(255, 31, 90, 0.1);
    --cbg-ff8c2e: rgb(255, 140, 46);
    --cbg-ffc02e: rgb(255, 192, 46);
    --cbg-ffffff: rgb(255, 255, 255);
    --cbg-ffffff-a0: rgba(255, 255, 255, 0.0);
    --cbg-ffffff-a02: rgba(255, 255, 255, 0.02);
    --cbg-ffffff-a03: rgba(255, 255, 255, 0.03);
    --cbg-ffffff-a04: rgba(255, 255, 255, 0.04);
    --cbg-ffffff-a05: rgba(255, 255, 255, 0.05);
    --cbg-ffffff-a06: rgba(255, 255, 255, 0.06);
    --cbg-ffffff-a07: rgba(255, 255, 255, 0.07);
    --cbg-ffffff-a08: rgba(255, 255, 255, 0.08);
    --cbg-ffffff-a1: rgba(255, 255, 255, 0.1);
    --cbg-ffffff-a12: rgba(255, 255, 255, 0.12);
    --cbg-ffffff-a14: rgba(255, 255, 255, 0.14);
    --cbg-ffffff-a15: rgba(255, 255, 255, 0.15);
    --cbg-ffffff-a16: rgba(255, 255, 255, 0.16);
    --cbg-ffffff-a18: rgba(255, 255, 255, 0.18);
    --cbg-ffffff-a22: rgba(255, 255, 255, 0.22);
    --cbg-ffffff-a3: rgba(255, 255, 255, 0.3);
    --cbg-ffffff-a35: rgba(255, 255, 255, 0.35);
    --cbg-ffffff-a55: rgba(255, 255, 255, 0.55);
    --cbg-ffffff-a7: rgba(255, 255, 255, 0.7);
    --cbg-ffffff-a75: rgba(255, 255, 255, 0.75);
    --cbg-ffffff-a82: rgba(255, 255, 255, 0.82);
    --cbg-ffffff-a85: rgba(255, 255, 255, 0.85);
    --cfg-000000: rgb(255, 255, 255);
    --cfg-00c9a7: rgb(192, 63, 12);
    --cfg-00d9a2: rgb(192, 63, 12);
    --cfg-010811: rgb(248, 249, 251);
    --cfg-02c076: rgb(192, 63, 12);
    --cfg-03100d: rgb(184, 71, 10);
    --cfg-04120c: rgb(184, 71, 10);
    --cfg-04121a: rgb(243, 247, 249);
    --cfg-04130c: rgb(184, 71, 10);
    --cfg-04231a: rgb(184, 71, 10);
    --cfg-06131a-a85: rgba(243, 246, 248, 0.85);
    --cfg-071f26: rgb(237, 244, 246);
    --cfg-087f78: rgb(8, 127, 120);
    --cfg-088beb: rgb(8, 131, 222);
    --cfg-0a0f14: rgb(243, 246, 249);
    --cfg-0a252b: rgb(234, 242, 244);
    --cfg-0d2232: rgb(230, 237, 242);
    --cfg-0d3035: rgb(229, 240, 241);
    --cfg-10b981: rgb(192, 63, 12);
    --cfg-19d69c: rgb(192, 63, 12);
    --cfg-1a0e00: rgb(194, 104, 0);
    --cfg-1a1200: rgb(194, 134, 0);
    --cfg-1a2a35: rgb(224, 233, 238);
    --cfg-2a0606: rgb(170, 24, 24);
    --cfg-2a1500: rgb(194, 97, 0);
    --cfg-333333: rgb(224, 224, 224);
    --cfg-3e87d0: rgb(45, 115, 185);
    --cfg-4285f4: rgb(13, 90, 217);
    --cfg-475569: rgb(192, 200, 212);
    --cfg-5e8c8a: rgb(86, 128, 126);
    --cfg-64748b: rgb(90, 104, 125);
    --cfg-67727a: rgb(98, 109, 116);
    --cfg-6ee7b7: rgb(192, 63, 12);
    --cfg-737a84: rgb(100, 106, 114);
    --cfg-7ba8a2: rgb(85, 129, 123);
    --cfg-8a9ba8: rgb(91, 109, 123);
    --cfg-8fa8b8: rgb(91, 123, 143);
    --cfg-93c5fd: rgb(52, 79, 109);
    --cfg-94a3b8: rgb(91, 111, 138);
    --cfg-97abb6: rgb(94, 120, 134);
    --cfg-9aa4b2: rgb(99, 112, 130);
    --cfg-9b6cff: rgb(73, 0, 230);
    --cfg-9b6fe8: rgb(92, 32, 198);
    --cfg-9fd8ce: rgb(192, 63, 12);
    --cfg-a3f3d3: rgb(194, 74, 10);
    --cfg-a9b4be: rgb(87, 102, 115);
    --cfg-b0b4bc: rgb(90, 96, 107);
    --cfg-cbd5e1: rgb(49, 65, 84);
    --cfg-d1dce2: rgb(49, 67, 77);
    --cfg-e2e8f0: rgb(32, 45, 63);
    --cfg-e6edf0: rgb(34, 50, 57);
    --cfg-ef4444: rgb(211, 18, 18);
    --cfg-f1f5f9: rgb(23, 36, 48);
    --cfg-f54434: rgb(219, 28, 11);
    --cfg-f59b00: rgb(230, 145, 0);
    --cfg-f59e0b: rgb(220, 142, 9);
    --cfg-f5ad05: rgb(225, 159, 5);
    --cfg-f7f7f7: rgb(34, 34, 34);
    --cfg-f87171: rgb(219, 11, 11);
    --cfg-fbbf24: rgb(225, 164, 4);
    --cfg-fca5a5: rgb(188, 6, 6);
    --cfg-ff1f5a: rgb(230, 0, 60);
    --cfg-ff4b4b: rgb(230, 0, 0);
    --cfg-ff654d: rgb(230, 31, 0);
    --cfg-ffffff: rgb(26, 26, 26);
    --cln-000000-a06: rgba(219, 219, 219, 0.06);
    --cln-000000-a08: rgba(219, 219, 219, 0.08);
    --cln-00d9a2: rgb(233, 89, 12);
    --cln-00d9a2-a35: rgba(233, 89, 12, 0.35);
    --cln-02c076: rgb(233, 89, 12);
    --cln-02c076-a25: rgba(233, 89, 12, 0.25);
    --cln-02c076-a3: rgba(233, 89, 12, 0.3);
    --cln-02c076-a35: rgba(233, 89, 12, 0.35);
    --cln-02c076-a5: rgba(233, 89, 12, 0.5);
    --cln-02c076-a7: rgba(233, 89, 12, 0.7);
    --cln-087a5b: rgb(233, 89, 12);
    --cln-088beb: rgb(8, 139, 235);
    --cln-088beb-a4: rgba(8, 139, 235, 0.4);
    --cln-10b981: rgb(233, 89, 12);
    --cln-10b981-a3: rgba(233, 89, 12, 0.3);
    --cln-10b981-a4: rgba(233, 89, 12, 0.4);
    --cln-10b981-a55: rgba(233, 89, 12, 0.55);
    --cln-10b981-a6: rgba(233, 89, 12, 0.6);
    --cln-192532: rgb(199, 211, 225);
    --cln-19d69c: rgb(233, 89, 12);
    --cln-19d69c-a3: rgba(233, 89, 12, 0.3);
    --cln-19d69c-a35: rgba(233, 89, 12, 0.35);
    --cln-1a2a35: rgb(198, 214, 224);
    --cln-1c3447: rgb(196, 211, 223);
    --cln-1d2a35: rgb(198, 212, 224);
    --cln-1e293b: rgb(197, 207, 224);
    --cln-1e2a3d: rgb(197, 207, 224);
    --cln-1e5180: rgb(188, 204, 219);
    --cln-243044: rgb(195, 205, 223);
    --cln-263442: rgb(196, 209, 221);
    --cln-263b50: rgb(193, 208, 222);
    --cln-2c3b52: rgb(192, 204, 221);
    --cln-334155: rgb(193, 204, 218);
    --cln-35506b: rgb(188, 203, 219);
    --cln-3b82f6: rgb(59, 130, 246);
    --cln-3b82f6-a4: rgba(59, 130, 246, 0.4);
    --cln-60a5fa-a28: rgba(70, 104, 145, 0.28);
    --cln-64748b: rgb(90, 104, 125);
    --cln-7c2d12: rgb(124, 45, 18);
    --cln-94a3b8-a22: rgba(91, 111, 138, 0.22);
    --cln-94a3b8-a3: rgba(91, 111, 138, 0.3);
    --cln-94a3b8-a35: rgba(91, 111, 138, 0.35);
    --cln-9a6200: rgb(154, 98, 0);
    --cln-9b6cff: rgb(155, 108, 255);
    --cln-9b6fe8: rgb(155, 111, 232);
    --cln-b477ff-a35: rgba(180, 119, 255, 0.35);
    --cln-b91c1c: rgb(185, 28, 28);
    --cln-d94343: rgb(217, 67, 67);
    --cln-ef4444: rgb(239, 68, 68);
    --cln-ef4444-a42: rgba(239, 68, 68, 0.42);
    --cln-f54434: rgb(245, 68, 52);
    --cln-f54434-a25: rgba(245, 68, 52, 0.25);
    --cln-f59b00-a3: rgba(245, 155, 0, 0.3);
    --cln-f59e0b-a3: rgba(245, 158, 11, 0.3);
    --cln-f59e0b-a35: rgba(245, 158, 11, 0.35);
    --cln-f5ad05: rgb(245, 173, 5);
    --cln-f5ad05-a3: rgba(245, 173, 5, 0.3);
    --cln-ff1f5a: rgb(255, 31, 90);
    --cln-ff1f5a-a45: rgba(255, 31, 90, 0.45);
    --cln-ff3d6d: rgb(255, 61, 109);
    --cln-ffffff-a03: rgba(26, 26, 26, 0.03);
    --cln-ffffff-a05: rgba(26, 26, 26, 0.05);
    --cln-ffffff-a06: rgba(26, 26, 26, 0.06);
    --cln-ffffff-a07: rgba(26, 26, 26, 0.07);
    --cln-ffffff-a08: rgba(26, 26, 26, 0.08);
    --cln-ffffff-a09: rgba(26, 26, 26, 0.09);
    --cln-ffffff-a1: rgba(26, 26, 26, 0.1);
    --cln-ffffff-a14: rgba(26, 26, 26, 0.14);
    --cln-ffffff-a15: rgba(26, 26, 26, 0.15);
    --cln-ffffff-a16: rgba(26, 26, 26, 0.16);
    --cln-ffffff-a18: rgba(26, 26, 26, 0.18);
    --cln-ffffff-a35: rgba(26, 26, 26, 0.35);
    --csh-000000-a15: rgba(0, 0, 0, 0.068);
    --csh-000000-a2: rgba(0, 0, 0, 0.09);
    --csh-000000-a3: rgba(0, 0, 0, 0.135);
    --csh-000000-a35: rgba(0, 0, 0, 0.158);
    --csh-000000-a4: rgba(0, 0, 0, 0.18);
    --csh-000000-a45: rgba(0, 0, 0, 0.203);
    --csh-000000-a5: rgba(0, 0, 0, 0.225);
    --csh-000000-a6: rgba(0, 0, 0, 0.27);
    --csh-02c076-a15: rgba(234, 88, 12, 0.12);
    --csh-02c076-a2: rgba(234, 88, 12, 0.16);
    --csh-02c076-a25: rgba(234, 88, 12, 0.2);
    --csh-02c076-a28: rgba(234, 88, 12, 0.224);
    --csh-02c076-a4: rgba(234, 88, 12, 0.32);
    --csh-02c076-a6: rgba(234, 88, 12, 0.48);
    --csh-02c076-a8: rgba(234, 88, 12, 0.64);
    --csh-088beb-a15: rgba(8, 139, 235, 0.12);
    --csh-10b981: rgba(234, 88, 12, 0.8);
    --csh-10b981-a0: rgba(234, 88, 12, 0.0);
    --csh-10b981-a35: rgba(234, 88, 12, 0.28);
    --csh-10b981-a42: rgba(234, 88, 12, 0.336);
    --csh-19d69c-a15: rgba(234, 88, 12, 0.12);
    --csh-19d69c-a25: rgba(234, 88, 12, 0.2);
    --csh-475569-a22: rgba(71, 85, 105, 0.099);
    --csh-94a3b8-a06: rgba(15, 26, 42, 0.03);
    --csh-9b6fe8-a15: rgba(155, 111, 232, 0.12);
    --csh-b91c1c-a3: rgba(185, 28, 28, 0.24);
    --csh-b91c1c-a35: rgba(185, 28, 28, 0.28);
    --csh-ef4444-a6: rgba(239, 68, 68, 0.48);
    --csh-f07a1a-a2: rgba(240, 122, 26, 0.16);
    --csh-f59b00-a22: rgba(245, 155, 0, 0.176);
    --csh-f59e0b-a3: rgba(245, 158, 11, 0.24);
    --csh-f59e0b-a4: rgba(245, 158, 11, 0.32);
    --csh-f5ad05-a15: rgba(245, 173, 5, 0.12);
    --csh-f5ad05-a25: rgba(245, 173, 5, 0.2);
    --csh-f5ad05-a35: rgba(245, 173, 5, 0.28);
    --csh-f5ad05-a6: rgba(245, 173, 5, 0.48);
    --csh-ff1f5a-a08: rgba(255, 31, 90, 0.064);
    --csh-ff1f5a-a1: rgba(255, 31, 90, 0.08);
    --csh-ff1f5a-a12: rgba(255, 31, 90, 0.096);
    --csh-ff1f5a-a22: rgba(255, 31, 90, 0.176);
    --csh-ff1f5a-a25: rgba(255, 31, 90, 0.2);
    --csh-ff1f5a-a3: rgba(255, 31, 90, 0.24);
    --csh-ff1f5a-a5: rgba(255, 31, 90, 0.4);
    --csh-ff1f5a-a65: rgba(255, 31, 90, 0.52);
}

/* Theme-specific artwork: the dashboard icons have a dark tile baked into the file, so
   light mode shows a copy with that background removed (Images/light/). Both are in the
   markup; the theme class on <html> picks one, so it is right from the first paint. */
html:not(.light-theme) .op-theme-light,
html.light-theme .op-theme-dark { display: none !important; }

html, body {
    background-color: var(--op-bg);
    color: var(--op-text);
    scrollbar-color: var(--op-line) transparent;
}

/* ---------- Page shell ----------
   Pages fill the viewport instead of sitting in a fixed-width column. Padding shrinks
   on small screens so content is not squeezed into the middle third on a phone. */

.op-page {
    width: 100%;
    padding: 24px;
}

/* Top spacing grows as the screen shrinks, rather than shrinking with it. The side
   padding still tightens to buy width on a phone, but the top does the opposite: the
   fixed top bar sits directly above this, and the first card was landing hard against
   it with nothing to separate the two. Kept on .op-page so it stays in one place for
   all 33 pages, and clear of the shell offsets that Telegram fullscreen adjusts. */
@media (max-width: 960px) {
    .op-page { padding: 52px 16px 20px; }
}

@media (max-width: 600px) {
    .op-page { padding: 60px 12px 24px; }
}

/* Forms read badly when stretched across a wide monitor, so these stay centred. */

/* ---------- App shell ----------
   The page itself never scrolls. The top bar and the drawer are fixed furniture and
   only the content column scrolls, inside its own box. Letting the document scroll
   is what slid page content underneath the translucent top bar. */

html, body {
    height: 100%;
    overflow: hidden;
}

.mud-layout {
    height: 100dvh;
    min-height: 100dvh;
}

/* margin-top, never padding-top: padding belongs to the scroll box and scrolls away
   with the content, which puts the first rows back under the bar. MudBlazor sets the
   padding itself, so it has to be overridden. */
.mud-main-content {
    margin-top: var(--nav-h);
    padding-top: 12px !important;
    height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overflow-x: hidden;
}

/* The drawer sits below the top navbar across all screen sizes and drawer variants (fixed, responsive, temporary). */
/* The sidebar is full screen height, from the very top; the top bar sits beside it (see
   "Full-height sidebar" below). Its menu scrolls inside it, not with the page. */
.mud-drawer {
    top: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-top: 0 !important;
}

/* On a phone the first item sits right under the bar and reads as part of it, so the
   menu gets room to breathe and a thumb gets a bigger target. */
@media (max-width: 959px) {

    .mud-nav-link {
        min-height: 48px;
        margin: 3px 10px;
        font-size: 0.98rem;
    }
}

.mud-drawer-overlay {
    top: 0 !important;
    height: 100dvh !important;
}

.op-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.op-drawer__nav {
    padding-top: 4px;
    padding-bottom: 24px;
}

/* ---------- Telegram Mini App, fullscreen ----------
   In fullscreen the page is painted behind the status bar and Telegram's own close/menu
   controls, so everything fixed to the top is pushed down by the safe-area inset that
   Telegram publishes. The var falls back to 0 on clients that do not set it. */

/* --tg-inset-top / --tg-inset-bottom come from prava.telegram.ready(): status bar plus
   Telegram's own controls, set only while fullscreen is really on. The top bar starts at
   the very top and grows by that much, so its colour runs up behind Telegram's buttons and
   its contents sit just below them; a little extra keeps them from touching. */
body.tg-fullscreen {
    --tg-top: calc(var(--tg-inset-top, 0px) + 6px);
}

body.tg-fullscreen .mud-appbar:not(.op-bottomnav) {
    top: 0;
    height: calc(var(--nav-h) + var(--tg-top)) !important;
    padding-top: var(--tg-top);
    box-sizing: border-box;
}

body.tg-fullscreen .mud-drawer {
    top: var(--tg-top) !important;
    height: calc(100dvh - var(--tg-top)) !important;
    max-height: calc(100dvh - var(--tg-top)) !important;
}

body.tg-fullscreen .mud-main-content {
    margin-top: calc(var(--nav-h) + var(--tg-top));
    height: calc(100dvh - var(--nav-h) - var(--tg-top));
}

body.tg-fullscreen .mud-drawer {
    top: calc(var(--nav-h) + var(--tg-top));
    height: calc(100dvh - var(--nav-h) - var(--tg-top));
}

/* Telegram publishes its own bottom inset, and it is larger than the browser's
   env() on clients with a gesture bar — the bar would otherwise sit under it. */
body.tg-fullscreen .op-bottomnav {
    --tg-bottom: var(--tg-inset-bottom, 0px);
    height: calc(var(--bottom-h) + var(--tg-bottom));
    padding-bottom: var(--tg-bottom);
}

/* ---------- Top bar ---------- */

.op-countdown {
    background: var(--cbg-3b82f6-a14);
    border: 1px solid var(--cln-3b82f6-a4);
    color: var(--cfg-93c5fd);
    font-weight: 700;
}

.op-lang-button {
    min-width: 0;
    gap: 7px;
    padding-left: 8px;
    padding-right: 8px;
}

.op-level-chip {
    background: var(--cbg-10b981-a14);
    border: 1px solid var(--cln-10b981-a4);
    color: var(--cfg-6ee7b7);
    font-weight: 700;
}

/* ---------- Cards ---------- */

.op-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
    position: relative;
    overflow: hidden;
}

.op-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

/* Only cards that actually go somewhere lift on hover — a static panel that moves
   under the cursor reads as clickable when it is not. */
.op-card--action {
    cursor: pointer;
}

.op-card--action:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong));
}

/* ---------- Dashboard ---------- */

/* Round tinted badge behind a card's icon. --op-accent is set per card. */
.op-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--op-accent, var(--op-primary)) 18%, transparent);
    color: var(--op-accent, var(--op-primary));
    flex: 0 0 auto;
}

/* Action cards carry a colour along the top edge instead of a heavy border. */

/* Compact number tile: big value, quiet label. */

.op-stat__value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
}

/* Progress ring in the hero, with the percentage centred inside it. */

@media (max-width: 600px) {
    .op-stat__value { font-size: 1.3rem; }
}

/* ---------- Duolingo-style roadmap ---------- */

.op-roadmap__row {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin: 26px 0;
}

/* Nodes alternate left/right to produce the winding path. */
.op-roadmap__row[data-offset="-2"] { transform: translateX(-132px); }
.op-roadmap__row[data-offset="-1"] { transform: translateX(-70px); }
.op-roadmap__row[data-offset="0"]  { transform: translateX(0); }
.op-roadmap__row[data-offset="1"]  { transform: translateX(70px); }
.op-roadmap__row[data-offset="2"]  { transform: translateX(132px); }

@media (max-width: 640px) {
    .op-roadmap__row[data-offset="-2"] { transform: translateX(-74px); }
    .op-roadmap__row[data-offset="-1"] { transform: translateX(-40px); }
    .op-roadmap__row[data-offset="1"]  { transform: translateX(40px); }
    .op-roadmap__row[data-offset="2"]  { transform: translateX(74px); }
}

.op-node {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 4px solid var(--op-line);
    background: var(--op-surface);
    color: var(--op-muted);
    cursor: pointer;
    position: relative;
    transition: transform 130ms ease, box-shadow 130ms ease;
}

.op-node:hover { transform: scale(1.06); }
.op-node:active { transform: scale(0.97); }

.op-node--locked {
    cursor: not-allowed;
    opacity: 0.55;
}

.op-node--locked:hover { transform: none; }

.op-node--completed {
    border-color: var(--op-primary);
    background: var(--cbg-10b981-a16);
    color: var(--op-primary);
}

.op-node--active {
    border-color: var(--op-primary);
    background: var(--cbg-10b981-a1);
    color: var(--op-primary);
    animation: op-pulse 2.2s ease-in-out infinite;
}

@keyframes op-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--csh-10b981-a42); }
    50%      { box-shadow: 0 0 0 16px var(--csh-10b981-a0); }
}

@media (prefers-reduced-motion: reduce) {
    .op-node--active { animation: none; }
    .op-card:hover { transform: none; }
}

.op-node__label {
    position: absolute;
    top: 96px;
    width: 168px;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.25;
    color: var(--op-muted);
}

/* ---------- Quiz engine ---------- */

.op-option {
    width: 100%;
    text-align: left;
    border: 2px solid var(--op-line);
    background: var(--op-surface-2);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--op-text);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.op-option:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    background: var(--surface-hover);
    transform: translateX(3px);
}

.op-option:disabled { cursor: default; }

.op-option__code {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--cbg-94a3b8-a16);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.8rem;
}

.op-option--pending {
    border-color: var(--cln-f5ad05) !important;
    background: var(--cbg-f5ad05-a16) !important;
    box-shadow: 0 0 12px var(--csh-f5ad05-a35);
}

.op-option--pending .op-option__code {
    background: var(--cbg-f5ad05) !important;
    color: var(--cfg-1a1200) !important;
}

.op-option--correct {
    border-color: var(--op-primary);
    background: var(--cbg-10b981-a16);
}

.op-option--correct .op-option__code {
    background: var(--op-primary);
    color: var(--cfg-04231a);
}

.op-option--wrong {
    border-color: var(--op-error);
    background: var(--cbg-ef4444-a14);
}

.op-option--wrong .op-option__code {
    background: var(--op-error);
    color: var(--cfg-2a0606);
}

/* ---------- Lesson content ---------- */

.op-lesson-content {
    line-height: 1.75;
    font-size: 0.98rem;

    /* Long prose across a full-width monitor is unreadable, so the text column is capped
       even though the page itself is full-bleed. */
    max-width: 78ch;
}

.op-lesson-content h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 1.6rem 0 0.7rem;
}

.op-lesson-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.3rem 0 0.5rem;
}

.op-lesson-content p { margin: 0.7rem 0; }
.op-lesson-content ul,
.op-lesson-content ol { margin: 0.7rem 0 0.7rem 1.4rem; }
.op-lesson-content li { margin: 0.3rem 0; }
.op-lesson-content strong { color: var(--cfg-ffffff); }

.op-lesson-content img {
    max-width: 100%;
    border-radius: 14px;
    margin: 1rem 0;
    border: 1px solid var(--op-line);
}

.op-lesson-content blockquote {
    border-left: 4px solid var(--op-primary);
    background: var(--cbg-10b981-a08);
    margin: 1rem 0;
    padding: 0.7rem 1rem;
    border-radius: 0 12px 12px 0;
}

.op-lesson-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.op-lesson-content th,
.op-lesson-content td {
    border: 1px solid var(--op-line);
    padding: 8px 12px;
    text-align: left;
}

.op-lesson-content th { background: var(--cbg-94a3b8-a1); }

/* Wide content must scroll inside its own box, never the page body. */
.op-scroll-x {
    overflow-x: auto;
    max-width: 100%;
}

/* ---------- Admin upload drop zone ---------- */

.op-dropzone {
    border: 2px dashed var(--op-line);
    border-radius: 14px;
    background: var(--op-surface-2);
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease;
}

.op-dropzone:hover {
    border-color: var(--cln-10b981-a6);
}

.op-dropzone--over {
    border-color: var(--op-primary);
    background: var(--cbg-10b981-a1);
}

/* ---------- Arena ---------- */

/* Arena brand colour: the orange of the banner art. You are emerald, the opponent is red. */
.op-ar {
    --ar: #F97316;
    --ar-soft: color-mix(in srgb, var(--ar) 16%, transparent);
    --ar-me: var(--accent);
    --ar-foe: var(--danger);
}

@keyframes op-ar-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes op-ar-pop  { 0% { opacity: 0; transform: scale(.7); } 60% { transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes op-ar-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ar) 55%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
@keyframes op-ar-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes op-ar-spin  { to { transform: rotate(360deg); } }
@keyframes op-ar-ping  { 0% { transform: scale(.35); opacity: .7; } 100% { transform: scale(1); opacity: 0; } }
@keyframes op-ar-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes op-ar-hit   { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes op-ar-drift { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-60px, -160px); opacity: 0; } }
@keyframes op-ar-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* --- Shared bits --- */

.op-ar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: #1a0c00;
    cursor: pointer;
    border: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, #FFA24D, var(--ar));
    box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--ar) 75%, transparent);
    transition: transform .15s ease, box-shadow .15s ease;
}

.op-ar-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--ar) 85%, transparent); }
.op-ar-cta:active { transform: translateY(0); }
.op-ar-banner .op-ar-cta { animation: op-ar-pulse 2.4s ease-out infinite; }

.op-ar-cta--ghost {
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-strong, var(--border));
    box-shadow: none;
}

.op-ar-avatar {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--surface-2);
    border: 3px solid var(--border);
}

.op-ar-avatar--me  { border-color: var(--ar-me); background: color-mix(in srgb, var(--ar-me) 22%, var(--surface)); color: var(--ar-me); }
.op-ar-avatar--foe { border-color: var(--ar-foe); background: color-mix(in srgb, var(--ar-foe) 20%, var(--surface)); color: var(--ar-foe); }
.op-ar-avatar--bot { border-color: #60A5FA; background: color-mix(in srgb, #60A5FA 20%, var(--surface)); color: #60A5FA; }
.op-ar-avatar--unknown { border-style: dashed; border-color: var(--muted); background: transparent; color: var(--muted); font-size: 1.5rem; font-weight: 800; animation: op-ar-blink 1.6s ease-in-out infinite; }

/* --- Lobby --- */

.op-ar-lobby { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; animation: op-ar-rise .5s ease both; }

.op-ar-banner {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

/* The picture owns the right 60% of the banner and the copy sits on plain card colour beside
   it, so the art is never washed out by a fade or sits under the text, on either theme. */
.op-ar-banner__img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
    height: 100%;
    object-fit: cover;
    object-position: 88% 50%;
    clip-path: inset(0 0 0 3px);   /* the art has a dark hairline on its left edge */
    transform-origin: 70% 60%;
    animation: op-ar-zoom 18s ease-in-out infinite alternate;
}

@keyframes op-ar-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }

/* Only a short seam where the picture meets the card. */
.op-ar-banner__shade {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
    pointer-events: none;
    background: linear-gradient(90deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 60%, transparent) 4%, transparent 18%);
}

.op-ar-spark {
    position: absolute;
    bottom: 14%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ar);
    box-shadow: 0 0 10px 2px color-mix(in srgb, var(--ar) 80%, transparent);
    opacity: 0;
    animation: op-ar-drift 4.2s ease-out infinite;
}

.op-ar-spark--1 { left: 58%; animation-delay: 0s; }
.op-ar-spark--2 { left: 72%; animation-delay: 1.4s; }
.op-ar-spark--3 { left: 84%; animation-delay: 2.7s; }

.op-ar-banner__copy { position: relative; box-sizing: border-box; width: 42%; min-width: 0; padding: 40px 0 40px 44px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: start; }

.op-ar-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--ar);
    background: var(--ar-soft);
    border-radius: var(--radius-pill);
}

.op-ar-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ar); animation: op-ar-blink 1.2s ease-in-out infinite; }

.op-ar-banner__title { margin: 0; font-family: var(--font-display, inherit); font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 900; line-height: 1; color: var(--text); }
.op-ar-banner__title span { color: var(--ar); font-style: italic; padding: 0 2px; }
.op-ar-banner__lede { margin: 0; font-size: 1.02rem; line-height: 1.55; color: var(--muted); }
.op-ar-banner__hint { margin: 2px 0 0; font-size: .82rem; line-height: 1.5; color: var(--faint); }

.op-ar-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.op-ar-rule {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 14px);
    background: var(--surface);
    animation: op-ar-rise .5s ease both;
    transition: transform .2s ease, border-color .2s ease;
}

.op-ar-rule:nth-child(2) { animation-delay: .08s; }
.op-ar-rule:nth-child(3) { animation-delay: .16s; }
.op-ar-rule:nth-child(4) { animation-delay: .24s; }
.op-ar-rule:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ar) 55%, transparent); }

.op-ar-rule__ico { grid-row: 1 / span 2; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; }
.op-ar-rule:hover .op-ar-rule__ico { animation: op-ar-float 1.2s ease-in-out infinite; }
.op-ar-rule__ico--q { color: #60A5FA; background: color-mix(in srgb, #60A5FA 16%, transparent); }
.op-ar-rule__ico--t { color: #F59E0B; background: color-mix(in srgb, #F59E0B 16%, transparent); }
.op-ar-rule__ico--s { color: var(--ar); background: var(--ar-soft); }
.op-ar-rule__ico--h { color: #F43F5E; background: color-mix(in srgb, #F43F5E 16%, transparent); }

.op-ar-rule strong { font-size: 1.6rem; font-weight: 900; line-height: 1.1; color: var(--text); }
.op-ar-rule > span:last-child { font-size: .8rem; line-height: 1.35; color: var(--muted); }

/* --- Searching --- */

.op-ar-search {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 36px 16px 24px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: radial-gradient(70% 90% at 50% 0%, var(--ar-soft), transparent 70%), var(--surface);
    animation: op-ar-rise .4s ease both;
}

.op-ar-search__stage { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 6vw, 64px); width: 100%; }

.op-ar-seat { display: grid; justify-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.op-ar-seat .op-ar-avatar { width: 72px; height: 72px; }
.op-ar-seat--me .op-ar-avatar { border-color: var(--ar-me); color: var(--ar-me); background: color-mix(in srgb, var(--ar-me) 20%, var(--surface)); }

.op-ar-radar {
    position: relative;
    width: 190px;
    height: 190px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--ar) 14%, transparent), transparent 70%);
    border: 2px solid color-mix(in srgb, var(--ar) 45%, transparent);
}

.op-ar-radar__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ar); opacity: 0; animation: op-ar-ping 2.4s ease-out infinite; }
.op-ar-radar__ring--2 { animation-delay: .8s; }
.op-ar-radar__ring--3 { animation-delay: 1.6s; }

.op-ar-radar__sweep {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--ar) 55%, transparent) 100%);
    animation: op-ar-spin 2.2s linear infinite;
    mask: radial-gradient(circle, transparent 0 22%, #000 23%);
}

.op-ar-radar__count { position: relative; font-size: 3.4rem; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }

.op-ar-search__title { margin: 8px 0 0; font-size: 1.5rem; font-weight: 800; }
.op-ar-search__hint { margin: 0; max-width: 440px; font-size: .9rem; line-height: 1.5; color: var(--muted); }

/* --- Match board --- */

.op-ar-board { display: grid; gap: 14px; animation: op-ar-rise .35s ease both; }

.op-ar-hud {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--ar-me) 12%, transparent), transparent 40%, transparent 60%, color-mix(in srgb, var(--ar-foe) 12%, transparent)),
        var(--surface);
}

.op-ar-fighter { display: flex; align-items: center; gap: 14px; min-width: 0; }
.op-ar-fighter--foe { flex-direction: row-reverse; text-align: right; }
.op-ar-fighter__body { min-width: 0; flex: 1 1 auto; display: grid; gap: 5px; }
.op-ar-fighter__meta { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.op-ar-fighter--foe .op-ar-fighter__meta { flex-direction: row-reverse; }
.op-ar-fighter__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-ar-fighter__score { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
.op-ar-fighter--foe .op-ar-fighter__score { color: var(--ar-foe); }
.op-ar-fighter:not(.op-ar-fighter--foe) .op-ar-fighter__score { color: var(--ar-me); }

.op-ar-bot-tag { padding: 1px 8px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; color: #60A5FA; border: 1px solid color-mix(in srgb, #60A5FA 55%, transparent); border-radius: var(--radius-pill); }

.op-ar-hp { position: relative; height: 12px; overflow: hidden; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text) 10%, transparent); }
.op-ar-hp__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #059669, var(--ar-me)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.op-ar-hp--foe .op-ar-hp__fill { background: linear-gradient(90deg, #B91C1C, var(--ar-foe)); margin-left: auto; }
.op-ar-hp__fill.is-low { background: linear-gradient(90deg, #B45309, #F59E0B); animation: op-ar-blink 1s ease-in-out infinite; }
.op-ar-hp__hit { position: absolute; inset: 0; background: #fff; border-radius: inherit; animation: op-ar-hit .5s ease-out forwards; pointer-events: none; }
.op-ar-hp__num { font-size: .72rem; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }

.op-ar-hud__mid { display: grid; justify-items: center; gap: 2px; }

.op-ar-clock {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    font-size: 1.9rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    border-radius: 50%;
    border: 3px solid var(--ar);
    background: var(--ar-soft);
}

.op-ar-clock--low { color: var(--danger); border-color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); animation: op-ar-shake .5s ease-in-out infinite; }
.op-ar-round { font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

.op-ar-pips { display: flex; gap: 6px; }
.op-ar-pip { flex: 1 1 0; height: 14px; display: grid; grid-template-rows: 1fr 1fr; gap: 2px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--text) 8%, transparent); }
.op-ar-pip > span { animation: op-ar-pop .35s ease both; }
.op-ar-pip .is-right { background: var(--accent); }
.op-ar-pip .is-wrong { background: var(--danger); }
.op-ar-pip--now { outline: 2px solid var(--ar); outline-offset: 1px; animation: op-ar-blink 1.2s ease-in-out infinite; }

.op-ar-timer { height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text) 10%, transparent); }
.op-ar-timer__fill { height: 100%; background: linear-gradient(90deg, var(--ar), #FBBF24); transition: width 1s linear; }
.op-ar-timer__fill--low { background: var(--danger); }

.op-ar-question { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); animation: op-ar-rise .35s ease both; }
.op-ar-question__text { margin: 0 0 16px; font-size: 1.12rem; font-weight: 700; line-height: 1.5; }
.op-ar-question__media { display: grid; place-items: center; margin-bottom: 18px; padding: 8px; border-radius: 14px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.op-ar-question__media .op-ar-question__img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 10px; }

.op-ar-options { display: grid; gap: 10px; }
.op-ar-options .op-option { animation: op-ar-rise .35s ease both; }
.op-ar-options .op-option:nth-child(1) { animation-delay: .04s; }
.op-ar-options .op-option:nth-child(2) { animation-delay: .1s; }
.op-ar-options .op-option:nth-child(3) { animation-delay: .16s; }
.op-ar-options .op-option:nth-child(4) { animation-delay: .22s; }
.op-ar-options .op-option--wrong { animation: op-ar-shake .4s ease; }
.op-ar-options .op-option--correct { animation: op-ar-pop .35s ease both; }

.op-ar-feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin: 16px 0 0; padding: 12px 16px; font-size: .9rem; border-radius: 12px; animation: op-ar-pop .3s ease both; }
.op-ar-feedback strong { display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; }
.op-ar-feedback--right { color: var(--accent-bright); background: var(--accent-soft); }
.op-ar-feedback--wrong { color: var(--cfg-f87171); background: var(--cbg-ef4444-a16); }
.op-ar-feedback--wait { color: var(--muted); background: color-mix(in srgb, var(--text) 6%, transparent); animation: op-ar-blink 1.4s ease-in-out infinite; }

/* --- Result --- */

.op-ar-result {
    --vc: var(--muted);
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 40px 20px 34px;
    text-align: center;
    border: 1px solid color-mix(in srgb, var(--vc) 45%, var(--border));
    border-radius: var(--radius-lg);
    background: var(--surface);
    animation: op-ar-rise .45s ease both;
}

.op-ar-result--win  { --vc: #FBBF24; }
.op-ar-result--lose { --vc: var(--danger); }

.op-ar-result__glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--vc) 24%, transparent), transparent 72%); }
.op-ar-result > *:not(.op-ar-result__glow) { position: relative; }

.op-ar-crest { position: relative; width: 112px; height: 112px; display: grid; place-items: center; animation: op-ar-pop .6s ease both; }
.op-ar-crest__ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--vc); background: color-mix(in srgb, var(--vc) 14%, var(--surface)); box-shadow: 0 0 40px -6px var(--vc); }
.op-ar-result--win .op-ar-crest__ring { animation: op-ar-pulse 2.2s ease-out infinite; }
.op-ar-crest__icon { position: relative; font-size: 3.6rem !important; color: var(--vc); }
.op-ar-result--win .op-ar-crest__icon { animation: op-ar-float 2.4s ease-in-out infinite; }

.op-ar-result__verdict { margin: 0; font-family: var(--font-display, inherit); font-size: 2.4rem; font-weight: 900; line-height: 1.1; color: var(--vc); }
.op-ar-result--draw .op-ar-result__verdict, .op-ar-result:not(.op-ar-result--win):not(.op-ar-result--lose) .op-ar-result__verdict { color: var(--text); }

.op-ar-versus { display: flex; align-items: flex-start; justify-content: center; gap: clamp(18px, 6vw, 56px); width: 100%; margin: 6px 0 4px; }
.op-ar-versus__side { display: grid; justify-items: center; gap: 4px; min-width: 120px; }
.op-ar-versus__side .op-ar-avatar { width: 60px; height: 60px; }
.op-ar-versus__pts { font-size: 2.6rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; animation: op-ar-pop .5s .2s ease both; }
.op-ar-versus__side--me .op-ar-versus__pts { color: var(--ar-me); }
.op-ar-versus__side--foe .op-ar-versus__pts { color: var(--ar-foe); }
.op-ar-versus__who { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.op-ar-versus__vs { align-self: center; font-size: .95rem; font-weight: 900; letter-spacing: .16em; color: var(--faint); }

.op-ar-reward { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.op-ar-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: var(--radius-pill); animation: op-ar-pop .45s .35s ease both; }
.op-ar-chip--xp { color: #FBBF24; background: rgba(245, 173, 5, .18); }
.op-ar-chip--none { opacity: .7; }
.op-ar-chip .is-up { color: var(--accent-bright); }
.op-ar-chip .is-down { color: var(--cfg-f87171); }
.op-ar-reward__note { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.op-ar-reward__link { flex-basis: 100%; font-size: .85rem; font-weight: 700; color: var(--accent); text-decoration: none; }

.op-ar-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.op-ar-stat { min-width: 140px; padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.op-ar-stat strong { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; color: var(--text); }
.op-ar-stat span { font-size: .78rem; color: var(--muted); }

.op-ar-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

@media (max-width: 860px) {
    .op-ar-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Stacked: the picture on top, the copy underneath on plain card colour. */
    .op-ar-banner { min-height: 0; flex-direction: column; align-items: stretch; }
    .op-ar-banner__img { position: relative; order: -1; width: 100%; height: 230px; object-position: 62% 50%; }
    .op-ar-banner__shade { top: 0; bottom: auto; width: 100%; height: 230px; background: linear-gradient(0deg, var(--surface) 0%, transparent 22%); }
    .op-ar-banner__copy { width: 100%; padding: 8px 22px 28px; }
    .op-ar-spark { display: none; }
}

@media (max-width: 640px) {
    .op-ar-hud { grid-template-columns: 1fr 1fr; padding: 14px; gap: 12px; }
    .op-ar-hud__mid { grid-column: 1 / -1; grid-row: 1; grid-auto-flow: column; justify-content: center; align-items: center; gap: 12px; }
    .op-ar-clock { width: 54px; height: 54px; font-size: 1.5rem; }
    .op-ar-avatar { width: 42px; height: 42px; }
    .op-ar-question { padding: 16px; }
    .op-ar-radar { width: 140px; height: 140px; }
    .op-ar-radar__count { font-size: 2.6rem; }
    .op-ar-seat .op-ar-avatar { width: 54px; height: 54px; }
    .op-ar-result__verdict { font-size: 1.9rem; }
    .op-ar-versus__pts { font-size: 2.1rem; }
    .op-ar-versus__side { min-width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
    .op-ar *, .op-ar *::before, .op-ar *::after { animation: none !important; transition: none !important; }
}

/* ---------- Enhanced Interactive UI & Gamification ---------- */

/* Flame animated glow */

@keyframes op-flame-glow {
    0% { box-shadow: 0 0 8px var(--csh-f59e0b-a3); }
    100% { box-shadow: 0 0 16px var(--csh-ef4444-a6); }
}

/* Red pulsating timer warning */
.op-pulse-warning {
    animation: op-timer-pulse 1s ease-in-out infinite;
}

@keyframes op-timer-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Keyboard shortcut hint badge on options */
.op-shortcut-hint {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--cbg-94a3b8-a2);
    color: var(--op-muted);
    border: 1px solid var(--cln-ffffff-a1);
    margin-left: auto;
    flex-shrink: 0;
}

/* Flashcard 3D Flip System */
.op-flip-card {
    perspective: 1000px;
    height: 320px;
    cursor: pointer;
}

.op-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.op-flip-card.is-flipped .op-flip-card-inner {
    transform: rotateY(180deg);
}

.op-flip-card-front,
.op-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--op-surface);
    border: 1px solid var(--op-line);
}

.op-flip-card-back {
    transform: rotateY(180deg);
    background: var(--op-surface-2);
    border-color: var(--cln-10b981-a4);
}

/* Question Navigator Grid Button */

/* Arena Battle Screen Damage Effects */

@keyframes op-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Achievement Card */

/* =============================================================================
   Reference design system
   -----------------------------------------------------------------------------
   Everything below re-skins MudBlazor to the visual language of the reference
   site: a condensed display face over a plain body face, fully-round buttons
   with an accent glow, hairline borders, and a translucent blurred top bar.

   These rules come last so they win over MudBlazor's own stylesheet without
   needing !important on every line.
   ========================================================================== */

body,
.mud-typography-body1,
.mud-typography-body2,
.mud-typography-caption,
.mud-button-root {
    font-family: var(--font-body);
}

/* ---------- Display type ----------
   Bebas is uppercase-only and very tight, so it is used for headings and the
   logo, never for body copy or anything that must wrap to many lines. */

.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4 {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    line-height: 0.98;
    font-weight: 400;
}

.mud-typography-h1 { font-size: clamp(2rem, 5vw, 3rem); }
.mud-typography-h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
.mud-typography-h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.mud-typography-h4 { font-size: 1.6rem; }

/* h5/h6 stay on the body face — at those sizes the condensed face is hard to read. */
.mud-typography-h5,
.mud-typography-h6 {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.mud-typography-overline {
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--muted);
}

/* ---------- Buttons ---------- */

.mud-button-root {
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.01em;
    gap: 8px;
    transition: transform .15s ease, box-shadow .2s ease, background .18s ease,
                border-color .18s ease, color .18s ease;
}

.mud-button-root:active {
    transform: translateY(1px);
}

/* The filled primary is the one place colour is allowed to be loud: a diagonal
   accent gradient plus a glow the same hue as the button. */
.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    box-shadow: 0 8px 24px var(--accent-glow);
    border: none;
    color: var(--cfg-04231a);
}

.mud-button-filled.mud-button-filled-primary:hover {
    box-shadow: 0 10px 30px var(--accent-glow);
    filter: brightness(1.05);
}

.mud-button-outlined {
    border-color: var(--border-strong);
    background: var(--cbg-ffffff-a04);
}

.mud-button-outlined:hover {
    background: var(--cbg-ffffff-a07);
    border-color: var(--accent);
}

/* ---------- Top bar ----------
   Translucent and blurred so content scrolling underneath stays faintly visible,
   which is what stops a fixed bar from feeling like a lid. */

/* Solid, not translucent. The bar sits above a scroll container that can never pass
   beneath it, and a see-through bar only ever read as a rendering fault. */
.mud-appbar {
    background: var(--bg) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: none !important;
    height: var(--nav-h);
    min-height: var(--nav-h);
}

.mud-appbar .mud-toolbar {
    height: var(--nav-h);
    min-height: var(--nav-h);
    flex-wrap: nowrap !important;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.op-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0 !important;
    min-width: max-content;
}

.mud-drawer {
    background: var(--bg) !important;
    border-right: 1px solid var(--border) !important;
}

/* The drawer must sit above its own scrim, or the scrim darkens the menu and swallows
   every tap on it. The variant matters: this app uses DrawerVariant.Responsive, so the
   element is .mud-drawer-responsive and a rule written only for .mud-drawer-temporary
   never matched — leaving the drawer on MudBlazor's 1302 under a 1390 scrim. */
.mud-drawer.mud-drawer-temporary,
.mud-drawer.mud-drawer-responsive,
.mud-drawer.mud-drawer-persistent {
    z-index: 1300 !important;
}

/* Order matters in both directions: the drawer must sit above its own scrim, or the scrim
   darkens the menu and eats every tap on it — but below MudBlazor's dialog layer (1400), or
   an open drawer clips the Qoidasi dialog on a wide screen. */
.mud-drawer-overlay {
    z-index: 1290 !important;
}

.mud-nav-link {
    border-radius: var(--radius-sm);
    margin: 2px 8px;
    font-weight: 500;
    transition: background .18s ease, color .18s ease;
}

.mud-nav-link.active {
    background: var(--accent-soft);
    color: var(--accent) !important;
}

/* ---------- Chips, inputs, surfaces ---------- */

.mud-chip {
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--border-strong);
    border-radius: var(--radius-sm);
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--border-mid);
}

.mud-input-root {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.mud-table,
.mud-paper:not(.op-card):not(.op-hero) {
    background: var(--surface);
}

.mud-divider {
    border-color: var(--border);
}

/* ---------- Mobile bottom bar ----------
   Phones get a thumb-reachable bar instead of the drawer. Hidden on wide screens,
   where the drawer is already visible. */

/* MudAppBar supplies the fixed positioning and the blurred surface; only the height,
   the safe-area inset and the breakpoint behaviour are ours. The z-index is lowered
   below MudBlazor's drawer (1100) on purpose: with the temporary drawer open on a
   phone its overlay must cover this bar, not sit behind it. */
.op-bottomnav.mud-appbar {
    display: none;
    top: auto !important;
    bottom: 0;
    z-index: 1090;
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--border);
    border-bottom: none;
    background: var(--cbg-06101c-a95) !important;
    backdrop-filter: blur(16px);
}

/* MudAppBar's toolbar is centred by default; the bar is the full height of the row. */
.op-bottomnav .mud-toolbar {
    height: var(--bottom-h);
    min-height: var(--bottom-h);
    padding: 0 !important;
    width: 100%;
}

.op-bottomnav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.op-bottomnav__item {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 1px;
    color: var(--cfg-8a9ba8);
    text-decoration: none !important;
    background: none;
    border: none;
    font: inherit;
    outline: none;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.op-bottomnav__item:hover,
.op-bottomnav__item:focus {
    color: var(--cfg-e6edf0);
    outline: none;
}

.op-bottomnav__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 26px;
    border-radius: 13px;
    transition: all 0.2s ease;
}

.op-bottomnav__item--active {
    color: var(--accent) !important;
}

.op-bottomnav__item--active .op-bottomnav__icon-wrap {
    background: var(--cbg-02c076-a18);
    color: var(--accent);
    box-shadow: 0 0 10px var(--csh-02c076-a2);
}

.op-bottomnav__label {
    font-size: 0.64rem;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    display: block;
}

@media (max-width: 960px) {
    .op-bottomnav.mud-appbar { display: flex; }

    /* Keep the last rows of every page clear of the bar. */
    .mud-main-content { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px) + 12px); }
}

/* ---------- Bottom Sheet Pop-up ---------- */
.op-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cbg-000000-a65);
    backdrop-filter: blur(6px);
    z-index: 1200;
    animation: opFadeIn 0.2s ease-out;
}

.op-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 540px;
    max-height: 82vh;
    background: var(--cbg-091724);
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    z-index: 1201;
    box-shadow: 0 -10px 40px var(--csh-000000-a6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: opSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.op-bottom-sheet__handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--cbg-ffffff-a22);
    margin: 10px auto 4px;
}

.op-bottom-sheet__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    overflow-y: auto;
    max-height: 60vh;
    padding-right: 4px;
}

@media (min-width: 440px) {
    .op-bottom-sheet__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.op-sheet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--cbg-ffffff-a03);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
}

.op-sheet-card:hover, .op-sheet-card:active {
    background: var(--cbg-ffffff-a07);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.op-sheet-card--active {
    border-color: var(--accent) !important;
    background: var(--cbg-02c076-a08) !important;
}

.op-sheet-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--card-color) 16%, transparent);
    color: var(--card-color);
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.op-sheet-card:hover .op-sheet-card__icon {
    transform: scale(1.08);
}

.op-sheet-card__title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cfg-d1dce2);
    line-height: 1.25;
}

.op-sheet-profile-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: var(--cbg-02c076-a12);
    border: 1px solid var(--cln-02c076-a3);
    color: var(--cfg-02c076);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.op-sheet-profile-btn:hover {
    background: var(--cbg-02c076-a22);
    border-color: var(--cln-02c076);
    box-shadow: 0 0 14px var(--csh-02c076-a2);
}

@keyframes opFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes opSlideUp {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

/* ---------- Focus ----------
   A visible ring only for keyboard users; pointer users never see it. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* `FocusOnNavigate` in Routes.razor focuses the page <h1> after every navigation so a
   screen reader lands on the new heading. That focus is programmatic, but Chrome still
   counts it as focus-visible and drew a ring around every page title. Elements that only
   hold focus this way carry tabindex="-1" — they are never keyboard-reachable, so there
   is no ring to lose. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none;
}

/* ---------- Wordmark ----------
   Set in the display face at a size the body face could not carry without
   looking heavy; the accent falls on the second half only. */
.op-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--text);
}

.op-logo__accent { color: var(--accent); }

/* ---------- Page and section headers ----------
   One header shape for every page: a quiet eyebrow, the title in the display
   face, an optional subtitle, and a hairline that closes the block. Right-hand
   actions sit on the same baseline and drop below the title on a phone. */

/* PageHeader is built from MudStack/MudText, so only the two things the theme cannot
   express live here: the text column must be allowed to shrink inside the flex row,
   and the subtitle needs a measure. */
.op-pagehead__text { min-width: 0; }

.op-pagehead__subtitle {
    display: block;
    margin-top: 6px;
    max-width: 62ch;
}

/* A short accent rule to the left of the label, so section breaks are legible
   without another full-width divider competing with the page header. */

/* Numerals in the display face: condensed digits stay legible at large sizes and
   tie the figures to the headings. */
.op-stat__value {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.op-stat__value { font-size: 1.85rem; }

@media (max-width: 600px) {
    .op-stat__value { font-size: 1.55rem; }
}

/* ---------- Scrollbars, selection, motion ---------- */

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }

*::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover { background-clip: content-box; background-color: var(--accent-dim); }

::selection {
    background: var(--accent);
    color: var(--cfg-04231a);
}

/* Everything in this system moves on hover. For anyone who has asked the OS not to
   animate, the colour changes still land — only the movement is dropped. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .op-card--action:hover,
    .op-option:hover:not(:disabled),
    .op-node:hover,
    .mud-button-root:active {
        transform: none;
    }
}

/* ---------- Rule clauses ----------
   Clause text is stored as plain text with blank lines between paragraphs, because that is
   how the traffic code is written: an opening sentence followed by the a)/b)/v) sub-items.
   Without pre-line those newlines collapse and a six-item prohibition renders as one
   unbroken wall of text. */
.op-clause-text {
    white-space: pre-line;
    line-height: 1.7;
    max-width: 72ch;
}

/* =============================================================================
   Road-sign catalogue
   -----------------------------------------------------------------------------
   Two screens: a grid of modules (categories) and one module's signs. Both are
   built from MudBlazor components; the rules here only cover shapes the theme
   cannot express — the hero band, the sign tile, and the drawer foot.
   ========================================================================== */

/* ---------- Hero band ---------- */

.op-signs-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 28px 32px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(900px 320px at 4% -30%, var(--accent-glow), transparent 60%),
        var(--surface);
}

.op-signs-hero__text {
    min-width: 0;
    max-width: 56ch;
}

.op-signs-hero__art {
    flex: 0 0 auto;
    width: clamp(200px, 26vw, 320px);
    border-radius: var(--radius-card);
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

/* On a phone the artwork would eat the fold, so the band becomes text-only. */
@media (max-width: 900px) {
    .op-signs-hero { padding: 22px; }
    .op-signs-hero__art { display: none; }
}

/* ---------- Filter pills ---------- */

/* The count rides inside the button, so it must not carry the chip's own margins. */
.op-pill-count.mud-chip {
    height: 20px;
    min-width: 20px;
    margin: 0;
    padding: 0 7px;
    font-size: 0.68rem;
    background: var(--cbg-ffffff-a14);
    color: inherit;
}

/* ---------- Module card ---------- */

.op-module__icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.op-module__icon img {
    width: 68%;
    height: 68%;
    object-fit: contain;
    flex: 0 0 auto;
}

.op-module__icon--lg {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-card);
}

.op-module__body { min-width: 0; flex: 1 1 auto; }

/* Two lines, then ellipsis — module blurbs vary in length and a ragged grid
   makes the progress bars stop lining up. */
.op-module__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.op-module__pct {
    flex: 0 0 auto;
    min-width: 34px;
    text-align: right;
    font-weight: 700;
    color: var(--accent);
}

.op-count-chip.mud-chip {
    height: 22px;
    margin: 0;
    background: var(--accent-soft);
    color: var(--accent-bright);
    font-size: 0.7rem;
    font-weight: 700;
}

/* ---------- Guidance panels ---------- */

.op-note {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}

.op-note--info {
    background: var(--cbg-60a5fa-a08);
    border-color: var(--cln-60a5fa-a28);
}

/* ---------- Tabs ---------- */

.op-module__tabs { border-bottom: 1px solid var(--border); }

.op-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 12px 18px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--faint);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease;
}

.op-tab:hover { color: var(--muted); }

.op-tab--active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.op-tab__count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    margin-left: 7px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-bright);
    font-size: 0.66rem;
}

/* Cards in these grids must all reach the row's height. `h-100` cannot do it: the
   MudGrid item's height comes from flex stretching, which is indefinite for percentage
   resolution, so height:100% is ignored. Making the item itself a flex container and
   letting the card grow is the reliable form. */
.op-card-grid > .mud-grid-item {
    display: flex;
}

.op-card-grid > .mud-grid-item > .mud-paper {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---------- Sign tile ---------- */

.op-sign {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-card);
}

.op-sign--learned { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.op-sign__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.op-sign__code {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--muted);
}

/* A fixed box so tiles line up regardless of how tall each sign artwork is.
   Flex with an explicit height on the image, not grid with max-height: a grid row
   left to size itself is an *indefinite* height, so a percentage max-height against
   it is ignored and every sign renders at its natural size. */
.op-sign__art {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 104px;
    margin: 6px 0 10px;
}

.op-sign__art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.op-sign__name {
    flex: 1 1 auto;
    line-height: 1.35;
}

@media (max-width: 600px) {
    .op-sign {
        padding: 8px 6px !important;
        border-radius: 12px;
    }
    .op-sign__top {
        gap: 2px;
    }
    .op-sign__code {
        font-size: 0.68rem;
    }
    .op-sign__top .mud-icon-button {
        padding: 2px;
        transform: scale(0.85);
    }
    .op-sign__art {
        height: 60px;
        margin: 4px 0 6px;
    }
    .op-sign__name {
        font-size: 0.72rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 1.8rem;
    }
    .op-sign .mud-button-root {
        font-size: 0.65rem !important;
        padding: 4px 2px !important;
        margin-top: 4px !important;
        border-radius: 6px;
        min-width: 0;
    }
}

/* ---------- Flashcard drill ---------- */

.op-flip-card__art {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 16px;
}

.op-flip-card__desc {
    max-height: 150px;
    overflow-y: auto;
}

/* ---------- Drawer foot ----------
   The nav scrolls; the progress cards stay pinned to the bottom of the drawer. */

/* One column, one scrollbar. The nav used to scroll inside itself with the cards
   pinned below it, so on a short viewport the list silently started part-way down and
   the first destinations were simply not on screen. Now the whole drawer is the single
   scroll region: it always starts at "Bosh sahifa", and `margin-top: auto` on the foot
   keeps the cards at the bottom whenever there is room to spare. */
/* The drawer itself never scrolls — the link list does, inside its own box, with the
   progress cards pinned below it. Scrolling the whole drawer instead looked simpler but
   broke: `margin-top: auto` on the foot of an overflowing flex column pushes the first
   items into overflow *above* the scroll origin, where no amount of scrolling reaches
   them. That is why "Bosh sahifa" and "Darslik" disappeared on a short window. */
.op-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding-top: 8px;
}

.op-drawer__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 10px 24px !important;
}

.op-drawer .mud-nav-link {
    min-height: 36px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 0.87rem;
}

.op-drawer .mud-nav-link .mud-icon-root {
    font-size: 1.15rem;
}

/* Group labels are signposts, not rows — they get the minimum that still reads. */
.op-drawer .mud-typography-overline {
    display: block;
    padding: 8px 14px 2px !important;
    font-size: 0.62rem;
    line-height: 1.15;
}

.op-drawer .mud-divider {
    margin: 4px 0 !important;
}

.op-drawer__foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 4px 12px;
}

/* A grid item's automatic minimum size is its min-content width, so the resume card
   refused to shrink and pushed the drawer 13px wider than its own box — which is the
   horizontal scrollbar under the sidebar. */
.op-drawer__foot > * {
    min-width: 0;
}

.op-progress-card {
    position: relative;
    overflow: hidden;
    padding: 12px 14px 14px;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface-2);
}

.op-progress-card__label {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

/* The unfilled track. MudProgressCircular draws only the filled arc, so at 0% there was
   nothing on screen at all — no ring, just the number. Geometry matches MudBlazor's SVG:
   viewBox 22 22 44 44 with r=20 and stroke-width 4, scaled to 72px, so the circle is
   inset ~3px and reads ~6px thick. */

.op-progress-card__value {
    position: absolute;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--accent);
}

/* Wide enough to cross in front of the ring's lower-right, which is the depth cue the
   reference design uses — the car is the nearest thing, the ring passes behind it. */
.op-progress-card__car {
    position: absolute;
    z-index: 2;
    right: -18px;
    bottom: -2px;
    width: 68%;
    pointer-events: none;
}

.op-resume-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface-2);
}

/* Two lines rather than one clipped line: on a 267px drawer a nowrap title swallowed
   the "1/5" count that follows it, which is the only number on the card. */
.op-resume-card__title {
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.op-resume-card__count {
    color: var(--accent);
    font-weight: 700;
    margin-left: 6px;
    white-space: nowrap;
}

/* MudDrawer wraps its children in .mud-drawer-content; the foot can only pin if that
   wrapper is itself a full-height flex column. */
.mud-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Language pill: the code carries the meaning now that the flag emoji is gone. */
.op-lang-code {
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.op-lang-code--menu {
    min-width: 34px;
    color: var(--accent);
}

/* =============================================================================
   Darslik — the course map
   -----------------------------------------------------------------------------
   A progress header (overall ring, "continue", and a small road on which the car sits at your
   overall percentage) over a grid of module cards. Every card carries its own progress, state
   and action; locked ones are muted and cannot be opened. No painted sky, no stretched road
   behind the cards: the page reads the same on a light or a dark theme because every colour is
   a theme token, and the module's own colour only ever tints.
   ========================================================================== */

@keyframes op-dl-in    { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes op-dl-drive { from { left: 28px; } }
@keyframes op-dl-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mc) 60%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* ---------- Header ---------- */

.op-dl-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px 36px;
    padding: 30px 34px 84px;
    margin-bottom: 26px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background:
        radial-gradient(70% 130% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%),
        var(--surface);
    animation: op-dl-in .45s ease both;
}

.op-dl-hero__eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.op-dl-hero__title {
    margin: 6px 0 8px;
    font-family: var(--font-display, inherit);
    font-size: clamp(1.9rem, 4.2vw, 2.7rem);
    font-weight: 900;
    line-height: 1.05;
    color: var(--text);
}

.op-dl-hero__lead { margin: 0; max-width: 54ch; font-size: .98rem; line-height: 1.55; color: var(--muted); }

.op-dl-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }

.op-dl-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    font: inherit;
    font-size: .98rem;
    font-weight: 800;
    cursor: pointer;
    color: var(--cfg-04231a, #04231a);
    background: var(--accent);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
    transition: transform .15s ease, filter .15s ease;
}

html.light-theme .op-dl-cta { color: #fff; }
.op-dl-cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.op-dl-cta .mud-icon-root { transition: transform .15s ease; }
.op-dl-cta:hover .mud-icon-root { transform: translateX(3px); }

.op-dl-hero__next { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 600; color: var(--muted); }

/* The overall ring. */
.op-dl-ring {
    width: 124px;
    height: 124px;
    box-sizing: border-box;
    padding: 11px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p) * 1%), color-mix(in srgb, var(--text) 10%, transparent) 0);
}

.op-dl-ring__in {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 50%;
    background: var(--surface);
}

.op-dl-ring__pct { font-size: 1.7rem; font-weight: 900; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.op-dl-ring__sub { margin-top: 5px; font-size: .68rem; font-weight: 600; color: var(--muted); }

/* ---------- The route: a road down the page, one station per module ---------- */

.op-dl-hero { padding-bottom: 30px; }

.op-rt {
    --rail: color-mix(in srgb, var(--text) 14%, transparent);
    --node: 76px;
    list-style: none;
    margin: 0 auto;
    padding: 6px 0 0;
    max-width: 980px;
}

.op-rt-stop {
    --mc: var(--accent);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--node) minmax(0, 1fr);
    align-items: center;
    column-gap: 30px;
    padding: 18px 0;
    animation: op-dl-in .45s ease both;
    animation-delay: calc(var(--i, 0) * 60ms);
}

/* The road itself: each stop draws the half above and the half below its station, so every
   stretch is coloured by the stations it joins. Solid and accent = driven; dashed = still ahead. */
.op-rt-stop::before,
.op-rt-stop::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 12px;
    margin-left: -6px;
    background-color: var(--rail);
    background-image: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--surface) 80%, transparent) 0 8px, transparent 8px 18px);
    background-size: 2px 100%;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.op-rt-stop::before { top: 0; height: 50%; }
.op-rt-stop::after  { top: 50%; bottom: 0; }
.op-rt-stop:first-child::before { display: none; }
.op-rt-stop--finish::after { display: none; }

.op-rt-stop--done::after,
.op-rt-stop--done + .op-rt-stop::before { background-color: var(--accent); }

.op-rt-stop__node { grid-column: 2; grid-row: 1; display: grid; place-items: center; position: relative; z-index: 1; }

.op-rt-node {
    position: relative;
    width: var(--node);
    height: var(--node);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mc);
    border: 5px solid var(--bg, var(--surface));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 45%, transparent), 0 14px 24px -10px color-mix(in srgb, var(--mc) 80%, transparent);
}

.op-rt-node img { width: 50%; height: 50%; object-fit: contain; }

.op-rt-node__tag {
    position: absolute;
    right: -8px;
    bottom: -6px;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    font-size: .78rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    background: var(--surface);
    border: 2px solid color-mix(in srgb, var(--mc) 70%, var(--surface));
    border-radius: 999px;
}

.op-rt-node__tag .mud-icon-root { font-size: 1rem !important; }
.op-rt-stop--done .op-rt-node__tag { color: #04231a; background: var(--accent); border-color: var(--accent); }

.op-rt-stop--active .op-rt-node { animation: op-rt-ping 2s ease-out infinite; }
@keyframes op-rt-ping {
    0%   { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 45%, transparent), 0 0 0 3px color-mix(in srgb, var(--mc) 55%, transparent); }
    100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 45%, transparent), 0 0 0 20px transparent; }
}

.op-rt-stop--locked { --mc: var(--faint); }
.op-rt-stop--locked .op-rt-node { box-shadow: none; filter: grayscale(.5); opacity: .8; }

/* ---------- The station board (the card) ---------- */

.op-rt-card {
    position: relative;
    grid-row: 1;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px 18px 14px;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 12%, var(--surface)), var(--surface) 60%);
    box-shadow: 0 1px 2px rgba(2, 6, 23, .12), 0 16px 30px -22px rgba(2, 6, 23, .65);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

html.light-theme .op-rt-card { box-shadow: 0 1px 2px rgba(30, 41, 59, .06), 0 16px 30px -22px rgba(30, 41, 59, .4); }

/* The little spur that joins the board to its station. */
.op-rt-card::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30px;
    height: 4px;
    margin-top: -2px;
    background: color-mix(in srgb, var(--mc) 70%, transparent);
}

.op-rt-card:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--mc) 65%, var(--border));
    box-shadow: 0 2px 4px rgba(2, 6, 23, .14), 0 22px 36px -20px color-mix(in srgb, var(--mc) 55%, rgba(2, 6, 23, .5));
}

.op-rt-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--mc) 70%, transparent); outline-offset: 2px; }

.op-rt-stop--left  .op-rt-card { grid-column: 1; text-align: right; }
.op-rt-stop--left  .op-rt-card::after { right: -30px; }
.op-rt-stop--left  .op-rt-stop__aside { grid-column: 3; justify-self: start; }
.op-rt-stop--right .op-rt-card { grid-column: 3; text-align: left; }
.op-rt-stop--right .op-rt-card::after { left: -30px; }
.op-rt-stop--right .op-rt-stop__aside { grid-column: 1; justify-self: end; }

.op-rt-stop__aside { grid-row: 1; }

.op-rt-card__station { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--mc) 65%, var(--text)); }
.op-rt-card__title { font-size: 1.12rem; font-weight: 800; line-height: 1.25; color: var(--text); }
.op-rt-card__sub { font-size: .84rem; line-height: 1.4; color: var(--muted); }

.op-rt-card__meter { display: grid; gap: 6px; margin-top: 4px; }
.op-rt-card__bar { height: 8px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.op-rt-card__bar i { display: block; height: 100%; border-radius: inherit; background: var(--mc); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.op-rt-card__count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.op-rt-card__count b { color: var(--text); }

.op-rt-card__go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: .88rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--mc) 70%, var(--text));
}

.op-rt-stop--left .op-rt-card__go { justify-self: end; }
.op-rt-card__go .mud-icon-root { font-size: 1.1rem !important; transition: transform .18s ease; }
.op-rt-card:hover:not(:disabled) .op-rt-card__go .mud-icon-root { transform: translateX(3px); }

.op-rt-stop--active .op-rt-card {
    border-color: color-mix(in srgb, var(--mc) 70%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 22%, transparent), 0 20px 36px -22px color-mix(in srgb, var(--mc) 60%, rgba(2, 6, 23, .5));
}

.op-rt-stop--locked .op-rt-card { cursor: not-allowed; box-shadow: none; background: color-mix(in srgb, var(--text) 4%, var(--surface)); }
.op-rt-stop--locked .op-rt-card__title { color: var(--muted); }
.op-rt-stop--locked .op-rt-card__go { color: var(--faint); }
.op-rt-stop--locked .op-rt-card::after { background: var(--rail); }

/* ---------- The empty side: the car, or a milestone ---------- */

.op-rt-here { display: grid; justify-items: center; gap: 2px; font-size: .78rem; font-weight: 800; color: var(--accent); }
.op-rt-here img { width: 84px; filter: drop-shadow(0 8px 8px rgba(2, 6, 23, .35)); animation: op-rt-idle 2.4s ease-in-out infinite; }
@keyframes op-rt-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.op-rt-mile {
    padding: 4px 12px;
    font-size: .8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    border: 1px dashed color-mix(in srgb, var(--text) 25%, transparent);
    border-radius: 999px;
}

.op-rt-stop--done .op-rt-mile { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* ---------- Finish ---------- */

.op-rt-node--finish { --mc: var(--surface); color: var(--muted); background: var(--surface); box-shadow: 0 0 0 3px var(--border); }

.op-rt-finish { grid-column: 3; grid-row: 1; display: grid; gap: 2px; font-size: .86rem; color: var(--muted); }
.op-rt-finish strong { font-size: 1.05rem; font-weight: 900; color: var(--text); }

/* ---------- Narrow screens: the road moves to the left edge ---------- */

@media (max-width: 720px) {
    .op-dl-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px 24px; border-radius: 22px; }

    /* The ring tucks into the corner beside the title instead of taking a row of its own. */
    .op-dl-ring { position: absolute; top: 18px; right: 18px; width: 72px; height: 72px; padding: 7px; }
    .op-dl-ring__pct { font-size: 1.05rem; }
    .op-dl-ring__sub { display: none; }
    .op-dl-hero__title { padding-right: 84px; }
    .op-dl-hero__lead { font-size: .9rem; }

    .op-rt { --node: 56px; }

    .op-rt-stop { grid-template-columns: var(--node) minmax(0, 1fr); column-gap: 22px; padding: 12px 0; }
    .op-rt-stop::before, .op-rt-stop::after { left: calc(var(--node) / 2); }
    .op-rt-stop__node { grid-column: 1; }
    .op-rt-stop--left .op-rt-card, .op-rt-stop--right .op-rt-card { grid-column: 2; text-align: left; }
    .op-rt-stop--left .op-rt-card::after, .op-rt-stop--right .op-rt-card::after { left: -22px; right: auto; width: 22px; }
    .op-rt-stop--left .op-rt-card__go { justify-self: start; }
    .op-rt-stop__aside { display: none; }
    .op-rt-finish { grid-column: 2; }
    .op-rt-node__tag { right: -6px; bottom: -4px; min-width: 22px; height: 22px; font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .op-dl-hero, .op-rt-stop, .op-rt-stop--active .op-rt-node, .op-rt-here img { animation: none; }
    .op-rt-card__bar i, .op-rt-card, .op-dl-cta { transition: none; }
}

/* =============================================================================
   Darslik — the lessons inside one module
   ========================================================================== */

.op-modhead {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 24px 28px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--module-color);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--module-color) 12%, transparent), transparent 55%),
        var(--surface);
}

.op-modhead__text { min-width: 0; flex: 1 1 auto; }
.op-modhead__bar { flex: 1 1 160px; max-width: 260px; }

.op-modhead__count {
    color: var(--muted);
    white-space: nowrap;
}

.op-modhead__art {
    flex: 0 0 auto;
    width: clamp(180px, 24vw, 300px);
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: var(--radius-card);
}

@media (max-width: 900px) {
    .op-modhead { padding: 20px; }
    .op-modhead__art { display: none; }
}

/* ---------- Lesson timeline ---------- */

.op-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.op-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 14px;
}

/* The dashed rail between the numbers. Drawn on the item rather than as a separate
   element so it stops naturally at the last row. */
.op-timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: -14px;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom, var(--border-strong) 0 5px, transparent 5px 10px);
}

.op-timeline__no {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--surface-2);
    border: 2px solid var(--border-strong);
    color: var(--muted);
    z-index: 1;
}

.op-timeline__item--active .op-timeline__no {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--cfg-04231a);
}

.op-timeline__item--done .op-timeline__no {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.op-timeline__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.op-timeline__row:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--surface-2);
    transform: translateX(3px);
}

.op-timeline__row:disabled {
    cursor: not-allowed;
    color: var(--faint);
}

.op-timeline__title {
    min-width: 0;
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.op-timeline__meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--faint);
}

.op-pill {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.op-pill--active { background: var(--accent-soft); color: var(--accent-bright); }
.op-pill--done   { background: var(--accent); color: var(--cfg-04231a); }
.op-pill--count  { background: var(--cbg-60a5fa-a16); color: var(--cfg-93c5fd); }

/* On the light theme the accent is orange, and the dark ink the dark theme puts on emerald is
   unreadable on it: the badge and the active step number take white instead. */
html.light-theme .op-pill--done,
html.light-theme .op-timeline__item--active .op-timeline__no { color: #fff; }
html.light-theme .op-pill--active { color: #C2410C; }
html.light-theme .op-pill--count { color: #1D4ED8; }

@media (max-width: 600px) {
    .op-timeline__meta .op-pill--count { display: none; }
}

/* =============================================================================
   Darslik — lesson detail
   ========================================================================== */

/* Header Controls */

/* Reuses .op-tab from the road-sign module page; only the icon spacing differs. */

/* ---------- Sign strip in the right rail ---------- */

/* ---------- Fact list ---------- */

.op-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    margin: 0;
    font-size: 0.84rem;
}

.op-facts dt {
    color: var(--cfg-b0b4bc);
    white-space: nowrap;
}

.op-facts dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Inline lesson practice ---------- */

/* ==========================================
   BILETLAR (TICKETS) PAGE STYLES
   ========================================== */

.op-tickets-hero {
    position: relative;
    background: linear-gradient(135deg, var(--cbg-010912) 0%, var(--cbg-08111a) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    overflow: hidden;
}

/* The artwork is a sibling that comes after the copy in the markup, so without this it
   paints straight over the heading. */
.op-tickets-hero > *:not(.op-tickets-hero__art) {
    position: relative;
    z-index: 1;
}

.op-tickets-hero__art {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    height: 130%;
    pointer-events: none;
    opacity: 0.9;
}

/* On a phone the art fills the whole banner and the heading is unreadable on top of it,
   so it retreats to the right-hand side and dims. */
@media (max-width: 700px) {
    .op-tickets-hero { padding: 22px 20px; }

    .op-tickets-hero__art {
        right: -40px;
        height: 100%;
        max-width: 62%;
        object-fit: contain;
        opacity: 0.28;
    }
}

.op-stat-card {
    background: var(--cbg-0a1a22);
    border: 1px solid var(--cln-192532);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
}

.op-stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.op-stat-card__icon--green  { background: var(--cbg-063d2f); color: var(--cfg-19d69c); }
.op-stat-card__icon--blue   { background: var(--cbg-0b3152); color: var(--cfg-3e87d0); }
.op-stat-card__icon--gold   { background: var(--cbg-4a2e0a); color: var(--cfg-f59b00); }
.op-stat-card__icon--purple { background: var(--cbg-28174d); color: var(--cfg-9b6fe8); }

.op-filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--cbg-0a141e);
    border: 1px solid var(--cln-1d2a35);
    color: var(--cfg-b0b4bc);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.op-filter-chip:hover {
    border-color: var(--cln-263442);
    color: var(--cfg-f7f7f7);
}

.op-filter-chip--active {
    background: var(--cbg-063d2f);
    border: 1px solid var(--cln-087a5b);
    color: var(--cfg-19d69c);
    font-weight: 600;
}

/* ---------- Biletlar: the ticket cards ----------
   A plain rounded card: the ticket number in a tinted tile, the state under its name, one
   progress bar, one button. Green = passed, amber = in progress, grey = not started. */

.op-tkgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

@keyframes op-tk-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.op-tk {
    --tc: var(--muted);
    --tk-on: var(--surface);
    position: relative;
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(2, 6, 23, .18), 0 10px 24px -14px rgba(2, 6, 23, .6);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: op-tk-in .4s ease both;
}

html.light-theme .op-tk { box-shadow: 0 1px 2px rgba(30, 41, 59, .06), 0 12px 26px -16px rgba(30, 41, 59, .28); }

/* Semantic colours, not the theme accent: done is always green, in progress always amber. */
.op-tk--done     { --tc: #10B981; --tk-on: #04231A; }
.op-tk--progress { --tc: #F59E0B; --tk-on: #2A1500; }
html.light-theme .op-tk--done { --tc: #15A34A; --tk-on: #FFFFFF; }
html.light-theme .op-tk--progress { --tc: #E8890C; }

.op-tk:nth-child(2) { animation-delay: .04s; }
.op-tk:nth-child(3) { animation-delay: .08s; }
.op-tk:nth-child(4) { animation-delay: .12s; }
.op-tk:nth-child(5) { animation-delay: .16s; }
.op-tk:nth-child(6) { animation-delay: .2s; }
.op-tk:nth-child(n+7) { animation-delay: .24s; }

.op-tk:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--tc) 55%, var(--border));
    box-shadow: 0 2px 4px rgba(2, 6, 23, .2), 0 18px 32px -16px color-mix(in srgb, var(--tc) 45%, rgba(2, 6, 23, .6));
}

.op-tk__top { display: flex; align-items: center; gap: 12px; }

.op-tk__badge {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--tc);
    background: color-mix(in srgb, var(--tc) 15%, transparent);
    border-radius: 16px;
}

.op-tk--todo .op-tk__badge { color: var(--muted); background: color-mix(in srgb, var(--text) 8%, transparent); }

.op-tk__title { min-width: 0; flex: 1 1 auto; display: grid; gap: 3px; }
.op-tk__title strong { font-size: 1.05rem; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.op-tk__state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--tc);
    line-height: 1.25;
}

.op-tk--todo .op-tk__state { color: var(--faint); }
.op-tk__state .mud-icon-root { font-size: 1rem !important; flex: 0 0 auto; }

.op-tk__mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    color: var(--faint);
    background: transparent;
    border: 0;
    border-radius: 10px;
    transition: color .15s ease, background .15s ease;
}

.op-tk__mark:hover, .op-tk__mark--on { color: #F59E0B; background: color-mix(in srgb, #F59E0B 15%, transparent); }

.op-tk__meter { display: grid; gap: 8px; }

.op-tk__meter-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .84rem; color: var(--muted); }
.op-tk__meter-row strong { font-size: 1.15rem; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.op-tk__pct { font-size: 1rem; font-weight: 900; color: var(--tc); font-variant-numeric: tabular-nums; }

.op-tk__bar { height: 9px; overflow: hidden; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text) 9%, transparent); }
.op-tk__bar i { display: block; height: 100%; border-radius: inherit; background: var(--tc); transition: width .8s cubic-bezier(.2, .8, .2, 1); }

.op-tk__go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font: inherit;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    color: var(--tc);
    background: color-mix(in srgb, var(--tc) 13%, transparent);
    border: 0;
    border-radius: 13px;
    transition: background .18s ease, color .18s ease;
}

.op-tk__go .mud-icon-root { transition: transform .18s ease; }
.op-tk:hover .op-tk__go, .op-tk__go:focus-visible { background: var(--tc); color: var(--tk-on); }
.op-tk:hover .op-tk__go .mud-icon-root { transform: translateX(3px); }
.op-tk--todo .op-tk__go { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.op-tk--todo:hover .op-tk__go { background: var(--text); color: var(--surface); }

@media (max-width: 600px) {
    .op-tkgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .op-tk { padding: 12px; gap: 12px; border-radius: 16px; }
    .op-tk__top { flex-wrap: wrap; gap: 8px; }
    .op-tk__badge { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 13px; }
    .op-tk__mark { margin-left: auto; width: 30px; height: 30px; }
    .op-tk__title { order: 3; flex: 1 0 100%; }
    .op-tk__title strong { font-size: .95rem; }
    .op-tk__state { font-size: .72rem; }
    .op-tk__go { height: 38px; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .op-tk, .op-tk__go, .op-tk__bar i { animation: none; transition: none; }
}


.op-ticket-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.op-ticket-badge--done { background: var(--cbg-063d2f); color: var(--cfg-19d69c); border: 1px solid var(--cln-19d69c-a3); }
.op-ticket-badge--progress { background: var(--cbg-4a2e0a); color: var(--cfg-f59b00); border: 1px solid var(--cln-f59b00-a3); }
.op-ticket-badge--unstarted { background: var(--cbg-18212a); color: var(--cfg-737a84); border: 1px solid var(--cln-192532); }

.op-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 10px;
    background: var(--cbg-0a141e);
    border: 1px solid var(--cln-192532);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.op-action-item:hover {
    border-color: var(--cln-263442);
    background: var(--cbg-0f1924);
}

.op-action-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

/* ==========================================
   SIDEBAR PROGRESS & RESUME CARDS
   ========================================== */

.op-drawer__foot {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.op-progress-card {
    position: relative;
    background: var(--cbg-0a1a22);
    border: 1px solid var(--cln-192532);
    border-radius: 16px;
    padding: 16px;
    overflow: hidden;
}

.op-progress-card__label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--cfg-b0b4bc);
    margin-bottom: 12px;
}

.op-progress-card__body {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 84px;
}

.op-progress-card__ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    z-index: 1;
}

.op-progress-card__svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.op-progress-card__value {
    position: absolute;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cfg-19d69c);
}

.op-progress-card__car {
    position: absolute;
    right: -16px;
    bottom: -6px;
    width: 155px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    z-index: 2; /* Car overlaps the right edge of the donut progress ring! */
}

/* Resume Card */
.op-resume-card {
    background: var(--cbg-0a1a22);
    border: 1px solid var(--cln-192532);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.op-resume-card:hover {
    border-color: var(--cln-263442);
    background: var(--cbg-0f1924);
}

.op-resume-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.op-resume-card__label {
    font-size: 0.8rem;
    color: var(--cfg-b0b4bc);
}

.op-resume-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cfg-f7f7f7);
}

.op-resume-card__count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cfg-19d69c);
    margin-top: 2px;
}

.op-resume-card__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cbg-19d69c);
    color: var(--cfg-03100d);
    border: none;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.op-resume-card:hover .op-resume-card__btn {
    transform: scale(1.06);
    background: var(--cbg-25e4a8);
}

/* ==========================================
   HEADER APP BAR CONTROLS STYLES
   ========================================== */

.mud-appbar {
    background-color: var(--cbg-010912) !important;
    border-bottom: 1px solid var(--cln-192532) !important;
    box-shadow: none !important;
}

/* Streak Badge (🔥 1 kun) */

/* Countdown Chip (⏳ X kun qoldi) */
.op-countdown {
    background: var(--cbg-0b3152) !important;
    border: 1px solid var(--cln-1e5180) !important;
    color: var(--cfg-3e87d0) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Level/Category Chip (Toifa: B) */
.op-level-chip {
    background: var(--cbg-063d2f) !important;
    border: 1px solid var(--cln-087a5b) !important;
    color: var(--cfg-19d69c) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Language Selector Button (🌐 UZB) */
.op-lang-button {
    background: var(--cbg-0a141e) !important;
    border: 1px solid var(--cln-192532) !important;
    border-radius: 20px !important;
    color: var(--cfg-b0b4bc) !important;
    padding: 4px 12px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease !important;
}

.op-lang-button:hover {
    border-color: var(--cln-263442) !important;
    color: var(--cfg-f7f7f7) !important;
    background: var(--cbg-0f1924) !important;
}

.op-lang-code {
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ==========================================
   DRAWER / SIDEBAR NAVIGATION STYLES
   ========================================== */

.op-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--cbg-010912);
}

.op-drawer__nav {
    padding: 12px 8px;
    flex-grow: 1;
    overflow-y: auto;
}

/* MudNavLink Active & Hover styling matching screenshot */
.mud-nav-link {
    border-radius: 12px !important;
    margin-bottom: 4px !important;
    padding: 10px 14px !important;
    color: var(--cfg-b0b4bc) !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
}

.mud-nav-link:hover:not(.active) {
    background-color: var(--cbg-09131c) !important;
    color: var(--cfg-f7f7f7) !important;
}

.mud-nav-link.active {
    background-color: var(--cbg-063d2f) !important;
    border: 1px solid var(--cln-087a5b) !important;
    color: var(--cfg-19d69c) !important;
    font-weight: 600 !important;
}

.mud-nav-link.active .mud-nav-link-icon {
    color: var(--cfg-19d69c) !important;
}

.mud-nav-link-icon {
    color: var(--cfg-737a84) !important;
    margin-right: 12px !important;
    transition: color 0.15s ease !important;
}

.mud-nav-link:hover .mud-nav-link-icon {
    color: var(--cfg-f7f7f7) !important;
}

/* ==========================================
   USER PROFILE PAGE STYLES (MATCHING MOCKUP)
   ========================================== */

.op-prof-header {
    margin-bottom: 20px;
}

.op-prof-breadcrumb {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.op-prof-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    line-height: 1;
}

/* User Card Initials Badge */
.op-prof-avatar-badge {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--cbg-063d2f) 0%, var(--cbg-0f2e25) 100%);
    border: 2px solid var(--accent);
    color: var(--accent-bright);
    font-weight: 800;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: 0 6px 20px var(--csh-19d69c-a15);
    flex-shrink: 0;
}

.op-prof-status-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--surface);
    box-shadow: 0 0 10px var(--accent);
}

.op-prof-status-chip {
    background: var(--cbg-19d69c-a15);
    color: var(--accent);
    border: 1px solid var(--cln-19d69c-a35);
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
}

/* Quick Stat Strip Tile */
.op-prof-stat-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.op-prof-stat-tile:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.op-prof-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.op-prof-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.op-prof-stat-lbl {
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 500;
}

/* Readiness Banner */

/* Progress bar inside readiness card */
.op-prof-bar-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--cbg-11222e);
    overflow: hidden;
    margin: 12px 0;
}

.op-prof-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cbg-10b981), var(--cbg-25e4a8));
    transition: width 0.6s ease;
}

/* 5-Month Calendar Grid Styles */
.op-github-heatmap-wrapper {
    background: var(--cbg-081521-a65);
    border: 1px solid var(--cln-ffffff-a07);
    border-radius: var(--radius-card);
    padding: 20px;
}

.op-5months-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

@media (max-width: 1200px) {
    .op-5months-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

.op-month-card {
    background: var(--cbg-081521-a7);
    border: 1px solid var(--cln-ffffff-a08);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.op-month-card.is-current-month {
    border-color: var(--cln-02c076-a5);
    background: var(--cbg-02c076-a06);
    box-shadow: 0 0 16px var(--csh-02c076-a15);
}

.op-month-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.op-month-card__sub {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cfg-67727a);
}

.is-current-month .op-month-card__sub {
    color: var(--cfg-02c076);
}

.op-month-card__title {
    font-size: 0.95rem;
    color: var(--cfg-e6edf0);
}

.is-current-month .op-month-card__title {
    color: var(--cfg-02c076);
}

.op-month-card__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--cfg-67727a);
    user-select: none;
}

.op-month-card__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.op-month-cell {
    aspect-ratio: 1;
    border-radius: 5px;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.op-month-cell:hover:not(.is-empty) {
    transform: scale(1.3);
    z-index: 5;
}

.op-month-cell.is-empty {
    background: transparent;
    cursor: default;
}

.op-month-cell.level-0 {
    background: var(--cbg-ffffff-a04);
    color: var(--cfg-67727a);
    border: 1px solid var(--cln-ffffff-a03);
}

.op-month-cell.level-1 {
    background: var(--cbg-02c076-a25);
    color: var(--cfg-a3f3d3);
    border: 1px solid var(--cln-02c076-a35);
}

.op-month-cell.level-2 {
    background: var(--cbg-02c076-a55);
    color: var(--cfg-ffffff);
    border: 1px solid var(--cln-02c076-a7);
}

.op-month-cell.level-3 {
    background: var(--cbg-02c076-a85);
    color: var(--cfg-010811);
    font-weight: 800;
    box-shadow: 0 0 6px var(--csh-02c076-a4);
}

.op-month-cell.level-4 {
    background: var(--cbg-02c076);
    color: var(--cfg-010811);
    font-weight: 900;
    box-shadow: 0 0 10px var(--csh-02c076-a8);
}

.op-month-cell.is-today {
    border: 2px solid var(--cln-f5ad05) !important;
    box-shadow: 0 0 8px var(--csh-f5ad05-a6) !important;
}

.op-heatmap-legend-box {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    display: inline-block;
}
.op-heatmap-legend-box.level-0 { background: var(--cbg-ffffff-a08); }
.op-heatmap-legend-box.level-1 { background: var(--cbg-02c076-a25); }
.op-heatmap-legend-box.level-2 { background: var(--cbg-02c076-a52); }
.op-heatmap-legend-box.level-3 { background: var(--cbg-02c076-a82); }
.op-heatmap-legend-box.level-4 { background: var(--cbg-02c076); }

.op-prof-readiness-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--cbg-02c076-a12);
    border: 1px solid var(--cln-02c076-a25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.op-prof-countdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--cbg-ffffff-a04);
    border: 1px solid var(--cln-ffffff-a08);
    font-size: 0.82rem;
    color: var(--text-primary);
}

.op-prof-readiness-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.op-prof-readiness-score__val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--cfg-02c076);
    line-height: 1;
}
.op-prof-readiness-score__lbl {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
}

/* Action Cards (Darslar, Belgilar, Xatolar, Saqlanganlar) */
.op-prof-action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 22px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.op-prof-action-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.op-prof-action-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    font-size: 1.25rem;
}

.op-prof-action-card__btn {
    margin-top: auto;
    width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border-strong);
    background: var(--cbg-ffffff-a03);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.18s ease;
}

.op-prof-action-card__btn:hover {
    background: var(--cbg-ffffff-a08);
    border-color: var(--accent);
    color: var(--accent);
}

/* Donut & Analytics styling */
.op-prof-donut-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.op-prof-donut-center {
    position: absolute;
    text-align: center;
}

.op-prof-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    margin-bottom: 8px;
}

.op-prof-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Skill progress bars */
.op-prof-skill-row {
    margin-bottom: 14px;
}

.op-prof-skill-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.op-prof-skill-track {
    height: 7px;
    border-radius: 999px;
    background: var(--cbg-11222e);
    overflow: hidden;
}

.op-prof-skill-fill-green {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cbg-10b981), var(--cbg-19d69c));
}

.op-prof-skill-fill-red {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cbg-ef4444), var(--cbg-f87171));
}

/* Activity timeline */
.op-prof-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cln-ffffff-a05);
}

.op-prof-timeline-item:last-child {
    border-bottom: none;
}

.op-prof-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

@media (max-width: 960px) {
    .op-prof-title {
        font-size: 1.8rem;
    }
}

/* =============================================================================
   Home Dashboard Styles (Matching User Design Mockup)
   ========================================================================== */

.op-home-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 36px;
    border-radius: var(--radius-card);
    background: radial-gradient(circle at 80% 50%, var(--cbg-02c076-a15) 0%, transparent 60%), var(--cbg-081521);
    border: 1px solid var(--cln-1a2a35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 260px;
}

/* The page ground (body) shows through the main content on every route. */
.mud-main-content {
    background: transparent;
    position: relative;
    z-index: 1;
}

/* The drawer is slightly translucent over the page ground. The nav links are
   transparent until hovered, so their own accent tinting is untouched. */
.mud-drawer {
    background: var(--cbg-081521-a74) !important;
}

/* Home page panels: translucent over the dark ground, no backdrop-filter. */
.op-home-hero,
.op-home-stat-card,
.op-home-feature-card,
.op-home-tool-card,
.op-home-goal-card {
    background: var(--cbg-081521-a72);
}

/* The hero's content has to out-stack its own panel background. */
.op-home-hero__content,
.op-home-hero__visual {
    position: relative;
    z-index: 1;
}

.op-home-hero__welcome {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cfg-02c076);
    margin-bottom: 4px;
}

.op-home-hero__name {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--cfg-e6edf0);
    margin-bottom: 12px;
}

.op-home-level-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--cbg-02c076-a15);
    border: 1px solid var(--cln-02c076-a3);
    color: var(--cfg-02c076);
    font-size: 0.8rem;
    font-weight: 600;
}

.op-home-hero-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--cbg-0d1f2b);
    border: 1px solid var(--cln-1a2a35);
    border-radius: 12px;
}

.op-home-hero-badge__icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.op-home-hero-badge__val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cfg-e6edf0);
    line-height: 1.1;
}

.op-home-hero-badge__lbl {
    font-size: 0.7rem;
    color: var(--cfg-97abb6);
}

.op-home-hero__btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--cbg-02c076);
    color: var(--cfg-010811);
    font-weight: 700;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.op-home-hero__btn:hover {
    transform: translateY(-2px);
    background: var(--cbg-05e08b);
}

.op-home-hero__subtext {
    font-size: 0.78rem;
    color: var(--cfg-97abb6);
}

.op-home-hero__visual {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.op-home-hero__ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.op-home-hero__ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.op-home-hero__ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.op-home-hero__ring-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--cfg-e6edf0);
    line-height: 1;
}

.op-home-hero__ring-lbl {
    font-size: 0.72rem;
    color: var(--cfg-97abb6);
}

@media (max-width: 960px) {
    /* Stretch, not centre: centring shrank the text block to its own width and floated it
       in the middle, leaving an empty band beside left-aligned text. */
    .op-home-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
    }
    .op-home-hero__visual {
        margin-top: 20px;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Stat Cards */
.op-home-stat-card {
    /* Fill the grid cell, so a card whose label wraps doesn't stand taller than its row. */
    height: 100%;
    box-sizing: border-box;
    background: var(--cbg-081521);
    border: 1px solid var(--cln-1a2a35);
    border-radius: var(--radius-card);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.op-home-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--cln-02c076);
}

.op-home-stat-card__icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.op-home-stat-card__lbl {
    font-size: 0.74rem;
    color: var(--cfg-97abb6);
}

.op-home-stat-card__val {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--cfg-e6edf0);
    line-height: 1.2;
}

.op-home-stat-card__sub {
    font-size: 0.72rem;
    color: var(--cfg-67727a);
}

.op-home-stat-track {
    height: 4px;
    background: var(--cbg-1a2a35);
    border-radius: 999px;
    overflow: hidden;
}

.op-home-stat-fill {
    height: 100%;
    background: var(--cbg-02c076);
    border-radius: 999px;
}

/* Feature Action Cards */
.op-home-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--cfg-e6edf0);
}

.op-home-feature-card {
    background: var(--cbg-081521);
    border: 1px solid var(--cln-1a2a35);
    border-radius: var(--radius-card);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.op-home-feature-card:hover {
    transform: translateY(-4px);
}

.op-home-feature-card--green:hover { border-color: var(--cln-02c076); box-shadow: 0 10px 30px var(--csh-02c076-a15); }
.op-home-feature-card--blue:hover { border-color: var(--cln-088beb); box-shadow: 0 10px 30px var(--csh-088beb-a15); }
.op-home-feature-card--purple:hover { border-color: var(--cln-9b6fe8); box-shadow: 0 10px 30px var(--csh-9b6fe8-a15); }
.op-home-feature-card--gold:hover { border-color: var(--cln-f5ad05); box-shadow: 0 10px 30px var(--csh-f5ad05-a15); }

.op-home-feature-card__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cfg-e6edf0);
    margin-bottom: 4px;
}

.op-home-feature-card__sub {
    font-size: 0.8rem;
    color: var(--cfg-97abb6);
    line-height: 1.4;
    margin-bottom: 16px;
}

.op-home-feature-card__foot {
    font-size: 0.76rem;
    color: var(--cfg-67727a);
    font-weight: 600;
}

.op-home-feature-card__arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cfg-010811);
}

.op-home-feature-card__arrow--green { background: var(--cbg-02c076); }
.op-home-feature-card__arrow--blue { background: var(--cbg-088beb); }
.op-home-feature-card__arrow--purple { background: var(--cbg-9b6fe8); }
.op-home-feature-card__arrow--gold { background: var(--cbg-f5ad05); }

/* Goal Card */
.op-home-goal-card {
    background: var(--cbg-081521);
    border: 1px solid var(--cln-1a2a35);
    border-radius: var(--radius-card);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.op-home-goal-card__label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cfg-e6edf0);
}

.op-home-goal-track {
    height: 8px;
    background: var(--cbg-1a2a35);
    border-radius: 999px;
    overflow: hidden;
}

.op-home-goal-fill {
    height: 100%;
    background: var(--cbg-02c076);
    border-radius: 999px;
}

.op-home-goal-btn {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--cbg-02c076);
    color: var(--cfg-010811);
    font-size: 0.84rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.op-home-goal-btn:hover {
    transform: translateY(-2px);
    background: var(--cbg-05e08b);
}

/* Tool Cards */
.op-home-tool-card {
    background: var(--cbg-081521);
    border: 1px solid var(--cln-1a2a35);
    border-radius: var(--radius-card);
    padding: 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.op-home-tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--cln-02c076);
}

.op-home-tool-card__icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-bottom: 8px;
}

.op-home-tool-card__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--cfg-e6edf0);
    line-height: 1.2;
    margin-bottom: 4px;
}

.op-home-tool-card__sub {
    font-size: 0.72rem;
    color: var(--cfg-67727a);
}

/* Mobile Responsive Overrides for Dashboard Cards */
@media (max-width: 600px) {
    /* Feature Cards (Asosiy mashg'ulotlar - 2x2 grid) */
    .op-home-feature-card {
        padding: 12px 10px;
        border-radius: 14px;
        min-height: 135px;
    }
    .op-home-feature-card__title {
        font-size: 0.92rem;
        margin-bottom: 2px;
        line-height: 1.2;
    }
    .op-home-feature-card__sub {
        font-size: 0.68rem;
        margin-bottom: 6px;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .op-home-feature-card__foot {
        font-size: 0.65rem;
    }
    .op-home-feature-card__arrow {
        width: 22px;
        height: 22px;
    }

    /* Tool Cards (Tezkor vositalar - 3 side-by-side horizontally) */
    .op-home-tool-card {
        padding: 10px 6px;
        border-radius: 12px;
        text-align: center;
        align-items: center;
        justify-content: flex-start;
    }
    .op-home-tool-card__icon {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
    }
    .op-home-tool-card__title {
        font-size: 0.74rem;
        line-height: 1.2;
        margin-bottom: 2px;
        word-break: break-word;
    }
    .op-home-tool-card__sub {
        font-size: 0.65rem;
        line-height: 1.15;
    }

    /* Stat Cards (2x2 grid) */
    .op-home-stat-card {
        padding: 10px 8px;
        border-radius: 12px;
    }
    .op-home-stat-card__icon {
        width: 28px;
        height: 28px;
    }
    .op-home-stat-card__val {
        font-size: 1.05rem;
    }
    .op-home-stat-card__lbl {
        font-size: 0.68rem;
    }
    .op-home-stat-card__sub {
        font-size: 0.65rem;
    }
}

/* ---------- Link-aware text field (Manba) ---------- */

.op-linkfield__bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.op-linkprompt__text {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    word-break: break-word;
}

/* Links inside authored content. The underline is offset so it does not collide with the
   descenders in Uzbek Latin, which carries a lot of them. */
.op-inline-md a,
.op-lesson-content a {
    color: var(--accent-bright);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.op-inline-md a:hover,
.op-lesson-content a:hover {
    color: var(--accent);
    text-decoration-thickness: 2px;
}

/* An href that failed the scheme check renders as an anchor with no target. It must not
   look clickable, or the author will never notice the link was rejected. */
.op-inline-md a:not([href]),
.op-lesson-content a:not([href]),
.op-inline-md a[href=""],
.op-lesson-content a[href=""] {
    color: inherit;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* ---------- Rich text field (Izoh) ---------- */

.op-richfield__bar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.op-rt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

.op-rt-btn:hover { background: var(--cbg-ffffff-a07); color: var(--text); }
.op-rt-btn--on { background: var(--accent-soft); color: var(--accent); }
.op-rt-btn__label { padding-right: 2px; }

.op-rt-sep {
    width: 1px;
    height: 18px;
    margin: 0 4px;
    background: var(--border-strong);
}

.op-richfield__preview {
    position: relative;
    margin-top: 10px;
    padding: 16px 14px 10px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--cbg-ffffff-a02);
}

.op-richfield__preview-label {
    position: absolute;
    top: -9px;
    left: 12px;
    padding: 0 6px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
    background: var(--surface);
}

/* The preview reuses the lesson body styles, which are sized for a full page. */
.op-richfield__preview .op-lesson-content { font-size: 0.86rem; line-height: 1.6; }
.op-richfield__preview .op-lesson-content > :first-child { margin-top: 0; }
.op-richfield__preview .op-lesson-content > :last-child { margin-bottom: 0; }

/* ---------- Explanation, wherever a learner meets it ---------- */

/* Explanations sit inside alerts and dialogs, so the block margins a standalone article
   would want are trimmed back here. */
.op-explanation .op-lesson-content {
    font-size: 0.86rem;
    line-height: 1.6;
    max-width: none;
}

.op-explanation .op-lesson-content > :first-child { margin-top: 0; }
.op-explanation .op-lesson-content > :last-child { margin-bottom: 0; }

.op-explanation ul,
.op-explanation ol {
    margin: 6px 0;
    padding-left: 20px;
}

.op-explanation li { margin: 2px 0; }

/* =============================================================================
   Quiz question map and action bar
   ========================================================================== */

/* The step strip doubles as the question map, so every step is a real button. */
.op-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.op-step {
    width: 34px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}

.op-step:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-1px);
}

.op-step--correct { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-bright); }
.op-step--wrong   { background: var(--cbg-ef4444-a16); border-color: var(--danger); color: var(--cfg-fca5a5); }

/* A saved question keeps whatever answer state it has and gains a corner marker,
   so the two pieces of information never compete for the same colour. */
.op-step--saved { position: relative; }

.op-step--saved::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--warn);
}

/* Current, and not yet answered: the step is filled so it reads as "you are here". */
.op-step--current:not(.op-step--correct):not(.op-step--wrong) {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--cfg-04231a);
}

/* Current, but already answered: a ring marks the position while the red or green stays
   visible underneath. Overriding the fill here would show a wrong answer as green, which is
   exactly the thing the colours exist to tell you. */
.op-step--current {
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Action bar ---------- */

.op-qact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .2s ease;
}

.op-qact:hover:not(:disabled) {
    background: var(--surface);
    border-color: var(--accent);
}

.op-qact:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Qoidasi is the one a learner reaches for mid-question, so it carries the accent. */
.op-qact--rule {
    color: var(--accent-bright);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.op-qact--rule:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    border-color: var(--accent);
    box-shadow: 0 6px 18px var(--accent-glow);
}

/* The shortcut hint, not a second icon. */
.op-qact__key {
    padding: 1px 6px;
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--faint);
    background: var(--cbg-ffffff-a07);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.op-qact--rule .op-qact__key {
    color: var(--accent-bright);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* =============================================================================
   Streak chip contrast
   -----------------------------------------------------------------------------
   MudChip paints its own filled background and colours the label on an inner
   element, so a plain `.op-streak { color }` never reached the text -- it came out
   amber on amber-brown. Both the chip and its content node are targeted here.
   ========================================================================== */

/* =============================================================================
   Quiz result — verdict, per-question review
   ========================================================================== */

.op-verdict {
    --vc: var(--accent);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 30px 34px;
    margin-bottom: 18px;
    border: 1px solid color-mix(in srgb, var(--vc) 45%, transparent);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(90% 160% at 0% 0%, color-mix(in srgb, var(--vc) 20%, transparent) 0%, transparent 62%),
        var(--surface);
}

.op-verdict--fail { --vc: var(--danger); }

.op-verdict__ring {
    flex: 0 0 auto;
    width: 188px;
    height: 188px;
    padding: 14px;
    border-radius: 50%;
    background: conic-gradient(var(--vc) calc(var(--pct) * 1%), color-mix(in srgb, var(--vc) 16%, transparent) 0);
}

.op-verdict__ring-in {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
}

.op-verdict__score-num { font-size: 2.9rem; font-weight: 800; line-height: 1; color: var(--text); }
.op-verdict__score-num small { font-size: 1.2rem; font-weight: 600; color: var(--muted); }
.op-verdict__pct { margin-top: 6px; font-size: 0.95rem; font-weight: 700; color: var(--vc); }

.op-verdict__main { min-width: 0; flex: 1 1 auto; }

.op-verdict__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--vc);
    background: color-mix(in srgb, var(--vc) 16%, transparent);
    border-radius: var(--radius-pill);
}

.op-verdict__headline {
    margin: 12px 0 0;
    font-family: var(--font-display, inherit);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.op-verdict__rule { margin: 8px 0 0; font-size: 0.92rem; color: var(--muted); }

.op-verdict__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.op-vstat {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface-2) 70%, transparent);
    color: var(--faint);
}

.op-vstat .mud-icon-root { grid-row: 1 / span 2; }

.op-vstat__num { font-size: 1.3rem; font-weight: 800; line-height: 1.15; color: var(--text); }
.op-vstat__label { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }

.op-vstat--correct .op-vstat__num, .op-vstat--correct .mud-icon-root { color: var(--accent-bright); }
.op-vstat--wrong   .op-vstat__num, .op-vstat--wrong   .mud-icon-root { color: var(--cfg-f87171); }
.op-vstat--skipped .op-vstat__num, .op-vstat--skipped .mud-icon-root { color: var(--warn); }

.op-result-actions--top { margin-bottom: 22px; }

/* One square per question, coloured by outcome. */
.op-qmap { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.op-qmap__dot {
    width: 34px; height: 34px; display: grid; place-items: center;
    font-size: 0.78rem; font-weight: 700; text-decoration: none;
    border-radius: 9px; border: 1px solid transparent;
    transition: transform .12s ease;
}
.op-qmap__dot:hover { transform: translateY(-2px); }
.op-qmap__dot--correct { color: var(--accent-bright); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.op-qmap__dot--wrong   { color: var(--cfg-fca5a5); background: var(--cbg-ef4444-a16); border-color: var(--cln-ef4444-a42); }
.op-qmap__dot--skipped { color: var(--warn); background: var(--cbg-f59e0b-a16); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.op-ritem { scroll-margin-top: 80px; }
.op-ritem__thumb { flex: 0 0 150px; align-self: center; }
.op-ritem__thumb .op-ritem__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; display: block; cursor: zoom-in; }

@media (max-width: 760px) {
    .op-verdict { flex-direction: column; text-align: center; padding: 24px 16px; gap: 20px; }
    .op-verdict__ring { width: 160px; height: 160px; }
    .op-verdict__headline { font-size: 1.7rem; }
    .op-verdict__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
    .op-ritem { flex-wrap: wrap; }
    .op-ritem__thumb { flex: 1 0 100%; order: 3; }
}

/* ---------- Review list ---------- */

.op-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.op-result-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.op-rfilter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.op-rfilter:hover { color: var(--text); border-color: var(--border-strong); }

.op-rfilter__n {
    padding: 0 7px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.7;
    border-radius: var(--radius-pill);
    background: var(--cbg-ffffff-a08);
}

.op-rfilter--on {
    color: var(--cfg-04231a);
    background: var(--accent);
    border-color: var(--accent);
}

.op-rfilter--on .op-rfilter__n { background: var(--cbg-000000-a18); }

.op-rfilter--wrong.op-rfilter--on {
    color: var(--cfg-ffffff);
    background: var(--danger);
    border-color: var(--danger);
}

.op-rfilter--skipped.op-rfilter--on {
    color: var(--cfg-2a1500);
    background: var(--warn);
    border-color: var(--warn);
}

.op-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
}

.op-ritem {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.op-ritem--correct { border-left-color: var(--accent); }
.op-ritem--wrong   { border-left-color: var(--danger); }
.op-ritem--skipped { border-left-color: var(--warn); }

.op-ritem__no {
    flex: 0 0 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 9px;
}

.op-ritem--correct .op-ritem__no { color: var(--accent-bright); background: var(--accent-soft); }
.op-ritem--wrong   .op-ritem__no { color: var(--cfg-fca5a5); background: var(--cbg-ef4444-a16); }
.op-ritem--skipped .op-ritem__no { color: var(--warn); background: var(--cbg-f59e0b-a16); }

.op-ritem__body { min-width: 0; flex: 1 1 auto; }

.op-ritem__q {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
}

.op-ritem__ans {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.op-ritem__ans .mud-icon-root { flex: 0 0 auto; margin-top: 1px; }

.op-ritem__ans--ok   { color: var(--accent-bright); }
.op-ritem__ans--bad  { color: var(--cfg-f87171); }
.op-ritem__ans--none { color: var(--warn); }

.op-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

/* ---------- Biletlar: an unfinished run ---------- */

@media (max-width: 600px) {
    .op-ritem { padding: 12px; gap: 10px; }
}

/* =============================================================================
   Qoidalar — the traffic code as a book
   -----------------------------------------------------------------------------
   Two columns: a table of contents that stays put, and one chapter at a time in a
   measured column. The clause text itself is styled by .op-clause-text further up,
   which owns the pre-line whitespace the sub-item lists depend on.
   ========================================================================== */

.op-rules-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.op-rules-hero__kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-bright);
}

.op-rules-hero__title {
    margin: 4px 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
}

.op-rules-hero__meta {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--muted);
}

.op-rules-toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
}

.op-rules-toc-toggle:hover { border-color: var(--accent); }

.op-rules {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ---------- Mundarija ---------- */

.op-rules__toc {
    position: sticky;
    /* Clears the fixed app bar; the list scrolls inside what is left. */
    top: 88px;
    max-height: calc(100vh - 110px);
    flex-direction: column;
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.op-rules__toc--drawer {
    position: static;
    max-height: none;
    height: 100%;
    display: flex;
    border: none;
    border-radius: 0;
}

.op-toc__search { flex: 0 0 auto; margin-bottom: 12px; }

.op-toc__label {
    flex: 0 0 auto;
    padding: 0 6px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
}

/* The list is the only thing that scrolls, so the search box stays reachable. */
.op-toc__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 4px;
}

.op-toc__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    font: inherit;
    font-size: 0.84rem;
    text-align: left;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 10px;
    transition: background .14s ease, color .14s ease;
}

.op-toc__item:hover { color: var(--text); background: var(--surface-2); }

.op-toc__item--on {
    color: var(--accent-bright);
    background: var(--accent-soft);
}

.op-toc__code {
    flex: 0 0 28px;
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
    color: var(--faint);
}

.op-toc__item--on .op-toc__code { color: var(--accent-bright); }

.op-toc__text {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}

.op-toc__n {
    flex: 0 0 auto;
    padding: 1px 7px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--faint);
    background: var(--cbg-ffffff-a06);
    border-radius: var(--radius-pill);
}

/* ---------- The page ---------- */

.op-rules__book {
    min-width: 0;
    padding: 26px 30px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.op-chapter__head {
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.op-chapter__kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-bright);
}

.op-chapter__title {
    margin: 6px 0 0;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
}

.op-chapter__meta {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--faint);
}

/* A clause is a hanging number beside its text — the shape the printed code uses. */
.op-clause {
    display: flex;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 96px;
}

.op-clause:last-of-type { border-bottom: none; }

.op-clause__code {
    flex: 0 0 56px;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.7;
    color: var(--accent-bright);
    font-variant-numeric: tabular-nums;
}

.op-clause__body { min-width: 0; flex: 1 1 auto; }

.op-clause__body .op-clause-text {
    font-size: 0.97rem;
    color: var(--text);
}

/* Arriving from a deep link or a search hit: the clause says so, then settles. */
.op-clause--target {
    margin: 0 -16px;
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    background: var(--accent-soft);
    animation: op-clause-land 2.4s ease-out;
}

@keyframes op-clause-land {
    0%, 45% { background: color-mix(in srgb, var(--accent) 26%, transparent); }
    100%    { background: var(--accent-soft); }
}

.op-clause__exception {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid var(--warn);
    border-radius: 0 10px 10px 0;
    background: var(--cbg-f59e0b-a09);
}

.op-clause__exception-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warn);
}

.op-clause__exception .op-clause-text { font-size: 0.9rem; }

/* The amending decree is editorial, not law: quieter than the clause it sits under. */
.op-clause__amendment {
    margin-top: 10px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--faint);
}

.op-clause__amendment p { margin: 0; }
.op-clause__amendment a { color: var(--blue-bright); }

/* ---------- Chapter paging ---------- */

.op-chapter__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.op-chapter__step {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 220px;
    max-width: 320px;
    padding: 12px 16px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color .15s ease, background .15s ease;
}

.op-chapter__step:hover { border-color: var(--accent); background: var(--surface); }

.op-chapter__step--next { margin-left: auto; text-align: right; justify-content: flex-end; }

.op-chapter__step span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.op-chapter__step em {
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
}

/* ---------- Search results ---------- */

.op-rules__searchhead {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.op-rules__count { font-size: 0.82rem; color: var(--faint); }

.op-rules__hits { display: flex; flex-direction: column; gap: 10px; }

.op-hit {
    width: 100%;
    padding: 14px 16px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color .15s ease, background .15s ease;
}

.op-hit:hover { border-color: var(--accent); background: var(--surface); }

.op-hit__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.op-hit__code {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--accent-bright);
}

.op-hit__chapter { font-size: 0.74rem; color: var(--faint); }

.op-hit__snippet {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--muted);
}

.op-rules-drawer .mud-drawer-content { width: 300px; max-width: 86vw; }

@media (max-width: 1279px) {
    .op-rules { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
    .op-rules__book { padding: 18px 16px 26px; }
    .op-clause { gap: 12px; padding: 16px 0; }
    .op-clause__code { flex-basis: 44px; font-size: 0.82rem; }
    .op-clause--target { margin: 0 -10px; padding: 16px 10px; }
    .op-chapter__step--next { text-align: left; justify-content: flex-start; }
    .op-rules-hero__title { font-size: 1.35rem; }
}

/* =============================================================================
   Admin sign card
   -----------------------------------------------------------------------------
   Every card is the same height. MudGrid sizes a row to its tallest item, so one
   two-line sign name used to push the entire row down and the catalogue read as a
   ragged wall. The regions below are all fixed, and the name gets exactly one line.
   ========================================================================== */

.op-signcard {
    display: flex;
    flex-direction: column;
    height: 218px;
    padding: 16px;
    overflow: hidden;
}

.op-signcard__art {
    flex: 0 0 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.op-signcard__code {
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--accent-bright);
}

.op-signcard__cat {
    flex: 0 0 auto;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--faint);
}

/* Actions sit on the floor of the card. Safe to use auto here because the card never
   overflows — inside something that scrolls, an auto margin pushes content out of reach. */
.op-signcard__actions {
    flex: 0 0 auto;
    margin-top: auto;
    display: flex;
    gap: 2px;
}

/* ---------- The name ----------
   One line, and if it is wider than the card it slides right-to-left and back.

   The container-query unit is what makes it self-limiting: `100cqw - 100%` is the
   overflow amount, positive for a name that already fits, so min() clamps it to 0 and
   a short name simply never moves. No JS, no measuring, nothing to keep in sync. */

.op-signcard__title {
    container-type: inline-size;
    flex: 0 0 auto;
    overflow: hidden;
    margin-bottom: 2px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.55;
    white-space: nowrap;
    color: var(--text);
}

.op-signcard__title > span {
    display: inline-block;
    animation: op-signtitle 11s ease-in-out infinite;
}

@keyframes op-signtitle {
    0%, 18%   { transform: translateX(0); }
    52%, 68%  { transform: translateX(min(0px, calc(100cqw - 100%))); }
    100%      { transform: translateX(0); }
}

/* A reader who asked for less motion gets a clipped name instead of a moving one. */
@media (prefers-reduced-motion: reduce) {
    .op-signcard__title > span { animation: none; }
}

@media (max-width: 600px) {
    .op-signcard { height: 200px; padding: 12px; }
    .op-signcard__art { flex-basis: 66px; }
}

/* =============================================================================
   Imtihon markazlari — map, pins, and the centre card
   -----------------------------------------------------------------------------
   The map is a generated SVG (tools/generate_uzbekistan_map.py) inlined into the
   page. It carries no colour of its own, so everything below owns the look; pins
   are DOM elements laid over the same box, positioned from lat/lng.
   ========================================================================== */

.op-centers {
    --uz-pin: var(--cbg-ff1f5a);
    --uz-teal: var(--cbg-00d9a2);
    --uz-violet: var(--cbg-9b6cff);

    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.op-centers-hero {
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.op-centers-hero__kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--uz-teal, var(--cfg-00d9a2));
}

.op-centers-hero__title {
    margin: 4px 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
}

.op-centers-hero__meta {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Map ---------- */

.op-map {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--cbg-06131a);
}

/* The pins are absolute against this box, and the SVG scales inside it, so both
   share one coordinate space at every width. */
.op-map__canvas {
    position: relative;
    width: 100%;
}

.op-map__canvas .uz-map {
    display: block;
    width: 100%;
    height: auto;
}

.uz-country {
    fill: var(--cfg-071f26);
    fill-opacity: 0.65;
    stroke: var(--uz-teal, var(--cfg-00d9a2));
    stroke-width: 2;
    stroke-linejoin: round;
}

.uz-region {
    fill: var(--cfg-0a252b);
    fill-opacity: 0.55;
    stroke: var(--cfg-087f78);
    stroke-width: 1;
    stroke-linejoin: round;
    /* Keeps hairlines even when the SVG is scaled down on a phone. */
    vector-effect: non-scaling-stroke;
    transition: fill-opacity 160ms ease, stroke 160ms ease;
}

.uz-region:hover {
    fill: var(--cfg-0d3035);
    fill-opacity: 0.85;
    stroke: var(--cfg-00c9a7);
}

/* ---------- Pins ---------- */

.op-pin {
    position: absolute;
    /* left/top are the centre of the pin, so it is pulled back by half its size. */
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    color: var(--uz-pin, var(--cfg-ff1f5a));
    background: var(--cbg-211522);
    border: 1px solid var(--cln-ff1f5a-a45);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--csh-ff1f5a-a08), 0 0 16px var(--csh-ff1f5a-a3);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.op-pin .mud-icon-root { font-size: 1.15rem; }

.op-pin:hover {
    transform: translate(-50%, -50%) scale(1.14);
    box-shadow: 0 0 0 6px var(--csh-ff1f5a-a1), 0 0 26px var(--csh-ff1f5a-a5);
    z-index: 3;
}

.op-pin--on {
    background: var(--cbg-2a1521);
    border-color: var(--cln-ff3d6d);
    box-shadow: 0 0 0 7px var(--csh-ff1f5a-a12), 0 0 30px var(--csh-ff1f5a-a65);
    z-index: 4;
}

.op-pin--closed {
    color: var(--faint);
    background: var(--cbg-16202a);
    border-color: var(--cln-94a3b8-a35);
    box-shadow: 0 0 0 4px var(--csh-94a3b8-a06);
}

/* ---------- Centre list ---------- */

.op-clist__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.op-clist__item:hover { color: var(--text); border-color: var(--border-strong); }

.op-clist__item--on {
    color: var(--text);
    border-color: var(--uz-pin, var(--cln-ff1f5a));
    background: var(--cbg-ff1f5a-a07);
}

.op-clist__item--on .mud-icon-root { color: var(--uz-pin, var(--cfg-ff1f5a)); }

.op-clist__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.op-clist__text strong { font-size: 0.9rem; font-weight: 700; }

.op-clist__text em {
    overflow: hidden;
    font-size: 0.76rem;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--faint);
}

.op-clist__flag {
    flex: 0 0 auto;
    padding: 2px 8px;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--faint);
    background: var(--cbg-94a3b8-a12);
    border-radius: var(--radius-pill);
}

/* ---------- Detail card ---------- */

.op-cdetail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.op-cdetail__head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }

.op-cdetail__pin {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    height: 46px;
    color: var(--uz-pin, var(--cfg-ff1f5a));
    background: var(--cbg-211522);
    border-radius: 50%;
    box-shadow: 0 0 22px var(--csh-ff1f5a-a22);
}

.op-cdetail__heading h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
}

.op-cdetail__heading span { font-size: 0.82rem; color: var(--faint); }

/* ---------- Photo ---------- */

.op-cphoto {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.op-cphoto img { display: block; width: 100%; height: 200px; object-fit: cover; }

.op-cphoto__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 200px;
    font-size: 0.84rem;
    color: var(--cfg-8fa8b8);
    background: radial-gradient(circle at center, var(--cbg-102a32) 0%, var(--cbg-07151d) 65%);
    border: 1px solid var(--cln-1c3447);
    border-radius: var(--radius-lg);
}

.op-cphoto__empty-pin {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--uz-pin, var(--cfg-ff1f5a));
    background: var(--cbg-211522);
    border-radius: 50%;
    box-shadow: 0 0 24px var(--csh-ff1f5a-a25);
}

.op-cphoto__dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    display: flex;
    gap: 6px;
    transform: translateX(-50%);
}

.op-cphoto__dot {
    width: 22px;
    height: 6px;
    padding: 0;
    cursor: pointer;
    background: var(--cbg-ffffff-a35);
    border: none;
    border-radius: var(--radius-pill);
    transition: background 160ms ease;
}

.op-cphoto__dot--on { background: var(--uz-teal, var(--cbg-00d9a2)); }

.op-cbadge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--uz-teal, var(--cfg-00d9a2));
    background: var(--cbg-061a18-a85);
    border: 1px solid var(--cln-00d9a2-a35);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(6px);
}

.op-cbadge--closed {
    color: var(--faint);
    border-color: var(--cln-94a3b8-a3);
    background: var(--cbg-0f172a-a85);
}

/* ---------- Info rows ---------- */

.op-crow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.op-crow--flat { background: transparent; }

.op-crow__icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    color: var(--uz-pin, var(--cfg-ff1f5a));
    background: var(--cbg-ff1f5a-a1);
    border-radius: 50%;
}

.op-crow__icon--green { color: var(--uz-teal, var(--cfg-00d9a2)); background: var(--cbg-00d9a2-a1); }
.op-crow__icon--violet { color: var(--uz-violet, var(--cfg-9b6cff)); background: var(--cbg-9b6cff-a12); }

.op-crow__body { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }

.op-crow__label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.op-crow__value { font-size: 0.92rem; font-weight: 600; line-height: 1.45; color: var(--text); }
.op-crow__hint { font-size: 0.76rem; color: var(--faint); }
.op-crow__chev { color: var(--faint); }

.op-crow__act {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.op-crow__act:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }

.op-crow__act--call {
    color: var(--uz-teal, var(--cfg-00d9a2));
    border-color: var(--cln-00d9a2-a35);
}

.op-crow__act--call:hover { color: var(--uz-teal, var(--cfg-00d9a2)); background: var(--cbg-00d9a2-a1); }

/* ---------- Hours + transport pair ---------- */

.op-cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.op-ccard {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-left-width: 2px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.op-ccard--hours { border-left-color: var(--uz-teal, var(--cln-00d9a2)); }
.op-ccard--transport { border-left-color: var(--uz-violet, var(--cln-9b6cff)); }

.op-ccard__top { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.op-ccard__top .op-crow__icon { flex-basis: 30px; height: 30px; }
.op-ccard strong { font-size: 0.88rem; font-weight: 600; line-height: 1.45; color: var(--text); }

.op-cmetro { color: var(--uz-violet, var(--cfg-9b6cff)); font-weight: 700; }

.op-cstate {
    margin-left: auto;
    padding: 2px 9px;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--faint);
    background: var(--cbg-94a3b8-a12);
    border-radius: var(--radius-pill);
}

.op-cstate--open { color: var(--uz-teal, var(--cfg-00d9a2)); background: var(--cbg-00d9a2-a12); }

/* ---------- Map buttons ---------- */

.op-cmaps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2px; }

.op-cmap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--cbg-0a1923);
    border: 1px solid var(--cln-263b50);
    border-radius: 14px;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.op-cmap--yandex { color: var(--cfg-ff654d); }
.op-cmap--google { color: var(--cfg-4285f4); }

.op-cmap:hover { transform: translateY(-2px); background: var(--cbg-10222d); border-color: var(--cln-35506b); }

@media (max-width: 1100px) {
    .op-centers { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .op-cgrid { grid-template-columns: 1fr; }
    .op-cdetail { padding: 14px; }
    .op-pin { width: 28px; height: 28px; }
    .op-pin .mud-icon-root { font-size: 0.95rem; }
    .op-centers-hero__title { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .op-pin, .op-cmap, .uz-region { transition: none; }
}

/* =============================================================================
   Map region labels + the region cards under the map
   ========================================================================== */

/* Names sit at each division's area-weighted centroid, baked into the generated
   SVG. Non-interactive: the shapes are scenery, only the pins and cards click. */
.uz-label {
    fill: var(--cfg-5e8c8a);
    font-family: var(--font-body, inherit);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    pointer-events: none;
    /* Keeps the text legible where it crosses a border line. */
    paint-order: stroke;
    stroke: var(--cfg-06131a-a85);
    stroke-width: 3px;
    stroke-linejoin: round;
}

/* Toshkent shahri is a speck inside its own province; its label is nudged clear
   of the pin that almost always sits on top of it. */
.uz-label--tiny { font-size: 9.5px; fill: var(--cfg-7ba8a2); }

.uz-region:hover + .uz-label,
.op-map__canvas .uz-region:hover ~ .uz-map__labels .uz-label { fill: var(--cfg-9fd8ce); }

/* ---------- Region cards ---------- */

.op-regions { margin-top: 16px; }

.op-regions__head {
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

/* One row that scrolls sideways, so a long list never reflows the map above it. */
.op-regions__strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}

.op-rcard {
    position: relative;
    flex: 0 0 auto;
    width: 148px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 13px 14px 40px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.op-rcard:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.op-rcard--on {
    border-color: var(--uz-teal, var(--cln-00d9a2));
    background: var(--cbg-00d9a2-a06);
}

.op-rcard__pin {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
    color: var(--uz-pin, var(--cfg-ff1f5a));
    background: var(--cbg-ff1f5a-a1);
    border-radius: 50%;
}

.op-rcard__name {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.op-rcard__count { font-size: 0.74rem; color: var(--faint); }
.op-rcard--on .op-rcard__count { color: var(--uz-teal, var(--cfg-00d9a2)); }

/* Pinned to the corner so the card keeps one height whether its name wraps or not. */
.op-rcard__go {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 50%;
    transition: color 160ms ease, background 160ms ease;
}

.op-rcard--on .op-rcard__go {
    color: var(--cfg-04231a);
    background: var(--uz-teal, var(--cbg-00d9a2));
}

.op-regions__centers {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .op-rcard { width: 132px; padding: 11px 12px 38px; }
    .uz-label { font-size: 13px; }
    .uz-label--tiny { font-size: 11px; }
}

/* =============================================================================
   Image viewer
   -----------------------------------------------------------------------------
   A question image opens full screen. Saving is not offered; the guards below stop
   drag-to-desktop and the long-press save sheet, which is as far as a browser can
   go — it has to fetch the file to show it.
   ========================================================================== */

.op-zoomable {
    display: block;
    /* Never render above the file's own pixels. width:100% stretched a 400px question
       image across a 700px card, and an upscaled bitmap is soft no matter how good the
       source is. Sized to content and capped at the container instead, so the browser
       only ever scales down — which it does well. */
    width: auto;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    cursor: zoom-in;
    /* Casual-copy deterrents. They stop drag-to-desktop and the long-press "save image"
       sheet on iOS; nothing stops a screenshot, and nothing on the web can. */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    border-radius: var(--radius-sm);
    background: var(--cbg-ffffff-a04);
    transition: filter 160ms ease;
}

.op-zoomable:hover { filter: brightness(1.06); }

.op-question-image {
    max-height: 320px;
    object-fit: contain;
    margin-bottom: 20px;
}

.op-lightbox {
    position: fixed;
    inset: 0;
    /* Above MudBlazor's drawers and app bar, below its snackbars. */
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px 80px;
    background: var(--cbg-020617-a94);
    backdrop-filter: blur(6px);
    animation: op-lightbox-in 160ms ease-out;
}

/* Focused programmatically so Escape reaches it; the ring would be noise here. */
.op-lightbox:focus { outline: none; }

@keyframes op-lightbox-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.op-lightbox__image {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    /* Fill the stage (the pictures are small), keeping the aspect ratio. */
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    border-radius: var(--radius-sm);
    cursor: default;
}

.op-lightbox__bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.op-lightbox__spacer { flex: 1 1 auto; }

.op-lightbox__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    background: var(--cbg-ffffff-a08);
    border: 1px solid var(--cln-ffffff-a14);
    border-radius: 50%;
    transition: background 150ms ease;
}

.op-lightbox__icon:hover { background: var(--cbg-ffffff-a16); }

.op-lightbox__foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.op-lightbox__close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: background 150ms ease, border-color 150ms ease;
}

.op-lightbox__close {
    color: var(--text);
    background: var(--cbg-ffffff-a1);
    border: 1px solid var(--cln-ffffff-a16);
}

.op-lightbox__close:hover { background: var(--cbg-ffffff-a18); }

@media (max-width: 600px) {
    .op-lightbox { padding: 58px 8px 76px; }
    .op-lightbox__close { padding: 10px 16px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .op-lightbox { animation: none; }
    .op-zoomable { transition: none; }
}

/* =============================================================================
   One sign, reached by code — where a question's [3.27](/belgi/3.27) lands
   ========================================================================== */

.op-signpage {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.op-signpage__art {
    padding: 18px;
    background: var(--cbg-ffffff-a05);
    border-radius: var(--radius-lg);
}

.op-signpage__code {
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--accent-bright);
}

.op-signpage__name {
    margin: 6px 0 12px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
}

.op-signpage__cat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}

.op-signpage__cat:hover { color: var(--text); border-color: var(--accent); }

.op-signpage__desc {
    margin: 16px 0 0;
    max-width: 68ch;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--muted);
}

@media (max-width: 700px) {
    .op-signpage { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px; }
    .op-signpage__art { max-width: 220px; }
}

/* =============================================================================
   Signs attached to a question — shown once it has been answered
   ========================================================================== */

.op-qsigns { margin-top: 20px; }

.op-qsigns__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.op-qsigns__row { display: flex; flex-wrap: wrap; gap: 10px; }

.op-qsign {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    padding: 8px 14px 8px 8px;
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    transition: border-color 150ms ease, background 150ms ease;
}

.op-qsign:hover { border-color: var(--accent); background: var(--surface); }

.op-qsign img {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: var(--cbg-ffffff-a06);
    border-radius: 50%;
    -webkit-user-drag: none;
}

.op-qsign__code { font-size: 0.8rem; font-weight: 800; color: var(--accent-bright); }

.op-qsign__name {
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

@media (max-width: 600px) {
    .op-qsign { max-width: 100%; }
    .op-qsign__name { display: none; }
}

/* =============================================================================
   Copy protection on learner-facing content
   -----------------------------------------------------------------------------
   Applied to the page body only, never the admin area — content is authored there
   and blocking selection would make editing miserable. Form fields stay selectable
   everywhere, or nobody could correct a typo in what they had typed.

   This stops selecting, dragging and the long-press copy sheet. It cannot stop
   view-source, devtools or a screenshot; nothing delivered to a browser can.
   ========================================================================== */

.op-noselect {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.op-noselect input,
.op-noselect textarea,
.op-noselect [contenteditable="true"],
.op-noselect .mud-input-slot {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

.op-noselect img {
    -webkit-user-drag: none;
    user-select: none;
}

/* Transparent wrapper: it exists only to carry @key so a language change rebuilds the
   routed page. It must not introduce a box of its own. */
.op-langroot {
    display: contents;
}

/* =============================================================================
   Drawer navigation — coloured tiles, chevron affordance, interaction feedback

   Each MudNavLink carries its own --nav-accent (set inline in NavMenu.razor), so
   one rule set tints every row without a class per destination. Scoped to
   .op-drawer so the top-bar and admin nav links keep MudBlazor's defaults.
   ============================================================================= */

.op-drawer .mud-nav-link {
    display: flex;
    align-items: center !important;
    gap: 12px;
    padding: 9px 12px 9px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    transition: background-color .16s ease, border-color .16s ease,
                transform .16s ease, color .16s ease !important;
}

/* The icon becomes a tinted tile. color-mix keeps one rule for every accent. */
/* MudNavLink puts .mud-nav-link-icon on the <svg> itself — there is no wrapper.
   So the tile is made with padding around the glyph rather than a fixed box, which
   would otherwise scale the glyph up to the tile size. */
.op-drawer .mud-nav-link .mud-nav-link-icon {
    flex: 0 0 auto;
    box-sizing: content-box;
    width: 1.1rem;
    height: 1.1rem;
    padding: 7px;
    margin-right: 0 !important;
    border-radius: 9px;
    background: var(--cbg-94a3b8-a16);
    background: color-mix(in srgb, var(--nav-accent, var(--cbg-64748b)) 16%, transparent);
    color: var(--nav-accent, var(--cfg-94a3b8)) !important;
    transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

/* ---- hover: row lifts, tile brightens, chevron leans out ---- */
.op-drawer .mud-nav-link:hover:not(.active) {
    background-color: var(--cbg-94a3b8-a09) !important;
    background-color: color-mix(in srgb, var(--nav-accent, var(--cbg-64748b)) 9%, transparent) !important;
    border-color: var(--cln-94a3b8-a22) !important;
    border-color: color-mix(in srgb, var(--nav-accent, var(--cln-64748b)) 22%, transparent) !important;
    color: var(--cfg-f7f7f7) !important;
    transform: translateX(2px);
}

.op-drawer .mud-nav-link:hover .mud-nav-link-icon {
    background: var(--cbg-94a3b8-a26);
    background: color-mix(in srgb, var(--nav-accent, var(--cbg-64748b)) 26%, transparent);
    transform: scale(1.06);
}

/* ---- pressed: settles back down, so the tap registers physically ---- */
.op-drawer .mud-nav-link:active {
    transform: translateX(1px) scale(.985);
}

/* ---- active route: accent takes over the whole row ---- */
.op-drawer .mud-nav-link.active {
    background-color: var(--cbg-10b981-a14) !important;
    background-color: color-mix(in srgb, var(--nav-accent, var(--cbg-10b981)) 14%, transparent) !important;
    border-color: var(--cln-10b981-a55) !important;
    border-color: color-mix(in srgb, var(--nav-accent, var(--cln-10b981)) 55%, transparent) !important;
    color: var(--nav-accent, var(--cfg-19d69c)) !important;
    font-weight: 600 !important;
}

.op-drawer .mud-nav-link.active .mud-nav-link-icon {
    background: var(--cbg-10b981-a3);
    background: color-mix(in srgb, var(--nav-accent, var(--cbg-10b981)) 30%, transparent);
    box-shadow: 0 0 0 1px var(--csh-10b981-a35);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--nav-accent, var(--csh-10b981)) 35%, transparent);
}

/* Keyboard users get the same affordance as the mouse, not just a focus ring. */
.op-drawer .mud-nav-link:focus-visible {
    outline: 2px solid var(--nav-accent, var(--cln-19d69c));
    outline-offset: 2px;
}

/* Motion is decoration here — the colour and the outline already carry the state. */
@media (prefers-reduced-motion: reduce) {
    .op-drawer .mud-nav-link,
    .op-drawer .mud-nav-link .mud-nav-link-icon,
        .op-drawer .mud-nav-link:hover:not(.active),
    .op-drawer .mud-nav-link:active { transform: none; }
    .op-drawer .mud-nav-link:hover .mud-nav-link-icon { transform: none; }
}

/* =============================================================================
   Admin analytics — presence dot and the attempts sparkline
   ============================================================================= */

.op-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--cbg-475569);
    box-shadow: 0 0 0 2px var(--csh-475569-a22);
}

.op-dot--on {
    background: var(--cbg-19d69c);
    box-shadow: 0 0 0 2px var(--csh-19d69c-a25);
}

/* Bars are laid out with flex and sized in percent, so the chart needs a fixed
   height for the percentages to resolve against. */
.op-spark {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 120px;
}

.op-spark__col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.op-spark__bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--cbg-19d69c) 0%, var(--cbg-0e7c5a) 100%);
}

.op-spark__lbl {
    margin-top: 5px;
    font-size: .62rem;
    color: var(--muted, var(--cfg-97abb6));
}

/* =============================================================================
   Drawer caret — a real element in NavMenu.razor, not a pseudo-element.

   Two earlier attempts drew it with ::after: absolutely positioned (which resolved
   against .mud-navmenu, the positioned ancestor, and put it at the top-left of the
   menu) and then as a trailing flex item (starved by .mud-nav-link-text being
   width:100%). Marking it up explicitly removes the dependency on MudBlazor's
   internals altogether.
   ============================================================================= */

/* MudNavLink puts ChildContent inside .mud-nav-link-text, so that is the row the
   label and the caret share. */
.op-drawer .mud-nav-link .mud-nav-link-text {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100% !important;
    min-width: 0;
}

.op-drawer .op-nav__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.op-drawer .op-nav__caret {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .35;
    transition: opacity .16s ease, transform .16s ease;
}

.op-drawer .mud-nav-link:hover .op-nav__caret {
    opacity: .85;
    transform: rotate(45deg) translate(2px, -2px);
}

.op-drawer .mud-nav-link.active .op-nav__caret { opacity: .9; }

@media (prefers-reduced-motion: reduce) {
    .op-drawer .op-nav__caret { transition: none; }
    .op-drawer .mud-nav-link:hover .op-nav__caret { transform: rotate(45deg); }
}

/* =============================================================================
   Small screens — overflow containment

   The single most common cause of a page feeling broken on a phone is one wide
   child forcing the whole document to scroll sideways, which drags the header and
   every row out of alignment. Wide content is made to scroll inside its own box
   instead, so the page itself never does.
   ============================================================================= */

@media (max-width: 600px) {
    /* A page must never be the thing that scrolls horizontally. */
    .op-page {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Tables stay readable by scrolling within their own card. */
    .op-card .mud-table-container,
    .op-card .mud-table-root {
        max-width: 100%;
        overflow-x: auto;
    }

    /* Donuts and rings were fixed at 130–160px and pushed rows sideways. */
    .op-prof-donut-center {
        max-width: 100%;
    }

    /* The analytics sparkline: fewer, thinner bars rather than a squeezed grid. */
    .op-spark {
        height: 92px;
        gap: 3px;
    }

    .op-spark__lbl {
        font-size: .55rem;
    }

    /* Stat tiles read better as two per row than four squeezed ones. */
    .op-prof-stat-tile {
        min-width: 0;
    }

    /* Long words (Uzbek compounds, URLs) must wrap rather than widen the row. */
    .op-card,
    .op-prof-stat-lbl,
    .op-home-stat-card__sub {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

/* The drawer is a fixed-width panel; its contents must fit rather than push it wider. */
.op-drawer,
.op-drawer__nav {
    max-width: 100%;
    overflow-x: hidden;
}

/* =============================================================================
   Tickets on a phone — three across

   At three columns a card is roughly 105px wide, which every fixed size inside it
   overflows: the ring alone was 100px before its padding. Everything scales down
   together here rather than the card being allowed to push the grid sideways.
   ============================================================================= */

/* Filter bar horizontal scroll on mobile */
.op-tickets-filter-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1 1 auto;
}

.op-tickets-filter-scroll::-webkit-scrollbar {
    display: none;
}

.op-tickets-filter-scroll button {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 959px) {
    .op-tickets-sidebar {
        order: -1;
    }
}

/* =============================================================================
   Helpful videos — /foydali

   YouTube's own split: a horizontal Shorts rail of 9:16 thumbnails, then a grid of
   16:9 cards. Cards are images, never players: a YouTube iframe is a whole player
   and twenty on one page is the same trap as twenty WebGL contexts, so the iframe
   is created only for the video actually clicked.
   ============================================================================= */

.op-vidsec { margin-bottom: 34px; }

.op-vidsec__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--op-text, var(--cfg-f7f7f7));
    margin-bottom: 14px;
}

.op-shorts-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    /* The rail scrolls, the page never does. */
    max-width: 100%;
}

.op-short-card,
.op-vid-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.op-short-card {
    flex: 0 0 auto;
    width: 148px;
    scroll-snap-align: start;
}

.op-short-card__art,
.op-vid-card__art {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: var(--cbg-0a1a22);
    border: 1px solid var(--border, var(--cln-1a2a35));
}

/* 9:16 for a Short, 16:9 for everything else. hqdefault is a 16:9 frame even for a
   Short, so the portrait tile crops it rather than letterboxing. */
.op-short-card__art { aspect-ratio: 9 / 16; }
.op-vid-card__art   { aspect-ratio: 16 / 9; }

.op-short-card__art img,
.op-vid-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.op-short-card__play,
.op-vid-card__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--cfg-ffffff);
    background: var(--cbg-000000-a18);
    opacity: .9;
    transition: background-color .16s ease, opacity .16s ease;
}

.op-short-card:hover .op-short-card__play,
.op-vid-card:hover .op-vid-card__play {
    background: var(--cbg-000000-a34);
    opacity: 1;
}

.op-vid-card__time {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--cbg-000000-a78);
    color: var(--cfg-ffffff);
    font-size: .7rem;
    font-weight: 600;
}

.op-short-card__title,
.op-vid-card__title {
    font-size: .84rem;
    line-height: 1.4;
    color: var(--op-text, var(--cfg-f7f7f7));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.op-short-card__title { font-size: .78rem; }

.op-vid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

@media (max-width: 600px) {
    .op-vid-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .op-short-card { width: 124px; }
    .op-vid-card__title, .op-short-card__title { font-size: .74rem; }
}

/* ---- player ---- */
.op-vidmodal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: var(--cbg-02060c-a88);
}

.op-vidmodal__frame {
    width: min(920px, 100%);
    background: var(--cbg-0a1a22);
    border: 1px solid var(--border, var(--cln-1a2a35));
    border-radius: 14px;
    overflow: hidden;
}

.op-vidmodal__frame--short { width: min(420px, 100%); }

.op-vidmodal__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, var(--cln-1a2a35));
}

.op-vidmodal__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.op-vidmodal__icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--border, var(--cln-1a2a35));
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: .76rem;
}

.op-vidmodal__stage { aspect-ratio: 16 / 9; background: var(--cbg-000000); }
.op-vidmodal__frame--short .op-vidmodal__stage { aspect-ratio: 9 / 16; }

.op-vidmodal__stage iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =============================================================================
   Blog (/maqolalar): the list's cards and the article body.
   ============================================================================= */


.op-blog__heading { font-size: 1.9rem; margin: 0 0 24px; }
.op-blog__empty { color: var(--op-text-dim, var(--cfg-a9b4be)); }

.op-blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.op-blog-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--cbg-0a1a22);
    border: 1px solid var(--border, var(--cln-1a2a35));
    border-radius: 14px;
    overflow: hidden;
}

.op-blog-card__cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.op-blog-card__body { padding: 14px 16px 16px; }
.op-blog-card__title { font-size: 1.02rem; margin: 0 0 8px; line-height: 1.35; }
.op-blog-card__excerpt { margin: 0 0 10px; font-size: .86rem; line-height: 1.6; color: var(--op-text-dim, var(--cfg-a9b4be)); }
.op-blog-card__date { font-size: .74rem; color: var(--op-text-faint, var(--cfg-737a84)); }

.op-blog-related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border, var(--cln-1a2a35)); }
.op-blog-related__title { font-size: 1.3rem; margin: 0 0 18px; }
.op-blog-related .op-blog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .op-blog-related .op-blog__grid { grid-template-columns: 1fr; } }

.op-blog-article__title { font-size: 2rem; line-height: 1.2; margin: 0 0 10px; }
.op-blog-article__cover { width: 100%; border-radius: 14px; margin-bottom: 26px; display: block; }

.op-blog-article__body { font-size: 1rem; line-height: 1.8; }
.op-blog-article__body img { max-width: 100%; height: auto; border-radius: 10px; }
.op-blog-article__body h2 { margin: 32px 0 12px; font-size: 1.35rem; }
.op-blog-article__body h3 { margin: 26px 0 10px; font-size: 1.12rem; }
.op-blog-article__body p { margin: 0 0 16px; }
.op-blog-article__body a { color: var(--op-primary, var(--cfg-02c076)); }
.op-blog-article__body pre { overflow-x: auto; padding: 12px; border-radius: 8px; background: var(--cbg-08131b); }


/* Sign artwork is drawn for a white ground, so it sits on a light tile, not the dark page. */


@media (max-width: 600px) {
    .op-blog-article__title { font-size: 1.5rem; }
}

/* Quill sits inside the blog editor drawer. It brings its own chrome, so this only
   gives it the border and radius the MudBlazor fields around it have. */
.op-rte .ql-toolbar {
    border-color: var(--border, var(--cln-1a2a35)) !important;
    border-radius: 8px 8px 0 0;
    background: var(--cbg-0d1f2b);
}

.op-rte .ql-container {
    border-color: var(--border, var(--cln-1a2a35)) !important;
    border-radius: 0 0 8px 8px;
    min-height: 220px;
    font-family: inherit;
    font-size: .92rem;
}

.op-rte .ql-editor { min-height: 220px; }
.op-rte .ql-editor.ql-blank::before { color: var(--op-text-faint, var(--cfg-737a84)); font-style: normal; }

/* The toolbar ships black icons, which vanish on a dark surface. */
.op-rte .ql-snow .ql-stroke { stroke: var(--cfg-a9b4be); }
.op-rte .ql-snow .ql-fill { fill: var(--cfg-a9b4be); }
.op-rte .ql-snow .ql-picker { color: var(--cfg-a9b4be); }
.op-rte .ql-snow.ql-toolbar button:hover .ql-stroke,
.op-rte .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--cfg-02c076); }
.op-rte .ql-snow.ql-toolbar button:hover .ql-fill,
.op-rte .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--cfg-02c076); }
.op-rte .ql-snow .ql-picker-options { background: var(--cbg-0d1f2b); border-color: var(--border, var(--cln-1a2a35)); }

/* The list's cards are links; reset what an <a> brings with it. */
.op-blog-card--btn {
    padding: 0;
    border: 1px solid var(--border, var(--cln-1a2a35));
    background: var(--cbg-0a1a22);
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    width: 100%;
    transition: transform .15s ease, border-color .15s ease;
}

.op-blog-card--btn:hover {
    transform: translateY(-2px);
    border-color: var(--cln-263442);
}

/* Inside the app the article sits in .op-page, which already provides the gutter the
   standalone shell had to supply itself. */
/* In-app reader: one centred column (back link, title, body) wider than the old 780px. */
.mud-container.op-blog-reader { max-width: 1080px; margin-inline: auto; }
.op-blog-article--inapp { max-width: none; }

.op-blog-article__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    font-size: .8rem;
    color: var(--op-text-faint, var(--cfg-737a84));
}

.op-blog-article__share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border, var(--cln-1a2a35));
    border-radius: 8px;
    background: transparent;
    color: var(--op-text-dim, var(--cfg-a9b4be));
    font: inherit;
    font-size: .76rem;
    cursor: pointer;
}

.op-blog-article__share:hover {
    border-color: var(--op-primary, var(--cln-02c076));
    color: var(--op-primary, var(--cfg-02c076));
}

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

/* The car mark, beside the wordmark. Supplied as white line-art on a solid black field,
   so the background was converted to alpha from its own luminance — that keeps the
   anti-aliased edges instead of the fringe a hard cut-out leaves — then cropped to the
   car and scaled down. 403 KB to 13.5 KB. */
.op-logo__mark {
    display: block;
    height: 38px;
    width: auto;
    margin-right: 9px;
    /* The art is pure white; this lets it pick up the accent without a second file. */
    filter: drop-shadow(0 1px 2px var(--cbg-000000-a45));
}

@media (max-width: 600px) {
    .op-logo__mark { height: 30px; margin-right: 6px; }
}

/* ---------------------------------------------------------------- answer key */

/* The ticket picker. Sixty-one chips wrap into a block rather than scrolling sideways —
   a horizontal strip hides most of the book behind a drag on a phone. */
.op-answers-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.op-chip {
    background: var(--surface, var(--cbg-1e293b));
    border: 1px solid var(--border, var(--cln-1a2a35));
    color: var(--op-text-faint, var(--cfg-9aa4b2));
    border-radius: 999px;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.op-chip:hover { border-color: var(--cln-10b981); color: var(--cfg-e2e8f0); }

.op-chip--on {
    background: var(--cbg-10b981-a14);
    border-color: var(--cln-10b981);
    color: var(--cfg-10b981);
}

.op-answers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.op-answer-card {
    background: var(--surface, var(--cbg-1e293b));
    border: 1px solid var(--border, var(--cln-1a2a35));
    border-radius: 14px;
    padding: 20px 22px;
}

.op-answer-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

/* Fixed width so the question text of every card starts on the same column. */
.op-answer-card__no {
    flex: 0 0 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--cbg-10b981-a12);
    color: var(--cfg-10b981);
    font-weight: 800;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.op-answer-card__img {
    display: block;
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 14px;
}

.op-answer-card__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* The options are read-only here, so they must not look clickable. */
.op-answer-card__options .op-option { cursor: default; }
.op-answer-card__options .op-option:hover { transform: none; }

.op-answer-card__note {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid var(--cln-3b82f6);
    background: var(--cbg-3b82f6-a07);
    border-radius: 0 8px 8px 0;
    font-size: .88rem;
    line-height: 1.55;
}

.op-answer-card__note-label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--op-text-faint, var(--cfg-737a84));
    margin-bottom: 4px;
}

.op-answer-card__rule {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: .8rem;
    color: var(--op-text-faint, var(--cfg-9aa4b2));
}

.op-answer-card__signs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.op-answer-card__signs img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    background: var(--cbg-ffffff-a04);
    border-radius: 8px;
    padding: 4px;
}

@media (max-width: 700px) {
    .op-answer-card { padding: 16px; }
    .op-chip { padding: 5px 11px; font-size: .78rem; }
}

/* ---------------------------------------------------------------- game host */

/* The original build wants the whole viewport. It gets everything below the nav bar, with
   a thin strip of Prava chrome above it so the learner is not stranded inside an iframe. */
.op-game {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--nav-h));
}

.op-game__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border, var(--cln-1a2a35));
    background: var(--surface, var(--cbg-1e293b));
    flex: 0 0 auto;
}

.op-game__title {
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: .01em;
    flex: 1 1 auto;
}

.op-game__frame {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--cbg-0f172a);
}

/* The iframe and the launch screen stack, so the 26 MB build downloads while the learner
   is still choosing. */
.op-game__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

/* BOSHLASH on a phone puts the whole game (bar + player) in fullscreen landscape. */
.op-game:fullscreen { background: var(--cbg-0f172a); }
.op-game:-webkit-full-screen { width: 100%; height: 100%; background: var(--cbg-0f172a); }

/* "Rotate your phone". Only a touch screen held upright sees it — an iPhone (no fullscreen
   API), an in-app browser that refused the lock, or someone who turned back. Turning the
   phone sideways hides it with no script involved. */
.op-rotate {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    background: var(--cbg-080d18-a94);
    color: var(--cfg-e2e8f0);
    backdrop-filter: blur(6px);
}

@media (orientation: portrait) and (pointer: coarse) {
    .op-rotate { display: flex; }
}

.op-rotate__phone {
    position: relative;
    width: 46px;
    height: 78px;
    border: 3px solid var(--cln-10b981);
    border-radius: 10px;
    animation: op-rotate-phone 2.4s ease-in-out infinite;
}

.op-rotate__phone::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 10px;
    height: 3px;
    margin-left: -5px;
    border-radius: 2px;
    background: var(--cbg-10b981);
}

@keyframes op-rotate-phone {
    0%, 20% { transform: rotate(0deg); }
    50%, 80% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

.op-rotate__title {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.op-rotate__text {
    max-width: 280px;
    color: var(--cfg-94a3b8);
    font-size: .92rem;
}

.op-rotate__skip {
    margin-top: 6px;
    padding: 9px 18px;
    border: 1px solid var(--cln-243044);
    border-radius: 999px;
    background: transparent;
    color: var(--cfg-cbd5e1);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
}

.op-rotate__skip:focus-visible { outline: 2px solid var(--cln-10b981); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .op-rotate__phone { animation: none; transform: rotate(-90deg); }
}

/* --- Prava launch screen -------------------------------------------------------------
   Replaces the build's own menu, which is Unity UI inside a stripped IL2CPP build and
   cannot be restyled from here. */
.op-launch {
    position: absolute;
    inset: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    /* Fully opaque: the frame behind is loading the build, and letting the game's own menu
       show through made the launch screen look like a dialog over someone else's app. */
    background:
        radial-gradient(880px 520px at 50% 8%, var(--cbg-10b981-a12), transparent 70%),
        var(--cbg-0f172a);
}

/* The avtodrom chooser draws its own studio (js/avtodromStage.js) rather than showing the
   game behind the panel: nothing of the build is on this screen, so it needs no download to
   appear and carries none of that scene's lighting or backdrop. The panel is a column down
   the left with the car turning beside it. */
.op-stage {
    position: absolute;
    inset: 0;
    background: var(--cbg-05080f);
}


.op-launch--showroom {
    justify-content: flex-start;
    background: linear-gradient(90deg,
        var(--cbg-05080f-a97) 0%,
        var(--cbg-05080f-a92) 30%,
        var(--cbg-05080f-a55) 48%,
        var(--cbg-05080f-a0) 66%);
    pointer-events: none;          /* the stage keeps the rest of the frame */
}

.op-launch--showroom .op-launch__inner {
    max-width: 440px;
    pointer-events: auto;
}

/* The cards are the only thing on this screen you can act on, so they are lit rather than
   flat: an accent rail down the left, a hover lift, and a glow that follows the accent. Each
   card carries its own hue through --card-accent so Transport and Avtodrom read as two
   choices rather than one repeated block. */
.op-launch--showroom .op-launch__card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, var(--cbg-ffffff-a05), var(--cbg-ffffff-a0) 46%),
        var(--cbg-080d18-a86);
    border-color: color-mix(in srgb, var(--card-accent, var(--cln-10b981)) 34%, transparent);
    backdrop-filter: blur(8px);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* The rail. It is also what tells the two cards apart at a glance. */
.op-launch--showroom .op-launch__card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--card-accent, var(--cbg-10b981));
    box-shadow: 0 0 14px color-mix(in srgb, var(--card-accent, var(--csh-10b981)) 70%, transparent);
}

.op-launch--showroom .op-launch__card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--card-accent, var(--cln-10b981)) 62%, transparent);
    box-shadow:
        0 12px 30px var(--csh-000000-a45),
        0 0 0 1px color-mix(in srgb, var(--card-accent, var(--csh-10b981)) 26%, transparent);
}

.op-launch--showroom .op-launch__tag { color: var(--card-accent, var(--cfg-10b981)); }

.op-launch--showroom .op-launch__value {
    color: var(--cfg-ffffff);
    font-size: 1.06rem;
    letter-spacing: .01em;
}

/* The steppers are buttons, so they look like buttons: filled in the card's own accent,
   and they press. */
.op-launch--showroom .op-launch__step {
    background: color-mix(in srgb, var(--card-accent, var(--cbg-10b981)) 16%, var(--cbg-0f172a-a9));
    border-color: color-mix(in srgb, var(--card-accent, var(--cln-10b981)) 42%, transparent);
    color: var(--cfg-ffffff);
    width: 34px;
    height: 34px;
    transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.op-launch--showroom .op-launch__step:hover {
    background: var(--card-accent, var(--cbg-10b981));
    border-color: var(--card-accent, var(--cln-10b981));
    color: var(--cfg-04121a);
}

.op-launch--showroom .op-launch__step:active { transform: scale(.92); }

@media (prefers-reduced-motion: reduce) {
    .op-launch--showroom .op-launch__card,
    .op-launch--showroom .op-launch__step { transition: none; }
    .op-launch--showroom .op-launch__card:hover { transform: none; }
}

@media (max-width: 900px) {
    /* No room for a car beside the controls; the panel takes the frame and the stage sits
       behind it as atmosphere. */
    .op-launch--showroom {
        justify-content: center;
        background:
            radial-gradient(880px 520px at 50% 8%, var(--cbg-10b981-a12), transparent 70%),
            var(--cbg-05080f-a93);
    }
    .op-launch--showroom .op-launch__inner { max-width: 720px; }
}

.op-launch__inner {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.op-launch__head { text-align: center; }

.op-launch__brand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    letter-spacing: -.02em;
}

.op-launch__mark {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary, var(--cfg-10b981));
    line-height: 1;
}

.op-launch__mark-2 {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--cfg-e2e8f0);
    line-height: 1;
}

.op-launch__lede {
    margin: 12px auto 0;
    max-width: 46ch;
    color: var(--cfg-94a3b8);
    font-size: .9rem;
    line-height: 1.55;
    text-wrap: balance;
}

.op-launch__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.op-launch__card {
    background: var(--cbg-1e293b-a72);
    border: 1px solid var(--cln-243044);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 108px;
    justify-content: center;
}

.op-launch__tag {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--cfg-64748b);
}

.op-launch__pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.op-launch__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cfg-f1f5f9);
    text-align: center;
    flex: 1 1 auto;
}

.op-launch__step {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid var(--cln-2c3b52);
    background: var(--cbg-0f172a-a8);
    color: var(--primary, var(--cfg-10b981));
    font-size: .68rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease, border-color .15s ease;
}

.op-launch__step:hover { background: var(--cbg-10b981-a16); border-color: var(--primary, var(--cln-10b981)); }
.op-launch__step:focus-visible { outline: 2px solid var(--primary, var(--cln-10b981)); outline-offset: 2px; }

.op-launch__note {
    font-size: .72rem;
    color: var(--cfg-64748b);
    line-height: 1.4;
}

.op-launch__warn {
    border: 1px solid var(--cln-7c2d12);
    background: var(--cbg-7c2d12-a22);
    color: var(--cfg-fca5a5);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: .8rem;
    line-height: 1.5;
}

.op-launch__foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.op-launch__go {
    width: 100%;
    max-width: 420px;
    padding: 15px 24px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--cbg-10b981), var(--cbg-3b82f6));
    color: var(--cfg-04121a);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: .06em;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
}

.op-launch__go:hover:not(:disabled) { filter: brightness(1.08); }
.op-launch__go:active:not(:disabled) { transform: translateY(1px); }
.op-launch__go.is-waiting,
.op-launch__go:disabled {
    background: var(--cbg-1e293b);
    color: var(--cfg-64748b);
    cursor: progress;
}

@media (max-width: 640px) {
    .op-launch__grid { grid-template-columns: minmax(0, 1fr); }
    .op-launch__mark, .op-launch__mark-2 { font-size: 1.9rem; }
}

/* --- extracted-track preview (/avtodrom/asl) ----------------------------------------- */

.op-track__stats {
    font-size: .72rem;
    color: var(--cfg-64748b);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes op-track-spin { to { transform: rotate(360deg); } }

/* Arena Online Invite Toast */
.op-arena-invite-toast {
    position: fixed;
    top: 70px;
    right: 24px;
    z-index: 9999;
    width: 320px;
    background: var(--cbg-081521);
    border: 1.5px solid var(--cln-f5ad05);
    box-shadow: 0 8px 32px var(--csh-f5ad05-a35);
    border-radius: 16px;
    padding: 16px;
    animation: opSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.op-arena-invite-btn {
    width: 100%;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--cbg-02c076);
    color: var(--cfg-010811);
    font-size: 0.86rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.op-arena-invite-btn:hover {
    transform: translateY(-2px);
    background: var(--cbg-05e08b);
}

@keyframes opSlideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================================================
   Lesson Details Redesign Styles (Prava Gamified UI)
   ========================================================================== */

.op-lesson-hero {
    position: relative;
    background: radial-gradient(1000px 350px at 15% -20%, color-mix(in srgb, var(--hero-accent, var(--accent)) 25%, transparent), transparent 70%),
                radial-gradient(800px 300px at 85% -10%, var(--cbg-088beb-a15), transparent 60%),
                var(--surface);
    border: 1px solid color-mix(in srgb, var(--hero-accent, var(--accent)) 30%, var(--border));
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.op-lesson-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hero-accent, var(--accent)), var(--blue-bright));
    opacity: 0.9;
}

.op-lesson-hero__module-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--hero-accent, var(--accent)) 18%, var(--cbg-081521-a8));
    border: 1px solid color-mix(in srgb, var(--hero-accent, var(--accent)) 40%, transparent);
    color: var(--hero-accent, var(--accent-bright));
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.op-lesson-hero__title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-top: 10px;
    margin-bottom: 12px;
}

@media (max-width: 600px) {
    .op-lesson-hero { padding: 18px 16px; }
    .op-lesson-hero__title { font-size: 1.4rem; }
}

.op-lesson-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.op-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--cbg-ffffff-a05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.op-meta-badge--success {
    background: var(--green-deep);
    border-color: var(--green-dark);
    color: var(--green-bright);
}

.op-meta-badge--active {
    background: var(--cbg-088beb-a15);
    border-color: var(--cln-088beb-a4);
    color: var(--blue-bright);
}

.op-meta-badge--muted {
    background: var(--cbg-ffffff-a03);
    border-color: var(--border);
    color: var(--text-muted);
}

/* Hero Nav Buttons */
.op-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--cbg-0d1f2b-a8);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    text-decoration: none !important;
}

.op-nav-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--accent-bright);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--csh-000000-a3);
}

.op-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.op-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: transparent;
}

.op-nav-btn--next {
    background: color-mix(in srgb, var(--accent) 15%, var(--surface-2));
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    color: var(--accent-bright);
}

.op-nav-btn--next:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent-bright);
    color: var(--cfg-010811);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* Media Segmented Control Bar */
.op-lesson-media-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: var(--radius-lg);
}

.op-media-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.op-media-tab:hover {
    color: var(--text-primary);
    background: var(--cbg-ffffff-a04);
}

.op-media-tab--active {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    color: var(--accent-bright);
    box-shadow: 0 2px 8px var(--csh-000000-a2);
}

.op-media-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    color: var(--accent-bright);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Practice CTA Box (Gamified Call-to-action) */

/* Road signs grid thumbnails */
.op-signs-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 10px;
}

.op-sign-mini-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cbg-ffffff-a03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.op-sign-mini-item:hover {
    transform: scale(1.08);
    border-color: var(--accent);
    background: var(--cbg-ffffff-a08);
    box-shadow: 0 4px 12px var(--csh-000000-a3);
}

.op-sign-mini-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Video Player container */
.op-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--cbg-000000);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.op-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Login: Telegram sign-in options (open bot / scan QR) */

/* Bottom-nav "Boshqa" (More) menu */
.op-bottomnav__more{ cursor:pointer; }
/* keep the More popup clear of Telegram's bottom inset */
body.tg-fullscreen .op-bottomnav{ padding-bottom: var(--tg-inset-bottom, 0px); }

/* =============================================================================
   Login page — premium redesign
   --------------------------------------------------------------------------
   Dark theme (default):  deep navy backgrounds, green/cyan accents, glass card.
   Light theme (.login-page--light): white/warm-white card, orange accent.
   ========================================================================== */

/* ── Design tokens (login-scoped) ── */
.login-page {
    --lp-accent: #02C076;
    --lp-accent-bright: #05E08B;
    --lp-accent-glow: rgba(2, 192, 118, 0.25);
    --lp-accent-soft: rgba(2, 192, 118, 0.10);
    --lp-card-bg: rgba(8, 21, 33, 0.72);
    --lp-card-border: rgba(2, 192, 118, 0.18);
    --lp-card-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    --lp-text: #E6EDF0;
    --lp-text-secondary: #97ABB6;
    --lp-text-muted: #67727A;
    --lp-method-bg: rgba(13, 31, 43, 0.85);
    --lp-method-border: rgba(2, 192, 118, 0.14);
    --lp-input-bg: rgba(6, 16, 28, 0.7);
    --lp-input-border: rgba(26, 42, 53, 0.8);
    --lp-divider: rgba(255, 255, 255, 0.06);
    --lp-topbar-bg: rgba(1, 8, 17, 0.55);
    --lp-btn-primary-bg: var(--lp-accent);
    --lp-btn-primary-text: #fff;
}

.login-page--light {
    --lp-accent: #F07A1A;
    --lp-accent-bright: #FF8C2E;
    --lp-accent-glow: rgba(240, 122, 26, 0.20);
    --lp-accent-soft: rgba(240, 122, 26, 0.08);
    --lp-card-bg: rgba(255, 255, 255, 0.82);
    --lp-card-border: rgba(240, 122, 26, 0.18);
    --lp-card-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    --lp-text: #1A1A2E;
    --lp-text-secondary: #555;
    --lp-text-muted: #888;
    --lp-method-bg: rgba(255, 255, 255, 0.75);
    --lp-method-border: rgba(240, 122, 26, 0.14);
    --lp-input-bg: rgba(255, 255, 255, 0.85);
    --lp-input-border: rgba(200, 200, 200, 0.6);
    --lp-divider: rgba(0, 0, 0, 0.08);
    --lp-topbar-bg: rgba(255, 255, 255, 0.55);
    --lp-btn-primary-bg: #F07A1A;
    --lp-btn-primary-text: #fff;
}

/* ── Page shell ── */
.login-page {
    position: fixed;
    inset: 0;
    /* The screen is the page: a topbar and a card area that share the viewport. Nothing here
       scrolls the page; the card shrinks to fit (see the sizing below), and only a screen too
       small even for that scrolls inside the card area. */
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    z-index: 9999;
    font-family: var(--font-body);
    color: var(--lp-text);
}

/* ── Background ── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}
.login-bg__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.login-bg__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.45) 100%);
}
.login-page--light .login-bg__overlay {
    background: radial-gradient(ellipse at center, transparent 0%, rgba(255,255,255,0.15) 100%);
}

/* ── Top bar ── */
.login-topbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: clamp(8px, 1.8vh, 16px) clamp(14px, 3vw, 28px);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: var(--lp-topbar-bg);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.login-page--light .login-topbar {
    border-bottom-color: rgba(0,0,0,0.06);
}
.login-topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.login-topbar__logo-img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}
.login-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Centered layout ── */
.login-center {
    position: relative;
    z-index: 5;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(8px, 2.5vh, 32px) clamp(10px, 3vw, 20px);
}

/* ── Glassmorphism card ── */
.login-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 580px;
    margin: auto;   /* centred both ways, and never cropped at the top when it overflows */
    background: var(--lp-card-bg);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid var(--lp-card-border);
    border-radius: 24px;
    padding: clamp(16px, 4vh, 40px) clamp(18px, 4vw, 36px) clamp(14px, 3vh, 32px);
    box-shadow: var(--lp-card-shadow);
    animation: loginCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

/* ── Header ── */
.login-card__header {
    text-align: center;
    margin-bottom: clamp(10px, 3vh, 28px);
}
.login-card__tg-logo {
    width: clamp(52px, 13vh, 120px);
    height: auto;
    margin-bottom: clamp(6px, 1.6vh, 16px);
    filter: drop-shadow(0 8px 30px rgba(2, 192, 118, 0.25));
    animation: loginLogoFloat 3.5s ease-in-out infinite;
}
.login-page--light .login-card__tg-logo {
    filter: drop-shadow(0 8px 30px rgba(240, 122, 26, 0.2));
}
.login-card__tg-logo--sm {
    width: 80px;
}
@keyframes loginLogoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.login-card__title {
    font-family: var(--font-body);
    font-size: clamp(1.25rem, 3.4vh, 1.65rem);
    font-weight: 600;
    color: var(--lp-text);
    margin: 0 0 8px;
    line-height: 1.3;
}
.login-card__title-bold {
    font-weight: 800;
    color: var(--lp-accent);
}
.login-card__subtitle {
    font-size: 0.88rem;
    color: var(--lp-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ── Two methods row ── */
.login-methods {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin-bottom: clamp(8px, 2vh, 20px);
}
.login-methods__or {
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--lp-text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.login-method-card {
    flex: 1;
    background: var(--lp-method-bg);
    border: 1px solid var(--lp-method-border);
    border-radius: 16px;
    padding: clamp(10px, 2.4vh, 20px) 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.login-method-card:hover {
    border-color: var(--lp-accent);
    box-shadow: 0 0 20px var(--lp-accent-glow);
}
.login-method-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--lp-accent-soft);
    color: var(--lp-accent);
    margin-bottom: 12px;
    border: 1px solid var(--lp-method-border);
}
.login-method-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--lp-text);
    margin: 0 0 6px;
}
.login-method-card__desc {
    font-size: 0.78rem;
    color: var(--lp-text-secondary);
    margin: 0 0 14px;
    line-height: 1.4;
}

/* ── QR box ── */
.login-qr-wrap {
    position: relative;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    --qr: clamp(104px, 21vh, 170px);
    width: var(--qr);
    height: var(--qr);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
    overflow: hidden;
}
.login-qr-wrap img, .login-qr-wrap canvas {
    display: block;
    width: calc(var(--qr) - 20px);
    height: calc(var(--qr) - 20px);
    position: relative;
    z-index: 1;
}
.login-qr-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--lp-accent);
    box-shadow: 0 0 15px 4px var(--lp-accent-glow);
    z-index: 2;
    animation: scanQr 2.5s ease-in-out infinite;
    opacity: 0.8;
}
@keyframes scanQr {
    0%, 100% { top: 0; opacity: 0; }
    10%, 90% { opacity: 0.8; }
    50% { top: calc(100% - 4px); }
}

/* ── Session polling status ── */
.login-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 clamp(6px, 1.6vh, 16px);
    text-align: center;
    font-size: 0.82rem;
    color: var(--lp-text-secondary);
}

/* ── Buttons ── */
.login-btn {
    box-sizing: border-box;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.22s ease;
    text-decoration: none;
    border: none;
    padding: 12px 20px;
    line-height: 1.3;
}
.login-btn--primary {
    background: var(--lp-btn-primary-bg);
    color: var(--lp-btn-primary-text);
    font-size: 0.82rem;
    padding: 10px 16px;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 4px 14px var(--lp-accent-glow);
}
.login-btn--primary:hover {
    box-shadow: 0 6px 24px var(--lp-accent-glow);
    transform: translateY(-1px);
    filter: brightness(1.1);
}
.login-btn--accent {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-bright));
    color: #fff;
    font-size: 0.95rem;
    padding: 14px 24px;
    box-shadow: 0 6px 24px var(--lp-accent-glow);
}
.login-btn--accent:hover {
    box-shadow: 0 8px 32px var(--lp-accent-glow);
    transform: translateY(-2px);
    filter: brightness(1.08);
}
.login-btn--accent:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: none;
    box-shadow: none;
}
.login-btn--text {
    background: transparent;
    color: var(--lp-accent);
    padding: 8px 16px;
}
.login-btn--text:hover {
    background: var(--lp-accent-soft);
}
.login-btn--full {
    width: 100%;
}

/* ── Security footer ── */
.login-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--lp-accent);
    opacity: 0.75;
    margin-top: 4px;
}

/* ── Signup form ── */
.login-signup-form {
    margin-top: 8px;
}
/* Override MudBlazor field colors to match card theme */
.login-card .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--lp-input-border) !important;
}
.login-card .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--lp-accent) !important;
}
.login-card .mud-input.mud-input-outlined.mud-input-adorned-end {
    color: var(--lp-text);
}
.login-card .mud-input-label {
    color: var(--lp-text-secondary) !important;
}
.login-card .mud-input {
    color: var(--lp-text) !important;
}
.login-card .mud-select .mud-input {
    color: var(--lp-text) !important;
}

/* A short screen: drop what is only explanation, so the actions still fit. */
@media (max-height: 760px) {
    .login-card__subtitle,
    .login-method-card__desc { display: none; }
    .login-method-card__icon { display: none; }
    .login-secure { display: none; }
}

@media (max-height: 620px) {
    .login-card__tg-logo { display: none; }
    .login-status { display: none; }
}

/* ── Responsive ── */
@media (max-width: 620px) {
    .login-card {
        padding: 28px 20px 24px;
        border-radius: 20px;
        max-width: 100%;
    }
    .login-methods {
        flex-direction: column;
        align-items: center;
    }
    .login-methods__or,
    .login-method-card--qr {
        display: none;
    }
    .login-method-card {
        width: 100%;
        max-width: 100%;
    }
    .login-card__tg-logo {
        width: 90px;
    }
    .login-card__title {
        font-size: 1.35rem;
    }
    .login-topbar {
        padding: 12px 16px;
    }
    .login-center {
        padding: 10px 12px;
    }
}

/* =============================================================================
   Light Theme Overrides
   ========================================================================== */
.light-theme .op-bottomnav__item--active .op-bottomnav__icon-wrap { background: var(--accent-glow); color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.light-theme .op-sheet-profile-btn { background: var(--accent-glow); border: 1px solid var(--accent-glow); color: var(--accent); }
.light-theme .op-sheet-profile-btn:hover { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.light-theme .op-month-card.is-current-month { border-color: var(--accent-glow); background: var(--accent-soft); box-shadow: 0 0 16px var(--accent-soft); }
.light-theme .is-current-month .op-month-card__sub, .light-theme .is-current-month .op-month-card__title { color: var(--accent); }
.light-theme .op-month-cell.level-4 { background: var(--accent); color: #010811; box-shadow: 0 0 10px var(--accent-glow); }
.light-theme .op-heatmap-legend-box.level-1 { background: var(--accent-soft); }
.light-theme .op-heatmap-legend-box.level-2 { background: var(--accent-glow); }
.light-theme .op-heatmap-legend-box.level-3 { background: var(--accent); opacity: 0.82; }
.light-theme .op-heatmap-legend-box.level-4 { background: var(--accent); }
.light-theme .op-prof-readiness-score__val { color: var(--accent); }
.light-theme .op-home-hero { background: radial-gradient(circle at 80% 50%, var(--accent-soft) 0%, transparent 60%), var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-home-hero__welcome { color: var(--accent); }
.light-theme .op-home-stat-card { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-home-stat-card:hover { border-color: var(--accent); }
.light-theme .op-home-stat-track { background: var(--border); }
.light-theme .op-home-stat-fill { background: var(--accent); }
.light-theme .op-home-feature-card { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-home-feature-card--green:hover { border-color: var(--accent); box-shadow: 0 10px 30px var(--accent-soft); }
.light-theme .op-home-feature-card__arrow--green { background: var(--accent); }
.light-theme .op-home-goal-card { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-home-goal-track { background: var(--border); }
.light-theme .op-home-goal-fill { background: var(--accent); }
.light-theme .op-home-goal-btn { background: var(--accent); }
.light-theme .op-home-tool-card { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-home-tool-card:hover { border-color: var(--accent); }
.light-theme .op-vidmodal { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-vidmodal__frame { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-blog-card { background: var(--bg-card); border: 1px solid var(--border); }
.light-theme .op-blog-article__body a { color: var(--accent); }
.light-theme .op-rte .ql-toolbar { border-color: var(--border) !important; }
.light-theme .op-rte .ql-container { border-color: var(--border) !important; }
.light-theme .op-rte .ql-snow.ql-toolbar button:hover .ql-stroke, .light-theme .op-rte .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
.light-theme .op-rte .ql-snow.ql-toolbar button:hover .ql-fill, .light-theme .op-rte .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--accent); }
.light-theme .op-rte .ql-snow .ql-picker-options { border-color: var(--border); }
.light-theme .op-blog-card--btn { border: 1px solid var(--border); background: var(--bg-card); }
.light-theme .op-blog-article__share { border: 1px solid var(--border); }
.light-theme .op-blog-article__share:hover { border-color: var(--accent); color: var(--accent); }
.light-theme .op-chip { border: 1px solid var(--border); }
.light-theme .op-answer-card { border: 1px solid var(--border); }
body.light-theme.login-page, .light-theme .login-page { --lp-accent: var(--accent); --lp-accent-soft: var(--accent-soft); --lp-card-border: var(--accent-glow); }

/* =============================================================================
   Light theme: boxes. On a white page a 1px pale line disappears, so cards get a firmer
   edge, and hovering one washes it orange - so what can be clicked reads as clickable.
   Dark theme untouched (everything is behind html.light-theme).
   Left alone on purpose: exam-centre cards (their coloured left edge is a category
   marker), the highlighted current month, and the dashboard feature cards' own hover
   colours. Big .op-card panels (forms, settings) get the edge but no hover wash.
   ============================================================================= */
html.light-theme :is(
    .op-card,
    .op-rcard,
    .op-ccard,
    .op-signcard,
    .op-ticket-card,
    .op-sheet-card,
    .op-short-card,
    .op-resume-card,
    .op-month-card,
    .op-answer-card,
    .op-vid-card,
    .op-blog-card,
    .op-progress-card,
    .op-stat-card,
    .op-prof-action-card,
    .op-home-stat-card,
    .op-home-feature-card,
    .op-home-tool-card,
    .op-home-goal-card
):not(.op-ccard):not(.is-current-month) {
    border-width: 2px;
    border-style: solid;
    border-color: #F0A872;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.10);
}

html.light-theme :is(
    .op-rcard,
    .op-ccard,
    .op-signcard,
    .op-ticket-card,
    .op-sheet-card,
    .op-short-card,
    .op-resume-card,
    .op-month-card,
    .op-answer-card,
    .op-vid-card,
    .op-blog-card,
    .op-progress-card,
    .op-stat-card,
    .op-prof-action-card,
    .op-home-stat-card,
    .op-home-feature-card,
    .op-home-tool-card,
    .op-home-goal-card
) {
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

html.light-theme :is(
    .op-rcard,
    .op-ccard,
    .op-signcard,
    .op-ticket-card,
    .op-sheet-card,
    .op-short-card,
    .op-resume-card,
    .op-month-card,
    .op-answer-card,
    .op-vid-card,
    .op-blog-card,
    .op-progress-card,
    .op-stat-card,
    .op-prof-action-card,
    .op-home-stat-card,
    .op-home-feature-card,
    .op-home-tool-card,
    .op-home-goal-card
):hover {
    background: #FFF4EB;
    box-shadow: 0 8px 22px rgba(234, 88, 12, 0.16);
}

html.light-theme :is(
    .op-rcard,
    .op-signcard,
    .op-ticket-card,
    .op-sheet-card,
    .op-short-card,
    .op-resume-card,
    .op-month-card,
    .op-answer-card,
    .op-vid-card,
    .op-blog-card,
    .op-progress-card,
    .op-stat-card,
    .op-prof-action-card,
    .op-home-stat-card,
    .op-home-tool-card,
    .op-home-goal-card
):not(.is-current-month):hover {
    border-color: #EA580C;
}

@media (prefers-reduced-motion: reduce) {
    html.light-theme :is(.op-rcard, .op-ccard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card, .op-progress-card, .op-stat-card, .op-prof-action-card, .op-home-stat-card, .op-home-feature-card, .op-home-tool-card, .op-home-goal-card) { transition: none; }
}

/* =============================================================================
   Full-height sidebar
   The sidebar runs the full screen height with the brand at its top; the top bar sits
   to its right. One round toggle on the sidebar's edge, at mid-height, collapses it to
   a thin strip (its edge stays visible) and expands it again.
     >= 1280px   pinned: open pushes the page and the bar over; collapsed -> the strip
     960-1279px  slides over the page when open (no squeeze); the strip when collapsed
     < 960px     phones: bottom bar as before, no strip or toggle
   ============================================================================= */
:root {
    --rail-w: 14px;
    --drawer-w: var(--mud-drawer-width-left, 268px);
}

/* Same height as the top bar, so the two bottom lines meet across the screen. */
.op-drawer__brand {
    flex: 0 0 auto;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
}

/* The brand takes the top of the column; the menu fills the rest and scrolls. */
.mud-drawer-content > .op-drawer {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.op-shell .mud-appbar:not(.op-bottomnav) {
    transition: left .22s ease;
}

@media (min-width: 960px) {
    .op-shell--closed .mud-appbar:not(.op-bottomnav) {
        left: var(--rail-w) !important;
        width: auto !important;
        right: 0 !important;
    }
    .op-shell--closed .mud-main-content { margin-left: var(--rail-w) !important; }
}

@media (min-width: 960px) and (max-width: 1279.98px) {
    /* Open here means sliding over the page, so the bar and page stay at the strip. */
    .op-shell--open .mud-appbar:not(.op-bottomnav) {
        left: var(--rail-w) !important;
        width: auto !important;
        right: 0 !important;
    }
    .op-shell .mud-main-content { margin-left: var(--rail-w) !important; }
}

@media (min-width: 1280px) {
    .op-shell--open .mud-appbar:not(.op-bottomnav) {
        left: var(--drawer-w) !important;
        width: auto !important;
        right: 0 !important;
    }
}

/* What is left of the sidebar when it is collapsed: its edge. */
.op-drawer-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail-w);
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 1200;
}

/* Centred on the sidebar's right edge (or the strip's, when collapsed). */
.op-drawer-toggle {
    position: fixed;
    top: 50%;
    left: calc(var(--rail-w) - 14px);
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong, var(--border));
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    z-index: 1310;
    transition: left .22s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.op-drawer-toggle--open { left: calc(var(--drawer-w) - 14px); }
.op-drawer-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.op-drawer-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body.tg-fullscreen .op-drawer-rail { top: var(--tg-top); }

@media (max-width: 959.98px) {
    .op-drawer-toggle,
    .op-drawer-rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .op-shell .mud-appbar:not(.op-bottomnav),
    .op-drawer-toggle { transition: none; }
}

/* =============================================================================
   Light theme: colour and motion. Light gets a quieter
   atmosphere instead — soft colour washes behind the page, a few tinted accents, and
   short, gentle motion. Everything sits behind html.light-theme, and every animation
   switches off under prefers-reduced-motion.
   ============================================================================= */

/* --- Atmosphere: warm orange top-right, soft blue bottom-left, a hint of teal. White
       cards sit on top, so the colour only shows in the gaps between them. --- */
html.light-theme body,
html.light-theme .mud-layout,
html.light-theme .mud-main-content {
    background: transparent !important;
}

html.light-theme body::before {
    content: "";
    position: fixed;
    inset: -12%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(38% 34% at 88% 8%,  rgba(249, 115, 22, 0.13), transparent 70%),
        radial-gradient(34% 36% at 6% 92%,  rgba(59, 130, 246, 0.10), transparent 70%),
        radial-gradient(30% 28% at 52% 58%, rgba(20, 184, 166, 0.06), transparent 70%);
    animation: op-light-drift 38s ease-in-out infinite alternate;
}

@keyframes op-light-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-2.5%, 2%, 0) scale(1.06); }
}

/* --- Pages rise in on navigation; grid cards follow a beat apart. --- */
html.light-theme .op-page {
    animation: op-light-rise .42s cubic-bezier(.2, .7, .2, 1) both;
}

html.light-theme .op-page .mud-grid > .mud-grid-item {
    animation: op-light-rise .46s cubic-bezier(.2, .7, .2, 1) both;
}
html.light-theme .op-page .mud-grid > .mud-grid-item:nth-child(2) { animation-delay: .05s; }
html.light-theme .op-page .mud-grid > .mud-grid-item:nth-child(3) { animation-delay: .10s; }
html.light-theme .op-page .mud-grid > .mud-grid-item:nth-child(4) { animation-delay: .15s; }
html.light-theme .op-page .mud-grid > .mud-grid-item:nth-child(5) { animation-delay: .20s; }
html.light-theme .op-page .mud-grid > .mud-grid-item:nth-child(6) { animation-delay: .25s; }
html.light-theme .op-page .mud-grid > .mud-grid-item:nth-child(n+7) { animation-delay: .30s; }

/* Ends on transform: none, so nothing inside is left with a transformed ancestor (that
   would re-anchor any position: fixed child, such as a floating button). */
@keyframes op-light-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* --- Cards lift a little when hovered (the orange wash comes from the box rules). --- */
html.light-theme :is(.op-rcard, .op-ccard, .op-signcard, .op-ticket-card, .op-sheet-card,
    .op-short-card, .op-resume-card, .op-answer-card, .op-vid-card, .op-blog-card,
    .op-progress-card, .op-stat-card, .op-prof-action-card, .op-home-stat-card,
    .op-home-feature-card, .op-home-tool-card, .op-home-goal-card):hover {
    transform: translateY(-3px);
}

/* --- Dashboard stat icons: each on its own tinted disc. --- */
html.light-theme .op-home-stat-card__icon {
    box-sizing: border-box;
    padding: 5px;
    border-radius: 12px;
    background: #FFEDE0;
}
html.light-theme .mud-grid-item:nth-child(2) > .op-home-stat-card .op-home-stat-card__icon { background: #E3EDFF; }
html.light-theme .mud-grid-item:nth-child(3) > .op-home-stat-card .op-home-stat-card__icon { background: #DDF5EA; }
html.light-theme .mud-grid-item:nth-child(4) > .op-home-stat-card .op-home-stat-card__icon { background: #FFF2CC; }

/* --- Primary buttons: a deeper orange gradient, a soft coloured shadow, and a sheen
       that sweeps across on hover. --- */
html.light-theme :is(.mud-button-filled.mud-button-filled-primary, .op-home-hero__btn, .op-home-goal-btn) {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 55%, #D9480F 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.28);
    transition: box-shadow .2s ease, transform .2s ease;
}
html.light-theme :is(.mud-button-filled.mud-button-filled-primary, .op-home-hero__btn, .op-home-goal-btn):hover {
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.36);
    transform: translateY(-1px);
}
html.light-theme :is(.mud-button-filled.mud-button-filled-primary, .op-home-hero__btn, .op-home-goal-btn)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-120%);
    pointer-events: none;
}
html.light-theme :is(.mud-button-filled.mud-button-filled-primary, .op-home-hero__btn, .op-home-goal-btn):hover::after {
    transform: translateX(120%);
    transition: transform .7s ease;
}

/* --- Progress: orange into amber, grows in when the page loads. --- */
html.light-theme :is(.op-home-stat-fill, .op-home-goal-fill) {
    background: linear-gradient(90deg, #EA580C, #F59E0B) !important;
    transform-origin: left center;
    animation: op-light-grow .9s cubic-bezier(.2, .7, .2, 1) .15s both;
}
@keyframes op-light-grow {
    from { transform: scaleX(0); }
    to   { transform: none; }
}

/* --- Sidebar: the current page sits on a warm pill. --- */
html.light-theme .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(234, 88, 12, 0.14), rgba(245, 158, 11, 0.06)) !important;
    color: #C2410C !important;
}

@media (prefers-reduced-motion: reduce) {
    html.light-theme body::before,
    html.light-theme .op-page,
    html.light-theme .op-page .mud-grid > .mud-grid-item,
    html.light-theme :is(.op-home-stat-fill, .op-home-goal-fill) { animation: none; }
    html.light-theme :is(.op-rcard, .op-ccard, .op-signcard, .op-ticket-card, .op-sheet-card,
        .op-short-card, .op-resume-card, .op-answer-card, .op-vid-card, .op-blog-card,
        .op-progress-card, .op-stat-card, .op-prof-action-card, .op-home-stat-card,
        .op-home-feature-card, .op-home-tool-card, .op-home-goal-card):hover { transform: none; }
    html.light-theme :is(.mud-button-filled.mud-button-filled-primary, .op-home-hero__btn, .op-home-goal-btn)::after { display: none; }
}

/* ==========================================================================
   Dashboard artwork: the hero and the four feature cards carry a picture per
   theme (Images/dashboard/*-dark|light.webp). The swap is the usual
   .op-theme-dark / .op-theme-light pair.
   ========================================================================== */
.op-home-hero { --hero-fade: rgba(10, 17, 26, 0.88); background: #0E151E; }
html.light-theme .op-home-hero { --hero-fade: rgba(255, 255, 255, 0.92); background: #FFFFFF; }

.op-home-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    z-index: 0;
    pointer-events: none;
}

/* Stacked layout: the text sits over the car, so fade the picture behind it. */
@media (max-width: 960px) {
    .op-home-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        background: linear-gradient(180deg, var(--hero-fade) 0%, var(--hero-fade) 40%, transparent 100%);
        pointer-events: none;
    }
    .op-home-hero__bg { object-position: 70% center; }
}

.op-home-feature-card { overflow: hidden; }

.op-home-feature-card__media {
    margin: -20px -20px 14px;
    height: 132px;
    overflow: hidden;
    flex-shrink: 0;
}
.op-home-feature-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.op-home-feature-card:hover .op-home-feature-card__media img { transform: scale(1.04); }

@media (max-width: 600px) {
    .op-home-feature-card__media { margin: -12px -10px 8px; height: 74px; }
}
@media (prefers-reduced-motion: reduce) {
    .op-home-feature-card__media img { transition: none; }
    .op-home-feature-card:hover .op-home-feature-card__media img { transform: none; }
}

/* The hero picture already has a car, so the ring must not sit on it.
   The ring gets its own frosted disc so it reads on any part of the picture. */
.op-home-hero__ring-wrap {
    border-radius: 50%;
    background: var(--hero-fade);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
@media (max-width: 960px) {
    .op-home-hero__visual { justify-content: flex-end; }
    .op-home-hero__ring-wrap { width: 104px; height: 104px; }
}

/* ==========================================================================
   Plans page (/tariflar): FREE / PLUS / PRO side by side. Each card takes its
   colour from --plan; PRO is the featured one.
   ========================================================================== */
.op-plans-head { text-align: center; margin: 8px auto 28px; max-width: 640px; }
.op-plans-head__title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; margin: 0 0 8px; color: var(--text); text-wrap: balance; }
.op-plans-head__sub { margin: 0; color: var(--text-secondary); font-size: 0.98rem; line-height: 1.5; }

.op-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.op-plan {
    --plan: var(--text-secondary);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 24px 22px;
    border-radius: var(--radius-card);
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.op-plan--plus { --plan: var(--cbg-3b82f6); }
.op-plan--pro  { --plan: var(--cbg-f5ad05); }
html.light-theme .op-plan--pro { --plan: #EA580C; }

.op-plan:hover { transform: translateY(-4px); border-color: var(--plan); box-shadow: 0 14px 34px color-mix(in srgb, var(--plan) 18%, transparent); }
.op-plan--featured {
    border-color: var(--plan);
    background: linear-gradient(180deg, color-mix(in srgb, var(--plan) 10%, var(--bg-card)) 0%, var(--bg-card) 45%);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--plan) 16%, transparent);
}
.op-plan--current { outline: 3px solid color-mix(in srgb, var(--plan) 45%, transparent); outline-offset: 3px; }

.op-plan__ribbon {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    padding: 4px 14px; border-radius: 999px;
    background: var(--plan); color: #0B1220;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
html.light-theme .op-plan--pro .op-plan__ribbon { color: #FFFFFF; }

.op-plan__name { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.14em; color: var(--plan); }
.op-plan__price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 6px; flex-wrap: wrap; }
.op-plan__amount { font-size: 2.2rem; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.op-plan__amount--soon { font-size: 1.5rem; color: var(--text-secondary); }
.op-plan__unit { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.op-plan__blurb { margin: 0 0 16px; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.45; min-height: 2.6em; }

.op-plan__list { list-style: none; margin: 0 0 22px; padding: 16px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.op-plan__list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; line-height: 1.35; color: var(--text); }
.op-plan__list li .mud-icon-root { flex-shrink: 0; margin-top: 1px; }
.op-plan__list li.is-on .mud-icon-root { color: var(--plan); }
.op-plan--free .op-plan__list li.is-on .mud-icon-root { color: var(--accent); }
.op-plan__list li.is-off { color: var(--text-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 50%, transparent); }
.op-plan__list li.is-off .mud-icon-root { color: var(--text-muted); opacity: 0.6; }

.op-plan__cta { margin-top: auto; }
.op-plan__btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; box-sizing: border-box; padding: 12px 18px; border-radius: 999px;
    background: var(--plan); color: #0B1220; border: 2px solid var(--plan);
    font-weight: 800; font-size: 0.92rem; text-decoration: none; cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}
html.light-theme .op-plan--pro .op-plan__btn:not(.op-plan__btn--current),
.op-plan--plus .op-plan__btn:not(.op-plan__btn--current) { color: #FFFFFF; }
button.op-plan__btn { font-family: inherit; }
.op-plan__btn:disabled { opacity: .6; cursor: progress; filter: none; }
.op-plans-notice {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    max-width: 640px; margin: 0 auto 22px; padding: 12px 18px; border-radius: 14px;
    font-size: .92rem; font-weight: 600; text-align: left;
    color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent);
    border: 1px solid var(--border-light);
}
.op-plans-notice--ok { color: #10B981; background: color-mix(in srgb, #10B981 14%, transparent); border-color: color-mix(in srgb, #10B981 45%, transparent); }
html.light-theme .op-plans-notice--ok { color: #15803D; }
.op-plan__btn:hover { filter: brightness(1.08); }
.op-plan__btn:active { transform: scale(0.98); }
.op-plan__btn:focus-visible { outline: 2px solid var(--plan); outline-offset: 3px; }
.op-plan__btn--ghost { background: transparent; color: var(--text); border-color: var(--border-light); }
.op-plan__btn--ghost:hover { border-color: var(--accent); filter: none; }
.op-plan__btn--current { background: transparent; color: var(--plan); border-color: color-mix(in srgb, var(--plan) 45%, transparent); cursor: default; }
.op-plan--free .op-plan__btn--current { color: var(--text-secondary); border-color: var(--border-light); }

.op-plans-foot { text-align: center; margin: 24px auto 8px; max-width: 620px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }

@media (max-width: 960px) {
    .op-plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 26px; }
    .op-plan--featured { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
    .op-plan, .op-plan__btn { transition: none; }
    .op-plan:hover { transform: none; }
}

/* ==========================================================================
   Upgrade prompt (UpgradeDialog) and the locked teasers that open it.
   --plan is the colour of the plan being sold: blue for PLUS, gold (dark) /
   orange (light) for PRO.
   ========================================================================== */
.op-upsell { --plan: #F5AD05; --plan-ink: #0B1220; border-radius: 24px !important; overflow: hidden; }
.op-upsell--plus { --plan: #3B82F6; --plan-ink: #FFFFFF; }
html.light-theme .op-upsell--pro { --plan: #EA580C; --plan-ink: #FFFFFF; }

.op-upsell .op-upsell__body {
    position: relative;
    padding: 28px 24px 18px !important;
    text-align: center;
    background:
        radial-gradient(420px 220px at 50% -40px, color-mix(in srgb, var(--plan) 22%, transparent), transparent 70%),
        var(--bg-card);
}

.op-upsell__x {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-secondary);
    cursor: pointer;
}
.op-upsell__x:hover { color: var(--text); border-color: var(--plan); }

.op-upsell__art { position: relative; width: 112px; height: 112px; margin: 0 auto 12px; }
.op-upsell__blob {
    position: absolute; inset: 0; border-radius: 42% 58% 55% 45% / 50% 42% 58% 50%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--plan) 85%, #fff), var(--plan));
    box-shadow: 0 14px 34px color-mix(in srgb, var(--plan) 40%, transparent);
    animation: op-upsell-morph 6s ease-in-out infinite;
}
.op-upsell__emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; animation: op-upsell-bob 2.6s ease-in-out infinite; }
.op-upsell__spark { position: absolute; font-size: 1.1rem; animation: op-upsell-twinkle 2.2s ease-in-out infinite; }
.op-upsell__spark--a { top: -4px; right: -8px; }
.op-upsell__spark--b { bottom: 4px; left: -10px; animation-delay: 1.1s; }

.op-upsell__plan {
    display: inline-block; padding: 3px 12px; border-radius: 999px; margin-bottom: 8px;
    background: var(--plan); color: var(--plan-ink);
    font-size: 0.72rem; font-weight: 900; letter-spacing: 0.14em;
}
.op-upsell__title { margin: 0 0 6px; font-size: 1.35rem; font-weight: 900; line-height: 1.2; color: var(--text); text-wrap: balance; }
.op-upsell__text { margin: 0 auto 14px; max-width: 34ch; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; }

.op-upsell__proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.op-upsell__chip {
    padding: 5px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
    background: color-mix(in srgb, var(--plan) 12%, transparent); color: var(--text);
    border: 1px solid color-mix(in srgb, var(--plan) 35%, transparent);
}
.op-upsell__chip--warn { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); }

.op-upsell__perks { list-style: none; margin: 0 auto 16px; padding: 0; display: grid; gap: 7px; max-width: 300px; text-align: left; }
.op-upsell__perks li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text); }
.op-upsell__perks .mud-icon-root { color: var(--plan); flex-shrink: 0; }

.op-upsell__price { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.op-upsell__price-main { font-size: 1.05rem; font-weight: 900; color: var(--plan); }
.op-upsell__price-sub { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.op-upsell__actions { display: grid; gap: 8px; }
.op-upsell__btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
    width: 100%; box-sizing: border-box; padding: 12px 18px; border-radius: 999px;
    background: var(--plan); color: var(--plan-ink); border: 2px solid var(--plan);
    font: inherit; font-weight: 800; font-size: 0.95rem; text-decoration: none; cursor: pointer;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--plan) 35%, transparent);
    transition: transform 0.12s ease, filter 0.15s ease;
}
.op-upsell__btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.op-upsell__btn:active { transform: scale(0.98); }
.op-upsell__btn:focus-visible { outline: 2px solid var(--plan); outline-offset: 3px; }
.op-upsell__btn[disabled] { opacity: 0.7; cursor: progress; }
.op-upsell__btn--trial { background: linear-gradient(135deg, #10B981, #059669); border-color: #059669; color: #fff; box-shadow: 0 8px 22px rgba(16, 185, 129, 0.35); }
.op-upsell__btn--ghost { background: transparent; color: var(--text); box-shadow: none; border-color: color-mix(in srgb, var(--plan) 55%, transparent); }
.op-upsell__hint { font-size: 0.78rem; color: var(--text-muted); }

.op-upsell__invite {
    display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px;
    border-radius: 14px; border: 1px dashed var(--border-light);
    color: var(--text-secondary); font-size: 0.82rem; line-height: 1.35; text-align: left; text-decoration: none;
}
.op-upsell__invite:hover { border-color: var(--accent); color: var(--text); }
.op-upsell__invite b { color: var(--text); }
.op-upsell__invite-icon { font-size: 1.4rem; flex-shrink: 0; }

.op-upsell__foot { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-muted); }
.op-upsell__link { background: none; border: 0; padding: 4px; font: inherit; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.op-upsell__link:hover { color: var(--text); }

@keyframes op-upsell-morph {
    0%, 100% { border-radius: 42% 58% 55% 45% / 50% 42% 58% 50%; transform: rotate(0deg); }
    50% { border-radius: 58% 42% 45% 55% / 42% 58% 50% 50%; transform: rotate(8deg); }
}
@keyframes op-upsell-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes op-upsell-twinkle { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }

/* Locked text: the opening words, faded, under a call to open the rest. */
.op-locked-teaser {
    position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%;
    padding: 14px 16px; border-radius: 14px; text-align: left; cursor: pointer; font: inherit;
    border: 1.5px dashed color-mix(in srgb, #F5AD05 60%, transparent);
    background: color-mix(in srgb, #F5AD05 7%, var(--bg-card));
    transition: border-color 0.15s ease, transform 0.12s ease;
}
html.light-theme .op-locked-teaser { border-color: rgba(234, 88, 12, 0.5); background: #FFF7F0; }
.op-locked-teaser:hover { border-style: solid; transform: translateY(-1px); }
.op-locked-teaser:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.op-locked-teaser__text {
    color: var(--text); font-size: 0.9rem; line-height: 1.5;
    filter: blur(2.5px); opacity: 0.75; user-select: none;
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent);
    mask-image: linear-gradient(90deg, #000 55%, transparent);
}
.op-locked-teaser__text:empty { display: none; }
.op-locked-teaser__cta { font-weight: 800; font-size: 0.86rem; color: #D97706; }
html.light-theme .op-locked-teaser__cta { color: #EA580C; }
.op-locked-teaser--compact { padding: 10px 12px; gap: 6px; }
.op-locked-teaser--compact .op-locked-teaser__text { font-size: 0.82rem; }

.op-answer-card__rule--locked { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; opacity: 0.85; }
.op-answer-card__rule--locked:hover { opacity: 1; text-decoration: underline; }

/* Locked lesson video: the poster, dimmed, with a play button that opens the prompt. */
.op-video-locked {
    position: relative; display: grid; place-items: center; align-content: center; gap: 10px; width: 100%;
    aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
    background: linear-gradient(135deg, #1E293B, #0F172A); color: #fff; font: inherit;
}
.op-video-locked::before {
    content: ""; position: absolute; inset: 0;
    background: var(--poster, none) center / cover no-repeat;
    filter: blur(3px) brightness(0.55); transform: scale(1.05);
}
.op-video-locked > * { position: relative; }
.op-video-locked__play {
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.92); color: #0F172A;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: transform 0.15s ease;
}
.op-video-locked__play .mud-icon-root { font-size: 2.2rem; }
.op-video-locked:hover .op-video-locked__play { transform: scale(1.08); }
.op-video-locked__label { font-weight: 800; font-size: 0.92rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

/* Locked audio: plays a short sample, with this strip saying so. */
.op-audio-sample {
    display: block; width: 100%; margin-bottom: 8px; padding: 7px 12px; border-radius: 10px;
    border: 1px dashed rgba(59, 130, 246, 0.55); background: rgba(59, 130, 246, 0.08);
    color: var(--text); font: inherit; font-size: 0.82rem; font-weight: 700; text-align: left; cursor: pointer;
}
.op-audio-sample:hover { border-style: solid; }

/* Small plan tag in the sidebar next to a locked item. */
.op-plan-chip {
    margin-left: auto; margin-right: 6px; padding: 1px 7px; border-radius: 999px;
    font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em;
    background: #F5AD05; color: #0B1220;
}
html.light-theme .op-plan-chip { background: #EA580C; color: #fff; }

/* Dashboard banner when the exam is close and the learner is not on PRO. */
.op-exam-nudge {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px;
    border-radius: var(--radius-card); cursor: pointer; text-align: left; font: inherit; color: var(--text);
    border: 2px solid rgba(239, 68, 68, 0.45);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), transparent 70%), var(--bg-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.op-exam-nudge:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(239, 68, 68, 0.18); }
.op-exam-nudge__icon { font-size: 1.8rem; animation: op-upsell-bob 2.4s ease-in-out infinite; }
.op-exam-nudge__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.op-exam-nudge__text b { font-size: 1rem; }
.op-exam-nudge__text span { font-size: 0.84rem; color: var(--text-secondary); }
.op-exam-nudge__cta { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-weight: 900; font-size: 0.85rem; background: #F5AD05; color: #0B1220; }
html.light-theme .op-exam-nudge__cta { background: #EA580C; color: #fff; }

@media (max-width: 600px) {
    .op-upsell .op-upsell__body { padding: 24px 16px 14px !important; }
    .op-upsell__art { width: 92px; height: 92px; }
    .op-upsell__emoji { font-size: 2.8rem; }
    .op-exam-nudge { padding: 12px 14px; gap: 10px; }
    .op-exam-nudge__cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .op-upsell__blob, .op-upsell__emoji, .op-upsell__spark, .op-exam-nudge__icon { animation: none; }
    .op-upsell__btn, .op-locked-teaser, .op-exam-nudge, .op-video-locked__play { transition: none; }
}

/* ==========================================================================
   Rankings: the dashboard card (.op-rank), the /reyting board (.op-board)
   and the Arena result's rewards line. --league is the current league's
   colour, set inline from LeagueInfo.
   ========================================================================== */
.op-rank__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.op-rank__head .op-home-section-title { margin: 0; }
.op-rank__all { font-size: 0.86rem; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.op-rank__all:hover { text-decoration: underline; }

.op-rank__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0;
    border-radius: var(--radius-card); overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--league) 45%, var(--border));
    background: var(--bg-card);
}
html.light-theme .op-rank__grid { border-color: color-mix(in srgb, var(--league) 55%, #F0A872); }

.op-rank__me {
    display: flex; flex-direction: column; gap: 14px; padding: 20px 22px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--league) 16%, transparent), transparent 70%);
    border-right: 1px solid var(--border);
}
.op-rank__league { display: flex; align-items: center; gap: 12px; }
.op-rank__badge {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem;
    background: color-mix(in srgb, var(--league) 22%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--league) 50%, transparent);
}
.op-rank__league-name { font-weight: 900; font-size: 1.05rem; color: var(--text); }
.op-rank__league-sub { font-size: 0.8rem; color: var(--text-secondary); }

.op-rank__place { display: flex; align-items: baseline; gap: 6px; }
.op-rank__place-num { font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--league); font-variant-numeric: tabular-nums; }
.op-rank__place-of { font-size: 1rem; font-weight: 700; color: var(--text-secondary); }
.op-rank__place-none { font-size: 1rem; font-weight: 700; color: var(--text-secondary); }
.op-rank__hint { font-size: 0.86rem; color: var(--text); font-weight: 600; }

.op-rank__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.op-rank__stat { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.op-rank__stat strong { font-size: 1.15rem; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.op-rank__stat span { font-size: 0.72rem; color: var(--text-secondary); }

.op-rank__list { list-style: none; margin: 0; padding: 10px; display: grid; align-content: start; gap: 4px; }
.op-rank__row, .op-board__row {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 12px; color: var(--text);
}
.op-rank__row:nth-child(odd) { background: color-mix(in srgb, var(--text) 3%, transparent); }
.op-rank__row.is-me, .op-board__row.is-me {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
    font-weight: 800;
}
.op-rank__pos, .op-board__pos { font-size: 1.05rem; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.op-rank__name, .op-board__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-rank__xp { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.op-rank__empty { padding: 18px 12px; color: var(--text-secondary); font-size: 0.9rem; }

/* /reyting */
.op-board-head { margin: 4px 0 18px; }
.op-board-head__title { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; color: var(--text); }
.op-board-head__sub { margin: 0; max-width: 60ch; color: var(--text-secondary); line-height: 1.5; }

.op-board-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-card); border: 2px solid var(--border-light); margin-bottom: 16px; }
.op-board-tab { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 0.9rem; color: var(--text-secondary); cursor: pointer; }
.op-board-tab:hover { color: var(--text); }
.op-board-tab.is-active { background: var(--accent); color: #fff; }
html:not(.light-theme) .op-board-tab.is-active { color: #04121C; }
.op-board-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.op-board-league {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px;
    border-radius: 14px; border: 2px solid color-mix(in srgb, var(--league) 45%, transparent);
    background: color-mix(in srgb, var(--league) 10%, var(--bg-card));
}
.op-board-league__badge { font-size: 1.8rem; }
.op-board-league b { display: block; color: var(--text); }
.op-board-league small { color: var(--text-secondary); font-size: 0.8rem; }

.op-board { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; border-radius: var(--radius-card); background: var(--bg-card); border: 2px solid var(--border-light); }
.op-board__row { grid-template-columns: 44px minmax(0, 1fr) auto; }
.op-board__row + .op-board__row { border-top: 1px solid var(--border); border-radius: 0; }
.op-board__row.is-me { border-radius: 12px; }
.op-board__row.is-top1 .op-board__pos, .op-board__row.is-top2 .op-board__pos, .op-board__row.is-top3 .op-board__pos { font-size: 1.4rem; }
.op-board__who { display: flex; flex-direction: column; min-width: 0; }
.op-board__who small { font-size: 0.75rem; color: var(--text-secondary); }
.op-board__val { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.op-board__val small { font-weight: 600; font-size: 0.72rem; color: var(--text-secondary); }
.op-board-gap { text-align: center; color: var(--text-muted); font-weight: 900; letter-spacing: 0.2em; padding: 4px 0; }
.op-board-empty { padding: 28px 16px; text-align: center; color: var(--text-secondary); border-radius: var(--radius-card); border: 2px dashed var(--border-light); }

.op-board-rules { margin-top: 20px; padding: 14px 18px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text); }
.op-board-rules summary { cursor: pointer; font-weight: 800; }
.op-board-rules ul { margin: 12px 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.9rem; }
.op-board-rules p { margin: 8px 0 0; font-size: 0.86rem; color: var(--text-secondary); line-height: 1.5; }

@media (max-width: 760px) {
    .op-rank__grid { grid-template-columns: 1fr; }
    .op-rank__me { border-right: 0; border-bottom: 1px solid var(--border); padding: 16px; }
    .op-rank__place-num { font-size: 2rem; }
    .op-board-tabs { display: flex; }
    .op-board-tab { flex: 1; padding: 8px 10px; }
}

/* =============================================================================
   Light theme: calmer inner pages, one colour per section.
   Every page used to be white with a 2px orange edge on every card — bright, and the same
   everywhere. Now each section (MainLayout adds .op-route--<tone>) gets its own colour,
   matching its sidebar icon, on a soft blue-grey ground instead of white:
   cards get a quiet neutral edge, and the section colour shows up where it means something —
   buttons, tabs, progress, headers, the active sidebar item and hover.
   The dashboard (.op-route--home), login and landing keep their look. Light theme only.
   ============================================================================= */
html.light-theme .op-shell {
    --tone: #EA580C; --tone-2: #F97316; --tone-rgb: 234, 88, 12; --tone-soft: #FFF4EB;
}
html.light-theme .op-route--blue   { --tone: #2563EB; --tone-2: #3B82F6; --tone-rgb: 37, 99, 235;  --tone-soft: #EEF4FF; }
html.light-theme .op-route--green  { --tone: #059669; --tone-2: #10B981; --tone-rgb: 5, 150, 105;  --tone-soft: #E9F8F1; }
html.light-theme .op-route--violet { --tone: #7C3AED; --tone-2: #8B5CF6; --tone-rgb: 124, 58, 237; --tone-soft: #F3EEFF; }
html.light-theme .op-route--amber  { --tone: #D97706; --tone-2: #F59E0B; --tone-rgb: 217, 119, 6;  --tone-soft: #FFF6E5; }
html.light-theme .op-route--cyan   { --tone: #0891B2; --tone-2: #06B6D4; --tone-rgb: 8, 145, 178;  --tone-soft: #E8F8FC; }
html.light-theme .op-route--teal   { --tone: #0D9488; --tone-2: #14B8A6; --tone-rgb: 13, 148, 136; --tone-soft: #E7F7F5; }
html.light-theme .op-route--gold   { --tone: #CA8A04; --tone-2: #EAB308; --tone-rgb: 202, 138, 4;  --tone-soft: #FEF9E7; }
html.light-theme .op-route--rose   { --tone: #E11D48; --tone-2: #F43F5E; --tone-rgb: 225, 29, 72;  --tone-soft: #FFEEF1; }
html.light-theme .op-route--indigo { --tone: #4F46E5; --tone-2: #6366F1; --tone-rgb: 79, 70, 229;  --tone-soft: #EEF0FF; }
html.light-theme .op-route--purple { --tone: #9333EA; --tone-2: #A855F7; --tone-rgb: 147, 51, 234; --tone-soft: #F6EEFF; }
html.light-theme .op-route--slate  { --tone: #475569; --tone-2: #64748B; --tone-rgb: 71, 85, 105;  --tone-soft: #F1F5F9; }

/* The section colour replaces the accent everywhere inside the shell — the app's own
   tokens and MudBlazor's primary — and the text steps down from near-black. */
html.light-theme .op-shell:not(.op-route--home) {
    --green: var(--tone);
    --green-bright: var(--tone-2);
    --green-dark: var(--tone-soft);
    --green-deep: var(--tone-soft);
    --accent: var(--tone);
    --accent-bright: var(--tone-2);
    --accent-dim: var(--tone-soft);
    --accent-soft: rgba(var(--tone-rgb), 0.10);
    --accent-glow: rgba(var(--tone-rgb), 0.22);
    --op-primary: var(--tone);

    --mud-palette-primary: var(--tone);
    --mud-palette-primary-rgb: var(--tone-rgb);
    --mud-palette-primary-darken: color-mix(in srgb, var(--tone) 82%, #000);
    --mud-palette-primary-lighten: var(--tone-2);
    --mud-palette-primary-hover: rgba(var(--tone-rgb), 0.06);

    --text-primary: #1E293B;
    --text: #1E293B;
    --text-secondary: #526278;
}

/* Ground: soft blue-grey with a faint wash of the section colour, instead of white. */
html.light-theme .op-shell:not(.op-route--home)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(42% 38% at 92% 4%, rgba(var(--tone-rgb), 0.10), transparent 70%),
        radial-gradient(36% 34% at 4% 96%, rgba(var(--tone-rgb), 0.06), transparent 70%),
        #EEF2F7;
}

/* Cards: a quiet neutral edge and a soft shadow; the colour appears on hover. */
html.light-theme .op-shell:not(.op-route--home) :is(
    .op-card, .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card,
    .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card,
    .op-progress-card, .op-stat-card, .op-prof-action-card):not(.op-ccard):not(.is-current-month) {
    border-color: #D5DDE8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.05);
}
html.light-theme .op-shell:not(.op-route--home) :is(
    .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card,
    .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card,
    .op-progress-card, .op-stat-card, .op-prof-action-card):not(.is-current-month):hover {
    background: var(--tone-soft);
    border-color: var(--tone);
    box-shadow: 0 10px 24px rgba(var(--tone-rgb), 0.14);
}

/* Page headers: a soft band of the section colour. */
html.light-theme .op-shell:not(.op-route--home) :is(.op-tickets-hero, .op-num-hero) {
    background: linear-gradient(120deg, var(--tone-soft) 0%, #FFFFFF 75%) !important;
    border: 2px solid rgba(var(--tone-rgb), 0.22) !important;
    box-shadow: 0 8px 24px rgba(var(--tone-rgb), 0.08);
}
html.light-theme .op-shell:not(.op-route--home) :is(.op-num-hero__kicker, .op-rules-hero__kicker) {
    color: var(--tone) !important;
}

/* Primary buttons and the active sidebar item follow the section. */
html.light-theme .op-shell:not(.op-route--home) .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--tone-2) 0%, var(--tone) 100%) !important;
    box-shadow: 0 6px 16px rgba(var(--tone-rgb), 0.26);
}
html.light-theme .op-shell:not(.op-route--home) .mud-button-filled.mud-button-filled-primary:hover {
    box-shadow: 0 10px 24px rgba(var(--tone-rgb), 0.32);
}
html.light-theme .op-shell:not(.op-route--home) .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(var(--tone-rgb), 0.14), rgba(var(--tone-rgb), 0.04)) !important;
    color: var(--tone) !important;
}

/* Tabs, chips and selection read in the section colour too. */
html.light-theme .op-shell:not(.op-route--home) .mud-tab.mud-tab-active { color: var(--tone) !important; }
html.light-theme .op-shell:not(.op-route--home) .mud-tab-slider { background: var(--tone) !important; }
html.light-theme .op-shell:not(.op-route--home) .mud-progress-linear-bar { background: linear-gradient(90deg, var(--tone), var(--tone-2)) !important; }

/* =============================================================================
   Light theme polish: two-hue colour, layered tinted shadows, gentle motion.
   Each section's --tone gets a neighbouring --tone-alt, so gradients run between two
   related colours (blue -> violet, green -> teal ...) instead of one flat hue. Shadows are
   a three-step scale tinted with the section colour, never flat grey. Motion is short
   (150-450 ms), eases out, moves only transform/opacity, and stops under reduced motion.
   Inner pages only (not .op-route--home), light theme only.
   ============================================================================= */
html.light-theme .op-shell                { --tone-alt: #F59E0B; }
html.light-theme .op-route--blue   { --tone-alt: #7C3AED; }
html.light-theme .op-route--green  { --tone-alt: #0891B2; }
html.light-theme .op-route--violet { --tone-alt: #DB2777; }
html.light-theme .op-route--amber  { --tone-alt: #EA580C; }
html.light-theme .op-route--cyan   { --tone-alt: #2563EB; }
html.light-theme .op-route--teal   { --tone-alt: #2563EB; }
html.light-theme .op-route--gold   { --tone-alt: #EA580C; }
html.light-theme .op-route--rose   { --tone-alt: #9333EA; }
html.light-theme .op-route--indigo { --tone-alt: #0891B2; }
html.light-theme .op-route--purple { --tone-alt: #DB2777; }
html.light-theme .op-route--slate  { --tone-alt: #2563EB; }

html.light-theme .op-shell:not(.op-route--home) {
    --elev-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(var(--tone-rgb), 0.05);
    --elev-2: 0 2px 4px rgba(15, 23, 42, 0.04), 0 10px 24px rgba(var(--tone-rgb), 0.10);
    --elev-3: 0 4px 8px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(var(--tone-rgb), 0.16);
    --ease-out: cubic-bezier(.2, .8, .2, 1);
}

/* Ground: the two hues drift slowly behind the page. */
html.light-theme .op-shell:not(.op-route--home)::before {
    background:
        radial-gradient(40% 36% at 92% 4%, rgba(var(--tone-rgb), 0.12), transparent 70%),
        radial-gradient(34% 32% at 6% 94%, color-mix(in srgb, var(--tone-alt) 10%, transparent), transparent 70%),
        radial-gradient(26% 24% at 60% 46%, color-mix(in srgb, var(--tone-alt) 4%, transparent), transparent 70%),
        #EEF2F7;
    animation: op-light-drift 40s ease-in-out infinite alternate;
}

/* Page titles: the section's two hues as a gradient. */
html.light-theme .op-shell:not(.op-route--home) :is(
    .op-num-hero__title, .op-rules-hero__title, .op-board-head__title, .op-plans-head__title,
    .op-centers-hero__title, .op-prof-title, .op-blog-article__title
) {
    background: linear-gradient(100deg, var(--tone) 10%, var(--tone-alt) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

/* Cards: tinted elevation, a hair of gradient on top, lift on hover, press on click. */
html.light-theme .op-shell:not(.op-route--home) :is(
    .op-card, .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card,
    .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card,
    .op-progress-card, .op-stat-card, .op-prof-action-card):not(.op-ccard):not(.is-current-month) {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 40%);
    box-shadow: var(--elev-1);
    transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out),
                border-color .18s ease, background-color .18s ease;
}
html.light-theme .op-shell:not(.op-route--home) :is(
    .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card,
    .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card,
    .op-progress-card, .op-stat-card, .op-prof-action-card):not(.is-current-month):hover {
    transform: translateY(-4px);
    box-shadow: var(--elev-3);
}
html.light-theme .op-shell:not(.op-route--home) :is(
    .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card,
    .op-resume-card, .op-month-card, .op-vid-card, .op-blog-card, .op-prof-action-card
):active {
    transform: translateY(-1px) scale(.985);
    box-shadow: var(--elev-2);
    transition-duration: .08s;
}

/* Cards arrive one after another (also in plain grids, not only MudGrid). */
html.light-theme .op-shell:not(.op-route--home) .op-page :is(
    .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card,
    .op-blog-card, .op-prof-action-card, .op-month-card
) {
    /* backwards, not both: a held end state would override the hover lift. */
    animation: op-light-rise .45s var(--ease-out) backwards;
}
html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card):nth-child(2) { animation-delay: .04s; }
html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card):nth-child(3) { animation-delay: .08s; }
html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card):nth-child(4) { animation-delay: .12s; }
html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card):nth-child(5) { animation-delay: .16s; }
html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card):nth-child(6) { animation-delay: .20s; }
html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card):nth-child(n+7) { animation-delay: .24s; }

/* Page headers: two-hue band with a soft glow. */
html.light-theme .op-shell:not(.op-route--home) :is(.op-tickets-hero, .op-num-hero) {
    background:
        radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--tone-alt) 12%, transparent), transparent 70%),
        linear-gradient(120deg, var(--tone-soft) 0%, #FFFFFF 75%) !important;
    box-shadow: var(--elev-2);
}

/* Buttons: two-hue gradient, lift on hover, press on click. */
html.light-theme .op-shell:not(.op-route--home) .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--tone) 0%, color-mix(in srgb, var(--tone) 55%, var(--tone-alt)) 100%) !important;
    transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
html.light-theme .op-shell:not(.op-route--home) .mud-button-filled.mud-button-filled-primary:hover { transform: translateY(-2px); }
html.light-theme .op-shell:not(.op-route--home) .mud-button-filled.mud-button-filled-primary:active { transform: scale(.97); }
html.light-theme .op-shell:not(.op-route--home) .mud-button-outlined.mud-button-outlined-primary:hover {
    background: rgba(var(--tone-rgb), 0.08);
}

/* Inputs: a soft ring of the section colour when focused. */
html.light-theme .op-shell:not(.op-route--home) .mud-input.mud-input-outlined {
    background: #FFFFFF;
    border-radius: var(--mud-default-borderradius);
    transition: box-shadow .18s ease;
}
html.light-theme .op-shell:not(.op-route--home) .mud-input.mud-input-outlined.mud-focused {
    box-shadow: 0 0 0 4px rgba(var(--tone-rgb), 0.14);
}

/* Chips and tables pick up the tint. */
html.light-theme .op-shell:not(.op-route--home) .mud-chip.mud-chip-color-primary.mud-chip-outlined {
    background: rgba(var(--tone-rgb), 0.08);
}
html.light-theme .op-shell:not(.op-route--home) .mud-table-head .mud-table-cell {
    background: var(--tone-soft);
    color: var(--text);
    font-weight: 700;
}
html.light-theme .op-shell:not(.op-route--home) .mud-table-hover .mud-table-body .mud-table-row:hover {
    background: rgba(var(--tone-rgb), 0.05) !important;
}

/* Sidebar: active item gets a tone bar of the two hues; others slide a little on hover. */
html.light-theme .op-shell:not(.op-route--home) .mud-nav-link {
    transition: background-color .15s ease, transform .15s var(--ease-out);
}
html.light-theme .op-shell:not(.op-route--home) .mud-nav-link:hover:not(.active) { transform: translateX(2px); }

/* Keyboard focus is always visible, in the section colour. */
html.light-theme .op-shell:not(.op-route--home) :is(a, button, [tabindex]):focus-visible {
    outline: 2px solid var(--tone);
    outline-offset: 2px;
}

/* Scrollbars match the section instead of the browser grey. */
html.light-theme .op-shell:not(.op-route--home) * { scrollbar-color: rgba(var(--tone-rgb), 0.35) transparent; }

@media (prefers-reduced-motion: reduce) {
    html.light-theme .op-shell:not(.op-route--home)::before,
    html.light-theme .op-shell:not(.op-route--home) .op-page :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-vid-card, .op-blog-card, .op-prof-action-card, .op-month-card) {
        animation: none;
    }
    html.light-theme .op-shell:not(.op-route--home) :is(.op-card, .op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card, .op-progress-card, .op-stat-card, .op-prof-action-card, .mud-button-filled, .mud-nav-link) {
        transition: none;
    }
    html.light-theme .op-shell:not(.op-route--home) :is(.op-rcard, .op-signcard, .op-ticket-card, .op-sheet-card, .op-short-card, .op-resume-card, .op-month-card, .op-answer-card, .op-vid-card, .op-blog-card, .op-progress-card, .op-stat-card, .op-prof-action-card, .mud-button-filled, .mud-nav-link):is(:hover, :active) {
        transform: none;
    }
}

/* ==========================================================================
   Theme toggle (.op-tt): sun / moon switch. Its look follows the page theme
   (html.light-theme in the app, :root[data-theme="light"] on the landing), so
   one rule set serves both, and it is right before any script runs. Dark: night
   track with twinkling stars, a cratered moon on the left. Light: sky track with
   a drifting cloud, a glowing sun on the right.
   ========================================================================== */
.op-tt {
    position: relative; flex-shrink: 0;
    width: 60px; height: 32px; padding: 0; margin: 0 8px 0 0;
    border: 0; border-radius: 999px; cursor: pointer; background: none;
    -webkit-tap-highlight-color: transparent;
}
.op-tt:focus-visible { outline: 2px solid #38BDF8; outline-offset: 3px; }
.op-tt__track {
    position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
    background: linear-gradient(135deg, #1E1B4B 0%, #0F172A 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 0 0 1px rgba(148, 163, 184, .25);
    transition: background .5s ease, box-shadow .5s ease;
}
.op-tt__star {
    position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #F8FAFC;
    box-shadow: 0 0 4px #F8FAFC;
    transition: opacity .35s ease, transform .5s ease;
    animation: op-tt-twinkle 2.4s ease-in-out infinite;
}
.op-tt__star--a { top: 8px; right: 12px; }
.op-tt__star--b { top: 18px; right: 22px; width: 1.5px; height: 1.5px; animation-delay: .8s; }
.op-tt__star--c { top: 11px; right: 30px; width: 1.5px; height: 1.5px; animation-delay: 1.5s; }
.op-tt__cloud {
    position: absolute; left: 8px; bottom: 6px; width: 16px; height: 6px; border-radius: 6px;
    background: #FFFFFF; opacity: 0; transform: translateY(8px);
    transition: opacity .4s ease, transform .5s cubic-bezier(.3, 1.4, .5, 1);
}
.op-tt__cloud::before {
    content: ""; position: absolute; left: 3px; top: -4px; width: 8px; height: 8px;
    border-radius: 50%; background: inherit;
}
.op-tt__knob {
    position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
    background: #E2E8F0;
    box-shadow: inset -3px -3px 0 rgba(148, 163, 184, .55), 0 0 10px rgba(226, 232, 240, .45), 0 2px 4px rgba(0, 0, 0, .35);
    transition: transform .55s cubic-bezier(.65, -0.2, .25, 1.35), background .45s ease, box-shadow .45s ease;
}
.op-tt__crater {
    position: absolute; border-radius: 50%; background: rgba(148, 163, 184, .7);
    transition: opacity .3s ease, transform .4s ease;
}
.op-tt__crater--a { width: 6px; height: 6px; top: 5px; left: 7px; }
.op-tt__crater--b { width: 4px; height: 4px; top: 13px; left: 13px; }
.op-tt:hover .op-tt__knob { box-shadow: inset -3px -3px 0 rgba(148, 163, 184, .55), 0 0 16px rgba(226, 232, 240, .7), 0 2px 4px rgba(0, 0, 0, .35); }

/* Light: sky, cloud, sun to the right. */
:is(html.light-theme, :root[data-theme="light"]) .op-tt__track {
    background: linear-gradient(135deg, #7DD3FC 0%, #38BDF8 100%);
    box-shadow: inset 0 2px 4px rgba(2, 132, 199, .35), 0 0 0 1px rgba(14, 165, 233, .35);
}
:is(html.light-theme, :root[data-theme="light"]) .op-tt__star { opacity: 0; transform: translateY(-6px); animation: none; }
:is(html.light-theme, :root[data-theme="light"]) .op-tt__cloud { opacity: .95; transform: none; animation: op-tt-drift 6s ease-in-out infinite alternate; }
:is(html.light-theme, :root[data-theme="light"]) .op-tt__knob {
    transform: translateX(28px) rotate(180deg);
    background: radial-gradient(circle at 35% 35%, #FDE68A 0%, #FBBF24 55%, #F59E0B 100%);
    box-shadow: 0 0 0 3px rgba(253, 230, 138, .55), 0 0 14px 4px rgba(251, 191, 36, .65), 0 2px 4px rgba(180, 83, 9, .35);
}
:is(html.light-theme, :root[data-theme="light"]) .op-tt__crater { opacity: 0; transform: scale(0); }
:is(html.light-theme, :root[data-theme="light"]) .op-tt:hover .op-tt__knob {
    box-shadow: 0 0 0 4px rgba(253, 230, 138, .65), 0 0 20px 6px rgba(251, 191, 36, .75), 0 2px 4px rgba(180, 83, 9, .35);
}

@keyframes op-tt-twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes op-tt-drift { from { translate: 0 0; } to { translate: 6px 0; } }

/* The circular reveal (prava.theme.toggleAt) animates the new page in by itself. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
    .op-tt__track, .op-tt__star, .op-tt__cloud, .op-tt__knob, .op-tt__crater { transition: none; animation: none !important; }
}

/* ==========================================================================
   Profile avatar in the top bar: the user's initial on a gradient disc, a
   colour ring that turns slowly, a soft glow that breathes, and an online dot.
   Meant to be noticed — it is the way into the profile.
   ========================================================================== */
.op-avatar {
    position: relative; display: inline-grid; place-items: center;
    width: 40px; height: 40px; margin-left: 4px; border-radius: 50%; cursor: pointer;
    animation: op-avatar-breathe 3.2s ease-in-out infinite;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.op-avatar:hover { transform: scale(1.08); }
.op-avatar:active { transform: scale(.95); }
.op-avatar__ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, #F97316, #FACC15, #10B981, #38BDF8, #8B5CF6, #EC4899, #F97316);
    animation: op-avatar-spin 4s linear infinite;
}
.op-avatar__face {
    position: relative; display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    box-shadow: 0 0 0 2px #0B1220;
    color: #FFFFFF; font-weight: 900; font-size: .95rem; letter-spacing: .02em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.op-avatar__dot {
    position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%;
    background: #22C55E; box-shadow: 0 0 0 2px #0B1220;
}
.op-avatar__dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22C55E;
    animation: op-avatar-ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
html.light-theme .op-avatar__face {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    box-shadow: 0 0 0 2px #FFFFFF;
}
html.light-theme .op-avatar__dot { box-shadow: 0 0 0 2px #FFFFFF; }

@keyframes op-avatar-spin { to { transform: rotate(360deg); } }
@keyframes op-avatar-breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .0), 0 0 10px 1px rgba(56, 189, 248, .25); }
    50%      { box-shadow: 0 0 0 4px rgba(249, 115, 22, .12), 0 0 22px 6px rgba(139, 92, 246, .35); }
}
@keyframes op-avatar-ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .op-avatar, .op-avatar__ring, .op-avatar__dot::after { animation: none; }
}


/* Blog article bodies: tables, lists and quotes. The launch articles lean on tables for
   speed limits and distances, which need to scroll sideways on a phone, not overflow. */
.op-blog-article__body ul, .op-blog-article__body ol { margin: 0 0 16px; padding-left: 22px; }
.op-blog-article__body li { margin: 0 0 6px; }
.op-blog-article__body table {
    display: block; overflow-x: auto; width: 100%; margin: 8px 0 20px;
    border-collapse: collapse; font-size: .94rem; font-variant-numeric: tabular-nums;
}
.op-blog-article__body th, .op-blog-article__body td {
    padding: 9px 12px; text-align: left; vertical-align: top;
    border-bottom: 1px solid var(--cln-1e2a3d, rgba(148, 163, 184, .25));
}
.op-blog-article__body th { font-weight: 700; white-space: nowrap; background: rgba(148, 163, 184, .08); }
.op-blog-article__body blockquote {
    margin: 0 0 16px; padding: 10px 16px; border-radius: 10px;
    background: rgba(148, 163, 184, .08); color: var(--cfg-cbd5e1, inherit);
}
.op-blog-article__body em { color: var(--cfg-94a3b8, inherit); }


/* --- Answer explanation in the quiz (.op-verdict) ----------------------------------------
   Readability first: the verdict colour lives only on the small heading and the border; the
   explanation itself is ordinary body text at a comfortable size, with bold and links that
   stay legible in both themes. */
.op-why {
    --verdict: #10B981;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--verdict) 40%, transparent);
    background: color-mix(in srgb, var(--verdict) 6%, var(--bg-card));
    overflow: hidden;
}
.op-why--wrong { --verdict: #EF4444; }
html.light-theme .op-why--right { --verdict: #059669; }
html.light-theme .op-why--wrong { --verdict: #DC2626; }

.op-why__head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    font-size: .82rem; font-weight: 800; letter-spacing: .02em;
    color: var(--verdict);
    background: color-mix(in srgb, var(--verdict) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--verdict) 22%, transparent);
}
.op-why__sep { opacity: .5; }
.op-why__label { color: var(--text-secondary); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }

.op-why__body { padding: 14px 18px 16px; }
.op-why__body .op-lesson-content {
    color: var(--text);
    font-size: .98rem;
    line-height: 1.75;
}
.op-why__body .op-lesson-content p { margin: 0 0 10px; }
.op-why__body .op-lesson-content strong { color: var(--text); font-weight: 700; }
.op-why__body .op-lesson-content a {
    color: var(--accent-bright, var(--accent));
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.op-why__body .op-lesson-content li::marker { color: var(--text-secondary); }


/* Quiz: related signs and the actions share one row under the options (.op-qfoot). The
   signs take the free space on the left; the actions stay together on the right and wrap
   underneath on narrow screens. */
.op-qfoot {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 14px 20px; margin-top: 20px;
}
.op-qfoot__signs { flex: 1 1 280px; min-width: 0; }
.op-qfoot__signs .op-qsigns { margin-top: 0; }
.op-qfoot__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 600px) {
    .op-qfoot__actions { width: 100%; }
    .op-qfoot__actions .mud-button-root { margin-left: auto; }
}


/* =============================================================================
   Phones (≤ 600px): a top bar that fits one row, and a quiz that fits one screen.
   At 340px the logo, theme switch, sound, language and avatar used to need ~370px,
   so they squeezed into each other. Each gets a little smaller and a fixed gap.
   ============================================================================= */
@media (max-width: 600px) {
    /* --- Top bar: one row, even gaps --- */
    .mud-appbar:not(.op-bottomnav) .mud-toolbar {
        gap: 6px;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .mud-appbar .op-logo-link { margin-left: 0 !important; gap: 4px; }
    .mud-appbar .op-logo__mark { height: 24px !important; }
    .mud-appbar .op-logo { font-size: 1.02rem; letter-spacing: .03em; }

    .mud-appbar .op-tt { width: 48px; height: 26px; margin: 0; }
    .mud-appbar .op-tt__knob { width: 20px; height: 20px; top: 3px; left: 3px; }
    html.light-theme .mud-appbar .op-tt__knob { transform: translateX(22px) rotate(180deg); }
    .mud-appbar .op-tt__crater--a { width: 5px; height: 5px; top: 4px; left: 6px; }
    .mud-appbar .op-tt__crater--b { width: 3px; height: 3px; top: 11px; left: 11px; }

    .mud-appbar .mud-icon-button.mr-2 { margin-right: 0 !important; padding: 4px; }
    .mud-appbar .op-lang-button { padding: 0 6px !important; min-height: 30px; gap: 4px; }
    .mud-appbar .op-lang-button .mud-icon-root { font-size: 1.05rem; }
    .mud-appbar .op-lang-code { font-size: .72rem; }

    .mud-appbar .op-avatar { width: 34px; height: 34px; margin-left: 0; }
    .mud-appbar .op-avatar__face { width: 28px; height: 28px; font-size: .82rem; }
    .mud-appbar .op-avatar__dot { width: 9px; height: 9px; }

    /* --- Quiz: header, number grid, picture and options tightened to fit --- */
    .mud-main-content { padding-top: 6px !important; }
    .op-page .op-steps { gap: 4px; margin-bottom: 10px !important; }
    .op-page .op-step { width: 28px; height: 24px; font-size: .68rem; border-radius: 7px; }
    .op-page .op-question-image { max-height: 190px; margin-bottom: 12px; }
    .op-page .op-option { padding-top: 10px; padding-bottom: 10px; }

    /* --- Quiz actions: Ovozli, Qoidasi and Keyingi on one line --- */
    .op-qfoot { gap: 10px; margin-top: 14px; }
    .op-qfoot__actions { width: 100%; flex-wrap: nowrap; gap: 6px; }
    .op-qfoot__actions .op-qact { padding: 7px 10px; font-size: .8rem; gap: 5px; flex-shrink: 0; }
    .op-qfoot__actions .op-qact__key,
    .op-qfoot__actions .op-kbd-hint { display: none; }
    .op-qfoot__actions .op-qnext {
        margin-left: auto;
        min-width: 0;
        padding: 6px 12px;
        font-size: .82rem;
        white-space: nowrap;
    }
}

/* "Keyingi savol" before an answer: still clearly a button, just inactive — the default
   disabled style put dim text on a dim fill, so the label all but vanished. */
.op-qnext.mud-button-filled:disabled,
.op-qnext.mud-button-filled.mud-disabled {
    background: color-mix(in srgb, var(--accent) 22%, var(--bg-card)) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
    opacity: 1;
}
.op-qnext.mud-disabled .mud-button-icon-end { opacity: .6; }

@media (max-width: 380px) {
    /* The narrowest phones: the wordmark stays, the car picture beside it goes, so the bar
       still fits on one row. */
    .mud-appbar .op-logo__mark { display: none; }
    .mud-appbar .op-logo { font-size: .98rem; }
}


/* Dashboard hero on phones: the picture moves out from under the text. Full-bleed behind
   everything, the greeting, badges, button and ring all sat on the car. Here the text keeps
   a plain ground, the picture becomes a strip along the bottom that fades in from above,
   and a smaller ring sits in its corner. */
@media (max-width: 600px) {
    .op-home-hero {
        padding: 20px 18px 0;
        min-height: 0;
    }
    .op-home-hero::after { display: none; }

    .op-home-hero__content { order: 1; }

    .op-home-hero__bg {
        order: 2;
        position: relative;
        inset: auto;
        z-index: 0;
        width: calc(100% + 36px);
        height: 150px;
        margin: 14px -18px 0;
        object-fit: cover;
        object-position: 70% 62%;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 38%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 38%);
    }

    .op-home-hero__visual {
        position: absolute;
        right: 14px;
        bottom: 14px;
        margin: 0;
        z-index: 2;
    }
    .op-home-hero__ring-wrap { width: 78px; height: 78px; }
    .op-home-hero__ring-val { font-size: 1.15rem; }
    .op-home-hero__ring-lbl { font-size: .58rem; }
}


.op-visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The comparison table only exists for phones; wider screens have it inside the cards. */
.op-plans-compare { display: none; }

/* Plans on phones: three compact cards in one row (name, price, button), then one small
   ✓/✗ table — instead of three tall cards stacked one under another. */
@media (max-width: 600px) {
    .op-plans-head { margin: 4px auto 18px; }
    .op-plans-head__title { font-size: 1.5rem; }
    .op-plans-head__sub { font-size: .86rem; }

    .op-plans {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
        gap: 6px;
        align-items: stretch;
    }
    .op-plan--featured { order: 0; }
    .op-plan {
        padding: 18px 8px 10px;
        border-radius: 14px;
        text-align: center;
        align-items: center;
    }
    .op-plan:hover { transform: none; }
    .op-plan__ribbon { top: -9px; padding: 2px 8px; font-size: .56rem; letter-spacing: .04em; }
    .op-plan__name { font-size: .8rem; letter-spacing: .1em; }
    .op-plan__price { flex-direction: column; align-items: center; gap: 0; margin: 6px 0 10px; }
    .op-plan__amount { font-size: 1.15rem; }
    .op-plan__amount--soon { font-size: .82rem; }
    .op-plan__unit { font-size: .62rem; line-height: 1.3; }
    .op-plan__blurb, .op-plan__list { display: none; }
    .op-plan__cta { width: 100%; }
    .op-plan__btn {
        padding: 7px 4px; min-height: 0; gap: 4px;
        font-size: .68rem; line-height: 1.2; border-width: 1.5px;
    }
    .op-plan__btn .mud-icon-root { display: none; }

    .op-plans-compare {
        display: table;
        width: 100%;
        margin-top: 14px;
        border-collapse: separate;
        border-spacing: 0;
        font-size: .8rem;
        border-radius: 14px;
        overflow: hidden;
        background: var(--bg-card);
        border: 1px solid var(--border-light);
    }
    .op-plans-compare th, .op-plans-compare td { padding: 9px 6px; border-bottom: 1px solid var(--border); }
    .op-plans-compare tbody tr:last-child > * { border-bottom: 0; }
    .op-plans-compare tbody th { text-align: left; font-weight: 600; color: var(--text); line-height: 1.3; padding-left: 12px; }
    .op-plans-compare thead th { font-size: .66rem; font-weight: 900; letter-spacing: .1em; }
    .op-plans-compare__plan, .op-plans-compare__cell { width: 15%; text-align: center; }
    .op-plans-compare__plan--free { color: var(--text-secondary); }
    .op-plans-compare__plan--plus { color: #3B82F6; }
    .op-plans-compare__plan--pro  { color: #F5AD05; }
    html.light-theme .op-plans-compare__plan--pro { color: #EA580C; }
    .op-plans-compare__cell { color: var(--text-muted); opacity: .55; font-weight: 700; }
    .op-plans-compare__cell.is-on { opacity: 1; }
    .op-plans-compare__cell--free.is-on { color: var(--accent); }
    .op-plans-compare__cell--plus.is-on { color: #3B82F6; }
    .op-plans-compare__cell--pro.is-on  { color: #F5AD05; }
    html.light-theme .op-plans-compare__cell--pro.is-on { color: #EA580C; }
    .op-plans-compare__cell--pro { background: color-mix(in srgb, #F5AD05 6%, transparent); }

    .op-plans-foot { margin-top: 14px; font-size: .76rem; }
}

/* Blog tags: a filter row over the grid, small labels on each card, links under an
   article's title. Shared by the public /blog pages and the in-app /maqolalar. */
.op-blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}
.op-blog-filter__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border, var(--cln-1a2a35));
    background: var(--bg-card, var(--cbg-0a1a22));
    color: var(--op-text-dim, var(--cfg-a9b4be));
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.op-blog-filter__chip span {
    font-size: .72rem;
    font-weight: 700;
    opacity: .65;
    font-variant-numeric: tabular-nums;
}
.op-blog-filter__chip:hover { border-color: var(--op-primary, #10B981); color: var(--op-primary, #10B981); }
.op-blog-filter__chip.is-active {
    background: var(--op-primary, #10B981);
    border-color: var(--op-primary, #10B981);
    color: #fff;
}
.op-blog-filter__chip.is-active span { opacity: .85; }

.op-blog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.op-blog-tags--article { margin: -8px 0 22px; }
.op-blog-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--op-primary, #10B981) 14%, transparent);
    color: var(--op-primary, #10B981);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
}
a.op-blog-tag:hover { background: color-mix(in srgb, var(--op-primary, #10B981) 24%, transparent); }

@media (max-width: 600px) {
    .op-blog-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding: 0 14px 4px; scrollbar-width: none; }
    .op-blog-filter::-webkit-scrollbar { display: none; }
    .op-blog-filter__chip { flex-shrink: 0; }
}

/* Ovozli: the speaker swaps for a pulsing pause icon while it plays (set by prava.audio). */
.op-qact--audio .op-qact__ico--pause { display: none; }
.op-qact--audio.is-playing .op-qact__ico--play { display: none; }
.op-qact--audio.is-playing .op-qact__ico--pause { display: inline-flex; animation: op-qact-pulse 1.4s ease-in-out infinite; }
.op-qact--audio.is-playing { color: var(--accent-bright); border-color: var(--accent); }
@keyframes op-qact-pulse { 50% { opacity: .55; } }

/* The mini player: a small card that rises above the action row while audio is open. */
.op-qfoot__actions { position: relative; }
.op-aplayer {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 5;
    width: min(340px, 100%);
    min-width: 280px;
    padding: 12px 14px 10px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    box-shadow: 0 14px 38px rgba(2, 6, 23, .38);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.op-aplayer.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s ease, transform .18s ease;
}

.op-aplayer__seek { display: flex; align-items: center; gap: 10px; }
.op-aplayer__time {
    min-width: 32px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.op-aplayer__time:last-child { text-align: right; }
.op-aplayer__seek input[type="range"] {
    flex: 1;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background: linear-gradient(90deg, var(--accent) var(--p, 0%), color-mix(in srgb, var(--text) 16%, transparent) var(--p, 0%));
}
.op-aplayer__seek input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent); border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.op-aplayer__seek input[type="range"]::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent); border: 2px solid #fff;
}
.op-aplayer__seek input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.op-aplayer__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 8px;
}
.op-aplayer__main { display: flex; align-items: center; gap: 6px; }
.op-aplayer__btn,
.op-aplayer__rate,
.op-aplayer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease, transform .1s ease;
}
.op-aplayer__btn { width: 38px; height: 38px; }
.op-aplayer__btn:hover, .op-aplayer__rate:hover, .op-aplayer__close:hover {
    background: color-mix(in srgb, var(--text) 10%, transparent);
}
.op-aplayer__btn:active { transform: scale(.92); }
.op-aplayer__btn--play {
    width: 46px; height: 46px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px var(--accent-glow);
}
.op-aplayer__btn--play:hover { background: var(--accent); filter: brightness(1.08); }
.op-aplayer__btn--play .mud-icon-root { font-size: 1.7rem; }
.op-aplayer__ico--pause { display: none; }
.op-aplayer.is-playing .op-aplayer__ico--play { display: none; }
.op-aplayer.is-playing .op-aplayer__ico--pause { display: inline-flex; }
.op-aplayer__rate {
    justify-self: start;
    min-width: 46px;
    padding: 4px 8px;
    font-size: .76rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--accent-bright);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.op-aplayer__close { justify-self: end; width: 32px; height: 32px; color: var(--text-secondary); }

@media (max-width: 600px) {
    .op-aplayer { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .op-aplayer, .op-aplayer.is-open { transition: none; }
    .op-qact--audio.is-playing .op-qact__ico--pause { animation: none; }
}

/* Avtodrom chooser backdrop: a drawn course behind the panel. Night in the dark theme (glowing
   route, lit signal), day in the light one (pale ground, grey asphalt, white paint). */
.op-stage--art {
    --art-ground: #060b14;
    --art-glow-in: rgba(16, 185, 129, .20);
    --art-glow-out: rgba(6, 11, 20, 0);
    --art-kerb: rgba(16, 185, 129, .35);
    --art-road: #1b2433;
    --art-line: #e2e8f0;
    --art-bay: rgba(56, 189, 248, .85);
    --art-cone: #f97316;
    --art-rail: #94a3b8;
    --art-signal: #0b1220;
    --art-car: #10b981;
    --art-glass: rgba(4, 18, 26, .75);
    overflow: hidden;
}
html.light-theme .op-stage--art {
    --art-ground: #eef4f1;
    --art-glow-in: rgba(16, 185, 129, .16);
    --art-glow-out: rgba(238, 244, 241, 0);
    --art-kerb: #cfd8dc;
    --art-road: #8e9aa6;
    --art-line: #ffffff;
    --art-bay: #2563eb;
    --art-cone: #ea580c;
    --art-rail: #475569;
    --art-signal: #1f2937;
    --art-car: #dc2626;
    --art-glass: rgba(255, 255, 255, .75);
}
.op-art { display: block; width: 100%; height: 100%; }
.op-art__ground { fill: var(--art-ground); }
.op-art__glow-in { stop-color: var(--art-glow-in); }
.op-art__glow-out { stop-color: var(--art-glow-out); }
.op-art__kerb, .op-art__road, .op-art__centre { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.op-art__kerb { stroke: var(--art-kerb); stroke-width: 96; }
.op-art__road { stroke: var(--art-road); stroke-width: 80; }
.op-art__centre { stroke: var(--art-line); stroke-width: 3; stroke-dasharray: 18 16; opacity: .8; }
.op-art__line { fill: var(--art-line); }
.op-art__bay rect, .op-art__bay line { fill: none; stroke: var(--art-bay); stroke-width: 3; stroke-dasharray: 10 6; }
.op-art__label { fill: var(--art-bay); font: 800 22px/1 var(--font-body, system-ui, sans-serif); }
.op-art__cone circle { fill: var(--art-cone); stroke: var(--art-line); stroke-width: 3; }
.op-art__rail line { stroke: var(--art-rail); stroke-width: 5; stroke-linecap: round; }
.op-art__signal { fill: var(--art-signal); stroke: var(--art-rail); stroke-width: 2; }
.op-art__lamp { opacity: .22; }
.op-art__lamp--red { fill: #ef4444; }
.op-art__lamp--amber { fill: #f59e0b; }
.op-art__lamp--green { fill: #22c55e; opacity: 1; filter: drop-shadow(0 0 6px #22c55e); }
.op-art__car-body { fill: var(--art-car); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.op-art__car-glass { fill: var(--art-glass); }
@media (prefers-reduced-motion: reduce) {
    .op-art__car { display: none; }
}

.op-launch__note--center { text-align: center; max-width: 42ch; }

/* Prerendered public pages (PublicRoutes): the server cannot know the screen width, and the
   drawer starts open — on a phone that would cover the first paint until the live layout
   closes it. Below the drawer's breakpoint it stays hidden until then. */
@media (max-width: 1279.98px) {
    .op-shell--prerender .mud-drawer,
    .op-shell--prerender .mud-overlay-drawer,
    .op-shell--prerender .op-drawer-toggle { display: none !important; }
}

/* Sign group cards on /belgilar: the name is the link, stretched over the whole card, so the
   prerendered page gives a crawler something to follow. */
.op-module--link { position: relative; }
.op-stretched-link { color: inherit; text-decoration: none; }
.op-stretched-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.op-stretched-link:focus-visible { outline: none; }
.op-module--link:has(.op-stretched-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Old links land on a sign tile by #b-{code}; scroll-margin keeps it clear of the fixed top bar. */
[id^="b-"] { scroll-margin-top: calc(var(--nav-h, 64px) + 16px); }

/* The traffic code's full text for search engines on /qoidalar (prerender only). Hidden from
   readers, who see the reader above; marked as paywalled in the page's structured data. */
.op-paywalled { display: none; }

/* Quiz: Back beside Next, and each question sliding in from the side it came from (swipe,
   arrows, or the number strip). */
.op-qprev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: var(--radius-pill, 999px);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}
.op-qprev:hover:not(:disabled) { border-color: var(--accent); background: var(--surface); }
.op-qprev:disabled { opacity: .4; cursor: not-allowed; }
.op-qfoot__actions .op-qprev + .op-qnext { margin-left: 0; }

.op-qswipe { touch-action: pan-y; }
.op-qslide--right { animation: op-qslide-right .22s ease-out; }
.op-qslide--left { animation: op-qslide-left .22s ease-out; }
@keyframes op-qslide-right { from { opacity: .3; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes op-qslide-left { from { opacity: .3; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .op-qslide--right, .op-qslide--left { animation: none; }
}
@media (max-width: 600px) {
    .op-qfoot__actions .op-qprev { width: 34px; height: 34px; margin-left: auto; }
}

/* Narrow phones: Ovozli and Qoidasi become round icon buttons (speaker, book) so Back and the
   whole "Keyingi savol" fit on the same line. Their names stay as aria-label and title. */
@media (max-width: 420px) {
    .op-qfoot__actions .op-qact { width: 38px; height: 38px; padding: 0 !important; justify-content: center; }
    .op-qfoot__actions .op-qact > span:not(.op-aplayer) { display: none; }
    .op-qfoot__actions .op-qact .op-qact__ico { margin: 0; }
}
@media (max-width: 360px) {
    .op-qfoot__actions { gap: 4px !important; }
    .op-qfoot__actions .op-qact,
    .op-qfoot__actions .op-qprev { width: 34px; height: 34px; }
    .op-qfoot__actions .op-qnext { padding: 6px 8px !important; font-size: .78rem; }
}

/* Dark theme ground. It used to be a live WebGL water simulation behind the whole app; that
   redrew every frame and made each translucent, blurred panel re-composite with it, which on
   phones meant janky scrolling, heat and battery. A still glow keeps the atmosphere for free. */
html:not(.light-theme) body {
    background:
        radial-gradient(1100px 700px at 85% -10%, rgba(16, 185, 129, .09), transparent 60%),
        radial-gradient(900px 640px at -10% 110%, rgba(59, 130, 246, .08), transparent 60%),
        var(--op-bg);
}

/* =============================================================================
   One sign's page (/belgilar/{group}/{sign}): breadcrumb, the sign itself (.op-signpage
   above), then where it turns up in the exam, related rules and lessons, the neighbours and
   the rest of the group. Sections share one frame; only the sign card is lifted.
   ========================================================================== */
.op-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    font-size: .8rem;
    color: var(--muted);
}
.op-crumbs a { color: var(--muted); text-decoration: none; }
.op-crumbs a:hover { color: var(--accent-bright); }
.op-crumbs [aria-current] { color: var(--text); font-weight: 700; }

.op-signpage__art { background: #fff; }
.op-signpage__art img { display: block; width: 100%; height: auto; }

.op-signpage__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.op-signpage__fav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
}
.op-signpage__fav:hover { border-color: var(--accent); color: var(--text); }
.op-signpage__fav.is-on { color: #F59E0B; border-color: color-mix(in srgb, #F59E0B 55%, transparent); }

.op-signpage__h2 {
    margin: 20px 0 0;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint, var(--muted));
}
.op-signpage__h2 + .op-signpage__desc { margin-top: 8px; white-space: pre-line; color: var(--text-secondary, var(--muted)); }

.op-signsec {
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.op-signsec--split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.op-signsec__title { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; color: var(--text); text-wrap: balance; }
.op-signsec__lede { margin: -4px 0 12px; font-size: .88rem; color: var(--muted); }

.op-signq { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: q; }
.op-signq__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2);
    counter-increment: q;
}
.op-signq__item::before {
    content: counter(q);
    flex-shrink: 0;
    min-width: 1.4em;
    font-weight: 800;
    color: var(--accent-bright);
    font-variant-numeric: tabular-nums;
}
.op-signq__text { flex: 1; font-size: .92rem; line-height: 1.5; color: var(--text); }
.op-signq__ticket {
    flex-shrink: 0;
    font-size: .74rem;
    font-weight: 700;
    color: var(--accent-bright);
    text-decoration: none;
    white-space: nowrap;
}
.op-signq__ticket:hover { text-decoration: underline; }

.op-signsec__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #fff;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
}
.op-signsec__cta:hover { filter: brightness(1.08); }

.op-signchips { display: flex; flex-wrap: wrap; gap: 8px; }
.op-signchip {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong, var(--border));
    background: var(--surface-2);
    color: var(--text);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}
.op-signchip:hover { border-color: var(--accent); color: var(--accent-bright); }

.op-signnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}
.op-signnav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    font-size: .86rem;
    line-height: 1.35;
    text-decoration: none;
    min-width: 0;
}
.op-signnav__link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.op-signnav__link em { font-style: normal; font-weight: 800; color: var(--accent-bright); margin-right: 4px; }
.op-signnav__link--next { justify-content: flex-end; text-align: right; grid-column: 2; }
.op-signnav__link:hover { border-color: var(--accent); }

.op-signgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.op-signgrid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    text-align: center;
    text-decoration: none;
}
.op-signgrid__item:hover { border-color: var(--accent); }
.op-signgrid__item img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.op-signgrid__code { font-size: .74rem; font-weight: 800; color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.op-signgrid__name { font-size: .78rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-signsec__more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 12px;
    font-size: .84rem;
    font-weight: 700;
    color: var(--accent-bright);
    text-decoration: none;
}

/* The tile's name on a group page is now a link to the sign's page. */
.op-sign__link { color: inherit; text-decoration: none; }
.op-sign__link:hover { color: var(--accent-bright); }

@media (max-width: 600px) {
    .op-signsec { padding: 16px; }
    .op-signq__item { flex-direction: column; gap: 4px; }
    .op-signq__item::before { display: none; }
    .op-signnav { grid-template-columns: 1fr; }
    .op-signnav__link--next { grid-column: 1; }
    .op-signgrid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}


/* ---------- Admin: the user list ----------
   One card per person. The avatar and name open their Telegram. Wide screens lay a row out as
   [person | facts | plan + role]; below that the same card stacks, so nothing scrolls sideways. */

.op-usr-count { margin: 0 0 10px; font-size: .82rem; font-weight: 600; color: var(--muted); }

.op-usr-list { display: grid; gap: 10px; }

.op-usr {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 12px 20px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.op-usr:hover { border-color: var(--border-strong, var(--border)); box-shadow: 0 8px 22px -16px rgba(2, 6, 23, .6); }

.op-usr__who { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }

.op-usr__avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border-radius: 50%;
    transition: transform .15s ease;
}

.op-usr__who:hover .op-usr__avatar { transform: scale(1.06); }

.op-usr__id { display: grid; gap: 2px; min-width: 0; }

.op-usr__name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: .98rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.op-usr__who:hover .op-usr__name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.op-usr__you { padding: 1px 8px; font-size: .68rem; font-weight: 800; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; }

.op-usr__handle { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: #229ED9; }
.op-usr__handle .mud-icon-root { font-size: .95rem !important; }

.op-usr__meta { display: flex; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }

.op-usr__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px 3px 7px;
    font-size: .76rem;
    font-weight: 600;
    color: var(--muted);
    background: color-mix(in srgb, var(--text) 7%, transparent);
    border-radius: 999px;
    white-space: nowrap;
}

.op-usr__chip .mud-icon-root { font-size: .95rem !important; color: var(--faint); }

.op-usr__ctl { display: flex; gap: 10px; }
.op-usr__field { display: grid; gap: 3px; width: 150px; }
.op-usr__label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.op-usr__field .mud-input-control { margin-top: 0; }

@media (max-width: 1100px) {
    .op-usr { grid-template-columns: minmax(0, 1fr) auto; }
    .op-usr__meta { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 640px) {
    .op-usr { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 10px; }
    .op-usr__ctl { display: grid; grid-template-columns: 1fr 1fr; }
    .op-usr__field { width: auto; min-width: 0; }
    .op-usr__meta { order: 0; }
}

/* ---------- Required channels ----------
   /obuna: the page a learner sees until they have joined the channels the admin requires.
   /admin/kanallar: the admin's list. */

.op-join { display: grid; justify-items: center; gap: 14px; padding: 28px 0 40px; text-align: center; }

.op-join__icon {
    width: 72px; height: 72px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #2AABEE, #229ED9); border-radius: 22px;
    box-shadow: 0 14px 30px -12px rgba(34, 158, 217, .7);
}
.op-join__icon .mud-icon-root { font-size: 2.2rem !important; }
.op-join__title { margin: 6px 0 0; font-size: 1.5rem; font-weight: 800; line-height: 1.25; color: var(--text); }
.op-join__lead { margin: 0; max-width: 420px; font-size: .95rem; line-height: 1.55; color: var(--muted); }

.op-join__list { display: grid; gap: 10px; width: 100%; margin-top: 10px; text-align: left; }

.op-join__channel {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
}
.op-join__avatar {
    flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
    font-weight: 800; color: #229ED9; background: color-mix(in srgb, #229ED9 16%, transparent); border-radius: 50%;
}
.op-join__name { display: grid; min-width: 0; flex: 1 1 auto; }
.op-join__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.op-join__name small { color: var(--faint); }
.op-join__go {
    flex: 0 0 auto; padding: 9px 16px; font-size: .86rem; font-weight: 800; text-decoration: none; white-space: nowrap;
    color: #fff; background: #229ED9; border-radius: 999px; transition: filter .15s ease, transform .1s ease;
}
.op-join__go:hover { filter: brightness(1.1); }
.op-join__go:active { transform: scale(.97); }

.op-join__check {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 360px; height: 48px;
    margin-top: 6px; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
    color: var(--cfg-04231a, #04231a); background: var(--accent); border: 0; border-radius: 14px;
}
.op-join__check:disabled { opacity: .6; cursor: progress; }

.op-chadd {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) auto;
    align-items: start; gap: 12px; margin-bottom: 18px; padding: 16px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
}
.op-chadd__go { height: 40px; }

.op-chlist { display: grid; gap: 10px; }

.op-ch {
    display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(150px, .7fr) auto; align-items: center; gap: 10px 18px;
    padding: 12px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
}
.op-ch--off { opacity: .6; }
.op-ch__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.op-ch__avatar {
    flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center;
    font-weight: 800; color: #229ED9; background: color-mix(in srgb, #229ED9 16%, transparent); border-radius: 50%;
}
.op-ch__id { display: grid; min-width: 0; }
.op-ch__id strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.op-ch__id small, .op-ch__id small a { color: var(--faint); text-decoration: none; }
.op-ch__ctl { display: flex; align-items: center; gap: 6px; justify-self: end; }

@media (max-width: 1000px) {
    .op-chadd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .op-ch { grid-template-columns: minmax(0, 1fr) auto; }
    .op-ch__audience { grid-column: 1 / 2; }
}

@media (max-width: 640px) {
    .op-chadd { grid-template-columns: minmax(0, 1fr); }
    .op-chadd__go { width: 100%; }
    .op-ch { grid-template-columns: minmax(0, 1fr); }
    .op-ch__ctl { justify-self: stretch; justify-content: space-between; }
}
html.light-theme .op-join__check { color: #fff; }

.op-clickcheck { display: grid; gap: 4px; margin-top: 10px; font-size: .82rem; color: var(--muted); word-break: break-word; }
.op-clickcheck b { color: var(--text); }
