/* OF Gear – site stylesheet */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --text: #1b2129;
  --muted: #5a6472;
  --border: #e1e5ea;
  --ink: #0d1117;
  --ink-2: #151b23;
  --ink-3: #1f2731;
  --ink-text: #e8edf2;
  --ink-muted: #95a1b0;
  --accent: #10b4d6;
  --accent-strong: #0889a6;
  --accent-soft: rgba(16, 180, 214, .12);
  --warn: #e8a317;
  --warn-soft: rgba(232, 163, 23, .12);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .25);
  --maxw: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Michroma", "Inter", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --surface: #161c24; --surface-2: #1d252f; --text: #e4e9ef;
    --muted: #9aa6b4; --border: #2a3440; --accent-soft: rgba(16, 180, 214, .16);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #161c24; --surface-2: #1d252f; --text: #e4e9ef;
  --muted: #9aa6b4; --border: #2a3440; --accent-soft: rgba(16, 180, 214, .16);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
:where(:root[data-theme="dark"]) a, :where(a:hover) { color: var(--accent); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) a { color: var(--accent); } }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 .85em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, .92); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: #fff; line-height: 1; flex-shrink: 0; }
.brand:hover { color: #fff; }
.brand b { font: 400 22px/1 var(--font-display); letter-spacing: .14em; }
.brand b span { color: var(--accent); }
.brand small { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); margin-top: 6px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav > ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a.top, .nav button.top {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 8px;
  color: var(--ink-text); text-decoration: none; font: 500 14.5px var(--font); background: none; border: 0; cursor: pointer;
}
.nav a.top:hover, .nav button.top:hover, .nav li:focus-within > .top { background: rgba(255,255,255,.07); color: #fff; }
.nav .top[aria-current="true"] { color: var(--accent); }
.nav .chev { width: 10px; height: 10px; opacity: .6; transition: transform .2s; }
.nav .menu {
  position: absolute; top: calc(100% + 6px); left: -8px; min-width: 250px; list-style: none; margin: 0; padding: 8px;
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .16s ease;
  max-height: calc(100vh - 90px); overflow-y: auto;
}
.nav .menu.cols { columns: 2; column-gap: 4px; min-width: 470px; }
.nav li:hover > .menu, .nav li:focus-within > .menu, .nav li.open > .menu { opacity: 1; visibility: visible; transform: none; }
.nav .menu a { display: block; padding: 7px 12px; border-radius: 7px; color: var(--ink-text); text-decoration: none; font-size: 14px; break-inside: avoid; }
.nav .menu a:hover, .nav .menu a[aria-current="page"] { background: rgba(16,180,214,.14); color: #fff; }
.btn-shop {
  margin-left: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--accent); color: #04232b !important; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn-shop:hover { background: #3fd0ee; }
.btn-shop svg { width: 17px; height: 17px; flex-shrink: 0; }
.theme-toggle {
  margin-left: 8px; display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: var(--ink-text); cursor: pointer;
}
.theme-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .i-sun, .theme-toggle.is-dark .i-moon { display: none; }
.theme-toggle.is-dark .i-sun { display: block; }
.burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; padding: 10px; cursor: pointer; border-radius: 8px; }
.burger svg { width: 24px; height: 24px; }

@media (max-width: 1200px) {
  .site-header { backdrop-filter: none; background: var(--ink); }
  .site-header .wrap { gap: 6px; padding: 0 12px 0 16px; }
  .brand { min-width: 0; }
  .brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .burger { display: block; order: 2; margin-left: 4px; }
  .theme-toggle { order: 1; margin-left: auto; }
  .nav {
    position: fixed; inset: 68px 0 0 0; background: var(--ink); flex-direction: column; align-items: stretch;
    padding: 12px 16px 40px; overflow-y: auto; display: none; margin: 0;
  }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; }
  .nav a.top, .nav button.top { width: 100%; justify-content: space-between; padding: 14px 12px; font-size: 16px; }
  .nav .menu, .nav .menu.cols {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent;
    display: none; columns: 1; min-width: 0; padding: 0 0 8px 12px; max-height: none;
  }
  .nav li.open > .menu { display: block; }
  .nav li.open .chev { transform: rotate(180deg); }
  .nav li:hover > .menu { display: none; }
  .nav li.open:hover > .menu { display: block; }
  .btn-shop { margin: 16px 0 0; justify-content: center; padding: 14px; font-size: 16px; }
}

/* ---------- Page hero ---------- */
.page-hero {
  background:
    radial-gradient(900px 300px at 85% -10%, rgba(16,180,214,.22), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--ink-text); padding: 44px 0 52px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.page-hero h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem); color: #fff; margin: 0; position: relative; z-index: 1; }
.page-hero .lead { color: var(--ink-muted); max-width: 720px; margin: 12px 0 0; font-size: 1.05rem; position: relative; z-index: 1; }
.crumbs { font-size: 13px; color: var(--ink-muted); margin-bottom: 12px; position: relative; z-index: 1; }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* ---------- Layout with side nav ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 40px 20px 72px; max-width: var(--maxw); margin: 0 auto; }
.layout.single { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.layout.wide { grid-template-columns: minmax(0, 1fr); max-width: none; padding: 24px clamp(8px, 1.5vw, 24px) 48px; }
.layout.wide .app-frame { min-height: calc(100vh - 110px); }
.sidenav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
.sidenav h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px 12px; }
.sidenav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.sidenav a { display: block; padding: 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14.5px; }
.sidenav a:hover { color: var(--text); }
.sidenav a[aria-current="page"] { color: var(--accent-strong); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .sidenav { display: none; }
}

/* ---------- Content blocks ---------- */
.content > .block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow); margin-bottom: 22px; }
.content > .block > :first-child { margin-top: 0; }
.content > .block > :last-child { margin-bottom: 0; }
@media (max-width: 600px) { .content > .block { padding: 20px 18px; } }
.content h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.content h3.sub { font-size: 1.12rem; color: var(--text); display: flex; align-items: center; gap: 10px; }
.content h3.sub::before { content: ""; width: 4px; height: 1.05em; background: var(--accent); border-radius: 4px; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1em; }
.content li { margin: .25em 0; }
.content strong, .content b { font-weight: 650; }
.menu-path {
  display: inline-block; font: 600 .86em/1.4 var(--font); background: var(--accent-soft); color: var(--text);
  padding: 1px 8px; border-radius: 6px; border: 1px solid rgba(16,180,214,.28); white-space: nowrap;
}
.menu-arrow { color: var(--accent-strong); margin: 0 4px; font-weight: 700; }
.content code, .code { font-family: var(--mono); font-size: .9em; }
pre.code {
  background: var(--ink); color: #d6e2ee; border-radius: 12px; padding: 18px 20px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.55; margin: 0 0 1em;
}
.callout { border-left: 4px solid var(--warn); background: var(--warn-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 1em; }
.callout.info { border-color: var(--accent); background: var(--accent-soft); }

.content p.q { margin-top: 1.1em; }
details.faq { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 10px; background: var(--bg); }
details.faq summary {
  cursor: pointer; padding: 13px 44px 13px 16px; font-weight: 600; list-style: none; position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--accent-strong); transition: transform .2s;
}
details.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.faq[open] { background: var(--surface); border-color: var(--accent); }
details.faq > div { padding: 0 16px 6px; color: var(--text); }

/* In-page table of contents */
.content .toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border: 0; padding: 0; margin: 0 0 10px; }
.content .toc ol { columns: 2 220px; column-gap: 24px; margin: 0; padding-left: 1.4em; }
.content .toc li { margin: 4px 0; break-inside: avoid; }
.content .toc a { text-decoration: none; font-weight: 500; }
.content .toc a:hover { text-decoration: underline; }
.content > .block[id] { scroll-margin-top: 90px; }
.content .steps { margin: 6px 0 16px; }
.content .steps li { margin: 0; }

/* Display screens (drawn like the OLED on the controller) */
.oleds { display: flex; flex-wrap: wrap; gap: 18px 20px; margin: 10px 0 18px; align-items: flex-start; }
.oled-fig { margin: 0; }
.oled {
  display: inline-block; background: #040506; border: 3px solid #2b2f35; border-radius: 10px; padding: 12px 16px;
  box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0,0,0,.22), inset 0 0 14px rgba(0,0,0,.9);
}
.oled pre {
  margin: 0; min-width: 20ch; min-height: 5.6em; white-space: pre;
  font: 600 15px/1.4 ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  color: #f2f7ff; text-shadow: 0 0 4px rgba(170, 210, 255, .35);
}
.oled.gear { display: inline-flex; align-items: stretch; gap: 12px; }
.oled-gear {
  display: grid; place-items: center; min-width: 2.4em; padding: 0 6px; border: 2px solid #cfe3ff; border-radius: 3px;
  font: 800 64px/1 ui-monospace, Consolas, monospace; color: #e8f2ff; text-shadow: 0 0 6px rgba(170,210,255,.4);
}
.oled.gear pre { min-width: 15ch; min-height: 0; }
.oled-head { display: block; font-size: 2em; line-height: 1.05; margin-bottom: 2px; }
.oled.gear .oled-gear { font-size: 84px; }
.oled mark { background: none; color: inherit; outline: 2px solid #e5484d; outline-offset: 1px; border-radius: 5px; }
.oled-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 7px; max-width: 28ch; }
@media (max-width: 420px) { .oled pre { font-size: 13px; } .oled { padding: 10px 12px; } }

/* WiFi connect box */
.content > .block.wifi-connect { border: 1px solid var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%); }
.wifi-grid { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 700px) { .wifi-grid { grid-template-columns: 1fr; gap: 16px; } }
.wifi-cred { display: grid; gap: 10px; }
.wifi-cred div { background: var(--ink); border-radius: 12px; padding: 12px 16px; border: 1px solid var(--ink-3); }
.wifi-cred small { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.wifi-cred b { font: 700 1.35rem/1.3 var(--mono); color: var(--accent); letter-spacing: .02em; }
.wifi-shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 24px; align-items: end; margin-top: 28px; }
.wifi-shot-wide { margin-top: 28px; }
.wifi-shots h3, .wifi-shot-wide h3 { font-size: 1rem; margin: 0 0 10px; }
.wifi-shots .gallery, .wifi-shots figure, .wifi-shot-wide .gallery, .wifi-shot-wide figure { margin: 0; }
.wifi-shots figure.single, .wifi-shot-wide figure.single { max-width: none !important; }
@media (max-width: 700px) { .wifi-shots { grid-template-columns: 1fr; } }
.wifi-connect .steps { margin: 0; }
.wifi-connect code { font-weight: 700; }

/* Sensor cards (MAP / pressure sensors) */
.sensors { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 16px; }
.sensor { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.sensor .photo { background: #f3f1ee; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.sensor .photo img { width: 100%; height: 100%; object-fit: cover; }
.sensor .photo.dark { background: #111; }
.sensor .photo.dark img { object-fit: contain; }
.sensor .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sensor h3 { margin: 0; font-size: 1.02rem; }
.sensor .range { display: inline-block; align-self: flex-start; font-size: 12.5px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); }
.sensor .vals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sensor .vals div { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: var(--surface); }
.sensor .vals small { display: block; font-size: 11.5px; color: var(--muted); }
.sensor .vals b { font: 700 1.25rem/1.2 var(--mono); color: var(--text); }
.sensor table { font-size: 13.5px; }
.sensor .content-table th, .sensor td, .sensor th { padding: 5px 8px !important; }
.sensor .note { font-size: 13px; color: var(--muted); margin: 0; }

/* Gallery */
.gallery { columns: 3 230px; column-gap: 14px; margin: 6px 0 4px; }
.gallery.n1 { columns: 1; }
.gallery.n2 { columns: 2 260px; }
.gallery figure { break-inside: avoid; margin: 0 0 14px; }
.gallery a.zoom, .gallery .frame {
  display: block; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border);
  position: relative; cursor: zoom-in;
}
.gallery .frame { cursor: default; }
.gallery img { width: 100%; transition: transform .35s ease; }
.gallery a.zoom:hover img { transform: scale(1.03); }
.gallery a.zoom::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(13,17,23,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center/16px no-repeat;
  opacity: 0; transition: opacity .2s;
}
.gallery a.zoom:hover::after { opacity: 1; }
.gallery .single { max-width: 100%; margin: 0 auto; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Video */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 6px 0 4px; }
.yt {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer;
  border: 0; padding: 0; width: 100%; display: block;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .4s; }
.yt:hover img { opacity: 1; transform: scale(1.02); }
.yt .play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; border-radius: 14px; background: rgba(13,17,23,.78);
  display: grid; place-items: center; transition: background .2s;
}
.yt:hover .play { background: #e62117; }
.yt .play::before { content: ""; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.yt iframe, video.vid { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video.vid { position: static; border-radius: 12px; background: #000; max-height: 560px; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: 14.5px; line-height: 1.3; border: 1px solid var(--border); background: var(--surface); color: var(--text) !important;
  transition: border-color .15s, background .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent-strong); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04232b !important; }
.btn.primary svg { color: #04232b; }
.btn.primary:hover { background: #3fd0ee; }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.btn.ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.25); }
.btn.ghost:hover { background: rgba(255,255,255,.08); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 6px 0 1em; border: 1px solid var(--border); border-radius: 12px; }
.content table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.content th, .content td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.content thead th { background: var(--surface-2); font-weight: 650; font-size: 13.5px; }
.content tbody tr:last-child td { border-bottom: 0; }
.content tbody tr:hover td { background: var(--accent-soft); }
.content td p { margin: 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text) !important; box-shadow: var(--shadow); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(16,24,40,.12); }
.card .thumb { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.icon { display: grid; place-items: center; background: linear-gradient(135deg, var(--ink-2), var(--ink-3)); }
.card .thumb.icon svg { width: 54px; height: 54px; color: var(--accent); }
.card .body { padding: 16px 18px 18px; }
.card .thumb.oled-thumb {
  aspect-ratio: auto; height: 118px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ink-2), var(--ink-3));
}
.oled.mini { padding: 7px 10px; border-width: 2px; border-radius: 7px; transition: transform .2s; }
.oled.mini pre { font-size: 10.5px; min-width: 20ch; min-height: 5.6em; }
.card:hover .oled.mini { transform: scale(1.04); }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Diagrams */
.diagram { margin: 6px 0 1em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
.diagram .d-line { stroke: var(--text); }
.diagram .d-muted { fill: var(--muted); }
.diagram .d-text { fill: var(--text); }
.diagram .d-box { fill: var(--surface); stroke: var(--border); }
.diagram .d-accent { fill: var(--accent); }
.diagram .d-accent-stroke { stroke: var(--accent); }

/* Pin table */
.pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 6px 0 1em; }
.pin { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pin b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 14px; flex-shrink: 0; }
.pin span { font-size: 14.5px; line-height: 1.3; }
.pin small { display: block; color: var(--muted); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ---------- Home ---------- */
.hero {
  position: relative; color: var(--ink-text); overflow: hidden;
  background: radial-gradient(1100px 500px at 80% 0%, rgba(16,180,214,.25), transparent 60%), linear-gradient(180deg, #0a0e13, var(--ink-2));
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 84px; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); line-height: 1.08; color: #fff; margin: 0 0 18px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .eyebrow { font: 400 12px var(--font-display); letter-spacing: .25em; color: var(--accent); text-transform: uppercase; margin-bottom: 18px; display: block; }
.hero p.lead { font-size: 1.12rem; color: #b9c4d0; max-width: 560px; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-img { position: relative; }
.hero-img img { border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); }
.hero-img .badge {
  position: absolute; left: -18px; bottom: -18px; background: rgba(13,17,23,.92); border: 1px solid rgba(255,255,255,.1);
  padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 13px; color: var(--ink-muted);
}
.hero-img .badge b { display: block; color: #fff; font-size: 20px; font-family: var(--font-display); letter-spacing: .05em; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 56px; gap: 36px; }
  .hero-img .badge { left: 12px; bottom: -14px; }
}
.stats { background: var(--ink-2); border-top: 1px solid rgba(255,255,255,.06); color: var(--ink-text); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.stats div { border-left: 2px solid var(--accent); padding-left: 14px; }
.stats b { display: block; font: 400 20px var(--font-display); color: #fff; }
.stats span { font-size: 13.5px; color: var(--ink-muted); }
@media (max-width: 700px) { .stats .wrap { grid-template-columns: 1fr 1fr; } }
.section { padding: 76px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.dark { background: var(--ink); color: var(--ink-text); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head .eyebrow { font: 400 11.5px var(--font-display); letter-spacing: .22em; color: var(--accent-strong); text-transform: uppercase; }
.section.dark .section-head .eyebrow { color: var(--accent); }
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 10px 0 10px; border: 0; padding: 0; }
.section.dark h2 { color: #fff; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.section.dark .section-head p { color: var(--ink-muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section.alt .feature { background: var(--bg); box-shadow: none; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 14px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.oled-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.oled-row figure { margin: 0; }
.oled-row img { border-radius: 12px; border: 1px solid rgba(255,255,255,.08); width: 100%; aspect-ratio: 2 / 1.05; object-fit: cover; }
.oled-row figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 8px; }
@media (max-width: 700px) { .oled-row { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
  content: counter(s); flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: 14px;
}
.steps li > div > b { display: block; }
.steps span { color: var(--muted); font-size: 14.5px; }
.cta-band { background: linear-gradient(120deg, #0a7f99, #10b4d6); color: #04232b; border-radius: 22px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { margin: 0 0 6px; border: 0; padding: 0; color: #03161b; }
.cta-band p { margin: 0; color: #053a46; }
.cta-band .btn { background: #0d1117; color: #fff !important; border-color: #0d1117; }
.cta-band .btn svg { color: var(--accent); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.form input, .form textarea {
  width: 100%; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); margin-bottom: 16px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form textarea { min-height: 160px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form .status { margin-top: 12px; font-weight: 600; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }

/* App frame (Parameter Tool etc.) */
.app-frame { width: 100%; min-height: 80vh; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ink-muted); padding: 56px 0 28px; font-size: 14.5px; }
.site-footer .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { margin-bottom: 14px; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(5,8,12,.92); display: none; align-items: center; justify-content: center; padding: 30px; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lb button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.lb button:hover { background: rgba(255,255,255,.2); }
.lb .x { top: 18px; right: 18px; }
.lb .prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb .count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #9aa6b4; font-size: 13px; }

/* ---------- What's new page + home teaser ---------- */
.nav a.top, .nav button.top { white-space: nowrap; }
@media (min-width: 1201px) { .nav a.top, .nav button.top { padding-left: 9px; padding-right: 9px; } }
.nav a.nav-new { color: var(--accent); }
.nav a.nav-new::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff6b4a; margin-left: 6px; box-shadow: 0 0 0 3px rgba(255,107,74,.25); }
.wn-teaser-sec { padding: 28px 0 0; }
.wn-teaser { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text) !important; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.wn-teaser:hover { border-color: var(--accent); transform: translateY(-1px); }
.wn-teaser .tag { font: 400 11px var(--font-display); letter-spacing: .2em; text-transform: uppercase; background: linear-gradient(120deg, #ff6b4a, #ffb020); color: #1a0d05; padding: 6px 10px; border-radius: 8px; }
.wn-teaser .txt { flex: 1 1 320px; color: var(--muted); }
.wn-teaser .txt b { color: var(--text); }
.wn-teaser .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent-strong); white-space: nowrap; }
.wn-teaser .go svg { width: 17px; height: 17px; }
.wn-hero-img img { width: 100%; height: auto; }
.wn-modes { display: grid; grid-template-columns: 1fr 220px 1fr; gap: 22px; align-items: stretch; }
.wn-mode { border-radius: 20px; padding: 28px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.wn-mode::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.wn-mode.comfort::before { background: linear-gradient(90deg, #2f9bff, #10b4d6); }
.wn-mode.race::before { background: linear-gradient(90deg, #ffb020, #ff4a3d); }
.wn-mode .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.wn-mode .ico svg { width: 26px; height: 26px; }
.wn-mode.comfort .ico { background: rgba(47,155,255,.14); color: #2f9bff; }
.wn-mode.race .ico { background: rgba(255,74,61,.14); color: #ff5a3d; }
.wn-mode h3 { font-size: 1.45rem; margin: 0 0 8px; }
.wn-mode p { color: var(--muted); margin: 0 0 14px; }
.wn-mode ul { margin: 0; padding-left: 20px; }
.wn-mode li { margin: 4px 0; }
.wn-meter { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "bar bar" "l r"; align-content: center; gap: 12px 8px; font: 400 11px var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.wn-meter > span:first-child { grid-area: l; } .wn-meter > span:last-child { grid-area: r; text-align: right; }
.wn-meter .bar { grid-area: bar; width: 100%; height: 14px; border-radius: 99px; background: linear-gradient(90deg, #2f9bff, #10b4d6 40%, #ffb020 70%, #ff4a3d); position: relative; }
.wn-meter .bar i { position: absolute; top: 50%; left: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.45), 0 0 0 3px rgba(16,180,214,.5); animation: wn-slide 6s ease-in-out infinite alternate; }
@keyframes wn-slide { 0%, 12% { left: 4%; } 88%, 100% { left: 96%; } }
@media (prefers-reduced-motion: reduce) { .wn-meter .bar i { animation: none; left: 50%; } }
@media (max-width: 900px) {
  .wn-modes { grid-template-columns: 1fr; }
  .wn-meter { padding: 4px 6px; }
}
.wn-eyebrow { font: 400 11.5px var(--font-display); letter-spacing: .22em; color: var(--accent-strong); text-transform: uppercase; }
.wn-h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 10px 0 10px; border: 0; padding: 0; }
.wn-p { color: var(--muted); font-size: 1.05rem; }
.wn-split { align-items: start; grid-template-columns: 1fr 1.25fr; }
@media (max-width: 900px) { .wn-split { grid-template-columns: 1fr; } }
.wn-shot, .wn-screen { margin: 0; }
.wn-shot a, .wn-screen a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.wn-shot img, .wn-screen img { display: block; width: 100%; height: auto; transition: transform .3s; }
.wn-shot a:hover img, .wn-screen a:hover img { transform: scale(1.02); }
.wn-shot figcaption, .wn-screen figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.section.dark .wn-screen a { border-color: rgba(255,255,255,.1); }
.section.dark .wn-screen figcaption { color: var(--ink-muted); }
.wn-screen figcaption code { color: var(--accent); background: none; padding: 0; margin-right: 6px; font-weight: 700; }
.wn-screens { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 22px; align-items: end; }
.wn-screen.wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .wn-screens { grid-template-columns: 1fr; } }
.wn-wifi-note { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; margin-top: 40px; padding: 22px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.wn-wifi-note img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; }
.wn-wifi-note h3 { color: #fff; margin: 0 0 6px; }
.wn-wifi-note p { color: var(--ink-muted); margin: 0 0 16px; }
@media (max-width: 700px) { .wn-wifi-note { grid-template-columns: 1fr; } }
