/* familiar landing page */

:root {
  --bg: #08080a;
  --bg-alt: #0c0c0f;
  --surface: #111115;
  --surface-2: #16161b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #ededef;
  --text-dim: #a1a1aa;
  --text-faint: #80808a;
  --accent-rgb: 255 181 71;
  --accent: rgb(var(--accent-rgb));
  --accent-ink: #000;
  --accent-soft: rgb(var(--accent-rgb) / 0.12);
  --accent-line: rgb(var(--accent-rgb) / 0.35);
  --warn-rgb: 255 107 90;
  --warn: rgb(var(--warn-rgb));
  --warn-soft: rgb(var(--warn-rgb) / 0.1);
  --warn-line: rgb(var(--warn-rgb) / 0.35);
  --ok-rgb: 126 226 168;
  --ok: rgb(var(--ok-rgb));

  --font-sans: "Geist", "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--font-mono);
}

:not(pre) > code {
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  overflow-wrap: anywhere;
}

::selection {
  background: var(--accent);
  color: #000;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  color: #000;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 8px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.lang-switch a {
  padding: 3px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-dim);
  line-height: 1.6;
}

.lang-switch a[aria-current="true"] {
  background: var(--surface-2);
  color: var(--text);
}

.github-link {
  display: inline-flex;
  color: var(--text-dim);
  transition: color 0.15s;
}

.github-link:hover {
  color: var(--text);
}

/* ---------- common ---------- */

.section {
  padding: clamp(80px, 11vw, 140px) 0;
  border-top: 1px solid var(--line);
}

.section-alt {
  background: var(--bg-alt);
}

/* ページ末尾の CTA：読み終えた人を導入へ戻す */
.closing-inner {
  text-align: center;
}

.closing-cta {
  justify-content: center;
}

/* 英語の小見出し：セクションの名札なので、小さくしすぎず読める大きさにする */
.eyebrow {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0 0 24px;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.3;
  font-weight: 700;
  font-feature-settings: "palt";
  letter-spacing: 0.01em;
  /* 日本語の文節の切れ目で改行する（「起動しな / い。」のような語中の改行を防ぐ） */
  word-break: auto-phrase;
}

.section-lead {
  max-width: 680px;
  margin: 0 0 48px;
  color: var(--text-dim);
  font-size: 17px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  line-height: 1.5;
}

.badge-accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-primary {
  background: var(--text);
  color: #000;
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.copy-btn {
  flex: none;
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

.copy-btn.is-copied {
  color: var(--ok);
  border-color: rgb(var(--ok-rgb) / 0.4);
}

/* コピーに失敗したときは、コマンドを選択状態にして手動コピーを促す */
.copy-btn.is-failed {
  color: var(--accent);
  border-color: var(--accent);
}

/* コマンドは折り返さず、はみ出す分はコード欄の中で横スクロール。
   コピーボタンはコードと重ならないよう、横に並べる */
.code-block {
  display: flex;
  align-items: flex-start;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #050506;
}

.code-block pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 16px 12px 16px 18px;
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
}

.code-block .copy-btn {
  margin: 10px 10px 0 0;
}

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

.hero {
  position: relative;
  overflow: hidden;
  /* 表示できる高さが 700px 前後でも「使い始める」が最初の画面に入るよう、上の余白を詰める */
  padding: clamp(40px, 4vw, 56px) 0 clamp(64px, 7vw, 96px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.15;
  font-weight: 900;
  font-feature-settings: "palt";
  letter-spacing: 0.005em;
  word-break: keep-all;
}

.hero-title .line {
  display: block;
}

.nw {
  white-space: nowrap;
}

@media (min-width: 901px) {
  .hero-title .line {
    white-space: nowrap;
  }
}

/* 英語の見出しは日本語より横に長いので、行の中で折り返せるようにし、欧文の見出しとして字間を詰める。
   3 行になる分、ノート PC の画面でも「Get started」が最初に見えるよう、日本語版より小さくする */
.hero-title:lang(en) {
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero-title:lang(en) .line {
  white-space: normal;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  max-width: 560px;
  margin: 0 0 32px;
  font-size: 17px;
  color: var(--text-dim);
}

.hero-install {
  margin: 0 0 28px;
}

.code-line {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(5, 5, 6, 0.8);
}

.code-line .prompt {
  color: var(--accent);
  font-family: var(--font-mono);
}

/* 複数行のコマンド（1 行ずつ span で包む） */
.code-line-multi {
  align-items: flex-start;
}

.code-line-multi .prompt,
.code-line-multi code {
  font-size: 14px;
  line-height: 1.9;
}

.code-line-multi .prompt > span,
.code-line-multi code > span {
  display: block;
}

.install-check {
  max-width: 820px;
  margin: 0 0 32px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 15px;
}

.install-check-label {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgb(var(--ok-rgb) / 0.12);
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 12px;
}

.install-check a {
  color: var(--text);
}

.code-line code {
  padding: 0;
  border: 0;
  background: none;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 14px;
  scrollbar-width: none;
}

.hero-install-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

.hero-install-note a {
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* hero demo: a browser that the familiar drives */

.demo {
  margin: 0;
}

/* ユーザーからの依頼（チャットの吹き出し） */
.demo-request {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px 12px 12px 4px;
  background: var(--surface-2);
  width: fit-content;
  max-width: 100%;
}

.demo-request-who {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

.demo-request p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* 場面ごとの一言 */
.demo-narration {
  margin: 12px 0 0;
  min-height: 1.6em;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.demo-narration::before {
  content: "▸ ";
  color: var(--text-faint);
}

.browser {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0d0d10;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 30px 80px -20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.browser-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 10px 12px 0;
  font-size: 12px;
}

.browser-dots {
  display: inline-flex;
  gap: 6px;
  margin: 0 10px 10px 2px;
}

.browser-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a2a30;
}

.browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 46%;
  padding: 7px 14px;
  border-radius: 8px 8px 0 0;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s, color 0.2s;
}

.browser-tab.is-active {
  background: #18181d;
  color: var(--text);
}

/* the familiar's eyes: open (and lit) only while it works on this tab.
   固有のモチーフなので、タブ名の文字と釣り合う大きさにして実寸でも気付けるようにする */
.tab-eye {
  flex: none;
  width: 22px;
  height: 11px;
  opacity: 0.45;
  transform: scaleY(0.18);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.demo.is-working .tab-eye {
  opacity: 1;
  transform: none;
  animation: eye-glow 1.4s ease-in-out infinite;
}

@keyframes eye-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgb(var(--accent-rgb) / 0.9));
  }
  50% {
    filter: drop-shadow(0 0 1.5px rgb(var(--accent-rgb) / 0.4));
  }
}

/* 静かな印として繰り返す目（光らせない） */
.mini-eye {
  display: inline-block;
  width: 16px;
  height: 8px;
  margin-right: 8px;
  vertical-align: 1px;
}

.browser-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #18181d;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.url-lock {
  width: 8px;
  height: 9px;
  border-radius: 2px;
  background: var(--text-faint);
}

.url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-target {
  flex: none;
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  transition: opacity 0.2s;
}

/* 操作対象（tab 47）以外のタブを表示している間は隠す */
.url-target.is-away {
  opacity: 0;
}

.browser-page {
  position: relative;
  height: 268px;
  background: #f5f4f0;
  color: #1d1d21;
  font-size: 13px;
}

.page {
  position: absolute;
  inset: 0;
  padding: 20px 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.page.is-shown {
  opacity: 1;
  visibility: visible;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 15px;
}

.page-avatar {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1d1d21;
  color: #f5f4f0;
  font-size: 11px;
}

.form-field {
  display: block;
  margin-bottom: 12px;
}

.field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #6b6b74;
}

.field-input {
  display: block;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d6d4cc;
  border-radius: 6px;
  background: #fff;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-textarea {
  min-height: 58px;
}

/* the element the familiar is touching right now */
.form-field.is-target .field-input,
.form-submit.is-target {
  border-color: #e09a2b;
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.35);
}

.form-field.is-target .field-input > span::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -2px;
  background: #1d1d21;
  animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.form-submit {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #1d1d21;
  border-radius: 6px;
  background: #1d1d21;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  transition: transform 0.1s, box-shadow 0.15s;
}

.form-submit.is-pressed {
  transform: scale(0.95);
}

.toast {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #1d1d21;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast::before {
  content: "✓ ";
  color: var(--ok);
}

.toast.is-shown {
  opacity: 1;
  transform: none;
}

.mail-row {
  display: flex;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid #e3e1da;
}

.mail-row b {
  flex: none;
  width: 80px;
  font-weight: 600;
}

.mail-row span {
  color: #55555d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-b-note {
  margin: 14px 0 0;
  font-size: 11px;
  color: #8a8a92;
}

/* tool のログは補足として控えめに */
.demo-log {
  margin: 10px 0 0;
  padding: 10px 14px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 5, 6, 0.7);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
}

.demo-log li {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  opacity: 0.18;
  transition: opacity 0.25s;
}

.demo-log li.is-done {
  opacity: 1;
}

.log-tool {
  color: var(--accent);
}

.log-arg {
  color: var(--text-faint);
}

.log-out {
  color: var(--text-dim);
}

.demo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-faint);
}

.demo-replay {
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.demo-replay:hover {
  color: var(--text);
}

.demo-replay[hidden] {
  display: none;
}

/* ---------- different ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.feature-card {
  padding: 32px 28px 36px;
  background: var(--bg);
}

.feature-index {
  margin: 0 0 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-feature-settings: "palt";
}

.feature-card p:last-child {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

/* 使う場面：左に見出し、右に場面を縦に並べ、カードの枠ではなく線で区切る */
.usecases-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.usecases-head {
  position: sticky;
  top: 96px;
}

.usecases-head .section-title {
  margin-bottom: 0;
}

.usecase-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.usecase-list .feature-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: none;
}

.usecase-list .feature-card:last-child {
  border-bottom: 1px solid var(--line);
}

.usecase-list .feature-index {
  grid-row: span 2;
  margin: 4px 0 0;
}

.usecase-list .feature-card h3 {
  margin-bottom: 8px;
}

/* 違い：3 つの要点を大きめの文字で 1 行ずつ。名前を左、説明を右に */
.point-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 48px;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.point-list .feature-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.8fr) minmax(0, 1.2fr);
  column-gap: 24px;
  align-items: baseline;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: none;
}

.point-list .feature-card:last-child {
  border-bottom: 1px solid var(--line);
}

.point-list .feature-index {
  margin: 0;
}

.point-list .feature-card h3 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.35;
}

.compare {
  margin-top: 96px;
}

.compare-title {
  margin: 0 0 12px;
  font-size: 22px;
}

.compare-lead {
  max-width: 720px;
  margin: 0 0 32px;
  color: var(--text-dim);
}

.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}

.compare-table th,
.compare-table td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.compare-table thead a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.compare-table thead a:hover {
  text-decoration-color: var(--text);
}

.compare-table thead a::after {
  content: " ↗";
  color: var(--text-faint);
}

.compare-table tbody th {
  width: 120px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  white-space: nowrap;
}

.compare-table td {
  width: 22%;
  color: var(--text-dim);
}

/* familiar column */
.compare-table .is-self {
  background: rgb(var(--accent-rgb) / 0.06);
  color: var(--text);
}

.compare-table thead .is-self {
  color: var(--accent);
  box-shadow: inset 0 2px 0 var(--accent);
}

.compare-table code {
  white-space: nowrap;
}

.compare-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

.webdriver-note {
  margin-top: 32px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.webdriver-note h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.webdriver-note p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text-dim);
}

.webdriver-note p:last-child {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- capabilities ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}

.cap-card {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s;
}

.cap-card:hover {
  border-color: var(--line-strong);
}

.cap-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cap-card h3 {
  margin: 0;
  font-size: 16px;
}

.cap-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  line-height: 1.7;
}

.selectors {
  margin-top: 40px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.selectors-label {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-dim);
}

.selector-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selector-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selector-list code {
  align-self: flex-start;
}

.selector-list span {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- how ---------- */

.how-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.how-copy p:not(.eyebrow) {
  color: var(--text-dim);
}

.flow {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.flow-node {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}

.flow-node-accent {
  border-color: var(--accent-line);
  box-shadow: 0 0 40px -12px rgb(var(--accent-rgb) / 0.35);
}

.flow-label {
  font-weight: 600;
}

.flow-node-accent .flow-label {
  color: var(--accent);
}

.flow-sub {
  font-size: 13px;
  color: var(--text-faint);
  text-align: right;
}

.flow-edge {
  position: relative;
  padding: 10px 0 10px 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  min-height: 34px;
}

.flow-edge::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--accent-line), var(--line-strong));
}

/* ---------- details（できること・しくみの折りたたみ） ---------- */

.detail-block {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-block summary {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 20px 52px 20px 24px;
  cursor: pointer;
  list-style: none;
}

.detail-block summary::-webkit-details-marker {
  display: none;
}

.detail-block summary::after {
  content: "+";
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-mono);
  color: var(--text-faint);
  transition: transform 0.2s;
}

.detail-block[open] summary::after {
  transform: rotate(45deg);
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
}

.detail-sub {
  font-size: 14px;
  color: var(--text-dim);
}

.detail-body {
  padding: 0 24px 28px;
}

.detail-body .cap-grid {
  margin-top: 0;
}

.detail-body.how-inner {
  align-items: start;
}

/* ---------- install ---------- */

.tabs {
  margin-top: 48px;
}

.tab-list {
  display: none;
}

.js .tab-list {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.tab {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}

.tab[aria-selected="true"] {
  background: var(--text);
  color: #000;
}

.tab-panel {
  max-width: 820px;
  margin-bottom: 40px;
}

.js .tab-panel[hidden] {
  display: none;
}

.js .panel-title {
  display: none;
}

.panel-title {
  margin: 0 0 8px;
  font-size: 20px;
}

.tab-panel > p {
  color: var(--text-dim);
}

.client-list details {
  border-top: 1px solid var(--line);
}

.client-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.client-list summary,
.other-methods summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-list summary::-webkit-details-marker,
.other-methods summary::-webkit-details-marker {
  display: none;
}

.client-list summary::after,
.other-methods summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--text-faint);
  transition: transform 0.2s;
}

.client-list details[open] summary::after,
.other-methods[open] summary::after {
  transform: rotate(45deg);
}

.client-list details > :not(summary) {
  margin-top: 0;
}

.client-list details > p {
  color: var(--text-dim);
  font-size: 15px;
}

.client-list details[open] {
  padding-bottom: 20px;
}

.other-methods {
  max-width: 820px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.other-methods[open] {
  padding-bottom: 24px;
}

.other-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.other-grid h4 {
  margin: 0;
  font-size: 15px;
}

.other-grid p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- setup ---------- */

/* 初回の設定：カードの枠をやめ、左の大きな番号を縦の線でつなぐ */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  position: relative;
  padding: 0 0 clamp(40px, 5vw, 64px) clamp(64px, 8vw, 96px);
}

.step:last-child {
  padding-bottom: 0;
}

/* 番号どうしをつなぐ線（最後の手順の下には引かない） */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: clamp(19px, 2.2vw, 23px);
  top: 56px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--accent-line), var(--line));
}

.step-head {
  display: block;
  margin-bottom: 20px;
}

.step-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: clamp(40px, 4.4vw, 48px);
  height: clamp(40px, 4.4vw, 48px);
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1;
}

.step-head h3 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  font-feature-settings: "palt";
}

.step-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.step-body-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}

.step-text p {
  margin: 0 0 14px;
  color: var(--text-dim);
}

.menu-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.menu-path span {
  font-size: 13.5px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  line-height: 1.6;
}

.menu-path span + span::before {
  content: "→";
  margin-right: 8px;
  color: var(--text-faint);
}

.callout {
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
}

.callout strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.placeholder-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #050506;
}

.figure-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trouble {
  margin-top: 56px;
}

.trouble-title {
  margin: 0 0 20px;
  font-size: 20px;
}

.trouble-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.trouble-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trouble-error {
  margin: 0 0 12px;
}

.trouble-error code {
  color: var(--warn);
  border-color: var(--warn-line);
  background: var(--warn-soft);
}

.trouble-card p:last-child {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
}

/* 手順から移した「確認ダイアログが出ない」の対処。コマンドが長いので横幅いっぱいにする */
.trouble-card-wide {
  grid-column: 1 / -1;
}

.trouble-symptom {
  margin: 0 0 12px;
  font-weight: 600;
}

.trouble-card-wide > p:not(.trouble-symptom) {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- permissions & data ---------- */

/* 権限とデータ：枠のない段落。最初の項目は横幅いっぱい、残り 3 項目は横に並べる */
.resp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
}

.resp-card {
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

/* 要点の項目：枠や背景は付けず、左端の赤い線と見出しの色だけで示す */
.resp-card-strong {
  grid-column: 1 / -1;
  margin-bottom: 32px;
  padding: 4px 0 4px 20px;
  border-top: 0;
  border-left: 2px solid var(--warn);
}

.resp-card-strong h3 {
  color: var(--warn);
}

/* 見出しの下の一文がこのセクションの要点なので、本文より明るくする */
#permissions .section-lead {
  color: var(--text);
}

/* 末尾の自己責任の一文：大きさは本文と同じにし、文字色だけ明るくする */
.resp-final {
  margin: 32px 0 0;
  font-size: 15px;
  color: var(--text);
}

.resp-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.resp-card p,
.resp-card li {
  color: var(--text-dim);
  font-size: 15px;
}

.resp-card p:last-child {
  margin-bottom: 0;
}

.resp-card ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.resp-card a {
  color: var(--text);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px 24px;
}

/* 作者ブロック: 他の dominion525 OSS（cmd-eikana など）と同じ構成 */
.footer-author-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.footer-author-name img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-social a {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  opacity: 0.85;
  transition: background 0.15s, opacity 0.15s;
}

.footer-social a:hover {
  background: var(--surface-2);
  opacity: 1;
}

.footer-social img {
  width: 20px;
  height: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-meta {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
}

@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 印刷・PDF 保存では、まだスクロールしていない部分も表示する */
@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .demo.is-working .tab-eye,
  .form-field.is-target .field-input > span::after {
    animation: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .usecases-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .usecases-head {
    position: static;
  }
  .point-list .feature-card {
    grid-template-columns: 40px minmax(0, 1fr);
    row-gap: 8px;
    padding: 24px 0;
  }
  .point-list .feature-card > p:last-child {
    grid-column: 2;
  }
  /* ナビゲーションはヘッダーの 2 段目に回し、横スクロールで残す */
  html {
    scroll-padding-top: 116px;
  }
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    row-gap: 0;
    padding-top: 12px;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding: 10px 0 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  .header-actions {
    margin-left: auto;
  }
  .hero-inner,
  .how-inner,
  .step-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-grid,
  .cap-grid,
  .resp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .selector-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trouble-grid,
  .other-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .compare-table {
    min-width: 0;
  }
  .compare-table th,
  .compare-table td {
    padding: 14px;
  }
  .compare-table td {
    min-width: 200px;
  }
  .compare-table tbody th,
  .compare-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 96px;
    min-width: 96px;
    padding: 14px 10px;
    background: var(--surface);
    white-space: normal;
    /* 行見出しを「ブラウ / ザ」のように語の途中で折り返さない */
    word-break: auto-phrase;
    box-shadow: 1px 0 0 var(--line);
  }
  .selector-list {
    grid-template-columns: minmax(0, 1fr);
  }
  /* 狭い幅ではタブ名が欠けないよう、目を元の大きさに戻す */
  .tab-eye {
    width: 14px;
    height: 7px;
  }
  .js .tab-list {
    display: flex;
    border-radius: 12px;
  }
  .tab {
    flex: 1;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 13px;
  }
  .flow-node {
    flex-direction: column;
    gap: 2px;
  }
  .flow-sub {
    text-align: left;
  }
}
