/* shadcn neutral theme tokens, shared with app/globals.css.
   Keep the used values in sync with that file. */
:root {
  color-scheme: dark;

  --background: oklch(0.1450 0 0);
  --foreground: oklch(0.9850 0 0);
  --primary: oklch(0.9220 0 0);
  --muted: oklch(0.2690 0 0);
  --muted-foreground: oklch(0.7080 0 0);
  --accent: oklch(0.3710 0 0);
  --accent-foreground: oklch(0.9850 0 0);
  --border: oklch(0.2750 0 0);
  --input: oklch(0.3250 0 0);
  --ring: oklch(0.5560 0 0);

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
}

:root[data-theme='light'] {
  color-scheme: light;

  --background: oklch(1 0 0);
  --foreground: oklch(0.1450 0 0);
  --primary: oklch(0.2050 0 0);
  --muted: oklch(0.9700 0 0);
  --muted-foreground: oklch(0.5560 0 0);
  --accent: oklch(0.9700 0 0);
  --accent-foreground: oklch(0.2050 0 0);
  --border: oklch(0.9220 0 0);
  --input: oklch(0.9220 0 0);
  --ring: oklch(0.7080 0 0);
}

* { box-sizing: border-box; }
html {
  background: var(--background);
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover { color: var(--foreground); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
::selection { background: color-mix(in oklab, var(--primary) 20%, transparent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
}
.site-header-inner {
  max-width: 1080px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  direction: ltr;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  direction: ltr;
  text-decoration: none;
}
.brand:hover { color: var(--foreground); text-decoration: none; }
.brand-mark {
  display: block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: currentColor;
  -webkit-mask: url("/brand-mark.svg") center / contain no-repeat;
  mask: url("/brand-mark.svg") center / contain no-repeat;
}
.brand-tagline {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .12em;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  appearance: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.theme-toggle:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.theme-icon { display: block; width: 18px; height: 18px; }
.theme-icon-moon { display: none; }
:root[data-theme='light'] .theme-icon-sun { display: none; }
:root[data-theme='light'] .theme-icon-moon { display: block; }

.product-main {
  width: 100%;
  max-width: 1080px;
  flex: 1;
  margin: 0 auto;
  padding: 64px 24px 96px;
  overflow-wrap: break-word;
}
.product-main > :not(.shots) { max-width: 712px; }
.product-main > .hero {
  max-width: none;
  width: 800px;
  max-width: 100%;
  margin: 32px 0 8px;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}
h1 {
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h2 {
  margin: 48px 0 14px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
p, li { font-size: 15px; }
p { margin: 0 0 16px; }
ul { margin: 0 0 20px; padding-inline-start: 1.4em; }
li + li { margin-top: 6px; }
strong { color: var(--foreground); font-weight: 600; }
.meta { color: var(--muted-foreground); font-size: 13px; }
.tagline { margin-top: -8px; color: var(--muted-foreground); font-size: 17px; }
.platform-note {
  margin: -6px 0 18px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

.badge { display: inline-block; margin: 8px 0 4px; text-decoration: none; }
.badge:hover { text-decoration: none; }
.badge img { display: block; width: auto; height: 44px; }
.shots {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--border) transparent;
}
.shots img {
  flex: 0 0 auto;
  width: 240px;
  max-width: 78%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
}
table {
  width: 100%;
  margin: 16px 0 24px;
  border-collapse: collapse;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th { background: var(--muted); color: var(--foreground); font-weight: 600; }
td { color: var(--muted-foreground); }

.foot {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
  color: var(--muted-foreground);
  font-size: 13px;
}
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 32px 24px 28px; }
.footer-legal { color: var(--muted-foreground); }
.footer-legal a { color: var(--muted-foreground); text-decoration: none; }
.footer-legal a:hover, .langs a:hover { color: var(--foreground); text-decoration: underline; }
.footer-legal + .langs { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  direction: ltr;
  text-align: left;
}
.langs a, .langs strong {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
}
.langs strong { color: var(--foreground); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .theme-toggle { transition: none; }
}
@media (max-width: 640px) {
  .site-header-inner { height: 64px; padding: 0 18px; }
  .brand { gap: 8px; font-size: 17px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-tagline { margin-left: 0; padding-left: 10px; font-size: 10px; letter-spacing: .08em; }
  .product-main { padding: 40px 18px 64px; }
  h1 { margin-bottom: 20px; padding-bottom: 16px; }
  h2 { margin-top: 36px; }
  .footer-inner { padding: 28px 20px 24px; }
  .langs { gap: 10px 14px; }
  th, td { padding: 8px; }
}
@media (max-width: 380px) {
  .brand-tagline { display: none; }
}

/* iChatWithAI marketing only. */
.ichat-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 0 24px;
  border-radius: 22.5%;
}
.ichat-icon-light { display: none; }
:root[data-theme='light'] .ichat-icon-dark { display: none; }
:root[data-theme='light'] .ichat-icon-light { display: block; }
.ichat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 8px;
}
.ichat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--background);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.ichat-button:hover {
  background: color-mix(in oklab, var(--primary) 88%, var(--accent));
  color: var(--background);
}
.ichat-button-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}
.ichat-button-secondary:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.ichat-install {
  margin: 12px 0 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
}
.ichat-install pre {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ichat-install code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}
.ichat-key {
  display: inline-block;
  padding: 0 .35em;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--muted);
  color: var(--foreground);
  font-family: inherit;
  font-size: .9em;
  line-height: 1.6;
  white-space: nowrap;
}
.ichat-command-list {
  margin: 12px 0 20px;
  padding: 0;
  list-style: none;
}
.ichat-command-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.ichat-command-list li + li { margin-top: 8px; }
.ichat-command-list code {
  flex-shrink: 0;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--muted);
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}
.ichat-command-list span { min-width: 0; }
#install { scroll-margin-top: 84px; }
@media (max-width: 640px) {
  .ichat-icon { width: 96px; height: 96px; }
  .ichat-install { padding: 12px; }
}
