.article-page {
  --article-ink: #211c1a;
  --article-muted: #746b66;
  --article-gold: #a67c43;
  --article-warm: #f5f0e9;
  --article-line: #e6ddd2;
  --article-paper: #fffdfa;
  direction: rtl;
  background: #f8f5f0;
  color: var(--article-ink);
  overflow: clip;
  padding-bottom: 5rem;
}
/* The authenticated desktop shell already keeps the admin toolbar in flow.
   Its sticky header offset otherwise leaves a second toolbar-sized spacer. */
@media (min-width: 992px) {
  body.adminBarLoaded > header + .article-page {
    margin-top: calc(-1 * var(--admin-bar-height, 0px));
  }
}
.article-shell {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}
.article-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10050;
  height: 3px;
  background: transparent;
}
.article-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #c49a61, #7b552b);
  transform: scaleX(0);
  transform-origin: right center;
  will-change: transform;
}
.article-hero {
  position: relative;
  /* Without this, .article-hero inherits z-index: 100 from the bare `header`
     selector (it only overrides position, not z-index) and, combined with
     isolation: isolate, ties with the real fixed site-nav header - since this
     element comes later in the DOM, that tie made it paint ON TOP of the nav,
     completely covering it. */
  z-index: 1;
  isolation: isolate;
  /* The storefront header is in normal layout flow; do not reserve its height twice. */
  padding: clamp(1.5rem, 3vw, 3rem) 0 clamp(4rem, 8vw, 7.5rem);
  overflow: hidden;
  background: #171513;
  color: #f8f4ed;
}
.article-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(115deg, #171513 0%, #25201c 55%, #141210 100%);
}
.article-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image: repeating-linear-gradient(
    120deg,
    transparent 0,
    transparent 22px,
    rgba(255, 255, 255, 0.018) 23px
  );
}
.article-hero__glow {
  position: absolute;
  left: -10%;
  bottom: -80%;
  width: 48rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(166, 124, 67, 0.26),
    transparent 66%
  );
  pointer-events: none;
}
.article-breadcrumb {
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
  font-size: 0.78rem;
}
.article-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-breadcrumb li {
  display: flex;
  align-items: center;
  max-width: 36ch;
  color: #aaa19a;
}
.article-breadcrumb li:not(:last-child):after {
  content: "/";
  margin-inline-start: 0.55rem;
  color: #6e655e;
}
.article-breadcrumb a {
  color: #d9d0c6;
  text-decoration: none;
}
.article-breadcrumb a:hover {
  color: #fff;
}
.article-hero__content {
  max-width: 950px;
}
.article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.article-kicker span {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(196, 154, 97, 0.45);
  border-radius: 999px;
  color: #d9b985;
  font-size: 0.76rem;
  font-weight: 700;
}
.article-hero h1 {
  max-width: 22ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 4.3rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.article-lead {
  max-width: 760px;
  margin: 1.25rem 0 0;
  color: #c9c1ba;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 2;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  margin-top: 1.75rem;
  color: #b8aea5;
  font-size: 0.82rem;
}
.article-meta > * {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.article-meta i {
  color: #c49a61;
}
.article-cover-wrap {
  position: relative;
  z-index: 2;
  margin-top: clamp(-4rem, -6vw, -6rem);
}
.article-cover {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: #e9e1d7;
  box-shadow: 0 24px 70px rgba(35, 26, 18, 0.18);
}
.article-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16/8.2;
  object-fit: cover;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 840px) minmax(220px, 280px);
  grid-template-areas: "main rail";
  justify-content: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
  padding-top: clamp(3rem, 6vw, 6rem);
}
.article-main {
  grid-area: main;
  min-width: 0;
}
.article-rail {
  grid-area: rail;
  position: sticky;
  top: 110px;
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.article-toc,
.article-tools {
  border: 1px solid var(--article-line);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 10px 35px rgba(55, 42, 30, 0.05);
}
.article-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  color: #3f3732;
  font-weight: 800;
}
.article-toc summary::-webkit-details-marker {
  display: none;
}
.article-toc summary span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.article-toc summary i {
  color: var(--article-gold);
}
.article-toc[open] summary > i {
  transform: rotate(180deg);
}
.article-toc nav {
  max-height: calc(100vh - 300px);
  overflow: auto;
  padding: 0 0.75rem 0.8rem;
}
.article-toc ol {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-toc a {
  display: block;
  padding: 0.48rem 0.65rem;
  border-radius: 9px;
  color: #6d625b;
  font-size: 0.78rem;
  line-height: 1.65;
  text-decoration: none;
  transition: 0.2s;
}
.article-toc a:hover,
.article-toc a.is-active {
  background: #f1e8dc;
  color: #6d4b22;
}
.article-toc .is-subsection a {
  padding-inline-start: 1.35rem;
  font-size: 0.73rem;
}
.article-tools {
  display: grid;
  padding: 0.9rem;
}
.article-tools > span {
  margin-bottom: 0.35rem;
  color: #9a8f87;
  font-size: 0.7rem;
  font-weight: 700;
}
.article-tools a,
.article-tools button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #4d443f;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
}
.article-tools a:hover,
.article-tools button:hover {
  background: var(--article-warm);
  color: #6d4b22;
}
.article-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  font-size: clamp(1rem, 1.05vw, 1.075rem);
  line-height: 2.12;
  color: #3e3834;
}
.article-content > * {
  max-width: 100%;
  min-width: 0;
}
.article-content a,
.article-content code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-content > *:first-child {
  margin-top: 0;
}
.article-content p {
  margin: 0 0 1.55em;
}
.article-content h2,
.article-content h3 {
  scroll-margin-top: 130px;
  color: #211c1a;
  text-wrap: balance;
}
.article-content h2 {
  position: relative;
  margin: 3.2rem 0 1.2rem;
  padding-top: 1.1rem;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 900;
  line-height: 1.55;
}
.article-content h2:before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 3.25rem;
  height: 3px;
  border-radius: 10px;
  background: var(--article-gold);
}
.article-content h3 {
  margin: 2.2rem 0 0.9rem;
  font-size: clamp(1.15rem, 1.7vw, 1.38rem);
  font-weight: 800;
  line-height: 1.65;
}
.article-content ul,
.article-content ol {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.7rem;
  padding-inline-start: 1.6rem;
}
.article-content li {
  padding-inline-start: 0.35rem;
}
.article-content li::marker {
  color: var(--article-gold);
  font-weight: 800;
}
.article-content a {
  color: #7b552b;
  text-decoration-color: rgba(123, 85, 43, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.article-content a:hover {
  color: #4d3216;
  text-decoration-color: currentColor;
}
.article-content strong {
  font-weight: 750;
  color: #29221e;
}
.article-content blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.35rem 1.5rem 1.35rem 3rem;
  border: 1px solid #e5d8c7;
  border-inline-start: 4px solid var(--article-gold);
  border-radius: 16px;
  background: #f7f0e7;
  color: #514741;
}
.article-content blockquote:after {
  content: "“";
  position: absolute;
  inset-inline-end: 1rem;
  top: 0.35rem;
  color: #d3b589;
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 1;
}
.article-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 720px;
  height: auto;
  margin: 2.2rem auto;
  object-fit: contain;
  border: 1px solid #e6ded5;
  border-radius: 18px;
  background: #eee8df;
  box-shadow: 0 14px 40px rgba(44, 34, 25, 0.09);
}
.article-content figure {
  margin: 2.2rem 0;
}
.article-content figure img {
  margin: 0;
}
.article-content figcaption {
  margin-top: 0.7rem;
  color: #867a72;
  font-size: 0.78rem;
  text-align: center;
}
.article-content hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--article-line);
}
.article-content code {
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
  background: #eee7df;
  color: #74471d;
  font-size: 0.88em;
}
.article-content pre {
  direction: ltr;
  overflow: auto;
  padding: 1.1rem;
  border-radius: 14px;
  background: #211e1b;
  color: #f7f2eb;
  text-align: left;
}
.article-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 2rem 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  contain: inline-size;
  border: 1px solid var(--article-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(40, 31, 24, 0.05);
  -webkit-overflow-scrolling: touch;
}
.article-table-scroll:focus-visible {
  outline: 3px solid rgba(166, 124, 67, 0.3);
  outline-offset: 3px;
}
.article-content table {
  display: table;
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.article-content th,
.article-content td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eee6dc;
  text-align: right;
  vertical-align: top;
}
.article-content th {
  background: #2b2724;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}
.article-content tbody tr:nth-child(even) {
  background: #faf7f2;
}
.article-content tbody tr:hover {
  background: #f5ede3;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.1rem 1.25rem;
  border-block: 1px solid var(--article-line);
}
.article-author__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #2a2521;
  color: #d8b47d;
}
.article-author div {
  display: grid;
  gap: 0.15rem;
}
.article-author small {
  color: var(--article-muted);
}
.article-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  margin-top: 3rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 22px;
  background: linear-gradient(125deg, #231f1c, #352c26);
  color: #fff;
  box-shadow: 0 18px 45px rgba(33, 28, 25, 0.16);
}
.article-cta > div > span,
.section-heading > div > span {
  color: #c7a26d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.article-cta h2 {
  margin: 0.4rem 0 0.45rem;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}
.article-cta p {
  max-width: 58ch;
  margin: 0;
  color: #c8beb5;
  font-size: 0.88rem;
  line-height: 1.8;
}
.article-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.article-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.65rem 1rem;
  border: 1px solid #766a61;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
}
.article-button--primary {
  border-color: #c49a61;
  background: #c49a61;
  color: #211b17;
}
.article-button:hover {
  border-color: #fff;
  color: #fff;
}
.article-button--primary:hover {
  background: #d3ad77;
  color: #211b17;
}
.related-articles {
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: #ece5dc;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-heading h2 {
  margin: 0.3rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.section-heading > a {
  color: #55483e;
  font-size: 0.82rem;
  text-decoration: none;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}
.related-card {
  overflow: hidden;
  border: 1px solid #ded3c6;
  border-radius: 18px;
  background: #fffdf9;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(52, 41, 30, 0.1);
}
.related-card__image {
  display: block;
  overflow: hidden;
}
.related-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.35s;
}
.related-card:hover .related-card__image img {
  transform: scale(1.035);
}
.related-card__body {
  padding: 1rem 1.1rem 1.15rem;
}
.related-card time {
  color: #93877e;
  font-size: 0.7rem;
}
.related-card h3 {
  margin: 0.45rem 0 0.75rem;
  font-size: 1rem;
  line-height: 1.7;
}
.related-card h3 a {
  color: #28221e;
  text-decoration: none;
}
.related-card__more {
  color: #7b552b;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}
.article-comments {
  padding-top: 4rem;
}
.article-comments > h2 {
  font-size: 1.5rem;
}
.article-comments > h2 span {
  color: var(--article-gold);
  font-size: 0.8em;
}
.comment-card {
  max-width: 840px;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--article-line);
}
.comment-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.comment-card time {
  color: #92877f;
  font-size: 0.72rem;
}
.comment-card p {
  margin: 0.55rem 0 0;
  line-height: 1.9;
}
.comment-reply {
  margin: 1rem 2rem 0 0;
  padding: 1rem;
  border-radius: 12px;
  background: #efe9e1;
}
.article-page :is(a, button, summary):focus-visible {
  outline: 3px solid rgba(166, 124, 67, 0.45);
  outline-offset: 3px;
}
@media (max-width: 959px) {
  .article-shell {
    width: min(100% - 32px, 860px);
  }
  .article-layout {
    display: flex;
    flex-direction: column;
    padding-top: calc(2rem + 76px);
  }
  .article-rail {
    position: static;
    width: 100%;
    order: 0;
  }
  .article-main {
    width: 100%;
    order: 1;
  }
  .article-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .article-tools > span {
    width: 100%;
  }
  .article-toc nav {
    max-height: 340px;
  }
  .article-cta {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .article-shell {
    width: min(100% - 24px, 860px);
  }
  .article-hero {
    padding-top: 2rem;
    padding-bottom: 4.5rem;
  }
  .article-breadcrumb {
    margin-bottom: 2rem;
  }
  .article-breadcrumb li:last-child {
    display: none;
  }
  .article-hero h1 {
    max-width: 26ch;
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.5;
  }
  .article-lead {
    font-size: 0.94rem;
  }
  .article-meta {
    gap: 0.6rem 1rem;
  }
  .article-cover {
    border-radius: 15px;
  }
  .article-cover img {
    width: 100%;
    height: auto;
    max-height: 58vh;
    aspect-ratio: auto;
    object-fit: contain;
  }
  .article-layout {
    gap: 2rem;
  }
  .article-content {
    font-size: 0.98rem;
    line-height: 2;
  }
  .article-content h2 {
    margin-top: 2.6rem;
  }
  .article-content img {
    width: auto !important;
    max-width: 100% !important;
    max-height: min(68vh, 520px);
    height: auto !important;
    margin: 1.4rem auto;
    object-fit: contain;
    border-radius: 12px;
  }
  .article-cta {
    padding: 1.25rem;
    border-radius: 16px;
  }
  .article-cta__actions,
  .article-button {
    width: 100%;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .comment-reply {
    margin-right: 0.75rem;
  }
}
/* Mobile reading contract: keep the fixed storefront header clear and prevent
   rich article HTML from creating a horizontal page scroll. */
@media (max-width: 991px) {
  .article-page {
    width: 100%;
    overflow-x: clip;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
  .article-hero {
    padding-top: clamp(1.75rem, 7vw, 3.5rem);
  }
  .article-layout {
    padding-top: 2rem;
  }
  .article-content,
  .article-content p,
  .article-content li,
  .article-content h2,
  .article-content h3 {
    overflow-wrap: anywhere;
  }
  .article-content {
    overflow-x: hidden;
  }
  .article-content iframe,
  .article-content video,
  .article-content audio {
    display: block;
    max-width: 100%;
  }
  .article-content pre {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .article-content table {
    display: table;
    width: 100%;
    min-width: 520px;
  }
  .article-content th,
  .article-content td {
    padding: 0.75rem 0.85rem;
    overflow-wrap: normal;
    word-break: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-page * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
body.adminBarLoaded > .admin-bar { position: relative !important; top: auto !important; }
body.adminBarLoaded > header { top: 0 !important; }
