/* ─── tmux-real LP ─────────────────────────────────────────────────────── */
:root {
  --bg:       #07090b;
  --bg-2:     #0c1014;
  --bg-3:     #11161c;
  --fg:       #d4d8de;
  --fg-dim:   #8b94a0;
  --fg-mute:  #5c6470;
  --line:     rgba(255,255,255,.07);
  --line-2:   rgba(255,255,255,.12);
  --accent:        #a3e635;
  --accent-soft:   rgba(163,230,53,.14);
  --accent-glow:   rgba(163,230,53,.35);
  --warn:     #fbbf24;
  --alert:    #fb7185;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans-ja: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  --copy-sans: var(--sans);

  --pad-x: clamp(20px, 5vw, 88px);
}

html[lang="ja"] {
  --copy-sans: var(--sans-ja);
}

html[data-density="compact"] { --row-gap: 12px; --section-py: 96px; }
html[data-density="regular"] { --row-gap: 18px; --section-py: 132px; }
html[data-density="comfy"]   { --row-gap: 26px; --section-py: 168px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #07090b; }

a { color: inherit; text-decoration: none; }
code, kbd { font-family: var(--mono); }
kbd {
  font-family: var(--mono); font-size: .92em;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line-2);
  color: var(--fg);
}

.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

/* faint dot/grid backdrop */
.grid-bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(transparent 95%, var(--line) 95%) 0 0/100% 64px,
    linear-gradient(90deg, transparent 95%, var(--line) 95%) 0 0/64px 100%,
    var(--bg);
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 50%, transparent 100%);
}

/* CRT scanlines overlay */
.scan-overlay {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0,
    rgba(255,255,255,0) 2px,
    rgba(0,0,0,.18) 3px,
    rgba(0,0,0,.18) 3px
  );
  mix-blend-mode: multiply;
  opacity: .55;
}

/* ─── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(7,9,11,.92), rgba(7,9,11,.7));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-glyph { font-size: 18px; }
.brand-name  { font-weight: 600; letter-spacing: .02em; }
.brand-ver   { color: var(--fg-mute); font-size: 11px; padding-left: 8px; border-left: 1px solid var(--line-2); margin-left: 4px; }
.nav { display: flex; gap: 28px; align-items: center; font-size: 13px; }
.nav a { color: var(--fg-dim); }
.nav a:hover { color: var(--fg); }
.nav-cta {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  font-weight: 500;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(48px, 7vw, 96px) var(--pad-x) clamp(72px, 9vw, 128px);
}
.hero-shell {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-left {
  flex: 1 1 0;
  min-width: 0;
}
.hero-right {
  flex: 0 0 min(920px, 46vw);
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
}
@media (max-width: 760px) {
  .hero-shell { flex-direction: column; }
  .hero-right { flex-basis: auto; }
}

.boot-banner {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  margin-bottom: 28px;
  background: rgba(255,255,255,.02);
  color: var(--fg-dim);
}
.boot-dot { color: var(--fg-mute); }
.boot-dim { color: var(--fg-mute); }

.title {
  font-family: var(--mono);
  font-size: clamp(48px, 7.4vw, 104px);
  line-height: .96;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 24px;
  color: #f1f4f8;
}
.title-accent {
  font-style: italic;
  position: relative;
  font-weight: 700;
}
.title-accent::after {
  content: "";
  position: absolute; left: -2px; right: -4px; bottom: -4px;
  height: 2px; background: var(--accent); opacity: .5;
}

.sub {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: 56ch;
  margin: 0 0 32px;
}
.sub em { color: var(--fg); font-style: italic; }
.sub code { background: rgba(255,255,255,.05); padding: 1px 6px; border-radius: 4px; color: var(--fg); }

.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 36px; }
.cta-primary {
  display: inline-flex; align-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: #07090b;
  padding: 14px 22px;
  border-radius: 8px;
  letter-spacing: 0;
  transition: transform .12s ease;
}
.cta-primary:hover { transform: translateY(-1px); }
.cta-secondary { font-size: 13px; color: var(--fg-dim); border-bottom: 1px dashed var(--line-2); padding-bottom: 2px; }
.cta-secondary:hover { color: var(--fg); border-color: var(--fg-dim); }

.hero-stats {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.hero-stats b { font-size: clamp(28px, 3vw, 38px); font-weight: 600; line-height: 1; }
.hero-stats span { color: var(--fg-mute); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }

.hero-caption { font-size: 11.5px; color: var(--fg-mute); text-align: right; padding-right: 4px; }
.hero-caption kbd { font-size: 10.5px; }

/* ─── Terminal ────────────────────────────────────────────────────────── */
.term {
  position: relative;
  background: linear-gradient(180deg, #0a0d11, #06080a);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 30px 80px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.02);
  font-size: 12.5px;
  min-height: 520px;
  display: flex; flex-direction: column;
}
.term[data-scan="on"]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.18) 2px 3px);
  opacity: .35;
}

.term-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #14191f, #0e1217);
  border-bottom: 1px solid var(--line-2);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.term-title { color: var(--fg-mute); font-size: 11.5px; margin-left: 12px; }
.term-meta  { margin-left: auto; font-size: 11px; letter-spacing: .04em; }

.term-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 0;
  position: relative;
}
.term-stream {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 18px 18px 14px;
  display: flex; flex-direction: column; gap: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent;
}
.term-stream::-webkit-scrollbar { width: 6px; }
.term-stream::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.ln {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg);
}
.ln.ok    { color: #b3f0a9; }
.ln.dim   { color: var(--fg-mute); }
.ln.warn  { color: var(--warn); }
.ln.alert { color: var(--alert); }
.ln .psn  { font-weight: 600; }
.ln .psd  { color: var(--fg-mute); }
.ln .pst  { font-weight: 600; }
.ln .cmd  { color: #f1f4f8; }
.caret {
  display: inline-block; width: 8px; height: 14px; vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.banner {
  border: 1px solid;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.5;
  margin: 6px 0;
  word-break: break-word;
}

/* HUD */
.hud {
  border-top: 1px solid var(--line-2);
  padding: 14px 18px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent),
    var(--accent-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.hud.posting { background: rgba(251,113,133,.08); }
.hud-label { font-size: 11.5px; letter-spacing: .03em; }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hud-digits {
  font-family: var(--mono);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hud-digits .colon { animation: blink 1s steps(2) infinite; opacity: .7; }
.hud-actions { display: flex; gap: 8px; }
.hud-btn {
  appearance: none;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  transition: all .14s ease;
}
.hud-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
.hud-btn.skip:hover { border-color: var(--accent); color: var(--accent); }
.hud-btn.stop:hover { border-color: var(--alert); color: var(--alert); }
.hud-btn kbd { background: transparent; border: 0; padding: 0; color: inherit; font-size: 11.5px; }

.hud-bar {
  height: 3px;
  background: rgba(255,255,255,.06);
  border-radius: 2px;
  overflow: hidden;
}
.hud-bar-fill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  will-change: transform;
  transition: transform .06s linear, background .2s, box-shadow .2s;
  border-radius: 2px;
}

.hud-spinner { display: flex; gap: 4px; padding: 4px 0; }
.hud-spinner span {
  display: inline-block; width: 8px; height: 16px;
  background: var(--alert); border-radius: 2px;
  animation: spin 1.2s ease-in-out infinite;
}
.hud-spinner span:nth-child(2) { animation-delay: .12s; }
.hud-spinner span:nth-child(3) { animation-delay: .24s; }
.hud-spinner span:nth-child(4) { animation-delay: .36s; }
.hud-spinner span:nth-child(5) { animation-delay: .48s; }
@keyframes spin {
  0%, 80%, 100% { transform: scaleY(.5); opacity: .5; }
  40%           { transform: scaleY(1);  opacity: 1; }
}

/* ─── Section heads ───────────────────────────────────────────────────── */
.section-head { padding: 0 0 48px; max-width: 720px; }
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: lowercase;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--mono);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: #f1f4f8;
}
.section-head .lede {
  color: var(--fg-dim);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.65;
  margin: 0;
  max-width: 60ch;
}

/* ─── How it works ────────────────────────────────────────────────────── */
.hiw {
  padding: var(--section-py) var(--pad-x);
  border-top: 1px solid var(--line);
}
.hiw-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
@media (max-width: 1100px) { .hiw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .hiw-grid { grid-template-columns: 1fr; } }

.hiw-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 22px 22px 26px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 260px;
  transition: transform .18s ease, border-color .18s ease;
}
.hiw-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); }
.hiw-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.hiw-num   { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; }
.hiw-glyph { font-size: 22px; }
.hiw-title { font-size: 17px; font-weight: 600; color: #f1f4f8; }
.hiw-sub   { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.hiw-body  { color: var(--fg-dim); font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
.hiw-arrow {
  position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  font-size: 20px; z-index: 2;
  background: var(--bg); padding: 0 4px;
}
@media (max-width: 1100px) {
  .hiw-arrow:nth-of-type(2n) { display: none; }
}
@media (max-width: 600px) { .hiw-arrow { display: none; } }

.state-rail {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px dashed var(--line-2);
  display: flex; flex-direction: column; gap: 18px;
  align-items: center;
}
.rail-label { font-family: var(--mono); font-size: 11.5px; color: var(--fg-mute); letter-spacing: .08em; text-transform: uppercase; }
.rail-track {
  display: flex; align-items: center; gap: 0;
  flex-wrap: wrap; justify-content: center;
}
.rail-node {
  font-family: var(--mono); font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-dim);
}
.rail-node.rail-active { font-weight: 600; }
.rail-edge { display: inline-block; width: 36px; height: 1px; margin: 0 4px; }

/* ─── Commands strip ──────────────────────────────────────────────────── */
.cmds { padding: var(--section-py) var(--pad-x); border-top: 1px solid var(--line); }
.cmds .kicker { margin-bottom: 28px; }
.cmds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
}
.cmd-pill {
  background: var(--bg-2);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: background .14s ease;
}
.cmd-pill:hover { background: var(--bg-3); }
.cmd-pill-c { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.cmd-pill-d { color: var(--fg-dim); font-size: 12.5px; line-height: 1.55; }

/* ─── Install ─────────────────────────────────────────────────────────── */
.install { padding: var(--section-py) var(--pad-x); border-top: 1px solid var(--line); }
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}
@media (max-width: 980px) { .install-grid { grid-template-columns: 1fr; } }
.install-step {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.step-n { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.step-h { font-size: 15px; color: #f1f4f8; font-weight: 500; }
.step-h code { background: rgba(255,255,255,.05); padding: 1px 6px; border-radius: 4px; font-size: .92em; }

.cmd-block {
  position: relative;
  background: #06080a;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .14s ease;
}
.cmd-block:hover { border-color: var(--line-2); }
.cmd-line { display: flex; gap: 4px; align-items: baseline; padding-right: 56px; }
.cmd-prompt { font-weight: 600; }
.cmd-code { color: var(--fg); word-break: break-all; }
.copy-btn {
  position: absolute; right: 8px; top: 8px;
  appearance: none; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.04); color: var(--fg-dim);
  font-family: var(--mono); font-size: 10.5px;
  padding: 3px 8px; border-radius: 4px;
  cursor: pointer;
}
.cmd-block:hover .copy-btn { color: var(--fg); }
.cmd-note { color: var(--fg-mute); font-size: 11px; margin-top: 8px; }

.config { border-top: 1px dashed var(--line-2); padding-top: 36px; }
.config-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.config-h .kicker { margin-bottom: 0; }
.config-h > span:last-child { color: var(--fg-mute); font-size: 12px; }
.config-h code { background: rgba(255,255,255,.05); padding: 1px 6px; border-radius: 4px; }

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
@media (max-width: 700px) { .config-grid { grid-template-columns: 1fr; } }
.cfg-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  padding: 12px 16px;
  font-family: var(--mono); font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.cfg-k { color: var(--fg); font-weight: 500; }
.cfg-eq { font-weight: 600; }
.cfg-v { color: var(--fg-dim); word-break: break-all; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.foot {
  padding: 36px var(--pad-x);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 12px;
  color: var(--fg-dim);
}
.foot-l { display: flex; align-items: center; gap: 10px; }
.foot-dim { color: var(--fg-mute); }

html[lang="ja"] .brand-name,
html[lang="ja"] .nav,
html[lang="ja"] .boot-banner,
html[lang="ja"] .title,
html[lang="ja"] .sub,
html[lang="ja"] .cta-secondary,
html[lang="ja"] .hero-stats span,
html[lang="ja"] .section-head h2,
html[lang="ja"] .section-head .lede,
html[lang="ja"] .hiw-title,
html[lang="ja"] .hiw-sub,
html[lang="ja"] .hiw-body,
html[lang="ja"] .cmd-pill-d,
html[lang="ja"] .step-h,
html[lang="ja"] .config-h > span:last-child,
html[lang="ja"] .foot,
html[lang="ja"] .foot-dim {
  font-family: var(--copy-sans);
}

html[lang="ja"] .title {
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

html[lang="ja"] .sub {
  max-width: 72ch;
}
