/* AML Casework — guides (articles and the guides index).
   Loaded after /styles.css and reuses its tokens: --ink, --blue, --muted, --border … */

/* ---------- dark title band (keeps the transparent header readable) ---------- */

.g-hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.g-hero__inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(36px, 6vw, 64px)) var(--gutter) clamp(44px, 6vw, 64px);
}
.g-hero__title {
  margin: 16px 0 0;
  max-width: 22em;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.g-hero__lead {
  margin: 18px 0 0;
  max-width: 40em;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--on-dark-muted);
  text-wrap: pretty;
}
.g-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--on-dark-muted);
}

.crumbs { font-size: 13px; color: var(--on-dark-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .5; }
.crumbs a { color: var(--on-dark); }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* ---------- article layout ---------- */

.g-body { padding: clamp(40px, 6vw, 64px) var(--gutter) var(--section-y); }
.g-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  gap: 56px;
}
@media (min-width: 1100px) {
  .g-grid { grid-template-columns: minmax(0, 720px) 260px; justify-content: space-between; }
  .toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; order: 2; }
}

.toc {
  font-size: 14px;
  line-height: 1.45;
  border-left: 2px solid var(--border);
  padding-left: 18px;
}
.toc__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--grey);
  font-weight: 600;
}
.toc ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--blue); }

/* ---------- prose ---------- */

.prose { font-size: 17px; line-height: 1.72; color: var(--ink); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 18px 0 0; text-wrap: pretty; }
.prose h2 {
  margin: 56px 0 0;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.prose h3 {
  margin: 34px 0 0;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 600;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 16px 0 0; padding-left: 1.3em; }
.prose li { margin-top: 8px; padding-left: 4px; }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 600; }
.prose abbr { text-decoration: none; }

/* the short answer, first thing under the title */
.answer {
  margin: 0;
  padding: 22px 26px;
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
}
.answer__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--blue);
  font-weight: 700;
}
.answer p { margin-top: 8px; }
.answer p:first-of-type { margin-top: 6px; }

.note {
  margin: 28px 0 0;
  padding: 18px 22px;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--muted);
}
.note strong { color: var(--ink); }

/* tables */
.table-wrap { margin: 24px 0 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose thead th {
  background: var(--tint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 600; }
.prose caption { caption-side: bottom; padding: 10px 14px; text-align: left; font-size: 13px; color: var(--grey); }

/* fictional case file (simulator walkthrough) */
.case-file {
  margin: 24px 0 0;
  border: 1px solid var(--img-border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.6;
}
.case-file__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.case-file__body { padding: 6px 18px 16px; }
.case-file dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 190px) 1fr; }
.case-file dt, .case-file dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.case-file dt { color: var(--grey); font-size: 13.5px; padding-right: 16px; }
.case-file dl > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 560px) {
  .case-file dl { grid-template-columns: 1fr; }
  .case-file dt { border-bottom: 0; padding-bottom: 0; }
}

/* CTA */
.cta-box {
  position: relative;
  margin: 48px 0 0;
  padding: 30px 32px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  overflow: hidden;
}
.cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 260px at 100% 0%, rgba(43,95,217,.45), transparent 70%);
  pointer-events: none;
}
.cta-box > * { position: relative; }
.cta-box__title { margin: 0; font-size: 1.25rem; line-height: 1.3; font-weight: 600; color: #fff; }
.prose .cta-box p { margin-top: 10px; font-size: 15.5px; line-height: 1.6; color: var(--on-dark-muted); }
.cta-box__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.prose .cta-box a { text-decoration: none; }

/* FAQ */
.faq { margin-top: 56px; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item:first-of-type { border-top: 1px solid var(--border); margin-top: 18px; }
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  position: relative;
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.45;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 15px;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--blue);
}
.faq__item[open] summary::after { content: "−"; }
.faq__a { padding: 0 0 20px; }
.faq__a > p:first-child { margin-top: 0; }

/* sources, author, related */
.refs { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.refs h2 { margin-top: 0; font-size: 1.15rem; }
.refs ol { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.refs li { margin-top: 10px; }

.byline {
  margin-top: 36px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.byline strong { color: var(--ink); }

.related { margin-top: 40px; }
.related h2 { margin-top: 0; font-size: 1.15rem; }
.related ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.related li { margin: 0; padding: 0; }
.related a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.4;
}
.related a:hover { border-color: var(--blue); background: var(--tint); }

/* ---------- guides index ---------- */

.g-list {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.g-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  background: #fff;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.g-card:hover { color: var(--ink); transform: translateY(-3px); border-color: var(--img-border); box-shadow: 0 18px 40px -22px rgba(16,27,45,.3); }
.g-card__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--blue);
}
.g-card__title { margin: 12px 0 0; font-size: 1.15rem; line-height: 1.35; font-weight: 600; text-wrap: balance; }
.g-card__text { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); text-wrap: pretty; flex: 1; }
.g-card__more { margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--blue); }

/* site footer links to guides */
.site-footer__links { margin-top: 16px; }

@media (max-width: 700px) {
  .prose { font-size: 16.5px; }
  .cta-box { padding: 26px 22px; }
  .answer { padding: 18px 20px; }
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

/* narrow screens: tables keep readable columns and scroll inside their frame;
   the current-page crumb repeats the H1, so it is hidden */
@media (max-width: 700px) {
  .table-wrap table { min-width: 600px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 560px) {
  .crumbs li[aria-current] { display: none; }
}
