:root {
  color-scheme: light;
  --ink: #132035;
  --muted: #5c6678;
  --paper: #fffdf8;
  --canvas: #f4f0e8;
  --line: #d8d4ca;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --radius-sm: 0.6rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --content: 74rem;
}

body {
  font-family: Inter, "Noto Sans Telugu", "Nirmala UI", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(242, 107, 56, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(15, 139, 141, 0.14), transparent 32rem),
    linear-gradient(180deg, #fffdfa 0, #f7f3ec 40rem, var(--canvas) 100%);
}

.showcase-header,
.showcase-main,
.showcase-footer {
  width: min(100% - 2rem, var(--content));
  margin-inline: auto;
}

.showcase-header {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.showcase-brand { display: inline-flex; align-items: center; gap: 0.75rem; font-weight: 900; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { display: inline-grid; width: 2.25rem; aspect-ratio: 1; place-items: center; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 850; }

.showcase-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  min-height: auto;
  padding-block: clamp(1.25rem, 3vw, 2.5rem);
}

.showcase-hero h1 span { color: var(--accent); }
.hero-note { border-left: 3px solid var(--accent); padding-left: 1.25rem; }
.hero-note p:last-child { margin-bottom: 0; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.result-count { font-weight: 750; white-space: nowrap; }

/* Functional Pillars & Category Hubs */
.category-hubs-bar {
  margin-bottom: 2.5rem;
}
.category-hubs-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.category-hubs-header .eyebrow {
  margin-bottom: 0;
}
.category-guides-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.category-hubs-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.category-hub-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}
.category-hub-link--sub {
  font-weight: 600;
  opacity: 0.85;
}
.category-hub-divider {
  border-left: 1px solid var(--line);
  margin-inline: 0.25rem;
}

/* Search Utilities Input */
.search-bar-container {
  margin-bottom: 1.25rem;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
}
.search-icon {
  position: absolute;
  left: 1.1rem;
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.6;
}
.utility-search-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 2.85rem 0.75rem 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.utility-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: white;
}
.clear-search-btn {
  position: absolute;
  right: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 50%;
  touch-action: manipulation;
}
.clear-search-btn:hover {
  color: var(--ink);
}

/* Ensure hidden elements and project cards are strictly removed from layout */
[hidden],
.project-card[hidden],
#project-grid .project-card[hidden] {
  display: none !important;
}

/* Empty search state */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  margin-block: 1.5rem;
}
.empty-state__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.empty-state__msg {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.filter-row { display: flex; gap: 0.55rem; overflow-x: auto; padding: 0.4rem 0 1.4rem; scrollbar-width: thin; }
.filter-button { flex: 0 0 auto; border-color: var(--line); background: rgba(255,255,255,0.66); color: var(--ink); }
.filter-button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.15rem;
  min-height: auto;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
  padding: 1.45rem;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
}

.project-card__top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent) 15%, #f8fafc);
  color: var(--ink);
  font-weight: 750;
  font-size: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
}
.project-card__visual {
  flex: 1 1 auto;
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  overflow: hidden;
}
.project-card__art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.06));
}
.project-card__body {
  flex: 0 0 auto;
}
.project-card__body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 800;
}
.project-card__body p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.42;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-link,
.project-card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  min-height: 0;
  border: none;
  padding: 0;
  font-size: 0;
  color: transparent;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.project-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  border-radius: var(--radius-sm, 0.75rem);
}

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: clamp(4rem, 9vw, 8rem);
  border-radius: var(--radius-lg);
  background: var(--ink);
  padding: clamp(1.5rem, 5vw, 4rem);
  color: white;
}
.principles .eyebrow { color: #ff9a72; }
.principles ul { display: grid; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.principles li { border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 0.8rem; }

/* Footer layout with policy navigation */
.showcase-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  border-top: 1px solid var(--line);
  padding-block: 2.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.showcase-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.showcase-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.showcase-footer__nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}
.showcase-footer__nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 60rem) {
  .project-card { padding: 1.1rem; }
  .project-card__body h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
  .project-card__body p { font-size: 0.78rem; line-height: 1.35; }
}

@media (max-width: 54rem) {
  .showcase-hero { grid-template-columns: 1fr; min-height: auto; }
}

@media (max-width: 38rem) {
  .showcase-header, .showcase-main, .showcase-footer { width: min(100% - 1.25rem, var(--content)); }
  .showcase-header {
    flex-wrap: wrap;
    min-height: auto;
    padding-block: 0.6rem;
    gap: 0.5rem;
  }
  .showcase-brand {
    font-size: 1.15rem;
    gap: 0.5rem;
  }
  .brand-mark {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.95rem;
  }
  #site-brand-badge,
  #site-privacy-badge {
    display: none;
  }
  .filter-row {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Compact Hero Section */
  .showcase-hero {
    padding-block: 0.75rem 1rem;
    gap: 0.65rem;
  }
  .showcase-hero .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
  }
  #showcase-title {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    line-height: 1.15;
    margin-bottom: 0.35rem;
    letter-spacing: -0.03em;
  }
  .hero-note {
    border-left-width: 2.5px;
    padding-left: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .hero-note p {
    margin-bottom: 0.25rem;
  }

  /* Compact Category Navigation Bar */
  .category-hubs-bar {
    margin-bottom: 0.9rem;
  }
  .category-hubs-header {
    margin-bottom: 0.35rem;
    gap: 0.25rem;
  }
  .category-hubs-header .eyebrow {
    font-size: 0.68rem;
  }
  .category-guides-link {
    font-size: 0.76rem;
  }
  .category-hubs-list {
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 1.5rem), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 1.5rem), transparent 100%);
    padding-bottom: 0.35rem;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
  }
  .category-hubs-list::-webkit-scrollbar {
    display: none;
  }
  .category-hub-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    min-height: 44px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .category-hub-divider {
    display: none;
  }

  /* Section Heading & Compact Search Bar */
  .section-heading {
    align-items: flex-end;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
  }
  .section-heading .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 0.1rem;
  }
  #tools-heading {
    font-size: clamp(1.2rem, 4.5vw, 1.4rem);
    margin-bottom: 0;
    line-height: 1.2;
  }
  .result-count {
    font-size: 0.75rem;
  }
  .search-bar-container {
    margin-bottom: 0.75rem;
  }
  .utility-search-input {
    min-height: 2.75rem;
    padding: 0.5rem 2.6rem 0.5rem 2.35rem;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
  }
  .search-icon {
    left: 0.8rem;
    font-size: 0.95rem;
  }
  .clear-search-btn {
    right: 0.2rem;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.2rem;
  }

  /* Square Tool Cards & Three-Column Grid (3 per line on mobile, 5 rows) */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.45rem;
  }
  .project-card {
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 0.45rem 0.4rem;
    border-radius: var(--radius-sm, 0.75rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  }
  .project-card:hover, .project-card:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  }
  .project-card__top {
    font-size: 0.55rem;
    margin-bottom: 0.15rem;
    letter-spacing: 0.02em;
    max-width: 100%;
  }
  .category-tag {
    display: inline-block;
    padding: 0.08rem 0.3rem;
    font-size: 0.5rem;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .project-card__visual {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 0.15rem 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .project-card__art {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.05));
  }
  .project-card__body {
    flex: 0 0 auto;
    margin-bottom: 0;
  }
  .project-card__body h3 {
    font-size: 0.72rem;
    line-height: 1.15;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.01em;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .project-card__body p {
    display: none;
  }
  .project-link {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 0;
    border: none;
    font-size: 0;
  }

  .empty-state {
    padding: 2rem 1rem;
    margin-block: 1rem;
  }
  .empty-state__title {
    font-size: 1.15rem;
  }
  .empty-state__msg {
    font-size: 0.85rem;
  }

  /* Principles & Guides */
  .principles {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem;
    border-radius: var(--radius);
  }
  .principles ul {
    gap: 0.5rem;
  }
  .principles li {
    padding-bottom: 0.5rem;
    font-size: 0.84rem;
  }

  .home-featured-guides {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
  }
  .featured-guides-header {
    margin-bottom: 0.85rem;
  }
  .featured-guides-header h2 {
    font-size: 1.35rem;
  }
  .guides-subheadline {
    font-size: 0.84rem;
    line-height: 1.45;
  }
  .guides-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  .guide-card {
    padding: 0.9rem;
  }
  .guide-title {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }
  .guide-summary {
    font-size: 0.82rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .browse-all-guides-link {
    min-height: 44px;
    font-size: 0.82rem;
    padding: 0.5rem 1.2rem;
  }

  .showcase-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 1.5rem;
    gap: 0.85rem;
  }
  .showcase-footer__nav {
    gap: 0.75rem;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   Home Featured Guides & Editorial Section
   ========================================================================== */

.home-featured-guides {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.featured-guides-header {
  margin-bottom: 2rem;
}

.featured-guides-header .eyebrow {
  margin-bottom: 0.35rem;
}

.featured-guides-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.guides-subheadline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 48rem;
  line-height: 1.6;
  margin: 0;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  background: white;
  padding: 1.6rem;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  border-color: var(--accent);
}

.guide-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.guide-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.guide-badge--growing {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.guide-badge--working {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.guide-badge--learning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.guide-read-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.guide-card-body {
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.guide-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 0.65rem;
}

.guide-summary {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.guide-card-footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.guide-read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 850;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}

.guide-read-link:hover {
  text-decoration: underline;
  gap: 0.55rem;
}

.guides-footer-cta {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.browse-all-guides-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.browse-all-guides-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

@media (max-width: 960px) {
  .guides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
}


/* Shared Language Switcher */
.site-lang-picker {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper, #fff);
  padding: 2px;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.site-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
  transition: all 0.15s ease;
  line-height: 1;
}

.site-lang-btn:hover {
  color: var(--ink);
}

.site-lang-btn.is-active {
  background: var(--accent);
  color: white;
}

@media (max-width: 680px) {
  .site-lang-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.76rem;
  }
}

/* ==========================================================================
   Home Latest News & Statutory Updates Feed (5-item Paginated Feed)
   ========================================================================== */
.home-news-section {
  margin-top: 2.75rem;
  margin-bottom: 2.25rem;
}
.news-articles-list {
  display: grid;
  gap: 0.85rem;
}
.news-article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 0.75rem);
  padding: 1.15rem 1.35rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-article-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}
.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.news-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.news-badge--exam { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.news-badge--finance { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.news-badge--jobs { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.news-badge--schemes { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.news-badge--default { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.news-date {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
}
.news-source {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.news-title {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--ink);
}
.news-summary {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}
.news-footer-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 750;
  font-size: 0.82rem;
  text-decoration: none;
  width: fit-content;
  transition: opacity 0.15s ease;
}
.news-footer-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Pagination Controls */
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.news-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 750;
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}
.news-page-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--ink);
}
.news-page-btn.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.news-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .news-article-card {
    padding: 1rem;
  }
  .news-title {
    font-size: 0.98rem;
  }
}

/* ==========================================================================
   Inside Hubs, Guides Directory & Editorial Articles
   ========================================================================== */

.showcase-header {
  flex-wrap: wrap;
  row-gap: 0.25rem;
  padding-block: 0.35rem;
}

.showcase-brand {
  min-height: 44px;
}

header.showcase-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

header.showcase-header nav a,
.tool-back-nav a,
.breadcrumbs a,
.cat-pill-link,
.category-guides-link,
.news-footer-link,
.btn-primary,
.showcase-footer__nav a,
.site-footer__bar > a,
.site-footer__nav a,
.use-case-card a,
.guides-section-header a,
.guide-read-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}

.tool-back-nav,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
}

.guides-section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.5rem;
}

.guide-article,
.guide-container {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}

.table-scroll,
.comparison-table-wrapper {
  display: block;
  width: 100%;
  max-inline-size: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-block: 1.25rem;
  border-radius: var(--radius-sm, 0.6rem);
}

.table-scroll table,
.comparison-table-wrapper table {
  width: 100%;
  margin-block: 0;
}

@media (max-width: 38rem) {
  .showcase-main {
    width: min(100% - 1.25rem, var(--content));
  }

  header.showcase-header {
    gap: 0.35rem 0.75rem;
  }

  header.showcase-header nav {
    gap: 0.15rem 0.65rem;
    font-size: 0.85rem;
  }

  .guide-article,
  .guide-container {
    padding-block: 1.25rem;
  }

  .data-table th,
  .data-table td,
  .comparison-table th,
  .comparison-table td,
  .slabs-table th,
  .slabs-table td {
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
  }

  /* Inside Pillar & Category Hubs: 2 cards per row */
  main .pillar-hero .hub-grid,
  main .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-block: 1.25rem 2rem;
  }

  main .hub-grid .project-card {
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 0.6rem 0.6rem 0.65rem;
    border-radius: var(--radius-sm, 0.75rem);
  }

  main .hub-grid .project-card__top {
    font-size: 0.58rem;
    margin-bottom: 0.2rem;
    max-width: 100%;
  }

  main .hub-grid .category-tag {
    padding: 0.12rem 0.42rem;
    font-size: 0.55rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main .hub-grid .project-card__visual {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 0.2rem 0.25rem;
  }

  main .hub-grid .project-card__art {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  main .hub-grid .project-card__body {
    margin-bottom: 0;
  }

  main .hub-grid .project-card__body h3 {
    font-size: 0.85rem;
    line-height: 1.2;
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  main .hub-grid .project-card__body p {
    display: none;
  }

  main .hub-grid .project-link {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 0;
    border: none;
    font-size: 0;
    color: transparent;
  }

  /* Guides Directory (/guides/index.html): 2 cards per row on mobile */
  main .guides-hub .guides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-block: 1rem 2rem;
  }

  main .guides-hub .guide-card {
    padding: 0.72rem;
    border-radius: var(--radius-sm, 0.75rem);
    min-width: 0;
  }

  main .guides-hub .guide-card-meta {
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
  }

  main .guides-hub .guide-badge {
    font-size: 0.6rem;
    padding: 0.14rem 0.4rem;
  }

  main .guides-hub .guide-card h3 {
    font-size: 0.86rem;
    line-height: 1.28;
    margin: 0 0 0.35rem;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  main .guides-hub .guide-card p {
    font-size: 0.74rem;
    line-height: 1.38;
    margin-bottom: 0.55rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  main .guides-hub .guide-card-footer {
    padding-top: 0.25rem;
    font-size: 0.78rem;
  }

  main .guides-hub .guide-read-link {
    min-height: 44px;
    font-size: 0.78rem;
  }
}
