/* ============================================================
   OTI Design System v1
   Institutional Crest UI + Mountain Horizon System
   On Thin Ice — Elite Athlete Development Platform
   ============================================================ */

/* ── 1. Design Tokens ──────────────────────────────────────── */
:root {
  /* Navy authority */
  --oti-navy:        #0B2545;
  --oti-navy-deep:   #071828;
  --oti-navy-mid:    #123A63;
  --oti-navy-glass:  rgba(11,37,69,.06);

  /* Glacier working surfaces */
  --oti-glacier:     #F4F8FC;
  --oti-glacier-2:   #EAF2F8;
  --oti-glacier-3:   #DCE9F3;
  --oti-white:       #FFFFFF;

  /* Ice active states */
  --oti-ice:         #5CC9F5;
  --oti-ice-mid:     #3BAFD6;
  --oti-ice-deep:    #1B7FB5;
  --oti-ice-pale:    #EAF7FF;

  /* Gold — approvals, milestones */
  --oti-gold:        #C9A84C;
  --oti-gold-bright: #D4AF37;
  --oti-gold-soft:   #FFF4D8;
  --oti-gold-glass:  rgba(201,168,76,.10);
  --oti-gold-border: rgba(201,168,76,.22);

  /* Text */
  --oti-text:        #102033;
  --oti-text-2:      #2A3F55;
  --oti-muted:       #66788E;
  --oti-faint:       rgba(16,32,51,.38);

  /* Status */
  --oti-ok:          #18A36F;
  --oti-ok-bg:       rgba(24,163,111,.10);
  --oti-warn:        #C9841A;
  --oti-warn-bg:     rgba(201,132,26,.10);
  --oti-danger:      #C94A4A;
  --oti-danger-bg:   rgba(201,74,74,.10);

  /* Lines / borders */
  --oti-line:        #D8E4EF;
  --oti-line-soft:   rgba(11,37,69,.08);
  --oti-line-mid:    rgba(11,37,69,.14);

  /* Shadows */
  --oti-shadow-xs:   0 2px 6px  rgba(11,37,69,.06);
  --oti-shadow-sm:   0 6px 18px rgba(11,37,69,.08);
  --oti-shadow:      0 18px 45px rgba(11,37,69,.11);
  --oti-shadow-lg:   0 32px 80px rgba(11,37,69,.18);

  /* Ease */
  --oti-ease: cubic-bezier(0.23, 1, 0.32, 1);

  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Josefin Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', 'Fira Mono', monospace;

  /* Type scale */
  --t-xs:   11px;
  --t-sm:   13px;
  --t-md:   15px;
  --t-base: 17px;
  --t-lg:   20px;
  --t-xl:   28px;
  --t-2xl:  36px;
  --t-3xl:  48px;

  /* Spacing */
  --sp-1:  4px;  --sp-2:  8px;  --sp-3:  12px; --sp-4: 16px;
  --sp-5:  20px; --sp-6:  24px; --sp-8:  32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  /* Radii */
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 999px;

  /* Z-index */
  --z-sticky: 10;
  --z-modal:  80;
  --z-toast:  90;
}

/* ── 2. Base Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body  { margin: 0; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
button, input, textarea, select { font: inherit; }

/* ── 3. Typography ─────────────────────────────────────────── */
.oti-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.oti-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.oti-label--md {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.oti-body { font-family: var(--font-body); font-size: var(--t-base); line-height: 1.65; }
.oti-mono { font-family: var(--font-mono); font-size: var(--t-sm); }

/* ── 4. Page Layout ────────────────────────────────────────── */
.oti-page {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--t-base);
  color: var(--oti-text);
}

/* Glacier light page (approval screens, login, athlete reading view) */
.oti-page--glacier {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(92,201,245,.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 90% 10%, rgba(201,168,76,.07) 0%, transparent 60%),
    linear-gradient(180deg, var(--oti-glacier) 0%, var(--oti-white) 60%, var(--oti-glacier) 100%);
  color: var(--oti-text);
  position: relative;
  overflow-x: hidden;
}
/* Subtle mountain watermark on glacier pages */
.oti-page--glacier::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('./locked-mountains.svg') top center / 100% auto no-repeat;
  pointer-events: none;
  opacity: .52;
  z-index: 0;
}

/* Dark navy page (floor, u12, athlete) */
.oti-page--navy {
  background:
    radial-gradient(circle at 50% 0%, rgba(92,201,245,.14) 0%, transparent 30%),
    linear-gradient(180deg, #10284f 0%, #081326 60%, #050a14 100%);
  color: #faf6ee;
}

.oti-shell {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-5) var(--sp-12);
}
.oti-shell--wide  { max-width: 1120px; }
.oti-shell--narrow { max-width: 680px; }

/* ── 5. Topbar / Navigation — Glacier variant ──────────────── */
/*    Navy authority frame with mountain horizon at bottom edge */
.oti-topbar {
  position: relative;
  background: var(--oti-navy);
  padding: var(--sp-5) var(--sp-5) 0;
  z-index: var(--z-sticky);
}
.oti-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
}
.oti-topbar--wide .oti-topbar-inner { max-width: 1120px; }

/* Mountain horizon — navy peaks descending into glacier content */
/* SVG: navy-filled peaks with ice-blue ridge line, transparent between peaks */
.oti-topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 56px;
  transform: translateY(100%);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 56' preserveAspectRatio='none' fill='none'%3E%3Cpath d='M0 0L0 42L80 28L170 38L280 16L380 28L490 8L600 24L720 14L840 30L960 18L1080 34L1200 20L1320 32L1440 14L1560 26L1600 20L1600 0Z' fill='%230B2545' fill-opacity='.55'/%3E%3Cpath d='M0 0L0 56L80 36L170 48L280 22L380 36L490 12L600 30L720 18L840 38L960 24L1080 44L1200 28L1320 42L1440 20L1560 34L1600 28L1600 0Z' fill='%230B2545'/%3E%3Cpath d='M0 56L80 36L170 48L280 22L380 36L490 12L600 30L720 18L840 38L960 24L1080 44L1200 28L1320 42L1440 20L1560 34L1600 28' fill='none' stroke='%235CC9F5' stroke-opacity='.32' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M488 12L504 22L520 14' fill='none' stroke='%23EAF7FF' stroke-opacity='.5' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M718 18L734 28L750 20' fill='none' stroke='%23EAF7FF' stroke-opacity='.5' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M958 24L974 34L990 26' fill='none' stroke='%23EAF7FF' stroke-opacity='.4' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E")
    top center / 100% 100% no-repeat;
  pointer-events: none;
}

/* Add mountain-horizon spacing below topbar */
.oti-topbar + * { padding-top: calc(var(--sp-12) + 4px); }

/* ── 5b. Brand / Crest ─────────────────────────────────────── */
.oti-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}
.oti-brand-crest {
  width: 44px; height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.32)) brightness(1.06);
  flex-shrink: 0;
}
.oti-brand-crest--lg { width: 60px; height: 60px; }
.oti-brand-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: #faf6ee;
  line-height: 1;
  letter-spacing: .01em;
}
.oti-brand-copy small {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: rgba(250,246,238,.52);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ── 5c. Topbar nav actions ────────────────────────────────── */
.oti-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.oti-nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: rgba(250,246,238,.78);
  letter-spacing: .10em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s;
}
.oti-nav-chip:hover { background: rgba(255,255,255,.13); }

/* ── 6. Card System ────────────────────────────────────────── */
.oti-card {
  background: var(--oti-white);
  border: 1px solid var(--oti-line);
  border-radius: var(--r-xl);
  box-shadow: var(--oti-shadow);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.oti-card--raised {
  box-shadow: var(--oti-shadow-lg);
}
.oti-card--flat {
  box-shadow: var(--oti-shadow-xs);
}
.oti-card--glacier {
  background: linear-gradient(180deg, var(--oti-white) 0%, var(--oti-glacier) 100%);
}
.oti-card--navy {
  background: rgba(11,37,69,.06);
  border-color: var(--oti-line-mid);
}
/* Shield-geometry influence — subtle angled bottom corner */
.oti-card--crest {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

/* ── 7. Badge / Audience Pill System ───────────────────────── */
.oti-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: .10em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Audience badges */
.oti-badge--athlete   { background: #DBEAFE; color: #1E40AF; }
.oti-badge--guardian  { background: #D1FAE5; color: #065F46; }
.oti-badge--internal  { background: #FEF3C7; color: #92400E; }
.oti-badge--sponsor   { background: #EDE9FE; color: #4C1D95; }
/* Status badges */
.oti-badge--draft     { background: var(--oti-glacier-2); color: var(--oti-navy-mid); }
.oti-badge--review    { background: #FEF3C7; color: #92400E; }
.oti-badge--approved  { background: var(--oti-ok-bg); color: var(--oti-ok); }
.oti-badge--sent      { background: rgba(27,127,181,.10); color: var(--oti-ice-deep); }
.oti-badge--admin {
  background: var(--oti-glacier-2);
  color: var(--oti-muted);
  border: 1px solid var(--oti-line);
}

/* ── 8. Button System ──────────────────────────────────────── */
.oti-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: var(--t-md);
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: .02em;
}
.oti-btn:active { transform: scale(.98); }
.oti-btn:disabled { opacity: .48; cursor: not-allowed; }

.oti-btn--primary  { background: var(--oti-navy); color: #faf6ee; }
.oti-btn--primary:hover { opacity: .88; }
.oti-btn--gold     { background: var(--oti-gold); color: var(--oti-navy); }
.oti-btn--gold:hover { opacity: .90; }
.oti-btn--ice      { background: var(--oti-ice-pale); color: var(--oti-ice-deep); border: 1px solid rgba(92,201,245,.28); }
.oti-btn--soft     { background: var(--oti-glacier-2); color: var(--oti-navy); border: 1px solid var(--oti-line); }
.oti-btn--soft:hover { background: var(--oti-glacier-3); }
.oti-btn--warn     { background: #FFF3D3; color: #6F4E00; }
.oti-btn--danger   { background: var(--oti-danger-bg); color: var(--oti-danger); }
.oti-btn--ghost    { background: transparent; color: var(--oti-navy); border: 1px solid var(--oti-line-mid); }
.oti-btn--sm       { padding: 9px 16px; font-size: var(--t-sm); }

/* ── 9. Form Controls ──────────────────────────────────────── */
.oti-label {
  display: block;
  color: var(--oti-navy);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: .10em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.oti-input,
.oti-textarea,
.oti-select {
  width: 100%;
  background: var(--oti-white);
  border: 1px solid var(--oti-line-mid);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: var(--t-base);
  color: var(--oti-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.oti-input:focus,
.oti-textarea:focus,
.oti-select:focus {
  border-color: var(--oti-ice-deep);
  box-shadow: 0 0 0 4px rgba(92,201,245,.16);
}
.oti-textarea {
  resize: vertical;
  line-height: 1.7;
  min-height: 220px;
  font-size: var(--t-md);
}

/* ── 10. Meta Grid — summary pills ────────────────────────── */
.oti-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
}
.oti-meta-pill {
  background: var(--oti-glacier);
  border: 1px solid var(--oti-line);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.oti-meta-pill strong {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--oti-muted);
  letter-spacing: .10em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.oti-meta-pill span {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--oti-navy);
  line-height: 1.2;
}

/* ── 11. Status Bar ────────────────────────────────────────── */
.oti-status {
  display: none;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: var(--t-md);
  line-height: 1.55;
  margin-top: var(--sp-4);
}
.oti-status--ok      { background: var(--oti-ok-bg); color: var(--oti-ok); display: block; }
.oti-status--warn    { background: var(--oti-warn-bg); color: var(--oti-warn); display: block; }
.oti-status--err     { background: var(--oti-danger-bg); color: var(--oti-danger); display: block; }
.oti-status--visible { display: block; }

/* ── 12. Section Divider — engraving line motif ────────────── */
/* Mimics horizontal skate-engraving texture from rink surface */
.oti-divider {
  position: relative;
  height: 1px;
  background: var(--oti-line);
  margin: var(--sp-5) 0;
  border: 0;
}
.oti-divider::before {
  content: '';
  position: absolute;
  top: 3px; left: 0; right: 0;
  height: 1px;
  background: var(--oti-line-soft);
}
.oti-divider--gold {
  background: var(--oti-gold-border);
}
.oti-divider--gold::before {
  background: rgba(201,168,76,.08);
}

/* ── 13. Source Panel — admin-only dossier view ─────────────── */
.oti-source-panel {
  background: var(--oti-glacier);
  border: 1px solid var(--oti-line);
  border-left: 3px solid var(--oti-line-mid);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: var(--sp-5);
  overflow: hidden;
}
.oti-source-panel summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 13px var(--sp-5);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  color: var(--oti-muted);
  letter-spacing: .10em;
  text-transform: uppercase;
  list-style: none;
  user-select: none;
}
.oti-source-panel summary::-webkit-details-marker { display: none; }
.oti-source-panel summary::before {
  content: '▶';
  font-size: 9px;
  transition: transform .15s;
  color: var(--oti-muted);
}
.oti-source-panel[open] summary::before { transform: rotate(90deg); }
.oti-source-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
  padding: 0 var(--sp-5) var(--sp-5);
}
.oti-source-item {
  background: var(--oti-white);
  border: 1px solid var(--oti-line);
  border-radius: var(--r-sm);
  padding: 10px 13px;
}
.oti-source-item strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--oti-muted);
  letter-spacing: .10em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.oti-source-item span {
  font-size: var(--t-sm);
  color: var(--oti-text);
  font-weight: 600;
  line-height: 1.35;
}

/* ── 14. Report Display ────────────────────────────────────── */
.oti-report-panel { margin-top: var(--sp-3); }

.oti-report-audience {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* The editable textarea for report text */
.oti-report-textarea {
  width: 100%;
  background: var(--oti-white);
  border: 1px solid var(--oti-line-mid);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  font: 500 var(--t-md)/1.75 var(--font-body);
  color: var(--oti-text);
  min-height: 260px;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.oti-report-textarea:focus {
  border-color: var(--oti-ice-deep);
  box-shadow: 0 0 0 4px rgba(92,201,245,.14);
}
.oti-report-textarea[readonly] {
  background: var(--oti-glacier);
  color: var(--oti-text-2);
  cursor: default;
}

/* Read-only report body (athlete/guardian view) */
.oti-report-body {
  background: var(--oti-white);
  border: 1px solid var(--oti-line);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  line-height: 1.8;
  color: var(--oti-text);
  font-size: var(--t-base);
}
.oti-report-section { margin-bottom: var(--sp-5); }
.oti-report-section:last-child { margin-bottom: 0; }
.oti-report-section-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--oti-muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--oti-line);
}
.oti-report-section-body {
  font-size: var(--t-md);
  line-height: 1.75;
  color: var(--oti-text-2);
}

/* ── 15. Approval / Action Components ──────────────────────── */
.oti-action-bar {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  align-items: center;
}

.oti-publish-note {
  font-size: var(--t-sm);
  color: var(--oti-muted);
  background: var(--oti-glacier);
  border: 1px solid var(--oti-line);
  border-radius: var(--r-sm);
  padding: 10px var(--sp-4);
  margin-top: var(--sp-3);
  line-height: 1.6;
}
.oti-publish-note strong { color: var(--oti-text); }

.oti-token-note {
  font-size: var(--t-sm);
  color: var(--oti-muted);
  margin-top: var(--sp-3);
  line-height: 1.6;
}
.oti-token-note strong { color: var(--oti-text-2); }

/* ── 16. Readiness Strip ───────────────────────────────────── */
.oti-readiness-strip {
  display: flex;
  gap: 6px;
  align-items: center;
}
.oti-readiness-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--oti-line);
}
.oti-readiness-dot--ok      { background: var(--oti-ok); }
.oti-readiness-dot--warn    { background: var(--oti-warn); }
.oti-readiness-dot--danger  { background: var(--oti-danger); }
.oti-readiness-dot--ice     { background: var(--oti-ice); }
.oti-readiness-dot--gold    { background: var(--oti-gold); }

/* ── 17. Coach Approval form ───────────────────────────────── */
.oti-coach-note-box {
  background: var(--oti-glacier);
  border: 1px solid var(--oti-line);
  border-left: 3px solid var(--oti-line-mid);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}
.oti-coach-note-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--oti-muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.oti-coach-note-body {
  font-size: var(--t-md);
  line-height: 1.75;
  color: var(--oti-text-2);
  white-space: pre-wrap;
  margin: 0;
}

/* ── 18. Locked / gate screen ──────────────────────────────── */
.oti-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  gap: var(--sp-3);
}
.oti-locked-crest {
  width: 80px; height: 80px;
  object-fit: contain;
  margin-bottom: var(--sp-3);
  filter: opacity(.52);
}
.oti-locked h1 {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 400;
  color: var(--oti-navy);
  margin: 0;
}
.oti-locked p { color: var(--oti-muted); margin: 0; max-width: 380px; }

/* ── 19. Sign-in prompt ────────────────────────────────────── */
.oti-signin-prompt {
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
}
.oti-signin-prompt h1 {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 400;
  color: var(--oti-navy);
  margin: 0 0 var(--sp-3);
}
.oti-signin-prompt p {
  color: var(--oti-muted);
  margin: 0 0 var(--sp-5);
  line-height: 1.65;
}

/* ── 20. Utility classes ───────────────────────────────────── */
.oti-muted { color: var(--oti-muted); }
.oti-navy  { color: var(--oti-navy); }
.oti-gold  { color: var(--oti-gold); }
.oti-ice   { color: var(--oti-ice-deep); }
.oti-ok    { color: var(--oti-ok); }

.oti-text-display  { font-family: var(--font-display); font-weight: 400; }
.oti-text-mono     { font-family: var(--font-mono); }

.oti-mt-0 { margin-top: 0; }
.oti-mt-2 { margin-top: var(--sp-2); }
.oti-mt-3 { margin-top: var(--sp-3); }
.oti-mt-4 { margin-top: var(--sp-4); }
.oti-mt-5 { margin-top: var(--sp-5); }
.oti-mt-6 { margin-top: var(--sp-6); }
.oti-mb-0 { margin-bottom: 0; }
.oti-mb-2 { margin-bottom: var(--sp-2); }
.oti-mb-3 { margin-bottom: var(--sp-3); }
.oti-mb-4 { margin-bottom: var(--sp-4); }
.oti-mb-5 { margin-bottom: var(--sp-5); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 680px) {
  .oti-shell { padding: var(--sp-5) var(--sp-4) var(--sp-8); }
  .oti-topbar { padding: var(--sp-4) var(--sp-4) 0; }
  .oti-topbar-inner { padding-bottom: var(--sp-4); }
  .oti-topbar::after { height: 40px; }
  .oti-topbar + * { padding-top: calc(var(--sp-8) + 4px); }
  .oti-card { padding: var(--sp-4); }
  .oti-meta-grid { grid-template-columns: 1fr 1fr; }
  .oti-source-grid { grid-template-columns: 1fr; }
  .oti-brand-copy strong { font-size: 18px; }
  .oti-action-bar { flex-direction: column; }
  .oti-action-bar .oti-btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .oti-meta-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   21. AGE PROGRESSION VISUAL SYSTEM — OTI Design System v1.1
   One OTI system — four levels of visual intensity.
   U12 (open/light) → Build (structured) → Performance (technical)
   → Advanced (mission-control/gold)
   Mandala overlay: body.oti-group--*::after
   (body::after is safe — unused above this block)
   ══════════════════════════════════════════════════════════════ */

/* ── AP-1. Level tokens ─────────────────────────────────────── */
:root {
  /* U12 — open, ice-washed, welcoming */
  --ap-u12-from:      #E8F4FD;
  --ap-u12-to:        #FAFCFE;
  --ap-u12-accent:    var(--oti-ice);
  --ap-u12-card-bg:   rgba(255,255,255,.88);

  /* Build — structured, cool-mid gradient */
  --ap-build-from:    #D2EBF6;
  --ap-build-to:      #F0F8FD;
  --ap-build-accent:  var(--oti-ice-deep);
  --ap-build-card-bg: rgba(255,255,255,.92);

  /* Performance — technical, dark navy */
  --ap-perf-from:     #0B2545;
  --ap-perf-to:       #163660;
  --ap-perf-accent:   var(--oti-gold);
  --ap-perf-card-bg:  rgba(11,37,69,.72);

  /* Advanced — mission-control, deepest navy */
  --ap-adv-from:      #061727;
  --ap-adv-to:        #0F2747;
  --ap-adv-accent:    var(--oti-gold);
  --ap-adv-card-bg:   rgba(6,23,39,.82);
}

/* ── AP-2. Group page themes ────────────────────────────────── */
body.oti-group--u12,
body.oti-group--build,
body.oti-group--performance,
body.oti-group--advanced {
  font-family: var(--font-body);
  font-size: var(--t-base);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* U12 — glacier-lite, ice-washed */
body.oti-group--u12 {
  background:
    radial-gradient(ellipse 70% 35% at 50% 0%, rgba(92,201,245,.13) 0%, transparent 65%),
    linear-gradient(170deg, var(--ap-u12-from) 0%, var(--ap-u12-to) 100%);
  color: var(--oti-text);
}

/* Build — structured, cool mid */
body.oti-group--build {
  background:
    radial-gradient(ellipse 60% 30% at 50% 0%, rgba(92,201,245,.10) 0%, transparent 60%),
    linear-gradient(165deg, var(--ap-build-from) 0%, var(--ap-build-to) 100%);
  color: var(--oti-text);
}

/* Performance — deep navy, technical */
body.oti-group--performance {
  background:
    radial-gradient(circle at 50% 0%, rgba(92,201,245,.12) 0%, transparent 28%),
    linear-gradient(180deg, var(--ap-perf-from) 0%, var(--ap-perf-to) 100%);
  color: #E8F2FA;
}

/* Advanced — mission-control, deepest navy */
body.oti-group--advanced {
  background:
    radial-gradient(circle at 50% 0%, rgba(201,168,76,.10) 0%, transparent 25%),
    linear-gradient(180deg, var(--ap-adv-from) 0%, var(--ap-adv-to) 100%);
  color: #E4EFF8;
}

/* ── AP-3. Mandala watermark ────────────────────────────────── */
/* Light-bg groups: navy mandala strokes (locked-mandala-navy.svg) */
body.oti-group--u12::after,
body.oti-group--build::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('./locked-mandala-navy.svg') center / 84vmin no-repeat;
  pointer-events: none;
  z-index: 0;
}
body.oti-group--u12::after   { opacity: 0.07; }
body.oti-group--build::after { opacity: 0.04; }

/* Dark-bg groups: white mandala strokes (locked-mandala-light.svg) */
body.oti-group--performance::after,
body.oti-group--advanced::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('./locked-mandala-light.svg') center / 84vmin no-repeat;
  pointer-events: none;
  z-index: 0;
}
body.oti-group--performance::after { opacity: 0.025; }
body.oti-group--advanced::after    { opacity: 0.012; }

/* Suppress mountains watermark on dark group pages when oti-page--glacier
   is also present (mountains are navy — invisible on dark bg anyway but
   this keeps the ::before from adding unwanted opacity math) */
body.oti-group--performance.oti-page--glacier::before,
body.oti-group--advanced.oti-page--glacier::before { opacity: 0.08; }

/* ── AP-4. Mandala intensity utilities ──────────────────────── */
/* Reference values for component-level mandala control via CSS variable */
.oti-mandala-soft    { --mandala-opacity: 0.08; }
.oti-mandala-light   { --mandala-opacity: 0.04; }
.oti-mandala-minimal { --mandala-opacity: 0.025; }
.oti-mandala-trace   { --mandala-opacity: 0.012; }

/* ── AP-5. Mountain intensity utilities ─────────────────────── */
/* Override the locked-mountains.svg opacity on .oti-page--glacier::before */
.oti-mountain--soft   { opacity: 0.28 !important; }
.oti-mountain--light  { opacity: 0.42 !important; }
.oti-mountain--mid    { opacity: 0.60 !important; }
.oti-mountain--strong { opacity: 0.82 !important; }

/* ── AP-6. Age-level card variants ─────────────────────────── */
.oti-card--u12 {
  border-top: 3px solid var(--oti-ice);
  background: var(--ap-u12-card-bg);
}
.oti-card--build {
  border-top: 3px solid var(--oti-ice-deep);
  background: var(--ap-build-card-bg);
}
.oti-card--performance {
  background: var(--ap-perf-card-bg);
  border: 1px solid rgba(92,201,245,.16);
  color: #E8F2FA;
}
.oti-card--performance h1,
.oti-card--performance h2,
.oti-card--performance h3 { color: #EBF4FC; }
.oti-card--performance .oti-label,
.oti-card--performance .oti-muted { color: rgba(168,204,232,.66); }
.oti-card--advanced {
  background: var(--ap-adv-card-bg);
  border: 1px solid rgba(201,168,76,.20);
  color: #E4EFF8;
}
.oti-card--advanced h1,
.oti-card--advanced h2,
.oti-card--advanced h3 { color: var(--oti-gold); }
.oti-card--advanced .oti-label,
.oti-card--advanced .oti-muted { color: rgba(201,168,76,.56); }

/* ── AP-7. Age-level badge pills ────────────────────────────── */
.oti-badge--u12 {
  background: rgba(92,201,245,.14);
  color: var(--oti-ice-deep);
  border: 1px solid rgba(92,201,245,.28);
}
.oti-badge--build {
  background: rgba(27,127,181,.11);
  color: #176FA0;
  border: 1px solid rgba(27,127,181,.24);
}
.oti-badge--performance {
  background: rgba(201,168,76,.14);
  color: var(--oti-gold);
  border: 1px solid rgba(201,168,76,.28);
}
.oti-badge--advanced {
  background: rgba(201,168,76,.22);
  color: var(--oti-gold);
  border: 1px solid rgba(201,168,76,.48);
  font-weight: 700;
  letter-spacing: .04em;
}

/* ── AP-8. Logo placement rules ─────────────────────────────── */
/* U12 / Build: generous crest, soft shadow — OTI authority gentle */
.oti-logo--protected {
  width: 52px; height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(11,37,69,.14));
}
/* Performance / Advanced: compact, sharp, authoritative */
.oti-logo--mission {
  width: 44px; height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.44)) brightness(1.10);
}

/* ── AP-9. Journey progression bar ─────────────────────────── */
.oti-journey-bar {
  display: flex;
  align-items: flex-start;
  padding: var(--sp-3) 0;
}
.oti-journey-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  position: relative;
}
/* Connector line to next step */
.oti-journey-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--oti-line-mid);
  z-index: 0;
}
.oti-journey-step--past::after {
  background: var(--oti-ice-deep);
}
.oti-journey-step--active::after {
  background: linear-gradient(90deg, var(--oti-gold), var(--oti-line-mid));
}
.oti-journey-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--oti-line-mid);
  background: var(--oti-white);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.oti-journey-step--past .oti-journey-dot {
  border-color: var(--oti-ice-deep);
  background: var(--oti-ice-deep);
}
.oti-journey-step--active .oti-journey-dot {
  border-color: var(--oti-gold);
  background: var(--oti-gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,.20);
}
.oti-journey-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--oti-muted);
  text-align: center;
  line-height: 1.3;
}
.oti-journey-step--active .oti-journey-label {
  color: var(--oti-gold);
  font-weight: 600;
}
.oti-journey-step--past .oti-journey-label { color: var(--oti-ice-deep); }
