:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --border: 214.3 31.8% 91.4%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.7;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #209cee;
  font-weight: 600;
  font-size: 1.25rem;
}

.logo svg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.nav a:hover {
  color: hsl(var(--foreground));
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  user-select: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 220px;
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 0.35rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mobile-nav-menu a {
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  padding: 0.55rem 0.65rem;
  border-radius: 0.35rem;
}

.mobile-nav-menu a:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.main {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.main h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.main h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}

.main h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
}

.main p {
  margin-bottom: 1rem;
  color: hsl(var(--muted-foreground));
}

.main strong {
  color: hsl(var(--foreground));
}

.main ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.main ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.main li {
  margin-bottom: 0.5rem;
  color: hsl(var(--muted-foreground));
}

.main a {
  color: #1a73b8;
}

.example-card {
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  background: hsl(var(--muted));
}

.example-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.example-image {
  width: 100%;
  height: auto;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  margin: 0.75rem 0 0.25rem;
  background: white;
}

.example-caption {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.symbol-row {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  color: hsl(var(--foreground));
  margin: 0.3rem 0;
}

.operator-line {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.rules-box {
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0 1.25rem;
  background: hsl(var(--muted));
}

.rules-box h2 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.cta-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  background: #209cee;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
}

.cta-button:hover {
  background: #1a8bc8;
}

.main a.cta-button,
.main a.cta-button:visited,
.main a.cta-button:hover,
.main a.cta-button:active {
  color: white;
}

.faq {
  border-top: 1px solid hsl(var(--border));
  margin-top: 1.5rem;
  padding-top: 0.75rem;
}

.footer {
  border-top: 1px solid hsl(var(--border));
  padding: 1.5rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.footer a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  margin: 0 0.4rem;
}

.footer a:hover {
  color: hsl(var(--foreground));
}

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

  .mobile-nav {
    display: block;
  }

  .main {
    padding: 1.5rem 1rem;
  }

  .main h1 {
    font-size: 1.75rem;
  }
}
