/* ── Ultra Claude Docs — Light Theme (yin to ultra-claude-web's yang) ── */

:root {
  /* Colors — shadcn light mode vocabulary */
  --background: oklch(0.985 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.541 0.241 277.751);

  /* Purple accent — sole color */
  --primary: oklch(0.541 0.241 277.751);
  --primary-light: oklch(0.932 0.032 277.751);
  --primary-foreground: oklch(1 0 0);

  /* Semantic colors */
  --info: oklch(0.623 0.214 259.815);
  --info-light: oklch(0.932 0.032 259.815);
  --success: oklch(0.627 0.194 149.214);
  --success-light: oklch(0.932 0.032 149.214);
  --warning: oklch(0.705 0.183 71.538);
  --warning-light: oklch(0.948 0.032 71.538);

  /* Layout */
  --sidebar-width: 240px;
  --nav-height: 56px;
  --content-max: 960px;
  --radius: 0.625rem;
  --radius-sm: 0.375rem;
  --radius-lg: 0.75rem;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; overflow-y: scroll; }
body { max-width: 100vw; }

/* ── Typography ── */
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: var(--muted);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--foreground);
  color: var(--background);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── Navigation ── */
.site-nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--content-max) + var(--sidebar-width));
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
}

.site-nav-spacer {
  height: var(--nav-height);
}

.site-nav .logo {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--foreground); text-decoration: none; }
.nav-links a.active { color: var(--primary); }

/* ── Layout: Full-width (Home, Getting Started) ── */
.page-full {
  max-width: calc(var(--content-max) + var(--sidebar-width));
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Layout: Sidebar (Documentation pages) ── */
.page-docs {
  max-width: calc(var(--content-max) + var(--sidebar-width));
  margin: 0 auto;
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 2rem 1.5rem 2rem 1.5rem;
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-link {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.sidebar-link:hover {
  color: var(--foreground);
  background: var(--muted);
  text-decoration: none;
}

.sidebar-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.doc-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem 5rem;
}

.doc-content h1 { margin-bottom: 0.5rem; }
.doc-content h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.doc-content h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; }
.doc-content p { margin-bottom: 1rem; color: var(--card-foreground); }
.doc-content ul, .doc-content ol { margin-bottom: 1rem; padding-left: 1.25rem; }
.doc-content li { margin-bottom: 0.375rem; }
.doc-content > p:first-of-type { font-size: 1.0625rem; color: var(--muted-foreground); }

/* ── Hero (Home) ── */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero h1 { font-size: 2.625rem; letter-spacing: -0.03em; }

.hero .tagline {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero .cta-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--muted-foreground);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  cursor: pointer;
  border: none;
}

.btn:hover { opacity: 0.9; text-decoration: none; }

.btn-primary {
  background: var(--foreground);
  color: var(--background);
}

.btn-secondary {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--muted-foreground); }

.card h3 { margin-bottom: 0.375rem; }

.card p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ── Link cards (doc navigation) ── */
.doc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.125rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.doc-link:hover { border-color: var(--primary); text-decoration: none; }

.doc-link .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0.125rem;
  background: var(--primary);
  flex-shrink: 0;
}

.doc-link .name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
}

.doc-link .desc {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.0625rem;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* ── Section label ── */
.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* ── Phase cards (Getting Started) ── */
.phase {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 4.25rem;
}

.phase-number {
  position: absolute;
  left: 1.5rem;
  top: 1.75rem;
  width: 1.875rem;
  height: 1.875rem;
  background: var(--foreground);
  color: var(--background);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phase h2 {
  font-size: 1.0625rem;
  margin-top: 0;
  margin-bottom: 0.625rem;
}

.phase p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.625rem;
}

.phase ul {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  padding-left: 1.125rem;
  margin-bottom: 0.625rem;
}

.phase li { margin-bottom: 0.375rem; }

/* ── Callout / Info box ── */
.callout {
  border-left: 3px solid var(--info);
  background: var(--info-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.875rem 1.125rem;
  margin: 1rem 0;
}

.callout p {
  font-size: 0.8125rem;
  color: var(--foreground);
  margin-bottom: 0;
}

.callout-purple {
  border-left-color: var(--primary);
  background: var(--primary-light);
}

.callout-success {
  border-left-color: var(--success);
  background: var(--success-light);
}

.callout-warning {
  border-left-color: var(--warning);
  background: var(--warning-light);
}

/* ── Interstitial (special callout for "stop and read") ── */
.interstitial {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.interstitial p {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0;
}

/* ── Progressive disclosure ── */
details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
  background: var(--card);
}

details[open] {
  border-color: var(--primary);
}

summary {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  transition: color 0.15s;
}

summary:hover { color: var(--primary); }

summary::before {
  content: '\25B6';
  font-size: 0.625rem;
  transition: transform 0.15s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.details-content {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.details-content p { margin-bottom: 0.75rem; }
.details-content p:last-child { margin-bottom: 0; }
.details-content ul { padding-left: 1.125rem; margin-bottom: 0.75rem; }
.details-content li { margin-bottom: 0.25rem; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin: 1rem 0;
}

th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--foreground);
  color: var(--foreground);
}

td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}

tr:hover td { background: var(--muted); }

/* ── Landing page (mirrors ultra-claude-web layout, light mode) ── */
.landing {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.landing-logo {
  font-size: 1.125rem;
  font-weight: 600;
}

.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 6rem;
}

.landing-hero {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.landing-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

@media (min-width: 640px) {
  .landing-hero h1 { font-size: 2.75rem; }
}

.landing-hero p {
  margin-top: 1rem;
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.landing-features {
  margin-top: 6rem;
  padding-bottom: 4rem;
  display: grid;
  max-width: 56rem;
  width: 100%;
  gap: 2rem;
}

@media (min-width: 640px) {
  .landing-features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .landing-features { grid-template-columns: repeat(3, 1fr); }
}

.landing-feature {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.landing-feature-icon {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
}

.landing-feature h3 {
  font-size: 0.875rem;
  font-weight: 600;
}

.landing-feature p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin: 0;
}

/* ── Button variants (matching dashboard) ── */
.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border: none;
}
.btn-ghost:hover { color: var(--foreground); background: var(--muted); }

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--muted); }

.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8125rem; height: 1.75rem; }
.btn-lg { padding: 0.5rem 1.5rem; font-size: 0.875rem; height: 2.25rem; }

/* ── Site footer (all pages, fixed) ── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  background: var(--background);
  z-index: 100;
}

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

.site-footer a:hover {
  color: var(--foreground);
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .landing-hero h1 { font-size: 1.75rem; }
  .landing-cta { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .phase { padding-left: 3.5rem; }
  .phase-number { left: 1rem; }

  .page-docs { flex-direction: column; }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }

  .sidebar-section {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .doc-content { padding: 1.5rem; }
}
