/* ===========================================================================
   THE ELEVATION CHURCH — AI MINISTRY
   AI Project Reporting & Governance Portal — design system

   Layered on top of Bootstrap 5 (grid + a few components only). Everything
   visual — colour, type, spacing, cards, motion — is defined here so the
   portal reads as a custom TEC product rather than a Bootstrap template.

   Brand colours are sampled from The Elevation Church logo:
   deep navy wordmark, ascending green figure, water-blue swoosh.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------------- */
:root {
  /* Brand */
  --tec-navy:        #17355f;
  --tec-navy-800:    #102744;
  --tec-navy-900:    #0b1c33;
  --tec-blue:        #2c6ca6;
  --tec-blue-300:    #6ba3cf;
  --tec-sky:         #a8d5ea;
  --tec-sky-100:     #e7f2f9;
  --tec-green:       #6eb945;
  --tec-green-600:   #55a032;
  --tec-green-100:   #eaf5e2;

  /* Ink & surfaces */
  --tec-ink:         #1b2129;
  --tec-body:        #364353;
  --tec-muted:       #66768a;
  --tec-line:        #e3e9f0;
  --tec-line-strong: #cfd9e5;
  --tec-wash:        #f5f8fb;
  --tec-cream:       #fbfaf6;
  --tec-white:       #ffffff;

  /* Status */
  --tec-amber:       #b7791f;
  --tec-amber-bg:    #fdf6e7;
  --tec-danger:      #b32d25;
  --tec-danger-bg:   #fdf1ef;
  --tec-success:     #2f7d32;
  --tec-success-bg:  #edf7ed;

  /* Type */
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(16, 39, 68, .05), 0 1px 3px rgba(16, 39, 68, .04);
  --shadow:    0 2px 4px rgba(16, 39, 68, .04), 0 8px 24px rgba(16, 39, 68, .06);
  --shadow-lg: 0 12px 40px rgba(16, 39, 68, .12);

  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Layout */
  --header-h: 76px;
}

/* ---------------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--tec-body);
  background: var(--tec-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

h1, h2, h3, h4, .display-serif {
  font-family: var(--font-display);
  color: var(--tec-navy);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.18;
}

h5, h6 { font-family: var(--font-sans); color: var(--tec-navy); font-weight: 600; }

p { margin-bottom: 1rem; }

a { color: var(--tec-blue); text-decoration-color: rgba(44, 108, 166, .35); text-underline-offset: 3px; }
a:hover { color: var(--tec-navy); }

::selection { background: var(--tec-green-100); color: var(--tec-navy-900); }

:focus-visible {
  outline: 3px solid var(--tec-blue-300);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--tec-navy); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* Utility type ------------------------------------------------------------- */
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tec-green-600); margin-bottom: .85rem; display: block;
}
.eyebrow--muted { color: var(--tec-muted); }
.eyebrow--light { color: var(--tec-sky); }

.lede { font-size: 1.15rem; line-height: 1.62; color: var(--tec-body); }
.text-muted-tec { color: var(--tec-muted) !important; }
.measure { max-width: 62ch; }
.measure-narrow { max-width: 48ch; }

.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section--wash { background: var(--tec-wash); }
.section--cream { background: var(--tec-cream); }
.section--navy { background: var(--tec-navy); color: rgba(255,255,255,.86); }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-bottom: 1rem; }

.rule-accent {
  width: 52px; height: 3px; border-radius: 2px; margin-bottom: 1.5rem;
  background: linear-gradient(90deg, var(--tec-green) 0%, var(--tec-blue) 100%);
}

/* ---------------------------------------------------------------------------
   3. Buttons
   --------------------------------------------------------------------------- */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  border-radius: 10px;
  padding: .72rem 1.4rem;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  border-width: 1.5px;
}
.btn:active { transform: translateY(1px); }

.btn-tec {
  background: var(--tec-navy); border-color: var(--tec-navy); color: #fff;
  box-shadow: 0 1px 2px rgba(11,28,51,.18);
}
.btn-tec:hover, .btn-tec:focus { background: var(--tec-navy-800); border-color: var(--tec-navy-800); color: #fff; box-shadow: var(--shadow); }

.btn-tec-green { background: var(--tec-green-600); border-color: var(--tec-green-600); color: #fff; }
.btn-tec-green:hover, .btn-tec-green:focus { background: #468828; border-color: #468828; color: #fff; }

.btn-tec-outline {
  background: transparent; border-color: var(--tec-line-strong); color: var(--tec-navy);
}
.btn-tec-outline:hover, .btn-tec-outline:focus { border-color: var(--tec-navy); background: var(--tec-white); color: var(--tec-navy); box-shadow: var(--shadow-sm); }

.btn-tec-ghost { background: transparent; border-color: transparent; color: var(--tec-navy); padding-left: .5rem; padding-right: .5rem; }
.btn-tec-ghost:hover { color: var(--tec-blue); }

.btn-on-navy { background: #fff; border-color: #fff; color: var(--tec-navy); }
.btn-on-navy:hover, .btn-on-navy:focus { background: var(--tec-sky-100); border-color: var(--tec-sky-100); color: var(--tec-navy-900); }

.btn-on-navy-outline { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn-on-navy-outline:hover, .btn-on-navy-outline:focus { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

.btn-lg-tec { padding: .95rem 1.9rem; font-size: 1.02rem; }

.btn-arrow::after {
  content: "→"; display: inline-block; margin-left: .55rem;
  transition: transform .2s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------------------------------------------------------------------------
   4. Site header
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--tec-line); box-shadow: 0 1px 12px rgba(16,39,68,.05); }

.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
.tec-logo { height: 42px; width: auto; display: block; }
.tec-logo-fallback {
  font-family: var(--font-display); font-size: 1.05rem; color: var(--tec-navy); font-weight: 600; letter-spacing: .02em;
}
.brand__divider { width: 1px; height: 26px; background: var(--tec-line-strong); }
.brand__label {
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tec-muted); line-height: 1.3;
}
.brand__label strong { display: block; color: var(--tec-navy); letter-spacing: .06em; }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a.nav-link-tec {
  font-size: .92rem; font-weight: 500; color: var(--tec-body); padding: .55rem .9rem;
  border-radius: 8px; text-decoration: none; transition: color .16s var(--ease), background-color .16s var(--ease);
  white-space: nowrap;
}
.site-nav a.nav-link-tec:hover { color: var(--tec-navy); background: var(--tec-wash); }
.site-nav a.nav-link-tec.is-active { color: var(--tec-navy); font-weight: 600; }

.nav-toggle {
  display: none; border: 1px solid var(--tec-line-strong); background: #fff;
  border-radius: 8px; padding: .5rem .65rem; line-height: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--tec-navy); border-radius: 2px; }
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 991.98px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: #fff; border-bottom: 1px solid var(--tec-line);
    padding: .75rem 1rem 1.25rem; box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav .btn { width: 100%; margin-top: .5rem; }
  .brand__divider, .brand__label { display: none; }
}

/* ---------------------------------------------------------------------------
   5. Hero
   --------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--tec-cream) 0%, #ffffff 62%);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(46rem 26rem at 78% 8%, rgba(168, 213, 234, .28), transparent 62%),
    radial-gradient(34rem 22rem at 8% 88%, rgba(110, 185, 69, .12), transparent 65%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -.028em;
  margin-bottom: 1.35rem;
}
/* Highlighter band. Percentages resolve against the inline box (which follows
   font-size, not line-height), so the band is placed to straddle the baseline
   rather than sit below the text. */
.hero h1 .accent {
  background-image: linear-gradient(180deg,
    transparent 54%,
    rgba(110,185,69,.34) 54%,
    rgba(110,185,69,.34) 92%,
    transparent 92%);
  padding: 0 .08em;
}
.hero__sub { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--tec-body); max-width: 34rem; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2.75rem;
  padding-top: 1.75rem; border-top: 1px solid var(--tec-line);
}
.hero__meta-item { display: flex; flex-direction: column; }
.hero__meta-item dt { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tec-muted); font-weight: 600; }
.hero__meta-item dd { font-family: var(--font-display); font-size: 1.05rem; color: var(--tec-navy); margin: .2rem 0 0; }

/* Network visual — many projects converging into one register ---------------- */
.network-visual { width: 100%; height: auto; overflow: visible; }
.network-visual .nv-link { stroke: var(--tec-blue-300); stroke-width: 1.25; fill: none; opacity: .45; stroke-linecap: round; }
.network-visual .nv-node { fill: #fff; stroke: var(--tec-blue-300); stroke-width: 1.5; }
.network-visual .nv-node--green { stroke: var(--tec-green); }
.network-visual .nv-hub { fill: var(--tec-navy); }
.network-visual .nv-hub-ring { fill: none; stroke: var(--tec-navy); opacity: .16; }
.network-visual .nv-label { font-family: var(--font-sans); font-size: 9.5px; font-weight: 600; fill: var(--tec-muted); letter-spacing: .06em; text-transform: uppercase; }
.network-visual .nv-hub-label { font-family: var(--font-sans); font-size: 10px; font-weight: 700; fill: #fff; letter-spacing: .08em; }

@media (prefers-reduced-motion: no-preference) {
  .network-visual .nv-link { stroke-dasharray: 4 5; animation: nv-flow 14s linear infinite; }
  .network-visual .nv-node { animation: nv-breathe 5s ease-in-out infinite; transform-origin: center; }
  .network-visual .nv-node:nth-of-type(2n) { animation-delay: -1.4s; }
  .network-visual .nv-node:nth-of-type(3n) { animation-delay: -2.7s; }
  .network-visual .nv-hub-ring { animation: nv-pulse 4.5s ease-out infinite; transform-origin: center; }
  .network-visual .nv-hub-ring--2 { animation-delay: -2.2s; }
}
@keyframes nv-flow   { to { stroke-dashoffset: -90; } }
@keyframes nv-breathe{ 0%,100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes nv-pulse  { 0% { transform: scale(.72); opacity: .3; } 100% { transform: scale(1.25); opacity: 0; } }

/* ---------------------------------------------------------------------------
   6. Cards
   --------------------------------------------------------------------------- */
.tec-card {
  background: #fff;
  border: 1px solid var(--tec-line);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  height: 100%;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.tec-card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--tec-line-strong); }
.tec-card h3 { font-size: 1.22rem; margin-bottom: .6rem; }
.tec-card p:last-child { margin-bottom: 0; }

.tec-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tec-sky-100); color: var(--tec-blue); margin-bottom: 1.15rem;
}
.tec-card__icon svg { width: 21px; height: 21px; }
.tec-card__icon--green { background: var(--tec-green-100); color: var(--tec-green-600); }

/* Tier cards ---------------------------------------------------------------- */
.tier-card {
  position: relative; background: #fff; border: 1px solid var(--tec-line);
  border-radius: var(--radius-lg); padding: 2rem 1.85rem 1.85rem; height: 100%; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tier-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--tier-accent, var(--tec-line-strong)); }
.tier-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tier-card--1 { --tier-accent: var(--tec-sky); }
.tier-card--2 { --tier-accent: var(--tec-blue); }
.tier-card--3 { --tier-accent: var(--tec-green); }

.tier-card__number {
  font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tec-muted); margin-bottom: .35rem;
}
.tier-card__title { font-size: 1.5rem; margin-bottom: 1.1rem; }
.tier-card__list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.tier-card__list li {
  position: relative; padding-left: 1.35rem; font-size: .93rem; color: var(--tec-body);
  margin-bottom: .45rem; line-height: 1.5;
}
.tier-card__list li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--tier-accent);
}
.tier-card__label {
  margin-top: auto; display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  padding: .5rem .85rem; border-radius: 999px;
  background: var(--tec-wash); color: var(--tec-navy); border: 1px solid var(--tec-line);
}
.tier-card--3 .tier-card__label { background: var(--tec-green-100); border-color: rgba(110,185,69,.35); color: #33601c; }

/* Principles ---------------------------------------------------------------- */
.principle {
  display: flex; gap: 1.15rem; padding: 1.5rem; background: #fff;
  border: 1px solid var(--tec-line); border-radius: var(--radius); height: 100%;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.principle:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--tec-line-strong); }
.principle__num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  background: var(--tec-navy); color: #fff;
}
.principle h3 { font-size: 1.05rem; margin-bottom: .35rem; font-family: var(--font-sans); font-weight: 600; }
.principle p { font-size: .9rem; line-height: 1.55; margin: 0; color: var(--tec-muted); }

/* Data classification ------------------------------------------------------- */
.data-card {
  position: relative; border-radius: var(--radius-lg); padding: 1.75rem;
  border: 1px solid var(--tec-line); background: #fff; height: 100%;
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
/* The framework's own wording sits on a common baseline across all four cards. */
.data-card__rule { margin-top: auto !important; }
.data-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.data-card__tag {
  display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 6px; margin-bottom: 1rem;
}
.data-card--ok       .data-card__tag { background: var(--tec-sky-100);   color: #17557d; }
.data-card--internal .data-card__tag { background: var(--tec-wash);      color: var(--tec-navy); }
.data-card--caution  .data-card__tag { background: var(--tec-amber-bg);  color: var(--tec-amber); }
.data-card--critical .data-card__tag { background: rgba(255,255,255,.16); color: #fff; }

.data-card p { font-size: .92rem; margin-bottom: .9rem; }
.data-card__rule {
  font-size: .85rem; padding-top: .9rem; border-top: 1px dashed var(--tec-line-strong);
  color: var(--tec-muted); margin: 0;
}

.data-card--critical {
  background: linear-gradient(155deg, #7d2620 0%, #5c1a16 100%);
  border-color: #5c1a16; color: rgba(255,255,255,.9);
  box-shadow: 0 12px 34px rgba(124,38,32,.24);
}
.data-card--critical h3 { color: #fff; }
.data-card--critical .data-card__rule { color: rgba(255,255,255,.78); border-top-color: rgba(255,255,255,.22); }
.data-card--critical .data-card__warning {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 1.1rem;
  background: rgba(255,255,255,.14); color: #ffd9a0;
}
.data-card--critical .data-card__warning svg { width: 22px; height: 22px; }

/* Process / how it works ---------------------------------------------------- */
.process { position: relative; }
.process__track { display: grid; gap: 1rem; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.process__step { position: relative; padding-top: 2.75rem; }
.process__step::before {
  content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px;
  background: var(--tec-line-strong);
}
.process__step:first-child::before { left: 50%; border-radius: 2px 0 0 2px; }
.process__step:last-child::before  { right: 50%; border-radius: 0 2px 2px 0; }
.process__dot {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2px solid var(--tec-blue); z-index: 1;
  display: grid; place-items: center;
  font-size: .62rem; font-weight: 700; color: var(--tec-navy);
}
.process__step:nth-child(n+5) .process__dot { border-color: var(--tec-green); }
.process__step h3 { font-size: .98rem; font-family: var(--font-sans); font-weight: 600; margin-bottom: .3rem; text-align: center; }
.process__step p { font-size: .82rem; color: var(--tec-muted); text-align: center; margin: 0; line-height: 1.45; }

@media (max-width: 991.98px) {
  .process__track { grid-template-columns: 1fr; gap: 0; }
  .process__step { padding: 0 0 1.75rem 3rem; text-align: left; }
  .process__step::before { top: 0; bottom: 0; left: 9px; right: auto; width: 2px; height: auto; }
  .process__step:first-child::before { top: 10px; left: 9px; }
  .process__step:last-child::before { bottom: auto; height: 10px; }
  .process__dot { top: 0; left: 0; transform: none; }
  .process__step h3, .process__step p { text-align: left; }
}

/* Stat / callout ------------------------------------------------------------ */
.callout {
  border-left: 3px solid var(--tec-green); background: var(--tec-wash);
  padding: 1.15rem 1.35rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem;
}
.callout--navy { border-left-color: var(--tec-blue); }
.callout strong { color: var(--tec-navy); }

.pill-quote {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: 1.02rem; color: var(--tec-navy);
  background: #fff; border: 1px solid var(--tec-line); border-radius: 999px;
  padding: .6rem 1.25rem; box-shadow: var(--shadow-sm);
}
.pill-quote .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tec-green); flex: 0 0 auto; }

/* ---------------------------------------------------------------------------
   7. Final CTA band + footer
   --------------------------------------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, var(--tec-navy) 0%, var(--tec-navy-900) 100%);
  color: #fff; border-radius: var(--radius-xl);
  padding: clamp(2.75rem, 6vw, 4.5rem);
}
.cta-band::after {
  content: ""; position: absolute; right: -12%; top: -40%;
  width: 34rem; height: 34rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(110,185,69,.22) 0%, transparent 62%);
  pointer-events: none;
}
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,.8); }
.cta-band > * { position: relative; z-index: 1; }

.site-footer { background: var(--tec-navy-900); color: rgba(255,255,255,.62); padding: 3.5rem 0 2rem; font-size: .9rem; }
.site-footer h4 { color: #fff; font-family: var(--font-sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
/* The supplied logo is a full-colour asset on a light ground, so on the dark
   footer it sits on its own white chip rather than being filtered — inverting
   it would destroy the brand colours. */
.site-footer .tec-logo {
  height: 38px; background: #fff; padding: 7px 12px; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.site-footer .tec-logo-fallback { color: #fff; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .82rem; }

/* ---------------------------------------------------------------------------
   8. Governance briefing (/register)
   --------------------------------------------------------------------------- */
.briefing { background: var(--tec-wash); min-height: calc(100vh - var(--header-h)); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.briefing__card {
  background: #fff; border: 1px solid var(--tec-line); border-radius: var(--radius-xl);
  box-shadow: var(--shadow); overflow: hidden;
}
.briefing__head {
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem) 0;
}
.briefing__head h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-bottom: 1rem; }
.briefing__body { padding: 0 clamp(1.5rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem); }

.briefing-points { counter-reset: bp; list-style: none; padding: 0; margin: 0; }
.briefing-points li {
  counter-increment: bp; position: relative; padding: 1.35rem 0 1.35rem 3.5rem;
  border-bottom: 1px solid var(--tec-line);
}
.briefing-points li:last-child { border-bottom: 0; padding-bottom: .5rem; }
.briefing-points li::before {
  content: counter(bp); position: absolute; left: 0; top: 1.3rem;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--tec-navy); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .9rem;
}
.briefing-points h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; margin-bottom: .3rem; }
.briefing-points p { font-size: .92rem; color: var(--tec-muted); margin: 0; }

.essentials {
  background: var(--tec-navy); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem);
  color: rgba(255,255,255,.82);
}
.essentials h2 { color: #fff; font-size: 1.35rem; margin-bottom: .35rem; }
.essentials__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .85rem 1.5rem; margin-top: 1.5rem; }
.essentials__item { display: flex; gap: .7rem; align-items: flex-start; }
.essentials__item span.n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; font-size: .72rem; font-weight: 700; margin-top: 2px;
}
.essentials__item strong { display: block; color: #fff; font-size: .93rem; font-weight: 600; line-height: 1.35; }
.essentials__item small { color: rgba(255,255,255,.6); font-size: .81rem; line-height: 1.45; display: block; }

.ack-box {
  border: 2px solid var(--tec-line-strong); border-radius: var(--radius-lg);
  padding: 1.5rem; background: var(--tec-cream);
  transition: border-color .22s var(--ease), background-color .22s var(--ease);
}
.ack-box.is-checked { border-color: var(--tec-green); background: var(--tec-green-100); }
.ack-box .form-check-input { width: 1.35rem; height: 1.35rem; margin-top: .1rem; border-color: var(--tec-line-strong); }
.ack-box .form-check-input:checked { background-color: var(--tec-green-600); border-color: var(--tec-green-600); }
.ack-box label { font-size: .97rem; color: var(--tec-ink); line-height: 1.6; padding-left: .35rem; }

/* ---------------------------------------------------------------------------
   9. The reporting wizard
   --------------------------------------------------------------------------- */
.wizard-shell { background: var(--tec-wash); min-height: 100vh; padding-bottom: 4rem; }

.wizard-bar {
  position: sticky; top: var(--header-h); z-index: 1020;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--tec-line);
}
.wizard-bar__inner { padding: .9rem 0 0; }
.wizard-bar__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; }
.wizard-bar__title { font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tec-muted); }
.wizard-bar__project { font-family: var(--font-display); font-size: 1.05rem; color: var(--tec-navy); font-weight: 600; }
.wizard-bar__counts { margin-left: auto; font-size: .84rem; color: var(--tec-muted); text-align: right; }
.wizard-bar__counts strong { color: var(--tec-navy); }

.wizard-progress { height: 4px; background: var(--tec-line); border-radius: 2px; overflow: hidden; margin: .75rem 0 0; }
.wizard-progress__fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--tec-blue), var(--tec-green));
  transition: width .45s var(--ease);
}

.wizard-steps {
  display: flex; gap: .25rem; overflow-x: auto; padding: .65rem 0 .55rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.wizard-steps::-webkit-scrollbar { display: none; }
.wizard-steps__item {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem;
  font-size: .78rem; font-weight: 500; color: var(--tec-muted);
  padding: .3rem .6rem; border-radius: 7px; text-decoration: none; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.wizard-steps__item .n {
  width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--tec-line-strong); font-size: .66rem; font-weight: 700; background: #fff;
}
.wizard-steps__item.is-done { color: var(--tec-green-600); }
.wizard-steps__item.is-done .n { background: var(--tec-green-600); border-color: var(--tec-green-600); color: #fff; }
.wizard-steps__item.is-current { color: var(--tec-navy); font-weight: 700; background: var(--tec-sky-100); }
.wizard-steps__item.is-current .n { border-color: var(--tec-navy); background: var(--tec-navy); color: #fff; }
.wizard-steps__item[href]:hover { background: var(--tec-wash); color: var(--tec-navy); }

.wizard-card {
  background: #fff; border: 1px solid var(--tec-line); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm); padding: clamp(1.5rem, 4vw, 2.75rem); margin-top: 2rem;
}
.wizard-card__head { border-bottom: 1px solid var(--tec-line); padding-bottom: 1.5rem; margin-bottom: 1.85rem; }
.wizard-card__head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .5rem; }
.wizard-card__head p { color: var(--tec-muted); margin: 0; }

.wizard-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  border-top: 1px solid var(--tec-line); padding-top: 1.65rem; margin-top: 2rem;
}
.wizard-actions .spacer { flex: 1 1 auto; }

.autosave-note { font-size: .82rem; color: var(--tec-muted); display: inline-flex; align-items: center; gap: .4rem; }
.autosave-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tec-green); }
.autosave-note.is-saving .dot { background: var(--tec-amber); }
.autosave-note.is-error .dot { background: var(--tec-danger); }

/* Form controls -------------------------------------------------------------- */
.field { margin-bottom: 1.6rem; }
.field:last-child { margin-bottom: 0; }

.field label.form-label, .field .field-legend {
  font-weight: 600; font-size: .95rem; color: var(--tec-ink); margin-bottom: .3rem; display: block;
}
.field .req { color: var(--tec-danger); margin-left: .15rem; font-weight: 700; }
.field .optional { font-size: .78rem; font-weight: 500; color: var(--tec-muted); margin-left: .4rem; }
.field .field-help { font-size: .86rem; color: var(--tec-muted); margin-bottom: .6rem; line-height: 1.5; }

.form-control, .form-select {
  border: 1.5px solid var(--tec-line-strong); border-radius: 10px;
  padding: .68rem .9rem; font-size: .97rem; color: var(--tec-ink);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  background-color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--tec-blue); box-shadow: 0 0 0 3px rgba(44,108,166,.14); outline: none;
}
.form-control::placeholder { color: #9aa8b8; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--tec-danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(179,45,37,.13); }
textarea.form-control { line-height: 1.6; resize: vertical; min-height: 92px; }

.field-error { color: var(--tec-danger); font-size: .85rem; margin-top: .35rem; display: flex; gap: .35rem; align-items: flex-start; }
.field-error svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 3px; }

.char-counter { font-size: .78rem; color: var(--tec-muted); text-align: right; margin-top: .3rem; }
.char-counter.is-near { color: var(--tec-amber); }
.char-counter.is-over { color: var(--tec-danger); font-weight: 600; }

/* Radio / checkbox cards ----------------------------------------------------- */
.choice-list { display: grid; gap: .6rem; }
.choice {
  position: relative; display: flex; gap: .85rem; align-items: flex-start;
  border: 1.5px solid var(--tec-line-strong); border-radius: 12px; padding: .9rem 1.1rem;
  cursor: pointer; background: #fff;
  transition: border-color .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease);
}
.choice:hover { border-color: var(--tec-blue-300); background: #fcfdfe; }
.choice input { margin-top: .18rem; flex: 0 0 auto; width: 1.1rem; height: 1.1rem; }
.choice input:checked { background-color: var(--tec-navy); border-color: var(--tec-navy); }
.choice__text { font-size: .95rem; color: var(--tec-ink); line-height: 1.5; }
.choice__text small { display: block; color: var(--tec-muted); font-size: .84rem; margin-top: .15rem; }
.choice.is-selected { border-color: var(--tec-navy); background: var(--tec-sky-100); box-shadow: 0 0 0 3px rgba(44,108,166,.1); }

.choice--critical.is-selected { border-color: var(--tec-danger); background: var(--tec-danger-bg); box-shadow: 0 0 0 3px rgba(179,45,37,.1); }
.choice--critical.is-selected input:checked { background-color: var(--tec-danger); border-color: var(--tec-danger); }

/* Sensitive-data warning (Framework §7) --------------------------------------- */
.sensitive-warning {
  border: 2px solid var(--tec-danger); background: var(--tec-danger-bg);
  border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-top: 1.1rem;
  display: none;
}
.sensitive-warning.is-visible { display: block; animation: warn-in .32s var(--ease); }
@keyframes warn-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sensitive-warning h4 {
  display: flex; align-items: center; gap: .55rem; color: var(--tec-danger);
  font-family: var(--font-sans); font-size: 1rem; font-weight: 700; margin-bottom: .5rem;
}
.sensitive-warning h4 svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sensitive-warning p { font-size: .9rem; color: #7b2a24; margin-bottom: .9rem; }
.sensitive-warning .form-check-input:checked { background-color: var(--tec-danger); border-color: var(--tec-danger); }

/* Repeater (main features) ---------------------------------------------------- */
.repeater-row { display: flex; gap: .6rem; align-items: center; margin-bottom: .55rem; }
.repeater-row .idx {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--tec-wash); color: var(--tec-muted); font-size: .78rem; font-weight: 700;
}

/* Declaration ------------------------------------------------------------------ */
.declaration-text {
  font-family: var(--font-display); font-size: 1.05rem; line-height: 1.65; color: var(--tec-navy);
  background: var(--tec-cream); border: 1px solid var(--tec-line); border-left: 3px solid var(--tec-green);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.5rem 1.65rem; margin-bottom: 1.85rem;
}

.signature-block { background: var(--tec-wash); border: 1px solid var(--tec-line); border-radius: var(--radius); padding: 1.5rem; height: 100%; }
.signature-block h3 { font-family: var(--font-sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tec-muted); margin-bottom: 1.1rem; }

/* Review summary (last step) ---------------------------------------------------- */
.review-list { border: 1px solid var(--tec-line); border-radius: var(--radius); overflow: hidden; }
.review-list__row { display: flex; gap: 1rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--tec-line); font-size: .9rem; }
.review-list__row:last-child { border-bottom: 0; }
.review-list__row dt { flex: 0 0 40%; color: var(--tec-muted); margin: 0; font-weight: 500; }
.review-list__row dd { flex: 1; margin: 0; color: var(--tec-ink); }

/* ---------------------------------------------------------------------------
   10. Confirmation
   --------------------------------------------------------------------------- */
.confirm-hero { background: linear-gradient(180deg, var(--tec-cream), #fff 70%); padding: clamp(3rem, 7vw, 5.5rem) 0 2rem; text-align: center; }
.confirm-tick {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 1.85rem;
  display: grid; place-items: center; background: var(--tec-green-100); color: var(--tec-green-600);
  animation: tick-pop .5s var(--ease) both;
}
.confirm-tick svg { width: 36px; height: 36px; }
@keyframes tick-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
.confirm-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .85rem; }

.register-id-card {
  display: inline-flex; flex-direction: column; align-items: center;
  border: 1.5px dashed var(--tec-line-strong); border-radius: var(--radius-lg);
  padding: 1.35rem 2.5rem; background: #fff;
}
.register-id-card .label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tec-muted); font-weight: 600; }
.register-id-card .value {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700;
  color: var(--tec-navy); letter-spacing: .06em; margin-top: .25rem;
}

.next-step { display: flex; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--tec-line); }
.next-step:last-child { border-bottom: 0; }
.next-step__icon {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--tec-sky-100); color: var(--tec-blue);
}
.next-step h3 { font-family: var(--font-sans); font-size: .98rem; font-weight: 600; margin-bottom: .2rem; }
.next-step p { font-size: .89rem; color: var(--tec-muted); margin: 0; }

/* ---------------------------------------------------------------------------
   11. Framework document viewer (/governance)
   --------------------------------------------------------------------------- */
.doc-shell { padding: clamp(2rem, 5vw, 3.5rem) 0 5rem; }

.doc-toc {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  border-left: 2px solid var(--tec-line); padding-left: 1.1rem; max-height: 72vh; overflow-y: auto;
}
.doc-toc a {
  display: block; font-size: .87rem; color: var(--tec-muted); text-decoration: none;
  padding: .3rem 0; line-height: 1.4; border-left: 2px solid transparent; margin-left: -1.15rem; padding-left: 1.05rem;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.doc-toc a:hover { color: var(--tec-navy); }
.doc-toc a.is-active { color: var(--tec-navy); font-weight: 600; border-left-color: var(--tec-green); }

.doc-body { max-width: 46rem; }
.doc-body h2 {
  font-size: 1.65rem; margin: 3rem 0 1rem; padding-top: 1rem; scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 600; margin: 2rem 0 .65rem; }
.doc-body p, .doc-body li { font-size: .98rem; line-height: 1.72; }
.doc-body ul { padding-left: 1.15rem; margin-bottom: 1.25rem; }
.doc-body li { margin-bottom: .45rem; }

.doc-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: .92rem; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: .8rem .95rem; border-bottom: 1px solid var(--tec-line); }
.doc-table thead th {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tec-muted);
  background: var(--tec-wash); border-bottom: 1px solid var(--tec-line-strong); font-weight: 700;
}
.doc-table tbody tr:hover { background: #fcfdfe; }
.doc-table td:first-child { font-weight: 600; color: var(--tec-navy); width: 26%; }
.doc-table--wide td:first-child { width: 18%; }

.doc-meta {
  background: var(--tec-wash); border: 1px solid var(--tec-line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; font-size: .88rem; margin-bottom: 2.5rem;
}
.doc-meta dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.25rem; margin: 0; }
.doc-meta dt { color: var(--tec-muted); font-weight: 500; }
.doc-meta dd { margin: 0; color: var(--tec-navy); font-weight: 600; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------------------------------------------------------------------
   12. Badges shared with admin
   --------------------------------------------------------------------------- */
.tec-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  padding: .28rem .6rem; border-radius: 6px; white-space: nowrap;
  border: 1px solid transparent; line-height: 1.35;
}
.tec-badge--neutral { background: var(--tec-wash);      color: var(--tec-muted);   border-color: var(--tec-line); }
.tec-badge--info    { background: var(--tec-sky-100);   color: #17557d;            border-color: rgba(44,108,166,.2); }
.tec-badge--success { background: var(--tec-success-bg);color: var(--tec-success); border-color: rgba(47,125,50,.22); }
.tec-badge--warning { background: var(--tec-amber-bg);  color: var(--tec-amber);   border-color: rgba(183,121,31,.25); }
.tec-badge--danger  { background: var(--tec-danger-bg); color: var(--tec-danger);  border-color: rgba(179,45,37,.22); }
.tec-badge--navy    { background: var(--tec-navy);      color: #fff; }
.tec-badge--green   { background: var(--tec-green-100); color: #33601c;            border-color: rgba(110,185,69,.3); }

/* Alerts -------------------------------------------------------------------- */
.tec-alert { border: 1px solid; border-radius: var(--radius); padding: .95rem 1.15rem; font-size: .92rem; margin-bottom: 1rem; }
.alert-success.tec-alert { background: var(--tec-success-bg); border-color: rgba(47,125,50,.25); color: #235c26; }
.alert-danger.tec-alert  { background: var(--tec-danger-bg);  border-color: rgba(179,45,37,.25); color: #8e241d; }
.alert-warning.tec-alert { background: var(--tec-amber-bg);   border-color: rgba(183,121,31,.28); color: #8a5a14; }
.alert-info.tec-alert    { background: var(--tec-sky-100);    border-color: rgba(44,108,166,.22); color: #17557d; }

/* ---------------------------------------------------------------------------
   13. Reveal-on-scroll
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
  .reveal-delay-1 { transition-delay: .07s; }
  .reveal-delay-2 { transition-delay: .14s; }
  .reveal-delay-3 { transition-delay: .21s; }
  .reveal-delay-4 { transition-delay: .28s; }
}

/* ---------------------------------------------------------------------------
   14. Error pages
   --------------------------------------------------------------------------- */
.error-shell { min-height: 70vh; display: grid; place-items: center; padding: 4rem 1rem; text-align: center; }
.error-code { font-family: var(--font-display); font-size: 5rem; color: var(--tec-line-strong); line-height: 1; margin-bottom: .5rem; }

/* ---------------------------------------------------------------------------
   15. Print
   --------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .wizard-bar, .no-print, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .tec-card, .wizard-card, .doc-body { box-shadow: none; border-color: #ccc; }
  a[href]::after { content: ""; }
  .section { padding: 1rem 0; }
}

/* ---------------------------------------------------------------------------
   16. Read-only project report (submission view, admin detail, print)
   --------------------------------------------------------------------------- */
.report-section-head { margin: 2.75rem 0 1.1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--tec-line); }
.report-section-head:first-child { margin-top: 0; }
.report-section-head .eyebrow { margin-bottom: .3rem; }
.report-section-head h2 { font-size: 1.3rem; margin: 0; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; margin: 0; }
.report-row { padding: .8rem 0; border-bottom: 1px solid var(--tec-line); min-width: 0; }
.report-row--wide { grid-column: 1 / -1; }
.report-row dt {
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--tec-muted); margin-bottom: .3rem;
}
.report-row dd { margin: 0; font-size: .95rem; color: var(--tec-ink); overflow-wrap: anywhere; }

.report-list { margin: 0; padding-left: 1.1rem; }
.report-list li { margin-bottom: .3rem; }

@media (max-width: 767.98px) {
  .report-grid { grid-template-columns: 1fr; }
}

@media print {
  .report-section-head { break-after: avoid; page-break-after: avoid; }
  .report-row { break-inside: avoid; page-break-inside: avoid; }
  .report-grid { gap: 0 1.5rem; }
}
