:root {
  --bg: #ffffff; --panel: #f4f6f9; --text: #1b1f24; --muted: #57606a; --line: #d5dae1; --link: #0b5cad;
  --good: #1a7f37; --good-bg: #dcf5e3; --warn: #8a5a00; --warn-bg: #fff1cc; --bad: #b42318; --bad-bg: #fde4e1;
  --grey: #4d5560; --grey-bg: #e8ebef; --bar-bg: #e3e7ec;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151a; --panel: #1b2027; --text: #e6e9ee; --muted: #a2abb7; --line: #323944; --link: #6cb0ff;
    --good: #5fd283; --good-bg: #16301f; --warn: #f0c04d; --warn-bg: #36290c; --bad: #ff8b7e; --bad-bg: #3a1a17;
    --grey: #b2bac5; --grey-bg: #2a3038; --bar-bg: #2a3038;
  }
}
:root[data-theme="dark"] {
  --bg: #12151a; --panel: #1b2027; --text: #e6e9ee; --muted: #a2abb7; --line: #323944; --link: #6cb0ff;
  --good: #5fd283; --good-bg: #16301f; --warn: #f0c04d; --warn-bg: #36290c; --bad: #ff8b7e; --bad-bg: #3a1a17;
  --grey: #b2bac5; --grey-bg: #2a3038; --bar-bg: #2a3038;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--line); background: var(--panel); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.brand p { margin: 0; color: var(--muted); }
#theme { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
h2 { font-size: 24px; margin: 0 0 8px; line-height: 1.25; }
h3 { font-size: 18px; margin: 0 0 4px; }
h4 { font-size: 16px; margin: 0 0 4px; }
h3.sub { margin: 28px 0 8px; font-size: 19px; }
section { padding: 28px 0; border-bottom: 1px solid var(--line); min-width: 0; }
section:last-of-type { border-bottom: 0; }
.lead { font-size: 20px; margin: 4px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.jump a { text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; background: var(--panel); }
ul.plain { margin: 6px 0; padding-left: 20px; }
ul.plain li { margin: 4px 0; }
ul.legend { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 8px; }
ul.legend li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge.good { color: var(--good); background: var(--good-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.grey { color: var(--grey); background: var(--grey-bg); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 12px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.card .line { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.lead + div, .line .lead { }
.line .lead { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; font-size: 12px; }
.big { font-size: 20px; }
.costs, .rows { display: grid; gap: 10px; }
.cost, .row { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.cname, .rname { font-weight: 600; }
.bar { position: relative; height: 12px; background: var(--bar-bg); border-radius: 6px; margin: 6px 0 2px; overflow: visible; }
.bar .fill { display: block; height: 100%; border-radius: 6px; }
.bar .fill.good { background: var(--good); } .bar .fill.warn { background: var(--warn); }
.bar .fill.bad { background: var(--bad); } .bar .fill.grey { background: var(--grey); }
.bar .tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.bar.empty { background: repeating-linear-gradient(45deg, var(--bar-bg), var(--bar-bg) 6px, transparent 6px, transparent 12px); }
.verdict { background: var(--panel); border-left: 4px solid var(--link); padding: 4px 16px; margin: 12px 0 18px; border-radius: 0 8px 8px 0; }
.crow { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.crow.control { border-style: dashed; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.side { min-width: 0; }
.who { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.change { margin: 8px 0 0; font-weight: 600; }
.tag { font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; color: var(--muted); vertical-align: middle; }
.honest { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-top: 14px; }
.foot { padding-top: 16px; padding-bottom: 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cost, .row { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .lead { font-size: 18px; }
  h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Before / after: big tiles at the top of the section */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.tile { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.tile h3 { margin: 0; font-size: 17px; }
.ba { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 6px; }
.bside, .aside { display: flex; flex-direction: column; min-width: 0; }
.bnum { font-size: 26px; font-weight: 600; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--bad); }
.anum { font-size: 32px; font-weight: 800; line-height: 1.1; }
.anum.good { color: var(--good); } .anum.warn { color: var(--warn); } .anum.bad { color: var(--bad); } .anum.grey { color: var(--grey); }
.arrow { font-size: 30px; color: var(--muted); }
.tile .change { margin: 4px 0 8px; font-size: 16px; }
.lead + .hero { margin-top: 10px; }

/* Before / after rows: explicit chips, one colour for "before", one for "after", an arrow between */
.crow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.crow-head h3 { margin: 0; }
.gain { font-weight: 800; font-size: 15px; padding: 3px 12px; border-radius: 999px; }
.gain.gain { background: var(--good-bg); color: var(--good); }
.gain.same { background: var(--grey-bg); color: var(--grey); }
.pair { grid-template-columns: 1fr auto 1fr; align-items: center; }
.mid { font-size: 28px; color: var(--muted); line-height: 1; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.chip.before { background: var(--grey-bg); color: var(--grey); }
.chip.after { background: var(--good-bg); color: var(--good); }
.side .val { margin: 6px 0 2px; }
.side .big { font-size: 24px; }
.side.before .big { color: var(--muted); }
.bar { height: 14px; }
.bar .fill.before { background: var(--grey); }
.bar .fill.after { background: var(--good); }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } .mid { transform: rotate(90deg); justify-self: start; margin-left: 12px; } }
/* Language links: English | Français */
.tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
.lang { font-size: 15px; color: var(--muted); }
.lang a { color: var(--link); padding: 4px 2px; }
.lang a[aria-current="page"] { color: var(--text); font-weight: 600; text-decoration: none; }
.top .wrap { flex-wrap: wrap; }

/* The bar of tabs: stuck at the top, one line; on a narrow screen its tabs scroll sideways */
.tabbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabbar .tabrow { display: flex; align-items: center; gap: 12px; }
.tablist { display: flex; gap: 2px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: thin; }
.tablist a { flex: 0 0 auto; white-space: nowrap; text-decoration: none; color: var(--muted); padding: 10px 12px 9px; border-bottom: 3px solid transparent; font-size: 15px; font-weight: 600; }
.tablist a:hover { color: var(--text); }
.tablist a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--link); }
.tabbar .lang { flex: 0 0 auto; white-space: nowrap; font-size: 14px; }
[id] { scroll-margin-top: 60px; }
.tabbed [id] { scroll-margin-top: 0; }
[hidden] { display: none !important; }
.tabbed main > section { border-bottom: 0; }
@media (max-width: 640px) { .tablist a { padding: 10px 9px 9px; font-size: 14px; } .tabbar .tabrow { gap: 8px; } }

/* Overview: the three figures to read first, and the work with the Horizon team */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; margin: 12px 0 18px; }
.key { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.knum { font-size: 40px; font-weight: 800; line-height: 1.05; color: var(--good); }
.klabel { font-weight: 600; }
.context { background: var(--panel); border-left: 4px solid var(--link); padding: 4px 16px; border-radius: 0 8px 8px 0; }

/* Roadmap */
.progress { margin: 12px 0 6px; }
.progress .bar { height: 16px; }
h3.part { font-size: 21px; margin: 28px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }
h5 { font-size: 16px; margin: 0; }
.inpanel { margin: 8px 0 0; }
.ritems { display: grid; gap: 10px; margin: 8px 0 4px; }
.ritem { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--grey); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.ritem.done { border-left-color: var(--good); }
.ritem.in-progress { border-left-color: var(--warn); }
.ritem.see { padding: 8px 14px; }
.ritem p { margin: 6px 0 0; }
.rhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rhead h5 { font-size: 17px; }
ol.steps { margin: 6px 0 0; padding-left: 22px; }
ol.steps li { margin: 5px 0; }
h4.sub { margin: 26px 0 4px; font-size: 18px; }
h4.sub .pill { vertical-align: 2px; }

/* The bar of tabs, redone: pills (no scrollbar), a segmented language switch, a fade on a narrow screen */
.tabbar { background: var(--bg); } /* opaque on purpose: no blur, so it never renders white in a browser that lacks the effect */
.tabbar .tabrow { padding-top: 8px; padding-bottom: 8px; gap: 10px; }
.tablist { gap: 6px; scrollbar-width: none; -ms-overflow-style: none; }
.tablist::-webkit-scrollbar { display: none; width: 0; height: 0; }
.tablist a { padding: 7px 14px; border: 1px solid transparent; border-radius: 999px; font-size: 15px; }
.tablist a:hover { background: var(--panel); color: var(--text); }
.tablist a[aria-selected="true"] { background: var(--link); border-color: var(--link); color: var(--bg); }
.tabbar .lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.tabbar .lang > span[aria-hidden="true"] { display: none; }
.tabbar .lang a { padding: 4px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabbar .lang a:hover { color: var(--text); }
.tabbar .lang a[aria-current="page"] { background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
@media (min-width: 761px) { .tablist { flex-wrap: wrap; overflow: visible; } }
@media (min-width: 761px) and (max-width: 1000px) { .tablist a { padding: 6px 11px; font-size: 14px; } }
@media (max-width: 760px) {
  .tablist { padding: 0 12px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 30px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 30px), transparent 100%); }
  .tablist a { padding: 7px 12px; font-size: 14px; }
  .tabbar .lang a { padding: 4px 9px; font-size: 13px; }
}
/* On a narrow screen the language switch shows EN | FR, to leave the room to the tabs */
@media (max-width: 760px) {
  .tabbar .lang a { font-size: 0; padding: 4px 9px; }
  .tabbar .lang a::after { content: attr(data-short); font-size: 13px; }
}

/* Real-network tab: bots against a real server, direct and through the proxy */
.tablewrap { overflow-x: auto; margin: 10px 0; }
table.lt { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 15px; }
table.lt th, table.lt td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.lt thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.lt tbody th { font-weight: 600; width: 34%; }
