/*
Theme Name: Hueman TPO (Tirupati Official)
Theme URI: https://tirupatiofficial.com/
Template: hueman
Description: Complete news-magazine redesign for Tirupati Official. Full template override (header, footer, single, archive, category, page, search, 404, index). Modern typography (Inter + Lora + Noto Sans Telugu), responsive grid, dark mode, sticky header, mobile drawer, category color system, source-citation block, NewsArticle schema, Telugu hreflang support.
Author: Tirupati Official Editorial
Author URI: https://tirupatiofficial.com/
Version: 2.0.0
Text Domain: hueman-tpo
*/

/* ===================================================================
   TIRUPATI OFFICIAL — REDESIGN 2.0
   News-magazine design system. Mobile-first. Dark-mode ready.
   =================================================================== */

/* ===== 1. Design tokens ===== */
:root {
  /* Brand palette (light) */
  --c-primary: #c0392b;
  --c-primary-rgb: 192, 57, 43;
  --c-primary-dark: #962d22;
  --c-primary-soft: #fff7f3;
  --c-accent: #d4a017;
  --c-accent-dark: #b3851a;

  --c-text: #1a1a1a;
  --c-text-soft: #4a4a4a;
  --c-text-muted: #6e6e6e;
  --c-text-faint: #999;
  --c-bg: #ffffff;
  --c-bg-soft: #f8f8f7;
  --c-bg-band: #fafaf9;
  --c-surface: #ffffff;
  --c-border: #e7e5e0;
  --c-border-soft: #f1efea;
  --c-link: #c0392b;
  --c-link-hover: #962d22;

  /* Category colors */
  --cat-tmc: #1e88e5;
  --cat-tuda: #2e7d32;
  --cat-ttd: #c0392b;
  --cat-tirupati-news: #0d47a1;
  --cat-tirumala-news: #b8870c;
  --cat-tirupati-top: #6a1b9a;
  --cat-editorial: #455a64;
  --cat-rent-lease: #ef6c00;

  /* Status */
  --c-breaking: #d32f2f;
  --c-success: #2e7d32;
  --c-warn: #ef6c00;

  /* Typography */
  --f-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui,
    sans-serif;
  --f-display: "Lora", Georgia, "Times New Roman", serif;
  --f-telugu: "Noto Sans Telugu", "Mangal", sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radii */
  --r-1: 3px;
  --r-2: 6px;
  --r-3: 8px;
  --r-4: 12px;
  --r-5: 20px;
  --r-pill: 999px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.05);
  --sh-2: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --sh-3: 0 4px 16px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.06);
  --sh-card: 0 1px 2px rgba(0, 0, 0, 0.04);

  /* Z-index scale */
  --z-base: 1;
  --z-nav: 50;
  --z-drawer: 80;
  --z-modal: 100;

  /* Layout */
  --w-container: 1240px;
  --w-content: 720px;
  --w-narrow: 580px;
  --header-h: 64px;
  --topbar-h: 36px;

  /* Motion */
  --tr-fast: 0.12s ease;
  --tr-base: 0.18s ease;
  --tr-slow: 0.28s ease;
}

/* Dark mode tokens */
:root[data-theme="dark"] {
  --c-text: #f4f4f4;
  --c-text-soft: #c8c8c8;
  --c-text-muted: #9e9e9e;
  --c-text-faint: #6b6b6b;
  --c-bg: #0f1115;
  --c-bg-soft: #161922;
  --c-bg-band: #1a1d27;
  --c-surface: #1a1d27;
  --c-border: #2b2f3a;
  --c-border-soft: #1e2229;
  --c-link: #ff8a7a;
  --c-link-hover: #ffaa9a;
  --c-primary-soft: #1f1814;
}

/* ===== 2. Reset + base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
picture,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--c-link);
  text-decoration: none;
  transition: color var(--tr-base);
}
a:hover {
  color: var(--c-link-hover);
}
button {
  font: inherit;
  cursor: pointer;
}
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
  color: var(--c-text);
}
h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}
h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
}
h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
}

p {
  margin: 0 0 var(--s-4);
}
ul,
ol {
  margin: 0 0 var(--s-4);
  padding-left: var(--s-5);
}
li {
  margin-bottom: var(--s-2);
}

/* Telugu font auto-switch */
[lang^="te"],
.te,
.telugu-content,
.has-telugu .entry-content {
  font-family: var(--f-telugu);
  font-size: 1.04em;
  line-height: 1.8;
}

/* ===== 3. Layout primitives ===== */
.tpo-container {
  width: 100%;
  max-width: var(--w-container);
  margin-inline: auto;
  padding-inline: var(--s-4);
}
.tpo-content {
  max-width: var(--w-content);
  margin-inline: auto;
}
.tpo-skip {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--c-text);
  color: var(--c-bg);
  padding: var(--s-3) var(--s-4);
  z-index: var(--z-modal);
}
.tpo-skip:focus {
  top: 0;
}

.tpo-grid {
  display: grid;
  gap: var(--s-5);
}
.tpo-grid--2 {
  grid-template-columns: 1fr;
}
.tpo-grid--3 {
  grid-template-columns: 1fr;
}
.tpo-grid--4 {
  grid-template-columns: 1fr;
}
.tpo-grid--side {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .tpo-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .tpo-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .tpo-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .tpo-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .tpo-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .tpo-grid--side {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* ===== 4. Topbar (date + lang + dark mode) ===== */
.tpo-topbar {
  background: var(--c-bg-band);
  border-bottom: 1px solid var(--c-border-soft);
  font-size: 12px;
  color: var(--c-text-muted);
}
.tpo-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-h);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.tpo-topbar-meta {
  display: flex;
  gap: var(--s-4);
  align-items: center;
}
.tpo-topbar-meta .sep {
  color: var(--c-text-faint);
}
.tpo-topbar-actions {
  display: flex;
  gap: var(--s-3);
  align-items: center;
}
.tpo-lang-toggle,
.tpo-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text-soft);
  padding: 3px 10px;
  border-radius: var(--r-2);
  font-size: 11px;
  font-weight: 500;
  transition: all var(--tr-base);
}
.tpo-lang-toggle:hover,
.tpo-theme-toggle:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.tpo-lang-toggle .te {
  font-family: var(--f-telugu);
}

/* ===== 5. Header + nav ===== */
.tpo-header {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  transition:
    box-shadow var(--tr-base),
    background var(--tr-base);
}
.tpo-header.is-scrolled {
  box-shadow: var(--sh-2);
}
.tpo-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: var(--header-h);
}
.tpo-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
}
.tpo-brand-mark {
  width: 36px;
  height: 36px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-2);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
}
.tpo-brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.tpo-brand-tagline {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Primary nav (desktop) */
.tpo-nav {
  display: none;
}
@media (min-width: 960px) {
  .tpo-nav {
    display: flex;
    align-items: center;
    gap: var(--s-5);
  }
  .tpo-nav a {
    color: var(--c-text);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition:
      color var(--tr-fast),
      border-color var(--tr-fast);
  }
  .tpo-nav a:hover,
  .tpo-nav .current-menu-item > a {
    color: var(--c-primary);
    border-bottom-color: var(--c-primary);
  }
}

/* Header actions (search + mobile toggle) */
.tpo-header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.tpo-iconbtn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text);
  border-radius: var(--r-2);
  transition: all var(--tr-fast);
}
.tpo-iconbtn:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.tpo-iconbtn svg {
  width: 18px;
  height: 18px;
}

/* Mobile menu toggle visible on small */
.tpo-menu-toggle {
  display: grid;
}
@media (min-width: 960px) {
  .tpo-menu-toggle {
    display: none;
  }
}

/* Mobile drawer */
.tpo-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: var(--z-drawer);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-base);
}
.tpo-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}
.tpo-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 90vw);
  background: var(--c-bg);
  z-index: calc(var(--z-drawer) + 1);
  transform: translateX(100%);
  transition: transform var(--tr-slow);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
}
.tpo-drawer.is-open {
  transform: translateX(0);
}
.tpo-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--c-border);
}
.tpo-drawer-nav {
  padding: var(--s-3) 0;
}
.tpo-drawer-nav a {
  display: block;
  padding: var(--s-3) var(--s-5);
  color: var(--c-text);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--c-border-soft);
}
.tpo-drawer-nav a:hover {
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.tpo-drawer-foot {
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* Search modal */
.tpo-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: var(--z-modal);
  display: grid;
  place-items: start center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-base);
}
.tpo-search-modal.is-open {
  opacity: 1;
  pointer-events: all;
}
.tpo-search-box {
  width: min(640px, 92vw);
  background: var(--c-bg);
  border-radius: var(--r-4);
  padding: var(--s-5);
  box-shadow: var(--sh-3);
}
.tpo-search-box input {
  width: 100%;
  padding: var(--s-4) var(--s-5);
  border: 2px solid var(--c-border);
  border-radius: var(--r-3);
  font-size: 18px;
  color: var(--c-text);
  background: var(--c-bg);
}
.tpo-search-box input:focus {
  outline: none;
  border-color: var(--c-primary);
}
.tpo-search-hint {
  margin-top: var(--s-3);
  font-size: 13px;
  color: var(--c-text-muted);
}

/* ===== 6. Breaking news ticker ===== */
.tpo-ticker {
  background: var(--c-breaking);
  color: #fff;
  padding: var(--s-2) 0;
  font-size: 13px;
  overflow: hidden;
}
.tpo-ticker-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.tpo-ticker-label {
  background: #fff;
  color: var(--c-breaking);
  padding: 3px 10px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-radius: var(--r-1);
  flex-shrink: 0;
  text-transform: uppercase;
}
.tpo-ticker-content {
  display: flex;
  gap: var(--s-6);
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  animation: ticker-scroll 35s linear infinite;
}
.tpo-ticker:hover .tpo-ticker-content {
  animation-play-state: paused;
}
.tpo-ticker a {
  color: #fff;
}
.tpo-ticker a:hover {
  color: #fff;
  text-decoration: underline;
}
@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ===== 7. Hero (homepage) ===== */
.tpo-hero {
  display: grid;
  gap: var(--s-5);
  margin: var(--s-6) 0 var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .tpo-hero {
    grid-template-columns: 2fr 1fr;
  }
}
.tpo-hero-feature {
  position: relative;
  border-radius: var(--r-4);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--sh-2);
}
.tpo-hero-feature .image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-band);
}
.tpo-hero-feature .image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tpo-hero-feature .content {
  padding: var(--s-5);
}
.tpo-hero-feature .title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--s-3);
}
.tpo-hero-feature .title a {
  color: var(--c-text);
}
.tpo-hero-feature .title a:hover {
  color: var(--c-primary);
}
.tpo-hero-feature .excerpt {
  color: var(--c-text-soft);
  font-size: 15px;
  margin: 0 0 var(--s-3);
}
.tpo-hero-meta {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  font-size: 12px;
  color: var(--c-text-muted);
}

.tpo-hero-side {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.tpo-hero-side .tpo-card {
  flex: 1;
}

/* ===== 8. Article cards ===== */
.tpo-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1px solid var(--c-border-soft);
  transition:
    transform var(--tr-base),
    box-shadow var(--tr-base),
    border-color var(--tr-base);
}
.tpo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-3);
  border-color: var(--c-border);
}
.tpo-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--c-bg-band);
  overflow: hidden;
}
.tpo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}
.tpo-card:hover .tpo-card-img img {
  transform: scale(1.04);
}
.tpo-card-body {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  flex: 1;
}
.tpo-card-title {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.tpo-card-title a {
  color: var(--c-text);
}
.tpo-card-title a:hover {
  color: var(--c-primary);
}
.tpo-card-excerpt {
  font-size: 13.5px;
  color: var(--c-text-soft);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tpo-card-meta {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  font-size: 11.5px;
  color: var(--c-text-muted);
  margin-top: auto;
}

/* Card variant: horizontal (for sidebar most-read) */
.tpo-card--row {
  flex-direction: row;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--c-border-soft);
}
.tpo-card--row:hover {
  transform: none;
  box-shadow: none;
}
.tpo-card--row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.tpo-card--row .tpo-card-img {
  flex-shrink: 0;
  width: 96px;
  aspect-ratio: 1;
  border-radius: var(--r-2);
}
.tpo-card--row .tpo-card-body {
  padding: 0 0 0 var(--s-3);
}
.tpo-card--row .tpo-card-title {
  font-size: 0.92rem;
}
.tpo-card--row .tpo-card-excerpt {
  display: none;
}

/* Card variant: compact list (text-only) */
.tpo-card--text {
  flex-direction: row;
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--c-border-soft);
  border-radius: 0;
  padding: var(--s-3) 0;
  gap: var(--s-3);
}
.tpo-card--text:hover {
  transform: none;
  box-shadow: none;
}
.tpo-card--text:last-child {
  border-bottom: 0;
}
.tpo-card--text .num {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-primary);
  width: 32px;
  flex-shrink: 0;
}
.tpo-card--text .tpo-card-body {
  padding: 0;
}

/* Category badge */
.tpo-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--c-text-soft);
  border-radius: var(--r-1);
  text-decoration: none;
  align-self: flex-start;
}
.tpo-cat-badge:hover {
  opacity: 0.88;
  color: #fff;
}
.tpo-cat-badge[data-cat="tuda-guide"],
.tpo-cat-badge[data-cat="tuda"] {
  background: var(--cat-tuda);
}
.tpo-cat-badge[data-cat="tirumala-news"],
.tpo-cat-badge[data-cat="tirumala-temple"] {
  background: var(--cat-ttd);
}
.tpo-cat-badge[data-cat="tirupati-news"] {
  background: var(--cat-tirupati-news);
}
.tpo-cat-badge[data-cat="tirupati-top"] {
  background: var(--cat-tirupati-top);
}
.tpo-cat-badge[data-cat="editorial"] {
  background: var(--cat-editorial);
}
.tpo-cat-badge[data-cat="rent-lease"] {
  background: var(--cat-rent-lease);
}
.tpo-cat-badge[data-cat="tirupati-municipal-corporation"],
.tpo-cat-badge[data-cat="tmc"] {
  background: var(--cat-tmc);
}

/* ===== 9. Section bands ===== */
.tpo-section {
  margin: var(--s-7) 0;
}
.tpo-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 2px solid var(--c-border);
  position: relative;
}
.tpo-section-head::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--c-primary);
}
.tpo-section-title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin: 0;
}
.tpo-section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tpo-section-link:hover {
  color: var(--c-primary-dark);
}
.tpo-section-link::after {
  content: " →";
}

.tpo-section--band {
  background: var(--c-bg-band);
  padding: var(--s-6) 0;
  margin-inline: calc(-1 * var(--s-4));
}
.tpo-section--band > .tpo-container {
  padding-inline: var(--s-4);
}

/* ===== 10. Sidebar widgets ===== */
.tpo-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.tpo-widget {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.tpo-widget-title {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--c-primary);
  display: inline-block;
}

/* Newsletter */
.tpo-newsletter {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  border: 0;
}
.tpo-newsletter .tpo-widget-title {
  color: #fff;
  border-bottom-color: var(--c-accent);
}
.tpo-newsletter p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}
.tpo-newsletter form {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.tpo-newsletter input[type="email"] {
  padding: 10px 14px;
  border: 0;
  border-radius: var(--r-2);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.tpo-newsletter input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.tpo-newsletter input[type="email"]:focus {
  outline: 2px solid var(--c-accent);
  background: rgba(255, 255, 255, 0.22);
}
.tpo-newsletter button {
  padding: 10px 14px;
  background: var(--c-accent);
  color: #1a1a1a;
  border: 0;
  border-radius: var(--r-2);
  font-weight: 600;
  transition: background var(--tr-fast);
}
.tpo-newsletter button:hover {
  background: var(--c-accent-dark);
}

/* ===== 11. Single post layout ===== */
.tpo-article-header {
  text-align: left;
  margin: var(--s-6) 0 var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--c-border);
}
.tpo-article-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: var(--s-3);
}
.tpo-article-title {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.18;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.015em;
}
.tpo-article-deck {
  font-size: 1.05rem;
  color: var(--c-text-soft);
  line-height: 1.55;
  margin: 0 0 var(--s-5);
  font-style: italic;
  font-family: var(--f-display);
}
.tpo-article-meta {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--c-text-muted);
}
.tpo-byline {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 500;
  color: var(--c-text);
}
.tpo-byline img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.tpo-byline a {
  color: var(--c-text);
}
.tpo-byline a:hover {
  color: var(--c-primary);
}

.tpo-article-hero {
  margin: 0 0 var(--s-5);
  border-radius: var(--r-3);
  overflow: hidden;
}
.tpo-article-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.tpo-article-hero figcaption {
  font-size: 12.5px;
  color: var(--c-text-muted);
  padding: var(--s-2) var(--s-3);
  background: var(--c-bg-band);
  margin: 0;
}

.tpo-article-body {
  max-width: var(--w-content);
  margin-inline: auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-text);
}
.tpo-article-body > * {
  margin-block: 1em;
}
.tpo-article-body > *:first-child {
  margin-top: 0;
}
.tpo-article-body p {
  margin: 0 0 1.25em;
}
.tpo-article-body h2 {
  font-size: 1.65rem;
  margin: 2.5em 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--c-border);
  position: relative;
}
.tpo-article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background: var(--c-primary);
}
.tpo-article-body h3 {
  font-size: 1.3rem;
  margin: 2em 0 0.5em;
  color: var(--c-primary-dark);
}
.tpo-article-body a {
  color: var(--c-link);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.tpo-article-body blockquote {
  border-left: 4px solid var(--c-accent);
  background: var(--c-primary-soft);
  padding: var(--s-4) var(--s-5);
  margin: 1.5em 0;
  font-style: italic;
  color: var(--c-text);
  border-radius: 0 var(--r-2) var(--r-2) 0;
}
.tpo-article-body img,
.tpo-article-body figure {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-2);
}
.tpo-article-body figure {
  margin: 1.5em 0;
}
.tpo-article-body figcaption {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-top: var(--s-2);
}
.tpo-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95em;
}
.tpo-article-body th,
.tpo-article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border-soft);
  text-align: left;
}
.tpo-article-body th {
  background: var(--c-bg-band);
  font-weight: 600;
}

/* Source citations (auto-rendered by Phase B/C) */
.tpo-sources,
.tto-see-also,
.tpo-see-also {
  background: var(--c-bg-soft);
  border-left: 4px solid var(--c-accent);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-6) 0;
  border-radius: 0 var(--r-2) var(--r-2) 0;
  font-size: 14px;
}
.tpo-sources-title {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.tpo-sources-title::before {
  content: "📰";
}
.tpo-sources ol {
  margin: 0;
  padding-left: var(--s-5);
}
.tpo-sources li {
  margin-bottom: var(--s-2);
  color: var(--c-text-soft);
}
.tpo-sources a {
  color: var(--c-primary);
  border-bottom: 1px dotted var(--c-primary);
}
.tto-see-also strong,
.tpo-see-also strong {
  color: var(--c-primary);
}

/* Author bio */
.tpo-author-bio {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-3);
  margin: var(--s-6) 0 var(--s-5);
}
.tpo-author-bio img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tpo-author-bio-name {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 var(--s-1);
}
.tpo-author-bio-role {
  font-size: 12.5px;
  color: var(--c-primary);
  margin: 0 0 var(--s-2);
  font-weight: 600;
}
.tpo-author-bio-desc {
  font-size: 14px;
  color: var(--c-text-soft);
  margin: 0;
  line-height: 1.6;
}

/* Share buttons */
.tpo-share {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  padding: var(--s-3) 0;
  border-block: 1px solid var(--c-border);
  margin: var(--s-5) 0;
  font-size: 12.5px;
}
.tpo-share-label {
  color: var(--c-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: var(--s-2);
}
.tpo-share a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-bg-band);
  color: var(--c-text);
  transition: all var(--tr-fast);
}
.tpo-share a:hover {
  background: var(--c-primary);
  color: #fff;
}
.tpo-share svg {
  width: 14px;
  height: 14px;
}

/* Tags */
.tpo-tags {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin: var(--s-5) 0;
}
.tpo-tags a {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--c-bg-band);
  color: var(--c-text-soft);
  border-radius: var(--r-pill);
}
.tpo-tags a:hover {
  background: var(--c-primary);
  color: #fff;
}

/* FAQ block */
.tpo-faq,
.schema-faq-section {
  margin: var(--s-6) 0;
  padding: var(--s-5);
  background: var(--c-bg-soft);
  border-radius: var(--r-3);
  border-left: 4px solid var(--cat-tmc);
}
.tpo-faq h3,
.schema-faq-question h3 {
  font-size: 1.05rem;
  margin: 1em 0 0.4em;
  color: var(--c-text);
}
.tpo-faq h3:first-child,
.schema-faq-question:first-child h3 {
  margin-top: 0;
}
.schema-faq-question {
  margin-bottom: var(--s-4);
}
.schema-faq-question:last-child {
  margin-bottom: 0;
}

/* ===== 12. Breadcrumbs ===== */
.tpo-breadcrumbs {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin: var(--s-4) 0;
}
.tpo-breadcrumbs a {
  color: var(--c-text-muted);
}
.tpo-breadcrumbs a:hover {
  color: var(--c-primary);
}
.tpo-breadcrumbs .sep {
  color: var(--c-text-faint);
}
.tpo-breadcrumbs .current {
  color: var(--c-text);
  font-weight: 500;
}

/* ===== 13. Archive / category pages ===== */
.tpo-archive-header {
  padding: var(--s-7) 0 var(--s-5);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--s-6);
}
.tpo-archive-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-primary);
  margin-bottom: var(--s-2);
}
.tpo-archive-title {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 var(--s-3);
}
.tpo-archive-desc {
  font-size: 15px;
  color: var(--c-text-soft);
  max-width: var(--w-content);
  margin: 0;
}

/* Pagination */
.tpo-pagination {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  margin: var(--s-7) 0;
  font-size: 14px;
}
.tpo-pagination a,
.tpo-pagination span {
  padding: 8px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  border-radius: var(--r-2);
  text-decoration: none;
  transition: all var(--tr-fast);
}
.tpo-pagination a:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.tpo-pagination .current {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* ===== 14. Footer ===== */
.tpo-footer {
  background: #111418;
  color: #c0c4ca;
  padding: var(--s-7) 0 var(--s-5);
  margin-top: var(--s-8);
}
:root[data-theme="dark"] .tpo-footer {
  background: #0a0c0f;
}
.tpo-footer-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  margin-bottom: var(--s-6);
}
@media (min-width: 720px) {
  .tpo-footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.tpo-footer h3 {
  font-family: var(--f-display);
  font-size: 1rem;
  color: #fff;
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--c-primary);
  display: inline-block;
}
.tpo-footer p {
  color: #a0a4aa;
  font-size: 14px;
  line-height: 1.65;
}
.tpo-footer a {
  color: #c0c4ca;
}
.tpo-footer a:hover {
  color: var(--c-accent);
}
.tpo-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tpo-footer-links li {
  margin-bottom: var(--s-2);
}
.tpo-footer-links a {
  font-size: 14px;
}
.tpo-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid #2a2e36;
  font-size: 12.5px;
  color: #888c93;
}
.tpo-social {
  display: flex;
  gap: var(--s-2);
}
.tpo-social a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1f2228;
  color: #fff;
  transition: background var(--tr-fast);
}
.tpo-social a:hover {
  background: var(--c-primary);
}
.tpo-social svg {
  width: 14px;
  height: 14px;
}

/* ===== 15. Hub pages (Phase B-built) ===== */
.tpo-hub-header {
  text-align: center;
  padding: var(--s-7) var(--s-4) var(--s-6);
  background: linear-gradient(135deg, var(--c-primary-soft), var(--c-bg-soft));
  border-radius: var(--r-4);
  margin-bottom: var(--s-6);
}
.tpo-hub-title {
  font-family: var(--f-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 var(--s-3);
}
.tpo-hub-intro {
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto;
  color: var(--c-text-soft);
  line-height: 1.65;
}
.tpo-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-4);
  margin: var(--s-5) 0;
}
.tpo-hub-card {
  display: block;
  padding: var(--s-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-3);
  text-decoration: none;
  color: inherit;
  transition: all var(--tr-base);
}
.tpo-hub-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--sh-3);
  transform: translateY(-2px);
}
.tpo-hub-card-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tpo-hub-card-title {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: var(--s-2) 0;
  color: var(--c-text);
}
.tpo-hub-card-excerpt {
  font-size: 13.5px;
  color: var(--c-text-soft);
  line-height: 1.55;
  margin: 0;
}

/* ===== 16. Utilities ===== */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.u-hidden {
  display: none !important;
}
@media (max-width: 719px) {
  .u-hide-mobile {
    display: none !important;
  }
}
@media (min-width: 720px) {
  .u-hide-desktop {
    display: none !important;
  }
}

/* ===== 17. Print ===== */
@media print {
  .tpo-topbar,
  .tpo-header,
  .tpo-footer,
  .tpo-share,
  .tpo-sidebar,
  .tpo-ticker,
  .heateor_sss_sharing_container,
  #wpadminbar {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .tpo-article-body {
    max-width: 100%;
    font-size: 12pt;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ===== 18. Hueman parent — neutralize specific bloat ===== */
/* Hide Hueman's default header/footer wrappers if our templates render properly */
#header.s1 {
  display: none;
}
#footer .container > .grid-2 {
} /* Allow our custom footer to show */
.heateor_sss_sharing_container {
  display: none !important;
} /* Replace with our share buttons */

/* ===== 19. Accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-1);
}
[id] {
  scroll-margin-top: calc(var(--header-h) + var(--topbar-h) + 16px);
}
