/* Hub for Jaecoo — "Highway".
   Wayfinding: road-sign green, retroreflective white, warning yellow, asphalt.
   Overpass is based on the highway sign alphabet. The two install routes are two exits.
   Light ("day") is the default. theme.js sets data-theme="dark" ("night") from the saved choice. */
:root {
  --bg: #eef0ec;
  --card: #ffffff;
  --card-2: #f5f7f4;
  --ink: #16201b;
  --ink-2: #3f4c45;
  --ink-3: #5e6a63;
  --rule: #d3d9d3;
  --rule-2: #b3bdb5;
  --sign: #00704a;
  --sign-2: #005c3c;
  --sign-text: #00704a;
  --on-sign: #ffffff;
  --yellow: #ffcc00;
  --on-yellow: #111111;
  --asphalt: #2b2e30;
  --lane: #f4f4ef;
  --well: #f8faf7;
  --bar: #00704a;
  --green: #1b7a3d;
  --green-bg: rgba(27, 122, 61, 0.08);
  --warn: #7a5200;
  --warn-bg: rgba(255, 204, 0, 0.16);
  --red: #b3261e;
  --red-bg: rgba(179, 38, 30, 0.07);
  --focus: #1a5fd0;
  --shadow: 0 18px 40px -22px rgba(10, 40, 25, 0.45);
  --shadow-s: 0 8px 20px -14px rgba(10, 40, 25, 0.5);
  --r: 10px;
  --font: "Overpass", "Noto Sans Thai", "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1210;
  --card: #151c18;
  --card-2: #1a221e;
  --ink: #eef3ef;
  --ink-2: #b9c5be;
  --ink-3: #8f9c94;
  --rule: #26302b;
  --rule-2: #3a4640;
  --sign: #0b6b46;
  --sign-2: #08553a;
  --sign-text: #5fd3a0;
  --on-sign: #f6faf7;
  --asphalt: #1a1d1f;
  --lane: #fff3a8;
  --well: #0a0e0c;
  --bar: #0a5a3b;
  --green: #6dd58c;
  --green-bg: rgba(109, 213, 140, 0.1);
  --warn: #ffd84d;
  --warn-bg: rgba(255, 204, 0, 0.1);
  --red: #ff8f80;
  --red-bg: rgba(255, 143, 128, 0.1);
  --focus: #9cc2ff;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.85);
  --shadow-s: 0 8px 24px -14px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); }
::selection { background: var(--yellow); color: var(--on-yellow); }
/* height: auto keeps every image in its real shape. Without it, the width and height
   attributes stretch a scaled image. */
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--sign-text); text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
code { font: 0.88em var(--mono); background: var(--card-2); border: 1px solid var(--rule); padding: 0.05em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
strong, b { font-weight: 800; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--yellow); color: var(--on-yellow); padding: 10px 14px; z-index: 30; font-weight: 800; }
.skip:focus { top: 8px; }

h1, h2, h3 { font-family: var(--font); margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 900; font-size: clamp(42px, 6.8vw, 100px); line-height: 0.95; text-wrap: balance; }
h2 { font-weight: 900; font-size: clamp(30px, 4vw, 50px); line-height: 1.02; text-wrap: balance; }
h3 { font-weight: 800; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
:lang(th) h1, :lang(vi) h1, :lang(ar) h1, :lang(ru) h1, :lang(zh) h1 { line-height: 1.12; letter-spacing: 0; }
:lang(th) h2, :lang(ar) h2, :lang(zh) h2 { letter-spacing: 0; line-height: 1.2; }

/* Header: a green sign gantry ------------------------------------------ */
.top { position: sticky; top: 0; z-index: 20; background: var(--bar); color: var(--on-sign); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 900 20px/1 var(--font); letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: inherit; }
/* Route shield, like a highway number marker */
.shield { width: 32px; height: 36px; background: var(--on-sign); color: var(--sign); display: grid; place-items: center; padding-bottom: 4px;
  font: 900 14px/1 var(--font); clip-path: polygon(50% 0, 100% 12%, 100% 62%, 50% 100%, 0 62%, 0 12%); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--on-sign); opacity: .9; text-decoration: none; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; font-size: 15px; border-radius: 6px; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,.1); color: var(--on-sign); }
.nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.nav .nav-cta { background: var(--yellow); color: var(--on-yellow); opacity: 1; margin-inline-start: 6px; }
.nav .nav-cta:hover { background: #ffd83d; color: var(--on-yellow); }
.nav .nav-cta[aria-current="page"] { box-shadow: none; border-radius: 6px; }
.tools { display: flex; align-items: center; gap: 8px; }
.tools select {
  appearance: none; height: 40px; border: 2px solid var(--on-sign); border-radius: 8px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--on-sign); font: 700 14px var(--font); padding: 0 28px 0 10px; cursor: pointer;
}
[dir="rtl"] .tools select { background-position: left 10px center; padding: 0 10px 0 28px; }
.tools option { color: #111; background: #fff; }
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--on-sign); border-radius: 8px; background: transparent; color: var(--on-sign); cursor: pointer; }
.theme-btn:hover { background: rgba(255,255,255,.12); }
.theme-btn svg { width: 18px; height: 18px; }
/* The icon shows the mode that a click selects. */
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
@media (max-width: 860px) {
  .top .wrap { flex-wrap: wrap; gap: 0 10px; padding-top: 8px; }
  .tools { margin-inline-start: auto; }
  .nav { order: 3; width: calc(100% + 48px); margin: 6px -24px 0; padding: 0 16px 6px; overflow-x: auto; scrollbar-width: none; }
  .nav a { flex: none; }
}
@media (max-width: 480px) { .nav { width: calc(100% + 32px); margin-inline: -16px; } }

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r); border: 0;
  font: 800 17px/1.1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sign); color: var(--on-sign); box-shadow: var(--shadow-s), inset 0 0 0 2px rgba(255,255,255,.25); }
.btn-primary:hover { background: var(--sign-2); color: var(--on-sign); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-link { background: none; color: var(--sign-text); padding-inline: 4px; text-decoration: underline; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding: 56px 0 170px; }
.kicker { display: inline-flex; gap: 10px; align-items: center; margin: 0; font: 600 13px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sign-text); }
.kicker .post { flex: none; width: 14px; height: 18px; border-radius: 2px; background: var(--card); border: 2px solid currentColor; border-top-width: 6px; }
.hero h1 { margin-top: 18px; max-width: 13ch; }
.hero h1 .hl { color: var(--sign-text); }
.lead { font-size: 20px; color: var(--ink-2); max-width: 36em; margin: 22px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; margin-top: 40px; position: relative; z-index: 1; }

/* The direction sign: two exits are the two install routes */
.sign-wrap { position: relative; padding-bottom: 130px; }
.sign { position: relative; z-index: 1; background: var(--sign); color: var(--on-sign); border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
.sign-in { border: 3px solid var(--on-sign); border-radius: 12px; padding: 6px 26px; }
.exit { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 20px 0; color: var(--on-sign); text-decoration: none; }
.exit:hover { color: var(--on-sign); }
.exit + .exit { border-top: 2px solid rgba(255,255,255,.35); }
.exit .arrow { display: grid; place-items: center; }
.exit .arrow svg { width: 56px; height: 56px; transition: transform .3s var(--ease); }
.exit:hover .arrow svg, .exit:focus-visible .arrow svg { transform: translate(4px, -4px); }
[dir="rtl"] .exit .arrow svg { transform: scaleX(-1); }
[dir="rtl"] .exit:hover .arrow svg { transform: scaleX(-1) translate(4px, -4px); }
.exit b { display: block; font: 900 36px/1.05 var(--font); letter-spacing: -0.01em; }
.exit small { display: block; font: 600 16px/1.35 var(--font); opacity: .92; margin-top: 6px; }
.exit:hover b { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.tab { background: var(--yellow); color: var(--on-yellow); font: 900 13px/1 var(--font); letter-spacing: .06em; padding: 8px 10px 6px; border-radius: 5px; white-space: nowrap; }
.poles { position: absolute; inset-inline: 18%; bottom: 0; height: 130px; display: flex; justify-content: space-between; z-index: 0; }
.poles i { width: 14px; height: 100%; background: linear-gradient(90deg, #7d868a, #c9cfd2 45%, #7d868a); border-radius: 2px; }
.tut-link { position: absolute; bottom: 52px; inset-inline-start: calc(18% + 28px); z-index: 2; font-weight: 800; color: var(--ink); background: var(--bg); padding: 4px 8px 2px; border-radius: 4px; }
/* The real screen at its true 3:4 shape, in a head-unit bezel */
.unit { position: relative; z-index: 2; margin: 0; justify-self: end; width: 100%; max-width: 400px; padding: 12px; background: #0b0c0e; border-radius: 18px; box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.25); }
[dir="rtl"] .unit { justify-self: start; }
.unit img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; }
.sample-tag { position: absolute; top: -14px; inset-inline-start: 16px; z-index: 1; background: var(--yellow); color: var(--on-yellow); font: 700 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-radius: 4px; }
/* Road with a moving lane line */
.road { position: absolute; inset-inline: 0; bottom: 0; height: 150px; background: var(--asphalt); clip-path: polygon(0 100%, 100% 100%, 100% 62%, 0 30%); }
.road::after { content: ""; position: absolute; inset-inline: 0; top: 54%; height: 6px; transform: skewY(-1.2deg);
  background: repeating-linear-gradient(90deg, var(--lane) 0 70px, transparent 70px 140px); animation: lane 1.6s linear infinite; }
@keyframes lane { to { background-position: -140px 0; } }
@media (max-width: 960px) {
  .hero { padding: 36px 0 150px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .unit, [dir="rtl"] .unit { justify-self: center; max-width: 360px; }
  .sign-wrap { padding-bottom: 90px; }
  .poles { height: 90px; }
  .tut-link { bottom: 30px; }
  .exit { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
  .exit .arrow svg { width: 44px; height: 44px; }
  .exit .tab { grid-column: 2; justify-self: start; }
  .exit b { font-size: 28px; }
  .sign-in { padding: 4px 18px; }
}

/* Page-load reveal in steps */
.rise { animation: rise .8s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { .rise, .road::after { animation: none; } }

/* Variable message sign: the feature list as amber dot text ----------- */
.vms { background: #0c0d0d; border-block: 6px solid #2c2f31; overflow: hidden; }
.vms ul { display: flex; list-style: none; margin: 0; padding: 0; width: max-content; animation: tick 50s linear infinite; }
.vms li { white-space: nowrap; padding: 16px 28px; font: 700 15px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #ffb000; text-shadow: 0 0 8px rgba(255,176,0,.6); }
.vms li::after { content: "▸"; margin-inline-start: 28px; color: #6b4a00; text-shadow: none; }
.vms:hover ul { animation-play-state: paused; }
[dir="rtl"] .vms ul { animation-direction: reverse; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .vms ul { animation: none; flex-wrap: wrap; width: auto; } }

/* Facts as small white plates ----------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 36px 0 0; }
.facts div { background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 14px 16px 12px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; }
.facts dd { margin: 0; font: 900 28px/1 var(--font); letter-spacing: -0.01em; }
.facts dt { color: var(--ink-3); font-size: 14px; font-weight: 600; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }

/* Sections with KM posts ---------------------------------------------- */
.sec { padding-top: 84px; }
.sec-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 34px; }
.km { flex: none; width: 64px; background: var(--card); border: 2px solid var(--ink); border-radius: 6px 6px 2px 2px; text-align: center; overflow: hidden; box-shadow: var(--shadow-s); }
.km span { display: block; background: var(--sign); color: var(--on-sign); font: 700 11px/1 var(--mono); letter-spacing: .1em; padding: 6px 0 4px; }
.km b { display: block; font: 900 26px/1 var(--font); padding: 8px 0 6px; }
.sec-head h2 { margin-top: 4px; }
.sub { margin: 10px 0 0; color: var(--ink-2); font-size: 18px; max-width: 42em; }
@media (max-width: 560px) { .sec { padding-top: 60px; } .sec-head { gap: 14px; } .km { width: 52px; } .km b { font-size: 21px; } }

/* Screens strip */
.shots { --edge: max(24px, calc((100vw - 1200px) / 2 + 24px));
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px var(--edge) 20px; scroll-padding-inline: var(--edge); scrollbar-width: thin; }
.shots figure { margin: 0; scroll-snap-align: start; min-width: 0; }
.shots a { display: block; background: #0b0c0e; padding: 6px; border-radius: 10px; box-shadow: var(--shadow); transition: transform .3s var(--ease); }
.shots a:hover { transform: translateY(-5px); }
.shots img { border-radius: 5px; width: 100%; height: auto; aspect-ratio: 3 / 4; }
.shots figcaption { margin-top: 12px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink-2); }
@media (max-width: 700px) { .shots { grid-auto-columns: 72%; --edge: 16px; } }
@media (prefers-reduced-motion: reduce) { .shots a, .shots a:hover { transition: none; transform: none; } }

/* Before and after: a green sign table */
.spec { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.spec th { text-align: start; padding: 14px 20px 12px; font: 800 15px/1.2 var(--font); background: var(--card-2); color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.spec th:last-child { background: var(--sign); color: var(--on-sign); }
.spec td { padding: 16px 20px; padding-inline-start: 46px; border-bottom: 1px solid var(--rule); vertical-align: top; position: relative; }
.spec tr:last-child td { border-bottom: 0; }
.spec td::before { position: absolute; inset-inline-start: 16px; top: 15px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 900 12px/1 var(--font); }
.spec td:first-child { color: var(--ink-3); }
.spec td:first-child::before { content: "✕"; color: var(--ink-3); box-shadow: inset 0 0 0 2px var(--rule-2); }
.spec td:last-child { border-inline-start: 2px solid var(--ink); font-weight: 600; }
.spec td:last-child::before { content: "✓"; background: var(--sign); color: var(--on-sign); }
@media (max-width: 640px) {
  .spec, .spec tbody, .spec tr, .spec td { display: block; }
  .spec thead { display: none; }
  .spec tr { border-bottom: 2px solid var(--ink); }
  .spec tr:last-child { border-bottom: 0; }
  .spec td { border-bottom: 0; }
  .spec td:last-child { border-inline-start: 0; padding-top: 4px; }
}

/* Features: numbered like route markers */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: f; }
.features li { counter-increment: f; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; box-shadow: var(--shadow-s); }
.features li::before { content: counter(f); display: grid; place-items: center; width: 36px; height: 40px; margin-bottom: 14px; padding-bottom: 4px;
  background: var(--sign); color: var(--on-sign); font: 900 16px/1 var(--font); clip-path: polygon(50% 0, 100% 12%, 100% 62%, 50% 100%, 0 62%, 0 12%); }
.features h3 { margin-bottom: 6px; }
.features p { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Two steps on a dashed road line */
.route { position: relative; list-style: none; margin: 0 0 34px; padding: 0; padding-inline-start: 66px; display: grid; gap: 22px; max-width: 780px; counter-reset: s; }
.route::before { content: ""; position: absolute; inset-inline-start: 22px; top: 12px; bottom: 12px; width: 6px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--sign) 0 18px, transparent 18px 30px); }
.route li { counter-increment: s; position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow); }
.route li::before { content: counter(s); position: absolute; inset-inline-start: -66px; top: 16px; width: 50px; height: 50px; border-radius: 50%;
  background: var(--sign); color: var(--on-sign); border: 4px solid var(--bg); display: grid; place-items: center; font: 900 20px/1 var(--font); }
.route h3 { margin-bottom: 6px; }
.route p { margin: 0; color: var(--ink-2); }

/* FAQ */
.faq details { max-width: 900px; border-bottom: 2px solid var(--rule); }
.faq details:first-of-type { border-top: 2px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 64px; padding-block: 14px; font: 800 19px/1.35 var(--font); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sign); color: var(--on-sign); font: 900 20px/1 var(--font); padding-top: 3px; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--sign-text); }
.faq details p { margin: 0 0 22px; color: var(--ink-2); max-width: 72ch; }

/* Footer: asphalt with a yellow edge line */
.foot { margin-top: 100px; background: var(--asphalt); color: #c9cfcb; padding: 34px 0 48px; border-top: 6px solid var(--yellow); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
.foot .brand { color: #fff; }
.foot .shield { background: #fff; color: #00704a; }
.foot p { margin: 0 0 8px; max-width: 80ch; }
.foot a { color: #ffe066; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }

/* Tutorial -------------------------------------------------------------- */
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 48px; }
.doc > article, .doc > aside { min-width: 0; }
.toc { position: sticky; top: 96px; align-self: start; background: var(--sign); color: var(--on-sign); border-radius: 14px; padding: 8px; box-shadow: var(--shadow-s); }
.toc > p, .toc > ol { border: 2px solid var(--on-sign); }
.toc > p { margin: 0; padding: 10px 14px 6px; border-radius: 9px 9px 0 0; border-bottom: 0; font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 4px 6px 8px; border-top: 0; border-radius: 0 0 9px 9px; }
.toc a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--on-sign); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.35; }
.toc a:hover { background: rgba(255,255,255,.12); color: var(--on-sign); }
.toc a.on { background: var(--yellow); color: var(--on-yellow); }
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .toc { position: static; }
  .toc ol { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .toc a { white-space: nowrap; }
}
.doc h1 { font-size: clamp(36px, 4.6vw, 62px); }
.doc .lead { margin: 16px 0 36px; }
.doc section { padding-block: 30px; border-top: 2px solid var(--rule); }
.doc h2 { font-size: clamp(25px, 2.8vw, 34px); margin-bottom: 18px; }
.doc h3 { font-size: 19px; margin: 24px 0 10px; color: var(--sign-text); }
.doc p { margin: 0 0 12px; max-width: 70ch; }
/* Block layout, not grid: translated steps hold inline <strong> and <a> elements. */
.num { list-style: none; counter-reset: n; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; max-width: 70ch; }
.num li { counter-increment: n; position: relative; padding-inline-start: 42px; min-height: 30px; }
.num li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: -1px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sign); color: var(--on-sign); font: 900 14px/1 var(--font); padding-top: 2px; }
.dot { margin: 0 0 12px; padding-inline-start: 1.2em; display: grid; gap: 8px; }
.dot li::marker { color: var(--sign-text); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols > div { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px; box-shadow: var(--shadow-s); }
.cols h3 { margin-top: 0; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } }
.note { color: var(--ink-3); font-size: 15px; }
/* WARNING: a yellow diamond road sign */
.callout { position: relative; margin: 22px 0 6px; padding: 18px 20px; padding-inline-start: 92px; min-height: 92px; background: var(--warn-bg); border: 2px solid var(--ink); border-radius: 12px; max-width: 78ch; }
.callout::before { content: ""; position: absolute; inset-inline-start: 24px; top: 24px; width: 42px; height: 42px; background: var(--yellow); border: 4px solid #111; border-radius: 6px; transform: rotate(45deg); }
.callout::after { content: "!"; position: absolute; inset-inline-start: 24px; top: 24px; width: 42px; height: 42px; display: grid; place-items: center; font: 900 24px/1 var(--font); color: #111; padding-top: 3px; }
.callout b { font: 900 14px var(--font); letter-spacing: .08em; color: var(--warn); }
.cmd { display: flex; gap: 8px; align-items: stretch; margin: 8px 0 16px; max-width: 780px; }
.cmd pre { flex: 1; min-width: 0; margin: 0; background: var(--asphalt); color: #f1f3f2; border-radius: 10px; padding: 14px 14px 14px 36px; overflow-x: auto; font: 13px/1.5 var(--mono); position: relative; direction: ltr; text-align: left; }
.cmd pre::before { content: "$"; position: absolute; left: 14px; color: var(--yellow); }
.cmd .btn { min-height: auto; padding-inline: 16px; font-size: 15px; }

/* Installer ------------------------------------------------------------- */
.inst-head { padding-block: 48px 8px; }
.inst-head h1 { font-size: clamp(38px, 5vw, 66px); }
.inst-head .lead { margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-block: 18px 28px; }
/* Each card is an exit panel: a green header plate, then the content */
.card { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 0 24px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-shadow: var(--shadow-s); overflow: hidden; }
.card > h2 { margin: 0 -24px 4px; padding: 18px 24px 14px; background: var(--sign); color: var(--on-sign); font: 900 26px/1.1 var(--font); display: flex; align-items: center; gap: 12px; }
#wifi-card > h2::after, #usb-card > h2::after { margin-inline-start: auto; background: var(--yellow); color: var(--on-yellow); font: 900 13px/1 var(--font); padding: 7px 10px 5px; border-radius: 5px; }
#wifi-card > h2::after { content: "1"; }
#usb-card > h2::after { content: "2"; }
.card p { margin: 0; color: var(--ink-2); }
.card h3 { font: 800 16px/1.2 var(--font); color: var(--sign-text); margin-top: 4px; }
#wifi-card { order: -1; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }
/* Status line with a light */
.status { display: flex; gap: 12px; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--rule); font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0; }
.status::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); transform: translateY(-1px); }
.status[data-kind="info"]::before { background: var(--yellow); box-shadow: 0 0 0 3px rgba(255,204,0,.25); animation: blink 1.2s steps(1) infinite; }
.status[data-kind="good"] { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 35%, transparent); color: var(--green); }
.status[data-kind="good"]::before { background: var(--green); }
.status[data-kind="warn"] { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.status[data-kind="warn"]::before { background: var(--yellow); box-shadow: inset 0 0 0 2px #111; }
.status[data-kind="bad"] { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); }
.status[data-kind="bad"]::before { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .status::before { animation: none !important; } }
.sep { border: 0; height: 6px; margin: 8px 0; width: 100%; background: repeating-linear-gradient(90deg, var(--rule-2) 0 22px, transparent 22px 38px); }
.devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.devices .device { width: 100%; max-width: none; justify-content: flex-start; min-height: 50px; padding: 0 16px; border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--rule-2); font: 600 15px var(--mono); direction: ltr; }
.devices .device::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.devices .device:hover { box-shadow: inset 0 0 0 2px var(--ink); background: var(--card); color: var(--ink); }
.devices .device.match { box-shadow: inset 0 0 0 2px var(--sign); }
.devices .device.match::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.ip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ip-row label { width: 100%; font: 700 14px var(--font); color: var(--ink-2); }
.ip-row input { flex: 1; min-width: 0; min-height: 52px; background: var(--well); color: var(--ink); border: 2px solid var(--rule-2); border-radius: 10px; padding: 0 14px; font: 17px var(--mono); direction: ltr; }
.ip-row input:focus { border-color: var(--sign); outline: none; box-shadow: 0 0 0 4px var(--green-bg); }
.ip-row input[type="file"] { padding: 10px 12px; font: 15px var(--font); color: var(--ink-2); }
.ip-row input[type="file"]::file-selector-button { margin-inline-end: 12px; background: var(--sign); color: var(--on-sign); border: 0; border-radius: 8px; padding: 8px 14px; font: 800 14px var(--font); cursor: pointer; }
.dl { display: grid; gap: 10px; }
.small { font-size: 14px; color: var(--ink-3); }
.panel { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 0 26px 26px; margin-bottom: 24px; display: grid; gap: 16px; box-shadow: var(--shadow); overflow: hidden; }
.panel > h2 { margin: 0 -26px; padding: 18px 26px 14px; background: var(--sign); color: var(--on-sign); font: 900 26px/1.1 var(--font); }
.panel h3 { font-size: 19px; }
.dev { display: flex; gap: 12px 36px; flex-wrap: wrap; margin: 0; padding: 14px 16px; background: var(--card-2); border: 1px solid var(--rule); border-radius: 10px; }
.dev > div { min-width: 0; }
.dev dt { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dev dd { margin: 2px 0 0; font: 600 15px var(--mono); overflow-wrap: anywhere; }
/* Progress as a road: asphalt with a yellow lane line that fills */
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; border: 0; border-radius: 4px; background: var(--asphalt); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--asphalt); }
progress::-webkit-progress-value { background: repeating-linear-gradient(90deg, var(--yellow) 0 22px, transparent 22px 34px) 0 50% / 100% 6px no-repeat, var(--sign); transition: width .3s; }
progress::-moz-progress-bar { background: var(--sign); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.steps li::before { content: ""; grid-row: span 2; width: 14px; height: 14px; margin: 5px 0 0 4px; border-radius: 50%; border: 2px solid var(--rule-2); }
.steps li[data-state="run"]::before { border-color: #111; background: var(--yellow); animation: blink .8s steps(1) infinite; }
.steps li[data-state="ok"]::before { border-color: var(--green); background: var(--green); }
.steps li[data-state="bad"]::before { border-color: var(--red); background: var(--red); }
.steps li[data-state="skip"]::before { border-style: dashed; }
.steps li[data-state="skip"] > span:first-child { color: var(--ink-3); }
.steps .detail { color: var(--ink-3); font: 400 12px var(--mono); overflow-wrap: anywhere; }
.steps li[data-state="bad"] .detail { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .steps li::before { animation: none !important; } }

/* Tutorial walkthrough --------------------------------------------------- */
.step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.step-head h2 { margin-bottom: 18px; }
/* "Done" is a large check box, easy to tap at the car */
.done { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border: 2px solid var(--rule-2); border-radius: 22px; font: 800 15px var(--font); color: var(--ink-2); cursor: pointer; user-select: none; }
.done input { appearance: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--rule-2); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.done input::after { content: "✓"; font: 900 13px/1 var(--font); color: var(--on-sign); opacity: 0; }
.done:has(input:checked) { border-color: var(--sign); color: var(--sign-text); background: var(--green-bg); }
.done input:checked { background: var(--sign); border-color: var(--sign); }
.done input:checked::after { opacity: 1; }
.step.is-done .walk > li, .step.is-done .cols > div { border-color: var(--sign); box-shadow: inset 4px 0 0 var(--sign), var(--shadow-s); }
.walk { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 18px; }
.walk > li { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 18px 18px 22px; box-shadow: var(--shadow-s); }
.walk-t b { display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 2px 8px 0; border-radius: 15px; background: var(--sign); color: var(--on-sign); font: 900 15px/1 var(--font); margin: 6px 0 8px; }
.walk-t p { margin: 0 0 6px; font-size: 18px; max-width: 46ch; }
.walk-t .note { font-size: 14px; margin-top: 8px; }
.fig { margin: 0; }
.fig img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .walk > li { grid-template-columns: 1fr; } .fig { max-width: 300px; } }
.need { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.need figure { margin: 0; }
.need img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
.need figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; font-weight: 600; }
/* Progress in the side menu */
.prog { padding: 10px 12px 12px; margin-bottom: 8px; border: 2px solid var(--on-sign); border-radius: 9px; font: 800 14px var(--font); }
.prog-bar { height: 10px; margin: 8px 0; border-radius: 5px; background: rgba(0,0,0,.3); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .3s var(--ease); }
.prog-reset { background: none; border: 0; padding: 0; color: var(--on-sign); font: 600 13px var(--font); text-decoration: underline; cursor: pointer; opacity: .85; }
.toc a.ok::before { content: "✓ "; color: var(--yellow); font-weight: 900; }
.toc a.on.ok::before { color: var(--on-yellow); }
@media (max-width: 900px) { .prog { margin-bottom: 6px; } }

/* Phone fixes (checked at 390 px with Chrome device emulation) */
.facts dd { white-space: nowrap; }
@media (max-width: 480px) {
  .facts dd { font-size: 22px; }
  .nav { gap: 0; }
  .nav a { padding: 0 7px; font-size: 14px; }
  .nav .nav-cta { margin-inline-start: 4px; padding: 0 10px; }
}

/* Car model: show only the steps for the chosen car (html[data-car] from theme.js) */
[data-for] { display: none; }
:root[data-car="j5"] [data-for~="j5"], :root[data-car="j7"] [data-for~="j7"],
:root[data-car="c5shs"] [data-for~="c5shs"], :root[data-car="c5"] [data-for~="c5"] { display: revert; }
:root[data-car="j5"] .walk[data-for~="j5"], :root[data-car="j7"] .walk[data-for~="j7"],
:root[data-car="c5shs"] .walk[data-for~="c5shs"], :root[data-car="c5"] .walk[data-for~="c5"] { display: grid; }
:root[data-car] .status[data-for] { display: none; }
:root[data-car="j7"] .status[data-for~="j7"], :root[data-car="c5shs"] .status[data-for~="c5shs"], :root[data-car="c5"] .status[data-for~="c5"] { display: flex; }
.cars { border: 0; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cars legend { padding: 0; margin-bottom: 10px; font: 800 15px var(--font); color: var(--ink-2); }
.cars label { cursor: pointer; }
.cars input { position: absolute; opacity: 0; pointer-events: none; }
.cars span { display: block; height: 100%; padding: 12px 14px 10px; border-radius: 10px; background: var(--card); border: 2px solid var(--rule-2); transition: border-color .2s, background .2s; }
.cars b { display: block; font: 900 18px/1.1 var(--font); }
.cars small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.cars label:hover span { border-color: var(--ink); }
.cars input:checked + span { background: var(--sign); border-color: var(--sign); color: var(--on-sign); box-shadow: var(--shadow-s); }
.cars input:checked + span small { color: var(--on-sign); opacity: .85; }
.cars input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 700px) { .cars { grid-template-columns: 1fr 1fr; } }
.fig.land { max-width: none; }
.walk > li:has(.fig.land) { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 760px) { .walk > li:has(.fig.land) { grid-template-columns: 1fr; } }
/* Password calculator */
.walk > li.calc-li { display: block; border: 2px solid var(--ink); }
.calc h3 { margin: 0 0 4px; color: var(--sign-text); }
.calc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.calc-tabs button { min-height: 44px; padding: 0 14px; border-radius: 8px; border: 2px solid var(--rule-2); background: var(--card); color: var(--ink); font: 800 15px var(--font); cursor: pointer; }
.calc-tabs button[aria-selected="true"] { background: var(--sign); border-color: var(--sign); color: var(--on-sign); }
.calc-in { display: flex; flex-wrap: wrap; gap: 12px; }
.calc-in label { flex: 1 1 160px; display: grid; gap: 6px; font: 700 14px var(--font); color: var(--ink-2); }
.calc-in label.wide { flex: 2 1 260px; }
.calc-in input { min-height: 52px; padding: 0 14px; border: 2px solid var(--rule-2); border-radius: 10px; background: var(--well); color: var(--ink); font: 600 20px var(--mono); letter-spacing: .08em; direction: ltr; }
.calc-in input:focus { outline: none; border-color: var(--sign); box-shadow: 0 0 0 4px var(--green-bg); }
.calc-out { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--asphalt); color: #f1f3f2; }
.calc-out .small { color: #c9cfcb; }
.calc-out output { flex: 1; min-width: 8ch; font: 700 30px/1 var(--mono); letter-spacing: .18em; color: #8f9c94; }
.calc-out output.ready { color: var(--yellow); }
.calc-out .btn { min-height: 44px; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.calc-out .btn:disabled { opacity: .35; }

/* Landing: choose your car */
.car-row { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; margin-top: 14px; }
.car-row-h { align-self: center; font: 800 16px var(--font); color: var(--ink-2); margin-inline-end: 6px; }
.car-row a { display: block; padding: 12px 14px 10px; border-radius: 10px; background: var(--sign); color: var(--on-sign); text-decoration: none; box-shadow: var(--shadow-s); border: 2px solid var(--sign); transition: transform .2s var(--ease); }
.car-row a:hover { color: var(--on-sign); transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--on-sign), var(--shadow-s); }
.car-row b { display: block; font: 900 18px/1.1 var(--font); }
.car-row small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; opacity: .85; }
@media (max-width: 900px) { .car-row { grid-template-columns: 1fr 1fr; } .car-row-h { grid-column: 1 / -1; } }
