
/* premium-insights-v1.css */
.page-article { min-height: 100%; margin: 0; background: #05070b; color: #fff; font-family: Inter, system-ui, sans-serif; }
.page-article footer { position: relative; padding: 72px 24px 32px; border-top: 1px solid rgba(255,255,255,.1); background: #020305; overflow: hidden; }
.page-article .footer-container { position: relative; z-index: 1; width: min(1200px, 100%); margin: 0 auto; }
.page-article .f-backmark { display: none; }
.page-article .f-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 64px; align-items: end; }
.page-article .f-cta h2 { margin: 0 0 20px; font-size: clamp(32px, 5vw, 58px); line-height: 1.03; }
.page-article .f-cta h2 span { color: var(--cyan, #5de2ff); }
.page-article .f-cta p { max-width: 620px; color: rgba(255,255,255,.68); line-height: 1.7; }
.page-article .f-cta-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; padding: 12px 18px; border-radius: 5px; background: #5de2ff; color: #051016; font-weight: 800; text-decoration: none; }
.page-article .f-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; }
.page-article .f-contact-block { display: grid; gap: 10px; min-width: 0; }
.page-article .f-label { color: rgba(255,255,255,.48); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.page-article .f-link, .page-article .f-socials a { color: rgba(255,255,255,.84); text-decoration: none; overflow-wrap: anywhere; }
.page-article .f-divider { height: 1px; margin: 56px 0 24px; background: rgba(255,255,255,.1); }
.page-article .f-bottom { display: grid; grid-template-columns: auto auto 1fr; gap: 24px; align-items: center; color: rgba(255,255,255,.48); font-size: 13px; }
body.page-article.footer-secondary-mobile .f-bottom .logo-block { opacity: 1 !important; }
.page-article .f-bottom .logo-text, .page-article .f-bottom .logo-text span { color: rgba(255,255,255,.72); }
.page-article .f-socials { display: flex; gap: 8px; }
.page-article .f-socials a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: 10px; }
.premium-article-shell { max-width: 1200px; margin: 0 auto; padding: 0 40px; position: relative; }
.premium-article-header { margin-bottom: 50px; }
.premium-article-h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -2px; margin-bottom: 24px; font-weight: 900; }
.premium-exec-summary { font-size: 20px; line-height: 1.6; color: rgba(255,255,255,0.85); padding: 24px; background: linear-gradient(180deg, rgba(93,226,255,0.06), transparent); border-left: 3px solid var(--cyan); border-radius: 8px; margin-bottom: 40px; }
.premium-meta { display: flex; gap: 16px; color: rgba(255,255,255,0.6); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 40px; }
.premium-layout { display: grid; grid-template-columns: 1fr 300px; gap: 60px; align-items: start; }
.premium-layout > *, .premium-content { min-width: 0; }
.premium-content h2 { font-size: 36px; margin: 60px 0 24px; line-height: 1.15; letter-spacing: -1px; }
.premium-content h3 { font-size: 24px; margin: 40px 0 16px; color: #fff; }
.premium-content p, .premium-content li { font-size: 18px; line-height: 1.8; color: rgba(255,255,255,0.75); margin-bottom: 24px; }
.premium-content ul, .premium-content ol { padding-left: 24px; margin-bottom: 24px; }
.premium-content blockquote { padding: 20px 24px; border-left: 2px solid var(--violet); background: rgba(184,182,236,0.05); margin: 32px 0; font-style: italic; }
.premium-content table { width: 100%; border-collapse: collapse; margin: 40px 0; font-size: 16px; }
.premium-content th, .premium-content td { padding: 16px; border: 1px solid rgba(255,255,255,0.1); text-align: left; }
.premium-content th { background: rgba(255,255,255,0.03); font-weight: 700; color: #fff; }
.premium-content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 4px; }
.premium-toc { position: sticky; top: 120px; padding: 24px; background: rgba(255,255,255,0.02); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.premium-toc-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; color: var(--cyan); font-weight: 800; }
.premium-toc ul { list-style: none; padding: 0; margin: 0; }
.premium-toc li { margin-bottom: 12px; }
.premium-toc a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 15px; line-height: 1.4; display: block; transition: color 0.2s; }
.premium-toc a:hover { color: #fff; }
.premium-cta { padding: 40px; background: radial-gradient(circle at 10% 20%, rgba(93,226,255,0.1), transparent 50%), rgba(255,255,255,0.02); border: 1px solid rgba(93,226,255,0.2); border-radius: 20px; margin-top: 60px; text-align: center; }
.premium-cta h2 { margin-top: 0; }
.premium-related-insight { margin: 44px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.66); font-size: 0.95rem; line-height: 1.6; }
.premium-related-insight strong { display: block; margin-bottom: 6px; color: var(--cyan, #5de2ff); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.premium-related-insight a { color: #fff; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 40px 0; }
.table-scroll table { margin: 0; }
.premium-breadcrumbs { display: flex; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.5); margin-bottom: 24px; font-weight: 700;}
.premium-breadcrumbs a { color: var(--cyan); text-decoration: none; }
@media (max-width: 1024px) {
  .premium-layout { grid-template-columns: 1fr; }
  .premium-toc { position: static; margin-bottom: 40px; }
  .premium-article-shell { padding: 0 20px; }
  .premium-article-h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* Premium Source Block */
.premium-source-block {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(255, 255, 255, 0.15);
  font-size: 15px !important;
  color: rgba(255, 255, 255, 0.6) !important;
  margin: 32px 0;
  border-radius: 4px;
}
.premium-source-block a {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Premium Quote */
.premium-quote {
  font-size: 20px;
  line-height: 1.6;
  font-style: italic;
  padding: 24px 32px;
  border-left: 4px solid var(--violet);
  background: rgba(184, 182, 236, 0.04);
  margin: 40px 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
}

/* Semantic premium modules: shared editorial surface with restrained variants. */
.premium-module {
  --premium-module-accent: rgba(93, 226, 255, 0.48);
  position: relative;
  min-width: 0;
  max-width: 100%;
  margin: 52px 0;
  padding: 30px 32px 32px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: var(--premium-module-accent);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}
.premium-module::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  width: 64px;
  height: 2px;
  background: var(--premium-module-accent);
}
.premium-module > :first-child { margin-top: 0; }
.premium-module > :last-child { margin-bottom: 0; }
.premium-module[data-module~="executive-summary"] {
  --premium-module-accent: rgba(184, 182, 236, 0.58);
}
.premium-module[data-module~="decision-matrix"],
.premium-module[data-module~="proposal-risk-ledger"],
.premium-module[data-module~="abc-comparison"] {
  --premium-module-accent: rgba(93, 226, 255, 0.7);
  background: linear-gradient(145deg, rgba(93, 226, 255, 0.055), rgba(255, 255, 255, 0.014));
}
.premium-module[data-module~="continuity-flow"],
.premium-module[data-module~="business-control-map"],
.premium-module[data-module~="definition-of-done"] {
  --premium-module-accent: rgba(184, 182, 236, 0.68);
}
.premium-module[data-module~="performance-boundary"],
.premium-module[data-module~="explicit-risk-summary"],
.premium-module[data-module~="red-risk-decision-gate"] {
  --premium-module-accent: rgba(254, 202, 87, 0.7);
  background: linear-gradient(145deg, rgba(254, 202, 87, 0.045), rgba(255, 255, 255, 0.012));
}
.premium-module .premium-module {
  margin: 28px 0 0;
  padding: 22px 24px 24px;
  background: rgba(5, 8, 13, 0.34);
}

/* Risk colors for tables */
.risk-red { color: #ff6b6b; font-weight: bold; }
.risk-yellow { color: #feca57; font-weight: bold; }
.risk-green { color: #1dd1a1; font-weight: bold; }

/* Responsive TOC */
.premium-toc-mobile { display: none; }
@media (max-width: 1024px) {
  .premium-toc { display: none; }
  .premium-toc-mobile {
    display: block;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
  }
  .premium-toc-mobile .premium-toc-title {
    font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; color: var(--cyan); font-weight: 800;
  }
  .premium-toc-mobile ul { list-style: none; padding: 0; margin: 0; }
  .premium-toc-mobile li { margin-bottom: 10px; }
  .premium-toc-mobile a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; }
}
@media (max-width: 640px) {
  .premium-module {
    margin: 38px 0;
    padding: 24px 20px 26px;
    border-radius: 8px;
  }
  .premium-module::before { left: 20px; width: 48px; }
  .premium-module .premium-module { padding: 20px 16px 22px; }
  .page-article footer { padding: 56px 20px 28px; }
  .page-article .f-top, .page-article .f-bottom { grid-template-columns: 1fr; gap: 28px; }
  .page-article .f-contact-grid { grid-template-columns: 1fr; }
  .page-article .f-divider { margin-top: 40px; }
}
@media (forced-colors: active) {
  .premium-module,
  .premium-module::before { border-color: CanvasText; }
  .premium-module::before { background: CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .premium-module,
  .premium-module::before { animation: none !important; transition: none !important; transform: none !important; }
}

/* Stable ProAI logo mark on the premium article routes. */
.page-article .logo-cube-container {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  perspective: 400px;
}
.page-article .logo-cube {
  position: relative;
  width: 18px;
  height: 18px;
  margin: 5px auto;
  animation: logoSpin 10s linear infinite;
  transform-style: preserve-3d;
}
.page-article .l-face {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ai-cyan, #5de2ff);
  background: rgba(93, 226, 255, 0.1);
}
.page-article .lf-front { transform: translateZ(9px); }
.page-article .lf-back { transform: rotateY(180deg) translateZ(9px); }
.page-article .lf-right { transform: rotateY(90deg) translateZ(9px); }
.page-article .lf-left { transform: rotateY(-90deg) translateZ(9px); }
.page-article .lf-top { transform: rotateX(90deg) translateZ(9px); }
.page-article .lf-bottom { transform: rotateX(-90deg) translateZ(9px); }
@keyframes logoSpin {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Route-local mobile menu hardening for Safari dynamic viewports. */
@media (max-width: 1200px), ((max-height: 540px) and (orientation: landscape)) {
  .page-article .global-header { z-index: 10000; }
  .page-article .site-nav {
    min-width: 0;
  }
  .page-article .site-nav.is-open,
  .page-article .site-nav.mobile-nav-open {
    position: fixed !important;
    z-index: 9999 !important;
    inset: var(--header-h, 78px) 0 0 !important;
    display: flex !important;
    flex: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    height: calc(100% - var(--header-h, 78px)) !important;
    min-height: 0 !important;
    max-height: calc(100vh - var(--header-h, 78px)) !important;
    max-height: calc(100svh - var(--header-h, 78px)) !important;
    max-height: calc(100dvh - var(--header-h, 78px)) !important;
    box-sizing: border-box;
    padding: 18px 20px calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #05070b !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65) !important;
  }
  .page-article .site-nav.is-open a,
  .page-article .site-nav.mobile-nav-open a {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 13px 4px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .page-article .logo-cube-container {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
}

/* Mobile Safari repair: every article element participates in normal flow. */
@media (max-width: 640px) {
  .page-article main#main-content,
  .page-article main#main-content *,
  .page-article main#main-content *::before,
  .page-article main#main-content *::after {
    box-sizing: border-box;
  }
  .page-article main#main-content {
    position: relative !important;
    z-index: 1 !important;
    padding-top: calc(var(--header-h, 78px) + 34px) !important;
  }
  .page-article .premium-article-shell {
    width: 100%;
    max-width: 100%;
    padding-inline: 20px;
  }
  .page-article .premium-article-header,
  .page-article .premium-meta,
  .page-article .premium-exec-summary,
  .page-article .premium-layout,
  .page-article .premium-content,
  .page-article .premium-toc-mobile,
  .page-article .premium-module,
  .page-article .premium-cta {
    position: static !important;
    inset: auto !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
    transform: none !important;
  }
  .page-article .premium-article-header {
    display: block;
    margin: 0 0 30px;
  }
  .page-article .premium-article-header h1 {
    max-width: 100%;
    margin: 0 0 20px;
    font-size: clamp(2rem, 9.6vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    overflow-wrap: break-word;
    text-wrap: pretty;
  }
  .page-article[lang="ru"] .premium-article-header h1 {
    font-size: clamp(1.9rem, 8.9vw, 2.5rem);
    line-height: 1.1;
  }
  .page-article .premium-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 0 0 22px;
    line-height: 1.45;
  }
  .page-article .premium-exec-summary {
    display: block;
    margin: 0;
    padding: 22px 20px;
  }
  .page-article .premium-layout {
    display: block;
  }
  .page-article .premium-toc { display: none !important; }
  .page-article .premium-toc-mobile {
    display: block !important;
    margin: 0 0 34px;
    padding: 20px;
  }
  .page-article .premium-toc-mobile ul,
  .page-article .premium-toc-mobile ol {
    margin: 0;
    padding: 0;
  }
  .page-article .premium-content {
    display: block;
  }
  .page-article .premium-content > *,
  .page-article .premium-module > * {
    min-width: 0;
    max-width: 100%;
  }
  .page-article .premium-content h2 {
    margin: 42px 0 16px;
    font-size: clamp(1.75rem, 7.7vw, 2.2rem);
    line-height: 1.16;
    letter-spacing: -0.025em;
    overflow-wrap: break-word;
  }
  .page-article .premium-content h3 {
    margin: 30px 0 12px;
    font-size: clamp(1.25rem, 5.7vw, 1.55rem);
    line-height: 1.28;
    overflow-wrap: break-word;
  }
  .page-article .premium-content p,
  .page-article .premium-content li {
    font-size: 1rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }
  .page-article .premium-module {
    display: block;
    margin: 34px 0;
    padding: 22px 18px 24px;
  }
  .page-article .premium-module .premium-module {
    margin: 24px 0 0;
    padding: 20px 16px 22px;
    box-shadow: none;
  }
  .page-article .premium-module::before {
    top: 0;
    left: 18px;
    width: 44px;
  }
  .page-article .table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .page-article .table-scroll table { min-width: 680px; }
  .page-article footer { clear: both; }
}

@media (prefers-reduced-motion: reduce) {
  .page-article .logo-cube { animation: none !important; }
}
