/*
Theme Name: InsightGlow Child
Template: colormag
Description: Bloomberg/Techmeme-density layout. v6.
Version: 6.0.0
*/

/* ============================================================
   1. Kill ColorMag's default header — we replace it
   ============================================================ */
.site-header, header.site-header,
.cm-site-header, .cm-header-wrapper,
.main-navigation, .cm-primary-navigation {
  display: none !important;
}

/* Hide the residual site title/tagline anywhere */
.cm-site-title, .cm-site-description, .site-title, .site-description,
.cm-tagline-show-desktop, .cm-tagline-show-tablet, .cm-tagline-show-mobile,
.site-branding-text {
  display: none !important;
}

/* ============================================================
   2. NEW header — Techmeme-style single inline row
   ============================================================ */
.ig-header {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 22px;
  background: #fff;
  border-bottom: 1px solid #e5e5ee;
}
.ig-header-bar {
  background: #fff;
  border-bottom: 1px solid #e5e5ee;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  position: sticky;
  top: 0;
  z-index: 100;
}
.ig-logo-link {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.ig-logo-link img {
  height: 22px !important;
  width: auto !important;
  display: block;
}
.ig-logo-text {
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #14172b;
}

.ig-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  flex: 1;
  align-items: center;
  min-width: 0;
  margin-left: 8px;
}
.ig-nav a {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1a1d30;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 3px;
  white-space: nowrap;
}
.ig-nav a:hover {
  color: #FF7A1E !important;
  background: #fef3e8;
}

.ig-search-form {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.ig-search-form input[type=search] {
  border: 1px solid #d4d4dc;
  background: #f7f7fa
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>")
    8px center / 14px no-repeat;
  padding: 5px 12px 5px 28px;
  font-size: 12.5px;
  border-radius: 999px;
  width: 200px;
  outline: 0;
  color: #1a1d30;
  font-family: inherit;
}
.ig-search-form input[type=search]:focus {
  border-color: #FF7A1E;
  background-color: #fff;
}
.ig-search-form input[type=search]::placeholder { color: #888; }

@media (max-width: 900px) {
  .ig-header { flex-wrap: wrap; padding: 6px 14px; }
  .ig-search-form input[type=search] { width: 140px; }
}
@media (max-width: 700px) {
  .ig-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .ig-nav::-webkit-scrollbar { display: none; }
  .ig-nav a { padding: 6px 8px; font-size: 11px; }
  .ig-search-form { order: 2; margin-left: auto; }
}

/* ============================================================
   3. Accessibility — 5 font-size levels
   ============================================================ */
html { font-size: 16px; }
html[data-fs="0"] { font-size: 12.5px; }   /* extra small */
html[data-fs="1"] { font-size: 14px; }     /* small */
html[data-fs="2"] { font-size: 16px; }     /* default */
html[data-fs="3"] { font-size: 18.5px; }   /* large */
html[data-fs="4"] { font-size: 22px; }     /* extra large */

body { background: #fafafa; color: #1a1d30; }

/* ============================================================
   4. Homepage feed — Techmeme density
   ============================================================ */
.ig-home { padding: 18px 0 60px; }
.ig-home-inner { max-width: 980px; margin: 0 auto; padding: 0 22px; }

.ig-section-head {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 0.74em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6e6e80;
  margin: 22px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e6e6ec;
}
.ig-section-head:first-of-type { margin-top: 0; }

.ig-stream { list-style: none; padding: 0; margin: 0 0 10px; }
.ig-story { padding: 7px 0; border-bottom: 1px solid #ececf2; }
.ig-story:last-child { border-bottom: 0; }
.ig-story-line {
  display: grid;
  grid-template-columns: 78px 1fr 64px;
  gap: 12px;
  align-items: baseline;
}
.ig-story-title {
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 700;
  color: #14172b;
  text-decoration: none;
  font-size: 0.98em;
  line-height: 1.38;
}
.ig-story-title:hover { color: #FF7A1E; }
.ig-story-title:visited { color: #6a6a82; }
.ig-story-time {
  font-size: 0.74em;
  color: #8a8a98;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Source attribution under each headline */
.ig-story-meta {
  display: grid;
  grid-template-columns: 78px 1fr 64px;
  gap: 12px;
  margin-top: 2px;
  font-size: 0.72em;
  color: #888;
}
.ig-story-meta .ig-source-brand {
  grid-column: 2;
  font-weight: 600;
  color: #5f5f6c;
  letter-spacing: 0.2px;
}

@media (max-width: 600px) {
  .ig-story-line { grid-template-columns: 66px 1fr; }
  .ig-story-time { grid-column: 2; padding-top: 1px; font-size: 0.7em; color: #999; }
  .ig-story-meta { grid-template-columns: 66px 1fr; }
}

/* ============================================================
   5. Category pills — smaller, Techmeme-y
   ============================================================ */
.ig-cat {
  display: inline-block;
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.58em;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 2.5px 6px;
  border-radius: 2px;
  color: #fff !important;
  text-decoration: none !important;
  text-align: center;
  min-width: 70px;
  box-sizing: border-box;
  line-height: 1;
}
.ig-cat:hover { opacity: 0.88; }
.ig-cat-tech-ai       { background: #2563eb; }
.ig-cat-markets       { background: #047857; }
.ig-cat-luxury        { background: #a16207; }
.ig-cat-world         { background: #b91c1c; }
.ig-cat-entertainment { background: #be185d; }
.ig-cat-viral         { background: #c2410c; }
.ig-cat-science       { background: #0e7490; }
.ig-cat-sports        { background: #4b5563; }

/* ============================================================
   6. Homepage footnote (legal links)
   ============================================================ */
.ig-footnote {
  margin: 30px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e8e8ee;
  font-size: 0.74em;
  color: #888;
  text-align: center;
}
.ig-footnote a { color: #555; text-decoration: none; margin: 0 4px; }
.ig-footnote a:hover { color: #FF7A1E; text-decoration: underline; }

/* ============================================================
   7. Single article reading view
   ============================================================ */
.single-post .entry-header { margin-bottom: 14px; position: relative; }
.single-post .entry-title {
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.012em;
  font-size: 2.05em;
  line-height: 1.18;
  color: #14172b;
}
.single-post .post-thumbnail { margin: 14px 0 18px; max-width: 800px; }
.single-post .post-thumbnail img {
  width: 100% !important;
  max-height: 460px !important;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.single-post .entry-content {
  font-size: 1.0625em;
  line-height: 1.7;
  color: #1f2240;
  max-width: 740px;
}
.single-post .entry-content p { margin: 0 0 1em; }
.single-post .entry-content h2 {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 1.32em;
  font-weight: 800;
  color: #1a1d30;
  margin: 1.8em 0 0.55em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #ececf2;
}
.single-post .entry-content a { color: #1a73e8; }
.single-post .entry-content a:hover { color: #FF7A1E; }
.single-post p.source-credit { color: #888; font-size: 0.92em; margin-top: 2em; }

/* Hide author byline + ColorMag user-icon SVG */
.entry-meta .author, .entry-meta .byline, .posted-by, .byline,
.author-link, .vcard.author, .meta-author, .author.vcard,
.colormag-author-meta, .cm-meta-author, .cm-byline, .cm-posted-by,
.cm-meta-element--author, .cm-author-meta, .cm-author, .cm-vcard,
.entry-meta a[rel~="author"], a[rel~="author"],
.entry-meta .cm-icon--user, span.author-name {
  display: none !important;
  visibility: hidden !important;
}

/* ============================================================
   8. Font-size widget — bottom-LEFT (don't overlap scroll-up)
   ============================================================ */
.ig-fs-widget {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 9999;
  display: flex;
  gap: 3px;
  align-items: center;
  font-size: 11px;
  color: #444;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d4d4dc;
  padding: 4px 7px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  font-family: Montserrat, system-ui, sans-serif;
  backdrop-filter: saturate(140%) blur(8px);
}
.ig-fs-widget .ig-fs-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 3px;
  color: #999;
  font-size: 9px;
  font-weight: 700;
}
.ig-fs-widget .ig-fs-btn {
  border: 0; background: transparent;
  color: #1a1d30; font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  font-family: inherit; font-size: 12px;
  border-radius: 999px; line-height: 1.2;
}
.ig-fs-widget .ig-fs-btn:hover { background: #FF7A1E; color: #fff; }
.ig-fs-widget .ig-fs-btn.active { background: #1a1d30; color: #fff; }
@media (max-width: 600px) {
  .ig-fs-widget { left: 6px; bottom: 6px; padding: 3px 5px; }
  .ig-fs-widget .ig-fs-btn { padding: 2px 4px; font-size: 11px; }
}

.ig-reading-time {
  display: inline-block;
  font-size: 0.78em; color: #888;
  font-weight: 600;
  margin: 0 0 12px;
}
.ig-reading-time-row { margin-bottom: 8px; }

/* ============================================================
   9. ColorMag elements outside the homepage — keep brand orange
   ============================================================ */
.cat-links a, .entry-meta .cat-links a, a[rel~="category"],
.colormag-block-categories a {
  background-color: #FF7A1E !important;
  color: #fff !important;
  padding: 2px 8px !important;
  border-radius: 2px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}
.read-more, .more-link {
  background-color: #FF7A1E !important; color: #fff !important;
  text-decoration: none !important;
}
a:hover { color: #FF7A1E !important; }

/* ============================================================
   10. Dark footer
   ============================================================ */
.footer-widgets-wrapper, footer.site-footer .footer-widgets-wrapper {
  background-color: #14172a !important; color: #d4d4d8 !important;
}
.footer-widgets-wrapper a, .site-footer a { color: #FFCD3C !important; }
.footer-widgets-wrapper .widget-title, .site-footer .widget-title {
  color: #fff !important;
  border-bottom: 2px solid #FF7A1E !important;
  padding-bottom: 6px !important;
}
.site-info, .footer-bottom { background: #0a0c1a !important; color: #a4a4af !important; }
