/* vivre-ensemble-luxembourg.com — "The English guide"
   Palette: cool paper, slate ink, and the three exam areas as colours
   (rights = red, institutions = Luxembourg light blue, history = old gold). */

@font-face { font-family: "Schibsted Grotesk"; src: url(/assets/fonts/schibsted-grotesk-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/assets/fonts/schibsted-grotesk-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f5f7f9;
  --card: #ffffff;
  --ink: #17212b;
  --muted: #55626e;
  --rule: #d8dfe5;
  --deep: #0f3550;
  --rights: #d2334c;
  --rights-soft: #fbe9ec;
  --inst: #0a8bcc;
  --inst-soft: #e3f2fa;
  --hist: #b07d22;
  --hist-soft: #f7efdf;
  --trap: #fff4d4;
  --trap-line: #e2ad2f;
  --ok: #1e8a52;
  --ok-soft: #e4f4ea;
  --bad: #c2353d;
  --bad-soft: #fbe8e9;
  --head: "Schibsted Grotesk", "Arial Narrow", Arial, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: #0b6fa3; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--inst); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -.015em; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 0 0 .9rem; letter-spacing: -.028em; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin: 2.6rem 0 .8rem; }
h3 { font-weight: 700; font-size: 1.2rem; margin: 1.8rem 0 .5rem; letter-spacing: -.005em; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
li { margin-bottom: .35rem; }
strong, b { font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 50; }

/* ---------- header ---------- */
.top { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 38px; height: 38px; flex-shrink: 0; }
.brand-name { font: 800 1.06rem/1.05 var(--head); letter-spacing: -.02em; display: block; }
.brand-sub { font-size: .8rem; color: var(--muted); display: block; margin-top: 2px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 8px 9px; white-space: nowrap; border-radius: 6px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--inst-soft); color: var(--deep); }
.nav .nav-cta { background: var(--deep); color: #fff; font-weight: 700; padding: 8px 14px; margin-left: 6px; }
.nav .nav-cta:hover { background: #0a2a40; color: #fff; }
.langs { display: flex; gap: 2px; font-size: .85rem; }
.langs a { text-decoration: none; color: var(--muted); padding: 4px 6px; border-radius: 4px; }
.langs a:hover, .langs a[aria-current="page"] { color: var(--deep); background: var(--inst-soft); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; font: 700 .95rem var(--body); color: var(--ink); cursor: pointer; }
@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--rule); box-shadow: 0 12px 24px rgba(15,53,80,.08); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1rem; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .langs { justify-content: center; margin-top: 6px; }
}

/* ---------- the exam grid (signature element) ---------- */
.exam { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 22px 22px 18px; }
.exam-title { font: 800 1.1rem/1.2 var(--head); margin: 0 0 4px; }
.exam-sub { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.cells i { aspect-ratio: 1; border-radius: 4px; display: block; }
.cells .r { background: var(--rights); }
.cells .n { background: var(--inst); }
.cells .h { background: var(--hist); }
.exam-key { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.exam-key li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline; margin: 0; font-size: .95rem; }
.exam-key li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; transform: translateY(1px); }
.exam-key .r::before { background: var(--rights); }
.exam-key .n::before { background: var(--inst); }
.exam-key .h::before { background: var(--hist); }
.exam-key b { font-family: var(--head); font-size: 1.05rem; }
.exam-key a { color: var(--ink); }
/* compact strip in the side rail: dims the areas this page doesn't cover */
.strip .cells { gap: 3px; }
.strip .cells i { border-radius: 2px; }
.strip[data-topic="rights"] .cells i:not(.r),
.strip[data-topic="institutions"] .cells i:not(.n),
.strip[data-topic="history"] .cells i:not(.h) { opacity: .16; }
.strip p { font-size: .86rem; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.strip p b { color: var(--ink); }

/* ---------- home hero ---------- */
.hero { padding: 56px 0 46px; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); max-width: 15ch; }
.lead { font-size: 1.2rem; line-height: 1.55; color: #33414d; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-block; font: 700 1rem/1 var(--body); padding: 15px 22px; border-radius: 8px; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-main { background: var(--deep); color: #fff; }
.btn-main:hover { background: #0a2a40; color: #fff; }
.btn-line { border-color: var(--deep); color: var(--deep); background: transparent; }
.btn-line:hover { background: var(--deep); color: #fff; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 34px; } .hero { padding-top: 36px; } }

/* ---------- page head ---------- */
.phead { padding: 40px 0 30px; border-bottom: 1px solid var(--rule); background: #fff; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.phead .lead { margin-bottom: 14px; }
.meta { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink); }
.tag::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--muted); }
.tag[data-topic="rights"]::before { background: var(--rights); }
.tag[data-topic="institutions"]::before { background: var(--inst); }
.tag[data-topic="history"]::before { background: var(--hist); }

/* ---------- article layout ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding: 38px 22px 70px; }
.rail { position: sticky; top: 90px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; padding-bottom: 10px; }
.rail .exam { padding: 16px; border-radius: 10px; margin-bottom: 22px; }
.rail .exam-title { font-size: .95rem; }
.toc-h { font: 800 .95rem var(--head); margin: 0 0 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--deep); font-weight: 700; }
.toc-m { display: none; }
.article { max-width: 72ch; }
.article > section:first-child > h2:first-child { margin-top: 0; }
.article section { scroll-margin-top: 90px; }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 22px; }
  .rail { display: none; }
  .toc-m { display: block; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 16px; margin-bottom: 26px; }
  .toc-m summary { font: 800 1rem var(--head); cursor: pointer; }
  .toc-m ol { margin: 10px 0 2px; padding-left: 1.2rem; }
  .toc-m a { color: var(--ink); }
}

/* ---------- content components ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 1.4rem 0 1.8rem; border-top: 3px solid var(--ink); }
.facts div { padding: 14px 14px 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 800 1.9rem/1 var(--head); letter-spacing: -.03em; color: var(--deep); }
.facts dd { margin: 6px 0 0; font-size: .92rem; color: var(--muted); line-height: 1.4; }
.trap { background: var(--trap); border-left: 5px solid var(--trap-line); padding: 14px 18px 4px; margin: 1.4rem 0; border-radius: 0 8px 8px 0; }
.trap-h { font: 800 1rem var(--head); margin-bottom: .35rem; color: #6b4a00; }
.trap-h::before { content: "⚠ "; }
.note { background: var(--inst-soft); padding: 14px 18px 4px; margin: 1.4rem 0; border-radius: 8px; }
.timeline { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; border-left: 3px solid var(--hist); }
.timeline li { position: relative; padding: 0 0 14px 22px; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--hist); }
.timeline b { font: 800 1.08rem var(--head); display: block; color: var(--ink); }
.timeline span { color: #33414d; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 1.4rem 0; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 6px 54px; margin: 0 0 14px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--deep); color: #fff; font: 800 1.05rem/38px var(--head); text-align: center; }
.steps > li h3 { margin: 6px 0 .35rem; }
.tbl-wrap { overflow-x: auto; margin: 1.4rem 0 1.8rem; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.tbl { border-collapse: collapse; width: 100%; font-size: .95rem; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl thead th { font-family: var(--head); font-weight: 800; background: #eef2f5; }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* practice questions */
.q { background: #fff; border: 1px solid var(--rule); border-left: 5px solid var(--muted); border-radius: 0 10px 10px 0; padding: 16px 20px 6px; margin: 1.4rem 0; }
.q[data-topic="rights"] { border-left-color: var(--rights); }
.q[data-topic="institutions"] { border-left-color: var(--inst); }
.q[data-topic="history"] { border-left-color: var(--hist); }
.q-meta { font-size: .84rem; color: var(--muted); margin-bottom: .3rem; }
.q-text { font: 700 1.12rem/1.4 var(--head); margin-bottom: .8rem; letter-spacing: -.005em; }
.q-opts { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: 7px; counter-reset: o; }
.q-opts li { counter-increment: o; margin: 0; border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px 10px 44px; position: relative; cursor: pointer; background: #fbfcfd; line-height: 1.4; }
.q-opts li::before { content: counter(o, upper-alpha); position: absolute; left: 12px; top: 9px; width: 22px; height: 22px; border-radius: 5px; background: #e9eef2; font: 800 .8rem/22px var(--head); text-align: center; color: var(--muted); }
.q-opts li:hover { border-color: #9fb1bf; }
.q.done .q-opts li { cursor: default; }
.q.done .q-opts li.ok { background: var(--ok-soft); border-color: var(--ok); }
.q.done .q-opts li.ok::before { background: var(--ok); color: #fff; content: "✓"; }
.q-opts li.no { background: var(--bad-soft); border-color: var(--bad); }
.q-opts li.no::before { background: var(--bad); color: #fff; content: "✕"; }
.q-ans summary { cursor: pointer; font-weight: 700; color: #0b6fa3; padding: 4px 0 10px; }
.q-ans[open] summary { color: var(--muted); }
.q-ans p { font-size: .98rem; }

/* course block */
.course { background: var(--deep); color: #e7f0f6; border-radius: 16px; padding: 34px 34px 30px; margin: 2.6rem 0; display: grid; grid-template-columns: 1fr; gap: 22px; }
.course h2 { color: #fff; margin: 0 0 .5rem; }
.course p { color: #cfe0ec; }
.course-img { margin: 0; }
@media (min-width: 760px) {
  .course { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); column-gap: 26px; }
  .course > div:first-child { grid-column: 1; }
  .course-img { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .course ul { grid-column: 1; columns: 1; }
  .course-buy { grid-column: 1 / -1; }
}
.course-img figcaption { font-size: .84rem; color: #a9c3d6; margin-top: 6px; text-align: center; }
.course ul { list-style: none; padding: 0; margin: 0; }
.course li { break-inside: avoid; padding-left: 22px; position: relative; font-size: .95rem; color: #e7f0f6; }
.course li::before { content: "✓"; position: absolute; left: 0; color: #6cc6f2; font-weight: 700; }
.course-buy { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; border-top: 1px solid rgba(255,255,255,.18); padding-top: 18px; }
.course-price { font: 800 2rem/1 var(--head); color: #fff; }
.course-price small { display: block; font: 400 .85rem var(--body); color: #a9c3d6; margin-top: 6px; }
.course .btn-main { background: #fff; color: var(--deep); }
.course .btn-main:hover { background: #dff1fb; color: var(--deep); }
.course-fine { font-size: .82rem; color: #a9c3d6; margin: 0; flex-basis: 100%; }
@media (max-width: 640px) { .course { padding: 24px 20px; } .course ul { columns: 1; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.faq summary { cursor: pointer; font: 700 1.06rem/1.4 var(--head); padding: 12px 28px 12px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 9px; font-size: 1.4rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: #33414d; }

/* home sections */
.band { padding: 54px 0; border-bottom: 1px solid var(--rule); }
.band-white { background: #fff; }
.chapters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 3px solid var(--ink); margin-top: 18px; }
.chapter { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); display: block; }
.chapter:hover { color: var(--ink); background: linear-gradient(90deg, transparent, #fff); }
.chapter .tag { font-size: .84rem; }
.chapter h3 { margin: 8px 0 6px; font-size: 1.2rem; }
.chapter p { font-size: .95rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .chapters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .chapters { grid-template-columns: 1fr; } }

/* footer */
.foot { background: #0b2638; color: #b6c8d6; padding: 40px 0 34px; font-size: .92rem; }
.foot a { color: #e2edf5; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot h4 { font: 800 .98rem var(--head); color: #fff; margin: 0 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 6px; }
.foot-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; font-size: .84rem; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; } }

/* forms */
.form label { display: block; font-weight: 700; margin: 14px 0 6px; }
.form input, .form textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #b7c4ce; border-radius: 8px; background: #fff; }
.form textarea { min-height: 160px; resize: vertical; }
.form button { margin-top: 18px; }
.form-msg { margin-top: 14px; font-weight: 700; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--bad); }

@media (max-width: 420px) { .brand-sub { display: none; } .brand-name { font-size: 1rem; } .top .wrap { gap: 12px; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
