:root {
      --bg: #061427;
      --bg-soft: #0b1f3a;
      --card: rgba(255,255,255,0.085);
      --card-strong: rgba(255,255,255,0.13);
      --text: #f8fbff;
      --muted: #b8c8de;
      --line: rgba(255,255,255,0.16);
      --red: #E63946;
      --gold: #F59E0B;
      --blue: #123C69;
      --green: #10B981;
      --cyan: #38BDF8;
      --white: #ffffff;
      --shadow: 0 24px 70px rgba(0,0,0,0.35);
      --radius: 28px;
      --max: 100%;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background:
        radial-gradient(circle at 18% 8%, rgba(230,57,70,0.20), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(56,189,248,0.18), transparent 34%),
        radial-gradient(circle at 55% 80%, rgba(245,158,11,0.10), transparent 32%),
        linear-gradient(145deg, #04101f 0%, #061427 48%, #0b1f3a 100%);
      color: var(--text);
      overflow-x: hidden;
    }
    a { color: inherit; text-decoration: none; }
    p { color: var(--muted); line-height: 1.8; }
    img { max-width: 100%; display: block; }
    .container { width: min(var(--max), 100%); margin: 0 auto; padding: 0 6vw; }

    .topbar { position: fixed; inset: 0 0 auto 0; z-index: 1000; padding: 13px 6vw; background: rgba(6,20,39,0.76); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.1); transition: all .25s ease; }
    .topbar.scrolled { padding-top: 9px; padding-bottom: 9px; background: rgba(6,20,39,.95); }
    .nav { width: min(var(--max), 100%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
    .brand { display: flex; align-items: center; font-weight: 950; letter-spacing: -.04em; font-size: 1.28rem; }
    .brand-vertical { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1; }
    .brand-logo { display: flex; align-items: center; justify-content: center; background: transparent; box-shadow: none; padding: 0; margin: 0; line-height: 0; }
    .brand-logo img { max-height: 82px; max-width: 185px; width: auto; height: auto; object-fit: contain; }
    .logo-with-flag { position: relative; }
    .canada-flag { position: absolute; top: 4px; right: -16px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.96); font-size: 18px; line-height: 1; box-shadow: 0 8px 22px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.75); }
    .brand-tagline { margin-top: -10px; padding-left: 3px; font-size: .68rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 750; white-space: nowrap; }
    .nav-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: .94rem; }
    .nav-links a:hover { color: white; }
    .nav-cta { padding: 11px 17px; border-radius: 999px; background: linear-gradient(135deg, var(--red), var(--gold)); color: white !important; font-weight: 900; box-shadow: 0 12px 32px rgba(230,57,70,.22); }
    .menu-btn { display: none; border: 1px solid var(--line); background: var(--card); color: white; padding: 10px 13px; border-radius: 14px; }

    .hero { padding: 160px 0 70px; }
    .calculator-hero { padding-bottom: 28px; }
    .calculator-hero h1 { max-width: 920px; }
    .calculator-hero .hero-lead { max-width: 820px; }
    .main-calculator { padding-top: 20px; }
    .breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
    .breadcrumb a { color: #e9f2ff; }
    .eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: #dceaff; font-weight: 900; font-size: .86rem; margin-bottom: 22px; }
    .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 8px rgba(16,185,129,.12); }
    h1 { font-size: clamp(2.8rem, 6vw, 5.8rem); line-height: .95; letter-spacing: -.075em; margin-bottom: 24px; }
    .gradient-text { background: linear-gradient(135deg, #fff, var(--red), var(--gold)); -webkit-background-clip: text; color: transparent; }
    .hero-lead { font-size: clamp(1.08rem, 2vw, 1.26rem); max-width: 760px; }
    .btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
    .btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 22px; border-radius: 999px; font-weight: 950; transition: transform .2s ease, box-shadow .2s ease; }
    .btn:hover { transform: translateY(-3px); }
    .btn-primary { background: linear-gradient(135deg, var(--red), var(--gold)); color: white; box-shadow: 0 18px 42px rgba(230,57,70,.23); }
    .btn-secondary { border: 1px solid var(--line); background: rgba(255,255,255,.08); color: white; }
    .btn-ghost { border: 1px solid rgba(255,255,255,.22); background: transparent; color: white; }

    .calculator-section { padding: 40px 6vw 100px; }
    .calculator-wrap { width: min(var(--max), 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 390px; gap: 28px; align-items: start; }
    .calculator-wrap::before { content: 'Interactive CRS Calculator'; grid-column: 1 / -1; display: inline-flex; width: fit-content; padding: 10px 16px; border-radius: 999px; background: linear-gradient(135deg, var(--red), var(--gold)); color: white; font-weight: 950; box-shadow: 0 14px 34px rgba(230,57,70,.22); }
    .form-card, .side-card, .content-card { background: rgba(255,255,255,.075); border: 1px solid var(--line); border-radius: 30px; padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow); }
    .form-card h2, .side-card h2, .content-card h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.08; letter-spacing: -.055em; margin-bottom: 12px; }
    .form-card p, .side-card p, .content-card p { margin-bottom: 20px; }
    .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 24px; }
    .field { display: grid; gap: 8px; }
    label { color: #eaf2ff; font-weight: 900; font-size: .93rem; }
    select, input { width: 100%; padding: 13px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: white; outline: 0; font: inherit; }
    option { background: #0b1f3a; color: white; }
    .full { grid-column: 1 / -1; }
    .section-title { grid-column: 1 / -1; margin-top: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #ffd59b; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }
    .hint { color: var(--muted); font-size: .86rem; line-height: 1.5; }
    .checkbox-list { display: grid; gap: 10px; margin-top: 10px; }
    .checkbox-list label { display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; }
    .checkbox-list input { width: auto; margin-top: 3px; }
    .clb-panel { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px; border: 1px solid rgba(245,158,11,.28); border-radius: 20px; background: rgba(245,158,11,.09); }
    .clb-panel strong { display: block; margin-bottom: 5px; color: white; }
    .clb-panel span { color: var(--muted); font-size: .92rem; }
    .clb-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
    .clb-chip { padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); color: white; font-weight: 900; font-size: .82rem; white-space: nowrap; }
    .clb-chip.low { background: rgba(230,57,70,.16); color: #ffd5d9; }
    .clb-chip.good { background: rgba(16,185,129,.16); color: #c3ffe9; }

    .side-card { position: sticky; top: 110px; }
    .result-preview { text-align: left; }
    .locked-score { border: 1px dashed rgba(255,255,255,.24); background: rgba(255,255,255,.06); border-radius: 24px; padding: 24px; margin: 20px 0; }
    .locked-score strong { display: block; font-size: 1.4rem; margin-bottom: 8px; color: white; }
    .locked-score span { color: var(--muted); line-height: 1.6; }
    .side-list { display: grid; gap: 12px; margin-top: 18px; }
    .side-item { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
    .side-item strong { display: block; margin-bottom: 5px; }
    .side-item span { color: var(--muted); line-height: 1.55; font-size: .92rem; }

    .info-sections { padding: 0 6vw 100px; }
    .info-grid { width: min(var(--max), 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
    .content-card h3 { font-size: 1.25rem; margin: 18px 0 8px; }
    .content-card ul { color: var(--muted); padding-left: 20px; line-height: 1.75; }
    .content-card li { margin: 7px 0; }
    .warning { border-left: 4px solid var(--red); padding: 18px 20px; background: rgba(230,57,70,.1); border-radius: 18px; margin: 22px 0; }
    .greenbox { border-left: 4px solid var(--green); padding: 18px 20px; background: rgba(16,185,129,.1); border-radius: 18px; margin: 22px 0; }

    .faq-section { padding: 0 6vw 100px; }
    .faq-wrap { width: min(var(--max), 100%); margin: 0 auto; }
    details { background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 12px 0; }
    summary { cursor: pointer; color: white; font-weight: 900; }

    .modal-overlay { position: fixed; inset: 0; z-index: 5000; background: rgba(0,0,0,.68); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; padding: 22px; }
    .modal-overlay.show { display: flex; }
    .modal-card { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; border: 1px solid rgba(255,255,255,.18); background: linear-gradient(180deg, rgba(11,31,58,.98), rgba(6,20,39,.98)); border-radius: 34px; box-shadow: 0 40px 110px rgba(0,0,0,.58); padding: clamp(24px, 4vw, 40px); position: relative; }
    .modal-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: white; font-size: 24px; cursor: pointer; }
    .modal-kicker { color: #ffd59b; font-weight: 950; text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; margin-bottom: 12px; }
    .modal-score { display: flex; flex-wrap: wrap; align-items: end; gap: 18px; margin: 14px 0 12px; }
    .modal-score-value { font-size: clamp(4.4rem, 14vw, 8rem); line-height: .86; font-weight: 950; letter-spacing: -.08em; background: linear-gradient(135deg,#fff,var(--red),var(--gold)); -webkit-background-clip: text; color: transparent; }
    .modal-status { display: inline-flex; padding: 10px 14px; border-radius: 999px; background: rgba(16,185,129,.15); color: #c3ffe9; font-weight: 950; margin-bottom: 10px; }
    .modal-bar { height: 14px; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; margin: 18px 0 20px; }
    .modal-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg,var(--red),var(--gold),var(--green)); border-radius: inherit; transition: width .35s ease; }
    .modal-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin: 20px 0; }
    .modal-row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 14px; border-radius: 16px; background: rgba(255,255,255,.07); color: var(--muted); }
    .modal-row strong { color: white; }
    .suggestion-box { border-left: 4px solid var(--gold); padding: 18px 20px; background: rgba(245,158,11,.1); border-radius: 18px; margin: 20px 0; }
    .suggestion-box h3 { margin-bottom: 8px; }
    .suggestion-box p { margin-bottom: 0; }
    .modal-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

    footer { padding: 55px 6vw 36px; border-top: 1px solid var(--line); background: rgba(0,0,0,.18); }
    .footer-grid { width: min(var(--max), 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; align-items: start; }
    footer p, footer a { color: var(--muted); line-height: 1.75; }
    .footer-links { display: grid; gap: 9px; }
    .brainiq { color: white; font-weight: 950; }
    .copyright { width: min(var(--max), 100%); margin: 34px auto 0; color: #8fa0b8; font-size: .9rem; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

    #backToTop { position: fixed; bottom: 28px; right: 28px; width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: linear-gradient(135deg, var(--red), var(--gold)); color: white; font-size: 25px; font-weight: 950; display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 45px rgba(0,0,0,.55); z-index: 9999; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(18px) scale(.92); transition: all .25s ease; }
    #backToTop.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }

    .reveal { opacity: 0; transform: translateY(34px); transition: opacity .85s ease, transform .85s cubic-bezier(.2,.8,.2,1); }
    .reveal-left { opacity: 0; transform: translateX(-56px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
    .reveal-right { opacity: 0; transform: translateX(56px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
    .reveal-zoom { opacity: 0; transform: scale(.94) translateY(24px); transition: opacity .85s ease, transform .85s cubic-bezier(.2,.8,.2,1); }
    .visible { opacity: 1; transform: translate(0,0) scale(1); }

    @media (max-width: 980px) {
      .calculator-wrap, .info-grid, .footer-grid { grid-template-columns: 1fr; }
      .side-card { position: static; }
      .nav-links { display: none; position: absolute; top: 96px; left: 6vw; right: 6vw; padding: 18px; background: rgba(6,20,39,.97); border: 1px solid var(--line); border-radius: 22px; flex-direction: column; align-items: flex-start; }
      .nav-links.open { display: flex; }
      .menu-btn { display: inline-flex; }
    }
    @media (max-width: 640px) {
      .hero { padding-top: 145px; }
      .container, .calculator-section, .info-sections, .faq-section { padding-left: 5vw; padding-right: 5vw; }
      .brand-logo img { max-height: 72px; max-width: 160px; }
      .brand-tagline { margin-top: -8px; font-size: .61rem; }
      .canada-flag { top: 3px; right: -12px; width: 24px; height: 24px; font-size: 15px; }
      h1 { font-size: 3.05rem; }
      .form-grid, .modal-grid { grid-template-columns: 1fr; }
      .clb-panel { align-items: flex-start; flex-direction: column; }
      .clb-chips { justify-content: flex-start; }
    }
