/* =========================================
   AgileAI Verify Surface — Operational CSS

   Governance Baseline: v12.0
   Current Version: v14.5
   Status: LOCKED — Operational Surface Freeze
   Surface: verify.agileai.university
   Scope: Shared Design Authority (Isolated Hosting Root)

   ---------------------------------------------------------
   OPERATIONAL FREEZE NOTICE

   This stylesheet governs the Verify surface.
   The Verify surface is a trust-critical operational interface.

   It is intentionally isolated from the evolving
   institutional presentation layer (public-site).

   DO NOT:
   - Introduce visual refinements
   - Add framework indicators
   - Add version badges
   - Modify layout spacing
   - Alter navigation structure
   - Introduce experimental styling
   - Sync cosmetic changes from other surfaces

   ONLY update if:
   - Security patch required
   - Accessibility compliance required
   - Critical layout bug detected
   - reCAPTCHA structural change required

   ---------------------------------------------------------
   Summary of Capabilities:
   - Breadcrumb structural targeting (no class dependency)
   - Footer stabilization (light + dark safe)
   - Hamburger using true center transform model
   - Perfect symmetrical X (no drift / no double-line artifact)
   - Mobile overlay + backdrop preserved
   - Mobile padding reduced (32px → 16px)
   - reCAPTCHA structural width neutralization (no scaling)
   - Prevents iframe clipping on portrait mobile devices
   - Preserves intrinsic 304px width
   - Preserves tap accuracy
   - No layout, navigation logic, or DOM structure changes

   ---------------------------------------------------------
   This file is intentionally boring.
   Boring is stable.
   Stable builds trust.
========================================= */


/* =========================================================
   1. ROOT VARIABLES
   Design Tokens — DO NOT ALTER WITHOUT GOVERNANCE REVIEW
========================================================= */

:root {
  --text-primary: #111111;
  --text-secondary: #555555;
  --border-subtle: #e6e6e6;
  --background: #ffffff;
  --surface-muted: #f6f6f6;
  --surface-elevated: rgba(255,255,255,0.96);

  --max-width: 720px;
  --header-height: 80px;

  --transition-speed-fast: 120ms;
  --transition-speed-standard: 180ms;
  --motion-standard: cubic-bezier(.4,0,.2,1);

  --link-color: #2c4f68;
  --link-hover: #1d3648;
}

/* Dark Theme Support — Operationally Safe */

:root[data-theme="dark"] {
  --text-primary: #f2f2f2;
  --text-secondary: #c2c7d0;
  --border-subtle: #2a2a2a;
  --background: #0f1115;
  --surface-muted: #161b24;
  --surface-elevated: rgba(27,31,38,0.96);

  --link-color: #8fb9dd;
  --link-hover: #b7d4f0;
}


/* =========================================================
   2. BASE ELEMENTS
   Core typography & structural stability
========================================================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.72;
  transition:
    background var(--transition-speed-standard),
    color var(--transition-speed-standard);
}

/* Prevent background scroll when mobile navigation is open */
body.nav-open { overflow: hidden; }


/* =========================================================
   3. HEADER — Fixed Institutional Header
   No visual experimentation allowed
========================================================= */

#header { width: 100%; }

.site-header {
  width: 100%;
  height: var(--header-height);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--background);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .brand a {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.25px;
  color: var(--text-primary);
  text-decoration: none;
}

.site-header .brand a:hover { opacity: 0.85; }


/* =========================================================
   4. NAVIGATION (DESKTOP)
   Stable top navigation — DO NOT RESTYLE
========================================================= */

.main-nav { position: relative; }

.nav-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  align-items: center;
}

.main-nav a {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.25px;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--transition-speed-fast) var(--motion-standard);
}

.main-nav a:hover { opacity: 0.8; }

.main-nav a.is-active {
  font-weight: 600;
  position: relative;
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}


/* =========================================================
   5. LAYOUT CONTAINER
   Central content constraint — DO NOT MODIFY SPACING
========================================================= */

main {
  max-width: var(--max-width);
  margin: 140px auto 0;
  padding: 0 32px 80px;
}


/* =========================================================
   6. BREADCRUMB — Structural Target
   Classless targeting to avoid markup dependency
========================================================= */

main > *:first-child a {
  color: var(--text-secondary);
  text-decoration: underline;
  font-size: 0.95rem;
}

main > *:first-child a:hover {
  color: var(--text-primary);
}

:root[data-theme="dark"] main > *:first-child a {
  color: var(--text-secondary);
}

:root[data-theme="dark"] main > *:first-child a:hover {
  color: var(--text-primary);
}


/* =========================================================
   7. FOOTER — Minimal & Stable
   No institutional evolution allowed here
========================================================= */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 72px 32px;
  background: var(--surface-muted);
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.site-footer a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition-speed-fast);
}

.site-footer a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

:root[data-theme="dark"] .site-footer {
  background: rgba(20,26,38,0.95);
}


/* =========================================================
   8. THEME TOGGLE
   Minimal functional control
========================================================= */

.theme-control button {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


/* =========================================================
   9. HAMBURGER — True Center Transform Model
   Perfect symmetry preserved
========================================================= */

.site-header .nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 24px;
  position: relative;
}

.nav-hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  top: 50%;
  transform-origin: center;
  transition:
    transform var(--transition-speed-standard) var(--motion-standard),
    opacity var(--transition-speed-fast);
}

.nav-hamburger span:nth-child(1) { transform: translateY(-8px); }
.nav-hamburger span:nth-child(2) { transform: translateY(0); }
.nav-hamburger span:nth-child(3) { transform: translateY(8px); }

body.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

body.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}


/* =========================================================
   10. MOBILE (≤768px)
   reCAPTCHA Structural Protection
   CRITICAL: Do not alter containment logic
========================================================= */

@media (max-width: 768px) {

  main {
    padding: 0 16px 80px;
  }

  .header-inner { padding: 0 20px; }

  .site-header .nav-hamburger { display: block; }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed-standard);
    z-index: 5500;
  }

  body.nav-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav {
    position: fixed;
    top: calc(var(--header-height) - 1px);
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--surface-elevated);
    border-top: 1px solid var(--border-subtle);
    padding: 28px 24px;
    z-index: 6000;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity var(--transition-speed-standard),
      transform var(--transition-speed-standard);
  }

  body.nav-open .main-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-tree {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .nav-tree li { width: 100%; }

  .nav-tree a {
    display: block;
    width: 100%;
    font-size: 1rem;
  }

  .nav-tree a.is-active {
    font-weight: 600;
    border-bottom: 1px solid var(--text-primary);
    padding-bottom: 6px;
  }

  /* reCAPTCHA containment safeguard */

  .verify-recaptcha {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    display: flex;
    justify-content: center;
    padding-bottom: 4px;
    position: relative;
    z-index: 10;
  }

  .g-recaptcha {
    min-width: 304px;
    transform: none !important;
    position: relative;
    z-index: 10;
  }

  body:not(.nav-open)::before {
    pointer-events: none !important;
  }
}