/* Shared layout utilities — replacement for Bootstrap on the public frontend. */

:root,
[data-theme="light"] {
  --nl-gutter-x: 1.5rem;
  --nl-gutter-y: 0;
  --nl-body-bg: #fff;
  --nl-body-color: #212529;
  --nl-border-color: #dee2e6;
  --nl-primary: var(--theme-color, #0d6efd);
  --nl-muted: #6c757d;
  --nl-dark-bg-subtle: #ececf0;
  --nl-black: #000;
  --nl-light-text: #f8f9fa;
  --nl-gray-300: #dee2e6;
  --nl-breadcrumb-gap: 0.5rem;
  --bs-body-bg: var(--nl-body-bg);
  --bs-primary: var(--nl-primary);
  --bs-border-color: var(--nl-border-color);
  --bs-dark-bg-subtle: var(--nl-dark-bg-subtle);
  --bs-black: var(--nl-black);
  --bs-light-text-emphasis: var(--nl-light-text);
  --bs-link-color-rgb: 13, 110, 253;
  --bs-breadcrumb-item-padding-x: var(--nl-breadcrumb-gap);
  --bs-gray-300: var(--nl-gray-300);
}

[data-theme="dark"] {
  --nl-body-bg: #212529;
  --nl-body-color: #dee2e6;
  --nl-border-color: #495057;
  --nl-dark-bg-subtle: #2b3035;
  --nl-light-text: #e9ecef;
  --bs-body-bg: var(--nl-body-bg);
  --bs-border-color: var(--nl-border-color);
  --bs-dark-bg-subtle: var(--nl-dark-bg-subtle);
  --bs-light-text-emphasis: var(--nl-light-text);
}

*,
*::before,
*::after { box-sizing: border-box; }

img, svg { vertical-align: middle; }

figure {
  margin: 0 0 1rem;
}

.nl-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.nl-icon.fa-lg { width: 1.33em; height: 1.33em; }
.nl-icon.fa-2x { width: 2em; height: 2em; }
.nl-icon.fa-3x { width: 3em; height: 3em; }
.nl-icon.fa-4x { width: 4em; height: 4em; }
.nl-icon.fa-5x { width: 5em; height: 5em; }
.nl-icon.fa-fw { width: 1.25em; }

.nl-icon--spin {
  animation: nl-icon-spin 0.75s linear infinite;
}

@keyframes nl-icon-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .nl-icon--spin { animation: none; }
}

.container,
.container-fluid {
  width: 100%;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

.container { max-width: 1320px; }
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(var(--nl-gutter-y) * -1);
  margin-inline: calc(var(--nl-gutter-x) * -0.5);
}

.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-inline: calc(var(--nl-gutter-x) * 0.5);
  margin-top: var(--nl-gutter-y);
}

.col { flex: 1 0 0%; }

.g-0, .gx-0 { --nl-gutter-x: 0; }
.g-0, .gy-0 { --nl-gutter-y: 0; }
.g-1, .gx-1 { --nl-gutter-x: 0.25rem; }
.g-1, .gy-1 { --nl-gutter-y: 0.25rem; }
.g-2, .gx-2 { --nl-gutter-x: 0.5rem; }
.g-2, .gy-2 { --nl-gutter-y: 0.5rem; }
.g-3, .gx-3 { --nl-gutter-x: 1rem; }
.g-3, .gy-3 { --nl-gutter-y: 1rem; }
.g-4, .gx-4 { --nl-gutter-x: 1.5rem; }
.g-4, .gy-4 { --nl-gutter-y: 1.5rem; }
.g-5, .gx-5 { --nl-gutter-x: 3rem; }
.g-5, .gy-5 { --nl-gutter-y: 3rem; }
@media (min-width: 992px) { .g-lg-5 { --nl-gutter-x: 3rem; --nl-gutter-y: 3rem; } }
.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }
@media (min-width: 576px) {
  .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-md-9 { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 1200px) {
  .col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-xl-9 { flex: 0 0 auto; width: 75%; }
  .col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-xl-12 { flex: 0 0 auto; width: 100%; }
}

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
@media (min-width: 576px) { .d-sm-block { display: block !important; } }
@media (min-width: 992px) {
  .d-lg-block { display: block !important; }
  .d-lg-none { display: none !important; }
}

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-self-start { align-self: flex-start !important; }
.align-self-center { align-self: center !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.sticky-top { position: sticky; top: 0; z-index: 1020; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ms-0 { margin-inline-start: 0 !important; }
.me-0 { margin-inline-end: 0 !important; }
.mx-0 { margin-inline: 0 !important; }
.my-0 { margin-block: 0 !important; }
.p-0 { padding: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.ps-0 { padding-inline-start: 0 !important; }
.pe-0 { padding-inline-end: 0 !important; }
.px-0 { padding-inline: 0 !important; }
.py-0 { padding-block: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.ms-1 { margin-inline-start: 0.25rem !important; }
.me-1 { margin-inline-end: 0.25rem !important; }
.mx-1 { margin-inline: 0.25rem !important; }
.my-1 { margin-block: 0.25rem !important; }
.p-1 { padding: 0.25rem !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.ps-1 { padding-inline-start: 0.25rem !important; }
.pe-1 { padding-inline-end: 0.25rem !important; }
.px-1 { padding-inline: 0.25rem !important; }
.py-1 { padding-block: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.ms-2 { margin-inline-start: 0.5rem !important; }
.me-2 { margin-inline-end: 0.5rem !important; }
.mx-2 { margin-inline: 0.5rem !important; }
.my-2 { margin-block: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.ps-2 { padding-inline-start: 0.5rem !important; }
.pe-2 { padding-inline-end: 0.5rem !important; }
.px-2 { padding-inline: 0.5rem !important; }
.py-2 { padding-block: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ms-3 { margin-inline-start: 1rem !important; }
.me-3 { margin-inline-end: 1rem !important; }
.mx-3 { margin-inline: 1rem !important; }
.my-3 { margin-block: 1rem !important; }
.p-3 { padding: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.ps-3 { padding-inline-start: 1rem !important; }
.pe-3 { padding-inline-end: 1rem !important; }
.px-3 { padding-inline: 1rem !important; }
.py-3 { padding-block: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ms-4 { margin-inline-start: 1.5rem !important; }
.me-4 { margin-inline-end: 1.5rem !important; }
.mx-4 { margin-inline: 1.5rem !important; }
.my-4 { margin-block: 1.5rem !important; }
.p-4 { padding: 1.5rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.ps-4 { padding-inline-start: 1.5rem !important; }
.pe-4 { padding-inline-end: 1.5rem !important; }
.px-4 { padding-inline: 1.5rem !important; }
.py-4 { padding-block: 1.5rem !important; }
.m-5 { margin: 3rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.ms-5 { margin-inline-start: 3rem !important; }
.me-5 { margin-inline-end: 3rem !important; }
.mx-5 { margin-inline: 3rem !important; }
.my-5 { margin-block: 3rem !important; }
.p-5 { padding: 3rem !important; }
.pt-5 { padding-top: 3rem !important; }
.pb-5 { padding-bottom: 3rem !important; }
.ps-5 { padding-inline-start: 3rem !important; }
.pe-5 { padding-inline-end: 3rem !important; }
.px-5 { padding-inline: 3rem !important; }
.py-5 { padding-block: 3rem !important; }

@media (min-width: 576px) {
  .p-sm-4 { padding: 1.5rem !important; }
}
@media (min-width: 768px) {
  .mb-md-4 { margin-bottom: 1.5rem !important; }
  .p-md-5 { padding: 3rem !important; }
  .py-md-5 { padding-block: 3rem !important; }
  .text-md-start { text-align: start !important; }
  .text-md-center { text-align: center !important; }
  .text-md-end { text-align: end !important; }
}
@media (min-width: 992px) {
  .mb-lg-4 { margin-bottom: 1.5rem !important; }
}

.text-center { text-align: center !important; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }
.text-muted { color: var(--nl-muted) !important; }
.text-white { color: #fff !important; }
.text-decoration-none { text-decoration: none !important; }
.small, small { font-size: 0.875em; }
.fw-light { font-weight: 300 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fs-2 { font-size: 2rem; }
.fs-5 { font-size: 1.25rem; }
.fs-12 { font-size: 0.75rem; }
.lh-30 { line-height: 1.875; }
.list-unstyled { padding-left: 0; list-style: none; }

.bg-light { background-color: #f8f9fa !important; }
.bg-primary { background-color: var(--nl-primary) !important; }

.border { border: 1px solid var(--nl-border-color) !important; }
.border-0 { border: 0 !important; }
.border-1 { border-width: 1px !important; }
.border-2 { border-width: 2px !important; }
.border-3 { border-width: 3px !important; }
.border-top { border-top: 1px solid var(--nl-border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--nl-border-color) !important; }
.border-light { border-color: #f8f9fa !important; }

.rounded { border-radius: 0.375rem !important; }
.rounded-3 { border-radius: 0.5rem !important; }
.rounded-4 { border-radius: 0.75rem !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill { border-radius: 50rem !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }
.img-fluid { max-width: 100%; height: auto; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.btn-lg { padding: 0.5rem 1rem; font-size: 1.125rem; }
.btn-primary { background: var(--nl-primary); border-color: var(--nl-primary); color: #fff; }
.btn-primary:hover { filter: brightness(0.92); color: #fff; }
.btn-dark { background: #212529; border-color: #212529; color: #fff; }
.btn-link { background: none; border: 0; color: var(--nl-primary); text-decoration: underline; padding-inline: 0; }
.btn-outline-primary { color: var(--nl-primary); border-color: var(--nl-primary); }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; }
.btn-outline-danger { color: #dc3545; border-color: #dc3545; }
.btn-close {
  width: 1em; height: 1em; padding: 0.25em;
  border: 0; background: transparent;
  opacity: 0.5; cursor: pointer;
}
.btn-close::before { content: "×"; font-size: 1.4em; line-height: 1; }

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
  background: var(--nl-body-bg, #fff);
  border: 1px solid var(--nl-border-color);
  border-radius: 0.375rem;
}
.form-control:focus,
.form-select:focus {
  outline: 2px solid color-mix(in srgb, var(--nl-primary) 35%, transparent);
  border-color: var(--nl-primary);
}
.form-label { display: inline-block; margin-bottom: 0.35rem; }
.input-group { display: flex; width: 100%; }
.input-group .form-control { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group .btn { border-radius: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-item + .breadcrumb-item { padding-inline-start: var(--nl-breadcrumb-gap); }
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding-inline-end: var(--nl-breadcrumb-gap);
  color: var(--nl-muted);
}
.breadcrumb-item.active { color: var(--nl-muted); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--nl-body-bg, #fff);
  border: 1px solid var(--nl-border-color);
  border-radius: 0.375rem;
}
.card-body { padding: 1rem; }
.card-title { margin-bottom: 0.5rem; }
.card-text { margin-bottom: 0; }
.card-img-top { width: 100%; border-top-left-radius: inherit; border-top-right-radius: inherit; }

.alert { padding: 0.75rem 1rem; border: 1px solid transparent; border-radius: 0.375rem; }
.alert-warning { color: #664d03; background: #fff3cd; border-color: #ffecb5; }
.alert-success { color: #0f5132; background: #d1e7dd; border-color: #badbcc; }
.alert-danger { color: #842029; background: #f8d7da; border-color: #f5c2c7; }

.collapse:not(.show) { display: none; }
.collapse.show { display: block; }

.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.5rem;
}
.navbar-brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.navbar-nav { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
.nav-link { display: block; padding: 0.5rem 0.75rem; text-decoration: none; color: inherit; }
.nav-link.active { font-weight: 600; }
.navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid var(--nl-border-color);
  border-radius: 0.375rem;
  cursor: pointer;
}
.navbar-toggler-icon {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
.navbar-collapse { flex-basis: 100%; }
@media (min-width: 992px) {
  .navbar-expand-lg { flex-wrap: nowrap; }
  .navbar-expand-lg .navbar-toggler { display: none; }
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
  }
  .navbar-expand-lg .navbar-nav { flex-direction: row; }
}

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  z-index: 1000;
  min-width: 10rem;
  margin: 0.125rem 0 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--nl-body-bg, #fff);
  border: 1px solid var(--nl-border-color);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.1);
}
.dropdown-menu.show,
.dropdown.is-open > .dropdown-menu { display: block; }
.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.35rem 1rem;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  text-align: start;
}
.dropdown-item:hover { background: color-mix(in srgb, var(--nl-primary) 10%, transparent); }

.pagination { display: flex; list-style: none; padding: 0; margin: 0; gap: 0.25rem; }
.page-link {
  display: block;
  padding: 0.375rem 0.75rem;
  text-decoration: none;
  color: var(--nl-primary);
  border: 1px solid var(--nl-border-color);
  border-radius: 0.375rem;
}

.post-source {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nl-line, var(--nl-border-color, #dee2e6));
  font-size: 0.9rem;
  color: var(--nl-muted, inherit);
}

.post-source__label {
  opacity: 0.85;
}

.post-source__link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.post-source__link:hover {
  text-decoration: underline;
}

.post-source__link svg {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
}

/* Google Preferred Sources Component Styles */

.google-preferred-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nl-body-color, #212529);
  background: color-mix(in srgb, var(--nl-body-color, #212529) 4%, transparent);
  border: 1px solid var(--nl-border-color, #dee2e6);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.25;
  white-space: nowrap;
}

.google-preferred-btn:hover {
  color: var(--nl-body-color, #212529);
  background: color-mix(in srgb, var(--nl-primary, #0d6efd) 8%, transparent);
  border-color: #4285f4;
  box-shadow: 0 2px 10px rgba(66, 133, 244, 0.18);
  transform: translateY(-1px);
}

.google-preferred-btn:active {
  transform: translateY(0);
}

/* Compact Google Preferred Sources bar */
.google-preferred-card {
  margin: 1rem 0 0.35rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--nl-border-color, #dee2e6);
  background: color-mix(in srgb, #4285f4 6%, var(--nl-body-bg, #fff));
}

[data-theme="dark"] .google-preferred-card {
  background: color-mix(in srgb, #8ab4f8 10%, transparent);
  border-color: rgba(255, 255, 255, 0.1);
}

.google-preferred-card__inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.35rem 0.55rem;
  text-decoration: none;
  color: inherit;
}

.google-preferred-card__title {
  flex: 1;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--nl-muted, #6c757d);
}

.google-preferred-card__btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: var(--nl-body-bg, #fff);
  border: 1px solid var(--nl-border-color, #dee2e6);
  color: var(--nl-body-color, #212529);
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

[data-theme="dark"] .google-preferred-card__btn {
  background: var(--nl-dark-bg-subtle, #2b3035);
  border-color: rgba(255, 255, 255, 0.15);
}

.google-preferred-card__inner:hover .google-preferred-card__btn {
  border-color: #4285f4;
  color: #1a73e8;
}

/* Icon variant for social lists / footer */
.google-preferred-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.google-preferred-icon-btn:hover {
  transform: scale(1.12);
  background: rgba(66, 133, 244, 0.1);
}

/* =============================================
   Shared toolbar pill — Share button
   ============================================= */
.toolbar-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nl-body-color, #212529);
  background: color-mix(in srgb, var(--nl-body-color, #212529) 5%, transparent);
  border: 1px solid var(--nl-border-color, #dee2e6);
  border-radius: 9999px;
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toolbar-share-btn:hover {
  background: color-mix(in srgb, var(--nl-body-color, #212529) 10%, transparent);
  border-color: color-mix(in srgb, var(--nl-body-color, #212529) 40%, transparent);
  transform: translateY(-1px);
}

.toolbar-share-btn:active {
  transform: translateY(0);
}

/* =============================================
   Ask AI — trigger button + picker modal
   ============================================= */

/* Trigger pill button */
.ask-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nl-body-color, #212529);
  background: color-mix(in srgb, #7c3aed 6%, transparent);
  border: 1px solid color-mix(in srgb, #7c3aed 28%, transparent);
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ask-ai-btn:hover {
  background: color-mix(in srgb, #7c3aed 12%, transparent);
  border-color: #7c3aed;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.22);
  transform: translateY(-1px);
}

.ask-ai-btn:active {
  transform: translateY(0);
}

.ask-ai-btn__spark {
  font-size: 0.85em;
  background: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ask-ai-sparkle 3s ease-in-out infinite;
}

@keyframes ask-ai-sparkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Backdrop */
.ask-ai-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: ask-ai-fade-in 0.2s ease;
}

@keyframes ask-ai-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal */
.ask-ai-modal {
  position: fixed;
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 1050;
  width: min(92vw, 440px);
  background: var(--nl-body-bg, #fff);
  border: 1px solid var(--nl-border-color, #dee2e6);
  border-radius: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .ask-ai-modal {
  background: #1e2023;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ask-ai-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal header */
.ask-ai-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.ask-ai-modal__icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-top: 0.1rem;
}

.ask-ai-modal__header-text {
  flex: 1;
  min-width: 0;
}

.ask-ai-modal__title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nl-body-color, #212529);
  line-height: 1.3;
}

.ask-ai-modal__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--nl-muted, #6c757d);
  line-height: 1.5;
}

.ask-ai-modal__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: color-mix(in srgb, var(--nl-body-color, #212529) 8%, transparent);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--nl-muted, #6c757d);
  transition: background 0.15s, color 0.15s;
}

.ask-ai-modal__close:hover {
  background: color-mix(in srgb, var(--nl-body-color, #212529) 14%, transparent);
  color: var(--nl-body-color, #212529);
}

/* Article snippet */
.ask-ai-modal__article {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.1rem;
  background: color-mix(in srgb, var(--nl-body-color, #212529) 4%, transparent);
  border: 1px solid var(--nl-border-color, #dee2e6);
  border-radius: 0.75rem;
}

[data-theme="dark"] .ask-ai-modal__article {
  background: rgba(255, 255, 255, 0.04);
}

.ask-ai-modal__article-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nl-muted, #6c757d);
}

.ask-ai-modal__article-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nl-body-color, #212529);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Services list */
.ask-ai-modal__services {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ask-ai-service-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: color-mix(in srgb, var(--nl-body-color, #212529) 3%, transparent);
  border: 1px solid var(--nl-border-color, #dee2e6);
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: start;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--nl-body-color, #212529);
}

[data-theme="dark"] .ask-ai-service-btn {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.ask-ai-service-btn:hover {
  background: color-mix(in srgb, var(--ai-color, #7c3aed) 9%, transparent);
  border-color: var(--ai-color, #7c3aed);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--ai-color, #7c3aed) 20%, transparent);
  transform: translateY(-1px);
}

.ask-ai-service-btn:active {
  transform: translateY(0);
}

.ask-ai-service-btn__icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ask-ai-service-btn__icon svg {
  width: 100%;
  height: 100%;
}

.ask-ai-service-btn__name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}

.ask-ai-service-btn__arrow {
  font-size: 1rem;
  color: var(--nl-muted, #6c757d);
  transition: transform 0.18s ease;
}

.ask-ai-service-btn:hover .ask-ai-service-btn__arrow {
  transform: translate(2px, -2px);
  color: var(--ai-color, currentColor);
}

[dir="rtl"] .ask-ai-service-btn:hover .ask-ai-service-btn__arrow {
  transform: translate(-2px, -2px);
}

/* Note */
.ask-ai-modal__note {
  margin: 0;
  font-size: 0.775rem;
  color: var(--nl-muted, #6c757d);
  line-height: 1.5;
  text-align: center;
}

/* Contact page + form — baseline for every public theme. */

.contact-page {
  padding: 2.5rem 0 4.25rem;
}

.contact-page__header {
  margin-bottom: 1.75rem;
}

.contact-page__header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.2;
}

.contact-page__lead {
  color: var(--nl-muted, var(--text-color-light, #64748b));
  max-width: 42ch;
  margin: 0.7rem 0 0;
  line-height: 1.65;
}

.contact-page__card {
  max-width: 40rem;
  background: var(--nl-surface, var(--bg, #fff));
  border: 1px solid var(--nl-line, var(--border-color, #e2e8f0));
  border-radius: 1rem;
  padding: 1.6rem 1.7rem 1.85rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.contact-page--banner {
  padding-top: 0;
}

.contact-page--banner .contact-page__card {
  margin-inline: auto;
}

.contact-hero {
  background: var(--theme-color, var(--link-color, #0d6efd));
  color: #fff;
  padding: 2.35rem 0 2.5rem;
  margin-bottom: 2rem;
}

.contact-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.contact-hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.2;
  color: inherit;
}

.contact-hero__lead {
  margin: 0;
  max-width: 38ch;
  font-size: 1.12rem;
  line-height: 1.55;
  opacity: 0.92;
}

.contact-hero__icon {
  flex: 0 0 auto;
  font-size: 4.75rem;
  line-height: 1;
  opacity: 0.72;
}

.contact-form .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.contact-form .form-control {
  background: var(--nl-surface, var(--bg, #fff));
  border-color: var(--nl-line, var(--border-color, #ced4da));
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form .form-control:focus {
  border-color: var(--theme-color, var(--nl-accent, #0d6efd));
  outline: 2px solid color-mix(in srgb, var(--theme-color, #0d6efd) 28%, transparent);
  outline-offset: 1px;
}

.contact-form textarea.form-control {
  min-height: 9rem;
  resize: vertical;
}

.contact-form__captcha {
  display: block;
  width: 100%;
  max-width: 190px;
  height: 60px;
  object-fit: contain;
  background: #f3f4f6;
  cursor: pointer;
}

.contact-form .alert {
  margin-bottom: 1rem;
}

.contact-form button[type="submit"] {
  cursor: pointer;
  min-width: 11rem;
}

@media (max-width: 991px) {
  .contact-hero__icon {
    display: none;
  }
}

@media (max-width: 575px) {
  .contact-page {
    padding: 1.5rem 0 3rem;
  }

  .contact-page__card {
    padding: 1.15rem 1.1rem 1.35rem;
    border-radius: 0.85rem;
  }

  .contact-hero {
    padding: 1.75rem 0 1.85rem;
    margin-bottom: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form .form-control {
    transition: none;
  }
}

[data-theme="dark"] .contact-page__card {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .contact-form__captcha {
  background: #1f2937;
}

/* Estedad — Persian / Arabic UI & article text */

@font-face {
  font-family: Estedad;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/themes/default/fonts/estedad/Estedad-Light.woff2") format("woff2");
}

@font-face {
  font-family: Estedad;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/themes/default/fonts/estedad/Estedad-Regular.woff2") format("woff2");
}

@font-face {
  font-family: Estedad;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/themes/default/fonts/estedad/Estedad-Medium.woff2") format("woff2");
}

@font-face {
  font-family: Estedad;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/themes/default/fonts/estedad/Estedad-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: Estedad;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/themes/default/fonts/estedad/Estedad-Bold.woff2") format("woff2");
}

@font-face {
  font-family: Estedad;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/themes/default/fonts/estedad/Estedad-ExtraBold.woff2") format("woff2");
}

/* Persian site (html lang/dir from site settings) */
html[lang^="fa"],
html[dir="rtl"] {
  --nl-font: Estedad, system-ui, sans-serif;
  --nl-display: Estedad, system-ui, sans-serif;
  --nl-serif: Estedad, system-ui, sans-serif;
}

html[lang^="fa"] body,
html[dir="rtl"] body {
  font-family: Estedad, system-ui, sans-serif !important;
}

/* Persian article / page content on any locale */
.is-persian {
  --nl-font: Estedad, system-ui, sans-serif;
  --nl-display: Estedad, system-ui, sans-serif;
  --nl-serif: Estedad, system-ui, sans-serif;
  font-family: Estedad, system-ui, sans-serif;
}

.newPagination {
    margin-top: 2rem;
}

.newPagination .pagination {
    gap: 0.25rem;
}

.newPagination .page-item .page-link {
    border-radius: 0.5rem;
    min-width: 2.5rem;
    text-align: center;
}

.newPagination .page-item.active .page-link {
    font-weight: 600;
}

.newPagination .page-item.page-ellipsis span {
    display: inline-block;
    padding: 0.375rem 0.5rem;
    color: var(--text-color-light, #6c757d);
}

.newPagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* Shared homepage category strip — used by all themes including custom01/CMS */
.category-bar {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .category-bar {
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
}

.category-bar__inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.category-bar__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0.55rem 0;
  min-height: 2.5rem;
  align-items: center;
}

.category-bar__item {
  margin: 0;
  padding: 0;
}

.category-bar__link {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5c5c5c;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}

.category-bar__link:hover,
.category-bar__link.is-active {
  color: #111;
  border-bottom-color: currentColor;
}

/* Shared horizontal post rail — keeps content inside page width + prev/next controls */

.nl-hscroll {
  --nl-hscroll-btn-size: 2.5rem;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.nl-hscroll__viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.nl-hscroll__viewport::-webkit-scrollbar {
  display: none;
}

.nl-hscroll__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  max-width: none;
  min-width: 100%;
  box-sizing: border-box;
  padding-block: 0.15rem 0.5rem;
  padding-inline: 0;
}

.nl-hscroll__track > * {
  flex: 0 0 auto;
  min-width: 0;
}

.nl-hscroll__btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: var(--nl-hscroll-btn-size);
  height: var(--nl-hscroll-btn-size);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transform: translateY(-50%);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nl-hscroll__btn:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.nl-hscroll__btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.nl-hscroll__btn--prev {
  inset-inline-start: 0.35rem;
}

.nl-hscroll__btn--next {
  inset-inline-end: 0.35rem;
}

.nl-hscroll__chevron {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
}

.nl-hscroll__chevron--prev {
  transform: rotate(135deg);
  margin-inline-start: 0.15rem;
}

.nl-hscroll__chevron--next {
  transform: rotate(-45deg);
  margin-inline-end: 0.15rem;
}

[data-theme="dark"] .nl-hscroll__btn,
:root[data-theme="dark"] .nl-hscroll__btn {
  background: rgba(33, 37, 41, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8f9fa;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 575.98px) {
  .nl-hscroll {
    --nl-hscroll-btn-size: 2.15rem;
  }

  .nl-hscroll__btn--prev {
    inset-inline-start: 0.15rem;
  }

  .nl-hscroll__btn--next {
    inset-inline-end: 0.15rem;
  }
}

/* Post body image lightbox — shared across all themes */

.article-text img:not(.post-image) {
    cursor: zoom-in;
}

.article-popup-image {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
    -webkit-tap-highlight-color: transparent;
}

.article-popup-image.is-open {
    display: flex;
}

.article-popup-image-img {
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    cursor: default;
    user-select: none;
}

.article-popup-image-close {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.article-popup-image-close:hover,
.article-popup-image-close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.article-popup-image-prev,
.article-popup-image-next {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.article-popup-image-prev {
    inset-inline-start: 0.75rem;
}

.article-popup-image-next {
    inset-inline-end: 0.75rem;
}

.article-popup-image-prev:hover,
.article-popup-image-next:hover,
.article-popup-image-prev:focus-visible,
.article-popup-image-next:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.article-popup-image-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 575px) {
    .article-popup-image {
        padding: 0.75rem;
    }

    .article-popup-image-prev,
    .article-popup-image-next {
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.1rem;
    }
}

/* Full layout: title, cover, white content box, and body images use full width */
.article-layout-full .article-header,
.article-layout-full .article-header .lead,
.article-layout-full .article-cover,
.article-layout-full .article-content,
.article-layout-full .article-text,
.article-layout-full .t2-article__hero-inner,
.article-layout-full .t2-article__head,
.article-layout-full .t2-article__title,
.article-layout-full .t2-article__lead,
.article-layout-full .t2-article__cover,
.article-layout-full .t2-article__content,
.article-layout-full .t2-article__text,
.article-layout-full .t2-article__main,
.article-layout-full .am-post__intro,
.article-layout-full .am-post__intro h1,
.article-layout-full .am-post__deck,
.article-layout-full .am-post__cover,
.article-layout-full .am-post__body,
.article-layout-full .am-post__text,
.article-layout-full .am-post__main,
.article-layout-full .content-wrapper {
    max-width: 100% !important;
    width: 100%;
}

.article-layout-full .article-header {
    margin-left: 0;
    margin-right: 0;
    text-align: start;
}

.article-layout-full .article-meta {
    justify-content: flex-start;
}

.article-layout-full .article-cover {
    margin-left: 0;
    margin-right: 0;
}

.article-layout-full .article-content {
    margin-left: 0;
    margin-right: 0;
}

.article-layout-full .article-text figure,
.article-layout-full .article-text img:not(.post-image) {
    width: 100% !important;
    max-width: 100% !important;
}

.article-layout-full .article-text img:not(.post-image) {
    height: auto !important;
}

/* Full layout: article column + related sidebar stack so related sits below */
.article-layout-full .row > .col-lg-8,
.article-layout-full .row > .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}

@media (min-width: 992px) {
    .article-layout-full .t2-article__layout,
    .article-layout-full .am-post__layout {
        grid-template-columns: 1fr;
    }

    .article-layout-full .t2-article__aside,
    .article-layout-full .am-post__aside,
    .article-layout-full .article-sidebar {
        position: static;
    }
}

/* CKEditor / article body images — scoped so public posts keep editor layout. */

.article-text::after,
.t2-article__text::after,
.am-post__text::after {
  content: "";
  display: table;
  clear: both;
}

.article-text .image,
.article-text figure.image {
  --ck-image-style-spacing: 1.5em;
  clear: both;
  display: table;
  margin: 0.9em auto;
  min-width: 50px;
  max-width: 100%;
  text-align: center;
}

.article-text .image img,
.article-text figure.image img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  min-width: 100%;
}

.article-text .image > figcaption,
.article-text figure.image > figcaption {
  display: table-caption;
  caption-side: bottom;
  padding: 0.6em 0.2em 0;
  font-size: 0.85em;
  line-height: 1.45;
  color: var(--nl-muted, #64748b);
  text-align: center;
  word-break: break-word;
}

.article-text img.image_resized,
.article-text .image.image_resized img {
  height: auto;
}

.article-text .image.image_resized {
  box-sizing: border-box;
  display: block;
  max-width: 100%;
}

.article-text .image.image_resized img {
  width: 100%;
  min-width: 0;
}

.article-text .image.image_resized > figcaption {
  display: block;
}

.article-text .image.image-style-side {
  float: right;
  margin-left: var(--ck-image-style-spacing);
  max-width: 50%;
}

.article-text .image.image-style-align-left,
.article-text .image-style-align-left {
  float: left;
  margin-right: var(--ck-image-style-spacing);
}

.article-text .image.image-style-align-right,
.article-text .image-style-align-right {
  float: right;
  margin-left: var(--ck-image-style-spacing);
}

.article-text .image.image-style-block-align-left {
  margin-left: 0;
  margin-right: auto;
  max-width: calc(100% - var(--ck-image-style-spacing));
}

.article-text .image.image-style-block-align-right {
  margin-left: auto;
  margin-right: 0;
  max-width: calc(100% - var(--ck-image-style-spacing));
}

.article-text .image-style-align-center {
  margin-left: auto;
  margin-right: auto;
}

.article-text .image-inline {
  display: inline-flex;
  max-width: 100%;
  align-items: flex-start;
}

.article-text .image-inline img {
  max-width: 100%;
  min-width: 0;
  height: auto;
}

.article-text figure.table,
.article-text table.table {
  margin: 0.9em auto;
  overflow-x: auto;
}

.article-text figure.table > table,
.article-text table.table {
  width: 100%;
  border-collapse: collapse;
}

.article-text figure.table td,
.article-text figure.table th,
.article-text table.table td,
.article-text table.table th {
  border: 1px solid var(--nl-line, #bfbfbf);
  padding: 0.4em 0.6em;
}

.article-text .media {
  clear: both;
  display: block;
  margin: 0.9em 0;
  min-width: 0;
  max-width: 100%;
}

/* YouTube (and other) embeds: 16:9 that tracks the column width. */
.article-text .article-embed-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.9em auto;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.article-text .article-embed-frame--short {
  aspect-ratio: 9 / 16;
  width: min(100%, 22rem);
}

.article-text .media > .article-embed-frame {
  margin: 0;
}

/* Iframe pasted without the wrapper still keeps 16:9. */
.article-text iframe[src*="youtube.com"],
.article-text iframe[src*="youtube-nocookie.com"],
.article-text iframe[src*="youtu.be"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.article-text .article-embed-frame > iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: auto;
  border: 0;
}

.article-layout-full .article-text .article-embed-frame--short {
  width: min(100%, 22rem) !important;
  max-width: 100% !important;
  margin-inline: auto;
}

[dir="rtl"] .article-text .image.image-style-side {
  float: left;
  margin-left: 0;
  margin-right: var(--ck-image-style-spacing);
}

[dir="rtl"] .article-text .image.image-style-align-left,
[dir="rtl"] .article-text .image-style-align-left {
  float: right;
  margin-right: 0;
  margin-left: var(--ck-image-style-spacing);
}

[dir="rtl"] .article-text .image.image-style-align-right,
[dir="rtl"] .article-text .image-style-align-right {
  float: left;
  margin-left: 0;
  margin-right: var(--ck-image-style-spacing);
}

@media (max-width: 575px) {
  .article-text .image.image-style-side,
  .article-text .image.image-style-align-left,
  .article-text .image.image-style-align-right,
  [dir="rtl"] .article-text .image.image-style-side,
  [dir="rtl"] .article-text .image.image-style-align-left,
  [dir="rtl"] .article-text .image.image-style-align-right {
    float: none;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
}

/* Loaded after theme CSS so mobile wrapping wins in every template. */
.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.article-toolbar__meta {
  min-width: 0;
  max-width: 100%;
}

.article-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.article-toolbar .google-preferred-btn,
.article-toolbar .ask-ai-btn,
.article-toolbar .toolbar-share-btn {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .article-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .article-toolbar__actions {
    width: 100%;
  }

  .article-toolbar .google-preferred-btn,
  .article-toolbar .ask-ai-btn,
  .article-toolbar .toolbar-share-btn {
    flex: 1 1 calc(50% - 0.4rem);
    justify-content: center;
    min-width: 0;
    font-size: 0.75rem;
    padding: 0.28rem 0.5rem;
  }
}

.author-profile {
  padding: 2rem 0 4rem;
}

.author-profile__hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  background: var(--nl-surface, #fff);
  border: 1px solid var(--nl-line, #e6e2d8);
  border-radius: var(--nl-radius-lg, 12px);
}

.author-profile__photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--nl-accent-soft, #f3f0e8);
}

.author-profile__photo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--nl-ink, #121212);
}

.author-profile__info {
  min-width: 0;
  flex: 1;
}

.author-profile__name {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.author-profile__bio {
  margin: 0 0 1.25rem;
  color: var(--nl-muted, #5f5a52);
  line-height: 1.6;
}

.author-profile__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin: 0;
}

.author-profile__stats dt {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nl-muted, #5f5a52);
}

.author-profile__stats dd {
  margin: 0;
  font-weight: 600;
}

.author-profile__posts-title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
}

@media (max-width: 575.98px) {
  .author-profile__hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-profile__stats {
    justify-content: center;
  }
}

.post-author-byline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.post-author-byline img {
  display: block;
  flex-shrink: 0;
  max-width: none;
  object-fit: cover;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.post-date-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.post-author {
  font-weight: 600;
}

.post-comments {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.post-comments .nl-icon {
  font-size: 0.85em;
}

.post-review-rating {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0.65rem 0 0;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--theme-color, #0d6efd) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-color, #0d6efd) 22%, transparent);
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.3;
}

.post-review-rating__label {
  font-weight: 600;
  font-size: 0.82rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-review-rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  color: #e6a817;
}

.post-review-rating__stars .nl-icon {
  font-size: 0.95em;
}

.post-review-rating__score {
  font-variant-numeric: tabular-nums;
  font-size: 1.05em;
}

.post-review-rating__of {
  opacity: 0.7;
  font-size: 0.9em;
}

.post-review-rating__item {
  width: 100%;
  font-size: 0.88em;
  opacity: 0.85;
}

.post-review-rating--light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.post-review-rating--light .post-review-rating__stars {
  color: #ffd666;
}

.post-review-rating--light .post-review-rating__of,
.post-review-rating--light .post-review-rating__item,
.post-review-rating--light .post-review-rating__label {
  opacity: 0.9;
}