/* ══════════════════════════════════════════════════════
   Skills Visual Learning — shared.css
   Extends Phase B design system for all diagram pages.
══════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────── */
:root {
  --ink:         #17232b;
  --ink-soft:    #52616a;
  --paper:       #f5f1e8;
  --paper-deep:  #e8e0d1;
  --line:        #b9b1a2;
  --blue:        #2f6680;
  --blue-pale:   #dcebf0;
  --yellow:      #c9940e;
  --yellow-pale: #f8edc9;
  --green:       #28796d;
  --green-pale:  #d9eee7;
  --red:         #b84d48;
  --red-pale:    #f4d9d2;
  --coral:       #d96c54;
  --coral-pale:  #f5ddd4;
  --slate:       #5a6b78;
  --slate-pale:  #e4eaed;
  --white:       #fffdf8;
  --purple:      #6b4fa0;
  --purple-pale: #ede8f5;
  --shadow:      0 12px 36px rgba(23,35,43,.09);
  --radius:      10px;
}

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

body {
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 31px,
    var(--paper-deep) 31px, var(--paper-deep) 32px
  );
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  line-height: 1.55;
}

/* ── Sticky nav ─────────────────────────────────────── */
.page-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 28px;
  background: rgba(245,241,232,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
}
.page-nav a       { color: var(--ink-soft); text-decoration: none; }
.page-nav a:hover { color: var(--blue); }
.page-nav .spacer { flex: 1; }
.page-nav .logo   { font-family: 'DM Mono', Consolas, monospace; font-size: .7rem; color: var(--coral); }
.page-nav .sep    { color: var(--line); }
.nav-arrows       { display: flex; gap: 6px; }
.nav-arrows a {
  padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--white);
  font-family: 'DM Mono', Consolas, monospace; font-size: .7rem;
  color: var(--ink-soft);
  transition: background .12s, color .12s, border-color .12s;
}
.nav-arrows a:hover { background: var(--blue-pale); color: var(--blue); border-color: var(--blue); }

/* ── Page shell ─────────────────────────────────────── */
.page { max-width: 1180px; margin: 0 auto; padding: 48px 28px 96px; }

/* ── Typography ─────────────────────────────────────── */
.eyebrow {
  font-family: 'DM Mono', Consolas, monospace;
  font-size: .68rem; font-weight: 500;
  color: var(--coral); letter-spacing: 0;
  text-transform: uppercase; margin-bottom: 6px;
}
h1 {
  font-family: 'Noto Serif SC', 'Fraunces', Georgia, serif;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  line-height: 1.12; letter-spacing: 0; max-width: 740px;
  margin-bottom: 10px;
}
h2 {
  font-family: 'Noto Serif SC', 'Fraunces', Georgia, serif;
  font-size: 1.25rem; line-height: 1.2; margin-bottom: 8px;
}
h3 { font-size: .9rem; font-weight: 700; margin-bottom: 5px; }
.purpose {
  max-width: 560px; color: var(--ink-soft);
  font-size: .92rem; margin-bottom: 32px;
}
p { font-size: .88rem; color: var(--ink-soft); }

/* ── Diagram frame ──────────────────────────────────── */
.diagram-frame {
  width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 28px;
}
.diagram-frame > svg { width: 100%; height: auto; display: block; }


/* ── Badges (inline HTML) ───────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 7px;
  border: 1.5px solid currentColor; border-radius: 999px;
  font-family: 'DM Mono', Consolas, monospace;
  font-size: .58rem; font-weight: 500; line-height: 1.4;
  white-space: nowrap;
}
.badge-user    { color: var(--blue); }
.badge-agent   { color: var(--green); }
.badge-shared  { color: var(--slate); }
.badge-artifact{ color: var(--ink-soft); }

/* ── Skill chips ────────────────────────────────────── */
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.skill-chip {
  padding: 5px 10px;
  border: 1.5px solid var(--line); border-radius: 6px;
  background: var(--white);
  font-family: 'DM Mono', Consolas, monospace; font-size: .74rem;
  color: var(--ink-soft); text-decoration: none;
  transition: border-color .12s, color .12s;
}
.skill-chip:hover { border-color: var(--blue); color: var(--blue); }
.skill-chip.user  { border-color: var(--blue-pale); }
.skill-chip.agent { border-color: var(--green-pale); }
.skill-chip.shared{ border-color: var(--slate); color: var(--slate); }

/* ── Content grid / panels ──────────────────────────── */
.content-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 28px;
}
.panel {
  padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.panel h3 { margin-bottom: 8px; }
.panel p, .panel li { font-size: .86rem; color: var(--ink-soft); }
.panel ul, .panel ol { padding-left: 16px; }
.panel li { margin-bottom: 4px; }
.panel.blue-acc   { border-left: 4px solid var(--blue);   background: var(--blue-pale); }
.panel.green-acc  { border-left: 4px solid var(--green);  background: var(--green-pale); }
.panel.yellow-acc { border-left: 4px solid var(--yellow); background: var(--yellow-pale); }
.panel.coral-acc  { border-left: 4px solid var(--coral);  background: var(--coral-pale); }
.panel.slate-acc  { border-left: 4px solid var(--slate);  background: var(--slate-pale); }

/* ── Why matters / worked example ──────────────────── */
.section-label {
  font-family: 'DM Mono', Consolas, monospace;
  font-size: .65rem; color: var(--ink-soft); letter-spacing: 0;
  text-transform: uppercase; margin-bottom: 6px;
}
.worked-example {
  margin-top: 28px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.example-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px;
}
.example-col h3 { font-size: .82rem; margin-bottom: 6px; color: var(--ink-soft); }
.example-col p  { font-size: .84rem; }

/* ── Related skills ─────────────────────────────────── */
.related { margin-top: 28px; }

/* ── Linear summary (screen reader) ────────────────── */
.linear-summary {
  margin-top: 24px; padding: 14px 18px;
  border-left: 3px solid var(--blue);
  background: var(--blue-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft); font-size: .85rem;
}
.linear-summary strong { color: var(--ink); }

/* ── Rule ───────────────────────────────────────────── */
.rule { height: 1px; background: var(--line); margin: 32px 0; }

/* ── Footer ─────────────────────────────────────────── */
footer {
  max-width: 1180px; margin: 0 auto;
  padding: 20px 28px;
  color: var(--ink-soft); font-size: .78rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ── Links ──────────────────────────────────────────── */
a { color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 800px) {
  .page { padding: 36px 16px 72px; }
  .page-nav { padding: 8px 16px; }
  .content-grid, .example-grid { grid-template-columns: 1fr; }
}

/* ── Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .page > * { animation: pg-rise .38s ease both; }
  .page > *:nth-child(2) { animation-delay: .07s; }
  .page > *:nth-child(3) { animation-delay: .14s; }
  .page > *:nth-child(4) { animation-delay: .21s; }
  .page > *:nth-child(5) { animation-delay: .28s; }
  @keyframes pg-rise {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Source-only skill references are labels in the published blog. */
a[aria-disabled="true"] { cursor: default; pointer-events: none; }
