/* shared foundation for CASUX institutional docs site */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --panel: #eef3fa;
  --text: #172033;
  --muted: #526173;
  --border: #d9e1ee;
  --primary: #2454d8;
  --primary-deep: #173b9a;
  --accent: #00a7b5;
  --accent-warm: #a47a3a;
  --success: #20704a;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.08);
  --shadow-soft: 0 8px 22px rgba(23, 32, 51, 0.06);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --measure: 68ch;
  --content-width: 1180px;
  --header-h: 76px;
  --gutter: clamp(1rem, 2.2vw, 1.75rem);
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 0.875rem;
  --space-4: 1.125rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 3.75rem;
  --space-9: 5rem;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(36, 84, 216, 0.07), transparent 26%),
              radial-gradient(circle at top right, rgba(0, 167, 181, 0.07), transparent 22%),
              var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', 'Noto Sans SC', system-ui, sans-serif;
  letter-spacing: 0;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--primary); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 80%, white);
  outline-offset: 3px;
}

h1, h2, h3, h4, .section-title, .hero h1, .display {
  margin: 0;
  font-family: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

p { margin: 0; }
small, .fineprint { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 999;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.site-shell, .site-header, .site-footer, .page, .content-wrap {
  width: min(var(--content-width), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.header-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: 0.95rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--border) 82%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, rgba(255,255,255,0.38));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  text-decoration: none;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.8rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 82%, white), color-mix(in srgb, var(--accent) 64%, white));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  flex: 0 0 auto;
}
.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand-meta {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1vw, 1rem);
  flex-wrap: wrap;
}
.nav-link, .nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.62rem 0.94rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav-link:hover, .nav-button:hover {
  background: color-mix(in srgb, var(--panel) 78%, white);
  border-color: color-mix(in srgb, var(--border) 84%, white);
  color: var(--primary-deep);
}
.nav-link[aria-current="page"] {
  background: color-mix(in srgb, var(--primary) 12%, white);
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  color: var(--primary-deep);
}
.nav-utilities { display: inline-flex; align-items: center; gap: 0.45rem; }
.locale-switch { display: inline-flex; align-items: center; gap: 0.4rem; padding-left: 0.5rem; border-left: 1px solid var(--border); }

.page { padding: clamp(1rem, 2vw, 1.5rem) 0 var(--space-9); }

.docs-home, .page-section, .surface-block, .section-block {
  margin-top: var(--space-7);
}

.docs-workspace {
  display: grid;
  gap: var(--space-6);
  padding: clamp(1.2rem, 2vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 6px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, white), color-mix(in srgb, var(--panel) 48%, white));
  box-shadow: var(--shadow);
}

.workspace-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem 1.4rem;
}
.kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 84%, white);
  color: var(--primary-deep);
  border: 1px solid color-mix(in srgb, var(--border) 85%, white);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.kicker::before, .eyebrow::before {
  content: '';
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, white);
}

.hero, .lead-band {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
.hero h1, .lead-band h1 {
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  max-width: 13ch;
}
.hero p, .lead-band p, .section-lead {
  max-width: var(--measure);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  color: var(--muted);
}
.hero-actions, .action-row, .support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.button, .btn, .button-primary, .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.78rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.button-primary, .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: white;
  box-shadow: 0 12px 24px rgba(36, 84, 216, 0.18);
}
.button-secondary, .btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.button:hover, .btn:hover { transform: translateY(-1px); }

.index-rail, .docs-index-rail, .reference-index, .guide-stack, .quickstart-strip, .reference-matrix, .support-card, .info-card, .detail-card, .proof-card, .resource-card, .module-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.index-rail, .reference-index, .guide-stack, .quickstart-strip, .reference-matrix, .support-card {
  padding: clamp(1rem, 1.7vw, 1.35rem);
}

.search-bar, .docs-search {
  display: grid;
  gap: 0.65rem;
}
.search-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--panel));
  color: var(--text);
  font: inherit;
}
.search-input::placeholder { color: color-mix(in srgb, var(--muted) 85%, white); }

.stack, .guide-list, .resource-list, .link-list, .detail-list, .meta-list, .nav-list {
  display: grid;
  gap: 0.85rem;
}

.card-grid, .cards, .reference-grid, .module-grid, .resource-grid, .cta-grid, .two-up, .three-up, .four-up {
  display: grid;
  gap: var(--space-4);
}
.card-grid, .reference-grid, .resource-grid, .module-grid, .cta-grid, .two-up, .three-up, .four-up {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.card, .reference-card, .module-card, .resource-card, .detail-card, .info-card, .proof-card {
  padding: clamp(1rem, 1.6vw, 1.35rem);
}

.card h3, .reference-card h3, .module-card h3, .resource-card h3, .detail-card h3 { font-size: clamp(1.02rem, 1.7vw, 1.2rem); }
.card p, .reference-card p, .module-card p, .resource-card p, .detail-card p { color: var(--muted); }

.span-12 { grid-column: 1 / -1; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.mono, code, pre, kbd, .code-inline, .spec-value {
  font-family: 'JetBrains Mono', 'Source Code Pro', ui-monospace, monospace;
  letter-spacing: 0;
}
code, .code-inline {
  padding: 0.16rem 0.4rem;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--panel) 78%, white);
  border: 1px solid color-mix(in srgb, var(--border) 90%, white);
}
pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: #101828;
  color: #e8eef9;
  border: 1px solid rgba(255,255,255,.08);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.responsive-table th, .responsive-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.responsive-table th { background: color-mix(in srgb, var(--panel) 70%, white); font-weight: 700; }

.definition-list {
  display: grid;
  grid-template-columns: minmax(8rem, 18rem) minmax(0, 1fr);
  gap: 0.75rem 1.2rem;
}
.definition-list dt {
  color: var(--muted);
  font-weight: 600;
}
.definition-list dd {
  margin: 0;
  color: var(--text);
}

.pill-row, .tag-row, .chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill, .tag, .chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 84%, var(--panel));
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.footer {
  margin-top: var(--space-9);
  padding: var(--space-7) 0 2.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 88%, white);
}
.footer-shell {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1.1rem, 1.7vw, 1.45rem);
  border-radius: calc(var(--radius-lg) + 4px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, white), color-mix(in srgb, var(--panel) 46%, white));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.footer-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
}
.footer-links, .footer-notes, .footer-contacts {
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
}
.footer small { color: var(--muted); }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.support-cta {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.25rem;
}
.support-band {
  display: grid;
  gap: 0.65rem;
  padding: clamp(1rem, 1.8vw, 1.35rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, white), color-mix(in srgb, var(--accent) 8%, white));
  border: 1px solid color-mix(in srgb, var(--border) 78%, white);
}

.section-head {
  display: grid;
  gap: 0.65rem;
  margin-bottom: var(--space-4);
  max-width: var(--measure);
}
.section-title { font-size: clamp(1.4rem, 2.4vw, 2.05rem); }
.section-note, .section-meta { color: var(--muted); }

.proof-rail, .metric-strip {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.metric {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 88%, var(--panel));
  border: 1px solid var(--border);
}
.metric strong {
  font-size: 1.35rem;
  line-height: 1.1;
}
.metric span { color: var(--muted); }

.compact-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.list-link, .resource-link {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--panel));
  text-decoration: none;
}
.list-link:hover, .resource-link:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.list-link strong, .resource-link strong { display: block; margin-bottom: 0.22rem; }
.list-link span, .resource-link span { color: var(--muted); }

.page-intro {
  display: grid;
  gap: 0.9rem;
  max-width: 72rem;
}
.page-intro p { max-width: var(--measure); color: var(--muted); }

@media (max-width: 1040px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .span-8, .span-7, .span-6, .span-5, .span-4, .span-3 { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --header-h: 70px; }
  .site-header { margin-top: 0.5rem; }
  .header-bar { padding: 0.85rem 0.9rem; border-radius: 1.25rem; flex-wrap: wrap; justify-content: center; }
  .brand { flex: 1 1 100%; justify-content: center; }
  .site-nav { width: 100%; justify-content: center; }
  .nav-utilities { width: 100%; justify-content: center; }
  .locale-switch { padding-left: 0; border-left: 0; }
  .hero h1, .lead-band h1 { max-width: 16ch; }
  .definition-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --gutter: 0.8rem; }
  .page { padding-top: 0.75rem; }
  .docs-workspace, .index-rail, .reference-index, .guide-stack, .quickstart-strip, .reference-matrix, .support-card, .footer-shell { border-radius: 18px; }
  .header-bar { gap: 0.6rem; }
  .nav-link, .nav-button { padding-inline: 0.8rem; }
  .hero h1, .lead-band h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .button, .btn { width: 100%; }
  .hero-actions, .action-row, .support-actions { width: 100%; }
  .hero-actions > *, .action-row > *, .support-actions > * { flex: 1 1 100%; }
  .metric strong { font-size: 1.2rem; }
  .responsive-table { min-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* runtime-stock-media-module */
.shpitto-stock-media {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.shpitto-stock-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.75rem;
}
.shpitto-stock-media figcaption {
  margin: 0;
  color: var(--muted, #52606d);
  font-size: 0.95rem;
  line-height: 1.55;
}
.shpitto-stock-media--enterprise-proof {
  max-width: 42rem;
}
.proof-strip .shpitto-stock-media--enterprise-proof {
  margin-inline: auto;
}
.proof-strip .shpitto-stock-media--enterprise-proof img {
  aspect-ratio: 5 / 3;
  border-radius: 0.5rem;
  border: 1px solid var(--line, #e0e0e0);
}
.proof-strip .shpitto-stock-media--enterprise-proof figcaption {
  max-width: 52ch;
}
.enterprise-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(28rem, 68vh, 44rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.enterprise-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 27, 54, 0.78) 0%, rgba(7, 27, 54, 0.52) 42%, rgba(7, 27, 54, 0.18) 100%);
  z-index: 1;
}
.enterprise-hero .shell-inner,
.enterprise-hero .masthead-stack,
.enterprise-hero .enterprise-hero__content,
.enterprise-hero .enterprise-proof-row {
  position: relative;
  z-index: 2;
}
.enterprise-hero .enterprise-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  max-width: none;
}
.enterprise-hero .enterprise-hero__media .media-cover,
.enterprise-hero .enterprise-hero__media picture {
  width: 100%;
  height: 100%;
  display: block;
}
.enterprise-hero .enterprise-hero__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  border: 0;
}
.enterprise-hero .enterprise-hero__content {
  max-width: 44rem;
  color: white;
}
.enterprise-hero .enterprise-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.enterprise-hero .enterprise-proof-row > * {
  backdrop-filter: blur(8px);
  background: rgba(7, 27, 54, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
}
.masthead--single-column .masthead-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
}
.masthead--single-column .panel,
.masthead--single-column .proof-panel {
  max-width: 44rem;
}
.detail-layout .shpitto-stock-media,
.detail-grid .shpitto-stock-media {
  max-width: 32rem;
}
@media (max-width: 48rem) {
  .shpitto-stock-media--enterprise-proof,
  .detail-layout .shpitto-stock-media,
  .detail-grid .shpitto-stock-media {
    max-width: 100%;
  }
}
.page-title--measure {
  max-width: 20ch;
}
.proof-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.proof-figure {
  margin: 0;
  overflow: hidden;
}
.proof-figure__image {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.proof-figure__caption {
  padding: var(--space-4, 1rem);
  color: var(--text-subtle, #525252);
  font-size: 0.95rem;
}
.section-row--capability {
  align-items: end;
  margin-bottom: 1rem;
}
.section-row--cta {
  flex-wrap: wrap;
  align-items: center;
}
.stack--measure {
  max-width: 47.5rem;
}
.cta-surface {
  background: var(--surface);
}
.stack--section-intro {
  margin-bottom: var(--space-5);
}