/* Site 2 — Skin Archetype Explained — Wiki Layer */

:root {
  --bg: #FAFAF3;
  --surface: #FFFFFF;
  --text: #1C1E24;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --border: #E2E5EA;
  --border-light: #EEF0F3;
  --link: #2563EB;
  --link-hover: #1D4ED8;
  --accent: #2563EB;

  /* Archetype accent colours — same as Site 1 */
  --a: #C85A1E;
  --b: #C97B84;
  --c: #4A7FA5;
  --p: #9B8EC4;
  --d: #6B8C5A;
  --s: #2D3A7A;

  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  --max-w: 800px;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Links ── */
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 52px;
}

.nav-brand {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand span {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
  padding: 0.25rem;
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1rem;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.5rem 0; border-radius: 0; }
}

/* ── Main ── */
main { flex: 1; padding: 2.5rem 0 4rem; }

/* ── Wiki header ── */
.wiki-header {
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--border);
}

.wiki-header .breadcrumb {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.wiki-header .breadcrumb a {
  color: var(--link);
  text-decoration: none;
}

.wiki-header .breadcrumb a:hover { text-decoration: underline; }
.wiki-header .breadcrumb span { margin: 0 0.3rem; }

.wiki-header h1 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.wiki-header .standfirst {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

/* ── Page intro (non-archetype pages) ── */
.page-intro {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.page-intro .label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 0.5rem;
}

.page-intro h1 {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-intro p {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.65;
}

/* ── Sections ── */
.section { margin-bottom: 2.25rem; }

.section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}

.section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section p { margin-bottom: 0.85rem; }
.section p:last-child { margin-bottom: 0; }

.section ul {
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
}

.section ul li { margin-bottom: 0.35rem; }

/* ── Info box ── */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-left: 3px solid var(--link);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-box strong { display: block; margin-bottom: 0.2rem; font-family: var(--sans); }

/* ── Reference box ── */
.ref-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.ref-box a { font-size: 0.82rem; }

/* ── Archetype index table ── */
.archetype-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.archetype-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.archetype-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.archetype-table tr:last-child td { border-bottom: none; }

.archetype-table .code-cell {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.archetype-table .name-cell a {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.archetype-table .name-cell a:hover { color: var(--link); text-decoration: underline; }

/* ── Archetype dot badges ── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot-a { background: var(--a); }
.dot-b { background: var(--b); }
.dot-c { background: var(--c); }
.dot-p { background: var(--p); }
.dot-d { background: var(--d); }
.dot-s { background: var(--s); }

/* ── Archetype hero (individual pages) ── */
.archetype-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.archetype-hero .type-badge {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.archetype-hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.archetype-hero .canonical-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--sans);
  font-style: normal;
  margin-top: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

.archetype-hero .canonical-note a { font-size: 0.82rem; }

/* ── FAQ item ── */
.faq-item { margin-bottom: 1.75rem; }
.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* ── See also ── */
.see-also {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.see-also strong { display: block; margin-bottom: 0.4rem; color: var(--text); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.see-also ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.see-also ul li a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--link);
  text-decoration: none;
  font-size: 0.78rem;
}
.see-also ul li a:hover { background: var(--border-light); }

/* ── Disclaimer ── */
.disclaimer {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 2.5rem;
}

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-disclaimer {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.55;
  max-width: 520px;
}

.footer-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: right;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .footer-meta { text-align: left; }
  .wiki-header h1, .page-intro h1 { font-size: 1.5rem; }
}
