/* Card Manufacturers Directory
   Scope: .mfg-* only. Loaded on /manufacturers* pages via header.php. */

.mfg-page {
    --mfg-ink: #0f172a;
    --mfg-body: #334155;
    --mfg-muted: #64748b;
    --mfg-line: #e2e8f0;
    --mfg-surface: #ffffff;
    --mfg-tint: #f6f8fc;
    --mfg-brand: #1a468e;
    --mfg-brand-ink: #ffffff;
    --mfg-radius: 18px;
    color: var(--mfg-body);
    background: #fff;
}

.mfg-page .container {
    max-width: 1180px;
}

.mfg-page h1,
.mfg-page h2,
.mfg-page h3,
.mfg-page h4 {
    color: var(--mfg-ink);
    letter-spacing: -0.01em;
    line-height: 1.18;
}

.mfg-page h1 { font-size: clamp(2rem, 4vw, 3.35rem); margin: 0 0 18px; }
.mfg-page h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin: 0 0 14px; }
.mfg-page h3 { font-size: 1.18rem; margin: 0 0 8px; }
.mfg-page p { line-height: 1.7; }

.mfg-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mfg-brand);
    margin-bottom: 12px;
}

.mfg-muted { color: var(--mfg-muted); }
.mfg-mt { margin-top: 18px; }
.mfg-subhead { margin-top: 32px !important; }
.mfg-narrow { max-width: 820px; }
.mfg-link { color: var(--mfg-brand); font-weight: 700; text-decoration: none; }
.mfg-link:hover { text-decoration: underline; }

/* Hero */
.mfg-hero {
    position: relative;
    padding: clamp(48px, 7vw, 86px) 0 clamp(38px, 5vw, 62px);
    background:
        radial-gradient(900px 420px at 88% -10%, rgba(122, 167, 232, 0.24), transparent 65%),
        linear-gradient(160deg, #f7f9fd 0%, #eef3fb 58%, #f8fafc 100%);
    border-bottom: 1px solid var(--mfg-line);
    overflow: clip;
}
.mfg-hero--compact { padding: clamp(38px, 5vw, 60px) 0 clamp(30px, 4vw, 44px); }
.mfg-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}
.mfg-lede {
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    max-width: 68ch;
    color: #3f4d63;
    margin: 0 0 22px;
}
.mfg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.mfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid var(--mfg-line);
    background: #fff;
    color: var(--mfg-ink);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.mfg-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09); }
.mfg-btn--primary {
    background: var(--mfg-brand, #1a468e);
    border-color: transparent;
    color: #fff;
}
.mfg-btn--quiet { background: transparent; }
.mfg-btn:focus-visible,
.mfg-link:focus-visible,
.mfg-card__title a:focus-visible,
.mfg-alpha a:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }

.mfg-hero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.mfg-stat {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--mfg-line);
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.mfg-stat__value { display: block; font-size: 1.75rem; font-weight: 800; color: var(--mfg-ink); line-height: 1.05; }
.mfg-stat__label { display: block; font-size: 0.76rem; color: var(--mfg-muted); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.08em; }

.mfg-preview-note {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-left: 4px solid #d97706;
    background: #fffbeb;
    color: #7c2d12;
    border-radius: 0 10px 10px 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Sections */
.mfg-section { padding: clamp(38px, 5vw, 62px) 0; }
.mfg-section--tint { background: var(--mfg-tint); border-top: 1px solid var(--mfg-line); border-bottom: 1px solid var(--mfg-line); }
.mfg-section--editorial { background: #fff; }
.mfg-section__head { max-width: 780px; margin-bottom: 22px; }
.mfg-section__head p { margin: 0; }
.mfg-prose-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.72fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}
.mfg-prose { max-width: 74ch; }
.mfg-prose h2 { margin-top: 34px; }
.mfg-prose h2:first-child { margin-top: 0; }
.mfg-prose p { margin: 0 0 14px; }
.mfg-prose a { color: var(--mfg-brand); }
.mfg-aside { display: grid; gap: 16px; position: sticky; top: 92px; }
.mfg-aside__card {
    background: #fff;
    border: 1px solid var(--mfg-line);
    border-radius: var(--mfg-radius);
    padding: 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.035);
}
.mfg-aside__card h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mfg-muted); margin-bottom: 12px; }
.mfg-aside__card p { margin: 0 0 10px; font-size: 0.94rem; }
.mfg-aside__card--accent { background: linear-gradient(155deg, #0f2c5c, #1a468e); border-color: transparent; }
.mfg-aside__card--accent h2,
.mfg-aside__card--accent p { color: #e6edf9; }
.mfg-linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.93rem; }
.mfg-linklist a { color: var(--mfg-ink); text-decoration: none; }
.mfg-linklist a:hover { color: var(--mfg-brand); text-decoration: underline; }

/* Era rail */
.mfg-erarail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.mfg-eracard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--mfg-line);
    background: #fff;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.mfg-eracard:hover { transform: translateY(-2px); border-color: #b7c7e6; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08); }
.mfg-eracard__years { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; color: var(--mfg-brand); }
.mfg-eracard__name { font-weight: 800; color: var(--mfg-ink); font-size: 1rem; }
.mfg-eracard__count { font-size: 0.8rem; color: var(--mfg-muted); }

/* Cards */
.mfg-grid { display: grid; gap: 16px; }
.mfg-grid--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mfg-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mfg-line);
    border-radius: var(--mfg-radius);
    background: #fff;
    overflow: hidden;
    min-width: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.mfg-card:hover { transform: translateY(-2px); border-color: #b7c7e6; box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08); }
.mfg-card[hidden] { display: none; }
.mfg-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(140deg, #f2f5fb, #e8eef8);
    border-bottom: 1px solid var(--mfg-line);
    overflow: hidden;
}
.mfg-card__img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.mfg-card__initial { font-size: 2rem; width: 84px; height: 84px; }
.mfg-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--mfg-brand, #1a468e);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.mfg-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mfg-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.mfg-card__title { font-size: 1.08rem; margin: 0; }
.mfg-card__title a { color: var(--mfg-ink); text-decoration: none; }
.mfg-card__title a:hover { color: var(--mfg-brand); }
.mfg-card__years { margin: 0; font-size: 0.82rem; color: var(--mfg-muted); }
.mfg-card__summary { margin: 0; font-size: 0.9rem; line-height: 1.55; color: #475569; flex: 1; }
.mfg-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }

.mfg-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #dbe4f3;
    background: #f5f8fd;
    color: #274070;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.3;
}
.mfg-chip:hover { background: #e9f0fb; }
.mfg-chip--muted { color: #52627a; background: #f8fafc; border-color: var(--mfg-line); font-weight: 600; }

.mfg-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #eef2f7;
    color: #334155;
    border: 1px solid transparent;
    white-space: nowrap;
}
.mfg-badge--active { background: #e7f8ef; color: #0f6b3c; }
.mfg-badge--defunct { background: #f3f4f6; color: #4b5563; }
.mfg-badge--absorbed { background: #eef2ff; color: #3730a3; }
.mfg-badge--renamed { background: #fff7ed; color: #9a3412; }
.mfg-badge--preview { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.mfg-badge--tier { background: #eef4ff; color: #1e40af; }

/* Controls */
.mfg-controls {
    display: grid;
    grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--mfg-line);
    border-radius: var(--mfg-radius);
    background: #f8fafc;
    margin-bottom: 14px;
}
.mfg-field { display: grid; gap: 5px; font-size: 0.8rem; color: var(--mfg-muted); min-width: 0; }
.mfg-field span { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.68rem; }
.mfg-field input,
.mfg-field select {
    width: 100%;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid #cfd9e8;
    border-radius: 10px;
    background: #fff;
    color: var(--mfg-ink);
    font: inherit;
    font-size: 0.9rem;
}
.mfg-field input:focus,
.mfg-field select:focus { outline: 2px solid #2563eb; outline-offset: 1px; border-color: #2563eb; }

.mfg-alpha { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 8px; }
.mfg-alpha a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--mfg-line);
    background: #fff;
    color: var(--mfg-muted);
    font-weight: 800;
    font-size: 0.78rem;
    text-decoration: none;
}
.mfg-alpha a:hover,
.mfg-alpha a.is-active { background: var(--mfg-brand); border-color: var(--mfg-brand); color: #fff; }
.mfg-count { margin: 0 0 14px; font-size: 0.84rem; color: var(--mfg-muted); font-weight: 700; }
.mfg-empty { margin: 22px 0 0; padding: 18px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; }

/* Facets */
.mfg-facetgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mfg-facetgrid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mfg-facet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--mfg-line);
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: var(--mfg-ink);
    font-weight: 700;
}
.mfg-facet:hover { border-color: #b7c7e6; background: #f8fbff; }
.mfg-facet__count { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; border-radius: 999px; background: #eef4ff; color: var(--mfg-brand); font-size: 0.78rem; }

/* Profile hero */
.mfg-profile-hero {
    padding: clamp(34px, 5vw, 62px) 0 clamp(28px, 4vw, 46px);
    background:
        radial-gradient(720px 320px at 88% 0%, color-mix(in srgb, var(--mfg-brand) 16%, transparent), transparent 70%),
        linear-gradient(170deg, #f8fafc, #eef3fb);
    border-bottom: 1px solid var(--mfg-line);
    overflow: clip;
}
.mfg-profile-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
    gap: clamp(26px, 4vw, 50px);
    align-items: center;
}
.mfg-profile-hero__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mfg-profile-hero h1 { margin-bottom: 12px; }
.mfg-profile-hero__lede { font-size: clamp(1rem, 1.25vw, 1.13rem); max-width: 66ch; margin: 0 0 16px; color: #3f4d63; }
.mfg-profile-hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.84rem; color: var(--mfg-muted); margin-bottom: 12px; }
.mfg-profile-hero__meta span { position: relative; }
.mfg-profile-hero__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mfg-profile-hero__media { min-width: 0; }
.mfg-profile-hero__figure { margin: 0; text-align: center; }
.mfg-profile-hero__img { width: 100%; height: auto; max-height: 460px; object-fit: contain; border-radius: 16px; background: #fff; padding: 12px; border: 1px solid var(--mfg-line); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1); }
.mfg-profile-hero__figure figcaption { margin-top: 8px; font-size: 0.78rem; color: var(--mfg-muted); }
.mfg-profile-hero__initial { width: 180px; height: 180px; font-size: 3.4rem; border-radius: 28px; margin: 0 auto; }

.mfg-jump { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--mfg-line); backdrop-filter: blur(8px); }
.mfg-jump .container { display: flex; gap: 4px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; }
.mfg-jump a { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: #475569; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.mfg-jump a:hover { background: #eef4ff; color: var(--mfg-brand); }

.mfg-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.7fr);
    gap: clamp(28px, 4vw, 54px);
    align-items: start;
    padding-top: clamp(30px, 4vw, 48px);
    padding-bottom: clamp(40px, 5vw, 64px);
}
.mfg-detail__main { min-width: 0; }
.mfg-detail__aside { display: grid; gap: 16px; position: sticky; top: 84px; }
.mfg-detail__main > .mfg-section { padding: 30px 0; border-bottom: 1px solid var(--mfg-line); }
.mfg-detail__main > .mfg-section:last-child { border-bottom: 0; }
.mfg-detail__main > .mfg-section:first-child { padding-top: 0; }

.mfg-answer {
    padding: 22px;
    border: 1px solid #dbe6f7;
    border-radius: var(--mfg-radius);
    background: linear-gradient(160deg, #f8fbff, #eef4ff);
}
.mfg-answer h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; color: #31456b; }
.mfg-answer p { margin: 0 0 10px; font-size: 1rem; color: #334155; }
.mfg-answer p:last-child { margin-bottom: 0; }

.mfg-facts { display: grid; gap: 0; margin: 0; }
.mfg-facts__row { display: grid; grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed #e8eef7; font-size: 0.88rem; }
.mfg-facts__row:last-child { border-bottom: 0; }
.mfg-facts dt { color: var(--mfg-muted); font-weight: 700; }
.mfg-facts dd { margin: 0; color: var(--mfg-ink); overflow-wrap: anywhere; }

.mfg-colors { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.mfg-logos { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.mfg-logo { margin: 0; flex: 1 1 220px; max-width: 320px; border: 1px solid var(--mfg-line); border-radius: 12px; background: #fff; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mfg-logo__img { max-width: 100%; height: 96px; width: auto; object-fit: contain; }
.mfg-logo figcaption { font-size: 0.76rem; color: var(--mfg-muted); text-align: center; }.mfg-color { margin: 0; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--mfg-line); border-radius: 12px; background: #fff; min-width: 190px; }
.mfg-color__swatch { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(15, 23, 42, 0.15); flex: 0 0 auto; }
.mfg-color figcaption { display: grid; gap: 2px; font-size: 0.8rem; }
.mfg-color figcaption strong { color: var(--mfg-ink); }
.mfg-color figcaption span { color: var(--mfg-muted); }
.mfg-slogans { margin: 0 0 16px; padding-left: 18px; color: #475569; }

.mfg-timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.mfg-timeline__item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--mfg-line); }
.mfg-timeline__year { font-weight: 800; color: var(--mfg-brand); }
.mfg-timeline__body strong { color: var(--mfg-ink); }
.mfg-timeline__body p { margin: 4px 0 0; font-size: 0.9rem; color: #52627a; }

.mfg-evolution { display: grid; gap: 14px; }
.mfg-evolution__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: center; padding: 12px; border: 1px solid var(--mfg-line); border-radius: 14px; background: #fff; }
.mfg-evolution__media { min-width: 0; }
.mfg-evolution__img { width: 100%; height: 150px; object-fit: contain; background: #f8fafc; border-radius: 10px; }
.mfg-evolution__body p { margin: 0; font-size: 0.92rem; color: #475569; }

.mfg-note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mfg-note { border: 1px solid var(--mfg-line); border-radius: 14px; background: #fff; padding: 16px; }
.mfg-note h3 { font-size: 0.98rem; }
.mfg-note p { margin: 0; font-size: 0.9rem; color: #52627a; }

.mfg-media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mfg-media { margin: 0; border: 1px solid var(--mfg-line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; min-width: 0; }
.mfg-media__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #f8fafc; }
.mfg-subsection { padding: 18px 0; border-top: 1px dashed #e2e8f0; }
.mfg-subsection:first-of-type { border-top: 0; padding-top: 0; }
.mfg-subsection .mfg-section__head { margin-bottom: 12px; }
.mfg-media__cap { display: grid; gap: 4px; padding: 10px 12px 12px; font-size: 0.78rem; line-height: 1.45; }
.mfg-media__type { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--mfg-brand); }
.mfg-media__caption { color: #475569; }
.mfg-media__credit { color: var(--mfg-muted); }
.mfg-media__credit a { color: inherit; }
.mfg-media-gap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.88rem;
}
.mfg-media-gap__icon { font-size: 1.2rem; line-height: 1; color: #94a3b8; }

.mfg-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mfg-person { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--mfg-line); border-radius: 14px; background: #fff; }
.mfg-person__photo { flex: 0 0 auto; }
.mfg-person__img,
.mfg-person__initial { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.mfg-person__body h3 { font-size: 1rem; margin-bottom: 2px; }
.mfg-person__role { margin: 0 0 4px; font-size: 0.78rem; color: var(--mfg-brand); font-weight: 700; }
.mfg-person__body p { margin: 0; font-size: 0.86rem; color: #52627a; }

.mfg-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mfg-place { border: 1px solid var(--mfg-line); border-radius: 14px; overflow: hidden; background: #fff; }
.mfg-place__img { width: 100%; height: 140px; object-fit: cover; }
.mfg-place__body { padding: 12px; }
.mfg-place__body h3 { font-size: 1rem; margin-bottom: 2px; }
.mfg-place__body p { margin: 0; font-size: 0.8rem; }

.mfg-table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--mfg-line); border-radius: 14px; background: #fff; }
.mfg-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.mfg-table caption { text-align: left; font-weight: 800; color: var(--mfg-ink); padding: 14px 16px 8px; }
.mfg-table th,
.mfg-table td { padding: 10px 14px; border-top: 1px solid var(--mfg-line); text-align: left; vertical-align: top; }
.mfg-table th { background: #f8fafc; color: #475569; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.mfg-table a { color: var(--mfg-brand); }
.mfg-table td { overflow-wrap: anywhere; }

.mfg-sources { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 0.88rem; }
.mfg-sources li { color: #475569; }
.mfg-src { font-size: 0.7em; margin-left: 2px; }
.mfg-src a { color: var(--mfg-brand); text-decoration: none; }
.mfg-unverified { margin-top: 20px; padding: 16px; border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; }
.mfg-unverified h3 { font-size: 0.94rem; color: #92400e; }
.mfg-unverified ul { margin: 6px 0 0; padding-left: 18px; font-size: 0.86rem; color: #78350f; }
.mfg-cite { margin-top: 20px; padding: 16px; border: 1px solid var(--mfg-line); border-radius: 12px; background: #f8fafc; }
.mfg-cite h3 { font-size: 0.94rem; }
.mfg-cite code { display: block; font-size: 0.78rem; line-height: 1.55; color: #334155; white-space: pre-wrap; overflow-wrap: anywhere; }

.mfg-cta-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(150deg, #0f2c5c, #1a468e);
    color: #e6edf9;
}
.mfg-cta-inline strong { color: #fff; }
.mfg-cta-inline p { margin: 4px 0 0; font-size: 0.88rem; }
.mfg-cta-inline .mfg-btn { background: #fff; color: #1a468e; border-color: transparent; flex: 0 0 auto; }

.mfg-faq { display: grid; gap: 8px; }
.mfg-faq__item { border: 1px solid var(--mfg-line); border-radius: 12px; background: #fff; padding: 0 16px; }
.mfg-faq__item summary { cursor: pointer; font-weight: 800; color: var(--mfg-ink); padding: 14px 0; list-style-position: inside; }
.mfg-faq__item summary::marker { color: var(--mfg-brand); }
.mfg-faq__answer { padding: 0 0 14px; color: #475569; font-size: 0.92rem; }
.mfg-faq__answer p { margin: 0; }

/* Charts */
.mfg-chart { margin: 18px 0; padding: 16px; border: 1px solid var(--mfg-line); border-radius: 14px; background: #fff; }
.mfg-chart figcaption { font-weight: 800; color: var(--mfg-ink); margin-bottom: 8px; }
.mfg-chart__svg { width: 100%; height: auto; display: block; }
.mfg-chart__svg--donut { max-width: 260px; margin: 0 auto; }
.mfg-chart__table { margin-top: 10px; font-size: 0.82rem; }
.mfg-chart__table summary { cursor: pointer; color: var(--mfg-brand); font-weight: 700; }
.mfg-chart__table table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.mfg-chart__table th,
.mfg-chart__table td { padding: 6px 8px; border-top: 1px solid var(--mfg-line); text-align: left; }
.mfg-chart__table th { background: #f8fafc; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.mfg-chart--timeline .mfg-chart__svg { min-height: 150px; }
.mfg-chart__note { margin: 8px 0 0; font-size: 0.78rem; color: var(--mfg-muted); }
.mfg-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: #475569; }
.mfg-legend li { display: inline-flex; align-items: center; gap: 6px; }
.mfg-legend__dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.mfg-spark svg { width: 120px; height: 32px; vertical-align: middle; }

/* Gallery */
.mfg-gallery-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mfg-gallery-controls .mfg-field { max-width: 280px; }
.mfg-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mfg-gallery .mfg-media[hidden] { display: none; }

/* Charts are readable, not shrunk: on phones the SVG keeps a legible
   minimum width and scrolls inside its card. The <details> data table
   remains the accessible fallback. */
@media (max-width: 640px) {
    .mfg-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .mfg-chart__svg:not(.mfg-chart__svg--donut) { min-width: 560px; }
    .mfg-chart__svg--donut { min-width: 220px; }
}

/* Credits page */
.mfg-credits-page .mfg-table { font-size: 0.82rem; }

@media (max-width: 1024px) {
    .mfg-hero__grid,
    .mfg-profile-hero__grid,
    .mfg-prose-wrap,
    .mfg-detail__grid { grid-template-columns: 1fr; }
    .mfg-aside,
    .mfg-detail__aside { position: static; }
    .mfg-grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mfg-erarail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mfg-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mfg-media-grid,
    .mfg-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mfg-note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mfg-facetgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .mfg-page h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
    .mfg-hero,
    .mfg-profile-hero { padding: 34px 0 30px; }
    .mfg-grid--cards,
    .mfg-media-grid,
    .mfg-gallery,
    .mfg-note-grid,
    .mfg-people,
    .mfg-places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mfg-erarail,
    .mfg-facetgrid,
    .mfg-facetgrid--wide { grid-template-columns: 1fr 1fr; }
    .mfg-controls { grid-template-columns: 1fr; }
    .mfg-evolution__row { grid-template-columns: 1fr; }
    .mfg-evolution__img { height: 190px; }
    .mfg-cta-inline { flex-direction: column; align-items: stretch; }
    .mfg-cta-inline .mfg-btn { width: 100%; }
    .mfg-profile-hero__initial { width: 120px; height: 120px; font-size: 2.4rem; }
    .mfg-detail__aside { order: 2; }
    .mfg-jump .container { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 480px) {
    .mfg-media-grid,
    .mfg-gallery,
    .mfg-note-grid,
    .mfg-people,
    .mfg-places,
    .mfg-erarail,
    .mfg-facetgrid,
    .mfg-facetgrid--wide,
    .mfg-hero__stats { grid-template-columns: 1fr; }
    .mfg-hero__stats { gap: 8px; }
    .mfg-stat { padding: 12px 14px; }
    .mfg-timeline__item { grid-template-columns: 54px minmax(0, 1fr); }
    .mfg-facts__row { grid-template-columns: 1fr; gap: 2px; }
    .mfg-media__cap { padding: 8px 10px 10px; }
    .mfg-page .container { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 360px) {
    .mfg-grid--cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .mfg-card,
    .mfg-btn,
    .mfg-eracard { transition: none; }
    .mfg-card:hover,
    .mfg-btn:hover,
    .mfg-eracard:hover { transform: none; }
}

@media print {
    .mfg-jump,
    .mfg-hero__actions,
    .mfg-aside,
    .mfg-detail__aside,
    .mfg-cta-inline { display: none !important; }
    .mfg-detail__grid { display: block; }
}
