:root {
  --bg: #141619;
  --bg-deep: #0f1114;
  --surface: #1f2226;
  --surface-alt: #272a2f;
  --surface-soft: #30343a;
  --border: #41454b;
  --accent: #e26d26;
  --accent-hover: #f28137;
  --text: #eeeff1;
  --muted: #aaafb5;
  --success: #4cb070;
  --warning: #d9a441;
  --discord: #5865f2;
  --radius: 10px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
code { color: #ffc495; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 4px; padding: .15rem .35rem; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; transform: translateY(-150%); background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 100; top: 0; background: rgba(15,17,20,.88); border-bottom: 1px solid rgba(65,69,75,.7); backdrop-filter: blur(16px); }
.nav-shell { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-copy { display: grid; line-height: 1; gap: 4px; }
.brand-copy strong { font-size: 15px; letter-spacing: .13em; }
.brand-copy small { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .32em; }
.public-nav { display: flex; align-items: center; gap: 6px; }
.public-nav a { color: var(--muted); font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 6px; transition: .2s ease; }
.public-nav a:hover, .public-nav a.active { color: var(--text); background: rgba(255,255,255,.05); }
.public-nav .nav-cta { color: #fff; background: var(--accent); margin-left: 8px; }
.public-nav .nav-cta:hover { background: var(--accent-hover); }
.nav-toggle { display: none; width: 44px; height: 40px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); padding: 9px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; background: var(--text); }

.hero { position: relative; overflow: hidden; min-height: 700px; display: grid; align-items: center; background: radial-gradient(circle at 75% 25%, rgba(226,109,38,.16), transparent 32%), linear-gradient(135deg, #15181c 0%, #101216 72%); border-bottom: 1px solid var(--border); }
.hero-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, #000, transparent 92%); }
.hero-glow { position: absolute; width: 560px; height: 560px; right: -130px; top: 30px; background: rgba(226,109,38,.12); filter: blur(100px); border-radius: 50%; }
.hero-content { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; padding-block: 90px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; font-size: 12px; letter-spacing: .16em; }
.hero h1, .page-hero h1 { margin: 0; font-size: clamp(48px, 7vw, 88px); line-height: .98; letter-spacing: -.045em; }
.hero-lead { max-width: 650px; color: #c2c6cb; font-size: 19px; margin: 26px 0 30px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid transparent; border-radius: 6px; font-weight: 800; font-size: 12px; letter-spacing: .07em; transition: .2s ease; cursor: pointer; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.button.secondary { background: var(--surface-alt); border-color: var(--border); color: var(--text); }
.button.secondary:hover { background: var(--surface-soft); }
.button.discord { background: var(--discord); color: #fff; }
.button.discord:hover { background: #6873f5; }
.button.full { width: 100%; }
.button.disabled { background: rgba(255,255,255,.04); border-color: var(--border); color: #737980; cursor: not-allowed; }
.hero-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; margin-top: 24px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(76,176,112,.12); }

.launcher-card { background: rgba(31,34,38,.94); border: 1px solid #494e55; border-radius: 12px; padding: 18px; box-shadow: var(--shadow); transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); }
.launcher-card-header { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 2px 2px 15px; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.launcher-banner { min-height: 150px; display: flex; align-items: end; gap: 18px; padding: 24px; border: 1px solid var(--border); border-radius: 8px; background: linear-gradient(90deg, rgba(15,17,20,.96), rgba(15,17,20,.35)), radial-gradient(circle at 80% 20%, rgba(226,109,38,.55), transparent 35%), #272b31; }
.launcher-banner div { display: grid; gap: 4px; }
.launcher-banner small { color: var(--accent); font-weight: 800; letter-spacing: .13em; }
.launcher-banner strong { font-size: 21px; }
.launcher-content { display: grid; gap: 9px; padding-block: 14px; }
.mini-card { display: grid; gap: 3px; padding: 12px 14px; background: #272a2f; border: 1px solid #41454b; border-radius: 6px; }
.mini-card span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.mini-card strong { font-size: 13px; }

.section { padding-block: 100px; }
.section-heading { max-width: 750px; margin-bottom: 42px; }
.section-heading.left { margin: 0; }
.section-heading h2, .callout h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 16px; }
.section-heading > p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.department-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.department-card { position: relative; min-height: 290px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .2s ease; }
.department-card:hover { transform: translateY(-5px); border-color: #626871; }
.card-number { position: absolute; right: 18px; top: 12px; color: rgba(255,255,255,.06); font-size: 64px; font-weight: 900; }
.department-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: rgba(226,109,38,.1); border: 1px solid rgba(226,109,38,.25); font-size: 22px; }
.department-card h3 { margin: 58px 0 10px; font-size: 20px; }
.department-card p { color: var(--muted); margin: 0; }
.dark-section { background: var(--bg-deep); border-block: 1px solid var(--border); }
.application-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li { display: grid; grid-template-columns: 62px 1fr; gap: 18px; align-items: center; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.steps-list > li > span { color: var(--accent); font-size: 22px; font-weight: 900; }
.steps-list strong { font-size: 16px; }
.steps-list p { margin: 3px 0 0; color: var(--muted); }
.callout-section { padding-block: 70px; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px; background: linear-gradient(115deg, rgba(226,109,38,.16), transparent 40%), var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.callout h2 { margin: 0; font-size: clamp(28px, 4vw, 45px); }

.page-hero { background: radial-gradient(circle at 80% 10%, rgba(226,109,38,.18), transparent 30%), #111317; border-bottom: 1px solid var(--border); }
.page-hero.compact { padding-block: 85px; }
.page-hero h1 { font-size: clamp(48px, 7vw, 78px); }
.page-hero p:last-child { max-width: 650px; color: var(--muted); font-size: 18px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-card { position: relative; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-card:hover img { transform: scale(1.04); }
.gallery-overlay { position: absolute; inset: auto 0 0; display: grid; gap: 2px; padding: 38px 18px 16px; text-align: left; color: #fff; background: linear-gradient(transparent, rgba(10,11,13,.94)); }
.gallery-overlay small { color: #ffb682; font-weight: 800; letter-spacing: .12em; }
.gallery-overlay strong { font-size: 18px; }
.editor-note { color: var(--muted); margin-top: 25px; }
.gallery-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 40px; background: rgba(7,8,10,.94); }
.gallery-modal[hidden] { display: none; }
.gallery-modal img { max-height: 80vh; border: 1px solid var(--border); border-radius: 8px; }
.gallery-modal strong { margin-top: 14px; font-size: 20px; }
.gallery-close { position: absolute; top: 22px; right: 25px; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: #fff; font-size: 28px; cursor: pointer; }
.modal-open { overflow: hidden; }

.link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.link-card { min-height: 190px; display: grid; grid-template-columns: 58px 1fr auto; gap: 20px; align-items: start; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; transition: .2s ease; }
.link-card:hover { transform: translateY(-4px); border-color: #676d75; }
.link-card.featured { background: linear-gradient(120deg, rgba(88,101,242,.18), transparent 55%), var(--surface); }
.link-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--accent); font-size: 22px; font-weight: 900; }
.link-card small { color: var(--accent); font-weight: 800; letter-spacing: .12em; }
.link-card h2 { margin: 5px 0 8px; font-size: 23px; }
.link-card p { margin: 0; color: var(--muted); }
.link-arrow { color: var(--muted); font-size: 23px; }

.login-main { min-height: calc(100vh - 76px); display: grid; align-items: center; background: radial-gradient(circle at 80% 20%, rgba(226,109,38,.14), transparent 30%), var(--bg-deep); }
.login-shell { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: center; padding-block: 80px; }
.login-info h1 { font-size: clamp(45px, 6vw, 75px); line-height: 1; margin: 0 0 22px; letter-spacing: -.04em; }
.login-info > p:not(.eyebrow) { color: var(--muted); font-size: 18px; max-width: 650px; }
.login-checks { display: grid; gap: 14px; margin-top: 34px; }
.login-checks > div { display: flex; gap: 13px; align-items: start; }
.login-checks > div > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-weight: 900; }
.login-checks p { display: grid; margin: 0; }
.login-checks small { color: var(--muted); }
.login-card { padding: 38px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.login-card > img { margin-bottom: 26px; }
.login-card h2 { font-size: 34px; margin: 0; }
.login-card > p:not(.eyebrow):not(.fine-print) { color: var(--muted); margin: 6px 0 25px; }
.login-card .button + .button { margin-top: 10px; }
.alert { padding: 13px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert.warning { color: #ffe0a3; background: rgba(217,164,65,.12); border: 1px solid rgba(217,164,65,.35); }
.signed-user, .member-chip { display: flex; align-items: center; gap: 11px; }
.signed-user { padding: 10px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-alt); }
.signed-user img, .member-chip img { border-radius: 50%; object-fit: cover; }
.signed-user span, .member-chip span { display: grid; }
.signed-user small, .member-chip small { color: var(--muted); }
.fine-print { color: #757b82; font-size: 11px; margin: 18px 0 0; text-align: center; }

.site-footer { border-top: 1px solid var(--border); background: #101216; padding-top: 65px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 50px; padding-bottom: 50px; }
.footer-brand { margin-bottom: 16px; }
.footer-grid p { color: var(--muted); max-width: 400px; }
.footer-grid h2 { font-size: 13px; letter-spacing: .12em; color: var(--text); text-transform: uppercase; }
.footer-grid > div:not(:first-child) { display: grid; align-content: start; gap: 9px; }
.footer-grid > div:not(:first-child) a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 20px; color: #747a81; font-size: 12px; border-top: 1px solid rgba(65,69,75,.6); }

.panel-body { background: #15171a; }
.panel-layout { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.panel-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #111316; border-right: 1px solid var(--border); }
.panel-brand-wrap { height: 88px; display: flex; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--border); }
.panel-nav { display: grid; gap: 6px; padding: 22px 14px; }
.panel-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; color: var(--muted); border-radius: 7px; font-size: 14px; font-weight: 600; }
.panel-nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.panel-nav a.active { color: #fff; background: var(--accent); }
.nav-icon { width: 24px; text-align: center; font-weight: 900; }
.panel-sidebar-bottom { margin-top: auto; display: grid; gap: 8px; padding: 18px; border-top: 1px solid var(--border); }
.panel-sidebar-bottom a { color: var(--muted); font-size: 13px; padding: 7px; }
.panel-sidebar-bottom a:hover { color: #fff; }
.panel-main { min-width: 0; padding: 0 34px 60px; }
.panel-topbar { min-height: 108px; display: flex; justify-content: space-between; align-items: center; gap: 25px; border-bottom: 1px solid var(--border); }
.panel-topbar h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.panel-topbar .eyebrow { margin-bottom: 3px; }
.member-chip { min-width: 210px; justify-content: flex-end; }
.member-chip strong { font-size: 14px; }
.member-chip small { font-size: 11px; }
.panel-hero-card { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 30px; border: 1px solid var(--border); border-radius: 10px; background: radial-gradient(circle at 90% 0%, rgba(226,109,38,.2), transparent 30%), var(--surface); }
.panel-hero-card h2 { font-size: 32px; margin: 0 0 7px; }
.panel-hero-card p { color: var(--muted); margin: 0; }
.verified-badge { display: inline-flex; white-space: nowrap; color: #bff2cf; background: rgba(76,176,112,.12); border: 1px solid rgba(76,176,112,.35); border-radius: 30px; padding: 8px 12px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.dashboard-card { min-height: 245px; display: flex; flex-direction: column; align-items: start; padding: 23px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; transition: .2s ease; }
.dashboard-card:hover { transform: translateY(-3px); border-color: #656b73; }
.dashboard-card.accent-card { background: linear-gradient(145deg, rgba(226,109,38,.18), transparent 55%), var(--surface); }
.dashboard-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--accent); font-size: 20px; }
.dashboard-card small { margin-top: 27px; color: var(--accent); font-weight: 800; letter-spacing: .1em; }
.dashboard-card h2 { margin: 4px 0 7px; font-size: 21px; }
.dashboard-card p { margin: 0; color: var(--muted); font-size: 14px; }
.card-link { margin-top: auto; padding-top: 15px; font-size: 13px; font-weight: 700; }
.panel-section-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.panel-list-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.panel-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.panel-card-heading small { color: var(--accent); font-weight: 800; letter-spacing: .1em; }
.panel-card-heading h2 { margin: 2px 0 0; font-size: 20px; }
.panel-card-heading a { color: var(--muted); font-size: 12px; }
.resource-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid rgba(65,69,75,.65); }
.resource-row > div { display: grid; }
.resource-row small { color: var(--muted); }
.resource-type { min-width: 37px; height: 30px; display: grid; place-items: center; padding-inline: 6px; color: var(--accent); background: rgba(226,109,38,.1); border: 1px solid rgba(226,109,38,.3); border-radius: 5px; font-size: 9px; font-weight: 900; }
.resource-type.large { width: 48px; height: 40px; }
.panel-page-intro { margin-top: 28px; padding: 18px 20px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.panel-page-intro p { margin: 0; }
.warning-strip { border-left: 4px solid var(--warning); }
.warning-strip strong { color: #ffe1a8; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.resource-card { min-height: 310px; display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.resource-card-top, .download-title-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.tag { color: #d3d6da; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 20px; padding: 5px 9px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.tag.required { color: #ffd1b1; border-color: rgba(226,109,38,.45); background: rgba(226,109,38,.12); }
.resource-card h2 { margin: 28px 0 8px; font-size: 22px; }
.resource-card p { color: var(--muted); margin: 0; }
.resource-card > small { color: #7d838a; margin: auto 0 18px; padding-top: 20px; }
.download-list { display: grid; gap: 12px; margin-top: 18px; }
.download-card { display: grid; grid-template-columns: 58px 1fr auto; gap: 20px; align-items: center; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.download-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: rgba(226,109,38,.1); border: 1px solid rgba(226,109,38,.3); font-size: 22px; }
.download-copy h2 { margin: 0; font-size: 20px; }
.download-copy p { color: var(--muted); margin: 6px 0; }
.download-copy small { color: #7f858c; }
.profile-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 28px; }
.profile-card { min-height: 300px; display: flex; flex-direction: column; align-items: start; padding: 32px; background: radial-gradient(circle at 90% 10%, rgba(226,109,38,.2), transparent 35%), var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.profile-card > img { border-radius: 50%; border: 3px solid rgba(226,109,38,.55); margin-bottom: 24px; }
.profile-card h2 { margin: 0; font-size: 32px; }
.profile-card p { color: var(--muted); margin: 4px 0 20px; }
.profile-details { display: grid; gap: 16px; }
.profile-details > div { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.profile-details small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.error-page { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: start; }
.error-page h1 { font-size: 120px; line-height: .8; margin: 0; color: var(--surface-soft); }
.error-page > p:not(.eyebrow) { color: var(--muted); font-size: 19px; max-width: 650px; }

@media (max-width: 1050px) {
  .hero-content { gap: 35px; }
  .department-grid, .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-layout { grid-template-columns: 230px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .nav-toggle { display: block; }
  .public-nav { position: absolute; top: 76px; left: 14px; right: 14px; display: none; flex-direction: column; align-items: stretch; padding: 12px; background: #17191d; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
  .public-nav.open { display: flex; }
  .public-nav .nav-cta { margin-left: 0; text-align: center; }
  .hero { min-height: auto; }
  .hero-content, .application-grid, .login-shell { grid-template-columns: 1fr; }
  .hero-content { padding-block: 70px; }
  .launcher-card { transform: none; }
  .gallery-grid, .link-grid, .panel-section-grid, .profile-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .panel-layout { display: block; }
  .panel-sidebar { position: static; height: auto; }
  .panel-nav { grid-template-columns: repeat(3, 1fr); }
  .panel-nav a { justify-content: center; text-align: center; }
  .panel-sidebar-bottom { display: none; }
  .panel-main { padding: 0 18px 45px; }
  .panel-topbar { min-height: 95px; }
  .member-chip span { display: none; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 52px; }
  .department-grid, .dashboard-grid, .resource-grid { grid-template-columns: 1fr; }
  .section { padding-block: 70px; }
  .callout { align-items: start; flex-direction: column; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .gallery-grid { grid-template-columns: 1fr; }
  .link-card { grid-template-columns: 48px 1fr; }
  .link-arrow { display: none; }
  .login-card { padding: 26px; }
  .panel-nav { grid-template-columns: 1fr 1fr; }
  .panel-nav a { font-size: 12px; }
  .panel-topbar { align-items: start; padding-block: 18px; }
  .panel-topbar h1 { font-size: 24px; }
  .panel-hero-card { align-items: start; flex-direction: column; }
  .download-card { grid-template-columns: 48px 1fr; }
  .download-card .button { grid-column: 1 / -1; width: 100%; }
}

/* === FIVEQUEBEC INTERACTIVE MAP V4 === */
.interactive-map-page {
  min-width: 0;
}

.interactive-map-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
}

.interactive-map-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 118px);
  min-height: 520px;
  overflow: hidden;
  background: #aac4e6;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}

.interactive-map-viewport.is-dragging {
  cursor: grabbing;
}

.interactive-map-viewport:focus-visible {
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .28),
    inset 0 0 0 3px rgba(226, 109, 38, .7);
}

.interactive-map-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 9216px;
  height: 12288px;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
}

.interactive-map-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 9216px;
  height: 12288px;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.interactive-map-layer {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.interactive-map-layer[hidden] {
  display: none;
}

.interactive-map-layer-postals {
  top: 0;
  left: 0;
  width: 9216px;
  height: 12288px;
}

/* Panneau de calques à droite, dans le frame de la carte */
.fq-map-panel {
  --fq-map-panel-width: 340px;
  position: absolute;
  z-index: 30;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(var(--fq-map-panel-width), calc(100% - 72px));
  color: var(--text);
  background: rgba(31, 34, 38, .98);
  border: 1px solid var(--border);
  border-radius: 0 9px 9px 0;
  box-shadow: -18px 0 44px rgba(0, 0, 0, .32);
  transform: translateX(0);
  transition: transform .22s ease;
  backdrop-filter: blur(14px);
}

.fq-map-panel.is-closed {
  transform: translateX(calc(100% + 18px));
}

.fq-map-panel-handle {
  position: absolute;
  top: 50%;
  left: -42px;
  width: 42px;
  height: 72px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, .16);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  box-shadow: -8px 4px 18px rgba(0, 0, 0, .24);
  transform: translateY(-50%);
  cursor: pointer;
}

.fq-map-panel-handle:hover {
  background: var(--accent-hover);
}

.fq-map-panel-handle span {
  display: block;
  font: 800 28px/1 "Segoe UI", sans-serif;
  transition: transform .22s ease;
}

.fq-map-panel.is-closed .fq-map-panel-handle span {
  transform: rotate(180deg);
}

.fq-map-panel-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.fq-map-panel-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.fq-map-panel-header small {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.fq-map-panel-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 23px;
}

.fq-map-panel-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 400 23px/1 "Segoe UI", sans-serif;
  cursor: pointer;
}

.fq-map-panel-close:hover {
  color: #fff;
  border-color: #666c74;
}

.fq-map-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px 16px 0;
  gap: 8px;
}

.fq-map-panel-actions button {
  min-height: 36px;
  padding: 8px 10px;
  color: #d8dade;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.fq-map-panel-actions button:hover {
  color: #fff;
  background: var(--surface-soft);
  border-color: #5d636b;
}

.fq-map-panel-search {
  position: relative;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.fq-map-panel-search input {
  width: 100%;
  height: 39px;
  padding: 0 40px 0 12px;
  color: var(--text);
  background: #17191c;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}

.fq-map-panel-search input::placeholder {
  color: #777d85;
}

.fq-map-panel-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(226, 109, 38, .15);
}

.fq-map-panel-search span {
  position: absolute;
  top: 50%;
  right: 29px;
  color: var(--muted);
  font-size: 17px;
  transform: translateY(-50%);
  pointer-events: none;
}

.fq-map-panel-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-color: #555b63 #24272b;
  scrollbar-width: thin;
}

.fq-map-panel-section {
  padding: 18px 16px;
}

.fq-map-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fq-map-section-title h3 {
  margin: 0;
  color: #cfd2d6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fq-map-section-title span {
  min-width: 24px;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.fq-map-layer-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease;
}

.fq-map-layer-row:hover {
  background: var(--surface-soft);
  border-color: #5e646c;
}

.fq-map-layer-row.is-hidden-by-search {
  display: none;
}

.fq-map-layer-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

.fq-map-layer-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.fq-map-layer-copy strong {
  color: var(--text);
  font-size: 12px;
}

.fq-map-layer-copy small {
  color: var(--muted);
  font-size: 10px;
}

.fq-map-switch {
  position: relative;
  display: inline-flex;
}

.fq-map-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fq-map-switch-track {
  position: relative;
  width: 42px;
  height: 23px;
  display: block;
  background: #34383e;
  border: 1px solid #555b63;
  border-radius: 999px;
  transition:
    background .16s ease,
    border-color .16s ease;
}

.fq-map-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  display: block;
  background: var(--muted);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .28);
  transition:
    transform .16s ease,
    background .16s ease;
}

.fq-map-switch input:checked + .fq-map-switch-track {
  background: rgba(226, 109, 38, .28);
  border-color: var(--accent);
}

.fq-map-switch input:checked + .fq-map-switch-track .fq-map-switch-thumb {
  background: var(--accent);
  transform: translateX(19px);
}

.fq-map-switch input:focus-visible + .fq-map-switch-track {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

.fq-map-empty {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.fq-map-panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  color: #7d838a;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: .04em;
}

.fq-map-panel-footer small {
  color: #686e75;
}

@media (max-width: 900px) {
  .interactive-map-shell {
    padding: 12px;
  }

  .interactive-map-viewport {
    height: calc(100vh - 104px);
    min-height: 420px;
  }

  .fq-map-panel {
    top: 12px;
    right: 12px;
    bottom: 12px;
    --fq-map-panel-width: 300px;
  }

  .fq-map-panel.is-closed {
    transform: translateX(calc(100% + 12px));
  }
}

@media (max-width: 520px) {
  .fq-map-panel {
    width: calc(100% - 50px);
  }
}

