/* Shared stylesheet for the Kubernetes teaching workspace.
   Tufte-inspired: calm typography, generous margins, prints well.
   Every lesson links this file. Keep it the single source of visual truth. */

:root {
  --ink: #1a1a1a;
  --ink-soft: #555;
  --paper: #fdfcf9;
  --rule: #e3ded2;
  --accent: #326ce5;      /* Kubernetes blue */
  --accent-soft: #eaf1fd;
  --warn: #b54708;
  --warn-soft: #fdf3e7;
  --ok: #2f7d32;
  --ok-soft: #ecf5ec;
  --code-bg: #f4f1ea;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

html { font-size: 18px; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.4rem 6rem;
}

/* --- Header / lesson meta --- */
.lesson-kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .4rem;
}
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 .3rem; }
h2 { font-size: 1.3rem; margin: 2.4rem 0 .6rem; border-bottom: 1px solid var(--rule); padding-bottom: .25rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.subtitle { color: var(--ink-soft); font-style: italic; margin-top: 0; }

p, li { font-size: 1.02rem; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
a:hover { border-bottom-color: var(--accent); }

/* --- Code --- */
code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .08em .35em; border-radius: 3px; }
pre {
  font-family: var(--mono);
  background: var(--code-bg);
  border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: .82rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: 1em; }
.comment { color: var(--ink-soft); }

/* --- Callouts --- */
.callout { border-radius: 6px; padding: .9rem 1.1rem; margin: 1.4rem 0; font-size: .96rem; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: .35rem; }

.mnemonic { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.mnemonic .callout-title { color: var(--accent); }
.warn { background: var(--warn-soft); border-left: 4px solid var(--warn); }
.warn .callout-title { color: var(--warn); }
.safe { background: var(--ok-soft); border-left: 4px solid var(--ok); }
.safe .callout-title { color: var(--ok); }

/* --- Mnemonic big box --- */
.eselsbruecke {
  text-align: center;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 1.4rem;
  margin: 1.6rem 0;
}
.eselsbruecke .phrase { font-size: 1.35rem; font-weight: 700; color: var(--accent); font-family: var(--serif); }
.eselsbruecke .gloss { color: var(--ink-soft); font-size: .9rem; margin-top: .4rem; }

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

/* --- Quiz widget --- */
.quiz { border: 1px solid var(--rule); border-radius: 8px; padding: 1.2rem 1.3rem; margin: 1.4rem 0; background: #fff; }
.quiz h3 { margin-top: 0; }
.quiz .q { font-weight: 600; margin: 1.1rem 0 .5rem; }
.quiz .options { list-style: none; padding: 0; margin: 0; }
.quiz .options li { margin: .4rem 0; }
.quiz button.opt {
  font-family: var(--serif); font-size: .98rem;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 5px; padding: .55rem .8rem; transition: background .12s;
}
.quiz button.opt:hover { background: var(--accent-soft); }
.quiz button.opt.correct { background: var(--ok-soft); border-color: var(--ok); }
.quiz button.opt.wrong { background: var(--warn-soft); border-color: var(--warn); }
.quiz .feedback { font-size: .9rem; margin-top: .5rem; min-height: 1.2em; }
.quiz .feedback.correct { color: var(--ok); }
.quiz .feedback.wrong { color: var(--warn); }

/* --- Footer / nav --- */
.lesson-footer { margin-top: 3.5rem; border-top: 2px solid var(--rule); padding-top: 1.2rem; font-size: .92rem; color: var(--ink-soft); }
.ask-teacher { background: var(--accent-soft); border-radius: 6px; padding: .9rem 1.1rem; margin: 1.6rem 0; font-size: .96rem; }

/* --- Reference documents (glossary, cheat sheet) --- */
.ref { max-width: 52rem; }                 /* references are wider than lessons */
.ref-tag { display:inline-block; font-family: var(--mono); font-size:.66rem; letter-spacing:.12em;
  text-transform:uppercase; color:#fff; background:var(--accent); padding:.15rem .5rem; border-radius:3px; }
.ref-lead { color: var(--ink-soft); font-size:1.02rem; margin-top:.4rem; }

/* Glossary terms */
.term { margin: 0 0 1.1rem; padding-left: .9rem; border-left: 3px solid var(--accent-soft); }
.term .name { font-family: var(--mono); font-weight: 700; color: var(--accent); font-size:.98rem; }
.term .def { margin: .15rem 0 .2rem; }
.term .avoid { font-size: .82rem; color: var(--ink-soft); }
.term .avoid b { color: var(--warn); font-weight: 600; }

/* Cheat-sheet card grid */
.cheat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.cheat-card { border: 1px solid var(--rule); border-radius: 8px; padding: .9rem 1rem; background: #fff; break-inside: avoid; }
.cheat-card h3 { margin: 0 0 .5rem; font-size: .92rem; font-family: var(--mono); color: var(--accent);
  border-bottom: 1px solid var(--rule); padding-bottom: .3rem; }
.cheat-card dl { margin: 0; font-size: .8rem; }
.cheat-card dt { font-family: var(--mono); background: var(--code-bg); padding: .1rem .3rem; border-radius: 3px;
  display: inline-block; margin: .35rem 0 .1rem; font-size: .76rem; }
.cheat-card dd { margin: 0 0 .25rem; color: var(--ink-soft); font-size: .84rem; }

/* Status / signal table */
.signal td:first-child { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
kbd { font-family: var(--mono); font-size: .8em; background: var(--ink); color: var(--paper);
  padding: .05em .4em; border-radius: 3px; }

@media print {
  body, .ref { max-width: none; }
  .quiz button.opt { border: 1px solid #ccc; }
  a { color: var(--ink); border: none; }
  .cheat-grid { grid-template-columns: repeat(3, 1fr); }
  pre { white-space: pre-wrap; }
}
