/* PRIMLOGiC product storytelling system.
   Used by the homepage and the two product overview pages. */

.story-page {
  --story-accent: var(--c-primary);
  --story-accent-soft: var(--c-primary-weak);
  background: #FFFFFF;
}

.story-page--foreone {
  --story-accent: var(--c-forta);
  --story-accent-soft: var(--c-forta-weak);
}

.story-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.story-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #555E6D;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.story-eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--story-accent);
  content: '';
}

.story-hero {
  position: relative;
  margin-top: 0;
  padding: 150px 0 58px;
  background: #FFFFFF;
  text-align: center;
}

.story-hero::before,
.product-story-hero::before {
  position: absolute;
  inset: 0 0 auto;
  height: 128px;
  border-bottom: 1px solid rgba(223, 227, 232, .75);
  background: #FFFFFF url('/assets/backgrounds/pearl-header-v2.webp') top center / 1920px 240px no-repeat;
  content: '';
  pointer-events: none;
}

.story-hero > *,
.product-story-hero > * { position: relative; }

.story-hero-copy {
  max-width: 820px;
  margin-inline: auto;
}

.story-hero h1 {
  max-width: 780px;
  margin: 0 auto 22px;
  color: var(--c-text);
  font-size: clamp(40px, 5.2vw, 60px);
  font-weight: 660;
  line-height: 1.1;
}

.story-hero h1 strong {
  color: inherit;
  font-weight: inherit;
}

.story-hero .story-lead {
  max-width: 650px;
  margin: 0 auto 28px;
  color: #626A78;
  font-size: 16px;
  line-height: 1.72;
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.story-actions .btn {
  min-width: 124px;
}

.story-demo-wrap {
  padding: 0 0 112px;
  background: #FFFFFF;
}

.story-demo {
  overflow: hidden;
  border: 1px solid #D9DEE5;
  border-radius: 18px;
  background: var(--c-surface);
  box-shadow: 0 2px 6px rgba(17, 24, 39, .03), 0 30px 80px rgba(17, 24, 39, .11);
}

.story-product-tabs,
.console-tabs {
  display: grid;
  border-bottom: 1px solid var(--c-border);
  background: #FFFFFF;
}

.story-product-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-product-tab,
.console-tab {
  position: relative;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: #7B8390;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.story-product-tab::after,
.console-tab::after {
  position: absolute;
  right: 22%;
  bottom: -1px;
  left: 22%;
  height: 2px;
  background: var(--tab-accent, var(--c-primary));
  content: '';
  opacity: 0;
  transform: scaleX(.55);
  transition: opacity .2s ease, transform .2s ease;
}

.story-product-tab[aria-selected='true'],
.console-tab[aria-selected='true'] {
  color: #111827;
  font-weight: 720;
}

.story-product-tab[aria-selected='true']::after,
.console-tab[aria-selected='true']::after {
  opacity: 1;
  transform: scaleX(1);
}

.story-product-tab[data-product='foreone'] { --tab-accent: var(--c-forta); }
.story-product-tab[data-product='apexone'] { --tab-accent: var(--c-apex); }

.story-product-panel[hidden],
.console-panel[hidden] {
  display: none;
}

.product-console {
  --console-accent: var(--c-primary);
  min-height: 560px;
  background: #F8F9FB;
}

.product-console--foreone { --console-accent: var(--c-forta); }
.product-console--apexone { --console-accent: var(--c-apex); }

.console-windowbar {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--c-border);
  background: #FAFAFB;
  color: var(--c-text-muted);
  font-size: 12px;
}

.console-window-controls {
  display: flex;
  gap: 7px;
}

.console-window-controls span {
  width: 9px;
  height: 9px;
  border: 1px solid var(--c-border-strong);
  border-radius: 50%;
  background: var(--c-surface);
}

.console-address {
  justify-self: center;
  width: min(430px, 90%);
  padding: 7px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #F1F2F4;
  text-align: center;
}

.console-environment {
  justify-self: end;
  color: var(--c-success);
  font-weight: 700;
}

.console-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 508px;
}

.console-sidebar {
  padding: 20px 14px;
  border-right: 1px solid #E4E7EB;
  background: #F5F6F8;
  color: #4A5260;
}

.console-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
  color: #151C28;
  font-size: 14px;
  font-weight: 780;
}

.console-brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--console-accent);
  color: #FFF;
  font-size: 12px;
}

.console-nav-label {
  margin: 10px 8px 8px;
  color: #8A929F;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.console-nav {
  display: grid;
  gap: 4px;
}

.console-nav button {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #606978;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.console-nav button:hover,
.console-nav button[aria-selected='true'] {
  background: #FFFFFF;
  color: #111827;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 5px 14px rgba(17, 24, 39, .055);
}

.console-nav button[aria-selected='true'] {
  box-shadow: inset 2px 0 var(--console-accent), 0 1px 2px rgba(17, 24, 39, .04), 0 5px 14px rgba(17, 24, 39, .055);
}

.console-main {
  min-width: 0;
  padding: 24px;
}

.console-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.console-heading h3 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 760;
}

.console-heading p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 12px;
}

.console-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  background: #F0FDF4;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.console-status::before,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.status-dot--ok { color: var(--c-success); }
.status-dot--warn { color: var(--c-warning); }

.console-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.console-kpi {
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface);
}

.console-kpi span {
  display: block;
  margin-bottom: 7px;
  color: var(--c-text-muted);
  font-size: 10px;
}

.console-kpi strong {
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 19px;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
  gap: 14px;
}

.console-panel-card {
  min-width: 0;
  border: 1px solid var(--c-border);
  border-radius: 11px;
  background: var(--c-surface);
}

.console-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--c-border-light);
}

.console-card-head strong {
  font-size: 12px;
}

.console-card-head span {
  color: var(--console-accent);
  font-size: 10px;
  font-weight: 700;
}

.workflow-list,
.activity-list,
.asset-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-row,
.activity-row,
.asset-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 11px;
}

.workflow-row:last-child,
.activity-row:last-child,
.asset-row:last-child { border-bottom: 0; }

.workflow-row { grid-template-columns: 78px minmax(0, 1fr) 70px; }
.activity-row { grid-template-columns: minmax(0, 1fr) auto; }
.asset-row { grid-template-columns: 12px minmax(0, 1fr) 62px; }

.workflow-time,
.activity-meta,
.asset-meta {
  color: var(--c-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.workflow-main strong,
.activity-row strong,
.asset-row strong {
  display: block;
  overflow: hidden;
  color: var(--c-text-soft);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-main span,
.activity-row span,
.asset-row span {
  color: var(--c-text-muted);
  font-size: 10px;
}

.workflow-state {
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--c-surface-subtle);
  color: var(--c-text-soft);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.workflow-state--done { background: var(--c-success-weak); color: var(--c-success); }
.workflow-state--active { background: var(--story-accent-soft); color: var(--story-accent); }
.workflow-state--review { background: var(--c-warning-weak); color: var(--c-warning); }

.console-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.console-tab {
  min-height: 42px;
  font-size: 11px;
}

.console-panel {
  padding: 14px;
}

.evidence-chain {
  display: grid;
  gap: 8px;
}

.evidence-item {
  padding: 10px;
  border: 1px solid var(--c-border-light);
  border-radius: 9px;
  background: var(--c-surface-subtle);
}

.evidence-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--c-text-soft);
  font-size: 10px;
}

.evidence-item span {
  color: var(--c-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.story-section {
  padding: 116px 0;
  border-top: 1px solid var(--c-border-light);
  background: #FFFFFF;
}

.story-section--subtle { background: #F7F8FA; }

.story-section-head {
  max-width: 700px;
  margin: 0 auto 52px;
  text-align: center;
}

.story-section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.3vw, 46px);
  font-weight: 670;
  line-height: 1.14;
}

.story-section-head p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 16px;
  line-height: 1.75;
}

.pain-grid,
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-surface);
}

.pain-item,
.proof-item {
  min-width: 0;
  padding: 30px;
}

.pain-item + .pain-item,
.proof-item + .proof-item {
  border-left: 1px solid var(--c-border);
}

.pain-index,
.proof-label {
  display: block;
  margin-bottom: 32px;
  color: var(--story-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.proof-label {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
}

.pain-item h3,
.proof-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 690;
}

.pain-item p,
.proof-item p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.story-feature {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: clamp(48px, 7vw, 92px);
  align-items: center;
}

.story-feature + .story-feature {
  margin-top: 112px;
}

.story-feature--reverse .story-feature-copy { order: 2; }
.story-feature--reverse .story-feature-visual { order: 1; }

.story-feature-copy h2,
.product-story-hero h1 {
  margin: 0 0 16px;
  color: var(--c-text);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 670;
  line-height: 1.14;
}

.product-story-hero h1 {
  max-width: 640px;
  font-size: clamp(40px, 4.2vw, 52px);
  line-height: 1.1;
}

.story-feature-copy > p,
.product-story-hero .story-lead {
  margin: 0 0 24px;
  color: var(--c-text-muted);
  font-size: 15px;
  line-height: 1.8;
}

.story-points {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.story-points li {
  position: relative;
  padding-left: 20px;
  color: var(--c-text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.story-points li::before {
  position: absolute;
  top: .64em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--story-accent);
  content: '';
}

.story-feature-visual {
  overflow: hidden;
  border: 1px solid #DBE0E6;
  border-radius: 16px;
  background: var(--c-surface);
  box-shadow: 0 2px 5px rgba(17, 24, 39, .025), 0 22px 54px rgba(17, 24, 39, .085);
}

.visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid var(--c-border);
  background: #FAFAFB;
}

.visual-toolbar strong { font-size: 12px; }
.visual-toolbar span { color: var(--c-text-muted); font-size: 10px; }

.access-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 0;
  padding: 36px 24px;
}

.access-node {
  position: relative;
  padding: 18px 10px;
  border-top: 2px solid var(--story-accent);
  border-bottom: 1px solid var(--c-border);
  background: #F8F9FB;
  text-align: center;
}

.access-node + .access-node { border-left: 1px solid var(--c-border); }

.access-flow--directory {
  --story-accent: #12665d;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-node strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.access-node span {
  color: var(--c-text-muted);
  font-size: 9px;
  line-height: 1.5;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.evidence-table th,
.evidence-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-border-light);
  text-align: left;
}

.evidence-table th {
  background: var(--c-surface-subtle);
  color: var(--c-text-muted);
  font-size: 10px;
  font-weight: 700;
}

.evidence-table td { color: var(--c-text-soft); }
.evidence-table tr:last-child td { border-bottom: 0; }

.topology-canvas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 24px;
  background: #F7F8FA;
}

.topology-group {
  padding: 16px;
  border: 1px dashed var(--c-border-strong);
  border-radius: 11px;
  background: var(--c-surface);
}

.topology-group > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--c-text-soft);
  font-size: 11px;
}

.topology-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--c-border-light);
  color: var(--c-text-soft);
  font-size: 10px;
}

.topology-node span:last-child {
  color: var(--c-success);
  font-family: var(--font-mono);
  font-size: 9px;
}

.product-story-hero {
  position: relative;
  margin-top: 0;
  padding: 212px 0 100px;
  background: #FFFFFF;
}

.product-story-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(0, 1.08fr);
  gap: clamp(38px, 4.5vw, 64px);
  align-items: center;
}

.product-brandline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--story-accent) 18%, white);
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
  color: var(--story-accent);
  font-size: 12px;
  font-weight: 760;
}

.product-brandline i {
  width: 1px;
  height: 14px;
  background: color-mix(in srgb, var(--story-accent) 28%, white);
}

.product-story-hero .story-actions { justify-content: flex-start; }

.product-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  border-top: 1px solid var(--c-border);
}

.product-brief div {
  padding: 16px 12px 0 0;
}

.product-brief strong {
  display: block;
  color: var(--story-accent);
  font-size: 14px;
}

.product-brief span {
  color: var(--c-text-muted);
  font-size: 10px;
}

.story-proof-band {
  padding: 42px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: #F7F8FA;
}

.story-proof-band .proof-grid { border: 0; background: transparent; }
.story-proof-band .proof-item { padding-block: 8px; }
.story-proof-band .proof-label { margin-bottom: 14px; }

.story-cta {
  padding: 92px 0 108px;
  border-top: 1px solid var(--c-border-light);
  background-color: #FBFCFE;
  background-image: url('/assets/backgrounds/pearl-header-v2.webp');
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: 1920px 240px;
  text-align: center;
}

.story-cta h2 {
  max-width: 680px;
  margin: 0 auto 14px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 710;
  line-height: 1.16;
}

.story-cta p {
  margin: 0 auto 26px;
  color: var(--c-text-muted);
}

.story-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.story-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .console-windowbar { grid-template-columns: 90px 1fr 90px; }
  .console-layout { grid-template-columns: 150px minmax(0, 1fr); }
  .console-grid { grid-template-columns: 1fr; }
  .console-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-feature,
  .product-story-grid { grid-template-columns: 1fr; }
  .product-story-grid { gap: 44px; }
  .story-feature-copy { max-width: 680px; }
  .story-feature--reverse .story-feature-copy,
  .story-feature--reverse .story-feature-visual { order: initial; }
}

@media (max-width: 720px) {
  .story-shell { width: min(100% - 28px, 1180px); }
  .story-hero { padding: 120px 0 42px; }
  .story-hero h1 { font-size: 40px; }
  .story-hero .story-lead { font-size: 15px; }
  .story-demo-wrap { padding-bottom: 72px; }
  .story-product-tab { min-height: 52px; }
  .story-demo { border-radius: 14px; }
  .console-windowbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-inline: 12px; }
  .console-address {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .console-environment { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .console-window-controls { display: none; }
  .console-layout { display: block; min-height: 0; }
  .console-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-right: 0;
    scrollbar-width: none;
  }
  .console-sidebar::-webkit-scrollbar { display: none; }
  .console-brand { flex: 0 0 auto; padding: 0 8px 0 0; }
  .console-brand-mark { display: none; }
  .console-nav-label { display: none; }
  .console-nav { display: flex; }
  .console-nav button { flex: 0 0 auto; min-height: 36px; white-space: nowrap; }
  .console-main { padding: 18px 14px; }
  .console-heading { margin-bottom: 16px; }
  .console-heading h3 { font-size: 17px; }
  .console-kpis { gap: 8px; }
  .console-kpi { padding: 11px; }
  .console-kpi strong { font-size: 16px; }
  .workflow-row { grid-template-columns: 58px minmax(0, 1fr) 62px; padding-inline: 10px; }
  .story-section { padding: 76px 0; }
  .story-section-head { margin-bottom: 36px; }
  .pain-grid,
  .proof-grid { grid-template-columns: 1fr; }
  .pain-item,
  .proof-item { padding: 24px; }
  .pain-item + .pain-item,
  .proof-item + .proof-item { border-top: 1px solid var(--c-border); border-left: 0; }
  .pain-index { margin-bottom: 22px; }
  .story-feature + .story-feature { margin-top: 76px; }
  .access-flow, .access-flow--directory { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .access-node { border: 1px solid var(--c-border); border-left: 2px solid var(--story-accent); text-align: left; }
  .access-node + .access-node { border-left: 2px solid var(--story-accent); }
  .topology-canvas { grid-template-columns: 1fr; padding: 16px; }
  .product-story-hero { padding: 132px 0 72px; }
  .product-story-hero .story-actions { justify-content: flex-start; }
  .product-story-grid { gap: 28px; }
  .product-brief { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
  .product-brief div { min-width: 0; padding: 12px 8px 0 0; border-bottom: 0; }
  .product-brief strong { font-size: 12px; }
  .product-brief span { display: block; font-size: 9px; line-height: 1.45; }
  .product-story-hero .story-feature-visual { overflow-x: auto; scrollbar-width: none; }
  .product-story-hero .story-feature-visual::-webkit-scrollbar { display: none; }
  .product-story-hero .access-flow {
    min-width: 620px;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 0;
    padding: 18px;
  }
  .product-story-hero .access-node {
    border-top: 2px solid var(--story-accent);
    border-right: 0;
    border-bottom: 1px solid var(--c-border);
    border-left: 0;
    text-align: center;
  }
  .product-story-hero .access-node + .access-node { border-left: 1px solid var(--c-border); }
  .product-story-hero .topology-canvas { min-width: 590px; grid-template-columns: 1fr 1fr; }
  .story-proof-band { padding: 20px 0; }
  .story-proof-band .proof-item { padding: 20px 0; }
  .evidence-table { min-width: 590px; }
  .story-feature-visual--table { overflow-x: auto; }
}

@media (max-width: 390px) {
  .story-shell { width: min(100% - 24px, 1180px); }
  .story-actions { display: grid; grid-template-columns: 1fr; }
  .story-hero h1,
  .product-story-hero h1 { font-size: 34px; }
  .story-actions .btn { width: 100%; }
  .story-product-tab { font-size: 12px; }
  .console-environment { font-size: 9px; }
  .console-heading { display: block; }
  .console-status { margin-top: 10px; }
  .console-kpis { grid-template-columns: 1fr 1fr; }
  .console-kpi span { min-height: 26px; }
}

@media (max-width: 360px) {
  .story-hero h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .story-reveal { opacity: 1; transform: none; }
}

/* Reference-measured storytelling frame. Content remains PRIMLOGiC-specific. */
.story-page {
  --story-frame: 1240px;
  background: #FFFFFF;
}

.story-shell {
  width: min(var(--story-frame), 100%);
  padding-inline: 40px;
  border-right: 1px solid #EEF0F2;
  border-left: 1px solid #EEF0F2;
}

.story-hero {
  min-height: 510px;
  padding: 178px 0 42px;
  border-bottom: 1px solid #EEF0F2;
  isolation: isolate;
}
.story-hero::before,
.product-story-hero::before { height: 160px; }
.story-hero::after {
  position: absolute;
  z-index: 0;
  inset: 160px 0 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .06), rgba(255, 255, 255, .34) 76%, rgba(255, 255, 255, .9)),
    url('/assets/backgrounds/compute-forest-contours-v1.webp') center bottom / cover no-repeat;
  content: '';
  opacity: .78;
  pointer-events: none;
}
.story-hero > * { z-index: 1; }
.story-hero-copy { max-width: 1240px; }
.story-hero h1 {
  max-width: 740px;
  margin-bottom: 20px;
  font-size: clamp(44px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.12;
}
.story-hero h1 strong span,
.about-hero h1 strong span { display: inline; }
.story-hero .story-lead { max-width: 650px; margin-bottom: 34px; font-size: 16px; font-weight: 450; line-height: 1.62; }
.story-eyebrow { margin-bottom: 16px; color: #636B78; font-size: 13px; font-weight: 550; }
.story-eyebrow::before { width: 6px; height: 6px; }

.story-demo-wrap { padding: 0; border-bottom: 1px solid #EEF0F2; }
.story-demo.story-shell { padding-inline: 0; }
.story-demo {
  overflow: hidden;
  border-top: 0;
  border-right-color: #E1E4E8;
  border-bottom: 0;
  border-left-color: #E1E4E8;
  border-radius: 0;
  box-shadow: none;
}
.story-product-panel {
  width: auto;
  margin: 24px 24px 16px;
  overflow: hidden;
  border: 1px solid #E1E4E8;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(10, 18, 34, .07);
}
.story-product-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.story-product-tab { min-height: 60px; border-right: 1px solid #EEF0F2; font-size: 14px; font-weight: 560; }
.story-product-tab:last-child { border-right: 0; }
.story-product-tab::after { right: 38%; left: 38%; height: 1px; }
.story-product-tabs.is-autoplaying .story-product-tab[aria-selected='true']::before {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #111827;
  content: '';
  transform-origin: left;
  animation: story-tab-progress var(--autoplay-duration, 6200ms) linear;
}
@keyframes story-tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.product-console { min-height: 540px; background: #FAFAFB; }
.console-windowbar { min-height: 46px; background: #FFFFFF; }
.console-layout { min-height: 494px; }
.console-main { padding: 24px; }
.console-sidebar { background: #F7F8FA; }
.console-panel-card,
.console-kpi { border-color: #E6E8EB; border-radius: 7px; box-shadow: none; }
.console-nav button:hover,
.console-nav button[aria-selected='true'] { border: 1px solid #E4E7EB; box-shadow: 0 4px 12px rgba(10, 18, 34, .045); }

.product-console--focus { min-height: 520px; }
.demo-focus-grid,
.demo-evidence-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  min-height: 474px;
}
.demo-conversation,
.demo-evidence-summary {
  padding: 34px;
  border-right: 1px solid #E5E7EB;
  background: #F7F8FA;
}
.demo-focus-title { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.demo-focus-title strong,
.demo-focus-title small { display: block; }
.demo-focus-title strong { font-size: 14px; }
.demo-focus-title small { margin-top: 3px; color: var(--c-text-muted); font-size: 10px; }
.demo-message { margin: 0 0 14px 22px; padding: 14px 16px; border: 1px solid #E4E7EB; border-radius: 8px; background: #FFFFFF; }
.demo-message strong { display: block; margin-bottom: 4px; font-size: 10px; }
.demo-message p { margin: 0; color: var(--c-text-soft); font-size: 11px; line-height: 1.55; }
.demo-message--system { margin-right: 20px; margin-left: 0; }
.demo-message--agent { border-left: 2px solid var(--c-forta); }
.demo-mission-card,
.demo-evidence-list { padding: 34px; background: #FFFFFF; }
.demo-mission-card .console-card-head { padding: 0 0 18px; border-bottom: 1px solid #E8EAED; }
.demo-mission-card .workflow-list { margin-top: 8px; }

.demo-evidence-summary { display: flex; flex-direction: column; justify-content: center; }
.demo-evidence-summary h3 { margin: 0 0 12px; font-size: 25px; line-height: 1.2; }
.demo-evidence-summary > p:not(.story-eyebrow) { margin: 0; color: var(--c-text-muted); font-size: 13px; line-height: 1.7; }
.evidence-seal { margin-top: 28px; padding: 18px; border: 1px solid #E1E4E8; background: #FFFFFF; }
.evidence-seal span,
.evidence-seal strong,
.evidence-seal small { display: block; }
.evidence-seal span { color: var(--c-forta); font-family: var(--font-mono); font-size: 9px; }
.evidence-seal strong { margin: 7px 0 3px; font-family: var(--font-mono); font-size: 12px; }
.evidence-seal small { color: var(--c-text-muted); font-size: 9px; }
.demo-evidence-list { display: grid; align-content: center; }
.evidence-record { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 74px; border-bottom: 1px solid #E8EAED; }
.evidence-record > span { color: #9AA1AC; font-family: var(--font-mono); font-size: 10px; }
.evidence-record strong,
.evidence-record small { display: block; }
.evidence-record strong { font-size: 12px; }
.evidence-record small { margin-top: 4px; color: var(--c-text-muted); font-size: 9px; }
.evidence-record b { color: var(--c-success); font-size: 9px; font-weight: 700; }

.story-trust-band { border-bottom: 1px solid #EEF0F2; background: #FBFBFC; text-align: center; }
.story-trust-band .story-shell { padding-top: 30px; padding-bottom: 34px; }
.story-trust-band p { margin: 0 0 18px; color: #747C89; font-size: 11px; }
.story-trust-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; }
.story-trust-list span { color: #59616E; font-size: 13px; font-weight: 650; }

.story-section { padding: 0; border-bottom: 1px solid #EEF0F2; background: #FFFFFF; }
.story-page--foreone #first-inspection { scroll-margin-top: 32px; }
.story-page--foreone #first-inspection .story-feature { align-items: start; }
.story-page--foreone #first-inspection .story-feature-copy h3 { margin: 0 0 8px; }
.story-section > .story-shell { padding-top: 84px; padding-bottom: 84px; }
.story-section--challenge { background: #FFFFFF; }
.story-section--solution { background: #FFFFFF; }
.story-section--agent { background: #FBFBFC; }
.story-section-head { max-width: 700px; margin: 0 auto 46px; }
.story-section-head > .story-eyebrow { display: none; }
.story-section-head h2 { font-size: clamp(30px, 3.2vw, 38px); font-weight: 650; line-height: 1.18; text-wrap: balance; }
.story-section-head p { max-width: 650px; margin-inline: auto; font-size: 15px; line-height: 1.72; text-wrap: pretty; }

.pain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 0; border-color: #E5E7EB; }
.pain-item { display: flex; min-height: 390px; flex-direction: column; padding: 0; }
.pain-item + .pain-item { border-left-color: #E5E7EB; }
.pain-visual { display: grid; min-height: 190px; align-content: center; gap: 10px; padding: 24px; border-bottom: 1px solid #E8EAED; background: #FAFAFB; }
.pain-copy { padding: 24px; }
.pain-index { margin-bottom: 28px; }
.pain-item h3 { font-size: 17px; line-height: 1.35; }
.pain-item p { font-size: 12px; line-height: 1.65; }
.pain-visual--access > div,
.pain-visual--evidence > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 0 10px; border: 1px solid #E6E8EB; border-radius: 5px; background: #FFFFFF; }
.pain-visual--access span,
.pain-visual--evidence b { color: var(--c-text-soft); font-size: 10px; font-weight: 600; }
.pain-visual--access b,
.pain-visual--evidence span { color: #8A929F; font-family: var(--font-mono); font-size: 8px; font-weight: 500; }
.mini-context-head { display: flex; justify-content: space-between; font-size: 10px; }
.mini-context-head b { color: var(--c-warning); }
.mini-context-line { display: flex; height: 56px; align-items: end; gap: 7px; padding: 0 8px 8px; border-bottom: 1px solid #DDE1E6; }
.mini-context-line i { width: 13%; border-radius: 2px 2px 0 0; background: #CDD8EC; }
.mini-context-line i:nth-child(1) { height: 24%; }
.mini-context-line i:nth-child(2) { height: 38%; }
.mini-context-line i:nth-child(3) { height: 54%; }
.mini-context-line i:nth-child(4) { height: 45%; }
.mini-context-line i:nth-child(5) { height: 76%; background: #8EB4F5; }
.mini-context-line i:nth-child(6) { height: 64%; }
.mini-context-tags { display: flex; gap: 6px; }
.mini-context-tags span { padding: 4px 7px; border: 1px solid #E3E6EA; border-radius: 4px; background: #FFFFFF; color: #7A8290; font-size: 8px; }

.story-feature { grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr); gap: 56px; padding: 46px 0; border-top: 1px solid #E6E8EB; }
.story-feature + .story-feature { margin-top: 0; }
.story-feature:last-child { border-bottom: 1px solid #E6E8EB; }
.story-feature-copy h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 650; line-height: 1.2; text-wrap: balance; }
.story-feature-copy > p { font-size: 14px; line-height: 1.74; }
.story-points { gap: 10px; }
.story-points li { font-size: 12px; }
.story-feature-visual { border-radius: 8px; box-shadow: none; }
.visual-toolbar { min-height: 44px; }
.access-flow { padding: 24px 18px; }

.agent-prompt-demo {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 0;
  padding: 24px;
  border: 1px solid #E3E5E9;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 18px 40px rgba(46, 53, 67, .08);
}
.agent-prompt-input { padding: 28px; border-right: 1px solid #E8EAED; }
.agent-prompt-input span,
.agent-prompt-input strong,
.agent-prompt-input small { display: block; }
.agent-prompt-input span { color: var(--c-forta); font-size: 12px; font-weight: 700; line-height: 1.4; }
.agent-prompt-input strong { margin: 18px 0 12px; font-size: 20px; line-height: 1.45; }
.agent-prompt-input small { color: var(--c-text-muted); font-size: 10px; }
.agent-prompt-progress { padding: 14px 28px; }
.agent-prompt-progress > div { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; min-height: 58px; border-bottom: 1px solid #E8EAED; }
.agent-prompt-progress span { color: #9AA1AC; font-family: var(--font-mono); font-size: 9px; }
.agent-prompt-progress strong { font-size: 11px; }
.agent-prompt-progress b { color: var(--c-success); font-size: 9px; }
.agent-capabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; border-top: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; background: transparent; }
.agent-capabilities article { padding: 28px 26px; }
.agent-capabilities article + article { border-left: 1px solid #E5E7EB; }
.agent-capabilities span { color: var(--story-accent); font-size: 13px; font-weight: 700; line-height: 1.4; }
.agent-capabilities h3 { margin: 20px 0 9px; font-size: 17px; line-height: 1.35; }
.agent-capabilities p { margin: 0; color: var(--c-text-muted); font-size: 13px; line-height: 1.72; }
.agent-capabilities a { display: inline-block; margin-top: 12px; color: var(--story-accent); font-weight: 650; }

.story-proof-band { padding: 0; background: #FFFFFF; }
.story-proof-band .story-shell { padding-top: 44px; padding-bottom: 44px; }
.story-proof-band .proof-grid { border-right: 1px solid #EEF0F2; border-left: 1px solid #EEF0F2; }
.story-proof-band .proof-item { padding: 12px 26px; }
.story-proof-band .proof-label { margin-bottom: 20px; }

.story-cta { padding: 0; border-top: 0; background: #FFFFFF; }
.story-cta .story-shell { padding-top: 94px; padding-bottom: 104px; }
.story-cta h2 { max-width: 650px; font-size: clamp(32px, 3.7vw, 44px); font-weight: 650; }
.story-final-preview { max-width: 760px; margin: 56px auto 0; overflow: hidden; border: 1px solid #E1E4E8; border-bottom: 0; border-radius: 8px 8px 0 0; background: #FFFFFF; box-shadow: 0 18px 44px rgba(10, 18, 34, .09); text-align: left; }
.final-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 24px; background: #FAFAFB; }
.final-preview-grid > div { padding: 12px 18px; border-right: 1px solid #E5E7EB; }
.final-preview-grid > div:last-child { border-right: 0; }
.final-preview-grid span,
.final-preview-grid strong,
.final-preview-grid small { display: block; }
.final-preview-grid span { color: var(--c-text-muted); font-size: 9px; }
.final-preview-grid strong { margin: 10px 0 3px; font-size: 24px; }
.final-preview-grid small { color: #8A929F; font-size: 9px; }

@media (max-width: 980px) {
  .story-shell { width: min(100% - 40px, var(--story-frame)); }
  .demo-focus-grid,
  .demo-evidence-grid { grid-template-columns: 1fr; }
  .demo-conversation,
  .demo-evidence-summary { border-right: 0; border-bottom: 1px solid #E5E7EB; }
}

@media (max-width: 720px) {
  .story-shell {
    width: calc(100% - 48px);
    padding-inline: 16px;
  }
  .story-hero { min-height: 510px; padding: 126px 0 34px; }
  .story-hero::before,
  .product-story-hero::before {
    height: 112px;
    background-size: 1280px 112px;
  }
  .story-hero::after {
    inset-block-start: 112px;
    background-position: left bottom;
    background-size: auto 100%;
    opacity: .66;
  }
  .story-hero h1 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.18;
    text-wrap: balance;
  }
  .story-hero h1 strong span,
  .about-hero h1 strong span { display: block; }
  .product-story-hero h1 {
    font-size: 31px;
    line-height: 1.18;
    text-wrap: balance;
  }
  .story-hero .story-lead {
    font-size: 14px;
    font-weight: 450;
    line-height: 1.6;
    text-wrap: pretty;
  }
  .story-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .story-actions .btn { width: 100%; max-width: 300px; margin-inline: auto; }
  .story-product-tabs { grid-template-columns: 1fr 1fr; }
  .story-product-tab { min-height: 50px; background: #FAFAFA; }
  .story-product-tab:nth-child(2) { border-right: 0; }
  .story-product-tab:nth-child(-n+2) { border-bottom: 1px solid #EEF0F2; }
  .story-product-panel { margin: 16px; }
  .product-console { min-height: 0; }
  .console-layout { min-height: 0; }
  .demo-conversation,
  .demo-mission-card,
  .demo-evidence-summary,
  .demo-evidence-list { padding: 22px 16px; }
  .story-trust-list { grid-template-columns: 1fr 1fr; gap: 16px 8px; }
  .story-section > .story-shell { padding-top: 64px; padding-bottom: 64px; }
  .story-section-head { margin-bottom: 38px; }
  .story-section-head h2 { font-size: 30px; }
  .pain-grid { grid-template-columns: 1fr; }
  .pain-item { min-height: 0; }
  .pain-item + .pain-item { border-top: 1px solid #E5E7EB; border-left: 0; }
  .pain-visual { min-height: 176px; }
  .story-feature { grid-template-columns: 1fr; gap: 30px; padding: 38px 0; }
  .story-feature--reverse .story-feature-copy { order: 0; }
  .story-feature--reverse .story-feature-visual { order: 1; }
  .agent-prompt-demo { grid-template-columns: 1fr; padding: 14px; }
  .agent-prompt-input { padding: 20px 16px; border-right: 0; border-bottom: 1px solid #E8EAED; }
  .agent-prompt-progress { padding: 8px 16px; }
  .agent-capabilities { grid-template-columns: 1fr; }
  .agent-capabilities article + article { border-top: 1px solid #E5E7EB; border-left: 0; }
  .story-proof-band .proof-grid { border: 0; }
  .story-proof-band .proof-item { padding: 22px 0; }
  .story-cta .story-shell { padding-top: 72px; padding-bottom: 80px; }
  .story-final-preview { margin-top: 44px; }
  .final-preview-grid { grid-template-columns: 1fr; }
  .final-preview-grid > div { border-right: 0; border-bottom: 1px solid #E5E7EB; }
  .final-preview-grid > div:last-child { border-bottom: 0; }
}

@media (max-width: 390px) {
  .story-hero h1 { font-size: 29px; }
  .story-trust-band .story-shell { padding-inline: 18px; }
  .story-trust-list span { font-size: 11px; }
  .demo-message { margin-left: 10px; }
  .demo-message--system { margin-right: 10px; margin-left: 0; }
  .evidence-record { grid-template-columns: 28px minmax(0, 1fr); }
  .evidence-record b { grid-column: 2; }
  .console-windowbar { grid-template-columns: minmax(0, 1fr); }
  .console-environment { display: none; }
}

@media (max-width: 360px) {
  .story-shell {
    width: calc(100% - 32px);
    padding-inline: 16px;
  }
  .story-hero { min-height: 540px; }
  .story-hero h1 { font-size: 30px; line-height: 1.18; }
  .product-story-hero h1 { font-size: 27px; line-height: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  .story-product-tabs.is-autoplaying .story-product-tab[aria-selected='true']::before { animation: none; }
}

@media (max-width: 720px) {
  .product-story-hero .story-feature-visual,
  .story-feature-visual--table { overflow: hidden; }
  .product-story-hero .access-flow {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .product-story-hero .access-node,
  .product-story-hero .access-node + .access-node {
    border: 1px solid var(--c-border);
    border-left: 2px solid var(--story-accent);
    text-align: left;
  }
  .product-story-hero .topology-canvas {
    min-width: 0;
    grid-template-columns: 1fr;
  }
  .evidence-table {
    min-width: 0;
    table-layout: fixed;
  }
  .evidence-table th,
  .evidence-table td {
    padding: 10px 8px;
    overflow-wrap: anywhere;
  }
  .evidence-table th:nth-child(2),
  .evidence-table td:nth-child(2) { display: none; }
}
