/* ============================================================
   massry.news — Article Detail Page Styles
   ============================================================ */

html {
  scroll-behavior: smooth;
}

/* --- Breadcrumb --- */
.article-breadcrumb {
  border-bottom: 1px solid var(--color-rule-light);
  padding: 10px 0;
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.breadcrumb-inner a {
  color: var(--color-accent);
}

.breadcrumb-sep {
  margin: 0 6px;
  color: var(--color-text-muted);
}

/* --- Article Page Container --- */
.article-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Article Detail Layout --- */
.article-detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  padding-top: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-rule-light);
}

/* Analysis block — inside main column, below article content */
.article-annotation-full {
  border-top: 2px solid var(--color-rule);
  padding-top: 24px;
  margin-top: 32px;
}

.annotation-full-header {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-text);
}

/* Render structured sections in a 2-column grid inside the annotation block */
.article-annotation-full .sidebar-annotation-section {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.article-annotation-full .annotation-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* When rendered flat (no inner grid), space them cleanly */
.article-annotation-full .sidebar-section-label {
  font-size: 0.7rem;
}

.article-annotation-full .annotation-full {
  font-size: 0.88rem;
  padding: 12px 16px;
  margin-bottom: 0;
}

/* --- Article Main Column --- */
.article-main {
  min-width: 0;
}

.article-source {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 10px;
}

/* One type scale for the article page.
   
   It had drifted upward until the page read as though somebody had turned on
   accessibility zoom: a 38px headline over a 20.5px standfirst over body text
   leading at 1.68, which is airier than any newspaper sets 16px. The sizes
   below are a step down at every level and the leading is tightened to the
   1.45-1.55 a serif face at this size actually wants. Nothing here is small;
   it is just no longer shouting. */
.article-headline {
  font-family: var(--font-headline);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 14px;
  letter-spacing: -0.011em;
}

.article-headline a {
  color: inherit;
}

.article-headline a:hover {
  color: var(--color-accent);
}

.article-meta-bar {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.article-meta-bar .meta-divider {
  color: var(--color-rule-light);
}

.article-video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
}

.article-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Standalone video hero — larger, prominent */
.article-video-hero {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10), 0 0 1px rgba(0, 0, 0, 0.06);
}

.article-video-hero iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video-type articles: make the main column full-width (no sidebar for annotation) */
.article-main-video + .article-annotation-full {
  grid-column: 1 / -1;
}

/* Video articles have shorter headers — reduce sidebar offset */
.article-main-video + .article-sidebar {
  padding-top: 0;
}

.article-image-full {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--color-bg-section);
  margin-bottom: 24px;
}

.article-description {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.article-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--color-accent);
  transition: background 0.2s, color 0.2s;
}

.article-read-link:hover {
  background: var(--color-accent);
  color: #fff;
}

.article-read-link .arrow {
  font-size: 1rem;
  transition: transform 0.2s;
}

.article-read-link:hover .arrow {
  transform: translateX(3px);
}

/* --- Tags --- */
.article-tags {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-rule-light);
}

.article-tags-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.article-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-section);
  padding: 4px 10px;
  border: 1px solid var(--color-rule-light);
}

/* --- Sidebar (Annotation) --- */
.article-sidebar {
  border-left: 1px solid var(--color-rule-light);
  padding-left: 32px;
  padding-top: 72px; /* visually align with main content body, not headline */
}

.sidebar-section-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.annotation-full {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  background: var(--color-annotation-bg);
  border-left: 3px solid var(--color-annotation-border);
  padding: 16px 18px;
  margin-bottom: 24px;
}

.annotation-empty {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Sidebar: Structured annotation sections */
.sidebar-annotation-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-rule-light);
}

.sidebar-annotation-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-annotation-section .annotation-full {
  margin-bottom: 0;
}

/* Sidebar: Read/Watch link */
.sidebar-read-link {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-rule-light);
}

.sidebar-read-link .article-read-link {
  width: 100%;
  justify-content: center;
}

/* Sidebar: Section badge */
.sidebar-section-badge {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-rule-light);
}

.sidebar-section-badge .section-link {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* Sidebar: Analysis anchor link */
.sidebar-analysis-link {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-rule-light);
}

.sidebar-analysis-link a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 10px 14px;
  background: var(--color-bg-section);
  border: 1px solid var(--color-rule-light);
  transition: color 0.2s, border-color 0.2s;
}

.sidebar-analysis-link a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.sidebar-analysis-link .analysis-arrow {
  font-size: 1rem;
  transition: transform 0.2s;
}

.sidebar-analysis-link a:hover .analysis-arrow {
  transform: translateY(2px);
}

/* --- Reading Path --- */
.reading-path {
  padding: 32px 0;
  border-bottom: 1px solid var(--color-rule-light);
}

.reading-path-header {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.reading-path-subtitle {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.reading-path-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reading-path-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--color-rule-light);
  align-items: start;
}

.reading-path-item:first-child {
  border-top: none;
}

.path-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2px;
}

.path-step-number {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.path-step-type {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
}

.path-content .path-title {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.path-content .path-title a {
  color: inherit;
}

.path-content .path-title a:hover {
  color: var(--color-accent);
}

.path-content .path-source {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.path-content .path-note {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: 4px;
}

/* --- More From Section --- */
.more-from-section {
  padding: 32px 0 48px;
}

.more-from-header {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-rule);
}

.more-from-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.more-from-item {
  padding: 0 20px;
  border-left: 1px solid var(--color-rule-light);
}

.more-from-item:first-child {
  padding-left: 0;
  border-left: none;
}

.more-from-item .more-from-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--color-bg-section);
  margin-bottom: 10px;
}

.more-from-item .more-from-source {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.more-from-item .more-from-title {
  font-family: var(--font-headline);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.more-from-item .more-from-title a {
  color: inherit;
}

.more-from-item .more-from-title a:hover {
  color: var(--color-accent);
}

.more-from-item .more-from-date {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .article-detail {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-annotation-full .annotation-sections-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    border-left: none;
    border-top: 1px solid var(--color-rule-light);
    padding-left: 0;
    padding-top: 24px; /* override desktop 72px */
    margin-top: 24px;
  }

  .more-from-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 0;
  }

  .more-from-item:nth-child(3),
  .more-from-item:nth-child(4) {
    border-top: 1px solid var(--color-rule-light);
    padding-top: 16px;
  }
}

@media (max-width: 600px) {
  .article-headline {
    font-size: 1.5rem;
  }

  .article-detail {
    padding-top: 20px;
  }

  .more-from-grid {
    grid-template-columns: 1fr;
  }

  .more-from-item {
    padding: 0;
    border-left: none;
    border-bottom: 1px solid var(--color-rule-light);
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .reading-path-item {
    grid-template-columns: 36px 1fr;
    gap: 12px;
  }
}

/* ============================================================
   Briefing layout — this page is about an article, not the
   article itself, so the annotation carries the typography.
   ============================================================ */

/* The opening statement: why_it_matters, set as editorial copy rather than
   boxed furniture. This is the first thing the reader meets after the headline. */
.article-standfirst {
  font-family: var(--font-body);
  font-size: 1.14rem;
  line-height: 1.46;
  color: var(--color-text);
  margin: 4px 0 24px;
  padding-left: 18px;
  border-left: 3px solid var(--color-accent);
  max-width: 60ch;
}

/* The source block: the publisher's blurb and the way to the publisher, as one
   unit. No rule between them — they are the same thought, and a divider was
   making the blurb look like a stray caption belonging to nothing. */
.article-source-block {
  margin: 0 0 28px;
  padding: 18px 20px 20px;
  background: var(--color-bg-warm, #FAF9F6);
  border: 1px solid var(--color-rule-light);
}

.source-note {
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
  max-width: 68ch;
}
.source-note-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.article-read-bar {
  margin: 0;
}
.article-read-bar .article-read-link {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  background: var(--color-accent);
  color: #FFFFFF;
  border-color: var(--color-accent);
  letter-spacing: 0.04em;
}
.article-read-bar .article-read-link:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  color: #FFFFFF;
}

/* Connective sections run as prose under small-caps headings — no boxes. */
.article-analysis {
  margin-top: 34px;
  border-top: 3px solid var(--color-rule);
  padding-top: 24px;
}
.analysis-block + .analysis-block {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--color-rule-light);
}
.analysis-block-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 9px;
}
.analysis-block-text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.52;
  color: var(--color-text);
  max-width: 66ch;
}

/* The actionable section gets its own ground — it is the one part a student
   acts on rather than reads. */
.analysis-use {
  margin-top: 30px;
  padding: 22px 24px;
  background: var(--color-annotation-bg);
  border-left: 3px solid var(--color-text);
}
.analysis-use-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text);
  margin-bottom: 9px;
}
/* Capped to the same measure as the block above it. Uncapped it ran to 84
   characters a line beside a neighbour running 64, so two paragraphs of the
   same page were set to two different rhythms. */
.analysis-use-text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.52;
  max-width: 66ch;
  color: var(--color-text);
}

/* Reference material is the one thing that should be boxed: it is looked up,
   not read through. */
.reference-panel {
  background: #17171A;
  color: #EDEBE6;
  padding: 22px 22px 24px;
  margin-bottom: 24px;
}
.reference-panel-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #D98C8C;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.reference-panel-text {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: #D6D3CC;
}

@media (max-width: 900px) {
  .article-standfirst {
    font-size: 1.14rem;
  }
  .analysis-use {
    padding: 18px 18px;
  }
}

/* The rail is short against a long briefing; keeping it in view means the
   reference panel is there when the reader wants it, rather than scrolled
   past in the first screen. */
@media (min-width: 901px) {
  .article-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
  }
}

/* The publisher's still, in the rail: a recognition cue carried over from the
   front page, sized to identify the story rather than to dominate the screen. */
.rail-media {
  margin-bottom: 20px;
}
.rail-media .article-image-full {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: var(--color-bg-section);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* With the still moved out, the rail no longer needs to be pushed down to meet
   the body copy — the picture aligns with the headline instead. */
.article-sidebar:has(.rail-media) {
  padding-top: 8px;
}

@media (max-width: 900px) {
  .rail-media {
    max-width: 420px;
  }
}
