/**
 * Huachi public website v1.0.6.
 *
 * Design tokens come from core_ai_pipeline_package/web/theme.css. The public
 * site copies that file at build time so the legal site and product surfaces
 * retain the same semantic color language without sharing runtime code.
 */

@import url("/theme.css");

:root {
  color-scheme: light dark;

  /* Public site baseline: white in light mode, system dark surface in dark mode. */
  --bg: light-dark(#ffffff, #000000);
  --surface: light-dark(#ffffff, #1c1c1e);
  --surface-2: light-dark(#f5f5f7, #2c2c2e);
  --surface-raised: light-dark(#ffffff, #2c2c2e);
  --surface-input: light-dark(#ffffff, #1c1c1e);
  --surface-hover: light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.06));
  --site-heading-1: clamp(2rem, 5vw, 3.25rem);
  --site-heading-2: 1.5rem;
  --site-heading-3: 1.125rem;

  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.75;
}

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--site-heading-1);
  font-weight: 650;
}

h2 {
  font-size: var(--site-heading-2);
  font-weight: 650;
}

h3 {
  font-size: var(--site-heading-3);
  font-weight: 650;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line-subtle);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
}

.site-header-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand strong {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-logo {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  transform: translateY(-3px);
}

.brand-logo img {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 100%;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  gap: 0.1rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a,
.language-switch {
  display: inline-flex;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-control);
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active,
.language-switch:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.language-switch {
  flex: 0 0 auto;
  color: var(--accent);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.35rem;
  align-items: center;
}

.theme-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.theme-toggle-icon {
  width: 19px;
  height: 19px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  max-width: 1120px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 820px);
  gap: 3rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 4.5rem;
  padding-top: 3.5rem;
  font-size: 0.9rem;
}

.docs-sidebar-title {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.04em;
}

.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.docs-sidebar a {
  display: block;
  padding: 0.42rem 0.6rem;
  border-radius: var(--radius-control);
  color: var(--muted);
  text-decoration: none;
}

.docs-sidebar a:hover,
.docs-sidebar a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.docs-sidebar a.child {
  padding-left: 1.2rem;
  font-size: 0.86rem;
}

.docs-main {
  min-width: 0;
}

.hero {
  max-width: 820px;
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 1rem;
  font-size: var(--site-heading-1);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-lede {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.content {
  max-width: 820px;
}

.content h2,
.content h3 {
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.content h2 {
  margin-top: 3.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line-subtle);
  font-size: var(--site-heading-2);
}

.content h3 {
  margin-top: 2rem;
  font-size: var(--site-heading-3);
}

.content p,
.content li {
  max-width: 76ch;
}

.content p {
  color: var(--ink);
}

.content li + li {
  margin-top: 0.5rem;
}

.content ul,
.content ol {
  padding-left: 1.4rem;
}

.content strong {
  font-weight: 650;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--line-subtle);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-2);
  font-weight: 650;
}

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line-subtle);
}

footer {
  padding: 2.5rem 1.25rem 3.2rem;
  border-top: 1px solid var(--line-subtle);
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.82rem;
  text-align: center;
}

footer p {
  max-width: none;
  margin: 0.4rem auto;
}

footer strong {
  color: var(--ink);
}

footer a {
  color: inherit;
}

@media (max-width: 820px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 -0.35rem -0.2rem;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    position: static;
    margin: 1rem 0 2rem;
    padding: 0 0 0.8rem;
    border-bottom: 1px solid var(--line-subtle);
  }

  .docs-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .docs-sidebar a {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  main {
    padding-top: 1.25rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .content h2 {
    margin-top: 2.5rem;
  }

  th,
  td {
    min-width: 9rem;
  }
}
