/* One stylesheet for both languages. Dark only: every screenshot is the Console's
   dark theme, and a light page around them reads as two products. */

:root {
  --bg: #0b1417;
  --bg-raised: #111d21;
  --bg-card: #14232a;
  --line: #22363d;
  --text: #e6eef0;
  --text-dim: #a3b4b9;
  --brand: #149ba7;
  --brand-hi: #3cc4cf;
  --brand-ink: #04191c;
  --radius: 14px;
  --wrap: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* Japanese needs a CJK face named before the Latin fallbacks, or Windows picks a
   Chinese glyph set for kanji. */
:lang(ja) {
  --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(ja) body { line-height: 1.8; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7fe0e8; }
:focus-visible { outline: 2px solid var(--brand-hi); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.92em; }
strong { color: #fff; font-weight: 650; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
@media (max-width: 380px) { .wrap { width: min(var(--wrap), 100% - 28px); } }

.skip {
  position: absolute; left: 12px; top: -48px; padding: 8px 14px;
  background: var(--brand); color: var(--brand-ink); border-radius: 8px; z-index: 20;
}
.skip:focus { top: 12px; }

/* ---- header ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(11 20 23 / 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px;
  letter-spacing: 0.01em; white-space: nowrap;
}
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav { display: flex; gap: 22px; margin-right: auto; }
.site-nav a { color: var(--text-dim); text-decoration: none; font-size: 15px; white-space: nowrap; }
.site-nav a:hover { color: var(--text); }
.header-end { display: flex; align-items: center; gap: 14px; }
.lang { font-size: 14px; color: var(--text-dim); white-space: nowrap; }
.lang a { color: var(--text-dim); text-decoration: none; }
.lang a:hover { color: var(--text); }
.lang [aria-current] { color: var(--text); font-weight: 600; }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header .wrap { justify-content: space-between; }
}
/* Below this the logo, language switch and a labelled button overflow a 390px phone. */
@media (max-width: 520px) {
  .site-header .wrap, .header-end { gap: 10px; }
  .header-end .btn-small { padding: 7px 9px; }
  .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---- buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #18adba; color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--bg-raised); }
.btn-ghost:hover { border-color: var(--brand); color: #fff; }
.btn-small { padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- hero ------------------------------------------------------------------ */

.hero {
  padding: 88px 0 40px;
  background:
    radial-gradient(1000px 480px at 50% -120px, rgb(20 155 167 / 0.28), transparent 70%),
    var(--bg);
  text-align: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 20px; padding: 5px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--text-dim); background: var(--bg-raised);
}
.hero h1 {
  margin: 0 auto; max-width: 16em;
  font-size: clamp(38px, 6.2vw, 68px); line-height: 1.08; letter-spacing: -0.025em;
  font-weight: 800;
}
:lang(ja) .hero h1 { letter-spacing: 0; line-height: 1.25; max-width: 13em; }
.hero h1 .accent { color: var(--brand-hi); }
/* Japanese has no spaces to break at; keep each phrase whole instead of splitting mid-word. */
.hero h1 .nb { display: inline-block; }
.lead {
  margin: 24px auto 0; max-width: 42em; font-size: clamp(17px, 1.9vw, 20px); color: var(--text-dim);
}
.hero .actions { justify-content: center; margin-top: 32px; }

.agents { margin: 44px auto 0; max-width: 60em; }
.agents p { margin: 0 0 12px; font-size: 14px; color: var(--text-dim); }
.agents ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.agents li {
  padding: 5px 13px; border-radius: 999px; font-size: 14px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
}

.shot {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-raised);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8);
}
.hero .shot {
  margin-top: 56px;
  box-shadow: 0 0 0 1px rgb(20 155 167 / 0.25), 0 40px 120px -40px rgb(20 155 167 / 0.45);
}
.shot a { display: block; }

/* ---- sections -------------------------------------------------------------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-raised); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  margin: 0 0 10px; font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-hi);
}
:lang(ja) .kicker { letter-spacing: 0.04em; }
h2 {
  margin: 0; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.18; letter-spacing: -0.015em;
}
:lang(ja) h2 { letter-spacing: 0; line-height: 1.35; }
.section-head p { margin: 16px 0 0; color: var(--text-dim); font-size: 18px; }
h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.35; }
h1, h2, h3 { text-wrap: balance; }
/* Break Japanese headings between phrases (Chromium); elsewhere they wrap per character. */
:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }

/* Three reasons, first thing below the hero. */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
  padding: 28px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.pillar p { margin: 0; color: var(--text-dim); }
.pillar .icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px;
  border-radius: 10px; background: rgb(20 155 167 / 0.16); color: var(--brand-hi);
}
.pillar .icon svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* A day: a timeline. */
.day { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.day li {
  position: relative; padding: 24px 24px 26px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.day time {
  display: block; margin-bottom: 10px;
  font-family: var(--mono); font-size: 14px; color: var(--brand-hi);
}
.day p { margin: 0; color: var(--text-dim); }
.day strong { display: block; margin-bottom: 6px; font-size: 18px; }
@media (max-width: 980px) { .day { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .day { grid-template-columns: 1fr; } }
.day time small { font-size: 12px; opacity: 0.8; }

/* Daytime and overnight rows. The night row is set apart by colour alone — same grid,
   same card — so the two read as one timeline rather than two features. */
.shift + .shift { margin-top: 36px; }
.shift-label {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-hi);
}
:lang(ja) .shift-label { letter-spacing: 0.04em; }
.shift-label svg { width: 18px; height: 18px; }
.night .shift-label { color: #aab4ff; }
.night .day li {
  background: linear-gradient(160deg, #161d3a, #10162c);
  border-color: #283159;
}
.night .day time { color: #aab4ff; }
.night .day p { color: #a7afcc; }

/* Feature rows: text beside a screenshot, alternating sides. */
.feature {
  display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center;
}
.feature + .feature { margin-top: 88px; }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .feature-text { order: 2; }
.feature-text p { margin: 12px 0 0; color: var(--text-dim); }
.feature-text ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--text-dim); }
.feature-text li + li { margin-top: 6px; }
@media (max-width: 900px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-text { order: 0; }
  .feature + .feature { margin-top: 64px; }
}

.minor { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 88px; }
.minor div {
  padding: 26px 28px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.minor p { margin: 0; color: var(--text-dim); }
@media (max-width: 760px) { .minor { grid-template-columns: 1fr; } }

/* A look around: a 2x2 gallery. */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 88px; }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 14px; color: var(--text-dim); font-size: 15px; }
.gallery figcaption strong { color: var(--text); }
.gallery .shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; width: 100%; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* Upstream changes: three numbered steps. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li {
  counter-increment: s; padding: 28px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
}
.steps p { margin: 0; color: var(--text-dim); }
.more { margin-top: 28px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Security: a two-column checklist. */
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 6px;
  background: rgb(20 155 167 / 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233cc4cf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.checks p { margin: 0; color: var(--text-dim); }
@media (max-width: 760px) { .checks { grid-template-columns: 1fr; } }

/* Editions. */
.editions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.edition {
  display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.edition.recommended { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.edition .tag {
  align-self: flex-start; margin-bottom: 14px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--brand); color: #fff;
}
.edition .tag.muted { background: var(--line); color: var(--text-dim); }
.edition h3 code { font-family: inherit; font-size: inherit; }
.edition p { margin: 0; color: var(--text-dim); font-size: 16px; }
@media (max-width: 1000px) { .editions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .editions { grid-template-columns: 1fr; } }

.try {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center;
  margin-top: 56px; padding: 36px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.try p { margin: 10px 0 0; color: var(--text-dim); }
.try pre {
  margin: 0; padding: 20px 22px; border-radius: 10px;
  /* Wrap rather than scroll: a clipped install URL reads as the whole command. */
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: #060d0f; border: 1px solid var(--line);
  font: 14px/1.7 var(--mono); color: #d7e6e9;
}
.try pre .c { color: #6f878d; }
@media (max-width: 900px) { .try { grid-template-columns: 1fr; padding: 26px; } }

/* Closing call to action, with the brand illustration. */
.closing { text-align: center; }
.closing img {
  margin: 0 auto 44px; border-radius: var(--radius); border: 1px solid var(--line);
  width: min(100%, 840px);
}
.closing .actions { justify-content: center; margin-top: 28px; }

/* ---- footer ---------------------------------------------------------------- */

.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 15px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer-grid nav a { color: var(--text-dim); text-decoration: none; }
.footer-grid nav a:hover { color: var(--text); }
.fine { margin: 28px 0 0; font-size: 13px; color: #71868c; max-width: 60em; }
.fine a { color: inherit; }

/* ---- lightbox (assets/lightbox.js) ---------------------------------------- */

.shot a[data-lightbox] { cursor: zoom-in; }
.lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--text); cursor: zoom-out;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(4 10 12 / 0.9); }
.lightbox figure { margin: 0; padding: 64px 20px 24px; display: grid; gap: 14px; justify-items: center; }
.lightbox img {
  max-width: min(96vw, 1800px); max-height: calc(100vh - 150px); width: auto; height: auto;
  border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.8);
}
.lightbox figcaption { max-width: 60em; color: var(--text-dim); font-size: 15px; text-align: center; }
.lightbox-close {
  position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-raised); color: var(--text);
  font: 28px/1 var(--font); cursor: pointer;
}
.lightbox-close:hover { border-color: var(--brand); }
html:has(.lightbox[open]) { overflow: hidden; }

/* ---- 404 ------------------------------------------------------------------- */

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 12px; }
.notfound p { color: var(--text-dim); margin: 0 0 8px; }
.notfound .actions { justify-content: center; margin-top: 28px; }
