/* ==========================================================================
   Inspire News — Editorial design system
   Self-contained (no Bootstrap / template CSS required). All classes are
   prefixed with "ed-" so this file can coexist with the legacy theme.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ed-paper: #fbfaf7;
  --ed-surface: #ffffff;
  --ed-sunken: #f3f1ec;
  --ed-ink: #16130f;
  --ed-ink-2: #3f3a33;
  --ed-muted: #6f695f;
  --ed-rule: #e3dfd6;
  --ed-rule-strong: #16130f;
  --ed-accent: #b3201f;          /* masthead red */
  --ed-accent-ink: #ffffff;
  --ed-accent-soft: #fbecea;
  --ed-link: #16130f;
  --ed-focus: #1d5fd1;
  --ed-success: #1f7a4a;
  --ed-success-soft: #e7f4ec;
  --ed-danger: #b3201f;
  --ed-danger-soft: #fbecea;
  --ed-overlay: rgba(22, 19, 15, .55);

  --ed-serif: "Newsreader", "Source Serif 4", Georgia, "Times New Roman", serif;
  --ed-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --ed-step--1: .8125rem;   /* 13 */
  --ed-step-0: 1rem;        /* 16 */
  --ed-step-1: 1.125rem;    /* 18 */
  --ed-step-2: 1.375rem;    /* 22 */
  --ed-step-3: 1.75rem;     /* 28 */
  --ed-step-4: clamp(2rem, 1.4rem + 2.4vw, 2.875rem);   /* 32 → 46 */
  --ed-step-5: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);     /* masthead */

  --ed-space-1: .25rem;
  --ed-space-2: .5rem;
  --ed-space-3: .75rem;
  --ed-space-4: 1rem;
  --ed-space-5: 1.5rem;
  --ed-space-6: 2rem;
  --ed-space-7: 3rem;
  --ed-space-8: 4.5rem;

  --ed-radius: 4px;
  --ed-max: 1240px;
  --ed-measure: 68ch;
  --ed-gutter: clamp(1rem, .5rem + 2vw, 2rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ed-paper: #12110e;
    --ed-surface: #1a1915;
    --ed-sunken: #201e1a;
    --ed-ink: #f0ece4;
    --ed-ink-2: #cfc9bd;
    --ed-muted: #9a9387;
    --ed-rule: #2f2c26;
    --ed-rule-strong: #f0ece4;
    --ed-accent: #ef5a4f;
    --ed-accent-ink: #12110e;
    --ed-accent-soft: #3a1b18;
    --ed-link: #f0ece4;
    --ed-focus: #7aa7ff;
    --ed-success: #5fc28c;
    --ed-success-soft: #173325;
    --ed-danger: #ef5a4f;
    --ed-danger-soft: #3a1b18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ed-paper: #12110e;
  --ed-surface: #1a1915;
  --ed-sunken: #201e1a;
  --ed-ink: #f0ece4;
  --ed-ink-2: #cfc9bd;
  --ed-muted: #9a9387;
  --ed-rule: #2f2c26;
  --ed-rule-strong: #f0ece4;
  --ed-accent: #ef5a4f;
  --ed-accent-ink: #12110e;
  --ed-accent-soft: #3a1b18;
  --ed-link: #f0ece4;
  --ed-focus: #7aa7ff;
  --ed-success: #5fc28c;
  --ed-success-soft: #173325;
  --ed-danger: #ef5a4f;
  --ed-danger-soft: #3a1b18;
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
.ed-body, .ed-body *, .ed-body *::before, .ed-body *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
.ed-body {
  margin: 0;
  background: var(--ed-paper);
  color: var(--ed-ink);
  font: 400 var(--ed-step-0)/1.55 var(--ed-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ed-body img { max-width: 100%; height: auto; display: block; }
.ed-body a { color: var(--ed-link); text-decoration: none; }
.ed-body a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ed-body :focus-visible { outline: 2px solid var(--ed-focus); outline-offset: 2px; border-radius: 2px; }
.ed-body h1, .ed-body h2, .ed-body h3, .ed-body h4 { margin: 0; font-family: var(--ed-serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; color: var(--ed-ink); }
.ed-body p { margin: 0 0 var(--ed-space-4); }
.ed-body button { font: inherit; color: inherit; }
.ed-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-skip { position: absolute; left: var(--ed-space-4); top: -100px; z-index: 100; background: var(--ed-ink); color: var(--ed-paper) !important; padding: var(--ed-space-2) var(--ed-space-4); }
.ed-skip:focus { top: var(--ed-space-2); }

.ed-wrap { width: 100%; max-width: var(--ed-max); margin-inline: auto; padding-inline: var(--ed-gutter); }
.ed-main { min-height: 60vh; padding-bottom: var(--ed-space-8); }

/* ---------- 3. Utility bar + masthead ---------- */
.ed-utility { border-bottom: 1px solid var(--ed-rule); font-size: var(--ed-step--1); color: var(--ed-muted); }
.ed-utility .ed-wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--ed-space-4); min-height: 40px; }
.ed-utility__links { display: flex; gap: var(--ed-space-4); align-items: center; list-style: none; margin: 0; padding: 0; }
.ed-utility__links a { color: var(--ed-ink-2); }

.ed-masthead { padding: var(--ed-space-5) 0 var(--ed-space-4); text-align: center; }
.ed-masthead__brand { font-family: var(--ed-serif); font-weight: 700; font-size: var(--ed-step-5); letter-spacing: -.03em; line-height: 1; color: var(--ed-ink) !important; display: inline-block; }
.ed-masthead__brand:hover { text-decoration: none !important; }
.ed-masthead__brand span { color: var(--ed-accent); }
.ed-masthead__tagline { margin: var(--ed-space-2) 0 0; font-family: var(--ed-serif); font-style: italic; color: var(--ed-muted); font-size: var(--ed-step-0); }

/* ---------- 4. Section navigation (sticky) ---------- */
.ed-nav { position: sticky; top: 0; z-index: 40; background: var(--ed-paper); border-top: 1px solid var(--ed-rule-strong); border-bottom: 1px solid var(--ed-rule); }
.ed-nav .ed-wrap { display: flex; align-items: center; gap: var(--ed-space-2); min-height: 52px; }
.ed-nav__mini { display: none; font-family: var(--ed-serif); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; color: var(--ed-ink) !important; margin-right: var(--ed-space-3); }
.ed-nav__mini span { color: var(--ed-accent); }
.ed-nav.is-stuck .ed-nav__mini { display: inline-block; }
.ed-nav__list { display: flex; gap: var(--ed-space-1); list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; flex: 1; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.ed-nav__list::-webkit-scrollbar { display: none; }
.ed-nav__list a { display: block; padding: var(--ed-space-3) var(--ed-space-3); font-size: .9375rem; font-weight: 500; white-space: nowrap; color: var(--ed-ink-2); border-bottom: 2px solid transparent; }
.ed-nav__list a:hover { color: var(--ed-ink); text-decoration: none; border-bottom-color: var(--ed-rule-strong); }
.ed-nav__list a[aria-current="page"] { color: var(--ed-ink); border-bottom-color: var(--ed-accent); }
.ed-nav__tools { display: flex; align-items: center; gap: var(--ed-space-1); margin-left: auto; }

.ed-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ed-ink); }
.ed-icon-btn:hover { background: var(--ed-sunken); }
.ed-icon-btn svg { width: 20px; height: 20px; }

/* Search panel */
.ed-search { border-bottom: 1px solid var(--ed-rule); background: var(--ed-surface); }
.ed-search[hidden] { display: none; }
.ed-search form { display: flex; gap: var(--ed-space-2); padding-block: var(--ed-space-4); }
.ed-input { flex: 1; min-width: 0; height: 46px; padding: 0 var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); background: var(--ed-paper); color: var(--ed-ink); font: inherit; }
.ed-input:focus { outline: 2px solid var(--ed-focus); outline-offset: 0; border-color: transparent; }
textarea.ed-input { height: auto; padding: var(--ed-space-3) var(--ed-space-4); resize: vertical; }

/* Sections drawer */
.ed-drawer { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 420px) 1fr; }
.ed-drawer[hidden] { display: none; }
.ed-drawer__panel { background: var(--ed-surface); overflow-y: auto; padding: var(--ed-space-5); border-right: 1px solid var(--ed-rule); }
.ed-drawer__scrim { background: var(--ed-overlay); border: 0; cursor: pointer; }
.ed-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--ed-space-5); }
.ed-drawer__group { border-top: 1px solid var(--ed-rule); padding: var(--ed-space-4) 0; }
.ed-drawer__group h2 { font-family: var(--ed-sans); font-size: var(--ed-step--1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-muted); margin-bottom: var(--ed-space-2); }
.ed-drawer__group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--ed-space-1) var(--ed-space-4); }
.ed-drawer__group a { display: block; padding: var(--ed-space-2) 0; font-family: var(--ed-serif); font-size: var(--ed-step-1); }

/* ---------- 5. Buttons, chips, flash ---------- */
.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--ed-space-2); height: 46px; padding: 0 var(--ed-space-5); border-radius: var(--ed-radius); border: 1px solid var(--ed-ink); background: var(--ed-ink); color: var(--ed-paper) !important; font-weight: 600; font-size: .9375rem; cursor: pointer; white-space: nowrap; }
.ed-btn:hover { text-decoration: none !important; opacity: .9; }
.ed-btn--ghost { background: transparent; color: var(--ed-ink) !important; border-color: var(--ed-rule); }
.ed-btn--ghost:hover { border-color: var(--ed-ink); opacity: 1; }
.ed-btn--accent { background: var(--ed-accent); border-color: var(--ed-accent); color: var(--ed-accent-ink) !important; }
.ed-btn--sm { height: 36px; padding: 0 var(--ed-space-4); font-size: var(--ed-step--1); }

.ed-chips { display: flex; flex-wrap: wrap; gap: var(--ed-space-2); list-style: none; margin: 0; padding: 0; }
.ed-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: 999px; background: transparent; font-size: var(--ed-step--1); font-weight: 500; cursor: pointer; color: var(--ed-ink-2) !important; white-space: nowrap; }
.ed-chip:hover { border-color: var(--ed-ink); text-decoration: none !important; }
.ed-chip[aria-pressed="true"], .ed-chip.is-active { background: var(--ed-ink); border-color: var(--ed-ink); color: var(--ed-paper) !important; }

.ed-flash { margin: var(--ed-space-4) 0 0; padding: var(--ed-space-3) var(--ed-space-4); border-radius: var(--ed-radius); border: 1px solid; font-size: .9375rem; display: flex; gap: var(--ed-space-3); align-items: center; justify-content: space-between; }
.ed-flash--success { background: var(--ed-success-soft); border-color: var(--ed-success); color: var(--ed-ink); }
.ed-flash--error { background: var(--ed-danger-soft); border-color: var(--ed-danger); color: var(--ed-ink); }

/* ---------- 6. Typography helpers ---------- */
.ed-kicker { display: inline-block; font-family: var(--ed-sans); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-accent) !important; }
.ed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ed-space-1) var(--ed-space-3); font-size: var(--ed-step--1); color: var(--ed-muted); }
.ed-meta > * + *::before { content: "·"; margin-right: var(--ed-space-3); color: var(--ed-rule); }
.ed-meta--plain > * + *::before { content: none; }

.ed-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ed-space-4); border-top: 3px solid var(--ed-rule-strong); padding-top: var(--ed-space-3); margin: var(--ed-space-7) 0 var(--ed-space-5); }
.ed-section-head h2 { font-size: var(--ed-step-3); }
.ed-section-head a { font-size: var(--ed-step--1); font-weight: 600; white-space: nowrap; }
.ed-section-head--tight { margin-top: var(--ed-space-5); }

.ed-page-head { padding: var(--ed-space-6) 0 var(--ed-space-5); border-bottom: 1px solid var(--ed-rule); margin-bottom: var(--ed-space-6); }
.ed-page-head h1 { font-size: var(--ed-step-4); margin: var(--ed-space-2) 0 var(--ed-space-3); }
.ed-page-head p { color: var(--ed-ink-2); max-width: 60ch; font-size: var(--ed-step-1); margin: 0; }

.ed-breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: var(--ed-space-2); padding: 0; margin: 0; font-size: var(--ed-step--1); color: var(--ed-muted); }
.ed-breadcrumb li + li::before { content: "/"; margin-right: var(--ed-space-2); color: var(--ed-rule); }
.ed-breadcrumb a { color: var(--ed-muted); }

/* ---------- 7. Story cards ---------- */
.ed-card { position: relative; display: flex; flex-direction: column; gap: var(--ed-space-2); min-width: 0; }
.ed-card__media { position: relative; display: block; overflow: hidden; background: var(--ed-sunken); aspect-ratio: 3 / 2; border-radius: 2px; }
.ed-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ed-card:hover .ed-card__media img { transform: scale(1.03); }
.ed-card__media.is-broken img { display: none; }
.ed-card__media.is-broken::after { content: "Inspire News"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--ed-serif); font-weight: 700; color: var(--ed-muted); font-size: var(--ed-step-1); }
.ed-card__title { font-size: var(--ed-step-1); line-height: 1.25; }
.ed-card__title a { color: var(--ed-ink); }
/* whole card clickable while keeping a single link in the a11y tree */
.ed-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ed-card .ed-kicker, .ed-card .ed-meta a { position: relative; z-index: 2; }
.ed-card__dek { color: var(--ed-ink-2); font-size: .9375rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.ed-card--lead .ed-card__title { font-size: var(--ed-step-4); line-height: 1.08; letter-spacing: -.02em; }
.ed-card--lead .ed-card__dek { font-size: var(--ed-step-1); -webkit-line-clamp: 4; font-family: var(--ed-serif); }
.ed-card--lead .ed-card__media { aspect-ratio: 16 / 10; }

.ed-card--compact .ed-card__title { font-size: var(--ed-step-0); }
.ed-card--compact .ed-card__media { aspect-ratio: 16 / 10; }

.ed-card--row { display: grid; grid-template-columns: 1fr 112px; gap: var(--ed-space-4); align-items: start; padding: var(--ed-space-4) 0; border-top: 1px solid var(--ed-rule); }
.ed-card--row .ed-card__media { aspect-ratio: 1; order: 2; }
.ed-card--row .ed-card__body { display: flex; flex-direction: column; gap: var(--ed-space-2); }
.ed-card--row .ed-card__title { font-size: var(--ed-step-0); }

.ed-card--text { padding: var(--ed-space-4) 0; border-top: 1px solid var(--ed-rule); }
.ed-card--text .ed-card__title { font-size: var(--ed-step-0); }
.ed-card--text:first-child { border-top: 0; padding-top: 0; }

.ed-rank { display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--ed-space-3); }
.ed-rank__n { font-family: var(--ed-serif); font-size: var(--ed-step-3); line-height: 1; color: var(--ed-accent); font-weight: 600; }

/* ---------- 8. Layout grids ---------- */
.ed-grid { display: grid; gap: var(--ed-space-6) var(--ed-space-5); }
.ed-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ed-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Front page lead package: lead | secondary | latest rail */
.ed-front { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: var(--ed-space-5); padding-top: var(--ed-space-5); }
.ed-front > * + * { border-left: 1px solid var(--ed-rule); padding-left: var(--ed-space-5); }
.ed-front__secondary { display: flex; flex-direction: column; gap: var(--ed-space-5); }
.ed-front__secondary .ed-card + .ed-card { border-top: 1px solid var(--ed-rule); padding-top: var(--ed-space-5); }
.ed-rail-title { font-family: var(--ed-sans); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-ink); margin: 0 0 var(--ed-space-3); display: flex; align-items: center; gap: var(--ed-space-2); }
.ed-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ed-accent); box-shadow: 0 0 0 0 var(--ed-accent); animation: ed-pulse 2s infinite; }
@keyframes ed-pulse { 0% { box-shadow: 0 0 0 0 rgba(179, 32, 31, .5); } 70% { box-shadow: 0 0 0 8px rgba(179, 32, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(179, 32, 31, 0); } }

.ed-ticker { display: flex; align-items: center; gap: var(--ed-space-4); padding: var(--ed-space-3) 0; border-bottom: 1px solid var(--ed-rule); font-size: .9375rem; overflow: hidden; }
.ed-ticker__label { flex: none; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-accent); display: flex; align-items: center; gap: var(--ed-space-2); }
.ed-ticker ul { display: flex; gap: var(--ed-space-5); list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.ed-ticker ul::-webkit-scrollbar { display: none; }
.ed-ticker li { white-space: nowrap; font-weight: 500; }

/* Two-column page with sidebar */
.ed-columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--ed-space-7); align-items: start; }
.ed-sidebar { position: sticky; top: 76px; display: flex; flex-direction: column; gap: var(--ed-space-6); }
.ed-box { background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); padding: var(--ed-space-5); }
.ed-box h2 { font-size: var(--ed-step-2); margin-bottom: var(--ed-space-2); }
.ed-box p { color: var(--ed-ink-2); font-size: .9375rem; }

.ed-newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ed-space-6); align-items: center; background: var(--ed-sunken); border-radius: var(--ed-radius); padding: var(--ed-space-6); margin-top: var(--ed-space-7); }
.ed-newsletter h2 { font-size: var(--ed-step-3); margin-bottom: var(--ed-space-2); }
.ed-newsletter p { color: var(--ed-ink-2); margin: 0; }
.ed-inline-form { display: flex; gap: var(--ed-space-2); }
.ed-fine { font-size: .75rem; color: var(--ed-muted); margin-top: var(--ed-space-2); }

/* ---------- 9. Pager / empty states ---------- */
.ed-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--ed-space-4); margin-top: var(--ed-space-6); padding-top: var(--ed-space-5); border-top: 1px solid var(--ed-rule); font-size: var(--ed-step--1); color: var(--ed-muted); }
.ed-pager [aria-disabled="true"] { opacity: .35; pointer-events: none; }
.ed-empty { text-align: center; padding: var(--ed-space-8) var(--ed-space-4); border: 1px dashed var(--ed-rule); border-radius: var(--ed-radius); color: var(--ed-ink-2); }
.ed-empty h2 { font-size: var(--ed-step-2); margin-bottom: var(--ed-space-2); }
.ed-skeleton { background: linear-gradient(90deg, var(--ed-sunken), var(--ed-rule), var(--ed-sunken)); background-size: 200% 100%; animation: ed-shimmer 1.2s infinite; border-radius: 2px; }
@keyframes ed-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
[aria-busy="true"] { opacity: .55; transition: opacity .2s; }

/* ---------- 10. Article ---------- */
.ed-article { max-width: 760px; }
.ed-article__head { padding-top: var(--ed-space-6); }
.ed-article__title { font-size: var(--ed-step-4); line-height: 1.08; letter-spacing: -.02em; margin: var(--ed-space-3) 0 var(--ed-space-4); }
.ed-article__standfirst { font-family: var(--ed-serif); font-size: var(--ed-step-2); line-height: 1.4; color: var(--ed-ink-2); margin: 0 0 var(--ed-space-5); }
.ed-article__byline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--ed-space-4); padding: var(--ed-space-4) 0; border-top: 1px solid var(--ed-rule); border-bottom: 1px solid var(--ed-rule); }
.ed-article__byline strong { color: var(--ed-ink); font-weight: 600; }
.ed-article__figure { margin: var(--ed-space-5) 0; }
.ed-article__figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 2px; background: var(--ed-sunken); }
.ed-article__figure figcaption { font-size: var(--ed-step--1); color: var(--ed-muted); margin-top: var(--ed-space-2); }
.ed-prose { font-family: var(--ed-serif); font-size: 1.1875rem; line-height: 1.7; color: var(--ed-ink); max-width: var(--ed-measure); }
.ed-prose p { margin: 0 0 1.15em; }
.ed-prose > p:first-of-type::first-letter { float: left; font-size: 3.6em; line-height: .85; padding: .06em .08em 0 0; font-weight: 700; color: var(--ed-accent); }
.ed-summary { border-left: 3px solid var(--ed-accent); background: var(--ed-surface); padding: var(--ed-space-4) var(--ed-space-5); margin: 0 0 var(--ed-space-5); border-radius: 0 var(--ed-radius) var(--ed-radius) 0; }
.ed-summary h2 { font-family: var(--ed-sans); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-muted); margin-bottom: var(--ed-space-2); }
.ed-summary p { margin: 0; font-family: var(--ed-serif); font-size: var(--ed-step-1); }
.ed-source-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ed-space-4); margin: var(--ed-space-6) 0; padding: var(--ed-space-5); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); background: var(--ed-surface); }
.ed-source-cta p { margin: 0; color: var(--ed-ink-2); }
.ed-share { display: flex; gap: var(--ed-space-1); align-items: center; }
.ed-tags { display: flex; flex-wrap: wrap; gap: var(--ed-space-2); list-style: none; padding: 0; margin: var(--ed-space-5) 0 0; }
.ed-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--ed-accent); z-index: 70; transition: width .1s linear; }

/* ---------- 11. Footer ---------- */
.ed-footer { background: var(--ed-sunken); border-top: 1px solid var(--ed-rule); padding: var(--ed-space-7) 0 var(--ed-space-5); font-size: .9375rem; }
.ed-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--ed-space-6); }
.ed-footer h2 { font-family: var(--ed-sans); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-muted); margin-bottom: var(--ed-space-3); }
.ed-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ed-space-2); }
.ed-footer a { color: var(--ed-ink-2); }
.ed-footer__brand { font-family: var(--ed-serif); font-size: var(--ed-step-3); font-weight: 700; letter-spacing: -.02em; color: var(--ed-ink) !important; }
.ed-footer__brand span { color: var(--ed-accent); }
.ed-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ed-space-4); margin-top: var(--ed-space-6); padding-top: var(--ed-space-4); border-top: 1px solid var(--ed-rule); color: var(--ed-muted); font-size: var(--ed-step--1); }

/* Account menu (details/summary, no JS dependency) */
.ed-account { position: relative; }
.ed-account summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--ed-space-2); color: var(--ed-ink-2); }
.ed-account summary::-webkit-details-marker { display: none; }
.ed-account__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 220px; background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: var(--ed-space-2); }
.ed-account__menu a, .ed-account__menu button { display: block; width: 100%; text-align: left; padding: var(--ed-space-2) var(--ed-space-3); border-radius: var(--ed-radius); background: none; border: 0; cursor: pointer; font-size: .875rem; color: var(--ed-ink) !important; }
.ed-account__menu a:hover, .ed-account__menu button:hover { background: var(--ed-sunken); text-decoration: none; }
.ed-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--ed-ink); color: var(--ed-paper); display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; }

/* Forms */
.ed-form { display: grid; gap: var(--ed-space-4); max-width: 640px; }
.ed-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ed-space-4); }
.ed-label { display: block; font-size: var(--ed-step--1); font-weight: 600; margin-bottom: var(--ed-space-1); }
.ed-faq details { border-top: 1px solid var(--ed-rule); padding: var(--ed-space-4) 0; }
.ed-faq summary { cursor: pointer; font-family: var(--ed-serif); font-size: var(--ed-step-1); font-weight: 600; list-style-position: outside; }
.ed-faq details p { margin: var(--ed-space-3) 0 0; color: var(--ed-ink-2); }

/* Trending topics cloud */
.ed-topics { display: flex; flex-wrap: wrap; gap: var(--ed-space-3); list-style: none; padding: 0; margin: 0; }
.ed-topic { display: inline-flex; align-items: baseline; gap: var(--ed-space-2); padding: var(--ed-space-2) var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: 999px; background: var(--ed-surface); }
.ed-topic small { color: var(--ed-muted); font-size: .75rem; }

/* ---------- 12. Responsive ---------- */
@media (max-width: 1100px) {
  .ed-front { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .ed-front__latest { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--ed-rule); padding-top: var(--ed-space-5); }
  .ed-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-columns { grid-template-columns: minmax(0, 1fr); }
  .ed-sidebar { position: static; }
  .ed-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .ed-utility__hide-sm { display: none !important; }
  .ed-front { grid-template-columns: minmax(0, 1fr); }
  .ed-front > * + * { border-left: 0; padding-left: 0; border-top: 1px solid var(--ed-rule); padding-top: var(--ed-space-5); }
  .ed-grid--2, .ed-grid--3, .ed-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .ed-grid--4.ed-grid--keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ed-space-5) var(--ed-space-4); }
  .ed-newsletter { grid-template-columns: minmax(0, 1fr); padding: var(--ed-space-5); }
  .ed-inline-form { flex-direction: column; }
  .ed-drawer { grid-template-columns: 1fr; }
  .ed-drawer__scrim { display: none; }
  .ed-form__row { grid-template-columns: 1fr; }
  .ed-footer__grid { grid-template-columns: 1fr; }
  .ed-masthead { padding: var(--ed-space-4) 0 var(--ed-space-3); }
  .ed-masthead__tagline { font-size: var(--ed-step--1); }
  .ed-prose { font-size: 1.125rem; }
  .ed-card--row { grid-template-columns: 1fr 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-body *, .ed-body *::before, .ed-body *::after { animation: none !important; transition: none !important; }
}

@media print {
  .ed-utility, .ed-nav, .ed-search, .ed-footer, .ed-sidebar, .ed-share, .ed-newsletter, .ed-progress, .ed-ad { display: none !important; }
  .ed-columns { display: block; }
  .ed-body { background: #fff; color: #000; }
}

/* Ad slot (paste your AdSense <ins> into _EdAdSlot.cshtml) */
.ed-ad { display: grid; place-items: center; margin: var(--ed-space-6) 0; min-height: 0; }
.ed-ad:empty { display: none; }
.ed-ad__label { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-muted); margin-bottom: var(--ed-space-2); }


/* ==========================================================================
   13. Account pages (sign in, register, password, account management)
   ========================================================================== */
.ed-auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); margin: var(--ed-space-6) auto var(--ed-space-7); max-width: 1040px; border: 1px solid var(--ed-rule); border-radius: 8px; overflow: hidden; background: var(--ed-surface); box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .35); }
.ed-auth__brand { position: relative; padding: var(--ed-space-7) var(--ed-space-6); background: var(--ed-ink); color: var(--ed-paper); display: flex; flex-direction: column; gap: var(--ed-space-5); overflow: hidden; }
.ed-auth__brand::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid var(--ed-accent); opacity: .9; }
.ed-auth__logo { font-family: var(--ed-serif); font-weight: 700; font-size: 2rem; letter-spacing: -.03em; color: var(--ed-paper); }
.ed-auth__logo span { color: var(--ed-accent); }
.ed-auth__tagline { font-family: var(--ed-serif); font-size: var(--ed-step-3); line-height: 1.2; margin: 0; max-width: 18ch; }
.ed-auth__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ed-space-3); font-size: .9375rem; opacity: .92; position: relative; z-index: 1; }
.ed-auth__perks li { display: flex; gap: var(--ed-space-3); align-items: flex-start; }
.ed-auth__perks svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--ed-accent); }
.ed-auth__fine { margin-top: auto; font-size: var(--ed-step--1); opacity: .65; max-width: 30ch; position: relative; z-index: 1; }
.ed-auth__panel { padding: var(--ed-space-7) clamp(1.25rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; }
.ed-auth__head { margin-bottom: var(--ed-space-5); }
.ed-auth__head h1, .ed-auth__msg h1 { font-size: var(--ed-step-4); margin: var(--ed-space-2) 0 var(--ed-space-2); }
.ed-auth__head p, .ed-auth__lede { color: var(--ed-ink-2); margin: 0; }
.ed-auth__lede { margin-bottom: var(--ed-space-4); }
.ed-auth__foot { margin-top: var(--ed-space-5); padding-top: var(--ed-space-4); border-top: 1px solid var(--ed-rule); font-size: .9375rem; color: var(--ed-ink-2); }
.ed-auth__foot p { margin: 0 0 var(--ed-space-2); }
.ed-auth__foot a, .ed-acct a:not(.ed-btn):not(.ed-chip) { color: var(--ed-accent); font-weight: 600; }
.ed-auth__msg { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--ed-space-2); }
.ed-auth__msg p { color: var(--ed-ink-2); max-width: 46ch; margin: 0 0 var(--ed-space-4); }
.ed-auth__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ed-accent-soft); color: var(--ed-accent); margin-bottom: var(--ed-space-2); }
.ed-auth__icon svg { width: 30px; height: 30px; }

.ed-acct .ed-form { max-width: none; gap: var(--ed-space-4); }
.ed-field { display: flex; flex-direction: column; gap: var(--ed-space-1); }
.ed-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ed-space-3); }
.ed-link-sm { font-size: var(--ed-step--1); }
.ed-hint { font-size: var(--ed-step--1); color: var(--ed-muted); margin: 0; }
.ed-field__error, .ed-acct .field-validation-error, .ed-acct .text-danger { color: var(--ed-danger); font-size: var(--ed-step--1); font-weight: 500; }
.ed-field__error:empty, .field-validation-valid { display: none; }
.ed-acct .input-validation-error { border-color: var(--ed-danger) !important; background: var(--ed-danger-soft); }
.ed-form-errors.validation-summary-valid, .ed-acct .validation-summary-valid { display: none; }
.ed-form-errors.validation-summary-errors, .ed-acct .validation-summary-errors { background: var(--ed-danger-soft); border: 1px solid var(--ed-danger); border-radius: var(--ed-radius); padding: var(--ed-space-3) var(--ed-space-4); color: var(--ed-ink); font-size: .9375rem; }
.ed-acct .validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.ed-input--code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .25em; font-size: 1.25rem; }
.ed-password { position: relative; }
.ed-password .ed-input { width: 100%; padding-right: 4.5rem; }
.ed-password__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 var(--ed-space-3); border: 0; border-radius: var(--ed-radius); background: transparent; font-size: var(--ed-step--1); font-weight: 600; color: var(--ed-ink-2); cursor: pointer; }
.ed-password__toggle:hover { background: var(--ed-sunken); }
.ed-meter { height: 4px; border-radius: 4px; background: var(--ed-sunken); overflow: hidden; margin-top: var(--ed-space-1); }
.ed-meter span { display: block; height: 100%; width: 0; background: var(--ed-danger); transition: width .25s, background .25s; }
.ed-meter[data-score="2"] span { background: #c98a12; }
.ed-meter[data-score="3"] span, .ed-meter[data-score="4"] span { background: var(--ed-success); }
.ed-check { display: inline-flex; align-items: center; gap: var(--ed-space-2); font-size: .9375rem; cursor: pointer; user-select: none; }
.ed-check input, .ed-acct input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ed-accent); }
.ed-btn--block { width: 100%; }
.ed-divider { display: flex; align-items: center; gap: var(--ed-space-3); margin: var(--ed-space-5) 0 var(--ed-space-3); color: var(--ed-muted); font-size: var(--ed-step--1); }
.ed-divider::before, .ed-divider::after { content: ""; flex: 1; height: 1px; background: var(--ed-rule); }

/* Account management shell */
.ed-manage { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--ed-space-6); align-items: start; }
.ed-manage__nav { position: sticky; top: 76px; }
.ed-mnav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ed-mnav a { display: block; padding: var(--ed-space-2) var(--ed-space-3); border-radius: var(--ed-radius); color: var(--ed-ink-2) !important; font-weight: 500 !important; font-size: .9375rem; border-left: 3px solid transparent; }
.ed-mnav a:hover { background: var(--ed-sunken); text-decoration: none; }
.ed-mnav a.active { background: var(--ed-surface); color: var(--ed-ink) !important; border-left-color: var(--ed-accent); font-weight: 600 !important; }
.ed-manage__body { background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: 8px; padding: var(--ed-space-6); min-width: 0; }

/* Compatibility layer: styles the standard ASP.NET Identity (Bootstrap) markup used by the
   Manage pages so they match the editorial theme without rewriting each one. */
.ed-acct h3 { font-size: var(--ed-step-3); margin: 0 0 var(--ed-space-4); }
.ed-acct h4 { font-size: var(--ed-step-1); margin: var(--ed-space-5) 0 var(--ed-space-3); }
.ed-acct h5 { font-family: var(--ed-sans); font-size: 1rem; margin: var(--ed-space-4) 0 var(--ed-space-2); }
.ed-acct hr { border: 0; border-top: 1px solid var(--ed-rule); margin: var(--ed-space-5) 0; }
.ed-acct p { color: var(--ed-ink-2); }
.ed-acct .row { display: flex; flex-wrap: wrap; gap: var(--ed-space-5); }
.ed-acct [class*="col-md-"], .ed-acct [class*="col-lg-"], .ed-acct .col { flex: 1 1 320px; min-width: 0; max-width: 560px; }
.ed-acct .col-md-12 { max-width: none; flex-basis: 100%; }
.ed-acct form:not(.ed-form) { display: block; }
.ed-acct .form-floating, .ed-acct .form-group, .ed-acct .mb-3 { display: flex; flex-direction: column; gap: var(--ed-space-1); margin-bottom: var(--ed-space-4); }
.ed-acct .form-floating > label, .ed-acct .form-label, .ed-acct .control-label { order: -1; font-size: var(--ed-step--1); font-weight: 600; color: var(--ed-ink); }
.ed-acct .form-control { width: 100%; height: 46px; padding: 0 var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); background: var(--ed-paper); color: var(--ed-ink); font: inherit; }
.ed-acct textarea.form-control { height: auto; padding: var(--ed-space-3) var(--ed-space-4); }
.ed-acct .form-control:focus { outline: 2px solid var(--ed-focus); border-color: transparent; }
.ed-acct .form-control:disabled, .ed-acct .form-control[readonly] { background: var(--ed-sunken); color: var(--ed-muted); }
.ed-acct .input-group { display: flex; gap: var(--ed-space-2); align-items: stretch; }
.ed-acct .input-group > .form-control { flex: 1; }
.ed-acct .input-group-append, .ed-acct .input-group-text { display: inline-flex; align-items: center; padding: 0 var(--ed-space-3); color: var(--ed-success); font-weight: 700; }
.ed-acct .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--ed-space-2); height: 44px; padding: 0 var(--ed-space-5); margin: 0 var(--ed-space-2) var(--ed-space-2) 0; border-radius: var(--ed-radius); border: 1px solid var(--ed-ink); background: var(--ed-ink); color: var(--ed-paper) !important; font: 600 .9375rem var(--ed-sans); cursor: pointer; text-decoration: none !important; }
.ed-acct .btn:hover { opacity: .9; }
.ed-acct .btn-lg { height: 48px; }
.ed-acct .btn-danger { background: var(--ed-danger); border-color: var(--ed-danger); color: var(--ed-accent-ink) !important; }
.ed-acct .btn-secondary, .ed-acct .btn-default, .ed-acct [class*="btn-outline-"] { background: transparent; color: var(--ed-ink) !important; border-color: var(--ed-rule); }
.ed-acct .btn-link { background: none; border: 0; color: var(--ed-accent) !important; padding: 0; height: auto; }
.ed-acct .w-100 { width: 100%; margin-right: 0; }
.ed-acct .alert { position: relative; padding: var(--ed-space-4) var(--ed-space-5); border-radius: var(--ed-radius); border: 1px solid var(--ed-rule); background: var(--ed-sunken); margin-bottom: var(--ed-space-4); color: var(--ed-ink); }
.ed-acct .alert p { margin: var(--ed-space-1) 0 0; }
.ed-acct .alert-danger { background: var(--ed-danger-soft); border-color: var(--ed-danger); }
.ed-acct .alert-success { background: var(--ed-success-soft); border-color: var(--ed-success); }
.ed-acct .alert-warning { background: #fdf4e3; border-color: #c98a12; }
.ed-acct .alert-info { background: var(--ed-sunken); border-color: var(--ed-rule); }
.ed-acct .btn-close { display: none; }
.ed-acct .checkbox label, .ed-acct .form-check { display: inline-flex; align-items: center; gap: var(--ed-space-2); margin-bottom: var(--ed-space-3); }
.ed-acct code, .ed-acct kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--ed-sunken); border: 1px solid var(--ed-rule); border-radius: 4px; padding: 2px 6px; font-size: .9375rem; }
.ed-acct .table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ed-acct .table th, .ed-acct .table td { text-align: left; padding: var(--ed-space-2) var(--ed-space-3); border-bottom: 1px solid var(--ed-rule); }
.ed-acct ol.list { padding-left: 1.25rem; }
.ed-acct ol.list li { margin-bottom: var(--ed-space-3); color: var(--ed-ink-2); }
.ed-acct #qrCode { margin: var(--ed-space-3) 0; background: #fff; padding: var(--ed-space-3); display: inline-block; border-radius: var(--ed-radius); }

@media (max-width: 860px) {
  .ed-auth { grid-template-columns: minmax(0, 1fr); margin-top: var(--ed-space-4); }
  .ed-auth__brand { display: none; }
  .ed-auth__panel { padding: var(--ed-space-6) var(--ed-space-5); }
  .ed-manage { grid-template-columns: minmax(0, 1fr); gap: var(--ed-space-4); }
  .ed-manage__nav { position: static; }
  .ed-manage__nav .ed-mnav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .ed-manage__nav .ed-rail-title, .ed-manage__nav .ed-mnav + .ed-rail-title, .ed-manage__nav .ed-mnav + .ed-rail-title + .ed-mnav { display: none; }
  .ed-mnav a { border-left: 0; border-bottom: 3px solid transparent; }
  .ed-mnav a.active { border-bottom-color: var(--ed-accent); }
  .ed-manage__body { padding: var(--ed-space-5); }
}

/* ==========================================================================
   Trend insights (Trending/Insights, Trending/Insight, section sidebar)
   ========================================================================== */
.ed-insight-grid { display: grid; gap: var(--ed-space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); margin-bottom: var(--ed-space-7); }
.ed-insight { background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); padding: var(--ed-space-5); display: flex; flex-direction: column; gap: var(--ed-space-3); height: 100%; }
.ed-insight--compact { padding: var(--ed-space-4); }
.ed-insight__head { display: flex; justify-content: space-between; align-items: center; gap: var(--ed-space-3); }
.ed-insight__title { font-family: var(--ed-serif); font-size: var(--ed-step-3); line-height: 1.2; margin: 0; }
.ed-insight--compact .ed-insight__title { font-size: var(--ed-step-2); }
.ed-insight__title a { color: var(--ed-ink); }
.ed-insight__summary { color: var(--ed-ink-2); margin: 0; }
.ed-insight__stats { display: grid; grid-template-columns: auto auto 1fr; gap: var(--ed-space-4); margin: var(--ed-space-2) 0; padding: var(--ed-space-3) 0; border-block: 1px solid var(--ed-rule); }
.ed-insight__stats dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ed-muted); font-weight: 600; }
.ed-insight__stats dd { margin: 0; font-size: var(--ed-step-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-insight__tone dd { padding-top: .45rem; }
.is-up { color: var(--ed-success); }
.is-down { color: var(--ed-danger); }
.ed-tonebar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--ed-sunken); min-width: 80px; }
.ed-tonebar__pos { background: var(--ed-success); }
.ed-tonebar__neu { background: var(--ed-rule-strong); }
.ed-tonebar__neg { background: var(--ed-danger); }
.ed-mood { font-size: .75rem; font-weight: 600; text-transform: capitalize; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--ed-rule); color: var(--ed-ink-2); }
.ed-mood--positive { background: var(--ed-success-soft); border-color: transparent; color: var(--ed-ink); }
.ed-mood--negative { background: var(--ed-danger-soft); border-color: transparent; color: var(--ed-ink); }
.ed-mood--mixed { background: var(--ed-accent-soft); border-color: transparent; color: var(--ed-ink); }
.ed-themes { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--ed-space-4); counter-reset: theme; }
.ed-themes > li { counter-increment: theme; padding-left: 2rem; position: relative; }
.ed-themes > li::before { content: counter(theme); position: absolute; left: 0; top: 0; font-family: var(--ed-serif); font-size: var(--ed-step-2); color: var(--ed-accent); line-height: 1; }
.ed-themes > li > strong { display: block; font-size: var(--ed-step-1); }
.ed-themes > li > span { color: var(--ed-ink-2); }
.ed-themes__stories { margin: var(--ed-space-2) 0 0; padding-left: 1rem; display: grid; gap: var(--ed-space-1); font-size: .9375rem; }
.ed-themes__stories .ed-meta { display: inline; }
.ed-insight__outlook { margin: 0; padding: var(--ed-space-3) var(--ed-space-4); background: var(--ed-sunken); border-left: 3px solid var(--ed-accent); border-radius: 0 var(--ed-radius) var(--ed-radius) 0; }
.ed-insight__foot { display: flex; flex-wrap: wrap; gap: var(--ed-space-3); margin-top: auto; padding-top: var(--ed-space-2); }
.ed-insight__foot a { margin-left: auto; font-weight: 600; }
.ed-drivers { padding-left: 1.5rem; display: grid; gap: var(--ed-space-3); }
.ed-drivers a { font-family: var(--ed-serif); font-size: var(--ed-step-1); color: var(--ed-ink); }

/* Data tables (insights, admin) */
.ed-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); }
.ed-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ed-table th, .ed-table td { padding: var(--ed-space-2) var(--ed-space-3); text-align: left; border-bottom: 1px solid var(--ed-rule); vertical-align: top; }
.ed-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ed-muted); font-weight: 600; background: var(--ed-sunken); white-space: nowrap; }
.ed-table tbody tr:last-child td { border-bottom: 0; }
.ed-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ed-table code { font-size: .8125rem; }

/* ==========================================================================
   Admin › Integrations
   ========================================================================== */
.ed-admin-nav { position: sticky; top: 56px; z-index: 5; background: var(--ed-paper); padding: var(--ed-space-2) 0; border-bottom: 1px solid var(--ed-rule); margin-bottom: var(--ed-space-6); }
.ed-admin-section { margin-bottom: var(--ed-space-8); scroll-margin-top: 120px; }
.ed-admin-section > h2 { font-family: var(--ed-serif); font-size: var(--ed-step-3); margin-bottom: var(--ed-space-2); }
.ed-admin-section > p { color: var(--ed-ink-2); max-width: var(--ed-measure); }
.ed-admin-grid { display: grid; gap: var(--ed-space-5); grid-template-columns: minmax(0, 1fr); margin-top: var(--ed-space-4); }
@media (min-width: 960px) { .ed-admin-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.ed-admin-form { display: grid; gap: var(--ed-space-3); }
.ed-admin-form .ed-input, .ed-admin-form select.ed-input { width: 100%; }
.ed-admin-form fieldset { border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); padding: var(--ed-space-3); margin: 0; display: grid; gap: var(--ed-space-2); }
.ed-admin-form legend { font-size: var(--ed-step--1); font-weight: 600; padding: 0 var(--ed-space-1); }
.ed-row-actions { display: flex; flex-wrap: wrap; gap: var(--ed-space-2); }
.ed-row-actions form { margin: 0; }
.ed-btn--danger { background: transparent !important; color: var(--ed-danger) !important; border: 1px solid var(--ed-danger) !important; }
.ed-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .1rem .5rem; border-radius: 999px; background: var(--ed-sunken); color: var(--ed-ink-2); white-space: nowrap; }
.ed-badge--ok { background: var(--ed-success-soft); color: var(--ed-ink); }
.ed-badge--bad { background: var(--ed-danger-soft); color: var(--ed-ink); }
.ed-badge--accent { background: var(--ed-accent-soft); color: var(--ed-ink); }
.ed-secret { display: flex; gap: var(--ed-space-2); align-items: center; padding: var(--ed-space-4); margin: var(--ed-space-4) 0; background: var(--ed-success-soft); border: 1px solid var(--ed-success); border-radius: var(--ed-radius); flex-wrap: wrap; }
.ed-secret code { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; font-size: .875rem; background: var(--ed-paper); padding: var(--ed-space-2) var(--ed-space-3); border-radius: var(--ed-radius); }
.ed-secret p { flex-basis: 100%; margin: 0; font-size: var(--ed-step--1); }
.ed-codeblock { background: var(--ed-sunken); border: 1px solid var(--ed-rule); border-radius: var(--ed-radius); padding: var(--ed-space-4); overflow-x: auto; font-size: .8125rem; line-height: 1.55; white-space: pre; }
.ed-hint { font-size: var(--ed-step--1); color: var(--ed-muted); margin: 0; }
.ed-dev-toc { display: grid; gap: var(--ed-space-1); font-size: .9375rem; }

/* ==========================================================================
   Account area (Profile, Settings, Sections & feeds, admin pages)
   ========================================================================== */
.ed-manage__main { display: grid; gap: var(--ed-space-5); min-width: 0; }
.ed-panel { background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: 8px; min-width: 0; scroll-margin-top: 90px; }
.ed-panel__head { padding: var(--ed-space-5) var(--ed-space-5) 0; }
.ed-panel__head h2 { font-family: var(--ed-serif); font-size: var(--ed-step-2); margin: 0; }
.ed-panel__head p { color: var(--ed-ink-2); margin: var(--ed-space-1) 0 0; font-size: .9375rem; }
.ed-panel__head--row { display: flex; align-items: center; justify-content: space-between; gap: var(--ed-space-3); flex-wrap: wrap; padding-bottom: var(--ed-space-4); }
.ed-panel__body { padding: var(--ed-space-5); display: grid; gap: var(--ed-space-5); }
.ed-panel__foot { display: flex; gap: var(--ed-space-2); flex-wrap: wrap; padding-top: var(--ed-space-4); border-top: 1px solid var(--ed-rule); }
.ed-panel__sub { font-family: var(--ed-sans); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ed-muted); margin: 0; padding-top: var(--ed-space-2); border-top: 1px solid var(--ed-rule); }
.ed-table-wrap--flush { border: 0; border-top: 1px solid var(--ed-rule); border-radius: 0 0 8px 8px; }
.ed-input--sm { height: 38px; flex: 0 1 220px; }

.ed-form-grid { display: grid; gap: var(--ed-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ed-form-grid .ed-input { width: 100%; }
.ed-field--wide { grid-column: 1 / -1; }
.ed-readonly { display: flex; align-items: center; gap: var(--ed-space-2); flex-wrap: wrap; min-height: 46px; padding: 0 var(--ed-space-3); border: 1px dashed var(--ed-rule); border-radius: var(--ed-radius); background: var(--ed-sunken); overflow-wrap: anywhere; }
.ed-prefix { display: flex; align-items: stretch; }
.ed-prefix > span { display: grid; place-items: center; padding: 0 var(--ed-space-3); border: 1px solid var(--ed-rule); border-right: 0; border-radius: var(--ed-radius) 0 0 var(--ed-radius); background: var(--ed-sunken); color: var(--ed-muted); }
.ed-prefix .ed-input { border-radius: 0 var(--ed-radius) var(--ed-radius) 0; }

/* Toggle switches (checkbox + label text) */
.ed-switches { border: 0; padding: 0; margin: 0; display: grid; gap: 0; }
.ed-switches legend, .ed-choice legend { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ed-muted); font-weight: 600; margin-bottom: var(--ed-space-2); padding: 0; }
.ed-switch { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ed-space-4); padding: var(--ed-space-3) 0; border-bottom: 1px solid var(--ed-rule); cursor: pointer; }
.ed-switch:last-of-type { border-bottom: 0; }
.ed-switch > span { display: grid; gap: 2px; order: -1; }
.ed-switch small { color: var(--ed-muted); font-size: var(--ed-step--1); }
.ed-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin-top: 2px; border-radius: 999px; background: var(--ed-sunken); box-shadow: inset 0 0 0 1px var(--ed-rule); position: relative; cursor: pointer; transition: background .15s; }
.ed-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.ed-switch input:checked { background: var(--ed-accent); box-shadow: none; }
.ed-switch input:checked::after { transform: translateX(18px); }
.ed-switch input:focus-visible { outline: 2px solid var(--ed-focus); outline-offset: 2px; }

/* Segmented radio choice */
.ed-choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--ed-space-2); }
.ed-choice legend { width: 100%; }
.ed-choice__opt { position: relative; }
.ed-choice__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ed-choice__opt span { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: 999px; font-size: .9375rem; font-weight: 500; }
.ed-choice__opt input:checked + span { background: var(--ed-ink); color: var(--ed-paper); border-color: var(--ed-ink); }
.ed-choice__opt input:focus-visible + span { outline: 2px solid var(--ed-focus); outline-offset: 2px; }

/* Link list */
.ed-linklist { list-style: none; margin: 0; padding: 0; display: grid; }
.ed-linklist a { display: grid; gap: 2px; padding: var(--ed-space-3) 2rem var(--ed-space-3) 0; border-bottom: 1px solid var(--ed-rule); color: var(--ed-ink) !important; position: relative; }
.ed-linklist li:last-child a { border-bottom: 0; }
.ed-linklist a::after { content: "›"; position: absolute; right: var(--ed-space-2); top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--ed-muted); }
.ed-linklist a span { color: var(--ed-muted); font-size: var(--ed-step--1); }
.ed-linklist a:hover { text-decoration: none; }
.ed-linklist a:hover strong { text-decoration: underline; }

/* Sticky save bar */
.ed-savebar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: var(--ed-space-3); flex-wrap: wrap; padding: var(--ed-space-3) var(--ed-space-4); background: var(--ed-paper); border: 1px solid var(--ed-rule); border-radius: 8px; box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.ed-savebar p { margin: 0; color: var(--ed-ink-2); font-size: .9375rem; }

/* Sections & feeds picker */
.ed-picker { display: grid; gap: var(--ed-space-5); }
.ed-picker__tools { display: flex; gap: var(--ed-space-4); align-items: center; flex-wrap: wrap; }
.ed-picker__tools .ed-input { flex: 1 1 280px; }
.ed-picker__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ed-space-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.ed-pick { background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.ed-pick.is-on { border-color: var(--ed-accent); box-shadow: inset 3px 0 0 var(--ed-accent); }
.ed-pick__main { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--ed-space-3); padding: var(--ed-space-3) var(--ed-space-4); cursor: pointer; }
.ed-pick__main input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ed-accent); grid-row: span 2; }
.ed-pick__text { display: grid; gap: 2px; }
.ed-pick__text small { color: var(--ed-muted); font-size: var(--ed-step--1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-pick__count { grid-column: 2; font-size: .75rem; color: var(--ed-muted); }
.ed-pick__feeds { border-top: 1px solid var(--ed-rule); padding: var(--ed-space-2) var(--ed-space-4); font-size: .9375rem; }
.ed-pick__feeds summary { cursor: pointer; color: var(--ed-ink-2); font-size: var(--ed-step--1); font-weight: 600; }
.ed-pick__feeds ul { list-style: none; margin: var(--ed-space-2) 0 0; padding: 0; display: grid; gap: var(--ed-space-1); max-height: 240px; overflow: auto; }

/* Profile */
.ed-profile { padding: var(--ed-space-5); display: grid; gap: var(--ed-space-5); }
.ed-profile__card { display: flex; gap: var(--ed-space-5); align-items: flex-start; flex-wrap: wrap; }
.ed-profile__avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none; background: var(--ed-ink); color: var(--ed-paper); display: grid; place-items: center; font: 700 2rem var(--ed-serif); }
.ed-profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ed-profile__who { flex: 1 1 260px; display: grid; gap: var(--ed-space-2); }
.ed-profile__who h2 { font-family: var(--ed-serif); font-size: var(--ed-step-3); margin: 0; }
.ed-profile__who .ed-meta { margin: 0; }
.ed-profile__bio { margin: 0; color: var(--ed-ink-2); }
.ed-profile__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--ed-rule); padding-top: var(--ed-space-4); }
.ed-profile__stats div { text-align: center; }
.ed-profile__stats div + div { border-left: 1px solid var(--ed-rule); }
.ed-profile__stats dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ed-muted); }
.ed-profile__stats dd { margin: 0; font: 600 var(--ed-step-2) var(--ed-serif); }
.ed-upload { cursor: pointer; }
.ed-upload:focus-within { outline: 2px solid var(--ed-focus); outline-offset: 2px; }

/* Banners admin */
.ed-banner-row { display: flex; gap: var(--ed-space-3); align-items: center; }
.ed-banner-swatch { width: 44px; height: 28px; border-radius: 4px; flex: none; border: 1px solid var(--ed-rule); }
.ed-banner-edit { display: grid; gap: var(--ed-space-5); }
.ed-banner-preview { display: flex; align-items: center; justify-content: space-between; gap: var(--ed-space-4); flex-wrap: wrap; min-height: 90px; padding: var(--ed-space-4) var(--ed-space-5); border-radius: 8px; background: #333; color: #fff; }
.ed-banner-preview__text { display: grid; gap: 2px; }
.ed-banner-preview__text strong { font: 700 var(--ed-step-2) var(--ed-serif); }
.ed-banner-preview__btn { display: inline-flex; align-items: center; height: 36px; padding: 0 var(--ed-space-4); border: 2px solid currentColor; border-radius: 999px; font-weight: 600; font-size: .875rem; }
.ed-colors { display: flex; flex-wrap: wrap; gap: var(--ed-space-4); }
.ed-color { display: inline-flex; align-items: center; gap: var(--ed-space-2); font-size: .9375rem; cursor: pointer; }
.ed-color input { width: 44px; height: 32px; padding: 0; border: 1px solid var(--ed-rule); border-radius: 6px; background: none; cursor: pointer; }

@media (max-width: 860px) {
  /* show every account link as one horizontal scroller on small screens */
  .ed-manage__nav nav { display: flex; align-items: center; gap: var(--ed-space-1); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--ed-space-1); }
  .ed-manage__nav .ed-mnav, .ed-manage__nav .ed-mnav + .ed-rail-title + .ed-mnav { display: flex; flex: none; }
  .ed-manage__nav .ed-rail-title { display: none; }
  .ed-manage__nav form { margin: 0 !important; flex: none; }
  .ed-panel__head, .ed-panel__body, .ed-profile { padding-left: var(--ed-space-4); padding-right: var(--ed-space-4); }
  .ed-profile__stats dd { font-size: var(--ed-step-1); }
}

.ed-panel__head a:not(.ed-btn), .ed-switch small a, .ed-readonly a { color: var(--ed-accent) !important; font-weight: 600; }

/* ==========================================================================
   Brand: the Spark symbol (Views/Shared/_EdSpark.cshtml) and the /brand page
   ========================================================================== */
.ed-spark { display: inline-block; width: .82em; height: .82em; vertical-align: -.06em; margin-right: .2em; flex: none; }
.ed-masthead__brand .ed-spark { width: .78em; height: .78em; margin-right: .16em; vertical-align: -.04em; }
.ed-nav__mini .ed-spark, .ed-footer__brand .ed-spark { width: .9em; height: .9em; vertical-align: -.12em; margin-right: .22em; }

.ed-brand { display: grid; gap: var(--ed-space-7); margin-bottom: var(--ed-space-8); }
.ed-brand section > h2 { font-family: var(--ed-serif); font-size: var(--ed-step-3); margin: 0 0 var(--ed-space-2); }
.ed-brand section > p { color: var(--ed-ink-2); max-width: var(--ed-measure); margin: 0 0 var(--ed-space-4); }
.ed-brand-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--ed-rule); border-radius: 12px; overflow: hidden; }
.ed-brand-hero > div { display: grid; place-items: center; padding: var(--ed-space-7) var(--ed-space-5); min-height: 260px; }
.ed-brand-hero img { max-width: 100%; height: auto; }
.ed-brand-hero__dark { background: #16130f; }
.ed-brand-hero__light { background: #fbfaf7; }
.ed-brand-grid { display: grid; gap: var(--ed-space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.ed-asset { border: 1px solid var(--ed-rule); border-radius: 10px; overflow: hidden; background: var(--ed-surface); display: flex; flex-direction: column; }
.ed-asset__preview { display: grid; place-items: center; height: 150px; padding: var(--ed-space-4); background: #fbfaf7; background-image: linear-gradient(45deg, #f1eee7 25%, transparent 25%), linear-gradient(-45deg, #f1eee7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1eee7 75%), linear-gradient(-45deg, transparent 75%, #f1eee7 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.ed-asset__preview--dark { background: #16130f; }
.ed-asset__preview img { max-width: 100%; max-height: 100%; }
.ed-asset__body { padding: var(--ed-space-3) var(--ed-space-4); display: grid; gap: 4px; }
.ed-asset__body strong { font-size: .9375rem; }
.ed-asset__links { display: flex; gap: var(--ed-space-3); font-size: var(--ed-step--1); font-weight: 600; }
.ed-swatches { display: grid; gap: var(--ed-space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.ed-swatch { border: 1px solid var(--ed-rule); border-radius: 10px; overflow: hidden; background: var(--ed-surface); }
.ed-swatch > span { display: block; height: 96px; }
.ed-swatch div { padding: var(--ed-space-3) var(--ed-space-4); display: grid; gap: 2px; font-size: var(--ed-step--1); }
.ed-swatch strong { font-size: .9375rem; }
.ed-swatch code { font-size: .8125rem; }
.ed-typespec { display: grid; gap: var(--ed-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.ed-typespec > div { border: 1px solid var(--ed-rule); border-radius: 10px; padding: var(--ed-space-5); background: var(--ed-surface); }
.ed-typespec .sample-serif { font: 700 2.6rem/1.05 var(--ed-serif); letter-spacing: -.02em; margin: var(--ed-space-2) 0; }
.ed-typespec .sample-sans { font: 600 1.6rem/1.2 var(--ed-sans); margin: var(--ed-space-2) 0; }
.ed-rules { display: grid; gap: var(--ed-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ed-rules ul { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--ed-space-2); color: var(--ed-ink-2); }
.ed-rules h3 { font-family: var(--ed-sans); font-size: 1rem; margin: 0 0 var(--ed-space-2); }
.ed-rules .do h3 { color: var(--ed-success); }
.ed-rules .dont h3 { color: var(--ed-danger); }
@media (max-width: 700px) { .ed-brand-hero { grid-template-columns: minmax(0, 1fr); } }

/* Cookie consent */
.ed-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: var(--ed-space-3); }
.ed-consent__inner { max-width: 1040px; margin: 0 auto; display: flex; gap: var(--ed-space-5); align-items: flex-end; flex-wrap: wrap; background: var(--ed-surface); border: 1px solid var(--ed-rule); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.18); padding: var(--ed-space-5); }
.ed-consent__text { flex: 1 1 420px; }
.ed-consent h2 { font-family: var(--ed-serif); font-size: var(--ed-step-2); margin: 0 0 var(--ed-space-2); }
.ed-consent p { margin: 0; color: var(--ed-ink-2); font-size: .9375rem; }
.ed-consent p a { color: var(--ed-accent) !important; font-weight: 600; }
.ed-consent__more { margin-top: var(--ed-space-3); font-size: .9375rem; }
.ed-consent__more summary { cursor: pointer; font-weight: 600; }
.ed-consent__more .ed-check { display: flex; margin-top: var(--ed-space-2); }
.ed-consent__actions { display: flex; gap: var(--ed-space-2); flex-wrap: wrap; }
.ed-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ed-linkbtn:hover { text-decoration: underline; }
.ed-legal ul { padding-left: 1.2rem; } .ed-legal li { margin-bottom: .5rem; } .ed-legal h2 { scroll-margin-top: 90px; }
.ed-excerpt p { font-size: var(--ed-step-1); }
.ed-source-cta--big { display: flex; gap: var(--ed-space-4); align-items: center; justify-content: space-between; flex-wrap: wrap; padding: var(--ed-space-5); border: 2px solid var(--ed-ink); border-radius: 10px; background: var(--ed-surface); margin: var(--ed-space-5) 0; }
.ed-source-cta--big p { margin: var(--ed-space-1) 0 0; font-size: var(--ed-step-1); }
.ed-source-cta--big .ed-btn { height: 52px; font-size: 1rem; }
/* Card placeholder (no usable image) and the reader's sensitive-content filter */
.ed-card__media--empty { display: grid; place-items: center; background: var(--ed-sunken); color: var(--ed-rule-strong); aspect-ratio: 16 / 9; }
.ed-card__media--empty .ed-spark { width: 22%; height: auto; margin: 0; opacity: .5; }
.ed-card__media.is-sensitive { position: relative; overflow: hidden; }
.ed-card__media.is-sensitive img { filter: blur(18px) grayscale(.4); transform: scale(1.08); }
.ed-sensitive { position: absolute; inset: auto 8px 8px auto; background: rgba(22,19,15,.82); color: #fff; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.ed-coverage { font-weight: 600; color: var(--ed-accent) !important; }
.ed-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
/* Full coverage & sources */
.ed-timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--ed-rule); display: grid; gap: var(--ed-space-3); font-size: .9375rem; }
.ed-timeline li { position: relative; }
.ed-timeline li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--ed-accent); }
.ed-timeline time { display: block; color: var(--ed-muted); font-size: var(--ed-step--1); }
.ed-coverage-source { border-top: 1px solid var(--ed-rule); padding-top: var(--ed-space-3); margin-top: var(--ed-space-3); }
.ed-coverage-source h3 { font-family: var(--ed-sans); font-size: 1rem; margin: 0 0 var(--ed-space-2); }
.ed-source-grid { display: grid; gap: var(--ed-space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-bottom: var(--ed-space-8); }
.ed-source-card { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--ed-space-3); align-items: center; padding: var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: 10px; background: var(--ed-surface); color: var(--ed-ink) !important; }
.ed-source-card:hover { border-color: var(--ed-ink); text-decoration: none !important; }
.ed-source-card img { border-radius: 6px; }
.ed-source-card small { display: block; color: var(--ed-muted); font-size: var(--ed-step--1); }
.ed-source-card__count { text-align: right; font: 700 var(--ed-step-2) var(--ed-serif); }
.ed-source-head { display: flex; gap: var(--ed-space-4); align-items: center; }
.ed-source-head img { border-radius: 10px; border: 1px solid var(--ed-rule); background: #fff; }
.ed-source-head h1 { margin: 0; }
.ed-library-row { display: grid; grid-template-columns: 1fr auto; gap: var(--ed-space-3); align-items: start; border-bottom: 1px solid var(--ed-rule); } .ed-library-row .ed-card { border-bottom: 0; } .ed-library-row__meta { display: grid; gap: 4px; justify-items: end; padding-top: var(--ed-space-3); }
/* Article: coverage banner + AI tools */
.ed-coverage-banner { display: block; margin: var(--ed-space-4) 0; padding: var(--ed-space-3) var(--ed-space-4); border-radius: 8px; background: var(--ed-accent-soft); color: var(--ed-ink) !important; }
.ed-coverage-banner strong { color: var(--ed-accent); margin-right: .4rem; }
.ed-aitools { margin: var(--ed-space-6) 0; padding: var(--ed-space-4) var(--ed-space-5); border: 1px solid var(--ed-rule); border-radius: 10px; background: var(--ed-surface); }
.ed-aitools__buttons { display: flex; flex-wrap: wrap; gap: var(--ed-space-2); align-items: center; }
.ed-aitools__translate { display: inline-flex; gap: var(--ed-space-2); align-items: center; }
.ed-aitools__translate select { height: 34px; padding: 0 var(--ed-space-2); }
.ed-aitools__out { margin: var(--ed-space-4) 0 var(--ed-space-2); padding: var(--ed-space-3) var(--ed-space-4); background: var(--ed-sunken); border-radius: 8px; white-space: pre-line; }
.ed-aitools__out.is-error { background: var(--ed-danger-soft); }
.ed-aitools .ed-chip.is-busy { opacity: .6; pointer-events: none; }
.ed-briefing { margin: 0 0 var(--ed-space-6); padding: var(--ed-space-5); border: 1px solid var(--ed-rule); border-left: 4px solid var(--ed-accent); border-radius: 8px; background: var(--ed-surface); } .ed-briefing h2 { font-family: var(--ed-serif); font-size: var(--ed-step-3); margin: var(--ed-space-2) 0 var(--ed-space-3); } .ed-briefing ul { margin: 0 0 var(--ed-space-3); padding-left: 1.2rem; display: grid; gap: var(--ed-space-2); } .ed-briefing p a { color: var(--ed-accent) !important; font-weight: 600; }
/* Premium */
.ed-premium__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ed-space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ed-premium__perks li { padding: var(--ed-space-4); border: 1px solid var(--ed-rule); border-radius: 10px; display: grid; gap: 4px; }
.ed-premium__perks strong { font-family: var(--ed-serif); font-size: var(--ed-step-1); }
.ed-premium__perks span { color: var(--ed-ink-2); font-size: .9375rem; }
.ed-premium__plans { display: grid; gap: var(--ed-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ed-premium__plan { padding: var(--ed-space-5); border: 2px solid var(--ed-ink); border-radius: 12px; display: grid; gap: var(--ed-space-2); }
.ed-premium__plan h3 { margin: 0; font-family: var(--ed-sans); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.ed-premium__price { font: 700 var(--ed-step-3) var(--ed-serif); margin: 0; }
.ed-premium__status { padding: var(--ed-space-4); border-radius: 10px; background: var(--ed-success-soft); display: grid; gap: var(--ed-space-2); }
.ed-premium__status h2 { margin: 0; font-family: var(--ed-serif); }
[hidden] { display: none !important; }
/* Today's briefing in the section sidebar */
.ed-briefing--side { margin: 0 0 var(--ed-space-5); padding: var(--ed-space-4); border-left-width: 3px; }
.ed-briefing--side .ed-briefing__title { font-size: var(--ed-step-2); line-height: 1.25; margin: var(--ed-space-2) 0; }
.ed-briefing--side ul { font-size: .9375rem; gap: var(--ed-space-2); }
.ed-briefing--side p { font-size: var(--ed-step--1); }
