/* learn_example.css — consistent visual style for EE Learn Accessibility HTML examples */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

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

/* ── Base ───────────────────────────────────────────────────────────────────── */
body {
  margin: 0;
  padding-top: 72px;
  padding-right: 96px;
  padding-bottom: 72px;
  padding-left: 96px;

  display: flex;
  flex-direction: column;
  align-items: center;

  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
}

/* ── Content wrapper ────────────────────────────────────────────────────────── */
article, .content-wrapper {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ── Paragraphs ─────────────────────────────────────────────────────────────── */
p {
  font-size: 20px;
  margin-bottom: 1.5rem;
}

/* ── Headings ───────────────────────────────────────────────────────────────── */
h1 {
  font-size: 1.75rem;
  color: #004fa3;
  border-bottom: 3px solid #004fa3;
  padding-bottom: 0.4rem;
  margin-top: 0;
}

h2 {
  font-size: 1.3rem;
  color: #222;
  margin-top: 2rem;
}

h3 {
  font-size: 1.05rem;
  color: #444;
}

/* ── Demo container ─────────────────────────────────────────────────────────── */
.demo {
  border: 2px solid #bdc8d6;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.25rem 0;
  background: #f8fafc;
}

/* ── Good / bad variants ────────────────────────────────────────────────────── */
.demo--good {
  border-color: #2e7d32;
  background: #f1f8f1;
}

.demo--bad {
  border-color: #b71c1c;
  background: #fff5f5;
}

/* ── Demo label (rendered via .demo__label or a data attribute) ─────────────── */
.demo__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15em 0.6em;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.demo--good .demo__label {
  background: #2e7d32;
  color: #fff;
}

.demo--bad .demo__label {
  background: #b71c1c;
  color: #fff;
}

/* ── Code ───────────────────────────────────────────────────────────────────── */
pre, code {
  font-family: "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.88rem;
}

pre {
  background: #1e2936;
  color: #e8eaf0;
  padding: 1.1rem 1.4rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 1rem 0;
}

code {
  background: #dce8f7;
  color: #1a3a6b;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ── Note / callout ─────────────────────────────────────────────────────────── */
.note {
  border-left: 4px solid #004fa3;
  background: #e8f0fe;
  color: #1a3a6b;
  padding: 0.8rem 1rem;
  margin: 1.25rem 0;
  border-radius: 0 4px 4px 0;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
button {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6em 1.4em;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #293c8f;
  color: #fff;
}

button:hover {
  background: #1e2d6e;
}

button:focus {
  outline: 3px solid #ff0000;
  outline-offset: 3px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

/* ── Utility ────────────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
