/* Editorial layer
   Content-specific refinements kept separate from the core DevNux design system. */

body.page-theme-technical { --page-accent: var(--technical); }

.editorial-prose p + p { margin-top: .35rem; }
.editorial-prose a { text-decoration: underline; text-decoration-color: rgba(146, 206, 203, .35); text-underline-offset: .2em; }
.editorial-prose a:hover { text-decoration-color: currentColor; }
.section-heading--flow { position: static; max-width: 44rem; }
.section-intro { max-width: 44rem; margin: 1rem 0 2rem; font-size: 1.05rem; }
.interest-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.interest-grid--four .interest-panel { min-height: 21rem; }
.interest-panel--technical { --panel-accent: var(--technical); }
.principle-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.principle-grid--four .principle-card { min-height: 14rem; }
[data-age] { font-variant-numeric: tabular-nums; }

.thinking-loop { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 0; list-style: none; }
.thinking-loop li { min-height: 12rem; padding: 1.2rem; background: rgba(17,24,33,.5); border: 1px solid var(--border-soft); border-radius: var(--radius-md); }
.thinking-loop span { display: block; margin-bottom: 1.25rem; color: var(--accent); font: 650 .68rem/1 var(--font-mono); }
.thinking-loop strong { display: block; color: var(--text); font-size: 1rem; }
.thinking-loop p { margin: .55rem 0 0; font-size: .9rem; }

.notebook-section { padding-block: clamp(2.5rem, 5vw, 4rem) !important; }
.notebook-callout { display: grid; grid-template-columns: minmax(0,1fr) minmax(12rem,.35fr); gap: 2rem; align-items: end; padding: clamp(1.5rem, 4vw, 2.5rem); background: linear-gradient(145deg, rgba(17,24,33,.96), rgba(13,19,26,.96)); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--radius-md); }
.notebook-callout h2 { margin: .55rem 0 .7rem; font-size: clamp(1.8rem,4vw,2.6rem); }
.notebook-callout p { max-width: 44rem; margin-bottom: 0; }
.notebook-link { align-self: end; }

.notebook-shell { width: min(100% - 3rem, 54rem); margin-inline: auto; }
.notebook-shell > section { border-bottom: 1px solid var(--border-soft); }
.notebook-shell > section:not(.notebook-hero) { padding-block: clamp(3rem,6vw,5rem); }
.notebook-shell > section:last-child { border-bottom: 0; }
.notebook-hero { padding: clamp(5rem,10vw,8rem) 0 3rem; }
.notebook-hero h1 { margin: .7rem 0 1rem; font-size: clamp(3rem,8vw,5.6rem); line-height: .96; }
.notebook-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.notebook-item { display: grid; grid-template-columns: 8rem minmax(0,1fr); gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--border-soft); }
.notebook-date { color: var(--muted); font: 600 .72rem/1.5 var(--font-mono); }
.notebook-item h2 { margin: 0 0 .35rem; font-size: 1.35rem; letter-spacing: -.02em; }
.notebook-item p { margin: 0; }
.notebook-tools { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-top: 1.4rem; font: 600 .75rem/1.5 var(--font-mono); }
.notebook-tools a { min-height: 2.75rem; padding: .55rem .25rem; display: inline-flex; align-items: center; }
.notebook-article { padding: clamp(4rem,8vw,7rem) 0; }
.notebook-article header { margin-bottom: 2.5rem; }
.notebook-article h1 { max-width: 14ch; margin: .65rem 0 1rem; font-size: clamp(2.7rem,7vw,4.8rem); line-height: 1; }
.notebook-article .prose { margin-left: auto; margin-right: auto; }
.notebook-back { min-height: 2.75rem; display: inline-flex; align-items: center; margin-top: 2rem; font: 600 .78rem/1.5 var(--font-mono); }

.media-section { padding-top: clamp(3rem,6vw,5rem) !important; }
.media-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 2rem; }
.media-figure { margin: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.media-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media-figure figcaption { padding: .9rem 1rem 1rem; color: var(--text-soft); font-size: .87rem; }

@media (max-width: 1024px) {
  .thinking-loop { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .notebook-shell { width: min(100% - 2.5rem, 54rem); }
}

@media (max-width: 760px) {
  .interest-grid--four, .principle-grid--four, .media-gallery { grid-template-columns: 1fr; }
  .interest-grid--four .interest-panel, .principle-grid--four .principle-card { min-height: auto; }
  .notebook-callout { grid-template-columns: 1fr; }
  .notebook-item { grid-template-columns: 1fr; gap: .35rem; }
  .notebook-shell { width: min(100% - 2rem, 54rem); }
}

@media (max-width: 560px) {
  .thinking-loop { grid-template-columns: 1fr; }
  .thinking-loop li { min-height: auto; }
  .subpage-hero h1, .notebook-hero h1, .notebook-article h1 { overflow-wrap: anywhere; hyphens: auto; }
  .notebook-hero { padding-top: 4.5rem; }
  .notebook-hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
  .notebook-article { padding-top: 4.5rem; }
  .notebook-article h1 { font-size: clamp(2.45rem, 11vw, 3.8rem); }
}
