/* Shared stylesheet for the Git teaching workspace.
   Tufte-adjacent: generous margins, restrained palette, print-friendly. */

:root {
  --ink: #1a1a18;
  --ink-soft: #55534d;
  --paper: #fffef9;
  --rule: #dcd8cc;
  --accent: #9a3412;      /* burnt orange — headings, emphasis */
  --accent-soft: #fdf3ec;
  --ok: #2f6f4f;
  --ok-soft: #eef6f1;
  --bad: #9b2226;
  --bad-soft: #fbeeee;
  --code-bg: #f4f1e8;
  --measure: 38rem;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  max-width: 46rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */

h1, h2, h3 { line-height: 1.2; font-weight: 600; }

h1 {
  font-size: 2.1rem;
  margin: 0 0 .25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.35rem;
  margin: 3rem 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--rule);
}

h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }

p, li { max-width: var(--measure); }

.subtitle {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.eyebrow {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .6rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- Code ---------- */

code, kbd, pre, .mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

code {
  background: var(--code-bg);
  padding: .1em .35em;
  border-radius: 3px;
  font-size: .87em;
}

pre {
  background: var(--code-bg);
  border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem;
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.55;
  border-radius: 0 4px 4px 0;
}

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

/* ---------- Callouts ---------- */

.note, .warn, .win {
  border-left: 3px solid var(--rule);
  padding: .85rem 1.1rem;
  margin: 1.5rem 0;
  font-size: .95rem;
  border-radius: 0 4px 4px 0;
}

.note { background: var(--accent-soft); border-left-color: var(--accent); }
.warn { background: var(--bad-soft); border-left-color: var(--bad); }
.win  { background: var(--ok-soft);  border-left-color: var(--ok); }

.note > :first-child, .warn > :first-child, .win > :first-child { margin-top: 0; }
.note > :last-child,  .warn > :last-child,  .win > :last-child  { margin-bottom: 0; }

.label {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: .35rem;
  opacity: .8;
}

/* ---------- GUI mapping chip ---------- */

.gui {
  display: inline-block;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .74rem;
  background: #eef1f6;
  color: #33415c;
  border: 1px solid #d5dbe6;
  border-radius: 999px;
  padding: .1rem .55rem;
  white-space: nowrap;
}

/* ---------- Tables ---------- */

table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Footer / nav ---------- */

.footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: .9rem;
  color: var(--ink-soft);
}

.footer a { font-weight: 600; }

/* ---------- Print ---------- */

@media print {
  body { padding: 0; max-width: none; font-size: 11pt; }
  .quiz, .no-print { display: none; }
  a::after { content: " (" attr(href) ")"; font-size: .75em; color: #666; }
  h2 { page-break-after: avoid; }
  pre, table, .note, .warn, .win { page-break-inside: avoid; }
}
