/* Trial Room — aligned with app light theme (Stitch palette) */
:root {
  --background: #f9f9fb;
  --surface: #ffffff;
  --text: #1a1c1d;
  --text-secondary: #464652;
  --border: #c7c5d4;
  --primary: #15157d;
  --primary-container: #2e3192;
  --surface-muted: #f3f3f5;
  --surface-elevated: #e2e2e4;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
}

a {
  color: var(--primary-container);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  z-index: 100;
  border-radius: 6px;
}

.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
  color: #fff;
  padding: 2.5rem 1.25rem 2.75rem;
  box-shadow: 0 4px 24px rgba(21, 21, 125, 0.15);
}

/* Global `p { color: ... }` would otherwise win over inherited header white */
.site-header p {
  color: rgba(255, 255, 255, 0.94);
}

.site-header__inner {
  max-width: 720px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.brand__name {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.site-header__tagline {
  margin: 0;
  font-size: 0.95rem;
  max-width: 36em;
  line-height: 1.55;
}

.layout {
  max-width: 720px;
  margin: -1.5rem auto 0;
  padding: 0 1.25rem 3rem;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 8px 32px rgba(26, 28, 29, 0.06);
}

.meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-elevated);
}

.meta strong {
  color: var(--text);
}

.toc {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem 1.1rem;
  margin-bottom: 2rem;
}

.toc h2 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.toc li {
  margin: 0.35rem 0;
}

.toc a {
  font-weight: 500;
}

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.75rem;
  color: var(--primary);
}

h2:first-of-type {
  margin-top: 0;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

p,
ul {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

ul {
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

.note {
  font-size: 0.9rem;
  background: var(--surface-muted);
  border-left: 4px solid var(--primary-container);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
}

.note p:last-child {
  margin-bottom: 0;
}

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.site-footer a {
  font-weight: 500;
}

/* §13 Contact — dark panel (brand-aligned) */
.contact-box {
  margin-top: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #0f0f45 0%, #15157d 55%, #1a1a6e 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(21, 21, 125, 0.25);
}

.contact-box__org {
  margin: 0 0 0.85rem;
  color: #ffffff;
  font-size: 1rem;
}

.contact-box__email {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-box__email strong {
  color: #ffffff;
  font-weight: 700;
  margin-right: 0.35rem;
}

.contact-box__email a {
  color: #c8c8e0;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-box__email a:hover {
  color: #ffffff;
}

@media (min-width: 640px) {
  .card {
    padding: 2rem 2.25rem 2.25rem;
  }

  .site-header {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .layout {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
