:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-muted: #eef2f4;
  --text: #1d252d;
  --muted: #64727f;
  --border: #d8e0e5;
  --accent: #276f7a;
  --accent-dark: #1f5962;
  --code-bg: #edf3f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 28px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--text);
  font-weight: 650;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.language-switch button {
  min-width: 48px;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.language-switch button.active {
  color: #ffffff;
  background: var(--accent);
}

.hero {
  padding: 44px 0 34px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.content {
  display: grid;
  gap: 22px;
  padding-top: 28px;
}

.section {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.section h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

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

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

.item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.item h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.item p {
  margin-bottom: 0;
  color: var(--muted);
}

ul {
  margin: 0;
  padding-left: 20px;
}

li + li {
  margin-top: 8px;
}

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

.screenshot-item {
  margin: 0;
}

.screenshot-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s, background 0.15s;
}

.lightbox-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

.screenshot-item figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--code-bg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

[data-lang-panel] {
  display: none;
}

[data-lang-panel].active {
  display: block;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 1080px);
    padding-top: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 20px;
  }

  .hero {
    padding: 30px 0 26px;
  }

  .section {
    padding: 20px;
  }

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

  .screenshots {
    grid-template-columns: 1fr;
  }
}
