/* AI Hosting Panel, public site, version 2. Loaded after site.css and home.css on every public page, so it wins where they overlap.
   Light is the default. Dark is chosen with the theme switch (data-theme="dark" on the root element). On the light site every
   surface stays light: logos, cards, covers and command boxes. Only buttons are dark. */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --fg: #0a0a0a;
  --fg-2: #262626;
  --muted: #525252;
  --muted-2: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-soft: #eff6ff;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --code-bg: #f5f5f5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 1px 3px rgba(10, 10, 10, 0.06);
  --shadow-lg: 0 18px 40px -18px rgba(10, 10, 10, 0.22);
  --wrap: 1180px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --fg: #fafafa;
  --fg-2: #e5e5e5;
  --muted: #a3a3a3;
  --muted-2: #8a8a8a;
  --border: #262626;
  --border-strong: #404040;
  --card: #121212;
  --accent: #60a5fa;
  --accent-2: #a78bfa;
  --accent-soft: #0b1a33;
  --ok: #34d399;
  --ok-soft: #06281d;
  --warn: #fcd34d;
  --warn-soft: #2a1d05;
  --info: #93c5fd;
  --info-soft: #0b1a33;
  --code-bg: #161616;
  --shadow: none;
  --shadow-lg: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  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(--fg-2);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--fg); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { color: var(--fg); font-family: var(--font); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; margin: 14px 0 14px; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 1.05rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* Layout */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right, 0px));
}
.wrap.narrow, .narrow { max-width: 860px; }
.block { padding-block: clamp(48px, 7vw, 84px); }
.block.tight { padding-block: clamp(32px, 4vw, 48px); }
.block.soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.mt { margin-top: 20px; }
.muted { color: var(--muted); }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head .lead, .section-lead { color: var(--muted); font-size: 1.05rem; margin: 0; }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.6; max-width: 64ch; margin: 0; }
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em;
}
.eyebrow::before, .kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.page-hero { padding: clamp(40px, 6vw, 72px) 0 8px; }
.page-hero .lead { margin-top: 12px; }
.page-hero-in { max-width: 860px; }
.page-photo { margin: 28px 0 0; }
.page-photo img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); }
@media (max-width: 640px) { .page-photo img { aspect-ratio: 16 / 9; border-radius: 14px; } }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-2); margin: 0 0 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: 0.5; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: 600 14px/1 var(--font); text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  background: var(--bg); color: var(--fg); border-color: var(--border-strong);
}
.btn:hover { background: var(--bg-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary, .btn.grad, .btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover, .btn.grad:hover, .btn-primary:hover { background: var(--fg-2); border-color: var(--fg-2); }
.btn.emboss, .btn-secondary { background: var(--bg); color: var(--fg); border-color: var(--border-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--fg); }
.btn.large { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-row, .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header-in {
  max-width: var(--wrap); margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 12px;
  padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right, 0px));
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-weight: 700; letter-spacing: -0.01em; font-size: 15.5px; flex: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.brand-name { white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: 14px; }
.site-nav > a, .dropdown > summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; list-style: none;
}
.site-nav > a:hover, .dropdown > summary:hover, .dropdown[open] > summary { color: var(--fg); background: var(--bg-soft); }
.site-nav > a[aria-current="page"] { color: var(--fg); }
.dropdown { position: relative; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.dropdown[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.dropdown-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 70;
  width: 316px; padding: 8px; display: grid; gap: 1px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.dropdown-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: 14px;
}
.dropdown-panel a:hover { background: var(--bg-soft); }
.dropdown-panel a small { color: var(--muted-2); font-size: 12px; }
.dropdown-panel .dd-all { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; padding-top: 12px; font-weight: 600; }
.dd-label { margin: 8px 10px 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.theme-toggle:hover { background: var(--bg-soft); }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
.menu-btn {
  display: none; position: relative; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); cursor: pointer; flex: none;
}
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--fg); transition: transform 0.2s, opacity 0.2s; }
.menu-btn span:nth-child(1) { top: 13px; }
.menu-btn span:nth-child(2) { top: 19px; }
.menu-btn span:nth-child(3) { top: 25px; }
.site-header.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.open .menu-btn span:nth-child(2) { opacity: 0; }
.site-header.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.site-menu { display: none; border-top: 1px solid var(--border); background: var(--bg); }
.site-header.open .site-menu { display: block; }
.site-menu-in {
  max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto;
  padding: 6px max(16px, env(safe-area-inset-left, 0px)) calc(28px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 0;
}
.site-menu-in a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--border); color: var(--fg); text-decoration: none; font-size: 16px; font-weight: 500; }
.site-menu-in a small { color: var(--muted-2); font-size: 13px; }
.menu-label { margin: 18px 4px 4px; font-size: 12px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.menu-cta { margin-top: 18px; display: grid; gap: 10px; }
.menu-cta .btn { width: 100%; min-height: 46px; }

/* Cards and lists */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow); margin-bottom: 16px; color: var(--fg-2);
}
.card h2 { font-size: 1.22rem; margin: 0 0 10px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
a.card, .card.feat, .card.plat, .blog-card {
  display: block; color: inherit; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.card:hover, .card.feat:hover, .card.plat:hover, .blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card.feat h3, .card.plat h3, .blog-card h3 { color: var(--fg); }
.card .more, .plat-more a, .feat .more { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.card p, .card li { color: var(--fg-2); }
.card .muted, .card p.muted { color: var(--muted); }
.list { padding-left: 1.15em; color: var(--fg-2); }
.list li { margin: 7px 0; }
.list.later li { color: var(--muted); }
.grid-3, .feat-grid, .plat-grid.three { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2, .two-col { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2 > *, .two-col > *, .grid-3 > *, .feat-grid > *, .plat-grid > * { min-width: 0; }
.plat-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .feat-grid, .plat-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .two-col, .plat-grid, .plat-grid.three { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-3, .feat-grid, .plat-grid.three { grid-template-columns: 1fr; } }

/* Platform cards and logos */
.plat { position: relative; overflow: hidden; padding: 0 !important; }
.plat-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.plat-body { padding: 18px 20px 20px; }
.plat-logo { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); margin-bottom: 12px; }
.plat-logo img { width: 26px; height: 26px; object-fit: contain; }
.plat-more { margin: 10px 0 0; }
.logo { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
.logo.mono { filter: grayscale(1); opacity: 0.8; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tile { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--fg); text-decoration: none; font-size: 14px; }
a.tile:hover { border-color: var(--border-strong); }

/* Badges and alerts */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5; border: 1px solid var(--border); background: var(--bg-soft); color: var(--fg-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-soft); margin: 14px 0; }
.alert > .ic { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }
.alert strong { display: block; color: var(--fg); margin-bottom: 2px; }
.alert p { margin: 0; color: var(--fg-2); font-size: 15px; }
.alert.warn { background: var(--warn-soft); border-color: transparent; }
.alert.warn > .ic { color: var(--warn); }
.alert.ok { background: var(--ok-soft); border-color: transparent; }
.alert.ok > .ic { color: var(--ok); }

/* Command boxes, code, tables */
.cmd {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 6px;
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 10px 10px 14px; overflow-x: auto;
}
.cmd .prompt { color: var(--muted-2); font-family: var(--mono); font-size: 13px; flex: none; }
.cmd code { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; color: var(--fg); background: none; padding: 0; }
.cmd .copy { margin-left: auto; flex: none; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); font: 600 12.5px/1 var(--font); cursor: pointer;
}
.copy:hover { background: var(--bg-soft); }
pre, .guide-code {
  background: var(--code-bg); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; white-space: pre; margin: 10px 0;
}
pre code, .guide-code code { font-family: var(--mono); background: none; color: inherit; padding: 0; }
.guide-table { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.guide-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.guide-table th, .guide-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--fg-2); }
.guide-table th { font-weight: 600; color: var(--fg); background: var(--bg-soft); }
.guide-table tr:last-child td { border-bottom: 0; }
.sha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.sha code { font-size: 12px; word-break: break-all; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; }
.steps .num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--fg); border: 1px solid var(--border-strong); font-weight: 700; font-size: 14px;
}
.steps strong { display: block; color: var(--fg); margin-bottom: 2px; font-weight: 600; }
.steps p { margin: 0; color: var(--fg-2); }
.steps div > p:last-child { margin-bottom: 0; }
ol.steps.plain, .prose ol.steps { display: block; list-style: decimal; padding-left: 1.4em; }
ol.steps.plain li, .prose ol.steps li { display: list-item; margin: 6px 0; }

/* Segmented tabs (platform switcher) */
.seg {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: none; border: 0; background: transparent; padding: 8px 14px; border-radius: 9px;
  font: 500 14px/1 var(--font); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-selected="true"] { background: var(--bg); color: var(--fg); font-weight: 600; box-shadow: var(--shadow); border: 1px solid var(--border); }
.tabpanel[hidden] { display: none; }

/* FAQ (accordion) */
.faq details.card { padding: 0; margin: 0 0 10px; overflow: hidden; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; cursor: pointer; font-weight: 600; color: var(--fg); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); flex: none; transition: transform 0.2s; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--fg-2); }

/* Hero (home) */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 56px); align-items: center; padding-block: clamp(36px, 6vw, 72px) 32px; }
.hero h1 { margin-top: 18px; }
.hero .lead { margin-top: 0; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.trust span::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 700; }
.frame {
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-lg); min-width: 0;
}
.frame-bar { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); display: block; }
.frame img { display: block; width: 100%; height: auto; }
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; } }

/* Install area (home) */
.install-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; }
.install-card h3 { font-size: 1.15rem; }
.install-grid > * { min-width: 0; }
@media (max-width: 860px) { .install-grid { grid-template-columns: minmax(0, 1fr); } }

/* Screens (scroll row) */
.shots-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; }
.shots-row > figure { flex: 0 0 min(82%, 520px); scroll-snap-align: start; margin: 0; }
.shots-row img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-soft); display: block; }
.shots-row figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.shots { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }
@media (max-width: 640px) { .shots { grid-template-columns: 1fr; } }

/* CTA band (light, with a soft tint, never dark) */
.cta-band {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--border);
  padding: clamp(28px, 5vw, 52px); background: var(--bg-soft);
  background-image: radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
                    radial-gradient(50% 100% at 0% 100%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 60%);
}
.cta-band h2 { margin-top: 0; }
.cta-band p { color: var(--muted); max-width: 60ch; }

/* Blog */
.blog-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { padding: 0 !important; overflow: hidden; }
.blog-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.blog-body { padding: 18px 20px 20px; }
.blog-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; color: var(--muted-2); margin: 0 0 8px; }
.blog-body h3 { font-size: 1.1rem; margin: 0 0 8px; }
.blog-body p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.blog-hero { margin: 24px 0 26px; }
.blog-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); }
.article-head { margin: 8px 0 0; }
.article-head h1 { margin: 10px 0 12px; }
.article-head .lead { margin: 0; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 34px; font-size: 1.5rem; }
.prose h3 { margin-top: 24px; font-size: 1.12rem; }
.prose p, .prose li { color: var(--fg-2); font-size: 16.5px; line-height: 1.75; }
.prose code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 6px; border: 1px solid var(--border); }
.prose pre code { background: none; border: 0; padding: 0; }
.prose figure.shot { margin: 22px 0; }
.prose figure.shot img { width: 100%; border-radius: 14px; border: 1px solid var(--border); }
.prose figcaption { color: var(--muted-2); font-size: 14px; margin-top: 8px; }
.article-card { padding: clamp(20px, 3vw, 36px); }
.related { margin-top: 36px; }

/* Legal pages */
.legal-doc h2 { font-size: 1.3rem; margin-top: 30px; }
.legal-doc p, .legal-doc li { color: var(--fg-2); font-size: 16px; }
.legal-doc .meta { color: var(--muted-2); font-size: 14px; }

/* Footer */
.site-footer { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--border); background: var(--bg-soft); padding: 48px 0 28px; }
.site-footer-in { max-width: var(--wrap); margin: 0 auto; padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right, 0px)); }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot-group { min-width: 0; }
.foot-group summary { display: none; }
.foot-group > div { display: grid; gap: 2px; }
.foot-h { font-weight: 600; color: var(--fg); margin: 0 0 10px; font-size: 14px; }
.site-footer a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.site-footer a:hover { color: var(--fg); }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 13px; color: var(--muted-2); }
.foot-bottom p { margin: 0; max-width: 90ch; }
.legal { color: var(--muted-2); font-size: 12.5px; }
.legal p { margin: 0 0 8px; }
@media (max-width: 860px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .foot-cols { grid-template-columns: 1fr; gap: 0; }
  .foot-group summary {
    display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none;
    min-height: 52px; padding: 0 2px; border-top: 1px solid var(--border); font-weight: 600; color: var(--fg); font-size: 15px;
  }
  .foot-group summary::-webkit-details-marker { display: none; }
  .foot-group summary::after { content: "+"; font-size: 20px; color: var(--muted); }
  .foot-group[open] summary::after { content: "–"; }
  .foot-group > div { padding: 0 0 14px; }
  .foot-h { display: none; }
}

/* Responsive header */
@media (max-width: 1040px) {
  .site-nav { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .brand-name { font-size: 15px; }
}
@media (min-width: 1041px) {
  .site-header.open .site-menu { display: none; }
}

/* Motion and contrast */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .block { padding-block: 44px; }
  .card { border-radius: 14px; }
  .btn.large { min-height: 46px; width: 100%; }
  .hero-actions .btn { width: 100%; }
}
/* Command boxes on a phone: the command wraps and the copy button sits under it, so nothing runs off the screen */
@media (max-width: 640px) {
  .cmd { flex-direction: column; align-items: stretch; gap: 8px; overflow: visible; }
  .cmd code { white-space: normal; word-break: break-all; font-size: 12.5px; line-height: 1.6; }
  .cmd .copy { margin-left: 0; width: 100%; justify-content: center; min-height: 40px; }
  .cmd .prompt { display: none; }
  .install-card .btn, .card .btn.small { min-height: 40px; }
  .seg button { padding: 8px 12px; }
}
@media print { .site-header, .site-footer, .nav-actions { display: none !important; } }
