/* UK e-Learning — Graduated Ink Editorial
   Static design system. All colours/typography defined here. */

:root {
  --ink: #171512;
  --ink-soft: #221f1b;
  --paper: #f4f1ea;
  --paper-2: #ece8de;
  --accent: #c0392b;
  --accent-2: #d98a3d;
  --muted: #6f6a61;
  --rule: rgba(23, 21, 18, 0.14);
  --rule-light: rgba(244, 241, 234, 0.16);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1600px;
  --pad: 1.5rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

@media (min-width: 1024px) {
  :root { --pad: 2.5rem; }
}

/* ---------- Masthead ---------- */
.masthead { background: var(--ink); color: var(--paper); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-light);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}

.mainnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.05rem 1.6rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.mainnav a {
  color: rgba(244, 241, 234, 0.7);
  text-decoration: none;
  transition: color 0.18s ease;
}

.mainnav a:hover, .mainnav a.is-active { color: var(--paper); }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--paper); }

.herogrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 1024px) {
  .herogrid {
    grid-template-columns: 7fr 5fr;
    gap: 4rem;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.eyebrow .dash { display: inline-block; width: 2rem; height: 1px; background: var(--accent-2); }
.eyebrow .catlink { color: inherit; text-decoration: none; }
.eyebrow .catlink:hover { text-decoration: underline; }

.herotext h1 {
  margin: 1.5rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(115deg, #f4f1ea 0%, #d98a3d 42%, #c0392b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  margin: 2rem 0 0;
  max-width: 52ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(244, 241, 234, 0.75);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease;
}

.btn:hover { background: #a93226; }

.heroimg img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  outline: 1px solid var(--rule-light);
  outline-offset: -1px;
}

/* ---------- Rails / grids ---------- */
.rail { background: var(--paper); padding: 4rem 0; }
.rail.dark { background: var(--paper-2); }

.railhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.railhead h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.viewall {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.viewall:hover { text-decoration: underline; }

.grid3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 720px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid3 { grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2.75rem; } }

.card { border-top: 1px solid var(--rule); padding-top: 1.25rem; }

.card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.card h3 a { text-decoration: none; transition: color 0.18s ease; }
.card h3 a:hover { color: var(--accent); }

.card p {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Page heads ---------- */
.pagehead { background: var(--ink); color: var(--paper); padding: 3.5rem 0; }

.pagetitle {
  margin: 1.25rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.pagehead .lede { margin: 1rem 0 0; color: rgba(244, 241, 234, 0.7); max-width: 60ch; }

/* ---------- Article ---------- */
.post { padding: 3.5rem 0 4.5rem; }

.postgrid { display: grid; grid-template-columns: 1fr; gap: 3rem; }

@media (min-width: 1024px) {
  .postgrid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 4rem; }
}

.posttitle {
  margin: 1.25rem 0 2rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 34ch;
  text-wrap: balance;
}

.prose { font-size: 1.0625rem; line-height: 1.78; max-width: 68ch; }
.prose p { margin: 0 0 1.35rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.35rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.prose h2, .prose h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.85rem;
  line-height: 1.2;
}
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.3rem; }
.prose blockquote {
  margin: 1.75rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-2);
  font-family: var(--display);
  font-size: 1.15rem;
}

.backlink {
  display: inline-block;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.backlink:hover { text-decoration: underline; }

.postside { align-self: start; }

.sidetitle {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.relist { list-style: none; margin: 1.25rem 0 0; padding: 0; }

.relist li { margin-bottom: 1rem; }

.relist a {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.18s ease;
}

.relist a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.foot {
  background: var(--ink);
  color: rgba(244, 241, 234, 0.6);
  border-top: 1px solid var(--rule-light);
  padding: 2.5rem 0;
}

.footgrid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footbrand { font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--paper); }
.foottag { font-size: 0.875rem; max-width: 52ch; }

.footlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.footlinks { border-top: 1px solid var(--rule-light); }
.footlinks a { text-decoration: none; transition: color 0.18s ease; }
.footlinks a:hover { color: var(--accent-2); }
