:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #171717;
  --text-muted: #525252;
  --border: #e5e5e5;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --max-width: 48rem;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  height: 1.75rem;
  width: auto;
  object-fit: contain;
}

.brand-logo--artifixel {
  height: 2rem;
}

.project-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.project-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.project-logo {
  flex-shrink: 0;
  height: 2rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.project-card-body h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.project-card-body ul {
  margin: 0;
  padding-left: 1.25rem;
}

.project-card-body li + li {
  margin-top: 0.375rem;
}

.app-list {
  margin-top: 2rem;
}

.app-list ul {
  margin: 0;
  padding-left: 1.25rem;
}

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

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

main {
  flex: 1;
  padding: 2.5rem 1.5rem 4rem;
}

.home h1,
.document h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.intro {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.doc-header {
  margin-bottom: 2rem;
}

.doc-header h1 {
  margin-top: 0;
}

.last-updated {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sections {
  margin-top: 2rem;
}

.sections > section + section,
.sections > .part-header + section,
.sections > section + .part-header {
  margin-top: 2rem;
}

.sections h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

.sections h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.section-body p,
.subsection p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.sections ul {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.sections li + li {
  margin-top: 0.375rem;
}

.part-header {
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.part-header:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.part-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.subsection + .subsection {
  margin-top: 1rem;
}

.footer-note {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.related {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.contact-card {
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.contact-org {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

.contact-org-meta {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.contact-list {
  display: grid;
  gap: 0.875rem;
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
}

.contact-item {
  display: grid;
  gap: 0.25rem;
}

.contact-item dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-item dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}

.contact-item dd a {
  font-weight: 500;
}

.contact-item--full dd {
  line-height: 1.6;
  color: var(--text-muted);
}

.contact-meta {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-item--full {
    grid-column: 1 / -1;
  }
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer .container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .home h1,
  .document h1 {
    font-size: 2.25rem;
  }
}
