:root {
  --bg: #f8f9fa;
  --bg-elevated: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --border: #e5e7eb;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-content-width: 1080px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #fbfcfd 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

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

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.container {
  margin: 0 auto;
  max-width: var(--max-content-width);
  padding: 0 1rem;
}

.site-header {
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-header__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: space-between;
  min-height: 70px;
}

.wordmark {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 700;
}

.top-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.top-nav__list {
  display: flex;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-nav__list a,
.top-nav__list span {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.93rem;
  padding: 0.35rem 0.72rem;
}

.top-nav__list a:hover {
  border-color: var(--border);
}

.nav-future {
  background: #f1f5f9;
  color: var(--text-muted);
}

.lang-switch {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 0.85rem;
  gap: 0.35rem;
}

.lang-switch a {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.12rem 0.48rem;
}

.lang-switch a.active {
  background: #e6fffa;
  border-color: #99f6e4;
  color: #115e59;
  pointer-events: none;
}

.notice-banner {
  background: #e6fffa;
  border: 1px solid #99f6e4;
  border-radius: var(--radius-sm);
  color: #134e4a;
  margin-top: 1rem;
  padding: 0.65rem 0.8rem;
}

.section {
  padding: 2.8rem 0;
}

.section-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.text-muted {
  color: var(--text-muted);
}

.hero-grid {
  display: grid;
  gap: 1rem;
}

.crab-hero {
  font-size: clamp(2.8rem, 6.2vw, 5rem);
  line-height: 1;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  max-width: 20ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.btn {
  align-items: center;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.62rem 0.95rem;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #f3f4f6;
  color: var(--text);
}

.two-col {
  display: grid;
  gap: 1rem;
}

.preview-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.preview-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  padding: 0.58rem 0.7rem;
}

.preview-item strong {
  font-size: 0.95rem;
}

.preview-item span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.install-note {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: var(--radius-sm);
  color: #115e59;
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
  padding: 0.55rem 0.7rem;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.tab-button {
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 0.42rem 0.75rem;
}

.tab-button[aria-selected="true"] {
  background: #e6fffa;
  border-color: #99f6e4;
  color: #115e59;
}

.code-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-top {
  align-items: center;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 0.58rem 0.72rem;
}

.copy-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 0.85rem;
}

code {
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.89rem;
}

.resource-grid {
  display: grid;
  gap: 0.8rem;
}

.resource-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  display: block;
  padding: 0.85rem;
}

.resource-card h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.resource-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2.2rem;
  padding: 2rem 0 2.6rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}

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

.footer-disclaimer {
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  max-width: 90ch;
}

.page-intro {
  margin-top: 0.8rem;
}

.legal-block {
  font-style: normal;
  line-height: 1.7;
  white-space: pre-line;
}

@media (width >= 760px) {
  .section {
    padding: 3.6rem 0;
  }

  .hero-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

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

@media (width >= 1024px) {
  .resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
