/* Atom Lab — atomic-age lab console, ar-JO RTL */
:root {
  --cream: #F2E4C4;
  --cream-hi: #FBF3E0;
  --enamel-edge: #D8C59C;
  --teal: #0F5F5C;
  --teal-deep: #0A3F3D;
  --teal-glow: #7FD1C4;
  --walnut: #23201B;
  --wood: #5B3F28;
  --ink-soft: #4A4238;
  --mustard: #D9A21B;
  --mustard-dim: #8C7337;
  --orange: #A83E14;
  --orange-hi: #C24C1C;
  --white: #FFF8EC;
  --display: "Handjet", "Harmattan", system-ui, sans-serif;
  --body: "Harmattan", system-ui, sans-serif;
  --r-mod: 26px;
  --gap: clamp(14px, 2.2vw, 26px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1.25rem/1.8 var(--body);
  color: var(--walnut);
  background-color: var(--cream);
  background-image: linear-gradient(rgba(242, 228, 196, .88), rgba(242, 228, 196, .88)), url("../img/pattern-600.webp");
  background-size: auto, 320px 320px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.topbar :focus-visible, .mod-teal :focus-visible, .promo :focus-visible, .foot :focus-visible, .example :focus-visible { outline-color: var(--mustard); }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--walnut); color: var(--cream); padding: .5em 1em; z-index: 50; }
.skip:focus { inset-inline-start: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.3; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.5vw, 2.45rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--teal);
  color: var(--cream);
  border-bottom: 6px solid var(--walnut);
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .08);
  position: relative;
  z-index: 20;
}
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; margin-inline-end: auto; }
.brand:hover { color: var(--white); }
.brand svg { width: 46px; height: 46px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1; }
.brand-name small { display: block; font: 400 .9rem/1.3 var(--body); color: var(--cream); opacity: .9; margin-top: 4px; }

.menu-toggle { display: none; }

/* rotary selector */
.selector { display: flex; align-items: center; gap: 14px; }
.knob { width: 62px; height: 62px; flex: none; }
.knob .pointer { transform-origin: 50px 50px; transform: rotate(var(--a, 0deg)); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.selector ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.selector li { margin: 0; }
.selector a {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--cream); text-decoration: none; font: 700 1rem/1.2 var(--body); padding: 6px 9px; border-radius: 10px;
}
.selector a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.lamp {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6b5a2c, #3a3020);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35);
  display: inline-block; flex: none;
}
.selector a[aria-current="page"] .lamp, .lamp.on {
  background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .25), 0 0 12px 3px rgba(217, 162, 27, .7);
}
.selector a[aria-current="page"] { color: var(--white); }

/* ---------- frame ---------- */
.console { max-width: 1240px; margin: 0 auto; padding: var(--gap) 16px 48px; }
.mod {
  position: relative;
  background-color: var(--cream-hi);
  background-image:
    radial-gradient(circle at 16px 16px, #b7a074 3.5px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) 16px, #b7a074 3.5px, transparent 4.5px),
    radial-gradient(circle at 16px calc(100% - 16px), #b7a074 3.5px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), #b7a074 3.5px, transparent 4.5px);
  border-radius: var(--r-mod);
  box-shadow: inset 0 0 0 3px var(--enamel-edge), 0 6px 0 #C7B183, 0 16px 26px rgba(35, 32, 27, .16);
  padding: clamp(22px, 3.4vw, 40px);
}
.mod-teal {
  background-color: var(--teal);
  color: var(--cream);
  box-shadow: inset 0 0 0 3px #0b4c49, 0 6px 0 var(--teal-deep), 0 16px 26px rgba(35, 32, 27, .2);
  background-image:
    radial-gradient(circle at 16px 16px, #2d7f7a 3.5px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) 16px, #2d7f7a 3.5px, transparent 4.5px),
    radial-gradient(circle at 16px calc(100% - 16px), #2d7f7a 3.5px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), #2d7f7a 3.5px, transparent 4.5px);
}
.mod-teal a { color: var(--cream); }
.mod-teal a:hover { color: var(--mustard); }
.plate {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--walnut); color: var(--cream);
  font: 700 .72rem/1 var(--body);
  padding: 7px 12px 6px; border-radius: 5px; margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px #4a4136;
}
.mod-teal .plate { background: var(--cream); color: var(--walnut); box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.c12 { grid-column: span 12; }
.c7 { grid-column: span 7; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c8 { grid-column: span 8; }
.c4 { grid-column: span 4; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1rem/1 var(--body);
  padding: 14px 22px 13px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--orange); color: var(--white); text-decoration: none;
  box-shadow: 0 5px 0 #6e2709, 0 8px 14px rgba(35, 32, 27, .2);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: var(--orange-hi); color: var(--white); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #6e2709; }
.btn-ghost { background: var(--cream-hi); color: var(--walnut); box-shadow: inset 0 0 0 2px var(--walnut), 0 5px 0 var(--walnut); }
.btn-ghost:hover { background: var(--mustard); color: var(--walnut); }

/* ---------- home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.hero .kick { font: 700 .8rem/1 var(--body); color: var(--orange); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.hero .lead { font-size: 1.12rem; color: var(--ink-soft); }
.screen {
  position: relative;
  background: linear-gradient(160deg, #6a4a30, var(--wood) 40%, #3b2817);
  border-radius: 34px; padding: 18px 18px 54px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), 0 10px 0 #2b1d10, 0 22px 30px rgba(35, 32, 27, .28);
}
.screen picture, .screen > img { border-radius: 26px / 22px; overflow: hidden; box-shadow: inset 0 0 0 4px #1a120a; }
.screen img { width: 100%; }
.screen-knobs { position: absolute; left: 22px; right: 22px; bottom: 14px; display: flex; align-items: center; gap: 14px; }
.screen-knobs i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1cf, var(--cream) 50%, #b9a274); box-shadow: 0 2px 0 #1a120a; }
.screen-knobs .lamp { margin-inline-start: auto; }
.screen-knobs .slot { flex: 1; height: 8px; border-radius: 6px; background: repeating-linear-gradient(90deg, #1a120a 0 6px, #3b2817 6px 10px); }

.gauges3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.gauge-card { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.gauge-card svg { width: 92px; height: auto; }
.gauge-card b { display: block; font: 700 .76rem/1.2 var(--body); color: var(--ink-soft); }
.gauge-card strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.8rem; line-height: 1.15; margin: 2px 0 4px; }
.gauge-card span { font-size: .95rem; color: var(--ink-soft); line-height: 1.4; display: block; }
.needle { transform-origin: 50px 52px; transform: rotate(var(--n, 0deg)); transition: transform 1.2s cubic-bezier(.2, 1.5, .4, 1); }
.js .powering .needle { transform: rotate(-80deg); }

.answer-plate {
  margin-top: var(--gap);
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
}
.answer-plate p { margin: 0; font-size: 1.1rem; }
.answer-plate .big-lamp { width: 40px; height: 40px; }

/* gauges module */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 8px; }
.dial-panel { border-radius: 20px; padding: 22px; }
.dial-panel.yes { background: #E7F0E6; box-shadow: inset 0 0 0 2px #b8cdb6; }
.dial-panel.no { background: #F7E2D2; box-shadow: inset 0 0 0 2px #e0b99c; }
.dial-panel h3 { display: flex; align-items: center; gap: 14px; }
.dial-panel h3 svg { width: 84px; flex: none; }
.dial-panel ul { list-style: none; padding: 0; margin: 0; }
.dial-panel li { padding-inline-start: 26px; position: relative; }
.dial-panel li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .65em; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.dial-panel.no li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--orange); }

/* myth lamps */
.myths { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.myths li { margin: 0; }
.myth {
  display: block; width: 100%; height: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer;
  background: var(--teal-deep); color: var(--cream); border: 0; border-radius: 18px; padding: 18px 18px 20px;
  box-shadow: inset 0 0 0 2px #1d5a57, 0 4px 0 #062826;
}
.myth .lamp { width: 26px; height: 26px; margin-bottom: 12px; }
.myth .say { display: block; font-weight: 700; font-size: 1.12rem; }
.myth .fix { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(242, 228, 196, .4); color: var(--white); }
.myth .fix::before { content: "التصحيح: "; font-weight: 700; color: var(--mustard); }
.myth .hint { display: none; }
.js .myth .fix { display: none; }
.js .myth .hint { display: block; margin-top: 10px; font-size: .8rem; color: var(--teal-glow); }
.js .myth[aria-pressed="true"] { background: var(--cream-hi); color: var(--walnut); box-shadow: inset 0 0 0 2px var(--mustard), 0 4px 0 #b88a12; }
.js .myth[aria-pressed="true"] .say { text-decoration: line-through; text-decoration-color: var(--orange); opacity: .75; }
.js .myth[aria-pressed="true"] .fix { display: block; color: var(--walnut); border-top-color: var(--enamel-edge); }
.js .myth[aria-pressed="true"] .fix::before { color: var(--orange); }
.js .myth[aria-pressed="true"] .hint { display: none; }
.js .myth[aria-pressed="true"] .lamp { background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c); box-shadow: 0 0 14px 4px rgba(217, 162, 27, .6); }

/* protocol builder */
.builder-band {
  border-radius: 20px; overflow: hidden; margin: 6px 0 22px; position: relative;
  aspect-ratio: 21 / 6; background: var(--teal-deep);
}
.builder-band img { width: 100%; height: 100%; object-fit: cover; }
.builder { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.builder form { display: grid; gap: 16px; }
fieldset { border: 0; margin: 0; padding: 18px; border-radius: 18px; background: var(--cream); box-shadow: inset 0 0 0 2px var(--enamel-edge); }
legend { font: 700 .78rem/1 var(--body); background: var(--walnut); color: var(--cream); padding: 7px 12px 6px; border-radius: 5px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 9px 14px 8px; border-radius: 12px; background: var(--cream-hi);
  box-shadow: inset 0 0 0 2px var(--enamel-edge), 0 3px 0 var(--enamel-edge); font-weight: 500;
}
.opt input:checked + span { background: var(--teal); color: var(--cream); box-shadow: inset 0 0 0 2px var(--teal-deep), 0 3px 0 var(--teal-deep); }
.opt input:checked + span .lamp { background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c); box-shadow: 0 0 10px 3px rgba(217, 162, 27, .65); }
.opt input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 3px; }
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.field-row input[type="number"], .field-row select {
  font: 500 1rem var(--body); padding: 8px 10px; border-radius: 10px; border: 2px solid var(--walnut); background: var(--cream-hi); color: var(--walnut); width: 7.5em;
}
.field-row select { width: auto; }
.note { font-size: .95rem; color: var(--ink-soft); margin: 10px 0 0; }

.sheet {
  background: var(--white); border-radius: 6px; padding: 26px 24px 22px;
  box-shadow: 0 0 0 1px #e2d3b0, -6px 6px 0 var(--teal), 0 16px 24px rgba(35, 32, 27, .18);
  position: sticky; top: 16px;
}
.sheet h3 { font-size: 1.05rem; border-bottom: 3px double var(--walnut); padding-bottom: 10px; }
.sheet ol { list-style: none; padding: 0; counter-reset: c; }
.sheet li { counter-increment: c; padding-block: 7px; padding-inline: 34px 0; position: relative; border-bottom: 1px dotted #cbb88f; margin: 0; }
.sheet li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 12px; width: 16px; height: 16px; border: 2px solid var(--walnut); border-radius: 4px; }
.sheet .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sheet .actions .btn { font-size: .92rem; padding: 11px 16px 10px; }
.status { min-height: 1.4em; font-size: .9rem; margin-top: 8px; color: var(--teal); font-weight: 500; }
.nojs-only { font-size: .92rem; color: var(--ink-soft); }
.js .nojs-only { display: none; }
.method { margin-top: var(--gap); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; counter-reset: s; }
.method li { counter-increment: s; margin: 0; padding: 16px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 2px var(--enamel-edge); font-size: .97rem; }
.method li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mustard); font-family: var(--display); margin-bottom: 8px; }
.method strong { display: block; margin-bottom: 4px; }

/* oscilloscope */
.scope { background: #062826; border-radius: 22px; padding: 14px; box-shadow: inset 0 0 0 6px #1b4f4b, inset 0 0 40px rgba(127, 209, 196, .15); margin-bottom: 20px; }
.scope svg { width: 100%; height: auto; display: block; }
.trace { stroke-dasharray: 1000; stroke-dashoffset: 0; animation: sweep 7s linear infinite; }
@keyframes sweep { 0% { stroke-dashoffset: 1000; } 70%, 100% { stroke-dashoffset: 0; } }
.example { background: var(--teal-deep); color: var(--cream); border-radius: 18px; padding: 20px 22px; margin: 0 0 1em; box-shadow: inset 0 0 0 2px #1d5a57; }
.mod-teal .example { background: #062826; }
.example h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; color: var(--mustard); margin-bottom: .4em; }
.example p { margin: 0; }
.tip { display: grid; grid-template-columns: 30px 1fr; gap: 14px; background: #F6E3AE; border-radius: 18px; padding: 18px 20px; margin: 0 0 1em; color: var(--walnut); box-shadow: inset 0 0 0 2px #e2c36c; }
.tip .lamp { width: 26px; height: 26px; margin-top: 2px; }
.tip h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin-bottom: .2em; }
.tip p { margin: 0; }

/* promo: boomerang panel */
.promo-wrap { position: relative; }
.promo {
  position: relative; color: var(--cream);
  background: var(--teal);
  border-radius: 140px 46px 140px 46px / 90px 46px 90px 46px;
  padding: 30px 30px 32px;
  box-shadow: inset 0 0 0 4px #0b4c49, 0 7px 0 var(--teal-deep), 0 18px 28px rgba(35, 32, 27, .22);
  display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center;
  overflow: hidden;
}
.promo::before {
  content: ""; position: absolute; inset-inline-end: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 2px solid rgba(242, 228, 196, .16); box-shadow: 0 0 0 26px rgba(242, 228, 196, .05);
}
.promo-art { width: 120px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--mustard); }
.pilot { display: flex; align-items: center; gap: 12px; font: 700 .76rem/1 var(--body); margin-bottom: 10px; }
.pilot i { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #b39444, var(--mustard-dim) 60%, #5c4a1d); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .3); }
.promo h2, .promo .promo-title { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1.15; margin: 0 0 10px; }
.engraved {
  display: inline-block; background: var(--cream); color: var(--walnut);
  font: 700 1rem/1.2 var(--body); padding: 10px 16px 9px; border-radius: 6px;
  box-shadow: inset 0 2px 3px rgba(35, 32, 27, .35); margin-bottom: 14px;
}
.rocker {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: var(--orange); color: var(--white); font: 700 1rem/1 var(--body);
  padding-block: 13px 12px; padding-inline: 14px 20px; border-radius: 12px;
  box-shadow: inset 0 -5px 0 #6e2709, 0 3px 0 #4f1b05;
}
.rocker::before { content: ""; width: 18px; height: 26px; border-radius: 4px; background: linear-gradient(#f5c9a8, #e09a6e 50%, #8f3410 52%); box-shadow: inset 0 0 0 2px #4f1b05; }
.rocker:hover { background: var(--orange-hi); color: var(--white); }
.mod-teal .rocker, .promo .rocker { color: var(--white); }
.fine { display: block; margin-top: 12px; font-size: .86rem; color: var(--cream); }

/* cartridges */
.carts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 8px; }
.cart {
  position: relative; display: block; text-decoration: none; color: var(--walnut);
  background: #3A2B1C; padding: 14px 14px 0; border-radius: 16px 16px 6px 6px;
  box-shadow: 0 6px 0 #1d140b, 0 14px 20px rgba(35, 32, 27, .22);
  clip-path: polygon(0 0, 38% 0, 42% 12px, 58% 12px, 62% 0, 100% 0, 100% 100%, 0 100%);
  transition: transform .2s;
}
.cart:hover { transform: translateY(-6px); color: var(--walnut); }
.cart:focus-visible { outline-offset: 6px; }
.cart picture { border-radius: 10px; overflow: hidden; display: block; margin-top: 8px; }
.cart-label { display: block; background: var(--cream-hi); margin: 12px -2px 0; padding: 16px 16px 20px; border-radius: 8px 8px 0 0; }
.cart-label b { display: block; font: 700 .72rem/1 var(--body); color: var(--orange); margin-bottom: 8px; }
.cart-label strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; margin-bottom: 6px; }
.cart-label span { font-size: .95rem; color: var(--ink-soft); display: block; }
.cart .pins { display: block; height: 14px; margin: 0 10%; background: repeating-linear-gradient(90deg, #c9a24a 0 8px, transparent 8px 13px); }

/* faq */
.faq details { border-radius: 14px; background: var(--cream); box-shadow: inset 0 0 0 2px var(--enamel-edge); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding-block: 14px 13px; padding-inline: 52px 16px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; position: absolute; inset-inline-start: 16px; top: 16px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6b5a2c, #3a3020); }
.faq details[open] summary::before { background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c); box-shadow: 0 0 10px 3px rgba(217, 162, 27, .55); }
.faq details > p { padding-block: 0 16px; padding-inline: 52px 18px; margin: 0; }

/* robot */
.robot { text-align: start; }
.robot picture { width: min(240px, 70%); margin: -6px auto 14px; display: block; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px var(--cream), 0 0 0 9px var(--mustard); }
.stop {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px;
  width: 100%; text-decoration: none; background: var(--orange); color: var(--white);
  font-family: var(--display); font-weight: 700; font-size: 1.5rem; padding: 18px; border-radius: 999px;
  box-shadow: inset 0 0 0 4px #6e2709, 0 6px 0 #4f1b05;
}
.stop:hover { background: var(--orange-hi); color: var(--white); }
.stop svg { width: 28px; height: 28px; }

/* ---------- guide pages ---------- */
.ghead { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.ghead .intro { font-size: 1.1rem; color: var(--ink-soft); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: var(--gap); margin-top: var(--gap); align-items: start; }
.article > section { padding: 4px 0 18px; }
.article > section + section { border-top: 3px dotted var(--enamel-edge); padding-top: 26px; }
.article h2 { scroll-margin-top: 20px; }
.panel { position: sticky; top: 16px; }
.panel ol { list-style: none; padding: 0; margin: 0; }
.panel li { margin: 0 0 4px; }
.panel a { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; padding: 8px 8px; border-radius: 10px; line-height: 1.3; color: var(--cream); font-size: .95rem; }
.panel a .lamp { margin-top: 2px; }
.panel a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.panel a:hover .lamp, .panel a.lit .lamp { background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c); }
.steps { list-style: none; padding: 0; margin: 0 0 1em; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 50px 1fr; gap: 14px; margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 2px var(--enamel-edge); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--cream); font-family: var(--display); box-shadow: 0 3px 0 var(--teal-deep); }
.steps strong { display: block; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--enamel-edge); }
table { width: 100%; border-collapse: collapse; font-size: 1.08rem; background: var(--cream-hi); }
caption { text-align: start; font: 700 .76rem/1.2 var(--body); padding: 12px 14px; color: var(--ink-soft); }
th { background: var(--walnut); color: var(--cream); text-align: start; padding: 10px 14px; font-weight: 700; }
td { padding: 10px 14px; border-top: 1px solid var(--enamel-edge); vertical-align: top; }
tr:nth-child(even) td { background: #F5EAD0; }
.next-carts { margin-top: var(--gap); }

/* doc pages */
.doc { max-width: 860px; margin: 0 auto; }
.doc .intro { font-size: 1.12rem; color: var(--ink-soft); }
.doc-head { display: flex; gap: 22px; align-items: center; }
.doc-head picture { width: 130px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--mustard); }
.doc section { margin-top: 26px; }
.lost { text-align: center; max-width: 720px; margin: 0 auto; }
.lost svg { width: 160px; margin: 0 auto 10px; display: block; }
.lost ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- footer ---------- */
.foot { background: linear-gradient(180deg, #4a321f, #2f2013); color: var(--cream); border-top: 8px solid var(--teal); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 36px 16px 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; font-size: .96rem; }
.foot a { color: var(--cream); }
.foot a:hover { color: var(--mustard); }
.foot h2 { font-size: 1rem; margin-bottom: .6em; color: var(--mustard); }
.foot ul { list-style: none; padding: 0; }
.badge18 { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--mustard); color: var(--walnut); font-family: var(--display); font-size: 1rem; margin-bottom: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .myths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; order: -1; }
}
@media (max-width: 900px) {
  .hero, .ghead, .builder { grid-template-columns: minmax(0, 1fr); }
  .c7, .c5, .c6, .c8, .c4 { grid-column: span 12; }
  .gauges3, .carts { grid-template-columns: minmax(0, 1fr); }
  .sheet { position: static; }
  .foot-in { grid-template-columns: 1fr; }
  .menu-toggle {
    display: none;
  }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px; background: var(--cream); color: var(--walnut);
    border: 0; border-radius: 999px; padding: 9px 16px 8px; font: 700 .9rem/1 var(--body); cursor: pointer;
  }
  .js .menu-toggle .lamp { width: 12px; height: 12px; }
  .js .menu-toggle[aria-expanded="true"] .lamp { background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c); }
  .selector { width: 100%; }
  .js .selector { display: none; }
  .js .selector.open { display: flex; }
  .knob { display: none; }
  .selector ul { flex-direction: column; width: 100%; gap: 2px; }
  .selector a { flex-direction: row; gap: 12px; font-size: .95rem; padding: 12px 10px; }
}
@media (max-width: 640px) {
  body { font-size: 1.15rem; }
  h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.6rem); }
  .myths, .method, .dual { grid-template-columns: minmax(0, 1fr); }
  .promo { grid-template-columns: minmax(0, 1fr); border-radius: 36px 80px 36px 80px / 36px 60px 36px 60px; padding: 26px 22px; }
  .promo-art { width: 96px; }
  .gauge-card { grid-template-columns: 76px 1fr; }
  .gauge-card svg { width: 76px; }
  .answer-plate { grid-template-columns: minmax(0, 1fr); }
  .answer-plate .big-lamp { display: none; }
  .dial-panel h3 svg { width: 60px; }
  .dial-panel { padding: 18px 16px; }
  .doc-head { flex-direction: column; align-items: flex-start; }
  .screen { border-radius: 24px; padding: 12px 12px 44px; }
  .builder-band { aspect-ratio: 21 / 9; }
  .brand-name { font-size: 1.45rem; }
  .brand svg { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .trace { stroke-dasharray: none; }
}

/* print: only the protocol sheet when requested from the builder */
@media print {
  .topbar, .foot { display: none; }
  .print-fiche body * { visibility: hidden; }
  .print-fiche #fiche, .print-fiche #fiche * { visibility: visible; }
  .print-fiche #fiche { position: absolute; inset-inline-start: 0; top: 0; width: 100%; box-shadow: none; }
  .print-fiche #fiche .actions, .print-fiche #fiche .status { display: none; }
  body { background: #fff; }
}

/* RTL / Arabic details */
.selector a { padding: 6px 11px; }
.hero .kick, .plate, legend, .cart-label b, .gauge-card b, .pilot { font-weight: 700; }
.plate { font-size: .9rem; padding: 7px 12px; }
legend { font-size: .95rem; padding: 7px 12px; }
.hero .kick { font-size: 1rem; }
.gauge-card b { font-size: .95rem; }
.cart-label b { font-size: .9rem; }
.pilot { font-size: .95rem; }
.engraved { font-size: 1.1rem; }
.btn, .rocker { font-size: 1.1rem; }
.method li::before, .steps li::before, .badge18 { font-weight: 700; font-size: 1.3rem; }
.steps li::before, .method li::before { line-height: 1; }
.example h3, .tip h3 { font-size: 1.12rem; }
.caption, caption { font-size: .95rem; }
.answer-plate p { font-size: 1.2rem; }
.lead, .hero .lead { font-size: 1.28rem; }
bdi[dir="ltr"] { unicode-bidi: isolate; }
.field-row input[type="number"] { text-align: end; }
.screen-knobs .slot { transform: scaleX(-1); }

/* ---------- REF-UP 2026-11-03: lit pilot lamp, engraved code, ref rocker, bottom control strip ---------- */
.hero-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 6px 0 10px; }
.btn-ref { font-size: 1.25rem; padding: 16px 28px 15px; box-shadow: 0 6px 0 #6e2709, 0 0 0 4px rgba(217, 162, 27, .45), 0 12px 22px rgba(168, 62, 20, .35); }
.hero-code { display: inline-flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 14px 6px; border-radius: 10px; background: var(--cream); box-shadow: inset 0 2px 3px rgba(35, 32, 27, .3), 0 0 0 2px var(--enamel-edge); }
.hero-code > span:first-child { font-weight: 700; font-size: .95rem; color: var(--ink-soft); }
.hero-code code, .engraved code, .refbar code { font: 700 1.2rem/1.2 var(--body); color: var(--walnut); user-select: all; }
.hero-fine { font-size: .95rem; color: var(--ink-soft); margin: 0 0 12px; }
.copy-key { min-height: 36px; padding: 4px 12px; border: 0; border-radius: 8px; cursor: pointer; font: 700 .95rem/1 var(--body); background: var(--teal); color: var(--cream); box-shadow: inset 0 -3px 0 var(--teal-deep); }
.copy-key:hover { background: var(--teal-deep); }
.copy-st { font-weight: 700; font-size: .95rem; color: var(--teal); }
.copy-st:empty { display: none; }
.promo .copy-st { color: var(--mustard); }
.engraved { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.engraved > span:first-child { font-size: .95rem; color: var(--ink-soft); }
.engraved code { font-size: 1.5rem; }
.pilot-on i { background: radial-gradient(circle at 35% 35%, #ffe7a3, var(--mustard) 55%, #a87a0c); box-shadow: 0 0 0 3px rgba(0, 0, 0, .25), 0 0 16px 5px rgba(217, 162, 27, .75); }
.rocker-ref { font-size: 1.25rem; padding-block: 15px 14px; padding-inline: 16px 26px; box-shadow: inset 0 -5px 0 #6e2709, 0 3px 0 #4f1b05, 0 0 0 4px rgba(217, 162, 27, .5); }
.promo-note { font-size: 1rem; margin: 12px 0 0; max-width: 60ch; }
.promo .promo-note a { color: var(--mustard); }
.promo-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: stretch; }
.promo-top .promo { padding: 34px 40px 36px; }
.article > .promo { margin-bottom: 28px; }
.doc > .promo { margin: 6px 0 26px; }
.refbar { display: none; }
@media (max-width: 900px) { .promo-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  body.has-refbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .refbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--walnut); border-top: 3px solid var(--mustard); box-shadow: 0 -10px 24px rgba(35, 32, 27, .35); }
  .refbar-go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border-radius: 999px; background: var(--orange); color: var(--white); font: 700 1.05rem/1 var(--body); text-decoration: none; white-space: nowrap; box-shadow: inset 0 -4px 0 #6e2709; }
  .refbar-go:hover { color: var(--white); background: var(--orange-hi); }
  .refbar-go .lamp { width: 12px; height: 12px; }
  .refbar-code { position: relative; display: inline-flex; align-items: center; gap: 6px; padding-block: 3px; padding-inline: 10px 3px; border-radius: 8px; background: var(--cream); }
  .refbar code { font-size: 1rem; }
  .copy-key-bar { min-height: 32px; padding: 2px 8px; font-size: .85rem; }
  .refbar-code .copy-st { position: absolute; bottom: calc(100% + 10px); inset-inline-start: 0; padding: 2px 8px; border-radius: 6px; background: var(--cream-hi); color: var(--teal); white-space: nowrap; }
  .refbar-ad { margin-inline-start: auto; font-size: .85rem; color: var(--cream); white-space: nowrap; }
}
@media (max-width: 400px) { .refbar-ad { display: none; } .refbar { gap: 8px; padding-inline: 10px; } }
