/* earningsapi.io: brand look for the pages shared with the main site
   (company, sector, trends, compare ...) and a mobile menu for every nav.
   Shared pages carry html[data-theme]; the brand's own templates do not. */

html[data-theme] {
  --bg-primary: #07090b;
  --bg-secondary: #0c0f12;
  --bg-card: #0c0f12;
  --bg-card-hover: #11161a;
  --bg-section-a: #07090b;
  --bg-section-b: #0c0f12;
  --bg-input: #11161a;
  --border: rgba(255, 255, 255, .08);
  --border-light: rgba(255, 255, 255, .15);
  --text-primary: #eceef0;
  --text-secondary: #c6ccd2;
  --text-muted: #98a1ab;
  --nav-bg: rgba(7, 9, 11, .8);
  --code-bg: #0c1410;
  --modal-bg: #07090b;
  --modal-secondary: #0c0f12;
  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
}
html[data-theme] body {
  --bg: #07090b; --text: #eceef0; --muted: #98a1ab;
  --on-accent: #052912; --border-soft: rgba(255, 255, 255, .06);
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
html[data-theme] h1, html[data-theme] h2, html[data-theme] h3 {
  font-family: 'Space Grotesk', var(--font);
  letter-spacing: -.01em;
}

/* Brand nav on shared pages (same rules as the brand templates). */
html[data-theme] nav.top { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-soft); }
html[data-theme] nav.top .nav-in { display: flex; align-items: center; justify-content: space-between; padding: 15px 40px; }
html[data-theme] nav.top .brand { font-family: var(--mono); font-weight: 700; font-size: 17px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
html[data-theme] nav.top .brand .a { color: var(--accent); }
html[data-theme] nav.top .nav-r { display: flex; align-items: center; gap: 26px; font-size: 14px; }
html[data-theme] nav.top .nav-r a { color: var(--muted); text-decoration: none; }
html[data-theme] nav.top .nav-r a:hover { color: var(--text); }

/* Mobile menu, all pages. The button is added by brand-earningsapi.js. */
.eapi-menu { display: none; }
.eapi-menu-btn { display: none; background: none; border: 1px solid rgba(255, 255, 255, .2); color: #eceef0; font-size: 18px; line-height: 1; padding: 7px 11px; margin-left: 10px; cursor: pointer; }
@media (max-width: 860px) {
  .eapi-menu-btn { display: inline-flex; align-items: center; }
  nav.top .nav-in, nav.eapi-nav { padding-left: 16px !important; padding-right: 16px !important; }
  nav.top .nav-r a:not(.nav-key) { display: none; }
  nav.top .nav-key, nav.eapi-nav .nav-cta { white-space: nowrap; padding: 8px 12px !important; font-size: 12.5px !important; }
  nav.top .brand, nav.eapi-nav > div:first-child { font-size: 15px !important; }
  nav.top .nav-r, nav.eapi-nav .nav-links { gap: 0 !important; }
  nav.eapi-open { position: sticky; }
  nav.eapi-open .eapi-menu { display: flex; }
  .eapi-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: #07090b; border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 6px 16px 14px; z-index: 60; }
  .eapi-menu a { display: block !important; padding: 12px 0; color: #c6ccd2 !important; border: 0 !important; background: none !important; border-bottom: 1px solid rgba(255, 255, 255, .06) !important; font-size: 15px !important; font-weight: 500 !important; text-decoration: none; }
  .eapi-menu a:last-child { border-bottom: 0 !important; }
}

/* Nothing may push the page wider than the phone. */
@media (max-width: 700px) {
  .paths, .path-card { min-width: 0; max-width: 100%; }
  .path-card { padding: 16px; }
  pre.codeblock, pre { max-width: 100%; overflow-x: auto; }
  main.wrap > table { display: block; overflow-x: auto; }
  main.wrap > table td .cname { white-space: normal; }
}
