/* AMBlogs v2 — design system. Palette unchanged from the original theme:
   primary #31B098, dark #68696d, light #f1f6f4, danger #d11f2b.
   Text-bearing teals are darkened tints of the primary to pass WCAG AA. */
:root {
  --c-primary: #31B098;       /* decorative, large shapes, focus on dark */
  --c-primary-700: #1d6f5e;   /* links, buttons (white text 5.9:1) */
  --c-primary-800: #185c4e;   /* hover */
  --c-ink: #16302b;           /* headings, dark sections */
  --c-invert: #C6E1DC;        /* soft teal tint */
  --c-text: #3c4442;          /* body copy (on white 10:1) */
  --c-muted: #68696d;         /* secondary text (on white 5.5:1, on light 5:1) */
  --c-light: #f1f6f4;         /* page surface */
  --c-white: #fff;
  --c-line: #d7e4df;
  --c-danger: #d11f2b;
  --c-link-hover: #185c4e;
  --c-on-deep-hover: #C6E1DC; /* hover tint on permanently dark surfaces (hero, footer, mission band); same in both themes */
  --c-link: #1d6f5e;          /* link and accent text (a lighter teal in dark mode) */
  --c-deep: #16302b;          /* dark sections: hero, footer, mission band */
  --c-focus: #1d6f5e;
  --c-invert-2: #dcefea;
  --c-input-bg: #fff;
  --c-input-border: #8a9692;
  --c-current-bg: #16302b;    /* selected chip / page number */
  --c-current-fg: #fff;
  --c-bad-bg: #fbe9ea;
  --c-bad-fg: #8f1520;
  color-scheme: light;

  --font-display: "Noto Kufi Arabic", "Droid Arabic Kufi", Arimo, sans-serif;
  --font-body: "Noto Kufi Arabic", "Droid Arabic Kufi", Arimo, sans-serif;

  --measure: 46rem;
  --wide: 80rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(22, 48, 43, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  display: flex; flex-direction: column; min-height: 100vh;
  margin: 0; background: var(--c-light); color: var(--c-text);
  font: 1.0625rem/1.9 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-link); text-underline-offset: .2em; }
a:hover { color: var(--c-link-hover); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: var(--c-deep); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; color: #fff; }

h1, h2, h3 { font-family: var(--font-display); color: var(--c-ink); line-height: 1.35; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

.am-wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.am-narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.am-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.am-eyebrow { margin: 0 0 .25rem; font-size: .9rem; color: var(--c-link); font-weight: 600; }
.am-eyebrow a { text-decoration: none; }

/* buttons */
.am-btn, button.action, input.action, .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: .55rem 1.6rem; border: 2px solid var(--c-primary-700); border-radius: 999px;
  background: var(--c-primary-700); color: #fff !important; font: 600 1rem var(--font-body);
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.am-btn:hover, button.action:hover, input.action:hover, .btn:hover { background: var(--c-primary-800); border-color: var(--c-primary-800); }
.am-btn--ghost { background: transparent; color: var(--c-link) !important; }
.am-btn--ghost:hover { background: var(--c-invert); border-color: var(--c-primary-700); }

/* header */
.am-header { background: var(--c-white); border-bottom: 1px solid var(--c-line); position: relative; z-index: 20; }
.am-header__bar { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.am-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--c-ink); }
.am-brand img { height: 2.25rem; width: auto; display: block; }
.am-brand span { font: 700 1.25rem var(--font-display); }
.am-nav-toggle { margin-inline-start: auto; display: none; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1rem; background: transparent; border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-ink); font: 600 1rem var(--font-body); cursor: pointer; }
.am-nav-toggle__bars, .am-nav-toggle__bars::before, .am-nav-toggle__bars::after { display: block; width: 1.1rem; height: 2px; background: currentColor; content: ""; position: relative; }
.am-nav-toggle__bars::before { position: absolute; top: -6px; }
.am-nav-toggle__bars::after { position: absolute; top: 6px; }
.am-nav { order: 2; flex: 1 1 100%; padding-bottom: .5rem; }
.am-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.am-js .am-nav-toggle { display: inline-flex; }
.am-js .am-nav { display: none; position: absolute; inset-inline: 0; top: 100%; order: 0; padding: 0; background: var(--c-white); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); }
.am-js .am-nav.is-open { display: block; }
.am-js .am-nav ul { display: block; padding: .5rem var(--gutter) 1rem; }
.am-nav a { display: block; padding: .5rem .9rem; border-radius: 999px; color: var(--c-ink); text-decoration: none; font-weight: 600; }
.am-js .am-nav a { padding: .75rem .25rem; border-radius: 0; border-bottom: 1px solid var(--c-line); }
.am-nav a:hover { color: var(--c-link); }
.am-nav a[aria-current] { color: var(--c-link); box-shadow: inset 0 -3px 0 var(--c-primary); }
.am-nav__user { padding-inline: var(--gutter); }
@media (min-width: 60rem) {
  .am-nav-toggle, .am-js .am-nav-toggle { display: none; }
  .am-nav, .am-js .am-nav { display: block; position: static; order: 0; flex: 0 1 auto; padding: 0; box-shadow: none; border: 0; margin-inline-start: auto; background: transparent; }
  .am-nav ul, .am-js .am-nav ul { display: flex; flex-wrap: nowrap; gap: .25rem; padding: 0; }
  .am-nav a, .am-js .am-nav a { border: 0; padding: .5rem .9rem; border-radius: 999px; }
  .am-nav a:hover { background: var(--c-light); }
  .am-nav a[aria-current] { box-shadow: none; background: var(--c-invert); color: var(--c-ink); }
}

/* footer */
.am-footer { background: var(--c-deep); color: #d4e4df; margin-top: 0; }
.am-footer a { color: #fff; }
.am-footer a:hover { color: var(--c-on-deep-hover); }
.am-footer :focus-visible { outline-color: #fff; }
.am-footer__grid { display: grid; gap: 2rem; padding-block: 3rem 2rem; grid-template-columns: 1fr; }
.am-footer h2 { font: 700 1.1rem var(--font-body); color: #fff; margin-bottom: .75rem; }
.am-footer ul { list-style: none; margin: 0; padding: 0; }
.am-footer li { margin: .35rem 0; }
.am-footer__brand img { height: 2.5rem; width: auto; filter: brightness(0) invert(1); }
.am-footer__about { max-width: 26rem; margin: .75rem 0 0; }
.am-footer__social { display: flex; gap: .5rem; flex-wrap: wrap; }
.am-footer__social a { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; text-decoration: none; }
.am-footer__social a:hover { background: rgba(255,255,255,.12); }
.am-footer__bar { border-top: 1px solid rgba(255,255,255,.18); padding-block: 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: .92rem; }
.am-footer__lang { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.am-footer__lang ul { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.am-footer__lang a { display: inline-block; padding: .35rem .75rem; border-radius: 999px; color: inherit; }
.am-footer__lang a[aria-current] { background: rgba(255,255,255,.16); text-decoration: none; font-weight: 700; }
@media (min-width: 48rem) { .am-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }

/* page head */
.am-pagehead { background: var(--c-white); border-bottom: 1px solid var(--c-line); padding-block: clamp(2rem, 5vw, 3.5rem); }
.am-pagehead p { max-width: var(--measure); color: var(--c-muted); margin: .75rem 0 0; font-size: 1.1rem; }
.am-pagehead__tools { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.am-chip { display: inline-block; padding: .25rem .9rem; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-white); color: var(--c-ink); text-decoration: none; font-size: .95rem; }
.am-chip:hover { border-color: var(--c-link); color: var(--c-link-hover); }
.am-chip[aria-current] { background: var(--c-current-bg); border-color: var(--c-current-bg); color: var(--c-current-fg); }

/* card grid */
.am-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); }
.am-card { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.am-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.am-card__img { display: block; background: var(--c-invert); }
.am-card__img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.am-card__body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.am-card h2, .am-card h3 { font-size: 1.3rem; }
.am-card h2 a, .am-card h3 a { color: var(--c-ink); text-decoration: none; }
.am-card h2 a::after, .am-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.am-card { position: relative; }
.am-card a:focus-visible { outline-offset: 2px; }
.am-card__summary { font-size: .98rem; margin: 0; }
.am-card__summary p { margin: 0; }
.am-meta { margin: auto 0 0; padding-top: .5rem; font-size: .88rem; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.am-meta a { position: relative; z-index: 1; }

/* pagination */
.am-pagination { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.am-pagination a, .am-pagination span { display: inline-flex; min-width: 2.75rem; min-height: 2.75rem; align-items: center; justify-content: center; padding: 0 .75rem; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-white); text-decoration: none; color: var(--c-ink); }
.am-pagination a:hover { border-color: var(--c-primary-700); }
.am-pagination [aria-current] { background: var(--c-current-bg); color: var(--c-current-fg); border-color: var(--c-current-bg); }

/* article page */
.am-post__head { background: var(--c-white); border-bottom: 1px solid var(--c-line); padding-block: clamp(2rem, 5vw, 3.5rem); }
.am-post__head h1 { max-width: 22ch; max-width: 30ch; }
.am-post__meta { margin-top: 1rem; font-size: .95rem; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.am-post__figure { margin: 0; background: var(--c-light); }
.am-post__figure img { display: block; width: 100%; max-height: 32rem; object-fit: cover; }
.am-post__body { padding-block: clamp(2rem, 5vw, 3.5rem); background: var(--c-white); max-width: none; }
.am-post__body > * { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; }
.am-post__tax { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--c-line); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.am-post__tax h2 { flex-basis: 100%; margin: .5rem 0 0; font: 600 1rem var(--font-body); border: 0; padding: 0; display: block; }

.am-prose { max-width: var(--measure); margin-inline: auto; font-size: 1.125rem; line-height: 2; }
.am-prose > * + * { margin-top: 1.1em; }
.am-prose h2 { margin-top: 2.2em; padding-top: .6em; border-top: 3px solid var(--c-primary); display: inline-block; padding-inline-end: 1.2rem; }
.am-prose h3 { margin-top: 1.8em; }
.am-prose ul, .am-prose ol { padding-inline-start: 1.5rem; }
.am-prose li + li { margin-top: .35em; }
.am-prose img { border-radius: 10px; }
.am-prose blockquote { margin-inline: 0; padding: .5rem 1.25rem; border-inline-start: 4px solid var(--c-primary); background: var(--c-white); color: var(--c-ink); }
.am-prose .post-image img, .am-prose p > img { display: block; margin-inline: auto; }
.am-prose a { font-weight: 600; }
.am-prose sup { font-size: .8em; }

/* related + comments */
.am-related { background: var(--c-white); border-top: 1px solid var(--c-line); }
.am-related h2 { margin-bottom: 1.5rem; }
.am-comments { max-width: var(--measure); margin: 0 auto; padding: 2rem var(--gutter) 3rem; }

/* forms */
label { font-weight: 600; color: var(--c-ink); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], textarea, select {
  width: 100%; min-height: 2.75rem; padding: .5rem .85rem; border: 1px solid var(--c-input-border); border-radius: 10px; background: var(--c-input-bg); color: var(--c-text); font: inherit;
}
textarea { min-height: 8rem; }
.field { margin: 0 0 1.1rem; }
.message { padding: .75rem 1rem; border-radius: 10px; background: var(--c-invert); color: var(--c-ink); }
.message.bad, .message.error { background: var(--c-bad-bg); color: var(--c-bad-fg); }

/* home */
.amh-hero { position: relative; background: var(--c-deep) var(--amh-hero-img, none) center / cover; color: #fff; padding-block: clamp(4rem, 10vw, 7rem); }
.amh-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,48,43,.80), rgba(22,48,43,.93)); }
.amh-hero > * { position: relative; }
.amh-hero h1 { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.6rem); max-width: 18ch; margin: .25rem 0 1rem; }
.amh-hero .am-eyebrow { color: #c9eee4; }
.amh-lead { font-size: 1.2rem; max-width: 44rem; color: #e6f2ef; margin: 0; }
.amh-actions { margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.amh-hero .am-btn { background: #fff; border-color: #fff; color: var(--c-deep) !important; }
.amh-hero .am-btn:hover { background: var(--c-on-deep-hover); border-color: var(--c-on-deep-hover); }
.amh-hero .am-btn--ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff !important; }
.amh-hero .am-btn--ghost:hover { background: rgba(255,255,255,.14); }
.amh-credit { margin: 1.75rem 0 0; font-size: .875rem; color: #c3d6d0; }
.amh-section-title { margin-bottom: 1.5rem; }
.amh-mission { background: var(--c-white); }
.amh-aml { background: var(--c-deep); color: #e3efeb; }
.amh-aml .am-wrap { max-width: var(--wide); }
.amh-aml .am-prose { margin-inline: 0; }
.amh-aml h2 { color: #fff; margin-bottom: 1rem; }
.amh-aml .am-btn { background: #fff; border-color: #fff; color: var(--c-deep) !important; }
.amh-aml :focus-visible { outline-color: #fff; }
/* Rich text from the CMS on the dark surface: light links, headings, quotes */
.amh-aml .am-prose a { color: #c9eee4; }
.amh-aml .am-prose a:hover { color: #fff; }
.amh-aml .am-prose h2, .amh-aml .am-prose h3, .amh-aml .am-prose h4, .amh-aml .am-prose strong { color: #fff; }
.amh-aml .am-prose blockquote { color: #e3efeb; border-inline-start-color: #c9eee4; background: transparent; }
.amh-aml .am-prose code { color: #fff; background: rgba(255,255,255,.12); }
.amh-aml .am-prose hr { border-color: rgba(255,255,255,.3); }
.amh-latest { list-style: none; margin: 0; padding: 0; }
.amh-latest li { padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.amh-latest h3 a { color: var(--c-ink); text-decoration: none; }
.amh-latest h3 a:hover { color: var(--c-link); text-decoration: underline; }
.amh-pub-fallback { display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--c-deep), var(--c-primary-700)); }
.amh-count { font-size: .88rem; color: var(--c-link); font-weight: 600; }
@media (min-width: 62rem) { .amh-feature-lead { grid-column: span 2; } .amh-feature-lead h3 { font-size: 1.7rem; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .am-header, .am-footer, .am-nav-toggle, .am-related, .am-comments { display: none; } body { background: #fff; } }

.am-footer__grid { padding-block: 2.5rem 1.5rem; }
.am-prose h2 { display: block; }
/* search, 404, forms */
.am-search { display: flex; gap: .5rem; max-width: 32rem; margin-top: 1.25rem; }
.am-result { padding: 1.25rem 0; border-bottom: 1px solid var(--c-line); }
.am-result h2 { font-size: 1.3rem; } .am-result a { text-decoration: none; }
.am-center { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); }
.am-center .big { font: 700 clamp(4rem, 14vw, 8rem) var(--font-display); color: var(--c-primary); line-height: 1; }
.am-form { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.5rem; max-width: 28rem; margin-inline: auto; }
.am-comment { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }

main { flex: 1 0 auto; }
h1, h2, h3 { line-height: 1.5; font-weight: 700; }
/* footer links inline */
.am-footer__grid { grid-template-columns: 1fr; }
.am-footer ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
@media (min-width: 48rem) { .am-footer__grid { grid-template-columns: auto 1fr auto; align-items: start; } }
/* comments (silverstripe/comments markup) */
#comments-holder h4 { font: 700 1.4rem var(--font-display); color: var(--c-ink); margin: 0 0 1rem; }
#comments-holder form { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
#comments-holder fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#comments-holder .Actions { margin-top: 1rem; padding: 0; }
#comments-holder ul { list-style: none; margin: 0; padding: 0; }
#comments-holder .comments-list > li, #comments-holder .comment { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
#comments-holder .info { font-size: .9rem; color: var(--c-muted); }
#comments-holder .info .author { color: var(--c-ink); font-weight: 600; }
#comments-holder .comment-text { margin-top: .5rem; }
#comments-holder .comment-text p { margin: 0 0 .5rem; }

/* home: text blocks align to the same edge as the headings and cards */
.amh-latest, .amh-mission .am-prose, .amh-aml .am-prose { max-width: var(--measure); margin-inline: 0; }
/* comment moderation links */
#comments-holder .comment-action-links { margin-top: .75rem; }
#comments-holder .comment-moderation-options { display: flex; gap: .5rem; flex-wrap: wrap; }
#comments-holder .comment-moderation-options a { display: inline-block; padding: .25rem .9rem; border: 1px solid var(--c-line); border-radius: 999px; font-size: .9rem; text-decoration: none; }

/* few items: stretch to fill the row */
.am-grid--fill { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.amh-latest { max-width: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); column-gap: 3rem; }

.am-post__deck { margin: 1rem 0 0; font-size: 1.15rem; color: var(--c-muted); max-width: var(--measure); }
.am-post__figure { margin-block: 2rem 0; max-width: 60rem; }
.am-post__figure img { width: 100%; max-height: none; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-white); }
.am-post__head { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.am-post__figure { margin-inline: auto; margin-block: 2rem 0; background: transparent; max-width: calc(var(--measure) + 2 * var(--gutter)); }
.am-post__body { padding-top: 2rem; }

main > article { background: var(--c-white); }

/* Blog intro: what this blog is for */
.am-pagehead .am-lead { font-size: clamp(1.15rem, 2.5vw, 1.4rem); line-height: 1.7; color: var(--c-ink); max-width: var(--measure); margin: 1rem 0 0; }
.am-pagehead .am-intro { max-width: var(--measure); margin: 1rem 0 0; color: var(--c-muted); }
.am-pagehead .am-intro p { margin: 0 0 .75rem; font-size: 1rem; }

/* Search */
.am-search { display: flex; gap: .4rem; align-items: center; }
.am-search input { min-height: 2.5rem; width: 11rem; padding: 0 .9rem; border: 1px solid var(--c-line); border-radius: 999px; font: inherit; color: var(--c-ink); background: var(--c-white); }
.am-search button { min-height: 2.5rem; padding: 0 1rem; border: 0; border-radius: 999px; background: var(--c-primary-700); color: #fff; font: 600 .95rem var(--font-body); cursor: pointer; }
.am-search button:hover { background: #185c4e; }
@media (max-width: 59.99rem) { .am-header__bar { flex-wrap: wrap; } .am-search { order: 3; flex: 1 1 100%; padding-bottom: .75rem; } .am-search input { flex: 1; width: auto; } }

/* Topic row + card tags */
.am-topics { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.am-topics a { display: inline-block; padding: .4rem 1rem; border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-ink); text-decoration: none; font-weight: 600; background: var(--c-white); }
.am-topics a:hover { background: var(--c-light); }
.am-topics a[aria-current] { background: var(--c-invert); border-color: var(--c-primary); }
.am-card__tags { margin: 0; display: flex; gap: .75rem; flex-wrap: wrap; position: relative; z-index: 2; }
.am-card__tags a { color: var(--c-link); font-size: .875rem; font-weight: 700; text-decoration: none; }
.am-card__tags a:hover { text-decoration: underline; }
.am-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Share + prev/next */
.am-share, .am-pn { margin-top: 2rem; }
.am-share h2 { font-size: 1rem; margin-bottom: .5rem; }
.am-pn { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--c-line); padding-top: 1.5rem; }
.am-pn a { display: block; padding: 1rem 1.1rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-white); color: var(--c-ink); text-decoration: none; font-weight: 700; }
.am-pn a:hover { background: var(--c-light); }
.am-pn small { display: block; color: var(--c-link); font-weight: 600; margin-bottom: .25rem; }
.am-pn__next { grid-column: 1; } .am-pn__prev { grid-column: 2; }
@media (max-width: 39.99rem) { .am-pn { grid-template-columns: 1fr; } .am-pn__next, .am-pn__prev { grid-column: 1; } }

/* reCAPTCHA is 304px wide: scale it down on very small screens instead of overflowing */
.am-comments { overflow-x: clip; }
@media (max-width: 23.5rem) { .am-comments .g-recaptcha { transform: scale(.82); transform-origin: 100% 0; margin-bottom: -14px; } [dir="ltr"] .am-comments .g-recaptcha { transform-origin: 0 0; } }

/* Post footer: tags + share as one light block (not section headings) */
.am-postfoot { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--c-line); display: grid; gap: .9rem; }
.am-postfoot__row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.am-postfoot__label { min-width: 4.5rem; color: var(--c-muted); font-size: .9rem; font-weight: 700; }
.am-postfoot__items { display: flex; flex-wrap: wrap; gap: .5rem; }
.am-pn { margin-top: 1.5rem; border-top: 0; padding-top: 0; }
.am-pn { align-items: stretch; } .am-pn a { margin: 0; align-self: stretch; }
.am-postfoot__row--share { justify-content: center; gap: .75rem; }
.am-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-white); color: var(--c-link); transition: background .15s, color .15s; }
.am-share-btn:hover { background: var(--c-primary-700); color: #fff; }
.am-share-btn:focus-visible { border-radius: 999px; outline-offset: 2px; }
.am-postfoot + .am-pn { margin-top: 1.5rem; }

/* Moderator-only actions: plain muted text links, clearly not tags */
#comments-holder .comment-moderation-options { align-items: center; gap: .25rem 1rem; font-size: .875rem; }
.am-mod__label { color: var(--c-muted); font-weight: 700; }
#comments-holder .comment-moderation-options a { padding: 0; border: 0; border-radius: 0; background: none; color: var(--c-muted); text-decoration: underline; font-size: .875rem; }
#comments-holder .comment-moderation-options a.delete, #comments-holder .comment-moderation-options a.spam { color: var(--c-danger); }
#comments-holder .comment-moderation-options a:hover { color: var(--c-ink); }

/* Featured (lead) article */
.am-feature { display: grid; gap: 1.5rem; margin-bottom: 2.5rem; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; position: relative; }
.am-feature__img { display: block; background: var(--c-invert); min-height: 14rem; }
.am-feature__img img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.am-feature__body { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.am-feature__body .am-eyebrow { margin: 0; }
.am-feature h2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 1.3; }
.am-feature h2 a { color: var(--c-ink); text-decoration: none; }
.am-feature h2 a::after { content: ""; position: absolute; inset: 0; }
.am-feature__summary { font-size: 1.15rem; }
.am-feature__summary p { margin: 0; }
@media (min-width: 48rem) { .am-feature { grid-template-columns: 7fr 5fr; gap: 0; } .am-feature__body { padding: 2.25rem; } .am-feature__img img { aspect-ratio: auto; min-height: 100%; } }

/* Cards without a picture keep the same shape */
.am-ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--c-invert), var(--c-invert-2)); color: var(--c-link); font-weight: 700; font-size: 1.1rem; text-align: center; padding: 1rem; }
.am-card__img.am-ph { aspect-ratio: 16 / 10; }
.am-card__blog { color: var(--c-muted); font-size: .875rem; font-weight: 700; }

/* header search: aligned, and an icon button on small screens */
.am-search { margin: 0; }
.am-search-toggle { display: none; }
.am-backdrop { position: fixed; inset: 0; background: rgba(22, 48, 43, .45); z-index: 15; }
.am-backdrop[hidden] { display: none; }
mark { background: #fde9a8; color: #16302b; padding: 0 .15em; border-radius: 3px; }
.am-section.amh-leadstory { padding-bottom: 0; }
@media (max-width: 59.99rem) {
  .am-js .am-search-toggle { display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto; width: 2.75rem; height: 2.75rem; border: 1px solid var(--c-line); border-radius: 999px; background: transparent; color: var(--c-ink); cursor: pointer; }
  .am-js .am-nav-toggle { margin-inline-start: 0; }
  .am-js .am-header__bar { row-gap: 0; }
  .am-js .am-search { display: flex; max-height: 0; padding: 0 .25rem; opacity: 0; overflow: hidden; visibility: hidden;
    transition: max-height .25s ease, padding .25s ease, opacity .2s ease, visibility 0s linear .25s; }
  .am-js .am-search.is-open { max-height: 5rem; padding: .5rem .25rem .75rem; opacity: 1; visibility: visible;
    transition: max-height .25s ease, padding .25s ease, opacity .2s ease .05s, visibility 0s; }
  @media (prefers-reduced-motion: reduce) { .am-js .am-search, .am-js .am-search.is-open { transition: none; } }
}

@media (max-width: 32rem) {
  .am-brand span { font-size: 1.05rem; }
  .am-js .am-nav-toggle { padding: 0; width: 2.75rem; justify-content: center; }
  .am-nav-toggle > span:not(.am-nav-toggle__bars) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .am-header__bar { flex-wrap: wrap; column-gap: .75rem; }
}
.am-search-toggle:focus-visible, .am-nav-toggle:focus-visible { border-radius: 999px; outline-offset: 2px; }
.am-header__bar { padding-block: .75rem; }
.am-is-search .am-nav a[aria-current] { background: none; box-shadow: none; color: var(--c-ink); }

/* Wide screens: reading column stays ~46rem (best for line length); the side space carries a sticky table of contents */
.am-toc[hidden] { display: none; }
@media (min-width: 75rem) {
  .am-post__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--gutter); align-items: start; }
  .am-post__body > :not(.am-toc) { grid-column: 2; }
  .am-toc { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 1.5rem; justify-self: end; width: min(100%, 15.5rem); padding-inline-end: 1.25rem; border-inline-end: 2px solid var(--c-line); font-size: .92rem; }
  .am-toc__title { margin: 0 0 .75rem; font-weight: 700; color: var(--c-muted); }
  .am-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
  .am-toc a { color: var(--c-ink); text-decoration: none; display: block; line-height: 1.5; }
  .am-toc a:hover { color: var(--c-link); text-decoration: underline; }
  .am-toc a[aria-current] { color: var(--c-link); font-weight: 700; }
}
@media (max-width: 74.99rem) { .am-toc { display: none !important; } }

/* dark mode: follows the system unless the reader chose a theme with the header button */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --c-ink: #e8f2ef;
    --c-text: #cfdcd8;
    --c-muted: #9db0aa;
    --c-light: #0f1a18;
    --c-white: #172623;
    --c-line: #2c403b;
    --c-invert: #234039;
    --c-invert-2: #1d3530;
    --c-link: #6fd6bd;
    --c-link-hover: #a9ecdb;
    --c-deep: #0a1412;
    --c-focus: #4fc7ab;
    --c-danger: #ff7b85;
    --c-input-bg: #0f1a18;
    --c-input-border: #6e8781;
    --c-current-bg: #c6e1dc;
    --c-current-fg: #0f1a18;
    --c-bad-bg: #3b1a1e;
    --c-bad-fg: #ffb9be;
    --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  }
  :root:not([data-theme="light"]) .am-footer { border-top: 1px solid var(--c-line); }
}
@media screen {
:root[data-theme="dark"] {
  color-scheme: dark;
  --c-ink: #e8f2ef;
  --c-text: #cfdcd8;
  --c-muted: #9db0aa;
  --c-light: #0f1a18;
  --c-white: #172623;
  --c-line: #2c403b;
  --c-invert: #234039;
  --c-invert-2: #1d3530;
  --c-link: #6fd6bd;
  --c-link-hover: #a9ecdb;
  --c-deep: #0a1412;
  --c-focus: #4fc7ab;
  --c-danger: #ff7b85;
  --c-input-bg: #0f1a18;
  --c-input-border: #6e8781;
  --c-current-bg: #c6e1dc;
  --c-current-fg: #0f1a18;
  --c-bad-bg: #3b1a1e;
  --c-bad-fg: #ffb9be;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
:root[data-theme="dark"] .am-footer { border-top: 1px solid var(--c-line); }
}
/* the theme button: sun in dark mode (switch to light), moon in light mode */
.am-theme-toggle { display: none; }
.am-js .am-theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--c-line); border-radius: 999px; background: transparent; color: var(--c-ink); cursor: pointer; }
.am-theme-toggle:hover { background: var(--c-light); }
.am-theme-toggle:focus-visible { outline-offset: 2px; }
.am-theme-toggle .am-ico-sun { display: none; }
:root[data-theme="dark"] .am-theme-toggle .am-ico-sun { display: block; }
:root[data-theme="dark"] .am-theme-toggle .am-ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .am-theme-toggle .am-ico-sun { display: block; }
  :root:not([data-theme="light"]) .am-theme-toggle .am-ico-moon { display: none; }
}
/* printing is always light: the dark tokens above are screen-only */
@media print { .am-theme-toggle { display: none !important; } }
