/* =============================================================
   Guides (/guides, /guides/<slug>): reference pages on the identifiers
   and registers behind the directory: BIC, IBAN and national bank codes,
   LEI, payment-firm licences.

   Warm-paper editorial theme (same family as about.html and
   for-agents.html), scoped to body.guide-page. Palette, type and radius come
   from css/elucidate-tokens.css; kicker, button, label and subhead atoms from
   css/elucidate-atoms.css. Everything here is .guide-*.

   Page shape: masthead (bar, kicker, h1, standfirst) → "In short" answer →
   article with a contents column → sources → related guides → coda.
   ============================================================= */

body.guide-page {
  background: var(--eh-paper);
  color: var(--eh-ink);
  font-family: var(--eh-font-body);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
}

body.guide-page .guide-container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* ─── Masthead ──────────────────────────────────────────────── */
body.guide-page .guide-masthead {
  padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--eh-ink-rule);
}
body.guide-page .guide-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 16px;
  margin-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--eh-ink-rule);
  color: var(--eh-ink-soft);
}
body.guide-page .guide-bar a {
  color: inherit;
  font-family: inherit;
  text-decoration: none;
  transition: color .15s var(--eh-ease);
}
body.guide-page .guide-bar a:hover { color: var(--eh-terracotta); }
body.guide-page .guide-bar-mid { flex: 1; height: 1px; background: var(--eh-ink-rule); }
body.guide-page .guide-bar span { white-space: nowrap; }

body.guide-page .guide-h1,
body.guide-page .guide-h2 {
  font-family: var(--eh-font-serif);
  color: var(--eh-ink);
  letter-spacing: -0.02em;
  margin: 0;
}
body.guide-page .guide-h1 {
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1;
  font-weight: 400;
  max-width: 18ch;
  margin-top: 20px;
}
body.guide-page .guide-h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  margin: clamp(48px, 6vw, 80px) 0 20px;
  scroll-margin-top: 96px;
}
body.guide-page .guide-h1 em,
body.guide-page .guide-h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--eh-terracotta);
}
body.guide-page .guide-h3 {
  font-size: clamp(20px, 1.8vw, 24px);
  color: var(--eh-ink);
  margin: 36px 0 12px;
}
body.guide-page .guide-standfirst {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--eh-ink-2);
  max-width: 62ch;
  margin: 28px 0 0;
}

/* ─── "In short": the answer, first ─────────────────────────── */
body.guide-page .guide-answer {
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 24px 28px;
  background: var(--eh-paper-2);
  border-left: 2px solid var(--eh-terracotta);
  max-width: 78ch;
}
body.guide-page .guide-answer .elu-mono-label { color: var(--eh-ink-soft); margin: 0 0 10px; }
body.guide-page .guide-answer p:last-child {
  font-size: 17px;
  line-height: 1.65;
  color: var(--eh-ink);
  margin: 0;
}

/* ─── Article: contents column + prose ──────────────────────── */
body.guide-page .guide-body { padding: 0 0 clamp(72px, 8vw, 120px); }
/* the guides index: a card list straight after the masthead */
body.guide-page .guide-body > .guide-container > .elu-kicker:first-child { padding-top: clamp(40px, 4vw, 56px); }
body.guide-page .guide-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
body.guide-page .guide-toc {
  position: sticky;
  top: 96px;
  padding-top: clamp(40px, 4vw, 56px);
}
body.guide-page .guide-toc .elu-mono-label { color: var(--eh-ink-soft); margin: 0 0 14px; }
body.guide-page .guide-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--eh-ink);
}
body.guide-page .guide-toc li { border-bottom: 1px solid var(--eh-ink-rule); }
body.guide-page .guide-toc a {
  display: block;
  padding: 10px 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--eh-ink-2);
  text-decoration: none;
  transition: color .15s var(--eh-ease);
}
body.guide-page .guide-toc a:hover { color: var(--eh-terracotta); }

body.guide-page .guide-article { max-width: 720px; min-width: 0; }
body.guide-page .guide-article > .guide-h2:first-child { margin-top: clamp(40px, 4vw, 56px); }
body.guide-page .guide-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--eh-ink-2);
  margin: 0;
}
body.guide-page .guide-text + .guide-text,
body.guide-page .guide-list + .guide-text,
body.guide-page .guide-table-wrap + .guide-text,
body.guide-page .guide-parts + .guide-text,
body.guide-page .guide-note + .guide-text { margin-top: 1em; }
body.guide-page .guide-list {
  margin: 1em 0 0;
  padding-left: 1.2em;
  font-size: 17px;
  line-height: 1.7;
  color: var(--eh-ink-2);
}
body.guide-page .guide-list li + li { margin-top: 0.5em; }
body.guide-page .guide-list li::marker { color: var(--eh-terracotta); }
body.guide-page .guide-list strong,
body.guide-page .guide-text strong { color: var(--eh-ink); font-weight: 600; }

/* Links in prose: css/website.css sets a global `a { font-family: Barlow }`. */
body.guide-page .guide-text a,
body.guide-page .guide-list a,
body.guide-page .guide-answer a,
body.guide-page .guide-table a,
body.guide-page .guide-sources a,
body.guide-page .guide-note a {
  font-family: inherit;
  color: var(--eh-terracotta);
  text-decoration: none;
  border-bottom: 1px solid var(--eh-ink-rule-strong);
  transition: border-color .15s var(--eh-ease);
}
body.guide-page .guide-text a:hover,
body.guide-page .guide-list a:hover,
body.guide-page .guide-answer a:hover,
body.guide-page .guide-table a:hover,
body.guide-page .guide-sources a:hover,
body.guide-page .guide-note a:hover { border-color: var(--eh-terracotta); }

body.guide-page code {
  font-family: var(--eh-font-mono);
  font-size: 0.86em;
  background: var(--eh-ember-soft);
  color: var(--eh-ink);
  border-radius: var(--eh-radius-xs);
  padding: 1px 6px;
  white-space: nowrap;
}

/* A code broken into its parts (BIC, IBAN, LEI) */
body.guide-page .guide-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
body.guide-page .guide-parts li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 12px;
  flex: 1 1 auto;
  background: var(--eh-paper-2);
  border-top: 2px solid var(--eh-ink);
  min-width: 0;
}
body.guide-page .guide-parts li.is-optional { border-top-style: dashed; }
body.guide-page .guide-part-code {
  font-family: var(--eh-font-mono);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--eh-ink);
}
body.guide-page .guide-part-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--eh-ink-soft);
  max-width: 15ch;
}

/* Tables */
body.guide-page .guide-table-wrap { margin-top: 28px; overflow-x: auto; }
body.guide-page .guide-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--eh-ink);
  font-size: 15px;
  line-height: 1.5;
}
body.guide-page .guide-table caption {
  caption-side: bottom;
  text-align: left;
  font-size: 13px;
  color: var(--eh-ink-soft);
  padding-top: 10px;
}
body.guide-page .guide-table th {
  text-align: left;
  font-weight: 400;
  color: var(--eh-ink-soft);
  padding: 14px 16px 12px 0;
  border-bottom: 1px solid var(--eh-ink-rule-strong);
  vertical-align: bottom;
}
body.guide-page .guide-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--eh-ink-rule);
  color: var(--eh-ink-2);
  vertical-align: top;
}
body.guide-page .guide-table td:first-child { color: var(--eh-ink); font-weight: 600; min-width: 12ch; }
body.guide-page .guide-table code { white-space: normal; }

/* A bounded caveat inside the prose */
body.guide-page .guide-note {
  margin: 28px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--eh-ink-rule-strong);
  border-radius: var(--eh-radius-xs);
  font-size: 15px;
  line-height: 1.6;
  color: var(--eh-ink-2);
}
body.guide-page .guide-note p { margin: 0; }
body.guide-page .guide-note .elu-mono-label { color: var(--eh-ink-soft); margin: 0 0 8px; }

/* Look it up: a direct link into the directory */
body.guide-page .guide-lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin: 36px 0 0;
  padding: 22px 24px;
  background: var(--eh-navy);
  color: var(--eh-white-muted);
  border-radius: var(--eh-radius-xs);
}
body.guide-page .guide-lookup p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 46ch; }
body.guide-page .guide-lookup strong { color: var(--eh-white); font-weight: 600; }

/* Sources */
body.guide-page .guide-sources {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--eh-ink);
}
body.guide-page .guide-sources li {
  padding: 12px 0;
  border-bottom: 1px solid var(--eh-ink-rule);
  font-size: 15px;
  line-height: 1.55;
  color: var(--eh-ink-2);
}
body.guide-page .guide-reviewed { margin-top: 16px; font-size: 14px; color: var(--eh-ink-soft); }

/* ─── Related guides / the guides index ─────────────────────── */
body.guide-page .guide-related {
  padding: clamp(56px, 6vw, 96px) 0;
  background: var(--eh-paper-2);
  border-top: 1px solid var(--eh-ink-rule);
}
body.guide-page .guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
body.guide-page .guide-cards > li { display: flex; }
body.guide-page .guide-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 26px;
  background: var(--eh-paper);
  border: 1px solid var(--eh-ink-rule);
  border-radius: var(--eh-radius-xs);
  color: inherit;
  font-family: inherit;
  text-decoration: none;
  transition: background-color .15s var(--eh-ease);
}
body.guide-page a.guide-card:hover { border-color: var(--eh-terracotta); }
body.guide-page .guide-card .elu-mono-label { color: var(--eh-terracotta); }
body.guide-page .guide-card-title {
  font-size: clamp(20px, 1.8vw, 24px);
  color: var(--eh-ink);
  margin: 0;
}
body.guide-page .guide-card-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--eh-ink-2);
  margin: 0;
}
body.guide-page .guide-card-more { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--eh-terracotta); }

/* ─── Coda ──────────────────────────────────────────────────── */
body.guide-page .guide-coda {
  padding: clamp(72px, 8vw, 120px) 0;
  border-top: 1px solid var(--eh-ink-rule);
}
body.guide-page .guide-coda-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 720px;
}
body.guide-page .guide-coda .guide-h2 { margin: 0; }
body.guide-page .guide-coda .guide-text { max-width: 60ch; }
body.guide-page .guide-coda-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 8px; }
body.guide-page .guide-coda-actions a:not(.elu-btn) {
  font-family: inherit;
  color: var(--eh-terracotta);
  text-decoration: none;
  border-bottom: 1px solid var(--eh-ink-rule-strong);
  transition: border-color .15s var(--eh-ease);
}
body.guide-page .guide-coda-actions a:not(.elu-btn):hover { border-color: var(--eh-terracotta); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  body.guide-page .guide-grid { grid-template-columns: 1fr; gap: 0; }
  body.guide-page .guide-toc { position: static; padding-top: 32px; }
}
@media (max-width: 640px) {
  body.guide-page .guide-bar { flex-wrap: wrap; gap: 6px 16px; }
  body.guide-page .guide-bar-mid { display: none; }
  body.guide-page .guide-answer { padding: 20px; }
  body.guide-page .guide-parts li { flex: 1 1 40%; }
  body.guide-page .guide-table { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body.guide-page *,
  body.guide-page *::before,
  body.guide-page *::after {
    transition-duration: 0.001s !important;
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
  }
}
