/*
Theme Name: 2px Blogs
Theme URI: https://blogs.2px.in
Description: Child theme of GeneratePress for 2px Blogs. Matches the 2px.in brand: clean type, blue accent, card-based layout, bilingual UI.
Author: 2px.in team
Author URI: https://2px.in
Template: generatepress
Version: 1.1.9
Text Domain: twopx-blogs
*/

/* -------------------------------------------------------------------------
   Design tokens — 2px.in (Tailwind-equivalent)
   blue-600 #2563EB, gray-50 #F9FAFB, gray-800 #1F2937, rounded-xl, shadow-sm
   ------------------------------------------------------------------------- */
:root {
  --tp-bg: #f9fafb;
  --tp-bg-elevated: #ffffff;
  --tp-bg-muted: #f3f4f6;
  --tp-text: #1f2937;
  --tp-text-strong: #111827;
  --tp-muted: #6b7280;
  --tp-border: #e5e7eb;
  --tp-accent: #2563eb;
  --tp-accent-hover: #1d4ed8;
  --tp-accent-soft: #eff6ff;
  --tp-accent-text: #ffffff;
  --tp-link: #2563eb;
  --tp-link-hover: #1d4ed8;
  --tp-radius: 12px;
  --tp-radius-sm: 8px;
  --tp-shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 1px 3px rgba(17, 24, 39, 0.08);
  --tp-shadow-md: 0 4px 12px rgba(17, 24, 39, 0.08);
  --tp-header-bg: #ffffff;
  --tp-footer-bg: #111827;
  --tp-footer-text: #d1d5db;
  --tp-footer-muted: #9ca3af;
  --tp-max: 1200px;
  --tp-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Arabic", sans-serif;
  --tp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tp-wordmark: #16233d;
  --tp-wordmark-dot: #275df1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tp-bg: #0b1220;
    --tp-bg-elevated: #111827;
    --tp-bg-muted: #1f2937;
    --tp-text: #e5e7eb;
    --tp-text-strong: #f9fafb;
    --tp-muted: #9ca3af;
    --tp-border: #374151;
    --tp-accent: #3b82f6;
    --tp-accent-hover: #60a5fa;
    --tp-accent-soft: #1e3a8a;
    --tp-link: #60a5fa;
    --tp-link-hover: #93c5fd;
    --tp-header-bg: #111827;
    --tp-footer-bg: #030712;
    --tp-footer-text: #e5e7eb;
    --tp-footer-muted: #9ca3af;
    --tp-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --tp-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --tp-wordmark: #f3f5f9;
    --tp-wordmark-dot: #6d8dff;
  }
}

[data-theme="dark"] {
  --tp-bg: #0b1220;
  --tp-bg-elevated: #111827;
  --tp-bg-muted: #1f2937;
  --tp-text: #e5e7eb;
  --tp-text-strong: #f9fafb;
  --tp-muted: #9ca3af;
  --tp-border: #374151;
  --tp-accent: #3b82f6;
  --tp-accent-hover: #60a5fa;
  --tp-accent-soft: #1e3a8a;
  --tp-link: #60a5fa;
  --tp-link-hover: #93c5fd;
  --tp-header-bg: #111827;
  --tp-footer-bg: #030712;
  --tp-footer-text: #e5e7eb;
  --tp-footer-muted: #9ca3af;
  --tp-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --tp-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --tp-wordmark: #f3f5f9;
  --tp-wordmark-dot: #6d8dff;
}

html { background: var(--tp-bg); }
body.gp-default-or-child,
body {
  font-family: var(--tp-font);
  color: var(--tp-text);
  background-color: var(--tp-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Override GeneratePress thin headings */
.main-title,
h1, h2, h3, h4, h5, h6,
.entry-title, .page-title {
  font-family: var(--tp-font);
  font-weight: 700;
  color: var(--tp-text-strong);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
h1, h1.entry-title, h1.page-title { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
@media (min-width: 769px) {
  h1, h1.entry-title, h1.page-title { font-size: 2.25rem; }
  h2 { font-size: 1.65rem; }
}

a { color: var(--tp-link); }
a:hover, a:focus { color: var(--tp-link-hover); }

/* -------------------------------------------------------------------------
   Sticky header + navigation
   ------------------------------------------------------------------------- */
.site-header {
  background-color: var(--tp-header-bg) !important;
  color: var(--tp-text) !important;
  border-bottom: 1px solid var(--tp-border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.2s ease;
}
.site-header.is-stuck,
.site-header.tp-stuck {
  box-shadow: var(--tp-shadow);
}
.site-header a,
.site-header .main-title a,
.site-header .main-title a:hover {
  color: var(--tp-text-strong) !important;
}
.site-header .px-wordmark,
.site-header .px-wordmark:hover,
.site-header .px-wordmark:focus {
  color: var(--tp-wordmark) !important;
  text-decoration: none !important;
}
.site-header .px-wordmark span {
  color: var(--tp-wordmark-dot) !important;
}
.site-description { color: var(--tp-muted) !important; font-size: 0.85rem; }
.inside-header {
  padding: 0.7rem 1.25rem;
  align-items: center;
}
.site-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.has-custom-logo .site-branding .main-title,
.has-custom-logo .site-branding .site-description,
.has-custom-logo .site-description {
  display: none;
}
.site-logo {
  display: flex;
  align-items: center;
  height: auto;
  width: auto;
  max-width: none;
}
.site-logo img,
.site-header .custom-logo-link img,
img.custom-logo {
  display: none;
}

/* When nav floats right it's inside the header */
.nav-float-right .site-header {
  /* already sticky */
}
.main-navigation,
.main-navigation ul ul {
  background-color: transparent !important;
}
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
  color: var(--tp-text) !important;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a,
.main-navigation .menu-bar-item:hover > a {
  color: var(--tp-accent) !important;
  background-color: transparent !important;
}
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: var(--tp-accent) !important;
  background-color: transparent !important;
}
.main-navigation .main-nav ul ul {
  background: var(--tp-bg-elevated) !important;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  box-shadow: var(--tp-shadow-md);
  padding: 0.35rem 0;
  min-width: 220px;
}
.main-navigation .main-nav ul ul li a {
  color: var(--tp-text) !important;
  padding: 0.45rem 1rem;
}
.main-navigation .main-nav ul ul li:hover > a {
  background: var(--tp-accent-soft) !important;
  color: var(--tp-accent) !important;
}
.main-navigation .menu-toggle {
  background: transparent;
}

/* Header tools: language + dark mode + search */
.tp-header-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}
.tp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--tp-border);
  background: var(--tp-bg-elevated);
  color: var(--tp-text);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.tp-icon-btn:hover,
.tp-icon-btn:focus {
  border-color: var(--tp-accent);
  color: var(--tp-accent);
  background: var(--tp-accent-soft);
}
.tp-lang-switcher {
  position: relative;
}
.tp-lang-switcher > button,
.tp-lang-switcher > a.tp-lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--tp-border);
  background: var(--tp-bg-elevated);
  color: var(--tp-text-strong);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}
.tp-lang-switcher > button:hover,
.tp-lang-switcher > a.tp-lang-current:hover {
  border-color: var(--tp-accent);
  color: var(--tp-accent);
}
.tp-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--tp-bg-elevated);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  box-shadow: var(--tp-shadow-md);
  min-width: 180px;
  padding: 0.35rem 0;
  z-index: 250;
  list-style: none;
  margin: 0;
}
.tp-lang-switcher.is-open .tp-lang-menu,
.tp-lang-switcher:focus-within .tp-lang-menu {
  display: block;
}
.tp-lang-menu li a {
  display: block;
  padding: 0.4rem 0.9rem;
  color: var(--tp-text) !important;
  text-decoration: none;
  font-size: 0.9rem;
}
.tp-lang-menu li a:hover,
.tp-lang-menu li.current-lang a {
  background: var(--tp-accent-soft);
  color: var(--tp-accent) !important;
}
/* GP 3.6 no longer hides the classic nav search form, so the empty field
   sat in the desktop header. Keep the icon (.search-item); overlay the form
   only when navigation-search.min.js adds .nav-search-active. */
.main-navigation .inside-navigation {
  position: relative;
}
.navigation-search {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}
.navigation-search.nav-search-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 40;
  display: flex;
  align-items: center;
  background: var(--tp-header-bg);
  padding: 0 0.75rem;
}
.navigation-search input[type="search"] {
  background: var(--tp-bg) !important;
  color: var(--tp-text) !important;
  border: 1px solid var(--tp-border) !important;
  width: 100%;
  height: 44px;
  border-radius: var(--tp-radius-sm);
  font-size: 1rem;
}
@media (max-width: 768px) {
  /* Room for .mobile-bar-items search icon, which is absolutely at the right. */
  .nav-search-enabled .main-navigation .menu-toggle {
    padding-right: 3.8rem;
  }
}

/* -------------------------------------------------------------------------
   Layout, cards, home
   ------------------------------------------------------------------------- */
.site-content,
.one-container .site-content,
.content-area,
#content,
#page,
.site {
  background-color: var(--tp-bg);
  color: var(--tp-text);
}
.inside-article {
  background-color: var(--tp-bg);
  color: var(--tp-text);
}
.separate-containers .inside-article {
  background: var(--tp-bg-elevated);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}
body .grid-container { max-width: var(--tp-max); }

.tp-home { padding: 1.25rem 0 3rem; }
.tp-home-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tp-accent);
  margin: 0 0 0.4rem;
}
.tp-section-title {
  font-size: 1.35rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.tp-section-title a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.tp-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--tp-bg-elevated);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  overflow: hidden;
  margin-bottom: 2.5rem;
  text-decoration: none;
  color: inherit;
}
@media (min-width: 800px) {
  .tp-featured { grid-template-columns: 1.15fr 1fr; }
}
.tp-featured-media {
  min-height: 200px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb 40%, #111827);
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.tp-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tp-featured-body { padding: 1.5rem 1.5rem 1.6rem; }
.tp-featured-body h2 {
  font-size: 1.7rem;
  margin: 0.35rem 0 0.7rem;
}
.tp-featured-body h2 a { color: var(--tp-text-strong); text-decoration: none; }
.tp-featured-body h2 a:hover { color: var(--tp-accent); }
.tp-meta {
  color: var(--tp-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
}
.tp-chip {
  display: inline-block;
  background: var(--tp-accent-soft);
  color: var(--tp-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
}
.tp-chip:hover { color: var(--tp-accent-hover); }

.tp-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  margin-bottom: 2.75rem;
}
@media (min-width: 640px) {
  .tp-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .tp-card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.tp-card {
  background: var(--tp-bg-elevated);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
}
.tp-card-body { padding: 1.1rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.tp-card h3 { font-size: 1.1rem; margin: 0.4rem 0 0.5rem; }
.tp-card h3 a { color: var(--tp-text-strong); text-decoration: none; }
.tp-card h3 a:hover { color: var(--tp-accent); }
.tp-card p { color: var(--tp-muted); margin: 0 0 0.75rem; flex: 1; font-size: 0.95rem; }
.tp-card-media {
  aspect-ratio: 16 / 9;
  background: var(--tp-bg-muted);
  overflow: hidden;
}
.tp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tp-empty {
  background: var(--tp-bg-elevated);
  border: 1px dashed var(--tp-border);
  border-radius: var(--tp-radius);
  padding: 1.5rem;
  color: var(--tp-muted);
}

/* -------------------------------------------------------------------------
   Single post / page typography
   ------------------------------------------------------------------------- */
.separate-containers .inside-article,
.one-container .inside-article {
  padding: 1.5rem 1.25rem;
}
@media (min-width: 769px) {
  .separate-containers .inside-article,
  .one-container .inside-article { padding: 2rem 2.25rem; }
}
.entry-content, .page-content, .entry-summary {
  font-size: 1.0625rem;
  color: var(--tp-text);
}
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 { margin: 1.6em 0 0.6em; }
.entry-content h3 { margin: 1.35em 0 0.5em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.15em 1.25em; }
.entry-content ol ol,
.entry-content ol ul,
.entry-content ul ul,
.entry-content ul ol {
  margin: 0.35em 0 0.55em 0.15em;
}
.entry-content ol ol,
.entry-content ol ul,
.entry-content ul ul,
.entry-content ul ol {
  list-style-type: disc;
}
.entry-content ol ol > li,
.entry-content ol ul > li,
.entry-content ul ul > li,
.entry-content ul ol > li {
  list-style-type: disc;
  padding-left: 0.15em;
}
.entry-content a { text-underline-offset: 2px; }
.entry-content img { border-radius: var(--tp-radius-sm); }
.entry-meta, .entry-header .entry-meta { color: var(--tp-muted); font-size: 0.9rem; }
.entry-header { margin-bottom: 1.25rem; }

.tp-breadcrumbs {
  font-size: 0.85rem;
  color: var(--tp-muted);
  margin: 0.5rem 0 1rem;
}
.tp-breadcrumbs a { color: var(--tp-muted); text-decoration: none; }
.tp-breadcrumbs a:hover { color: var(--tp-accent); }

.tp-toc {
  background: var(--tp-bg-muted);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
}
.tp-toc strong { display: block; margin-bottom: 0.5rem; color: var(--tp-text-strong); }
.tp-toc ol.tp-toc-list,
.tp-toc ol {
  list-style: decimal;
  margin: 0;
  padding-left: 1.25rem;
}
.tp-toc li { margin: 0.25rem 0; }
.tp-toc a { text-decoration: none; color: var(--tp-text); }
.tp-toc a:hover { color: var(--tp-accent); }
.tp-toc .tp-toc-sub {
  list-style: disc;
  margin: 0.2rem 0 0.4rem;
  padding-left: 1.15rem;
}
.tp-toc .tp-toc-sub > li {
  list-style-type: disc;
  margin: 0.15rem 0;
}

.tp-author-box,
.tp-related,
.tp-subscribe {
  background: var(--tp-bg-elevated);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  padding: 1.2rem 1.3rem;
  margin: 1.5rem 0 0;
}
.tp-author-box h3,
.tp-related h3,
.tp-subscribe h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.tp-related ul { list-style: none; margin: 0; padding: 0; }
.tp-related li { margin: 0.4rem 0; padding-left: 0; }
.tp-related a { text-decoration: none; font-weight: 600; }

.tp-subscribe p { color: var(--tp-muted); margin: 0 0 0.8rem; }
.tp-home-subscribe form,
.tp-subscribe form,
.tp-post-rail form,
.tnp-subscription form,
.tnp form {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.5rem;
}
.tp-home-subscribe .tnp-field,
.tp-subscribe .tnp-field,
.tp-post-rail .tnp-field,
.tnp-subscription .tnp-field {
  margin: 0;
}
.tnp-field-email {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.tnp-field-email label {
  display: block;
  font-size: 0.8rem;
  color: var(--tp-muted);
  margin: 0 0 0.3rem;
}
.tnp-field-email input[type="email"],
.tp-subscribe input[type="email"],
.tnp-field input[type="email"],
.tnp input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  background: var(--tp-bg);
  color: var(--tp-text);
}
.tnp-field-button {
  flex: 0 0 auto;
  width: auto;
  text-align: left;
}
.tnp-field-button .tnp-submit,
.tnp-field-button input[type="submit"] {
  width: auto;
  white-space: nowrap;
}
@media (max-width: 380px) {
  .tp-home-subscribe form,
  .tp-subscribe form,
  .tp-post-rail form,
  .tnp-subscription form,
  .tnp form {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .tnp-field-email,
  .tnp-field-button { width: 100%; }
  .tnp-field-button .tnp-submit,
  .tnp-field-button input[type="submit"] { width: 100%; }
}
.tp-btn,
.tp-subscribe button,
.tnp-submit,
.tnp button[type="submit"],
.wp-block-button__link {
  background: var(--tp-accent) !important;
  color: #fff !important;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.tp-btn:hover,
.tp-subscribe button:hover,
.tnp-submit:hover {
  background: var(--tp-accent-hover) !important;
}

.tp-push-prompt {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: 320px;
  background: var(--tp-bg-elevated);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow-md);
  padding: 1rem 1.1rem;
  z-index: 300;
}
.tp-push-prompt.is-visible { display: block; }
.tp-push-prompt p { margin: 0 0 0.7rem; font-size: 0.92rem; }
.tp-push-actions { display: flex; gap: 0.5rem; }
.tp-btn-ghost {
  background: transparent;
  border: 1px solid var(--tp-border);
  color: var(--tp-text);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* FAQ */
.tp-faq details {
  border-bottom: 1px solid var(--tp-border);
  padding: 0.7rem 0;
}
.tp-faq summary { cursor: pointer; font-weight: 650; color: var(--tp-text-strong); }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--tp-footer-bg) !important;
  color: var(--tp-footer-text) !important;
  margin-top: 2rem;
}
.site-footer a { color: #93c5fd !important; }
.site-footer a:hover { color: #fff !important; }
.site-info, .footer-bar, .inside-site-info {
  color: var(--tp-footer-muted);
}
.tp-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 1.25rem 1.25rem;
  max-width: var(--tp-max);
  margin: 0 auto;
}
@media (min-width: 800px) {
  .tp-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.tp-footer-grid h4 { color: #fff; margin: 0 0 0.6rem; font-size: 0.95rem; }
.tp-footer-grid ul { list-style: none; margin: 0; padding: 0; }
.tp-footer-grid li { margin: 0.3rem 0; }
.tp-footer-brand { font-weight: 800; font-size: 1.2rem; color: #fff; }
.tp-footer-brand .dot { color: #3b82f6; }
.tp-legal-note { font-size: 0.8rem; color: var(--tp-footer-muted); max-width: var(--tp-max); margin: 0 auto; padding: 0 1.25rem 1.5rem; }

/* Archive / category headers */
.page-header, .archive .page-header {
  margin-bottom: 1.25rem;
}
.archive .inside-article, .blog .inside-article, .search .inside-article {
  margin-bottom: 1rem;
}

/* Forms, comments hidden already */
input, textarea, select {
  font-family: inherit;
}

/* RTL tweaks */
[dir="rtl"] .tp-header-tools { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .tp-lang-menu { right: auto; left: 0; }
[dir="rtl"] .tp-card-grid, [dir="rtl"] .tp-featured { direction: rtl; }

/* Reduce layout shift for sticky header */
.nav-float-right #site-navigation { background: transparent; }

/* Hide default GP site title if custom logo is present */
.has-custom-logo .site-header .main-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.has-custom-logo .site-header .site-description { display: none; }

/* Advertisement slots stay visually secondary */
.twopx-ad, .tp-ad, ins.adsbygoogle {
  margin: 1.25rem 0;
  background: var(--tp-bg-muted);
  border-radius: var(--tp-radius-sm);
  min-height: 0;
}
.tp-ad-label, .twopx-ad-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tp-muted);
  margin-bottom: 0.3rem;
}

/* Mobile typography & nav */
@media (max-width: 768px) {
  h1, h1.entry-title { font-size: 1.65rem; }
  .inside-header { padding: 0.55rem 0.9rem; }
  .tp-featured-body { padding: 1.1rem; }
  .tp-featured-body h2 { font-size: 1.3rem; }
  .separate-containers .inside-article,
  .one-container .inside-article { padding: 1.15rem 1rem; }
  .tp-header-tools { gap: 0.25rem; }
  .main-navigation .main-nav ul li a { color: var(--tp-text) !important; }
  .main-navigation .main-nav ul,
  .main-navigation.is-open,
  .toggled .main-nav ul {
    background: var(--tp-bg-elevated) !important;
  }
  .tp-push-prompt { left: 1rem; right: 1rem; max-width: none; }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tp-card, .site-header { transition: none; }
}


/* -------------------------------------------------------------------------
   2px.in-matching HTML wordmark
   ------------------------------------------------------------------------- */
.px-wordmark {
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--tp-wordmark);
  text-decoration: none;
  line-height: 1;
  display: inline-block;
  letter-spacing: 0;
  white-space: nowrap;
}
.px-wordmark span { color: var(--tp-wordmark-dot); }
@media (min-width: 769px) {
  .px-wordmark { font-size: 20px; }
}

/* Desktop: logo and primary menu on one vertically centered header row */
@media (min-width: 769px) {
  .px-wordmark,
  .site-header .px-wordmark {
    font-size: 20px;
  }
  .inside-header {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 82px;
    box-sizing: border-box;
  }
  .site-branding,
  .site-logo {
    flex: 0 0 auto;
    float: none !important;
    margin: 0;
    max-width: none;
  }
  .nav-float-right .inside-header #site-navigation,
  .nav-float-right #site-navigation,
  .main-navigation {
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 0 auto;
    background: transparent !important;
  }
  .main-navigation .inside-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    margin: 0;
  }
  .main-navigation .main-nav > ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
  }
  .main-navigation .main-nav > ul > li > a {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .tp-header-tools {
    flex: 0 0 auto;
    margin-left: 0.15rem;
    align-self: center;
  }
  /* Keep parent labels and carets on one line; hide top-level carets on hover menus */
  .main-navigation .main-nav > ul > li {
    white-space: nowrap;
  }
  .main-navigation .main-nav > ul > li.menu-item-has-children > .dropdown-menu-toggle {
    display: none;
  }
}

/* Mobile: keep logo + menu toggle on the top row; language/theme on a trailing row, right-aligned */
@media (max-width: 768px) {
  .inside-header .tp-header-tools {
    width: 100%;
    justify-content: flex-end;
    margin: 0.15rem 0 0;
    order: 3;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .px-wordmark,
  :root:not([data-theme="light"]) .site-header .px-wordmark,
  :root:not([data-theme="light"]) .site-header .px-wordmark:hover,
  :root:not([data-theme="light"]) .site-header .px-wordmark:focus {
    color: var(--tp-wordmark) !important;
  }
  :root:not([data-theme="light"]) .px-wordmark span,
  :root:not([data-theme="light"]) .site-header .px-wordmark span {
    color: var(--tp-wordmark-dot) !important;
  }
}
[data-theme="dark"] .px-wordmark,
[data-theme="dark"] .site-header .px-wordmark,
[data-theme="dark"] .site-header .px-wordmark:hover,
[data-theme="dark"] .site-header .px-wordmark:focus {
  color: var(--tp-wordmark) !important;
}
[data-theme="dark"] .px-wordmark span,
[data-theme="dark"] .site-header .px-wordmark span {
  color: var(--tp-wordmark-dot) !important;
}
.tp-footer-brand {
  font-family: Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.tp-footer-brand .dot,
.tp-footer-brand span { color: #6d8dff; }

/* Header family bar removed; keep a hide rule for any cached markup. */
.tp-family-bar { display: none !important; }
.tp-footer-family {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.01em;
}
.tp-footer-family a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}
.tp-footer-family a:hover { color: #fff; text-decoration: underline; }

/* -------------------------------------------------------------------------
   Single post: article first; TOC/subscribe/related in a sticky rail
   ------------------------------------------------------------------------- */
.tp-post-hero {
  margin: 0 0 1.25rem;
}
.tp-post-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--tp-radius);
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--tp-bg-muted);
}
.tp-post-hero figcaption {
  font-size: 0.8rem;
  color: var(--tp-muted);
  margin-top: 0.45rem;
}

@media (min-width: 961px) {
  body.single-post.tp-has-rail .inside-article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19.5rem;
    column-gap: 2.25rem;
    align-items: start;
  }
  body.single-post.tp-has-rail .inside-article > .entry-header,
  body.single-post.tp-has-rail .inside-article > .featured-image,
  body.single-post.tp-has-rail .inside-article > .tp-post-hero,
  body.single-post.tp-has-rail .inside-article > .tp-post-hero-caption,
  body.single-post.tp-has-rail .inside-article > .entry-content,
  body.single-post.tp-has-rail .inside-article > .tp-author-box {
    grid-column: 1;
  }
  body.single-post.tp-has-rail .tp-post-rail {
    grid-column: 2;
    grid-row: 1 / span 20;
    position: sticky;
    top: 6.25rem;
    max-height: calc(100vh - 7.25rem);
    overflow: auto;
    align-self: start;
  }
  .tp-rail-toggle,
  .tp-rail-backdrop,
  .tp-rail-toolbar {
    display: none !important;
  }
  body.single-post.tp-has-rail .tp-toc,
  body.single-post.tp-has-rail .tp-subscribe,
  body.single-post.tp-has-rail .tp-related {
    margin: 0 0 1rem;
  }
}

@media (max-width: 960px) {
  .tp-rail-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 240;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #275df1;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.05rem;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(39, 93, 241, 0.35);
    cursor: pointer;
  }
  .tp-rail-toggle:focus-visible {
    outline: 3px solid #275df1;
    outline-offset: 3px;
  }
  [dir="rtl"] .tp-rail-toggle { right: auto; left: 1rem; }
  .tp-rail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 250;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .tp-rail-backdrop[hidden] { display: none !important; }
  .tp-post-rail {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(22rem, 92vw);
    z-index: 260;
    background: var(--tp-bg-elevated);
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0.22s ease;
    display: flex;
    flex-direction: column;
  }
  [dir="rtl"] .tp-post-rail {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.18);
  }
  .tp-post-rail.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .tp-rail-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem 1rem 1.5rem;
    overflow: auto;
    height: 100%;
  }
  .tp-rail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    background: var(--tp-bg-elevated);
    padding: 0.4rem 0 0.6rem;
    z-index: 1;
  }
  .tp-rail-heading {
    margin: 0;
    font-weight: 800;
    font-size: 1.05rem;
  }
  .tp-rail-close {
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    background: var(--tp-bg-muted);
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--tp-text);
  }
  .tp-rail-close:focus-visible {
    outline: 3px solid #275df1;
    outline-offset: 2px;
  }
  body.tp-rail-open { overflow: hidden; }
  body.single-post .tp-toc,
  body.single-post .tp-subscribe,
  body.single-post .tp-related {
    margin: 0;
  }
}

/* Home subscribe sits in its own band, not under an empty heading */
.tp-home-subscribe {
  margin: 2.25rem 0 0.5rem;
}
.tp-home-subscribe .tp-subscribe {
  max-width: 40rem;
  margin: 0;
}

/* Features / cards: reserve media space even before an image loads */
.tp-featured-media:empty { display: none; }
.tp-card-media img,
.tp-featured-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.single-post .featured-image {
  margin: 0 0 0.5rem;
  padding: 0 !important;
  max-width: none;
}
.single-post .featured-image img {
  width: 100%;
  height: auto;
  border-radius: var(--tp-radius);
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--tp-bg-muted);
}
.tp-post-hero-caption {
  font-size: 0.8rem;
  color: var(--tp-muted);
  margin: 0 0 1.25rem;
}


/* Editorial desk bio on author archives */
.tp-desk-bio {
	max-width: 44rem;
	margin: 0 auto 1.5rem;
	color: var(--tp-muted, #4b5563);
	font-size: 1.02rem;
	line-height: 1.55;
}
.tp-desk-bio p { margin: 0; }


/* -------------------------------------------------------------------------
   Dark mode: homepage surfaces + article contrast (WCAG AA)
   ------------------------------------------------------------------------- */
.entry-content blockquote,
.page-content blockquote {
  margin: 0 0 1.15em;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--tp-accent);
  background: var(--tp-bg-muted);
  color: var(--tp-text);
  border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0;
}
.entry-content table,
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.15em;
  color: var(--tp-text);
}
.entry-content th,
.entry-content td,
.page-content th,
.page-content td {
  border: 1px solid var(--tp-border);
  padding: 0.5rem 0.7rem;
  color: var(--tp-text);
}
.entry-content th,
.page-content th {
  background: var(--tp-bg-muted);
  color: var(--tp-text-strong);
  font-weight: 700;
}
.entry-content code,
.page-content code,
.entry-content kbd,
.entry-content pre,
.page-content pre {
  font-family: var(--tp-mono);
  background: var(--tp-bg-muted);
  color: var(--tp-text-strong);
  border-radius: 6px;
}
.entry-content code,
.page-content code,
.entry-content kbd {
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}
.entry-content pre,
.page-content pre {
  padding: 0.9rem 1rem;
  overflow: auto;
  margin: 0 0 1.15em;
}
.entry-content pre code {
  background: transparent;
  padding: 0;
}
.entry-content figcaption,
.entry-content .wp-caption-text,
.page-content figcaption,
.wp-caption-text,
.gallery-caption {
  color: var(--tp-muted);
  font-size: 0.88rem;
}
.entry-content .tp-faq p,
.entry-content details p {
  color: var(--tp-text);
}

html[data-theme="dark"] .tp-chip,
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tp-chip {
    background: #1e3a8a;
    color: #dbeafe;
  }
  html:not([data-theme="light"]) .tp-chip:hover {
    color: #fff;
  }
}
html[data-theme="dark"] .tp-chip {
  background: #1e3a8a;
  color: #dbeafe;
}
html[data-theme="dark"] .tp-chip:hover { color: #fff; }

/* Kill leftover GeneratePress / plugin light surfaces and ink in dark mode */
html[data-theme="dark"] body,
html[data-theme="dark"] #page,
html[data-theme="dark"] .site,
html[data-theme="dark"] .site-content,
html[data-theme="dark"] .one-container .site-content,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] #content,
html[data-theme="dark"] .inside-article,
html[data-theme="dark"] .tp-home,
html[data-theme="dark"] .grid-container {
  background-color: var(--tp-bg) !important;
  color: var(--tp-text);
}
html[data-theme="dark"] .tp-card,
html[data-theme="dark"] .tp-featured,
html[data-theme="dark"] .tp-empty,
html[data-theme="dark"] .tp-home-subscribe .tp-subscribe,
html[data-theme="dark"] .separate-containers .inside-article {
  background-color: var(--tp-bg-elevated) !important;
  border-color: var(--tp-border);
  color: var(--tp-text);
}
html[data-theme="dark"] .tp-card h3 a,
html[data-theme="dark"] .tp-featured-body h2 a,
html[data-theme="dark"] .tp-section-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .entry-title a {
  color: var(--tp-text-strong) !important;
}
html[data-theme="dark"] .tp-card p,
html[data-theme="dark"] .tp-meta,
html[data-theme="dark"] .entry-meta,
html[data-theme="dark"] .entry-meta a,
html[data-theme="dark"] .posted-on,
html[data-theme="dark"] .byline,
html[data-theme="dark"] .byline a,
html[data-theme="dark"] .tp-desk-bio,
html[data-theme="dark"] .tp-desk-bio p {
  color: var(--tp-muted) !important;
}
html[data-theme="dark"] .byline .author-name,
html[data-theme="dark"] .entry-meta .author-name {
  color: var(--tp-text) !important;
}

html[data-theme="dark"] .entry-content,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .entry-summary,
html[data-theme="dark"] .entry-content p,
html[data-theme="dark"] .entry-content li,
html[data-theme="dark"] .entry-content dd,
html[data-theme="dark"] .entry-content dt,
html[data-theme="dark"] .entry-content td,
html[data-theme="dark"] .entry-content th,
html[data-theme="dark"] .entry-content blockquote,
html[data-theme="dark"] .entry-content blockquote p,
html[data-theme="dark"] .entry-content figcaption,
html[data-theme="dark"] .tp-faq,
html[data-theme="dark"] .tp-faq p {
  color: var(--tp-text) !important;
}
html[data-theme="dark"] .entry-content h1,
html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4,
html[data-theme="dark"] .entry-content h5,
html[data-theme="dark"] .entry-content h6,
html[data-theme="dark"] .tp-faq summary {
  color: var(--tp-text-strong) !important;
}
html[data-theme="dark"] .entry-content a,
html[data-theme="dark"] .page-content a,
html[data-theme="dark"] .tp-toc a,
html[data-theme="dark"] .tp-related a,
html[data-theme="dark"] .tp-post-rail a {
  color: var(--tp-link) !important;
}
html[data-theme="dark"] .entry-content a:hover,
html[data-theme="dark"] .page-content a:hover,
html[data-theme="dark"] .tp-toc a:hover,
html[data-theme="dark"] .tp-related a:hover {
  color: var(--tp-link-hover) !important;
}
html[data-theme="dark"] .entry-content blockquote,
html[data-theme="dark"] .entry-content pre,
html[data-theme="dark"] .entry-content code,
html[data-theme="dark"] .entry-content kbd,
html[data-theme="dark"] .entry-content th {
  background-color: var(--tp-bg-muted);
  color: var(--tp-text-strong) !important;
  border-color: var(--tp-border);
}
html[data-theme="dark"] .entry-content pre code {
  background: transparent;
}
html[data-theme="dark"] .entry-content table,
html[data-theme="dark"] .entry-content th,
html[data-theme="dark"] .entry-content td {
  border-color: var(--tp-border);
}
html[data-theme="dark"] .entry-content figcaption,
html[data-theme="dark"] .wp-caption-text,
html[data-theme="dark"] .gallery-caption,
html[data-theme="dark"] .tp-post-hero figcaption,
html[data-theme="dark"] .tp-post-hero-caption {
  color: var(--tp-muted) !important;
}

html[data-theme="dark"] .tp-toc,
html[data-theme="dark"] .tp-subscribe,
html[data-theme="dark"] .tp-related,
html[data-theme="dark"] .tp-author-box,
html[data-theme="dark"] .tp-post-rail,
html[data-theme="dark"] .tp-rail-panel,
html[data-theme="dark"] .tp-rail-toolbar {
  background-color: var(--tp-bg-elevated) !important;
  border-color: var(--tp-border);
  color: var(--tp-text);
}
html[data-theme="dark"] .tp-toc {
  background-color: var(--tp-bg-muted) !important;
}
html[data-theme="dark"] .tp-toc strong,
html[data-theme="dark"] .tp-subscribe h3,
html[data-theme="dark"] .tp-related h3,
html[data-theme="dark"] .tp-author-box h3,
html[data-theme="dark"] .tp-rail-heading {
  color: var(--tp-text-strong) !important;
}
html[data-theme="dark"] .tp-subscribe p,
html[data-theme="dark"] .tnp-field-email label {
  color: var(--tp-muted) !important;
}
html[data-theme="dark"] .tnp-field-email input[type="email"],
html[data-theme="dark"] .tp-subscribe input[type="email"],
html[data-theme="dark"] .tnp input[type="email"],
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: var(--tp-bg) !important;
  color: var(--tp-text) !important;
  border-color: var(--tp-border) !important;
}
html[data-theme="dark"] .tp-rail-close {
  background: var(--tp-bg-muted);
  color: var(--tp-text-strong);
}
html[data-theme="dark"] .tp-rail-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body,
  html:not([data-theme="light"]) #page,
  html:not([data-theme="light"]) .site,
  html:not([data-theme="light"]) .site-content,
  html:not([data-theme="light"]) .one-container .site-content,
  html:not([data-theme="light"]) .content-area,
  html:not([data-theme="light"]) #content,
  html:not([data-theme="light"]) .inside-article {
    background-color: var(--tp-bg) !important;
    color: var(--tp-text);
  }
}
