:root {
  --screen: #14171d;
  --screen-2: #1d222b;
  --screen-line: rgba(255, 255, 255, 0.14);
  --ink: #1b1f27;
  --ink-2: #5b6270;
  --paper: #ffffff;
  --panel: #f6f7f9;
  --rule: #dde1e7;
  --accent: #4a90ea;
  --accent-btn: #1f67c4;
  --alert: #d98b0b;
  --body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --display: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* English is the default page (the site root); Japanese lives at /ja/. */
html[lang="en"] {
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[lang="en"] body { line-height: 1.65; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.dark :focus-visible { outline-color: var(--accent); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--ink); padding: 10px 16px; z-index: 10; font-weight: 700; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.35; margin: 0; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--panel); padding: 0.1em 0.4em; border-radius: 3px; }
pre { margin: 0 0 14px; padding: 12px 16px; background: var(--screen); color: #fff; border-radius: 4px; overflow-x: auto; font-size: 0.86rem; line-height: 1.6; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* ---------- dark areas ---------- */
.dark { background: var(--screen); color: #fff; }
.dark a { color: var(--accent); }
.dark code { background: rgba(255, 255, 255, 0.1); color: #fff; }

.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; flex-wrap: wrap; padding: 22px 0 18px; }
.brand { font-family: var(--display); font-weight: 900; font-size: 1.25rem; letter-spacing: 0.01em; text-decoration: none; color: #fff; }
.brand:hover { color: var(--accent); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }
.nav a { color: #fff; text-decoration: none; }
.nav a:hover { color: var(--accent); text-decoration: underline; }
.nav .lang a { border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 4px; padding: 1px 8px; }

/* The screen: a stand-in for any app window, with the overlay's caption on top */
.screen {
  position: relative;
  aspect-ratio: 16 / 7;
  min-height: 300px;
  border: 1px solid var(--screen-line);
  background:
    radial-gradient(70% 90% at 15% 10%, #1c2a3c 0%, transparent 70%),
    var(--screen-2);
  overflow: hidden;
}
.screen .win {
  position: absolute;
  border: 1px solid var(--screen-line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 6px;
}
.screen .w1 { left: 5%; top: 10%; width: 34%; height: 36%; }
.screen .w2 { left: 42%; top: 18%; width: 24%; height: 24%; }
.screen .w3 { right: 6%; top: 8%; width: 26%; height: 48%; }
.screen .w4 { left: 8%; top: 52%; width: 86%; height: 60%; border-radius: 8px 8px 0 0; }
.screen h1 {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 0.45em 0.9em 0.5em;
  background: rgba(8, 12, 16, 0.8);
  border-radius: 6px;
  text-align: center;
  font-size: clamp(1.45rem, 4.2vw, 3.1rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.screen h1 .src {
  display: block;
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.42em;
  letter-spacing: 0;
  color: #e8eaee;
  margin-bottom: 0.2em;
}
.screen h1 .seg { display: inline-block; }
.screen .plamo { position: absolute; right: 14px; bottom: 10px; font-size: 0.72rem; color: #9aa3b2; }

.hero-foot { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px 56px; align-items: start; padding: 32px 0 48px; }
.lead { font-size: 1.05rem; max-width: 44em; margin: 0 0 10px; }
.facts { margin: 0; padding: 0; list-style: none; font-size: 0.9rem; color: #9aa3b2; }
.facts li { display: inline; }
.facts li + li::before { content: "／"; margin: 0 0.4em; color: #6b7280; }
.dl { display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  padding: 12px 20px 11px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn small { font-family: var(--mono); font-weight: 400; font-size: 0.74rem; opacity: 0.85; margin-top: 3px; }
.dl .btn { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }
.dl .btn:hover { background: #1a5aab; border-color: #1a5aab; }
.dl .btn.alt { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.dl .btn.alt:hover { border-color: #fff; }
.fine { font-size: 0.85rem; color: #9aa3b2; margin: 0; }

/* ---------- body sections ---------- */
section { border-top: 1px solid var(--rule); padding: 44px 0 36px; }
.sec { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px 56px; }
.sec > h2 { position: sticky; top: 24px; align-self: start; }
.sec > h2::after { content: ""; display: block; width: 36px; height: 5px; background: var(--accent); margin-top: 12px; }
.sec-body > :last-child { margin-bottom: 0; }
.intro { max-width: 46em; }
.muted { color: var(--ink-2); font-size: 0.92rem; }

/* release list */
.releases { margin: 8px 0 24px; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.releases li { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.releases .os { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.releases .os span { display: block; font-family: var(--body); font-weight: 400; font-size: 0.82rem; color: var(--ink-2); }
.releases p { margin: 0; font-size: 0.92rem; }
.releases .file { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); }
.btn.solid { background: var(--ink); color: #fff; border-color: var(--ink); font-size: 0.95rem; padding: 10px 18px; white-space: nowrap; }
.btn.solid:hover { background: #2c333f; border-color: #2c333f; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--ink); font-size: 0.95rem; padding: 10px 18px; white-space: nowrap; }
.btn.quiet:hover { background: var(--panel); }

/* install steps as subtitle cues */
.cues { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: cue; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.cues li { counter-increment: cue; border-top: 2px solid var(--ink); padding: 12px 0 8px; }
.cues .tc { display: block; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2); line-height: 1.6; margin-bottom: 10px; }
.cues .tc::before { content: counter(cue); display: block; font-size: 0.9rem; color: var(--ink); }
.cues strong { display: block; font-family: var(--display); font-size: 1.15rem; line-height: 1.4; margin-bottom: 4px; }
.cues p { margin: 0; font-size: 0.92rem; }

/* warning */
.notice { border-left: 6px solid var(--alert); background: var(--panel); padding: 16px 20px; margin: 0 0 28px; }
.notice p { margin: 0 0 8px; font-size: 0.95rem; }
.notice p:last-child { margin: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.two > div > :last-child { margin-bottom: 0; }
ol.plain { margin: 0 0 16px; padding-left: 1.4em; }
ol.plain li, ul.plain li { margin: 0 0 6px; }
ul.plain { margin: 0 0 16px; padding-left: 1.2em; }

/* usage */
.block { padding: 20px 0; border-top: 1px solid var(--rule); }
.block:first-child { border-top: 0; padding-top: 0; }
.block p:last-child { margin-bottom: 0; }
figure { margin: 18px 0 0; }
figure img { border: 1px solid var(--rule); }
figcaption { font-size: 0.82rem; color: var(--ink-2); margin-top: 8px; }
.settings { margin: 0 0 20px; padding: 0; list-style: none; columns: 2; column-gap: 40px; font-size: 0.92rem; }
.settings li { break-inside: avoid; margin: 0 0 8px; padding-left: 14px; position: relative; }
.settings li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 6px; background: var(--accent); }
.settings strong { font-weight: 700; }

/* tables */
.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; border-top: 2px solid var(--ink); }
caption { caption-side: top; text-align: left; font-size: 0.82rem; color: var(--ink-2); padding: 0 0 6px; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 700; font-size: 0.82rem; color: var(--ink-2); }
tbody th { font-weight: 700; white-space: nowrap; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 2px solid var(--ink); }
.faq summary { cursor: pointer; padding: 14px 0 14px 28px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; position: absolute; left: 2px; top: 11px; font-family: var(--mono); font-size: 1.2rem; }
.faq details[open] summary::before { content: "−"; }
.faq summary:hover { background: var(--panel); }
.faq details p { margin: 0 0 16px 28px; font-size: 0.94rem; }

/* SHA details */
.sha { margin: 0 0 12px; }
.sha summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.sha summary:hover { text-decoration: underline; }
.sha p { font-size: 0.94rem; }

/* footer */
footer { padding: 28px 0 40px; border-top: 1px solid var(--screen-line); font-size: 0.86rem; color: #9aa3b2; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 20px; padding: 0; list-style: none; }
.foot-links a { color: #fff; }
footer p { margin: 0 0 8px; max-width: 80ch; }
footer .credit { color: #fff; font-family: var(--display); font-weight: 700; font-size: 1rem; }

@media (max-width: 900px) {
  .sec { grid-template-columns: 1fr; gap: 12px; }
  .sec > h2 { position: static; }
  .cues { grid-template-columns: 1fr; gap: 0; }
  .cues li { padding: 12px 0 18px; }
  .two { grid-template-columns: 1fr; }
  .settings { columns: 1; }
}
@media (max-width: 680px) {
  .hero-foot { grid-template-columns: 1fr; padding-bottom: 36px; }
  .screen { aspect-ratio: 4 / 3; min-height: 0; }
  .screen h1 { bottom: 8%; left: 12px; right: 12px; width: auto; max-width: none; transform: none; }
  .releases li { grid-template-columns: 1fr; gap: 4px; }
  .releases .btn { justify-self: start; margin-top: 6px; }
  section { padding: 34px 0 28px; }
  h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
@media print {
  .dark { background: #fff; color: #000; }
  .screen { display: none; }
  .nav, .skip { display: none; }
  a { color: #000; }
}
