:root {
  --bg: #ffffff;
  --surface: #f6f6f5;
  --ink: #18191b;
  --ink-muted: #5c5e64;
  --ink-subtle: #6b6e75;
  --line: #e5e5e3;
  --accent: #c54314;
  --accent-hover: #a83810;
  --accent-ink: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.84);
  --shot-shadow: 0 24px 64px -20px rgba(24, 25, 27, 0.14), 0 4px 16px -4px rgba(24, 25, 27, 0.08), 0 0 0 1px rgba(24, 25, 27, 0.07);
  --icon-shadow: 0 10px 24px -8px rgba(24, 25, 27, 0.22), 0 2px 6px rgba(24, 25, 27, 0.08);
  --kbd-bg: #f6f6f5;
  --highlight-col: rgba(223, 81, 28, 0.045);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --surface: #18191c;
    --ink: #f3f3f2;
    --ink-muted: #989ba2;
    --ink-subtle: #8b8e96;
    --line: #26282d;
    --accent: #ef622e;
    --accent-hover: #f57343;
    --accent-ink: #18191b;
    --header-bg: rgba(17, 18, 20, 0.84);
    --shot-shadow: 0 28px 72px -18px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --icon-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.62);
    --kbd-bg: #18191c;
    --highlight-col: rgba(239, 98, 46, 0.08);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111214;
  --surface: #18191c;
  --ink: #f3f3f2;
  --ink-muted: #989ba2;
  --ink-subtle: #8b8e96;
  --line: #26282d;
  --accent: #ef622e;
  --accent-hover: #f57343;
  --accent-ink: #18191b;
  --header-bg: rgba(17, 18, 20, 0.84);
  --shot-shadow: 0 28px 72px -18px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --icon-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.62);
  --kbd-bg: #18191c;
  --highlight-col: rgba(239, 98, 46, 0.08);
  color-scheme: dark;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

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

a {
  color: inherit;
  text-decoration: none;
}

p a,
li a,
.faq-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color 180ms var(--ease), text-decoration-color 180ms var(--ease);
}

p a:hover,
li a:hover,
.faq-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

a.author-link {
  color: var(--ink);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

a.author-link:hover {
  color: var(--accent);
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
}

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

.wrap,
.wrap-wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: 24px;
}

.wrap {
  max-width: 980px;
}

.wrap-wide {
  max-width: 1080px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--ink-muted);
  transition: color 180ms var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  font-weight: 550;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-sun,
.shot-dark {
  display: none;
}

.icon-moon,
.shot-light {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun,
  :root:not([data-theme="light"]) .shot-dark {
    display: block;
  }
  :root:not([data-theme="light"]) .icon-moon,
  :root:not([data-theme="light"]) .shot-light {
    display: none;
  }
}

:root[data-theme="dark"] .icon-sun,
:root[data-theme="dark"] .shot-dark {
  display: block;
}

:root[data-theme="dark"] .icon-moon,
:root[data-theme="dark"] .shot-light {
  display: none;
}

.menu-toggle {
  display: none;
}

.mobile-drawer {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  padding: 12px 24px 18px;
  gap: 4px;
}

.mobile-drawer-inner a {
  padding: 9px 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  transition: color 180ms var(--ease);
}

.mobile-drawer-inner a:last-child {
  border-bottom: 0;
}

.mobile-drawer-inner a[aria-current="page"],
.mobile-drawer-inner a:hover {
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 72px 0 88px;
  text-align: center;
}

.hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 15px;
  box-shadow: var(--icon-shadow);
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 16ch;
  font-size: clamp(2.35rem, 5.2vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.036em;
  line-height: 1.07;
  color: var(--ink);
}

.hero-lead {
  margin: 0 auto 30px;
  max-width: 54ch;
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

p a.btn,
p a.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary,
p a.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover,
p a.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.cta-row {
  margin: 16px 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

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

.text-link svg {
  transition: transform 180ms var(--ease);
}

.text-link:hover svg {
  transform: translateX(2px);
}

.hero-meta {
  margin: 0 0 52px;
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  letter-spacing: 0.005em;
}

.hero-shot {
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shot-shadow);
  background: var(--surface);
}

.shot-light,
.shot-dark {
  width: 100%;
}

/* Sections */
.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.section-surface {
  background: var(--surface);
}

.section-header {
  max-width: 60ch;
  margin-bottom: 44px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  font-weight: 620;
  letter-spacing: -0.028em;
  line-height: 1.18;
  color: var(--ink);
}

.section-header p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-muted);
}

/* 4-part Feature Rhythm (hairlines, open whitespace, no nested boxes) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  row-gap: 44px;
}

.feature-item {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.feature-item h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.feature-item p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--ink-muted);
}

/* 4-column Minimal Spec Strip */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-cell {
  padding: 28px 24px 28px 0;
  border-right: 1px solid var(--line);
}

.spec-cell + .spec-cell {
  padding-left: 24px;
}

.spec-cell:last-child {
  border-right: 0;
  padding-right: 0;
}

.spec-value {
  display: block;
  margin-bottom: 6px;
  font-size: 1.75rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.spec-label {
  display: block;
  font-size: 0.875rem;
  line-height: 1.48;
  color: var(--ink-muted);
}

/* 2-column Hairline Split */
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
}

.split-col {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.split-col h2,
.split-col h3 {
  margin: 0 0 10px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.split-col p {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.split-col p:last-child {
  margin-bottom: 0;
}

.format-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.format-list strong {
  color: var(--ink);
  font-weight: 550;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
  font-variant-numeric: tabular-nums;
}

.plain-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.plain-list li {
  margin-bottom: 8px;
}

.plain-list li:last-child {
  margin-bottom: 0;
}

/* FAQ Disclosure */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
  transition: color 180ms var(--ease);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-subtle);
  transition: transform 200ms var(--ease), color 180ms var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-body {
  padding: 0 36px 22px 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 68ch;
}

.section-foot {
  margin-top: 24px;
}

/* Subpage Header */
.page-head {
  padding: 60px 0 48px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

.breadcrumbs a {
  color: var(--ink-muted);
  transition: color 180ms var(--ease);
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.page-head h1 {
  margin: 0 0 14px;
  max-width: 22ch;
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  font-weight: 650;
  letter-spacing: -0.032em;
  line-height: 1.1;
  color: var(--ink);
}

.page-head .lead {
  margin: 0;
  max-width: 60ch;
  font-size: 1.0625rem;
  color: var(--ink-muted);
}

/* Tables (Compare & Shortcuts) */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
  min-width: 780px;
}

.compare-table {
  min-width: 1680px;
}

.compare-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 168px;
  border-right: 1px solid var(--line);
}

.compare-table thead th:first-child {
  z-index: 3;
  background: var(--surface);
}

.compare-table tbody th:first-child {
  background: var(--bg);
}

.table-meta {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.data-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

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

.data-table thead th {
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  white-space: nowrap;
}

.data-table tbody th {
  font-weight: 550;
  color: var(--ink);
}

.data-table td {
  color: var(--ink-muted);
}

.data-table .col-sonokeep {
  background: var(--highlight-col);
  color: var(--ink);
  font-weight: 500;
}

.data-table thead th.col-sonokeep,
.compare-table th.col-sonokeep {
  background: var(--highlight-col);
  color: var(--ink);
  font-weight: 650;
}

/* Shortcuts list */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  border-top: 1px solid var(--line);
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.shortcut-row span {
  color: var(--ink);
}

.kbd-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  background-color: var(--kbd-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 1px 5px;
  border-radius: 4px;
  background-color: var(--surface);
  border: 1px solid var(--line);
}

/* Subtle 3-column grid for subpages */
.three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 40px;
}

.three-item {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.three-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.three-item p {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

.footer-links a {
  color: var(--ink-muted);
  transition: color 180ms var(--ease);
}

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

/* Subtle scroll motion (never hides content at opacity 0) */
.reveal {
  opacity: 1;
}

.js-reveal .reveal.is-below {
  transform: translateY(8px);
  transition: transform 240ms var(--ease);
}

.js-reveal .reveal.is-visible {
  transform: translateY(0);
  transition: transform 240ms var(--ease);
}

/* Responsive */
@media (min-width: 681px) {
  .mobile-drawer,
  .mobile-drawer.is-open {
    display: none;
  }
}
@media (max-width: 860px) {
  .spec-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-cell {
    padding: 22px 18px 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .spec-cell + .spec-cell {
    padding-left: 0;
  }

  .spec-cell:nth-child(odd) {
    padding-right: 24px;
    border-right: 1px solid var(--line);
  }

  .spec-cell:nth-child(even) {
    padding-left: 24px;
  }

  .spec-cell:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .three-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    padding: 52px 0 64px;
  }

  .hero-meta {
    margin-bottom: 36px;
  }

  .section {
    padding: 56px 0;
  }

  .feature-grid,
  .split-grid,
  .shortcut-grid,
  .three-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .shortcut-grid {
    gap: 0;
  }

  .spec-strip {
    grid-template-columns: 1fr;
  }

  .spec-cell,
  .spec-cell:nth-child(odd),
  .spec-cell:nth-child(even) {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .spec-cell:last-child {
    border-bottom: 0;
  }

  .faq-body {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body,
  .site-header,
  .btn,
  .icon-btn,
  .text-link,
  .text-link svg,
  .faq-item summary,
  .faq-item summary::after,
  .js-reveal .reveal,
  .js-reveal .reveal.is-below,
  .js-reveal .reveal.is-visible {
    transition: none;
  }

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

  .btn:hover,
  .btn:active,
  .icon-btn:active,
  .text-link:hover svg {
    transform: none;
  }
}
