/*
Theme Name: Cario Theme
Theme URI: https://kaipkada.lt/
Author: Cario
Author URI: https://kaipkada.lt/
Description: WordPress news portal theme converted from the Astro frontend. Includes front page, archive, single post, page, search, comments, menus, featured images and responsive layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cario-theme
Tags: news, blog, custom-logo, featured-images, custom-menu, threaded-comments, translation-ready
*/


/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --background: #f3f4f6;
  --background-soft: #fafafb;
  --foreground: #14181c;
  --card: #ffffff;
  --card-hover: #fcfcfd;
  --border: #e7e9ec;
  --border-dark: #d8dbe0;
  --secondary: #eef0f3;
  --muted: #f3f4f6;
  --muted-foreground: #636b76;
  --primary: #b8420c;
  --primary-dark: #a63c0a;
  --primary-soft: rgba(184, 66, 12, 0.1);
  --primary-foreground: #ffffff;
  --accent: rgba(240, 88, 31, 0.12);
  --accent-2: #1d6e4a;
  --danger: #d81b3f;
  --ink: #14181c;
  --container: 1280px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 24, 28, 0.05), 0 1px 1px rgba(20, 24, 28, 0.04);
  --shadow-md: 0 10px 24px -8px rgba(20, 24, 28, 0.16);
  --shadow-lg: 0 24px 48px -16px rgba(20, 24, 28, 0.22);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --font-display: "Roboto Condensed", ui-sans-serif, sans-serif;
  --font-body: "Roboto", ui-sans-serif, system-ui, sans-serif;
}

/* ============================================================
   Reset & base (mobile-first)
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.nav-drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
}

main {
  min-height: 60vh;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.container--newsroom {
  max-width: 1180px;
}

.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;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
  transition: transform 220ms ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.topline {
  display: none;
  background: #f7f7f8;
  border-bottom: 1px solid var(--border);
  color: #565d66;
  font-size: 0.74rem;
}

.site-header.is-at-top .topline {
  display: block;
}

.topline__inner,
.mainbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.topline__date {
  margin: 0;
  padding: 0.5rem 0;
  color: #565d66;
}

.topline__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-4);
}

.topline__weather {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  font-weight: 700;
  color: var(--foreground);
}

.topline__weather:hover {
  color: var(--primary);
}

.mainbar {
  background: #ffffff;
}

.mainbar__inner {
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand__logo {
  width: clamp(132px, 18vw, 178px);
  height: auto;
}

.brand__badge {
  display: none;
}

.section-kicker,
.footer-eyebrow,
.article-card__tag,
.story-category {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.section-kicker,
.footer-eyebrow {
  color: var(--primary);
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--foreground);
}

.desktop-nav,
.search-form {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--foreground);
}

.search-form input:focus,
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
}

.button,
.search-form button,
.comment-form button {
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  transition: background 180ms ease, transform 180ms ease;
}

.button:hover,
.search-form button:hover,
.comment-form button:hover {
  background: var(--primary-dark);
}

.button:active,
.search-form button:active,
.comment-form button:active {
  transform: scale(0.97);
}

.profile-menu {
  position: relative;
}

.profile-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-toggle svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: var(--foreground);
}

.profile-toggle__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-toggle:hover {
  background: var(--border);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 90;
  display: grid;
  gap: 0.15rem;
  min-width: 220px;
  padding: var(--space-2);
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.profile-dropdown[hidden] {
  display: none;
}

.profile-dropdown__name {
  margin: 0.2rem 0.5rem 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}

.profile-dropdown a,
.profile-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--foreground);
  transition: background 150ms ease;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: var(--secondary);
}

.menu-toggle:hover {
  background: var(--border);
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--foreground);
  transition: transform 200ms ease, opacity 200ms ease;
}

.menu-toggle__icon {
  position: relative;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle__icon::before {
  top: -0.36rem;
}

.menu-toggle__icon::after {
  top: 0.36rem;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---- Mobile nav drawer ---- */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
  pointer-events: none;
}

.nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 18, 22, 0.5);
  opacity: 0;
  transition: opacity 220ms ease;
  cursor: pointer;
}

.nav-drawer.is-open .nav-drawer__backdrop {
  opacity: 1;
}

.nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 380px);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-5) var(--space-6);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1);
}

.nav-drawer.is-open .nav-drawer__panel {
  transform: translateX(0);
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-drawer__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  font-size: 1rem;
  cursor: pointer;
}

.nav-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-drawer__list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-drawer__link {
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
}

.nav-drawer__link.is-active {
  color: var(--primary);
}

/* ============================================================
   Page shell / shared blocks
   ============================================================ */
.page-shell {
  padding: var(--space-5) 0 var(--space-8);
}

/* Vertical rhythm between top-level page sections (front-grid, category-band,
   story article, etc.) — these are siblings with no shared layout container,
   so spacing has to be applied explicitly. */
.page-shell .container > * + * {
  margin-top: var(--space-7);
}

.status-banner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #fff4ec;
  border: 1px solid #f6d8c2;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}

.status-banner strong,
.status-banner p {
  margin: 0;
}

.status-note,
.article-card__excerpt,
.comment-card__meta,
.page-header p,
.category-hero p,
.footer-copy {
  color: var(--muted-foreground);
}

.section-heading,
.section-divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-heading h2,
.story-content h2,
.section-divider h2 {
  font-size: clamp(1.2rem, 1.6vw + 0.8rem, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.section-divider h2 {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 4px;
  padding-right: 2rem;
  display: inline-block;
}

.section-more,
.section-divider__meta {
  flex-shrink: 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

/* ============================================================
   Front page grids
   ============================================================ */
.front-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.front-grid__lead {
  display: grid;
  gap: var(--space-4);
  align-items: stretch;
}

/* Both lead cards fill the row to equal height */
.front-grid__lead > .lead-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.front-grid__lead > .lead-card .lead-card__body {
  flex: 1 1 auto;
}

.mini-grid,
.mini-grid--dense {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.mini-grid::-webkit-scrollbar,
.mini-grid--dense::-webkit-scrollbar {
  display: none;
}

.mini-grid > *,
.mini-grid--dense > * {
  scroll-snap-align: start;
  flex: 0 0 220px;
}

.mini-grid--dense > * {
  flex: 0 0 180px;
}

/* ============================================================
   Shared card meta (category + date) and comment-count badge.
   Cards use the "stretched link" pattern: the title link gets an
   absolutely-positioned ::after covering the whole (relatively
   positioned) card, while the category/comment links sit above it
   via z-index so they stay independently clickable without nesting
   <a> tags inside the card's main link.
   ============================================================ */
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-meta__category {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #555;
}

.card-meta__category:hover {
  color: var(--primary);
}

.card-meta__icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.card-meta__date {
  color: var(--muted-foreground);
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.card-title {
  margin: 0;
}

.card-title__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-comment-count {
  position: relative;
  z-index: 1;
  color: var(--danger);
  font-weight: 700;
  white-space: nowrap;
}

.card-comment-count:hover {
  text-decoration: underline;
}

/* ============================================================
   Cards: lead / mini
   ============================================================ */
.lead-card,
.mini-card {
  display: block;
}

.lead-card,
.mini-card,
.article-card {
  position: relative;
}

.lead-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.lead-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.lead-card__media,
.mini-card__media {
  display: block;
}

.lead-card__media,
.mini-card__media {
  overflow: hidden;
  background: var(--secondary);
}

.lead-card__media img,
.mini-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.lead-card:hover img,
.mini-card:hover img {
  transform: scale(1.04);
}

.lead-card__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.lead-card__body {
  padding: var(--space-4);
}

.lead-card h2 {
  margin: 0.4rem 0 0;
  font-size: 1.55rem;
  line-height: 1.28;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lead-card--compact h2 {
  font-size: 1.35rem;
}

.mini-card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.mini-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mini-card__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.mini-card__body {
  padding: 0.55rem var(--space-3) var(--space-3);
}

.mini-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.34;
  font-weight: 700;
}

.mini-card__remove {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.72);
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
}

.mini-card__remove:hover {
  background: var(--danger);
}

.most-read-band {
  display: grid;
  gap: var(--space-3);
}

.most-read-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.most-read-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.most-read-card__rank {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill);
  background: var(--foreground);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
}

.most-read-card__body {
  display: grid;
  gap: 0.3rem;
}

.most-read-card__body a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
}

.most-read-card__body a:hover {
  color: var(--primary);
}

.most-read-card__body span {
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

/* ============================================================
   Flash box (vertical headline list)
   ============================================================ */
.flash-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.flash-box__title {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.flash-box__items {
  display: grid;
}

.flash-box__items a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  align-items: start;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  transition: background 150ms ease;
}

.flash-box__items a:hover {
  background: var(--background-soft);
}

.flash-box__items a:last-child {
  border-bottom: 0;
}

.flash-box__items span {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flash-box__items strong {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

/* ============================================================
   Category bands (homepage repeated topic sections)
   ============================================================ */
.category-band {
  padding-top: var(--space-6);
}

.category-band__top {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

/* ============================================================
   Article cards (used on search page)
   ============================================================ */
.article-card {
  display: block;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--secondary);
}

.article-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 360ms ease;
}

.article-card:hover .article-card__media img {
  transform: scale(1.04);
}

.article-card__overlay {
  display: none;
}

.article-card__tag {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #ffffff;
  background: rgba(20, 24, 28, 0.78);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-pill);
}

.article-card__dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.article-card__body {
  padding: var(--space-4);
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-card__title {
  margin: 0.5rem 0 0;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-card__excerpt {
  margin: 0.5rem 0 0;
  font-size: 0.94rem;
}

.article-card__cta {
  margin-top: var(--space-4);
  display: flex;
  justify-content: flex-start;
}

.article-card__cta a {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   Cards & panels (shared backgrounds)
   ============================================================ */
.category-hero,
.page-header,
.comment-card,
.comment-form,
.auth-form,
.profile-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.story-shell,
.category-section {
  background: transparent;
}

/* ============================================================
   Search results
   ============================================================ */
.feed-grid {
  display: grid;
  gap: var(--space-4);
}

.feed-grid .article-card__media {
  aspect-ratio: 16 / 9;
}

.feed-grid .article-card__media img {
  height: 100%;
  object-fit: cover;
}

.feed-grid .article-card__body {
  padding: 0.9rem 1rem 1rem;
}

.feed-grid .article-card__title {
  margin-top: 0.4rem;
  font-size: 1.12rem;
  line-height: 1.24;
}

.feed-grid .article-card__excerpt {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.feed-grid .card-title__link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.search-page-form {
  display: block;
  margin-bottom: var(--space-5);
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.search-page-form__grid {
  display: grid;
  gap: 0.75rem;
}

.search-page-form__field {
  position: relative;
}

.search-page-form input,
.search-page-form__select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--background-soft);
  padding: 0 0.85rem;
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
}

.search-page-form__select {
  appearance: none;
  cursor: pointer;
}

.search-page-form input:focus,
.search-page-form__select:focus {
  outline: none;
  border-color: var(--primary);
}

.search-page-form button:not(.search-autocomplete__item) {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.search-autocomplete {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 70;
  display: grid;
  gap: 0.2rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.35rem;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.search-autocomplete[hidden] {
  display: none;
}

.search-autocomplete__item {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  padding: 0.75rem 0.8rem;
  cursor: pointer;
}

.search-autocomplete__item:hover,
.search-autocomplete__item.is-active {
  background: var(--secondary);
}

.search-autocomplete__item strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.35;
}

.search-autocomplete__item span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

/* ============================================================
   Category page
   ============================================================ */
.category-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  transition: box-shadow 150ms ease;
}

.pagination__link:hover {
  box-shadow: var(--shadow-md);
}

.pagination__link--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination__status {
  color: var(--muted-foreground);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.category-hero,
.page-header {
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.category-hero h1,
.page-header h1 {
  font-size: clamp(1.7rem, 3vw + 1rem, 2.4rem);
  font-weight: 700;
  line-height: 1.06;
  margin: 0;
}

.category-hero p,
.page-header p {
  margin: 0.5rem 0 0;
  max-width: none;
}

.author-hero {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.author-hero__avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  flex-shrink: 0;
}

.author-hero h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.5rem, 2.4vw + 1rem, 2rem);
  font-weight: 700;
}

.author-hero p {
  margin: 0.4rem 0 0;
  max-width: none;
  color: var(--muted-foreground);
}

/* ============================================================
   Article (story) page
   ============================================================ */
.story-shell--newsroom {
  padding: 0;
}

.story-main {
  min-width: 0;
}

.story-header--newsroom {
  padding: 0 0 var(--space-4);
  border-bottom: 1px solid var(--border);
}

.story-category {
  display: inline-flex;
  margin-bottom: var(--space-3);
  color: var(--primary);
}

.story-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw + 1rem, 2.9rem);
  font-weight: 700;
  line-height: 1.12;
  max-width: none;
}

.story-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: var(--space-4);
  font-size: 0.86rem;
  color: var(--muted-foreground);
}

.story-byline__author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.story-byline__author:hover {
  color: var(--primary);
}

.story-byline__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.story-byline__date,
.story-byline__reading {
  white-space: nowrap;
}

.story-byline .save-button {
  margin-left: 0;
}

.story-byline__identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.story-byline__avatar-link {
  display: inline-flex;
  flex: 0 0 auto;
}

.story-byline__idtext {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}

.story-byline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.story-byline__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

/* Mobile: avatar on the left, name + date/time/reading stacked beside it, actions on the right */
@media (max-width: 767px) {
  .story-byline {
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
  }

  .story-byline__identity {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 0.6rem;
  }

  .story-byline__idtext {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    min-width: 0;
  }

  .story-byline__meta {
    gap: 0.25rem 0.6rem;
  }

  .story-byline__actions {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
}

.text-size-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--background-soft);
  color: var(--foreground);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 900;
}

.text-size-toggle:hover {
  background: var(--border);
}

.story-comments-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--background-soft);
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.story-comments-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-pill);
  color: var(--foreground);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.share-link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.share-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.share-link--native {
  background: var(--foreground);
  border-color: var(--foreground);
  color: #ffffff;
}

.share-link--native:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.story-media {
  margin: var(--space-5) 0 0;
}

.story-media img {
  width: 100%;
  aspect-ratio: 16 / 9.5;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.story-media__caption,
.story-image__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted-foreground);
}

.story-image__alt {
  min-width: 0;
  overflow-wrap: anywhere;
}

.story-image__source {
  flex-shrink: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.story-image {
  margin: 1.5em 0;
  width: 100%;
}

.story-image img {
  width: 100%;
  border-radius: var(--radius-md);
}

.story-content--newsroom {
  width: 100%;
  max-width: none;
  padding-top: var(--space-5);
  overflow-wrap: break-word;
}

.story-content--newsroom > * {
  max-width: none;
}

.story-content {
  font-size: calc(1.16rem * var(--article-text-scale, 1));
  line-height: 1.85;
}

.story-content p {
  margin: 0 0 1.2em;
}

.story-content h2 {
  margin: 2em 0 0.8em;
  font-size: 1.4rem;
}

.story-content ul,
.story-content ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.story-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(240, 88, 31, 0.35);
}

.story-content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: var(--space-4);
  margin: 1.5em 0;
  color: var(--muted-foreground);
  font-style: italic;
  font-size: 1.15rem;
}

.newsletter-box {
  margin: 2.25rem auto 2rem;
  width: min(100%, 860px);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #ecd9ca;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4ec 0%, #fffdfc 68%);
  box-shadow: 0 12px 30px rgba(95, 56, 29, 0.06);
}

.newsletter-box__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #ffe1cf;
  color: #fb5200;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.newsletter-box__badge svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.newsletter-box h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.newsletter-box > p {
  margin: 0.75rem 0 0;
  color: #625c58;
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.45;
}

.newsletter-box__form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.newsletter-box__website {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.newsletter-box__form input {
  min-height: 54px;
  width: 100%;
  border: 1px solid #eaded6;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 1rem;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.newsletter-box__form input:focus {
  outline: 2px solid rgba(251, 82, 0, 0.22);
  border-color: #fb5200;
}

.newsletter-box__form button {
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  background: #fb5200;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
}

.newsletter-box__form button:hover {
  background: #e84900;
}

.newsletter-box__note {
  color: #9b9089 !important;
  font-size: 0.9rem !important;
}

.newsletter-box__status {
  width: fit-content;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.98rem !important;
}

.newsletter-box__status--success {
  background: #e8f7ee;
  color: #176b3a !important;
}

.newsletter-box__status--error {
  background: #fff0ed;
  color: #a43220 !important;
}

@media (min-width: 760px) {
  .newsletter-box__form {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
}

.story-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.story-share__label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}

.story-share__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.save-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--foreground);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.save-button:hover {
  border-color: var(--primary);
}

.save-button__icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.save-button.is-saved {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.save-button.is-saved .save-button__icon {
  fill: currentColor;
  stroke: currentColor;
}

.story-extra {
  margin-top: var(--space-7);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.related-grid__item.is-hidden {
  display: none;
}

.related-grid__item > .mini-card {
  height: 100%;
}

.related-load-more {
  display: flex;
  width: fit-content;
  margin: var(--space-5) auto 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  padding-inline: 1.35rem;
}

.related-load-more[hidden] {
  display: none;
}

.story-extra--comments {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
}

.category-band__top--story {
  margin-top: 0.5rem;
}

.category-hero--newsroom {
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

/* ============================================================
   Breadcrumbs
   ============================================================ */
.breadcrumbs {
  margin-bottom: var(--space-4);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
}

/* ============================================================
   Weather page
   ============================================================ */
.weather-back {
  display: inline-flex;
  margin-top: 0.4rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.weather-overview {
  width: 100%;
  max-width: none;
  margin: 0.9rem 0 0;
  color: #4d5560;
  font-size: 1.08rem;
  line-height: 1.65;
}

.weather-page .page-header .weather-overview {
  max-width: none;
}

.weather-map-section {
  display: grid;
  gap: var(--space-3);
}

.weather-map {
  height: 420px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--secondary);
}

.weather-cities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.weather-city {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease;
}

.weather-city:hover {
  box-shadow: var(--shadow-md);
}

.weather-city__name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 0.88rem;
}

.weather-city__temp {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--muted-foreground);
}

.weather-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  transform: translate(-50%, -100%);
  cursor: pointer;
}

.weather-marker__temp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.25rem 0.5rem;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.weather-marker__name {
  margin-top: 0.15rem;
  padding: 0.1rem 0.4rem;
  background: rgba(20, 24, 28, 0.82);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .weather-cities {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.weather-search {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.weather-search__field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.weather-search__field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  font: inherit;
  font-size: 0.95rem;
}

.weather-search__field input:focus {
  outline: none;
  border-color: var(--primary);
}

.weather-autocomplete {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  /* Leaflet's panes/controls use z-index up to ~1000, so the dropdown needs
     to sit comfortably above the map or it gets visually buried under it. */
  z-index: 5000;
  max-height: 320px;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.3rem;
}

.weather-autocomplete[hidden] {
  display: none;
}

.weather-autocomplete__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
}

.weather-autocomplete__item:hover,
.weather-autocomplete__item.is-active {
  background: var(--secondary);
}

.weather-autocomplete__item strong {
  font-size: 0.92rem;
}

.weather-autocomplete__item span {
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.weather-results h2,
.weather-daily h2 {
  margin: 0 0 var(--space-3);
  font-size: 1.28rem;
}

.weather-results__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.weather-results__list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease;
}

.weather-results__list a:hover {
  box-shadow: var(--shadow-md);
}

.weather-results__list span {
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.weather-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5);
  background: linear-gradient(135deg, #14304f, #1d4a73);
  color: #ffffff;
  border-radius: var(--radius-lg);
}

.weather-now__icon {
  flex-shrink: 0;
}

.weather-now__body {
  min-width: 0;
}

.weather-icon {
  display: block;
}

.weather-now__temp {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 700;
  line-height: 1;
}

.weather-now__condition {
  margin: 0.35rem 0 0;
  font-size: 1.28rem;
  font-weight: 700;
}

.weather-now__meta {
  margin: 0.7rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
}

.weather-today h2 {
  margin: 0 0 var(--space-3);
  font-size: 1.28rem;
}

.weather-today__hours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.weather-daily__list {
  display: grid;
  gap: 0.6rem;
}

.weather-day {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.weather-day__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  min-height: 70px;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  transition: background 150ms ease;
}

.weather-day__summary:hover,
.weather-day__summary:focus-visible {
  background: var(--background-soft);
  outline: none;
}

.weather-day__summary::-webkit-details-marker {
  display: none;
}

.weather-day__summary::before {
  content: "▾";
  order: 5;
  margin-left: auto;
  color: var(--muted-foreground);
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.weather-day[open] .weather-day__summary::before {
  content: "▴";
}

.weather-day__label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  flex: 1 1 180px;
  min-width: 0;
}

.weather-day__icon {
  display: flex;
  flex-shrink: 0;
}

.weather-day__condition {
  font-size: 1rem;
  color: var(--muted-foreground);
  flex: 1 1 auto;
  min-width: 0;
}

.weather-day__temps {
  font-size: 1.12rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.weather-day__temps strong {
  color: var(--foreground);
  margin-right: 0.3rem;
}

.weather-day__table-wrap {
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.weather-day__table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 1rem;
  white-space: nowrap;
}

/* Fixed column widths so every day's table lines up identically, instead of
   each table auto-sizing its columns to that day's own content. */
.weather-day__col--time {
  width: 11%;
}

.weather-day__col--condition {
  width: 27%;
}

.weather-day__col--temp {
  width: 9%;
}

.weather-day__col--feels {
  width: 11%;
}

.weather-day__col--wind {
  width: 17%;
}

.weather-day__col--humidity {
  width: 10%;
}

.weather-day__col--precip {
  width: 15%;
}

.weather-day__table th,
.weather-day__table td {
  padding: 0.78rem var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.weather-day__table th {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.weather-day__table tbody tr:last-child td {
  border-bottom: 0;
}

.weather-day__table-condition {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: normal;
}

.weather-hour {
  flex: 0 0 auto;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.45rem;
  background: var(--background-soft);
  border-radius: var(--radius-sm);
  text-align: center;
}

.weather-hour__time {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
}

.weather-hour__temp {
  font-weight: 700;
  font-size: 1.05rem;
}

.weather-attribution {
  margin-top: var(--space-2);
  font-size: 0.78rem;
  color: var(--muted-foreground);
  text-align: center;
}

@media (max-width: 760px) {
  .weather-day__summary {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label arrow"
      "condition condition"
      "temps temps";
    gap: 0.9rem 0.75rem;
    align-items: center;
    min-height: 0;
    padding: 1.2rem 1.35rem;
  }

  .weather-day__summary::before {
    grid-area: arrow;
    order: initial;
    margin-left: 0;
    justify-self: end;
    align-self: start;
  }

  .weather-day__label {
    grid-area: label;
    flex: initial;
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .weather-day__icon {
    flex-shrink: 0;
  }

  .weather-day__condition {
    grid-area: condition;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: initial;
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .weather-day__temps {
    grid-area: temps;
    font-size: 1.15rem;
    justify-self: start;
  }
}

/* ============================================================
   Comments
   ============================================================ */
.comment-list {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.comment-card--threaded {
  margin-left: min(calc(var(--comment-depth, 0) * 1.5rem), 6rem);
}

.comment-card__reply {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-card__reply:hover {
  text-decoration: underline;
}

.comment-card,
.comment-form,
.auth-form,
.profile-card {
  padding: var(--space-4);
}

.comment-form,
.auth-form,
.profile-card {
  display: grid;
  gap: var(--space-4);
}

.comment-form label,
.auth-form label,
.profile-card label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comment-form input,
.comment-form textarea,
.auth-form input,
.auth-form textarea,
.profile-card input,
.profile-card textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background-soft);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 150ms ease;
}

.comment-form input:focus,
.comment-form textarea:focus,
.auth-form input:focus,
.auth-form textarea:focus,
.profile-card input:focus,
.profile-card textarea:focus {
  border-color: var(--primary);
}

.comment-form__grid {
  display: grid;
  gap: var(--space-4);
}

.comment-form__website {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.comment-form__reply-note {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(240, 88, 31, 0.22);
  border-radius: var(--radius-md);
  background: #fff5ef;
  color: var(--text);
}

.comment-form__reply-note button {
  margin-left: 0.45rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  min-height: 0;
  text-transform: none;
  letter-spacing: 0;
}

.comment-form__reply-note button:hover,
.comment-form__reply-note button:focus-visible {
  background: transparent;
  color: var(--primary);
  text-decoration: underline;
  outline: none;
}

@media (max-width: 620px) {
  .comment-card--threaded {
    margin-left: min(calc(var(--comment-depth, 0) * 0.75rem), 2.25rem);
  }
}

.comment-form button,
.auth-form button,
.profile-card button {
  justify-self: start;
}

.auth-form__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.86rem;
  color: var(--muted-foreground);
}

.auth-form__meta a {
  color: var(--primary);
  font-weight: 700;
}

.auth-form__error {
  background: #fff4ec;
  border: 1px solid #f6d8c2;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--foreground);
  font-size: 0.9rem;
}

.auth-form__success {
  background: #eefaf1;
  border: 1px solid #bfe6cc;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--foreground);
  font-size: 0.9rem;
}

.auth-page {
  display: flex;
  justify-content: center;
}

.auth-page .auth-form {
  width: 100%;
  max-width: 440px;
}

.contact-layout {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.contact-text {
  padding: var(--space-5);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-form h2 {
  margin: 0;
  font-size: 1.2rem;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-1) 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 150ms ease, opacity 150ms ease;
}

.google-button:hover {
  background: var(--background-soft);
}

.google-button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.google-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-form h1,
.profile-card h1 {
  margin: 0.2rem 0 0;
  font-size: 1.6rem;
}

.auth-form > p.section-kicker,
.profile-card > p.section-kicker {
  margin: 0;
}

.profile-stack {
  display: grid;
  gap: var(--space-4);
  width: 100%;
  max-width: 440px;
}

.profile-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.profile-card__head img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  flex-shrink: 0;
}

.profile-card__head h1 {
  margin: 0.1rem 0 0;
  font-size: 1.3rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================================
   Advertising
   ============================================================ */
.ad-slot {
  --ad-max-width: 970px;
  width: min(100% - 2rem, var(--ad-max-width));
  margin: var(--space-6) auto;
  text-align: center;
}

.ad-slot--site-top {
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
}

.ad-slot__label,
.footer-slide-ad__label {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9098;
}

.ad-slot__media,
.ad-slot__script {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.ad-slot__media img {
  width: 100%;
  height: auto;
}

.ad-slot__script {
  min-height: 90px;
  padding: var(--space-3);
}

.story-main > .ad-slot {
  width: min(100%, var(--ad-max-width));
}

.story-content .ad-slot {
  width: min(100%, var(--ad-max-width));
  margin: 1.75rem auto;
}

.story-content .ad-slot__script {
  min-height: 70px;
}

.footer-slide-ad {
  --ad-max-width: 970px;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 75;
  transform: translateY(calc(100% + 1.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.footer-slide-ad.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.footer-slide-ad__inner {
  position: relative;
  width: min(100%, var(--ad-max-width));
  margin: 0 auto;
  padding: 0.65rem;
  border: 1px solid rgba(20, 24, 28, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(20, 24, 28, 0.18);
}

.footer-slide-ad__close {
  position: absolute;
  top: -0.65rem;
  right: -0.65rem;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--foreground);
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.footer-slide-ad__media,
.footer-slide-ad__script {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
}

.footer-slide-ad__media img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.footer-slide-ad__script {
  min-height: 80px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: var(--space-8);
  background: #14241d;
  color: rgba(255, 255, 255, 0.92);
  padding: var(--space-7) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
}

.footer-grid h2 {
  margin: 0;
  font-size: 1.7rem;
}

.footer-eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 0.92rem;
  max-width: 32ch;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  padding: 0.15rem 0;
}

.footer-links a:hover {
  color: #ffffff;
}
.footer-links > ul {
  display: contents;
}


/* ============================================================
   Misc pages
   ============================================================ */
.not-found {
  padding: var(--space-8) 0;
}

.not-found .button {
  margin-top: var(--space-4);
  display: inline-flex;
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 80;
  max-width: min(90vw, 420px);
  transform: translate(-50%, 12px);
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(19, 18, 17, 0.94);
  color: #fff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ============================================================
   Tablet (>=768px)
   ============================================================ */
@media (min-width: 768px) {
  .container {
    width: min(100% - 3rem, var(--container));
  }

  .topline {
    display: block;
  }

  .front-grid__lead {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .most-read-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mini-grid,
  .mini-grid--dense {
    display: grid;
    overflow-x: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-grid > *,
  .mini-grid--dense > * {
    flex: initial;
  }

  .category-band__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comment-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-page-form {
    padding: 0.85rem;
  }

  .search-page-form__grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.75fr) auto;
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   Desktop (>=1080px)
   ============================================================ */
@media (min-width: 1080px) {
  .page-shell .container > * + * {
    margin-top: var(--space-8);
  }

  .feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    margin-left: var(--space-4);
    overflow: visible;
  }

  .desktop-nav .desktop-nav__list--main {
    overflow: visible;
  }

  .desktop-nav__list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .desktop-nav__list::-webkit-scrollbar {
    display: none;
  }

  .desktop-nav__link {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: #3a3f46;
    transition: color 180ms ease, background 180ms ease;
    white-space: nowrap;
  }

  .desktop-nav__link:hover,
  .desktop-nav__link.is-active {
    color: var(--foreground);
    background: var(--secondary);
  }

  .search-form {
    display: flex;
    align-items: center;
    min-width: 230px;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--background-soft);
  }

  .search-form button {
    padding: 0.55rem 0.95rem;
    font-size: 0.7rem;
  }

  .menu-toggle,
  .nav-drawer {
    display: none;
  }

  .brand__badge {
    display: inline-flex;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-sm);
    background: var(--foreground);
    color: #ffffff;
  }

  .brand strong {
    font-size: 1.65rem;
  }

  .mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mini-grid--dense {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .most-read-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .container {
    width: min(100% - 4rem, var(--container));
  }
}

/* ============================================================
   WordPress compatibility
   ============================================================ */
.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-logo {
  width: clamp(132px, 18vw, 178px);
  height: auto;
}

.desktop-nav .menu-item,
.nav-drawer__links .menu-item,
.footer-links .menu-item {
  list-style: none;
}

.desktop-nav .menu-item a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
}

.desktop-nav .menu-item a:hover,
.desktop-nav .current-menu-item > a,
.desktop-nav .current-post-ancestor > a,
.desktop-nav .current-category-ancestor > a {
  color: var(--foreground);
  background: var(--secondary);
}

.nav-drawer__links .menu-item a {
  display: block;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.footer-links .menu-item a {
  display: inline-flex;
}

.cario-placeholder-image {
  display: block;
  width: 100%;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(240, 88, 31, 0.14), transparent 45%),
    linear-gradient(135deg, #f1f3f5, #dfe4ea);
}

.story-content .wp-block-image,
.story-content .wp-caption {
  margin: 1.5em 0;
  max-width: 100%;
}

.story-content .wp-block-image img,
.story-content .wp-caption img {
  border-radius: var(--radius-md);
}

.story-content .wp-caption-text,
.story-content figcaption {
  color: var(--muted-foreground);
  font-size: 0.86rem;
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
}

.story-content .alignwide {
  width: min(100%, var(--container));
}

.story-content .alignfull {
  width: 100%;
}

.comment-list {
  list-style: none;
  padding-left: 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.comment-reply-link {
  color: var(--primary);
  font-weight: 700;
}

.comment-form input,
.comment-form textarea,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.comment-form .submit,
.search-page-form button:not(.search-autocomplete__item) {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.75rem 1.15rem;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Newsday live refinements
   ============================================================ */
.site-footer {
  background: #000000;
}

.topline__date {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #2c333a;
  text-transform: none;
}

.mainbar__inner {
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.header-actions {
  flex-shrink: 0;
}

.desktop-nav {
  min-width: 0;
}

.desktop-nav .menu-item a,
.desktop-nav__link {
  padding: 0.5rem 0.66rem;
  font-size: clamp(0.78rem, 0.75vw, 0.9rem);
}

.breadcrumbs {
  margin: 0 0 var(--space-5);
  color: #6b7280;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
}

.breadcrumbs ol {
  align-items: center;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
}

.breadcrumbs a {
  color: #3f4751;
  transition: color 180ms ease;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs li:not(:last-child)::after {
  color: #a1a8b1;
  content: "›";
  margin-left: 0.42rem;
}

.page-shell {
  padding-top: clamp(1.25rem, 2.2vw, 2.25rem);
}

.page-shell .container > * + * {
  margin-top: clamp(1.8rem, 3vw, 3.5rem);
}

.front-grid,
.category-band,
.most-read-band,
.story-extra {
  row-gap: clamp(1rem, 2vw, 1.6rem);
}

.mini-grid,
.category-grid,
.related-grid,
.saved-grid,
.weather-grid {
  gap: clamp(1rem, 1.8vw, 1.5rem);
}

.story-content > * + * {
  margin-top: 1.15em;
}

.story-share {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.share-link svg,
.save-button svg {
  width: 1.18rem;
  height: 1.18rem;
  display: block;
  fill: currentColor;
}

.share-link {
  font-size: 0;
}

.save-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
}

.save-button:hover,
.save-button.is-saved {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.search-page-form {
  padding: clamp(0.85rem, 2vw, 1.1rem);
}

.search-page-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.search-page-form input {
  min-height: 52px;
  border-radius: var(--radius-pill);
  padding-inline: 1.1rem;
}

.search-page-form button:not(.search-autocomplete__item) {
  min-height: 52px;
  white-space: nowrap;
}

.account-form,
.weather-form {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  padding: clamp(1rem, 2vw, 1.4rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.account-form label,
.weather-form label {
  display: grid;
  gap: 0.45rem;
  color: #344054;
  font-weight: 700;
}

.account-form input,
.account-form textarea,
.weather-form select {
  width: 100%;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.account-form button,
.weather-form button {
  justify-self: start;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.8rem 1.2rem;
}

.saved-grid,
.weather-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.weather-card {
  display: grid;
  gap: 0.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.weather-card strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}

.weather-card span {
  color: var(--primary);
  font-weight: 700;
}

@media (min-width: 760px) {
  .search-page-form__grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .weather-form {
    grid-template-columns: minmax(220px, 320px) auto;
    align-items: end;
  }

  .saved-grid,
  .weather-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .saved-grid,
  .weather-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================
   Auth Modal
   ============================================================ */

/* Prevent body scroll when modal is open */
body.auth-modal-open {
  overflow: hidden;
}

/* Modal overlay */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal[hidden] {
  display: none;
}

/* Backdrop */
.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 22, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 0;
  cursor: pointer;
}

/* Panel */
.auth-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 64px -16px rgba(20, 24, 28, 0.36);
  width: min(480px, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: var(--space-6);
}

/* Close button */
.auth-modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  cursor: pointer;
  font-size: 1rem;
  color: var(--foreground);
  transition: background 150ms ease;
  flex-shrink: 0;
}

.auth-modal__close:hover {
  background: var(--border);
}

/* Tabs */
.auth-modal__tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--space-5);
}

.auth-modal__tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.75rem 0.5rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.auth-modal__tab[aria-selected="true"],
.auth-modal__tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-modal__tab:hover {
  color: var(--foreground);
}

/* Body (tab panel) */
.auth-modal__body {
  display: grid;
  gap: var(--space-4);
}

.auth-modal__body[hidden] {
  display: none;
}

/* Auth form inside modal — override the base .auth-form padding */
.auth-modal .auth-form {
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

/* Label */
.auth-form__label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foreground);
}

.auth-form__label input {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}

/* Checkbox row */
.auth-form__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--foreground);
  cursor: pointer;
}

.auth-form__check input[type="checkbox"] {
  width: auto;
  padding: 0;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  background: var(--background-soft);
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--primary);
}

/* Submit button — full width */
.auth-modal .auth-form__submit,
.auth-form__submit {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
}

/* Divider "arba" */
.auth-form__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted-foreground);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-form__divider::before,
.auth-form__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Footer link row */
.auth-form__footer {
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted-foreground);
}

/* Google button */
.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
}

.auth-google-button:hover {
  background: var(--background-soft);
  box-shadow: var(--shadow-sm);
}

.auth-google-button svg {
  flex-shrink: 0;
}

/* Profile dropdown button style (mirrors <a> in dropdown) */
.auth-dropdown-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--foreground);
  transition: background 150ms ease;
}

.auth-dropdown-link:hover {
  background: var(--secondary);
}

/* Inline text button (switch-tab links) */
.auth-link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 150ms ease;
}

.auth-link:hover {
  text-decoration-color: currentColor;
}

/* In-modal message */
.auth-modal__message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: #fff4ec;
  border: 1px solid #f6d8c2;
  color: var(--foreground);
}

.auth-modal__message[hidden] {
  display: none;
}

.auth-modal__message.is-success {
  background: #eefaf1;
  border-color: #bfe6cc;
}

.auth-modal__message.is-error {
  background: #fff4ec;
  border-color: #f6d8c2;
}

/* Status note (registration disabled) */
.status-note {
  margin: 0;
  padding: var(--space-4);
  background: var(--secondary);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--muted-foreground);
  text-align: center;
}


/* ============================================================
   Comment card — modernized
   ============================================================ */
.comment-card__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-card__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.comment-card__avatar-wrap .avatar {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.comment-card__meta-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.comment-card__author {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--foreground);
}

.comment-card__date {
  font-size: 0.76rem;
  color: var(--muted-foreground);
  text-decoration: none;
}

.comment-card__date:hover { color: var(--primary); }

.comment-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}

.comment-card__actions { display: flex; align-items: center; }

/* Vote buttons */
.comment-votes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.comment-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-foreground);
  transition: background 120ms, border-color 120ms, color 120ms, transform 100ms;
  min-height: 0;
  text-transform: none;
  letter-spacing: 0;
}

.comment-vote-btn:hover {
  border-color: var(--border-dark);
  background: var(--secondary);
  color: var(--foreground);
  transform: scale(1.04);
}

.comment-vote-btn.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.comment-vote-btn--down.is-active {
  background: rgba(216, 27, 63, 0.08);
  border-color: var(--danger);
  color: var(--danger);
}

.comment-vote-btn__icon { font-size: 0.95rem; line-height: 1; }
.comment-vote-btn__count { min-width: 0.75rem; text-align: center; }

/* ============================================================
   Comment form toolbar
   ============================================================ */
.comment-form__toolbar {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--background-soft);
}

/* Override global .comment-form button styles for toolbar buttons */
.comment-form .comment-form__toolbar .comment-toolbar-btn,
.comment-form .comment-form__toolbar .comment-toolbar-btn:hover,
.comment-form .comment-form__toolbar .comment-toolbar-btn:focus-visible,
.comment-form .comment-form__toolbar .comment-toolbar-btn:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

.comment-form .comment-form__toolbar .comment-toolbar-btn:hover {
  background: var(--secondary);
  border-color: var(--border);
  color: var(--foreground);
}

.comment-form .comment-form__toolbar .comment-toolbar-btn:active {
  background: var(--border);
  transform: scale(0.92);
}

.comment-toolbar-separator {
  width: 1px;
  height: 1.2rem;
  background: var(--border);
  margin: 0 0.2rem;
  flex-shrink: 0;
}

.comment-toolbar-emoji { position: relative; }

.comment-emoji-picker[hidden] { display: none; }

.comment-emoji-picker {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: repeat(5, 2rem);
  gap: 0.15rem;
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.comment-form .comment-form__toolbar .comment-emoji-picker button,
.comment-form .comment-form__toolbar .comment-emoji-picker button:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
  box-shadow: none;
  transition: background 100ms, transform 100ms;
}

.comment-form .comment-form__toolbar .comment-emoji-picker button:hover {
  background: var(--secondary);
  border-color: var(--border);
  transform: scale(1.18);
}

.comment-form__charcount {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted-foreground);
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
}

.comment-form__charcount.is-warn { color: var(--primary); }

.comment-form-comment textarea {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* ============================================================
   Comment form — compact 2-column layout
   ============================================================ */

/* Override shared gap for comment form only */
#commentform.comment-form {
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

/* Reset <p> margins inside the form */
#commentform.comment-form > p,
#commentform.comment-form > div {
  margin: 0;
}

/* These elements always span full width */
#commentform.comment-form .comment-notes,
#commentform.comment-form .comment-form__toolbar,
#commentform.comment-form .comment-form-comment,
#commentform.comment-form .comment-form-url,
#commentform.comment-form .comment-form-cookies-consent,
#commentform.comment-form .form-submit {
  grid-column: 1 / -1;
}

/* Author + email fill the 2 columns naturally */
#commentform.comment-form .comment-form-author,
#commentform.comment-form .comment-form-email {
  grid-column: span 1;
}

/* Reduce label margin inside compact form */
#commentform.comment-form label {
  margin-bottom: 0.25rem;
}

/* Cookie consent checkbox — left-aligned inline */
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: auto;
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.comment-form-cookies-consent label {
  display: inline;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted-foreground);
  cursor: pointer;
  margin: 0;
}

/* Submit button — full width */
#commentform.comment-form .form-submit {
  margin: 0;
}

@media (max-width: 600px) {
  #commentform.comment-form {
    grid-template-columns: 1fr;
  }
  #commentform.comment-form .comment-form-author,
  #commentform.comment-form .comment-form-email {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   Comment contenteditable editor
   ============================================================ */
.comment-editor {
  width: 100%;
  min-height: 110px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--background-soft);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--foreground);
  outline: none;
  transition: border-color 150ms ease;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
}

.comment-editor:focus {
  border-color: var(--primary);
}

.comment-editor.is-invalid {
  border-color: var(--danger);
}

.comment-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted-foreground);
  pointer-events: none;
}

.comment-editor strong,
.comment-editor b { font-weight: 700; }

.comment-editor em,
.comment-editor i  { font-style: italic; }

/* Editor always full width */
#commentform.comment-form .comment-form-comment {
  grid-column: 1 / -1;
}
.comment-editor {
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   Comment form — single column (author+email in own row)
   ============================================================ */
#commentform.comment-form {
  grid-template-columns: 1fr !important;
  gap: 0.55rem;
}

#commentform.comment-form .comment-form-author,
#commentform.comment-form .comment-form-email {
  grid-column: auto !important;
}

.comment-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0;
}

.comment-fields-row > p {
  margin: 0;
}

@media (max-width: 600px) {
  .comment-fields-row {
    grid-template-columns: 1fr;
  }
}

.comment-form__toolbar {
  background: transparent;
  border: none;
  padding-left: 0;
  padding-right: 0;
}
.comment-editor {
  border-top: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* Comment reply-to indicator */
.comment-card__reply-to {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--muted-foreground, #888);
    background: var(--muted, #f4f4f4);
    border-radius: var(--radius-pill, 99px);
    padding: 0.22rem 0.65rem 0.22rem 0.5rem;
    margin-bottom: 0.1rem;
    line-height: 1.3;
}
.comment-card__reply-to svg {
    flex-shrink: 0;
    opacity: .7;
}
.comment-card__reply-to strong {
    color: var(--primary, #c0390b);
    font-weight: 600;
}

/* Reply-to form indicator */
#cario-reply-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted-foreground, #666);
    background: var(--muted, #f4f4f4);
    border-left: 3px solid var(--primary, #c0390b);
    border-radius: 0 6px 6px 0;
    padding: 0.55rem 0.9rem;
    margin-bottom: 1rem;
}
#cario-reply-indicator[hidden] { display: none; }
#cario-reply-indicator svg { flex-shrink: 0; opacity: .65; }
#cario-reply-indicator strong { color: var(--foreground, #1a1a1a); font-weight: 700; }

/* Footer social links */
.footer-social {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1.25rem 0;
}
.footer-social__inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    color: var(--footer-muted, rgba(255,255,255,.6));
    background: rgba(255,255,255,.07);
    transition: background .15s, color .15s;
}
.footer-social__link:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}
.footer-social__link svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    stroke: none;
}

/* Footer copyright bar */
.footer-bar {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: .9rem 0;
}
.footer-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-bar__copy {
    margin: 0;
    font-size: .8rem;
    color: var(--footer-muted, rgba(255,255,255,.72));
}

/* Fix: images must not stretch on mobile when WP sets height attribute */
img {
  height: auto;
}
.story-image img,
.story-content img,
.story-content .wp-block-image img,
.story-content .wp-caption img {
  height: auto;
  width: 100%;
  max-width: 100%;
}

/* ============================================================
   Topbar nav menu items (replaces .topline__weather)
   ============================================================ */
.topline__links > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.topline__links .menu-item {
  list-style: none;
  padding: 0;
  margin: 0;
}
.topline__links .menu-item a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
}
.topline__links .menu-item a:hover {
  color: var(--primary);
}

/* Hide date on mobile when topline shows at-top (save space) */
@media (max-width: 767px) {
  .topline__date {
    display: none;
  }
}

/* ============================================================
   Nav Walker – icon + text alignment
   ============================================================ */

/* Desktop nav: ensure gap between icon and label */
.desktop-nav .menu-item a {
  gap: 0.35rem;
}
.desktop-nav .menu-item a svg,
.desktop-nav .menu-item a .menu-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  pointer-events: none;
}

/* Mobile drawer: flex so icon + text sit side by side */
.nav-drawer__links .menu-item a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-drawer__links .menu-item a svg,
.nav-drawer__links .menu-item a .menu-icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

/* Topbar menu: icons sizing */
.topline__links .menu-item a svg,
.topline__links .menu-item a .menu-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* Mobile: topline compact when showing at-top */
@media (max-width: 767px) {
  .topline__links {
    gap: var(--space-3);
  }
  .topline__links .menu-item a {
    font-size: 0.78rem;
    padding: 0.4rem 0;
  }
}

/* Fix: menu icon span alignment */
.menu-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

/* Topbar links always push to the right */
.topline__links {
  margin-left: auto;
}

/* Forgot password inline link */
.auth-form__forgot {
  margin: -0.25rem 0 0.5rem;
  font-size: 0.8rem;
  text-align: right;
}

/* ============================================================
   Profile – 2FA section
   ============================================================ */
.profile-2fa {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.profile-2fa__title {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}
.profile-2fa__desc {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  max-width: 52ch;
}
.profile-2fa__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  margin: 0 0 1rem;
}
.profile-2fa__status--on  { background: #dcfce7; color: #166534; }
.profile-2fa__status--off { background: #f3f4f6; color: #6b7280; }
.profile-2fa__setup,
.profile-2fa__disable {
  margin-top: 1rem;
}
.profile-2fa__step {
  margin-bottom: 1.5rem;
}
.profile-2fa__step h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}
.profile-2fa__qr {
  margin: 0.75rem 0;
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}
.profile-2fa__manual-label {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin: 0.5rem 0 0.25rem;
}
.profile-2fa__secret {
  display: inline-block;
  background: var(--secondary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  word-break: break-all;
  user-select: all;
}
.profile-2fa__code-input {
  display: block;
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-align: center;
  width: 10rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0 0.75rem;
}
.profile-2fa__message {
  font-size: 0.88rem;
  margin: 0.5rem 0 0;
}
.button--danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.button--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ============================================================
   News Feed Panel (homepage hero right column)
   ============================================================ */
.news-feed-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-height: 500px;
}

.news-feed-panel__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 1;
}

.news-feed-panel__head h2 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  color: var(--foreground);
}

.news-feed-panel__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: feedDotPulse 2s ease-in-out infinite;
}

@keyframes feedDotPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.news-feed-panel__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.news-feed-panel__list::-webkit-scrollbar {
  width: 4px;
}
.news-feed-panel__list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.news-feed-item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  line-height: 1.4;
}

.news-feed-item:last-child {
  border-bottom: none;
}

.news-feed-item:hover {
  background: var(--muted);
}

.news-feed-item__time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-foreground);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-width: 2.8rem;
}

.news-feed-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.news-feed-item__cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.news-feed-item__title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground);
}

.news-feed-item:hover .news-feed-item__title {
  color: var(--primary);
}

@media (max-width: 767px) {
  .news-feed-panel {
    max-height: 340px;
  }
}

/* ============================================================
   Submenu – desktop dropdown
   ============================================================ */
.desktop-nav {
  position: relative;
}

.desktop-nav li {
  position: relative;
}

.desktop-nav .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 224px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), visibility 180ms;
  z-index: 200;
}

/* small caret pointing up to the parent item */
.desktop-nav .sub-menu::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 22px;
  width: 10px;
  height: 10px;
  background: var(--card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* invisible hover bridge to the parent so the menu doesn't flicker */
.desktop-nav .sub-menu::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.desktop-nav li.menu-item-has-children:hover > .sub-menu,
.desktop-nav li.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Higher specificity to override .desktop-nav .menu-item a styles */
.desktop-nav .sub-menu > li {
  display: block;
}

.desktop-nav .sub-menu > li > a,
.desktop-nav__list .sub-menu > li > a {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 0.8rem !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  background: transparent !important;
  white-space: nowrap;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.desktop-nav .sub-menu > li > a:hover,
.desktop-nav__list .sub-menu > li > a:hover,
.desktop-nav .sub-menu > li > a:focus-visible {
  color: var(--foreground) !important;
  background: var(--muted) !important;
  border-radius: var(--radius-sm) !important;
}

.submenu-arrow {
  display: inline-flex;
  align-items: center;
  margin-left: 3px;
  opacity: 0.6;
  transition: transform 160ms ease;
}

.desktop-nav li.menu-item-has-children:hover > a .submenu-arrow,
.desktop-nav li.menu-item-has-children:focus-within > a .submenu-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* ============================================================
   Submenu – mobile drawer (expanded inline)
   ============================================================ */
.nav-drawer__links li {
  list-style: none;
}

.nav-drawer__list > li > a {
  display: flex;
  align-items: center;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
}

.nav-drawer__list > li > a:hover,
.nav-drawer__list > li.current-menu-item > a {
  color: var(--primary);
}

.nav-drawer__list > li > a .submenu-arrow {
  display: none;
}

.nav-drawer__links .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem 0.75rem;
}

.nav-drawer__links .sub-menu li a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
}

.nav-drawer__links .sub-menu li a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-drawer__links .sub-menu li a:hover {
  color: var(--primary);
}

.nav-drawer__links .sub-menu li:last-child a {
  border-bottom: none;
}

/* ============================================================
   Author hero – social links + kicker
   ============================================================ */
.author-hero__kicker {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.author-hero__body {
  min-width: 0;
}

.author-hero__body h1 {
  margin: 0 0 0.4rem;
}

.author-hero__body p {
  margin: 0 0 0.75rem;
}

.author-hero__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.author-hero__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--muted);
  color: var(--muted-foreground);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.author-hero__social-link:hover {
  background: var(--primary);
  color: #fff;
}

.author-hero__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.footer-logo {
  max-height: 52px;
  width: auto;
  height: auto;
  margin-bottom: 0.7rem;
}

/* Reading progress bar (single posts) */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 70;
  background: transparent;
  pointer-events: none;
}

.reading-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 80ms linear;
}

/* ============================================================
   Partner (sponsored) content — dark band on the homepage
   ============================================================ */
.partner-band {
  background: #0b0b0d;
  color: #fff;
  border-radius: 18px;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  margin: 3rem 0;
}

.partner-band__head {
  margin-bottom: 1.75rem;
}

.partner-band__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a227;
}

.partner-band__head .section-divider {
  margin-bottom: 0;
}

.partner-band__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
}

.partner-band__head .section-divider__meta {
  color: #e0be3d;
}

.partner-band__head .section-divider__meta:hover {
  color: #fff;
}

.partner-band__desc {
  margin: 0.75rem 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.98rem;
  line-height: 1.65;
}

.partner-band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.partner-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.partner-card__media {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.06);
}

.partner-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.partner-card__media:hover .partner-card__img {
  transform: scale(1.05);
}

.partner-card__title {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 150ms ease;
}

.partner-card__title:hover {
  color: #e0be3d;
}

@media (max-width: 900px) {
  .partner-band__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .partner-band__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   In-article search — discovery prompt after related posts
   ============================================================ */
.story-search {
  margin: 2.5rem 0 0;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--background-soft, #fafafb);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.story-search__eyebrow {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.story-search__title {
  margin: 0 0 1.15rem;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.2;
}

.story-search__form {
  display: flex;
  gap: 0.6rem;
  max-width: 520px;
  margin: 0 auto;
}

.story-search__input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill, 999px);
  background: #fff;
  font-size: 0.95rem;
  color: var(--foreground);
}

.story-search__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft, rgba(184, 66, 12, 0.12));
}

.story-search__btn {
  flex: 0 0 auto;
  padding: 0.8rem 1.7rem;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.story-search__btn:hover {
  background: var(--primary-dark);
}

@media (max-width: 480px) {
  .story-search__form {
    flex-direction: column;
  }
  .story-search__btn {
    width: 100%;
  }
}

/* ============================================================
   Article engagement (mobile-first): quickmeta, inline suggestions,
   related slider, next-article card, compact breadcrumb
   ============================================================ */

/* Quick meta under the headline */
.story-quickmeta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--muted-foreground);
}
.story-quickmeta__reading { font-weight: 600; }
.story-quickmeta__comments {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--foreground);
  font-weight: 700;
  text-decoration: none;
}
.story-quickmeta__comments:hover { color: var(--primary); }
.story-quickmeta__comments svg { width: 16px; height: 16px; }

/* Inline suggestion blocks inside the article body */
.inline-suggest {
  margin: 1.85rem 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--primary);
  background: var(--background-soft);
  border-radius: 0 12px 12px 0;
}
.inline-suggest__label {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}
.inline-suggest a.inline-suggest__card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--foreground);
}
.inline-suggest__media {
  flex: 0 0 96px;
  width: 96px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}
.inline-suggest__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inline-suggest__media img { width: 100%; height: 100%; object-fit: cover; margin: 0; display: block; max-width: 100%; }
.inline-suggest__body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.inline-suggest__cat {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.inline-suggest__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}
.inline-suggest a.inline-suggest__card:hover .inline-suggest__title { color: var(--primary); }

/* Next-article card at the end of the story */
.next-article {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin: 2.5rem 0;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background-soft);
  text-decoration: none;
  color: var(--foreground);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.next-article:hover { border-color: var(--primary); box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.08)); }
.next-article__media {
  flex: 0 0 40%;
  max-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--border);
}
.next-article__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.next-article__body { display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; min-width: 0; }
.next-article__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.next-article__cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.next-article__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.25;
}
.next-article__cta {
  align-self: flex-start;
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}
.next-article:hover .next-article__cta {
  background: var(--primary-dark);
  transform: translateX(3px);
}
@media (max-width: 560px) {
  .next-article { flex-direction: column; }
  .next-article__media { flex: none; max-width: none; width: 100%; aspect-ratio: 16 / 9; }
  .next-article__title { font-size: 1.1rem; }
}

/* Related posts -> horizontal slider on mobile */
@media (max-width: 767px) {
  .related-grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .related-grid::-webkit-scrollbar { display: none; }
  .related-grid__item {
    flex: 0 0 78%;
    max-width: 280px;
    scroll-snap-align: start;
  }

  /* Compact single-line breadcrumb on mobile */
  .breadcrumbs {
    margin-bottom: 0.7rem;
    font-size: 0.72rem;
  }
  .breadcrumbs ol {
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
  }
  .breadcrumbs li {
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* only the current page (last item) may shrink & ellipsize */
  .breadcrumbs li:last-child {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumbs li:last-child span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
  }
}

/* Listen to article button — sits in the byline actions row */
.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.listen-btn[hidden] { display: none !important; }
.listen-btn:hover { border-color: var(--primary); color: var(--primary); }
.listen-btn__icon { display: inline-flex; }
.listen-btn__icon svg { width: 17px; height: 17px; }
.listen-btn.is-playing { background: var(--primary); border-color: var(--primary); color: #fff; }
.listen-btn.is-playing:hover { color: #fff; }
.listen-btn.is-playing .listen-btn__icon svg { animation: listen-pulse 1s ease-in-out infinite; }
@keyframes listen-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Responsive, horizontally scrollable article tables */
.story-content .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
  scrollbar-width: thin;
}
.story-content .table-scroll table {
  margin: 0;
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
.story-content .table-scroll th,
.story-content .table-scroll td {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.story-content .table-scroll th {
  background: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
}
.story-content .table-scroll tbody tr:nth-child(even) td {
  background: var(--background-soft);
}
@media (max-width: 767px) {
  .story-content .table-scroll th,
  .story-content .table-scroll td {
    white-space: nowrap;
  }
}

/* Sticky story action bar (mobile) */
.story-actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(20, 24, 28, 0.07);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}
.story-actionbar.is-visible { display: flex; }
.story-actionbar.is-in { transform: translateY(0); }
.story-actionbar__btn {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.3rem;
  border: 0;
  background: none;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.story-actionbar__btn svg { width: 20px; height: 20px; }
.story-actionbar__btn:hover,
.story-actionbar__btn:active { color: var(--primary); }
.story-actionbar__aa { font-size: 1.05rem; font-weight: 900; line-height: 1; }
@media (min-width: 768px) {
  .story-actionbar { display: none !important; }
}

/* ============================================================
   Dark mode (only active when <html data-theme="dark">)
   ============================================================ */
html[data-theme="dark"] {
  --background: #14171c;
  --background-soft: #1b1f26;
  --foreground: #e6e8ec;
  --card: #1b1f26;
  --card-hover: #232830;
  --border: #2b313a;
  --border-dark: #3a414c;
  --secondary: #232830;
  --muted: #232830;
  --muted-foreground: #9aa3ad;
  --accent: rgba(240, 88, 31, 0.18);
  --ink: #e6e8ec;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 24px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--background); color: var(--foreground); }
html[data-theme="dark"] .site-header { background: rgba(20, 23, 28, 0.98); }
html[data-theme="dark"] .mainbar { background: #14171c; }
html[data-theme="dark"] .topline { background: #1b1f26; color: #9aa3ad; }
html[data-theme="dark"] .topline__date { color: #9aa3ad; }
html[data-theme="dark"] .save-button,
html[data-theme="dark"] .listen-btn,
html[data-theme="dark"] .cario-poll__option,
html[data-theme="dark"] .story-search__input,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .comment-editor {
  background: var(--secondary);
  color: var(--foreground);
  border-color: var(--border-dark);
}
html[data-theme="dark"] .cario-poll__option { background: var(--secondary); }
html[data-theme="dark"] .cario-poll,
html[data-theme="dark"] .story-search { background: var(--background-soft); }
html[data-theme="dark"] .profile-dropdown,
html[data-theme="dark"] .desktop-nav .sub-menu,
html[data-theme="dark"] .nav-drawer__panel,
html[data-theme="dark"] .auth-modal__panel {
  background: var(--card);
  color: var(--foreground);
}
html[data-theme="dark"] .desktop-nav .sub-menu::before { background: var(--card); }
html[data-theme="dark"] .story-actionbar { background: rgba(20, 23, 28, 0.98); }
html[data-theme="dark"] .breadcrumbs { color: var(--muted-foreground); }
html[data-theme="dark"] .breadcrumbs a { color: #c3c9d1; }
html[data-theme="dark"] .lead-card__media,
html[data-theme="dark"] .mini-card__media,
html[data-theme="dark"] .table-scroll th { background: var(--secondary); }

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: inline-flex; }

/* Infinite (continuous) scroll articles */
.infinite-article {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 4px solid var(--border);
}
.infinite-article__label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}
.infinite-sentinel { height: 1px; }

/* Dark mode: button + logo fixes */
html[data-theme="dark"] .share-link--native {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
html[data-theme="dark"] .share-link--native:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Dual (light/dark) header logo */
.site-logo__dark { display: none; align-items: center; }
html[data-theme="dark"] .site-logo--dual .site-logo__light { display: none; }
html[data-theme="dark"] .site-logo--dual .site-logo__dark { display: inline-flex; }

/* Dual (light/dark) footer logo */
.footer-logo--dark { display: none; }
html[data-theme="dark"] .footer-logo--light { display: none; }
html[data-theme="dark"] .footer-logo--dark { display: inline-block; }

/* Robust author-avatar sizing (round, fixed size) — overrides any avatar plugin output */
.story-byline__avatar-link img,
.story-byline__avatar-link img.avatar {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
}
.author-hero > img,
.author-hero > .avatar,
.author-hero > img.avatar {
  width: 96px !important;
  height: 96px !important;
  max-width: 96px !important;
  border-radius: 50% !important;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* Colored footer social buttons */
.footer-social__link[data-net] { color: #fff; }
.footer-social__link[data-net] svg { fill: #fff; }
.footer-social__link[data-net="facebook"]    { background: #1877F2; }
.footer-social__link[data-net="x"]           { background: #000000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.footer-social__link[data-net="youtube"]     { background: #FF0000; }
.footer-social__link[data-net="google_news"] { background: #4285F4; }
.footer-social__link[data-net="pinterest"]   { background: #E60023; }
.footer-social__link[data-net="whatsapp"]    { background: #25D366; }
.footer-social__link[data-net="messenger"]   { background: linear-gradient(180deg, #00B2FF, #006AFF); }
.footer-social__link[data-net="instagram"]   { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.footer-social__link[data-net]:hover { color: #fff; filter: brightness(1.12); }

/* Snippet featured saltinio juosta dubliuojasi su cario native caption - slepiam featured (turinio kk-psrc-belowbar lieka) */
.story-media .kk-psrc-feat-bar{display:none !important;}

/* Mobile: footer aprasymas pilnu plociu (desktop lieka 32ch) - footeryje aprasymas pilnu plociu */
@media (max-width: 767px) {
  .footer-copy { max-width: none; }
}

/* GIS Google mygtukas - centruotas */
.auth-google-gsi{display:flex;justify-content:center;margin-top:.85rem;}

/* Auth modalo ivestys be apvadu (uzpildytas laukas vietoj borderio) */
.auth-modal .auth-form input,
.auth-modal .auth-form textarea {
  border-color: transparent;
  background: var(--secondary);
}
.auth-modal .auth-form input:focus,
.auth-modal .auth-form textarea:focus {
  border-color: var(--primary);
  background: var(--card);
}

/* Inline search form (404 page): field + button side by side with a gap */
.search-page-form--inline {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.search-page-form--inline input {
  flex: 1 1 auto;
  min-width: 0;
}
.search-page-form--inline button:not(.search-autocomplete__item) {
  width: auto;
  flex: 0 0 auto;
  padding: 0 1.7rem;
}
@media (max-width: 520px) {
  .search-page-form--inline { flex-direction: column; }
  .search-page-form--inline button:not(.search-autocomplete__item) { width: 100%; }
}

/* Vertical news feed (/naujausi) */
.feed-list { display: flex; flex-direction: column; }
.feed-list__item {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.feed-list__item:first-child { padding-top: 0; }
.feed-list__media {
  flex: 0 0 150px;
  width: 150px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: var(--secondary);
  display: block;
}
.feed-list__media img, .feed-list__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-list__body { min-width: 0; flex: 1 1 auto; }
.feed-list__meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.35rem; font-size: 0.78rem; }
.feed-list__cat { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary); text-decoration: none; }
.feed-list__cat:hover { text-decoration: underline; }
.feed-list__time { color: var(--muted-foreground); }
.feed-list__title { margin: 0 0 0.45rem; font-family: var(--font-display); font-size: 1.18rem; line-height: 1.3; font-weight: 700; }
.feed-list__title a { color: var(--foreground); text-decoration: none; }
.feed-list__title a:hover { color: var(--primary); }
.feed-list__byline { display: flex; align-items: center; gap: 0.45rem; }
.feed-list__byline img, .feed-list__avatar { width: 24px !important; height: 24px !important; max-width: 24px !important; border-radius: 50% !important; object-fit: cover; display: block; }
.feed-list__author { font-size: 0.82rem; color: var(--muted-foreground); font-weight: 600; }
@media (max-width: 560px) {
  .feed-list__media { flex-basis: 108px; width: 108px; }
  .feed-list__title { font-size: 1rem; }
  .feed-list__item { gap: 0.75rem; }
}
