:root {
  --bg: #07090c;
  --panel: #0f1318;
  --text: #f5f5f5;
  --muted: #b6bcc5;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #39a3a7;
  --accent-2: #c96e4b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  background: radial-gradient(circle at top, #151d27 0%, var(--bg) 52%);
  color: var(--text);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  background: #000;
  color: #fff;
  padding: 8px 10px;
  z-index: 1000;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.section-space {
  padding: 3rem 0;
}

.site-header,
.site-footer {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid transparent;
  background: rgba(7, 9, 12, 0.82);
  backdrop-filter: blur(9px);
}

.header-inner,
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
}

.footer-inner {
  align-items: flex-start;
  padding: 2.5rem 0;
}

.footer-brand {
  margin-top: 0;
  font-family: Syne, sans-serif;
  font-weight: 700;
}

.footer-company {
  color: var(--muted);
}

.footer-contact {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

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

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

.brand img {
  display: block;
  width: clamp(120px, 13vw, 190px);
  height: auto;
}

.menu-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.menu-toggle-bar {
  display: block;
  width: 18px;
  height: 1px;
  margin: 4px auto;
  background: currentColor;
}

.site-nav .menu,
.footer-nav .menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .menu {
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1rem;
}

.site-nav a,
.footer-nav a,
.footer-contact a {
  color: var(--text);
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 0.18em;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-nav a:hover,
.footer-nav a:focus-visible,
.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: #d8c7a7;
}

.header-explore,
.text-link {
  border: 1px solid rgba(216, 199, 167, 0.35);
  border-radius: 999px;
  background: rgba(216, 199, 167, 0.08);
  color: #d8c7a7;
  cursor: pointer;
  min-height: 42px;
  padding: 0.65rem 1rem;
}

.header-explore {
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lmg-breadcrumbs {
  width: min(1180px, 92vw);
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.lmg-breadcrumbs a {
  text-decoration: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  text-decoration: none;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.journal-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border-radius: 18px;
  overflow: hidden;
}

.journal-card-link {
  text-decoration: none;
  display: block;
  height: 100%;
}

.journal-card-media img,
.single-hero img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.journal-card-body {
  padding: 1rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.read-more {
  margin-top: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
}

.prose {
  max-width: 70ch;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 100px;
}

.toc-wrap {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: var(--panel);
}

.toc-wrap ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-wrap li + li {
  margin-top: 0.4rem;
}

.toc-wrap a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.toc-wrap a:hover,
.toc-wrap a:focus-visible {
  color: #fff;
}

.author-box,
.story-nav,
.related-articles,
.tag-row {
  margin-top: 2rem;
}

.author-box {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: var(--panel);
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.story-nav {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.story-nav-item a {
  text-decoration: none;
  font-weight: 600;
}

.journal-filter {
  margin: 1rem 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  align-items: end;
}

.journal-filter label {
  display: grid;
  gap: 0.4rem;
}

.journal-filter select,
.journal-filter input,
.journal-filter button,
.premium-search input,
.premium-search button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #11161d;
  color: var(--text);
  padding: 0.5rem 0.7rem;
}

.premium-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

@media (max-width: 1024px) {
  .single-layout {
    grid-template-columns: 1fr;
  }

  .toc-wrap {
    display: none;
  }
}

@media (max-width: 700px) {
  .header-inner,
  .footer-inner,
  .story-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .premium-search {
    grid-template-columns: 1fr;
  }
}

/* Single article editorial refinement */
.single-article {
  width: min(1320px, 92vw);
  padding-top: clamp(3.5rem, 8vw, 7rem);
}

.single-breadcrumbs {
  margin-bottom: 1rem;
}

.single-header {
  width: min(860px, 100%);
  margin: 0 auto 2rem;
}

.single-category-row {
  margin-bottom: 1rem;
}

.single-header h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  max-width: 13ch;
}

.single-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.9rem;
}

.single-source-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.single-intro {
  margin-top: 1.3rem;
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.72;
  color: rgba(245, 245, 245, 0.94);
  max-width: 52ch;
}

.single-hero {
  width: min(1040px, 100%);
  margin: 0 auto 2.5rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  overflow: hidden;
  background: var(--panel);
}

.single-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.single-main-column {
  min-width: 0;
  max-width: 920px;
  margin-inline: auto;
}

.single-content {
  max-width: 920px;
  margin: 0 auto;
  font-size: clamp(1.08rem, 1.15vw, 1.18rem);
  line-height: 1.78;
}

.single-content > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.75;
  color: rgba(245, 245, 245, 0.96);
}

.single-content p + p,
.single-content p + h2,
.single-content p + h3,
.single-content p + blockquote,
.single-content p + ul,
.single-content p + ol,
.single-content h2 + p,
.single-content h3 + p,
.single-content h4 + p {
  margin-top: 1.1rem;
}

.single-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-family: Syne, sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.single-content h3 {
  margin-top: 2.1rem;
  margin-bottom: 0.85rem;
  font-family: Syne, sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.single-content h4 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  font-family: Syne, sans-serif;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.single-content ul,
.single-content ol {
  padding-left: 1.35rem;
}

.single-content li + li {
  margin-top: 0.5rem;
}

.single-content a {
  color: #d8c7a7;
  text-decoration: underline;
  text-decoration-color: rgba(216, 199, 167, 0.35);
  text-underline-offset: 0.18em;
}

.single-content a:hover,
.single-content a:focus-visible {
  text-decoration-color: rgba(216, 199, 167, 0.85);
}

.single-content blockquote {
  margin: 2.25rem 0;
  padding: 1.5rem 1.5rem 1.5rem 1.7rem;
  border-left: 2px solid rgba(216, 199, 167, 0.5);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 1rem 1rem 0;
}

.single-content blockquote p {
  font-size: 1.12rem;
  line-height: 1.78;
}

.single-content figure {
  margin: 2rem 0;
}

.single-content figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.single-content img {
  width: 100%;
  border-radius: 1rem;
}

.single-toc {
  min-width: 0;
}

.toc-wrap.single-toc {
  display: none;
}

.toc-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.8rem;
  background: linear-gradient(180deg, rgba(17, 20, 23, 0.98), rgba(14, 17, 21, 0.98));
}

.toc-wrap.single-toc h2 {
  font-family: Syne, sans-serif;
  font-size: 1.1rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0.9rem;
}

.toc-wrap.single-toc a {
  line-height: 1.4;
  font-size: 0.85rem;
}

.single-share-block,
.single-cta-panel,
.related-articles,
.tag-row {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.single-back-row {
  margin-top: 1rem;
}

.single-back-button,
.single-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(216, 199, 167, 0.35);
  background: rgba(216, 199, 167, 0.08);
  color: #d8c7a7;
  text-decoration: none;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.single-cta-button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.single-back-button:hover,
.single-back-button:focus-visible,
.single-cta-button:hover,
.single-cta-button:focus-visible {
  border-color: rgba(216, 199, 167, 0.6);
  background: rgba(216, 199, 167, 0.14);
}

.single-cta-panel {
  margin-top: 2.5rem;
}

.single-cta-inner {
  display: grid;
  gap: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(216, 199, 167, 0.06), rgba(57, 163, 167, 0.05));
}

.single-cta-inner h2 {
  max-width: 18ch;
  font-family: Syne, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-top: 0.55rem;
}

.single-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.related-intro {
  margin-top: 0.55rem;
  color: var(--muted);
  max-width: 56ch;
}

.related-grid {
  width: 100%;
  margin: 1.3rem 0 0;
  display: grid;
  gap: 1rem;
}

.related-grid .journal-card {
  border-radius: 1rem;
}

.related-grid .journal-card-media img {
  aspect-ratio: 16 / 8;
}

.related-grid .journal-card-body {
  padding: 1.2rem;
}

.related-grid .journal-card h3 {
  margin: 0.7rem 0;
  font-family: Syne, sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.related-grid .journal-card p {
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .header-inner {
    align-items: flex-start;
  }

  .site-nav {
    margin-left: auto;
  }

  .site-nav .menu {
    max-width: 28rem;
    justify-content: flex-end;
  }

  .header-explore {
    display: none;
  }

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

  .footer-nav .menu {
    flex-wrap: wrap;
  }

  .single-layout {
    grid-template-columns: 1fr;
  }

  .toc-wrap.single-toc {
    display: none;
  }

  .single-header,
  .single-hero {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .single-header h1 {
    max-width: none;
    font-size: clamp(2.25rem, 13vw, 3.4rem);
    letter-spacing: -0.045em;
  }

  .single-meta-row {
    align-items: flex-start;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 12, 0.98);
    padding: 1rem 4vw;
  }

  .site-header.menu-open .site-nav {
    display: block;
  }

  .site-nav .menu {
    display: grid;
    justify-content: stretch;
    max-width: none;
    gap: 0.65rem;
  }

  .site-nav a {
    display: block;
    min-height: 44px;
    padding: 0.65rem 0;
  }

  .single-article {
    width: min(100% - 2rem, 920px);
  }

  .single-content {
    font-size: 1rem;
    line-height: 1.75;
  }

  .single-cta-inner {
    padding: 1.2rem;
  }
}

/* Legacy-safe single article override: enforce content-first full-width reading column */
.single-article .single-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

.single-article .single-layout > .toc-wrap {
  display: none !important;
}

.single-article .single-layout > .prose,
.single-article .single-layout > .single-main-column,
.single-article .single-layout > .single-main-column .single-content {
  max-width: 920px;
  width: 100%;
}

/* App-aligned shell for PHP-rendered posts */
.shell {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.lmg-app-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(250, 250, 248, 0.10);
  background: rgba(17, 18, 15, 0.95);
  color: #fafaf8;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.lmg-app-header-inner {
  display: flex;
  height: 6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.lmg-app-logo img {
  display: block;
  height: 5rem;
  width: auto;
}

.lmg-app-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.lmg-app-nav a {
  position: relative;
  color: rgba(250, 250, 248, 0.68);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

.lmg-app-nav a:hover,
.lmg-app-nav a:focus-visible {
  color: #fafaf8;
}

.lmg-app-cta {
  display: inline-flex;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: #d8c7a7;
  color: #11120f;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.lmg-app-menu-toggle {
  display: none;
  border: 1px solid rgba(250, 250, 248, 0.18);
  border-radius: 999px;
  background: transparent;
  padding: 0.625rem;
  color: #fafaf8;
}

.lmg-app-menu-toggle span:not(.visually-hidden) {
  display: block;
  width: 1.25rem;
  height: 1px;
  background: currentColor;
}

.lmg-app-menu-toggle span:not(.visually-hidden) + span:not(.visually-hidden) {
  margin-top: 0.375rem;
}

.lmg-app-mobile-nav {
  display: grid;
  gap: 0.75rem;
  border-block: 1px solid rgba(250, 250, 248, 0.10);
  background: rgba(26, 26, 24, 0.98);
  padding: 1.25rem 4vw;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.lmg-app-mobile-nav[hidden] {
  display: none;
}

.lmg-app-mobile-nav a {
  color: #fafaf8;
  font-family: Syne, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.site-main {
  padding-top: 6rem;
}

.site-main > .lmg-breadcrumbs {
  display: none;
}

.single-article {
  width: min(920px, 92vw);
  padding-block: clamp(4rem, 7vw, 7rem);
}

.single-header,
.single-hero,
.single-main-column,
.single-content {
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
}

.single-header h1 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
}

.single-intro {
  max-width: 66ch;
}

.single-content {
  max-width: 820px;
  display: flow-root;
  overflow-wrap: anywhere;
}

.single-content :where(.alignwide, .alignfull) {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.single-content :where(iframe, video, embed, object) {
  display: block;
  max-width: 100%;
}

.single-share-block,
.tag-row,
.author-box,
.related-articles,
.single-cta-panel,
.story-nav {
  max-width: 820px;
  margin-inline: auto;
}

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

.related-articles .journal-card {
  border-radius: 0.85rem;
}

.related-articles .journal-card-media img {
  aspect-ratio: 16 / 9;
}

.related-articles .journal-card-body {
  padding: 0.85rem;
}

.related-articles .journal-card .pill-row {
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}

.related-articles .journal-card .pill {
  padding: 0.22rem 0.48rem;
  font-size: 0.58rem;
}

.related-articles .journal-card .meta {
  font-size: 0.72rem;
}

.related-articles .journal-card h3 {
  margin: 0.45rem 0;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.related-articles .journal-card p:not(.meta):not(.read-more) {
  font-size: 0.82rem;
  line-height: 1.45;
}

.related-articles .journal-card .read-more {
  font-size: 0.68rem;
}

.lmg-app-footer {
  border-top: 1px solid rgba(250, 250, 248, 0.10);
  background: #0d0e0c;
  color: #fafaf8;
  padding-block: 3rem;
}

.lmg-app-footer-grid {
  display: grid;
  gap: 2.5rem;
  border-bottom: 1px solid rgba(250, 250, 248, 0.10);
  padding-bottom: 2.5rem;
}

.lmg-app-footer h3 {
  color: rgba(250, 250, 248, 0.52);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.lmg-app-footer-brand {
  color: #d8c7a7;
  font-family: Syne, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.lmg-app-footer-brand span {
  color: #fafaf8;
  font-weight: 400;
}

.lmg-app-footer-copy,
.lmg-app-footer-bottom {
  color: rgba(250, 250, 248, 0.52);
  font-size: 0.875rem;
  line-height: 1.6;
}

.lmg-app-footer-copy {
  max-width: 20rem;
  margin-top: 1rem;
}

.lmg-app-footer-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.lmg-app-footer a {
  color: rgba(250, 250, 248, 0.68);
  text-decoration: none;
}

.lmg-app-footer a:hover,
.lmg-app-footer a:focus-visible,
.lmg-app-footer-email {
  color: #d8c7a7;
}

.lmg-app-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .lmg-app-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

@media (max-width: 900px) {
  .lmg-app-nav,
  .lmg-app-cta {
    display: none;
  }

  .lmg-app-menu-toggle {
    display: inline-block;
  }

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

@media (max-width: 700px) {
  .lmg-app-logo img {
    height: 4.25rem;
  }

  .single-article {
    width: min(100% - 2rem, 820px);
  }

  .single-header h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .related-articles .related-grid {
    grid-template-columns: 1fr;
  }

  .lmg-app-footer-bottom {
    flex-direction: column;
  }
}
