:root {
  --bg: #f6f6f7;
  --panel: #ffffff;
  --text: #16181d;
  --muted: #5f6672;
  --line: #e3e5ea;
  --accent: #2563eb;
  --keep: #8c3f4c;
  --keep-wash: rgba(140, 63, 76, 0.08);
  --scratch: #3a4f72;
  --scratch-wash: rgba(58, 79, 114, 0.08);
  --code-bg: rgba(15, 23, 42, 0.055);
  --shadow: 0 24px 60px -20px rgba(22, 24, 29, 0.28), 0 2px 6px rgba(22, 24, 29, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181c;
    --panel: #1e2026;
    --text: #e8e9ec;
    --muted: #9ca2ad;
    --line: #2c2f37;
    --accent: #60a5fa;
    --keep: #d0808d;
    --keep-wash: rgba(208, 128, 141, 0.1);
    --scratch: #8ea6cf;
    --scratch-wash: rgba(142, 166, 207, 0.1);
    --code-bg: rgba(255, 255, 255, 0.07);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: 20px;
}

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

.site-header {
  padding-block: 18px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand img {
  width: 30px;
  height: 30px;
}

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

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

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

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

.hero {
  padding-block: 48px 72px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero h1 kbd {
  font-size: 0.8em;
}

.lead {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  opacity: 0.88;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.cta-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.cta-note + .cta-note {
  margin-top: 4px;
}

/* Screen recordings and screenshots. */

.shot {
  margin: 0;
}

.shot video,
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shot a {
  display: block;
}

.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* Columns in proportion to each recording's aspect ratio (edit 1280×1133,
   paste 1280×706), so both play at exactly the same height. */
.media-row {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1.81fr);
  align-items: start;
  gap: 32px;
  margin-top: 48px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 28px;
}

.gallery img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: top left;
}

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

section {
  padding-block: 64px;
}

.alt {
  background: var(--panel);
  border-block: 1px solid var(--line);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.4;
}

.section-lead {
  margin: 0 0 36px;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.feature .mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 3px;
  background: var(--scratch);
}

.feature:nth-child(even) .mark {
  background: var(--keep);
}

/* Keep / Scratch */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.lane {
  padding: 22px 24px;
  border-radius: 12px;
  border-left: 4px solid;
}

.lane h3 {
  margin: 0 0 6px;
}

.lane p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.lane-scratch {
  border-color: var(--scratch);
  background: var(--scratch-wash);
}

.lane-scratch h3 {
  color: var(--scratch);
}

.lane-keep {
  border-color: var(--keep);
  background: var(--keep-wash);
}

.lane-keep h3 {
  color: var(--keep);
}

/* keys */

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel);
  font-family: inherit;
  font-size: 0.86em;
  line-height: 1.5;
  white-space: nowrap;
}

/* FAQ */

details {
  border-bottom: 1px solid var(--line);
  padding-block: 14px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

code {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.92em;
}

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

.site-footer {
  padding-block: 36px 48px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer a {
  color: var(--muted);
}

/* ---------- prose pages (privacy) ---------- */

.prose {
  max-width: 720px;
  padding-block: 32px 64px;
}

.prose h1 {
  font-size: 1.9rem;
  line-height: 1.4;
  margin: 0 0 8px;
}

.prose h2 {
  font-size: 1.2rem;
  margin: 36px 0 8px;
}

.prose .updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

/* ---------- narrow ---------- */

@media (max-width: 820px) {
  .hero {
    padding-block: 24px 56px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .media-row,
  .gallery,
  .features {
    grid-template-columns: 1fr;
  }

  .site-header nav a.optional {
    display: none;
  }

  section {
    padding-block: 48px;
  }
}
