/* ==========================================================================
   CyOpScape – Professional static site styles
   S3-friendly, no build step. Brand-aligned palette.
   ========================================================================== */

:root {
  /* Brand (aligned with logo) */
  --brand-navy: #051727;
  --brand-cyan: #00C2FF;
  --brand-mint: #00E0B8;
  /* Neutrals */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  /* Spacing & layout */
  --content-max: 720px;
  --content-wide: 1080px;
  --header-max: 980px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-lg: 1.125rem;
  --leading-tight: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  /* Radius & shadow */
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(5, 23, 39, 0.06);
  --shadow-md: 0 4px 12px rgba(5, 23, 39, 0.08);
}

/* Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-page);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header
   -------------------------------------------------------------------------- */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: 100%;
  padding: var(--space-lg) max(var(--space-xl), calc((100% - var(--header-max)) / 2));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Logo in header */
header .logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

header .logo:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
  border-radius: var(--radius);
}

header .logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

header .logo + nav {
  margin-left: auto;
}

header hr {
  display: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  transition: color 0.15s ease, background-color 0.15s ease;
}

nav a:hover {
  color: var(--brand-navy);
  background-color: var(--bg-page);
}

nav a[aria-current="page"] {
  color: var(--brand-cyan);
  font-weight: 600;
}

nav a:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

/* Dot separator between nav links */
header nav a + a::before {
  content: "·";
  color: var(--border);
  margin-right: var(--space-md);
  font-weight: 400;
  pointer-events: none;
}

/* Main
   -------------------------------------------------------------------------- */
main {
  flex: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl);
}

main > :first-child {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--brand-navy);
  margin: 0 0 var(--space-lg);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-xl) 0 var(--space-sm);
}

p {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

main ul {
  margin: 0 0 var(--space-lg);
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

main li {
  margin-bottom: var(--space-sm);
}

main li::marker {
  color: var(--brand-cyan);
}

main a {
  color: var(--brand-cyan);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

main a:hover {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-cyan);
}

main a:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

main small {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Footer
   -------------------------------------------------------------------------- */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

footer hr {
  display: none;
}

footer p {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

footer p + p {
  padding-top: 0;
  padding-bottom: var(--space-xl);
}

footer small {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Utility: optional horizontal rule in content
   -------------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  header {
    padding: var(--space-md) var(--space-lg);
  }

  header .logo + nav {
    margin-left: 0;
    width: 100%;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
  }

  main {
    padding: var(--space-2xl) var(--space-lg);
  }

  nav {
    gap: var(--space-xs) var(--space-sm);
  }

  /* Hide dot separators on mobile — links wrap naturally */
  header nav a + a::before {
    display: none;
  }
}

/* ==========================================================================
   Layout: wide content variant (grid pages)
   ========================================================================== */
main.wide {
  max-width: var(--content-wide);
}

/* ==========================================================================
   Shared article metadata components
   ========================================================================== */

/* Section label — small uppercase eyebrow text */
.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin: 0 0 var(--space-md);
}

/* Category / topic tag badge */
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-navy);
  background: rgba(0, 194, 255, 0.12);
  border: 1px solid rgba(0, 194, 255, 0.28);
  padding: 0.2em 0.55em;
  border-radius: 3px;
  white-space: nowrap;
}

/* Inline metadata: date, read time, separator */
.meta-date,
.meta-read-time {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.meta-sep {
  color: var(--border);
  user-select: none;
}

/* ==========================================================================
   Page hero (Insights header)
   ========================================================================== */
.page-hero {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin-bottom: var(--space-sm);
}

.page-hero .hero-intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 62ch;
  margin: 0;
}

/* ==========================================================================
   Featured article block
   ========================================================================== */
.featured-wrap {
  margin-bottom: var(--space-3xl);
}

.featured-article {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-2xl);
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2xl);
  overflow: hidden;
}

.featured-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.featured-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* Override global h2 border-bottom inside featured article */
.featured-article h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--brand-navy);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-md);
  padding-bottom: 0;
  border-bottom: none;
  letter-spacing: -0.01em;
}

.featured-article h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.featured-article h2 a:hover {
  color: var(--brand-cyan);
}

.featured-excerpt {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-xl);
}

/* Primary CTA button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  align-self: flex-start;
  padding: 0.625rem 1.25rem;
  background: var(--brand-navy);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary::after {
  content: "→";
}

.btn-primary:hover {
  background: #0a2540;
  box-shadow: 0 4px 16px rgba(5, 23, 39, 0.22);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

/* Terminal-style visual panel inside featured article */
.featured-visual {
  background: var(--brand-navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  align-self: stretch;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}

.vis-terminal {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vis-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.vis-bar span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.vis-bar span:first-child  { background: #ff5f57; }
.vis-bar span:nth-child(2) { background: #febc2e; }
.vis-bar span:nth-child(3) { background: #28c840; }

.vis-body {
  padding: 1.25rem 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.vis-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.9;
}

.vis-prompt {
  color: var(--brand-cyan);
  margin-right: 0.5em;
}

.vis-body .vis-muted {
  color: rgba(255, 255, 255, 0.38);
}

.vis-body .vis-accent {
  color: var(--brand-mint);
}

/* ==========================================================================
   Attack flow diagram
   ========================================================================== */
.attack-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5rem 0;
  padding: 2rem 1.5rem;
  background: #071e30;
  border-radius: 12px;
  border: 1px solid rgba(0, 194, 255, 0.12);
  gap: 0;
}

.af-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
  gap: 0.15rem;
}
.af-node strong { font-size: 0.9375rem; font-weight: 700; color: #fff; display: block; }
.af-node span   { font-size: 0.8rem; color: rgba(255,255,255,0.72); display: block; }

.af-attacker { background: #6b2020; }
.af-target   { background: #1e3245; border: 1px solid rgba(255,255,255,0.1); }
.af-urgency  { background: #7a4c0d; }
.af-outcome  {
  background: #5e1c1c;
  max-width: none;
  flex: 1;
  min-width: 0;
  border-radius: 0;
  padding: 0.875rem 1rem;
}
.af-result {
  background: #051727;
  border: 2px solid #00C2FF;
  max-width: 400px;
}
.af-result strong { color: #00C2FF; }
.af-result span   { color: rgba(255,255,255,0.65); }

/* Arrow connectors */
.af-arrow {
  width: 1px;
  height: 32px;
  background: rgba(0, 194, 255, 0.3);
  position: relative;
  flex-shrink: 0;
}
.af-arrow::after {
  content: '▼';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  color: rgba(0, 194, 255, 0.45);
  line-height: 1;
}
.af-arrow span {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: rgba(160, 190, 215, 0.8);
  font-style: italic;
  white-space: nowrap;
}

/* Outcomes row */
.af-outcomes-wrap {
  width: 100%;
  max-width: 560px;
  border: 1px solid rgba(0, 194, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
}
.af-outcomes {
  display: flex;
}
.af-outcome-divider {
  width: 1px;
  background: rgba(0, 194, 255, 0.2);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .af-outcomes { flex-direction: column; }
  .af-outcome-divider { width: auto; height: 1px; }
}

/* ==========================================================================
   Article card grid
   ========================================================================== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

/* Individual card */
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.insight-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 194, 255, 0.35);
  transform: translateY(-2px);
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-sm);
}

/* Override global main a color for card titles */
.card-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.card-title a:hover {
  color: var(--brand-cyan);
}

.card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-lg);
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.card-read-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.card-cta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-cyan);
  text-decoration: none;
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  transition: color 0.15s ease, gap 0.15s ease;
}

.card-cta::after {
  content: "→";
  display: inline-block;
  transition: transform 0.2s ease;
}

.card-cta:hover {
  color: var(--brand-navy);
}

.card-cta:hover::after {
  transform: translateX(4px);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.pagination a,
.pagination .pg-current,
.pagination .pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 var(--space-sm);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.pagination a:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-navy);
  background-color: var(--bg-page);
}

.pagination .pg-current {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
  cursor: default;
}

.pagination .pg-ellipsis {
  border-color: transparent;
  color: var(--text-muted);
  cursor: default;
  min-width: auto;
  padding: 0 var(--space-xs);
}

.pagination .pg-prev,
.pagination .pg-next {
  padding: 0 var(--space-md);
  gap: 0.3em;
}

/* ==========================================================================
   Article page — individual article styles
   ========================================================================== */

/* Back navigation link */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none;
  margin-bottom: var(--space-2xl);
  transition: color 0.15s ease;
}

.article-back:hover {
  color: var(--brand-navy);
}

/* Article header metadata row */
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* Subtitle / deck under h1 */
.article-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin: calc(-1 * var(--space-sm)) 0 var(--space-2xl);
  font-style: italic;
}

/* Inline code */
code {
  background: rgba(0, 194, 255, 0.08);
  border: 1px solid rgba(0, 194, 255, 0.2);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--brand-navy);
}

/* Standalone code block (fallback / no terminal chrome) */
pre {
  background: var(--brand-navy);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: 0 0 var(--space-lg);
  box-shadow: var(--shadow-md);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--brand-cyan);
  line-height: 1.75;
}

/* Terminal-style code block — with window chrome */
.code-terminal {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 0 var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.code-terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.625rem 1rem;
  background: #0d1f2d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.code-terminal-bar .tb-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.code-terminal-bar .tb-dot:nth-child(1) { background: #ff5f57; }
.code-terminal-bar .tb-dot:nth-child(2) { background: #febc2e; }
.code-terminal-bar .tb-dot:nth-child(3) { background: #28c840; }

.code-terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.03em;
}

.code-terminal pre {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  background: var(--brand-navy);
  padding: var(--space-lg) var(--space-xl);
}

.code-terminal pre code {
  display: block;
}

/* Prompt symbol in code terminals */
.code-terminal .prompt {
  color: var(--brand-mint);
  user-select: none;
  margin-right: 0.5em;
}

/* ==========================================================================
   Article header bar
   ========================================================================== */
.article-header-bar {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  background: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem max(var(--space-xl), calc((100% - var(--header-max)) / 2 + var(--space-xl)));
  margin-bottom: var(--space-2xl);
}

.article-header-breadcrumb {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
}

.article-header-breadcrumb strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.article-header-bar .tag {
  background: rgba(0, 194, 255, 0.18);
  border-color: rgba(0, 194, 255, 0.4);
  color: var(--brand-cyan);
}

/* ==========================================================================
   Callout variants
   ========================================================================== */

/* Cyan quote block — for strong standalone statements */
.callout {
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-xl) 0;
  background: rgba(0, 194, 255, 0.06);
  border: 1px solid rgba(0, 194, 255, 0.2);
  border-left: 3px solid var(--brand-cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout p {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--brand-navy);
  line-height: var(--leading-tight);
  font-style: italic;
}

/* Amber insight callout — "Key Insight: ..." */
.callout--insight {
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-xl) 0;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout--insight p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.callout--insight p strong {
  color: #92400e;
  font-weight: 700;
}

/* Red emphasis callout — for final strong statements */
.callout--emphasis {
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-xl) 0;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 3px solid #ef4444;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout--emphasis p {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: #b91c1c;
  line-height: var(--leading-tight);
  font-style: italic;
}

/* Lab note / callout block */
.lab-note {
  background: rgba(0, 194, 255, 0.04);
  border: 1px solid rgba(0, 194, 255, 0.18);
  border-left: 3px solid var(--brand-cyan);
  border-radius: var(--radius);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}

.lab-note-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin-bottom: var(--space-md);
}

.lab-note h3 {
  margin-top: 0;
  font-size: 1rem;
}

.lab-note p:last-child,
.lab-note ul:last-child {
  margin-bottom: 0;
}

/* Article images */
.article-figure {
  margin: var(--space-xl) 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.article-figure figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Defensive takeaway items */
.takeaway {
  border-left: 3px solid var(--brand-mint);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
  background: rgba(0, 224, 184, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.takeaway h3 {
  font-size: 1rem;
  margin: 0 0 var(--space-xs);
}

.takeaway p {
  margin: 0;
}

/* Article footer — author / nav */
.article-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ==========================================================================
   Research grid
   ========================================================================== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.research-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 194, 255, 0.35);
  transform: translateY(-2px);
}

.research-card .card-title {
  font-size: 1.0625rem;
}

.research-card-author {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

.research-card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.card-cta-download {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.card-cta-download:hover {
  color: var(--brand-navy);
}

/* ==========================================================================
   Paper page — academic layout
   ========================================================================== */

/* Academic metadata block */
.paper-meta {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.paper-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.paper-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--brand-navy);
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
}

.paper-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.paper-author {
  font-weight: 600;
  color: var(--text-primary);
}

.paper-affiliation {
  color: var(--text-muted);
}

.paper-keywords {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.paper-keywords-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: var(--space-xs);
}

/* PDF download button */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: var(--brand-navy);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1.5px solid var(--brand-navy);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-download:hover {
  background: var(--brand-navy);
  color: #ffffff;
  border-bottom: none;
}

/* Abstract block */
.paper-abstract {
  background: rgba(0, 194, 255, 0.04);
  border: 1px solid rgba(0, 194, 255, 0.18);
  border-left: 3px solid var(--brand-cyan);
  border-radius: var(--radius);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.paper-abstract-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin: 0 0 var(--space-md);
  padding: 0;
  border: none;
}

.paper-abstract p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* Table of contents */
.paper-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.paper-toc-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-md);
}

.paper-toc-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 2;
}

.paper-toc-list ol {
  margin: 0;
  padding-left: 1.25rem;
}

.paper-toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.paper-toc-list a:hover {
  color: var(--brand-cyan);
  border-bottom: none;
}

/* Paper sections */
.paper-section {
  margin-bottom: var(--space-3xl);
  scroll-margin-top: var(--space-xl);
}

.paper-section h2 {
  font-size: 1.25rem;
  margin-top: 0;
}

.paper-section h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  scroll-margin-top: var(--space-xl);
}

/* Comparison table */
.paper-table-wrap {
  overflow-x: auto;
  margin: var(--space-xl) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.paper-table-caption {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.paper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.paper-table th {
  background: var(--brand-navy);
  color: #ffffff;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.paper-table th:last-child {
  border-right: none;
}

.paper-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
}

.paper-table td:last-child {
  border-right: none;
}

.paper-table tr:last-child td {
  border-bottom: none;
}

.paper-table tr:nth-child(even) td {
  background: var(--bg-page);
}

.paper-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(5, 23, 39, 0.03);
}

/* References */
.paper-references h2 {
  margin-bottom: var(--space-lg);
}

.references-list {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.references-list li {
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Responsive — Insights grid
   ========================================================================== */
@media (max-width: 960px) {
  .featured-article {
    grid-template-columns: 1fr;
  }

  .featured-visual {
    display: none;
  }

  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .research-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .featured-article {
    padding: var(--space-lg);
  }

  .page-hero .hero-intro {
    font-size: var(--text-base);
  }
}
