/* ==========================================================================
   Editorial theme: "a field guide to living in Germany".

   Paper ground, ink-blue type, Fraunces for display and Inter for reading,
   and one warm accent kept for calls to action and deadlines. Page layout is
   scoped to body.ed so a template opts in; the shortcode components further
   down are global, because blocks.py now emits plain classed markup for them
   on every page that uses a shortcode.
   ========================================================================== */

:root {
  --ed-paper: #FBF8F3;
  --ed-paper-2: #F3EDE3;
  --ed-card: #FFFFFF;
  --ed-ink: #14213D;
  --ed-text: #23252D;
  --ed-muted: #5D6070;
  --ed-rule: #E4DCCD;
  --ed-link: #1E3A8A;
  --ed-accent: #C2410C;
  --ed-accent-dark: #9A3412;
  --ed-gold: #E9A23B;
  --ed-pro: #166534;
  --ed-con: #B42318;
  --ed-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ed-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ed-radius: 10px;
  --ed-measure: 44rem;
}

/* --- page frame --------------------------------------------------------- */
body.ed { background: var(--ed-paper); color: var(--ed-text); font-family: var(--ed-sans); }
body.ed .navbar { background: var(--ed-paper) !important; border-bottom: 1px solid var(--ed-rule); }
body.ed .navbar .nav-link { color: var(--ed-ink); font-weight: 500; }
body.ed .navbar .nav-link:hover { color: var(--ed-accent); }
body.ed footer.bg-dark { background: var(--ed-ink) !important; }
body.ed main > .container { max-width: 1320px; }
/* modern.css draws every <article> as a white padded card; the editorial page
   sits on the paper itself. */
body.ed article.ed-article { background: none; box-shadow: none; padding: 0; border-radius: 0; border: 0; }

/* --- article header ----------------------------------------------------- */
.ed-head { max-width: 52rem; margin: clamp(1.5rem, 4vw, 3rem) 0 1.75rem; }
.ed-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ed-crumbs li { color: var(--ed-muted); }
.ed-crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--ed-rule); }
.ed-crumbs a { color: var(--ed-accent); text-decoration: none; }
.ed-crumbs a:hover { text-decoration: underline; }
.ed-title { font-family: var(--ed-serif); font-weight: 700; font-optical-sizing: auto;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em;
  color: var(--ed-ink); margin: 0 0 1rem; text-wrap: balance; }
.ed-dek { font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); line-height: 1.55; color: var(--ed-muted);
  max-width: 40rem; margin: 0 0 1.4rem; text-wrap: pretty; }
.ed-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: .9rem; color: var(--ed-muted); }
.ed-byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ed-byline a { color: var(--ed-ink); font-weight: 600; text-decoration: none; }
.ed-byline a:hover { text-decoration: underline; }
.ed-byline__sep { color: var(--ed-rule); }

.ed-hero { margin: 0 0 clamp(2rem, 4vw, 3rem); }
.ed-hero img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover;
  border-radius: var(--ed-radius); background: var(--ed-paper-2); }

/* phones: get the reader to the first paragraph within one screen */
@media (max-width: 575.98px) {
  .ed-head { margin: 1.1rem 0 1.1rem; }
  .ed-crumbs { flex-wrap: nowrap; overflow: hidden; margin-bottom: .6rem; font-size: .72rem; }
  .ed-crumbs li:first-child { display: none; }
  .ed-crumbs li + li::before { display: none; }
  .ed-crumbs li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ed-title { font-size: 1.85rem; line-height: 1.1; margin-bottom: .7rem; }
  .ed-dek { font-size: 1rem; margin-bottom: .9rem; }
  .ed-byline { flex-wrap: nowrap; gap: .5rem; font-size: .8rem; white-space: nowrap; }
  .ed-byline img { width: 28px; height: 28px; }
  .ed-byline__by { display: none; }
  .ed-hero { margin-bottom: 1.25rem; }
  .ed-grid { gap: 1.25rem; }
}

/* --- three-zone layout: contents | article | rail ------------------------ */
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.ed-body { min-width: 0; max-width: var(--ed-measure); }
.ed-rail { display: grid; gap: 1.5rem; align-content: start; }
@media (min-width: 992px) {
  .ed-grid { grid-template-columns: 13.5rem minmax(0, 1fr); column-gap: 3rem; }
  .ed-toc { grid-column: 1; grid-row: 1 / span 2; }
  .ed-body, .ed-rail { grid-column: 2; }
}
@media (min-width: 1280px) {
  .ed-grid { grid-template-columns: 13.5rem minmax(0, var(--ed-measure)) 19rem; justify-content: space-between; }
  .ed-rail { grid-column: 3; grid-row: 1; }
}

/* contents: a quiet sticky rail on desktop, a collapsed bar on phones */
.ed-toc { align-self: start; }
.ed-toc__d > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem; border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); background: var(--ed-card);
  font-weight: 600; color: var(--ed-ink); }
.ed-toc__d > summary::-webkit-details-marker { display: none; }
.ed-toc__d > summary::after { content: "+"; font-size: 1.2rem; color: var(--ed-accent); }
.ed-toc__d[open] > summary::after { content: "\2212"; }
.ed-toc .lig-toc { position: static; box-shadow: none; margin: .5rem 0 0; }
@media (min-width: 992px) {
  .ed-toc { position: sticky; top: 1.5rem; }
  .ed-toc__d > summary { display: none; }
  .ed-toc .lig-toc { background: transparent; border: 0; margin: 0; }
  .ed-toc .lig-toc__head { background: transparent; border: 0; padding: 0 0 .6rem; }
  .ed-toc .lig-toc__scroll { max-height: calc(100vh - 6rem); }
}
@media (max-width: 991.98px) { .ed-toc .lig-toc__head { display: none; } }

/* --- reading typography ------------------------------------------------- */
.ed-body { font-size: 1.125rem; line-height: 1.72; color: var(--ed-text); }
.ed-body > section > p, .ed-body p { margin: 0 0 1.15em; }
.ed-body h2 { font-family: var(--ed-serif); font-weight: 650; font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.18; letter-spacing: -.012em; color: var(--ed-ink); margin: 2.4em 0 .6em; scroll-margin-top: 1.5rem; text-wrap: balance; }
.ed-body h3 { font-family: var(--ed-serif); font-weight: 650; font-size: 1.3rem; line-height: 1.3; color: var(--ed-ink);
  margin: 1.8em 0 .5em; scroll-margin-top: 1.5rem; }
.ed-body h4 { font-weight: 700; font-size: 1.05rem; color: var(--ed-ink); margin: 1.5em 0 .4em; }
.ed-body a { color: var(--ed-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.ed-body a:hover { color: var(--ed-accent); }
.ed-body strong { color: var(--ed-ink); }
.ed-body ul, .ed-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.ed-body li { margin: .35em 0; }
.ed-body li::marker { color: var(--ed-accent); }
.ed-body blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--ed-gold);
  font-family: var(--ed-serif); font-size: 1.25rem; color: var(--ed-ink); }
.ed-body img { max-width: 100%; height: auto; border-radius: var(--ed-radius); }
.ed-body hr { border: 0; border-top: 1px solid var(--ed-rule); margin: 2.5em 0; opacity: 1; }

/* tables: full width, quiet rules, scroll only when they really do not fit */
.ed-body table { display: table; width: 100%; table-layout: auto; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; line-height: 1.5;
  background: var(--ed-card); border-radius: var(--ed-radius); overflow: hidden; box-shadow: 0 0 0 1px var(--ed-rule); }
.ed-body th { background: var(--ed-ink); color: #fff; font-weight: 600; text-align: left; padding: .7rem .9rem; }
.ed-body th, .ed-body td { white-space: normal; }
.ed-body td { padding: .65rem .9rem; border-top: 1px solid var(--ed-rule); vertical-align: top; }
.ed-body tr:nth-child(even) td { background: #FCFAF6; }
@media (max-width: 720px) { .ed-body table { display: block; overflow-x: auto; white-space: nowrap; } }

/* author box at the end of the article */
.ed-author { display: flex; gap: 1.1rem; align-items: flex-start; margin: 3rem 0 0; padding: 1.5rem;
  background: var(--ed-paper-2); border-radius: var(--ed-radius); }
.ed-author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.ed-author h2 { font-family: var(--ed-serif); font-size: 1.25rem; margin: 0 0 .3rem; color: var(--ed-ink); }
.ed-author p { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--ed-muted); }

/* "keep reading" cards under the article */
.ed-more { margin: 4rem 0 1rem; padding-top: 2.5rem; border-top: 1px solid var(--ed-rule); }
.ed-more h2 { font-family: var(--ed-serif); font-weight: 650; font-size: 1.7rem; color: var(--ed-ink); margin: 0 0 1.4rem; }
.ed-more__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.5rem; }
.ed-card { display: grid; gap: .45rem; align-content: start; text-decoration: none; color: inherit; }
.ed-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--ed-radius);
  background: var(--ed-paper-2); transition: transform 200ms ease; }
.ed-card:hover img { transform: translateY(-2px); }
.ed-card__kicker { font: 700 .72rem/1 var(--ed-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ed-accent); margin-top: .4rem; }
.ed-card__title { font-family: var(--ed-serif); font-weight: 650; font-size: 1.15rem; line-height: 1.3; color: var(--ed-ink); }
.ed-card:hover .ed-card__title { text-decoration: underline; text-underline-offset: .15em; }

/* ==========================================================================
   Shortcode components (blocks.py). Global on purpose.
   ========================================================================== */
.lig-cta::after, .lig-related__more::after { content: "\2192"; }

/* :btn -- the one loud thing on the page */
.lig-cta-wrap { margin: 1.6em 0; }
.lig-cta { display: inline-flex; align-items: center; gap: .6rem; padding: .9rem 1.4rem; border-radius: 8px;
  background: var(--ed-accent); color: #fff !important; font: 600 1rem/1.2 var(--ed-sans); text-decoration: none !important;
  box-shadow: 0 6px 18px -8px rgb(194 65 12 / .6); transition: background 150ms ease, transform 150ms ease; }
.lig-cta:hover { background: var(--ed-accent-dark); transform: translateY(-1px); }
.lig-cta:focus-visible { outline: 3px solid var(--ed-gold); outline-offset: 3px; }

/* :interlink / :update -- related reading */
.lig-related { display: grid; gap: .2rem; margin: 1.8em 0; padding: 1rem 1.2rem 1.05rem; text-decoration: none !important;
  background: var(--ed-card); border: 1px solid var(--ed-rule); border-left: 4px solid var(--ed-ink);
  border-radius: var(--ed-radius); transition: border-color 150ms ease, box-shadow 150ms ease; }
.lig-related:hover { border-color: var(--ed-ink); box-shadow: 0 8px 24px -16px rgb(20 33 61 / .5); }
.lig-related__label { font: 700 .72rem/1 var(--ed-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ed-accent); }
.lig-related__title { font-family: var(--ed-serif); font-weight: 650; font-size: 1.2rem; line-height: 1.3; color: var(--ed-ink); }
.lig-related__more { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--ed-link); }
.lig-related--update { border-left-color: var(--ed-gold); }

/* :proscons */
.lig-pc { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.8em 0; }
.lig-pc__col { padding: 1.1rem 1.2rem; background: var(--ed-card); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); }
.lig-pc__title { font-family: var(--ed-serif); font-weight: 650; font-size: 1.1rem; margin: 0 0 .6rem; }
.lig-pc__col--pro .lig-pc__title { color: var(--ed-pro); }
.lig-pc__col--con .lig-pc__title { color: var(--ed-con); }
.lig-pc ul { list-style: none; padding: 0; margin: 0; }
.lig-pc li { position: relative; padding-left: 1.6rem; margin: .5em 0; font-size: 1rem; line-height: 1.55; }
.lig-pc li::before { position: absolute; left: 0; top: .05em; font-weight: 700; }
.lig-pc__col--pro li::before { content: "\2713"; color: var(--ed-pro); }
.lig-pc__col--con li::before { content: "\2715"; color: var(--ed-con); }

/* :faqs -- native details */
.lig-faq { margin: 1.4em 0 2em; border-top: 1px solid var(--ed-rule); }
.lig-faq__item { border-bottom: 1px solid var(--ed-rule); }
.lig-faq__q { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 1rem 0; font-family: var(--ed-serif); font-weight: 650; font-size: 1.12rem; line-height: 1.35; color: var(--ed-ink); }
.lig-faq__q::-webkit-details-marker { display: none; }
.lig-faq__q::after { content: "+"; flex: none; font: 400 1.4rem/1 var(--ed-sans); color: var(--ed-accent); }
.lig-faq__item[open] > .lig-faq__q::after { content: "\2212"; }
.lig-faq__q:focus-visible { outline: 3px solid var(--ed-gold); outline-offset: 2px; }
.lig-faq__a { padding: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.65; color: var(--ed-text); }

/* :alert--* -- a note, not an alarm */
.lig-note { margin: 1.6em 0; padding: 1rem 1.2rem; background: #FFF7E8; border-left: 4px solid var(--ed-gold); border-radius: 0 var(--ed-radius) var(--ed-radius) 0; }
.lig-note__label { display: block; font: 700 .72rem/1 var(--ed-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ed-accent-dark); margin-bottom: .45rem; }
.lig-note p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .lig-cta, .lig-related { transition: none; } .lig-cta:hover { transform: none; } }

/* ==========================================================================
   Shared pieces: wrapper, eyebrow, section heads
   ========================================================================== */
.ed-wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 1.5rem); }
.ed-eyebrow { font: 700 .78rem/1 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ed-accent); margin: 0 0 1rem; }
.ed-sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem;
  margin: 0 0 1.5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--ed-rule); }
.ed-sechead h2 { font-family: var(--ed-serif); font-weight: 650; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--ed-ink); margin: 0; }
.ed-sechead a { color: var(--ed-link); font-weight: 600; text-decoration: none; }
.ed-sechead a:hover { color: var(--ed-accent); }

/* ==========================================================================
   Ask-about-Germany: the homepage box and the quiet nudges elsewhere
   ========================================================================== */
.ed-ask { margin: 2rem 0 0; max-width: 40rem; }
.ed-ask__label { display: block; font-weight: 600; color: var(--ed-ink); margin: 0 0 .6rem; }
.ed-ask__row { display: flex; gap: .5rem; padding: .4rem; background: var(--ed-card); border: 1px solid var(--ed-rule);
  border-radius: 14px; box-shadow: 0 12px 30px -18px rgb(20 33 61 / .45); }
.ed-ask__row:focus-within { border-color: var(--ed-ink); }
.ed-ask__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .7rem .8rem;
  font: 400 1.05rem/1.3 var(--ed-sans); color: var(--ed-text); }
.ed-ask__btn { flex: none; border: 0; border-radius: 10px; padding: .7rem 1.3rem; background: var(--ed-accent); color: #fff;
  font: 600 1rem/1 var(--ed-sans); cursor: pointer; }
.ed-ask__btn:hover { background: var(--ed-accent-dark); }
.ed-ask__btn:focus-visible, .ed-ask__chip:focus-visible { outline: 3px solid var(--ed-gold); outline-offset: 2px; }
.ed-ask__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; }
.ed-ask__chip { border: 1px solid var(--ed-rule); background: transparent; border-radius: 999px; padding: .4rem .85rem;
  font: 500 .88rem/1.2 var(--ed-sans); color: var(--ed-ink); cursor: pointer; }
.ed-ask__chip:hover { border-color: var(--ed-ink); background: var(--ed-card); }
.ed-ask__note { margin: .8rem 0 0; font-size: .85rem; color: var(--ed-muted); }

.ed-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
  margin: 3rem 0 0; padding: 1.25rem 1.4rem; background: var(--ed-card); border: 1px solid var(--ed-rule);
  border-left: 4px solid var(--ed-accent); border-radius: var(--ed-radius); }
.ed-nudge--wide { margin: 0 0 3rem; }
.ed-nudge__title { font-family: var(--ed-serif); font-weight: 650; font-size: 1.15rem; color: var(--ed-ink); margin: 0 0 .2rem; }
.ed-nudge__text { margin: 0; font-size: .92rem; color: var(--ed-muted); }
.ed-nudge__btn { border: 1px solid var(--ed-ink); background: transparent; color: var(--ed-ink); border-radius: 8px;
  padding: .65rem 1.1rem; font: 600 .95rem/1 var(--ed-sans); cursor: pointer; white-space: nowrap; }
.ed-nudge__btn:hover { background: var(--ed-ink); color: #fff; }
.ed-toc__ask { display: none; }
@media (min-width: 992px) {
  .ed-toc__ask { display: grid; gap: .2rem; width: 100%; margin: 1.5rem 0 0; padding: .9rem 0 0; text-align: left;
    background: none; border: 0; border-top: 1px solid var(--ed-rule); font: 400 .85rem/1.4 var(--ed-sans);
    color: var(--ed-muted); cursor: pointer; }
  .ed-toc__ask strong { color: var(--ed-accent); font-weight: 600; }
  .ed-toc__ask:hover strong { text-decoration: underline; }
}

/* ==========================================================================
   Homepage
   ========================================================================== */
body.ed-home main > .container { max-width: 1320px; }
.ed-home-hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: radial-gradient(60rem 30rem at 85% -10%, #F6E3D3 0, transparent 60%), var(--ed-paper); }
.ed-home-hero__title { font-family: var(--ed-serif); font-weight: 700; font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4.6rem);
  line-height: 1.02; letter-spacing: -.025em; color: var(--ed-ink); max-width: 15ch; margin: 0 0 1.2rem; text-wrap: balance; }
.ed-home-hero__lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.55; color: var(--ed-muted); max-width: 38rem; margin: 0; }
.ed-home-hero__lead strong { color: var(--ed-ink); }

.ed-stages { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.ed-stages__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; }
.ed-stage { --st: var(--ed-accent); display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.3rem; background: var(--ed-card);
  border: 1px solid var(--ed-rule); border-top: 4px solid var(--st); border-radius: var(--ed-radius); scroll-margin-top: 1rem; }
.ed-stage--coming { --st: #C2410C; } .ed-stage--new { --st: #1E3A8A; } .ed-stage--settled { --st: #166534; }
.ed-stage__num { font: 600 .78rem/1 var(--ed-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ed-muted); margin: 0 0 .7rem; }
.ed-stage__num b { color: var(--st); margin-right: .3rem; }
.ed-stage__title { font-family: var(--ed-serif); font-weight: 700; font-size: 1.6rem; line-height: 1.15; color: var(--ed-ink); margin: 0 0 .5rem; }
.ed-stage__lead { font-size: .95rem; line-height: 1.55; color: var(--ed-muted); margin: 0 0 1rem; }
.ed-stage__list { list-style: none; counter-reset: st; padding: 0; margin: 0 0 1.2rem; }
.ed-stage__list li { counter-increment: st; border-top: 1px solid var(--ed-rule); }
.ed-stage__list a { display: grid; grid-template-columns: 1.6rem 1fr; padding: .55rem 0; color: var(--ed-ink); text-decoration: none; font-size: .95rem; line-height: 1.4; }
.ed-stage__list a::before { content: counter(st, decimal-leading-zero); font-size: .75rem; font-weight: 600; color: var(--ed-muted); padding-top: .15rem; }
.ed-stage__list a:hover { color: var(--st); }
.ed-stage__cta { margin-top: auto; display: inline-flex; align-items: baseline; gap: .5rem; font-weight: 600; color: var(--st); text-decoration: none; }
.ed-stage__cta small { color: var(--ed-muted); font-weight: 500; }
.ed-stage__cta:hover { text-decoration: underline; }

/* the existing promo band, finder and lower sections, re-skinned to the paper palette */
body.ed .lig-promo-band { background: var(--ed-paper); }
body.ed .lx-quiz { background: var(--ed-paper-2); }
body.ed .lx-quiz h2 { font-family: var(--ed-serif); color: var(--ed-ink); letter-spacing: -.02em; }
body.ed .lig-home { --h-ink: var(--ed-ink); --h-body: var(--ed-muted); --h-line: var(--ed-rule); --h-bg: var(--ed-card); --h-bg2: var(--ed-paper-2); --h-accent: var(--ed-accent); }
body.ed .lig-sec__head h2, body.ed .lig-card__title { font-family: var(--ed-serif); }
body.ed .lig-card { box-shadow: none; }
body.ed .lig-promo__date { background: var(--ed-accent); }
body.ed .lig-promo { border-left-color: var(--ed-accent); }

.ed-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.ed-topic { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; background: var(--ed-card);
  border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); color: var(--ed-ink); text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease; }
.ed-topic:hover { border-color: var(--ed-ink); transform: translateY(-1px); }
.ed-topic img { width: 28px; height: 28px; flex: none; }
.ed-topic__name { flex: 1; font-weight: 600; font-size: .98rem; }
.ed-topic__count { flex: none; min-width: 2rem; text-align: center; padding: .15rem .45rem; border-radius: 999px;
  background: var(--ed-paper-2); font-size: .8rem; font-weight: 600; color: var(--ed-muted); }

/* ==========================================================================
   Category hub
   ========================================================================== */
.ed-catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.75rem 1.5rem; margin: 0 0 3rem; }
.ed-card__date { font-size: .82rem; color: var(--ed-muted); }
@media (min-width: 992px) { .ed-grid--cat .ed-body { grid-column: 2; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.ed-footer { margin-top: 4rem; background: var(--ed-paper-2); border-top: 1px solid var(--ed-rule); color: var(--ed-text); font-family: var(--ed-sans); }
.ed-footer__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 2.5rem; }
@media (min-width: 640px) { .ed-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .ed-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; } }
.ed-footer__logo img { display: block; height: auto; }
.ed-footer__about p { margin: 1rem 0 1.2rem; max-width: 26rem; font-size: .95rem; line-height: 1.6; color: var(--ed-muted); }
.ed-footer__ask { border: 0; background: var(--ed-ink); color: #fff; border-radius: 8px; padding: .65rem 1.1rem;
  font: 600 .92rem/1 var(--ed-sans); cursor: pointer; }
.ed-footer__ask:hover { background: var(--ed-accent); }
.ed-footer__head { font: 700 .75rem/1 var(--ed-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ed-ink); margin: .4rem 0 1rem; }
.ed-footer__col ul { list-style: none; padding: 0; margin: 0; }
.ed-footer__col li { margin: 0 0 .55rem; }
.ed-footer__col a { color: var(--ed-text); text-decoration: none; font-size: .95rem; }
.ed-footer__col a:hover { color: var(--ed-accent); text-decoration: underline; }
.ed-footer__social { display: flex; gap: .9rem; margin-top: 1.2rem; }
.ed-footer__social a { color: var(--ed-ink); }
.ed-footer__social a:hover { color: var(--ed-accent); }
.ed-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.2rem; padding-bottom: 1.6rem;
  border-top: 1px solid var(--ed-rule); font-size: .82rem; color: var(--ed-muted); }
.ed-footer__base p { margin: 0; max-width: 46rem; }

/* Latest guides: 8 cards. auto-fill made 5 columns at 1320px, leaving a
   ragged second row of 3 and 235px-wide cards with four-line titles. Fixed
   counts keep two full rows on desktop and four on tablets. */
body.ed .lig-recent { grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 576px) { body.ed .lig-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { body.ed .lig-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
