/* ── AUI Website Stylesheet ──────────────────── */

/* ── Reset & Base ────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
}


/* ── Layout ──────────────────────────────────── */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* ── Typography ──────────────────────────────── */

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}


/* ── Code ────────────────────────────────────── */

code {
  font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background: #f3f4f6;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}


/* ── Header / Hero ───────────────────────────── */

.hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: #4b5563;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.version-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

.cta-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cta {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s;
}

.cta-primary {
  background: #2563eb;
  color: #ffffff;
}

.cta-primary:hover {
  background: #1d4ed8;
  text-decoration: none;
}

.cta-secondary {
  background: #f3f4f6;
  color: #1a1a1a;
  border: 1px solid #d1d5db;
}

.cta-secondary:hover {
  background: #e5e7eb;
  text-decoration: none;
}


/* ── Tables ──────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

th {
  font-weight: 600;
  background: #f9fafb;
  border-bottom: 2px solid #d1d5db;
}

td:first-child {
  font-weight: 500;
}


/* ── Steps ───────────────────────────────────── */

.steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.75rem;
  height: 1.75rem;
  background: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ── Principles / Cards ──────────────────────── */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.principle {
  background: #f9fafb;
  border-radius: 6px;
  padding: 1rem;
}

.principle strong {
  display: block;
  margin-bottom: 0.25rem;
}

.principle p {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 0;
}


/* ── Example Demo ────────────────────────────── */

.demo {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.demo-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.demo-intent {
  font-style: italic;
  color: #374151;
  margin-bottom: 0.75rem;
}

.demo-arrow {
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.demo-url {
  font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: #15803d;
  word-break: break-all;
}


/* ── Footer ──────────────────────────────────── */

.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
  color: #6b7280;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #6b7280;
}

.footer-links a:hover {
  color: #2563eb;
}


/* ── Spec Page ───────────────────────────────── */

.spec-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.spec-header a {
  font-size: 0.85rem;
  color: #6b7280;
}

.spec-header a:hover {
  color: #2563eb;
}

.spec-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.toc {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.toc ol {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.toc a {
  color: #374151;
}

.toc a:hover {
  color: #2563eb;
}

dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

dd {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: #4b5563;
}


/* ── Responsive ──────────────────────────────── */

@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

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

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

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.4rem 0.5rem;
  }
}
