:root {
  color-scheme: light;
  --background: #f5f7fa;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-subtle: #eef2f6;
  --dark: #08172a;
  --dark-surface: #0d2036;
  --dark-text: #dbe9f5;
  --dark-subtle: #9ab0c4;
  --accent: #0dc99b;
  --accent-blue: #5865f2;
  --accent-warning: #b45309;
  --text: #111827;
  --text-body: #344054;
  --text-muted: #475467;
  --text-soft: #667085;
  --border: #d0d5dd;
  --border-subtle: #e4e7ec;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --focus: #1d4ed8;
  --max-width: 1180px;
  --content-width: 920px;
  font-family:
    "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-strong);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button {
  font: inherit;
}

p {
  margin: 0;
  color: var(--text-body);
  font-size: 1.03rem;
  line-height: 1.72;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.22;
}

h1 {
  max-width: 820px;
  font-size: 3rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.08rem;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 10;
  transform: translateY(-140%);
  border-radius: 8px;
  background: var(--text);
  color: #ffffff;
  padding: 10px 12px;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(245, 247, 250, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
}

.site-nav,
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a,
.footer-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-subtle);
  color: var(--text);
}

.site-nav a.nav-cta {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding-right: 15px;
  padding-left: 15px;
}

.site-nav a.nav-cta:hover {
  background: var(--primary-strong);
  color: #ffffff;
}

.hero,
.subpage-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}

.marketing-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--background) 100%);
}

.page-section {
  border-bottom: 1px solid var(--border-subtle);
}

.page-section.muted {
  background: #eef2f6;
}

.section-inner {
  display: grid;
  gap: 32px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 24px;
}

.marketing-page .section-inner {
  max-width: var(--max-width);
}

.marketing-page .section-header {
  max-width: 820px;
}

.hero-inner {
  padding-top: 72px;
  padding-bottom: 72px;
}

.marketing-page .hero-inner {
  grid-template-columns: minmax(0, 0.86fr) minmax(500px, 1.14fr);
  align-items: center;
  gap: 56px;
}

.marketing-page .hero-copy {
  container-type: inline-size;
  max-width: none;
}

.subpage-inner {
  padding-top: 56px;
}

.compact-section {
  gap: 28px;
}

.split-section {
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy,
.section-header {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.marketing-hero h1 {
  max-width: none;
  font-size: 1.8rem;
  font-size: clamp(1.55rem, 10cqw, 3.25rem);
  line-height: 1.08;
  white-space: nowrap;
}

.hero-title-accent {
  color: var(--primary);
}

.marketing-hero .lead {
  max-width: 560px;
}

.hero-statement {
  color: var(--text);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
}

.lead {
  max-width: 720px;
  font-size: 1.13rem;
}

.section-kicker {
  display: inline-flex;
  width: fit-content;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 15px;
  text-decoration: none;
}

.button-link.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.button-link.primary:hover {
  background: var(--primary-strong);
  color: #ffffff;
}

.button-link:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.hero-visual,
.content-visual {
  overflow: hidden;
  margin: 0;
}

.hero-visual {
  max-width: 860px;
}

.marketing-hero .hero-visual {
  display: grid;
  gap: 10px;
  max-width: none;
}

.visual-caption {
  color: var(--text-muted);
  font-size: 0.83rem;
  text-align: center;
}

.content-visual {
  max-width: 820px;
}

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

.step-card,
.source-item {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

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

.problem-card,
.feature-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.problem-marker {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 8px;
}

.problem-card p,
.feature-card p {
  font-size: 0.96rem;
}

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

.dark-section .section-header h2,
.dark-section .section-header p {
  color: var(--dark-text);
}

.dark-section .section-kicker {
  color: var(--dark-subtle);
}

.dark-section .step-card,
.dark-section .feature-card {
  border-color: rgba(255, 255, 255, 0.09);
  background: var(--dark-surface);
}

.dark-section .step-card h3,
.dark-section .feature-card h3 {
  color: var(--dark-text);
}

.dark-section .step-card p,
.dark-section .feature-card p {
  color: var(--dark-subtle);
}

.dark-section .step-number,
.feature-check {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(13, 201, 155, 0.12);
  color: var(--accent);
  font-weight: 700;
}

.tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
}

.tab-button {
  min-height: 40px;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dark-subtle);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
}

.tab-button.active {
  background: var(--accent);
  color: #031a10;
}

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

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

.audience-section .feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.local-inner {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.76fr);
  align-items: center;
}

.marketing-page .split-section {
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr);
  align-items: start;
}

.marketing-page .split-section .section-actions {
  grid-column: 1 / -1;
}

.terminal-panel {
  display: grid;
  gap: 10px;
}

.terminal-code strong {
  color: #ffffff;
  font-weight: 600;
}

.terminal-step {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
}

.terminal-window + .terminal-step {
  margin-top: 8px;
}

.terminal-window {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: var(--dark);
  box-shadow: 0 16px 36px rgba(8, 23, 42, 0.12);
}

.terminal-titlebar {
  display: flex;
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.76);
  color: #94a3b8;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 0 16px;
}

.window-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.window-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  opacity: 0.74;
}

.window-dot.close {
  background: #ef4444;
}

.window-dot.minimize {
  background: #f59e0b;
}

.window-dot.maximize {
  background: #10b981;
}

.terminal-code {
  margin: 0;
  overflow-wrap: anywhere;
  background: transparent;
  color: #b7f1df;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 16px 18px;
  white-space: pre-wrap;
}

.terminal-code code {
  display: grid;
  gap: 4px;
  font: inherit;
}

.terminal-comment {
  color: #78b49f;
}

.terminal-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #ecfdf5;
}

.terminal-line span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.terminal-prompt {
  color: #5eead4;
  font-weight: 800;
  user-select: none;
}

.step-number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-strong);
  font-weight: 700;
}

.source-item span,
.comparison-row span {
  color: var(--text-muted);
}

.source-item strong {
  color: var(--text);
  font-size: 1.03rem;
  line-height: 1.35;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.summary-row strong {
  color: var(--text);
}

.summary-row span {
  color: var(--text-body);
}

.comparison-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
}

.comparison-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1.2fr;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding: 14px;
}

.comparison-row:first-child {
  border-top: 0;
}

.comparison-row.heading {
  background: var(--surface-muted);
  font-weight: 600;
}

.faq-list {
  display: grid;
  border-top: 1px solid var(--border-subtle);
}

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

.faq-question {
  display: grid;
  min-height: 56px;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  list-style: none;
  padding: 16px 18px;
}

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

.faq-question::after {
  content: "+";
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--primary-strong);
  font-weight: 700;
}

.faq-item[open] .faq-question::after {
  content: "-";
  background: rgba(15, 118, 110, 0.08);
}

.faq-answer {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.final-cta {
  background: var(--text);
  color: #ffffff;
}

.final-cta .section-header h2,
.final-cta .section-header p,
.final-cta .section-kicker {
  color: #ffffff;
}

.final-cta .hero-title-accent {
  color: var(--accent);
}

.final-cta .button-link {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.final-cta .button-link.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--text);
}

.site-footer {
  background: var(--surface);
}

.footer-inner {
  color: var(--text-soft);
  font-size: 0.92rem;
  padding-top: 28px;
  padding-bottom: 28px;
}

@media (max-width: 900px) {
  h1 {
    font-size: 2.55rem;
  }

  .hero-statement {
    font-size: 1.65rem;
  }

  .header-inner {
    align-items: center;
    flex-direction: row;
  }

  .site-nav {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: visible;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .step-grid,
  .source-grid,
  .problem-grid,
  .feature-grid,
  .local-inner,
  .marketing-page .hero-inner,
  .marketing-page .split-section,
  .audience-section .feature-grid {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2.15rem;
  }

  h2 {
    font-size: 1.68rem;
  }

  .hero-statement {
    font-size: 1.36rem;
  }

  .header-inner,
  .footer-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .section-inner {
    gap: 24px;
    padding: 48px 16px;
  }

  .hero-inner,
  .subpage-inner {
    padding-top: 32px;
  }

  .lead {
    font-size: 1.03rem;
  }

  .button-link {
    width: 100%;
  }

  .tabs {
    width: 100%;
  }

  .tab-button {
    flex: 1;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
