/* The American Dispatch — theme + phone edge-to-edge fixes (Nov 30, 2026 audit).
   Loaded last by site.js on every public page. Brand masthead is navy in both themes;
   dark mode gets a complete palette on phones; phone cards run edge to edge. */

/* ---------- Brand masthead: navy in light and dark ---------- */
header.brand{background:#101b2c!important;color:#fffdf7!important;border-bottom:1px solid #243247!important}
header.brand .logo,header.brand .logo:visited{color:#fffdf7!important}
header.brand .logo small{color:#d6aa4d!important}
header.brand .live,header.brand .date{color:#c9d3e0!important}
html.dm header.brand .dm-icon{color:#fffdf7!important}
html.dm .dm-chips{background:#101b2c!important;border-bottom:1px solid #243247!important}
html.dm .dm-chip{border-color:rgba(255,255,255,.22)!important;color:#e9edf3!important;background:transparent!important}
html.dm .dm-chip.is-on{background:#d6aa4d!important;border-color:#d6aa4d!important;color:#101b2c!important}

/* ---------- Phone dark palette ---------- */
html.dm[data-dispatch-theme=dark]{--dm-ink:#eef1f5;--dm-paper:#172234;--dm-ground:#0e1623;--dm-rule:#2b3a50;--dm-muted:#a9b6c6;--dm-red:#ff8a9c;color-scheme:dark}
html.dm[data-dispatch-theme=dark] body,html.dm-home[data-dispatch-theme=dark] body{background:#0e1623!important;color:#eef1f5}
html.dm[data-dispatch-theme=dark] .dm-tabbar{background:rgba(16,27,44,.97)!important;border-top-color:#243247!important}
html.dm[data-dispatch-theme=dark] .dm-tab{color:#93a1b3!important}
html.dm[data-dispatch-theme=dark] .dm-tab.is-on{color:#f0d79b!important}
html.dm[data-dispatch-theme=dark] .dm-listen,html.dm[data-dispatch-theme=dark] .dm-showall{background:#d6aa4d!important;color:#101b2c!important;border-color:#d6aa4d!important}
html.dm[data-dispatch-theme=dark] .dm-listen-dot{background:#101b2c!important}
html.dm[data-dispatch-theme=dark] .dm-listen-dot:after{border-left-color:#d6aa4d!important}
html.dm[data-dispatch-theme=dark] .dm-row{border-top-color:#24324a!important}
html.dm[data-dispatch-theme=dark] .dm-thumb{background:#24324a}
html.dm[data-dispatch-theme=dark] .dm-g-nation{color:#8fb8ff}
html.dm[data-dispatch-theme=dark] .dm-g-money{color:#6fd3ad}
html.dm[data-dispatch-theme=dark] .dm-g-culture{color:#ff8a9c}
html.dm[data-dispatch-theme=dark] .dm-g-life{color:#f2b56b}
html.dm[data-dispatch-theme=dark] .dm-sponsor{background:#1d2a3e!important;border-color:#3a4a62!important;color:#eef1f5!important}
html.dm[data-dispatch-theme=dark] .dm-sponsor-label{color:#e7c98e!important}
html.dm[data-dispatch-theme=dark] .dm-sponsor-copy{color:#c7d1de!important}
html.dm[data-dispatch-theme=dark] .dm-round{background:#172234!important;border-color:#3a4a62!important;color:#eef1f5!important}
html.dm[data-dispatch-theme=dark] main.article #article-dek{color:#c7d1de!important}
html.dm[data-dispatch-theme=dark] main.article #dispatch-story-body p{color:#e3e8ef!important}
html.dm[data-dispatch-theme=dark] #dispatch-story-shell .article-head-v23-side{background:#172234!important;border-color:#2b3a50!important;color:#eef1f5!important}
html.dm[data-dispatch-theme=dark] #dispatch-story-shell .article-head-v23-side li,html.dm[data-dispatch-theme=dark] #dispatch-story-shell .article-head-v23-side p{color:#dfe5ee!important}

/* ---------- Phone: edge to edge (no side gaps on cards) ---------- */
html.dm-home main section.hero{padding:0!important}
html.dm-home main section.hero .hero-main{border-radius:0!important;box-shadow:none!important}
html.dm .dm-briefing{padding-left:0!important;padding-right:0!important}
html.dm .dm-briefing .dm-head{padding:0 16px}
html.dm .dm-briefing .dm-showall{width:calc(100% - 32px);margin-left:16px;margin-right:16px}
html.dm .dm-list{border-radius:0!important;border-left:0!important;border-right:0!important}
html.dm-home .newsletter-band{border-radius:0!important}
html.dm #dispatch-story-shell .article-head-v23-side{margin-left:-16px!important;margin-right:-16px!important;border-radius:0!important;border-left:0!important;border-right:0!important}
html.dm #dispatch-story-body .dm-sponsor{margin-left:-16px;margin-right:-16px;border-radius:0;border-left:0;border-right:0}

/* Phones: every card/panel runs to the screen edges (text keeps its own inner padding). */
@media (max-width:760px){
 :is(.discussion,.sourcebox,.story-details-card,#dispatch-endcap,.article-endcap-v23,.take-card,#desk-video-placeholder,.desk-empty-latest,.watch-feature,
 .archive-v33-card,.about-person,.inst-pullquote,.inst-table,.inst-card,.inst-team-card,.partner-option,.subscription-card,.studio-promo,
 .reader-notice,.reader-form,.dt-feature,.dt-side,.author-story-card,.wd-player,.wd-current,.wd-playlist,.wd-empty,.wd-editorial-note,
 .archive-article,.newsletter-band,.dr-since,#dr-trust):not(#dispatch-fix){
  margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;width:auto!important;max-width:none!important;
  border-radius:0!important;border-left-width:0!important;border-right-width:0!important;box-sizing:border-box}
 :is(.discussion,.sourcebox,.story-details-card,.take-card,.archive-v33-card,.about-person,.inst-card,.inst-team-card,.partner-option,.subscription-card,
 .studio-promo,.reader-notice,.reader-form,.dt-feature,.dt-side,.author-story-card,.wd-current,.wd-playlist,.wd-empty,.wd-editorial-note,.archive-article):not(#dispatch-fix){
  padding-left:max(16px,var(--dm-pad,16px))!important;padding-right:max(16px,var(--dm-pad,16px))!important}
}

/* ---------- Dark mode: pages and panels that were still light or unreadable ---------- */
html[data-dispatch-theme=dark]{--fx-bg:#0e1623;--fx-panel:#172234;--fx-panel2:#1d2a3e;--fx-rule:#2b3a50;--fx-text:#eef1f5;--fx-soft:#c7d1de;--fx-muted:#a9b6c6;--fx-link:#f0c98a;--fx-red:#ff7d92}
/* section eyebrows and kickers */
html[data-dispatch-theme=dark] :is(.eyebrow,.kicker,.inst-eyebrow,.subscribe-eyebrow,.dt-opinion .type,.desk-identity .eyebrow):not(.dm-top){color:var(--fx-red)!important}
html[data-dispatch-theme=dark] :is(.inst-pullquote span,.radar-sub,.desk-radar-foot){color:var(--fx-muted)!important}
/* muted intro / helper copy */
html[data-dispatch-theme=dark] :is(.desk-identity p,.archive-v33-header p,#reader-search-status,.reader-body>p,.dispatch-archive-shell>p,.watch-meta p,.watch-feature p){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.section-head a.text-link,.archive-v33-footer a,.reader-body>p a,.dispatch-archive-shell>p a,.inst-team-profile-link,.subscribe-consent a,.desk-empty-latest a,.dt-opinion a.return){color:var(--fx-link)!important}
/* home: "Top story" pill keeps navy text on gold */
html[data-dispatch-theme=dark] .dm-top{color:#101b2c!important}
/* story page panels */
html[data-dispatch-theme=dark] :is(.story-details-card,.sourcebox,.dispatch-source-reference){background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .story-details-card :is(.detail-row,span,small,dt){color:var(--fx-muted)!important;border-color:var(--fx-rule)!important}
html[data-dispatch-theme=dark] .story-details-card :is(b,b a,strong,dd){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .sourcebox :is(p,span,strong,h2,h3,div){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] .sourcebox a{color:var(--fx-link)!important}
html[data-dispatch-theme=dark] :is(.dr-listen,.dr-listen-row .dr-listen){background:#d6aa4d!important;color:#101b2c!important;border-color:#d6aa4d!important}
/* section page empty state */
html[data-dispatch-theme=dark] .desk-empty-latest{background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] .desk-empty-latest strong{color:var(--fx-text)!important}
/* corrections button */
html[data-dispatch-theme=dark] a.inst-btn:not(.outline){color:#101b2c!important}
/* contact form */
html[data-dispatch-theme=dark] :is(.reader-notice,.reader-form){background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] :is(.reader-notice,.reader-form) :is(p,label,span,legend,small,li){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.reader-notice,.reader-form) :is(h2,h3,strong){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] :is(.reader-form,.partner-form-grid,.newsletter-band) :is(input,select,textarea){background:#0e1623!important;color:var(--fx-text)!important;border-color:#3a4a62!important}
/* opinion articles */
html[data-dispatch-theme=dark] main.dt-opinion{color:var(--fx-text)!important}
html[data-dispatch-theme=dark] main.dt-opinion :is(p,li){color:#dfe5ee!important}
html[data-dispatch-theme=dark] main.dt-opinion :is(.disclosure,.disclosure strong){color:var(--fx-soft)!important}
/* Dispatch Takes index */
html[data-dispatch-theme=dark] main.dispatch-take-page,html[data-dispatch-theme=dark] main.dispatch-take-page :is(.dt-lead,.dt-policy){background:var(--fx-bg)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] main.dispatch-take-page :is(.dt-feature,.dt-side,.take-article){background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] main.dispatch-take-page :is(h1,h2,h3,strong){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] main.dispatch-take-page :is(p,li,span:not(.eyebrow)){color:var(--fx-soft)!important}
/* author pages */
html[data-dispatch-theme=dark] :is(.author-main,.author-professional,.author-work){background:var(--fx-bg)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] :is(.author-main,.author-professional,.author-work) :is(h1,h2,h3,strong){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] :is(.author-main,.author-professional,.author-work) :is(p,li){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.author-professional-grid article,.author-story-card){background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .author-story-card :is(strong,h3){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .dr-read-badge{background:#24324a!important;color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.author-main,.author-work) a:not(.author-story-card):not([class*=btn]){color:var(--fx-link)!important}
/* archive (live list) and watch library */
html[data-dispatch-theme=dark] .archive-article{background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .archive-article :is(h2,h3,strong){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .archive-article :is(p,span,small){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] .wd-library{background:var(--fx-bg)!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] :is(.wd-empty,.wd-editorial-note){background:var(--fx-panel)!important;border-color:var(--fx-rule)!important;color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.wd-library,.wd-empty,.wd-editorial-note) :is(h2,h3,strong){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] :is(.wd-empty,.wd-editorial-note) p{color:var(--fx-soft)!important}
/* phone Sections drawer */
html[data-dispatch-theme=dark] .dispatch-mobile-drawer{background:#101b2c!important;color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .dispatch-mobile-drawer :is(nav a,.dispatch-shell-mobile-link){background:var(--fx-panel)!important;color:var(--fx-text)!important;border-color:var(--fx-rule)!important}
html[data-dispatch-theme=dark] .dispatch-mobile-drawer :is(h2,h3,strong,p,span,small){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.sourcebox,.dispatch-source-reference):not(#dispatch-fix){background:var(--fx-panel)!important;border-color:var(--fx-rule)!important}
html[data-dispatch-theme=dark] :is(.sourcebox,.dispatch-source-reference):not(#dispatch-fix) :is(.source-heading,p,span,strong){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] .desk-empty-latest p,html[data-dispatch-theme=dark] .wd-library-head p,html[data-dispatch-theme=dark] .author-story-card span{color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.dt-number){color:#e7c98e!important}
html[data-dispatch-theme=dark] :is(.dt-news-link,.dt-opinion-link,.dt-policy a,.wd-note-link){color:var(--fx-link)!important}
html[data-dispatch-theme=dark] :is(.author-fact-label,.author-story-card small,.wd-eyebrow){color:var(--fx-red)!important}
html[data-dispatch-theme=dark] :is(.sourcebox,.dispatch-source-reference):not(#dispatch-fix) a{color:var(--fx-link)!important}
/* Light mode: small gold/red labels that were too faint */
html:not([data-dispatch-theme=dark]) .dm-desk b{color:#9a7128!important}
html:not([data-dispatch-theme=dark]) :is(.desk-identity .eyebrow,.dispatch-category-main .section-head .eyebrow,.watch-meta .eyebrow,.desk-empty-latest a.text-link){color:#8a5a1c!important}
.take-card .eyebrow{color:#ff8a9c!important}
/* Desktop leftovers */
.hero-main .eyebrow{color:#f0d79b!important}
html[data-dispatch-theme=dark] :is(.dispatch-radar-status,.watch-side-copy p){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.dispatch-radar-status a,.section-head span a,.dr-trust-note a){color:var(--fx-link)!important}
html[data-dispatch-theme=dark] .card .eyebrow:not(#dispatch-fix){color:var(--fx-red)!important}
html:not([data-dispatch-theme=dark]) :is(.desk-backlink,.desk-watch-side-title,.desk-beat-feature .eyebrow,.desk-watch-topic .eyebrow){color:#8a5a1c!important}
html[data-dispatch-theme=dark] :is(.card,.card-body):not(#dispatch-fix){background-color:var(--fx-panel)!important;border-color:var(--fx-rule)!important}
html[data-dispatch-theme=dark] .card :is(h2,h3,strong):not(#dispatch-fix){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .card :is(p,.meta,small):not(#dispatch-fix){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] :is(.watch-player-note,.dispatch-desk-preview-card):not(#dispatch-fix){background:var(--fx-panel)!important;color:var(--fx-soft)!important;border-color:var(--fx-rule)!important}
html[data-dispatch-theme=dark] .dispatch-desk-preview-card :is(h3,strong,b){color:var(--fx-text)!important}
html[data-dispatch-theme=dark] .watch-player-note a,html[data-dispatch-theme=dark] .dispatch-desk-preview-card span:not(#dispatch-fix){color:var(--fx-soft)!important}
html[data-dispatch-theme=dark] .watch-player-note a{color:var(--fx-link)!important}
.inst-dark .inst-eyebrow{color:#e7c98e!important}
html:not([data-dispatch-theme=dark]) #tab-subscription>.kicker{color:#8a5a1c!important}
html:not([data-dispatch-theme=dark]) .latest-item .num{color:#9a7128!important}
html[data-dispatch-theme=dark] :is(.desk-backlink,.desk-watch-side-title){color:#e7c98e!important}
