/* GNS BESA v2.0 | Owner Assessment Styles */

:root {
  --navy: #013148;
  --navy-deep: #011f2e;
  --coral: #FA7357;
  --coral-hover: #e85e3e;
  --coral-light: rgba(250,115,87,0.12);
  --white: #FFFFFF;
  --off-white: #F6F4F1;
  --light-gray: #E5E1DB;
  --mid-gray: #8C8680;
  --dark: #2A2724;
  --navy-subtle: rgba(1,49,72,0.07);
  --shadow: 0 2px 20px rgba(1,49,72,0.09);
  --shadow-lg: 0 8px 48px rgba(1,49,72,0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --ease: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: var(--navy-deep); }
.hdr-inner { max-width: 780px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.hdr-brand { display: flex; align-items: center; gap: 11px; }
.hdr-logo { width: 38px; height: 38px; background: transparent; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.hdr-logo img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 2px; }
.hdr-name { line-height: 1.25; }
.hdr-name strong { display: block; color: white; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; }
.hdr-name span { color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 400; }
.hdr-step { color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.prog-track { height: 3px; background: rgba(255,255,255,0.1); }
.prog-fill { height: 100%; background: var(--coral); border-radius: 0 2px 2px 0; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }

/* ── MAIN ── */
.main { max-width: 780px; margin: 0 auto; padding: 90px 24px 72px; }

/* ── SCREENS ── */
.scr { display: none; }
.scr.on { display: block; animation: popIn 0.28s cubic-bezier(0.4,0,0.2,1); }
@keyframes popIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── GATE ── */
.gate-top { text-align: center; padding: 36px 0 28px; }
.badge { display: inline-block; background: var(--coral-light); color: var(--coral); border: 1.5px solid rgba(250,115,87,0.25); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 14px; border-radius: 100px; margin-bottom: 20px; }
.gate-h1 { font-family: 'Fraunces', serif; font-size: clamp(28px,5.5vw,44px); font-weight: 600; color: var(--navy); line-height: 1.15; margin-bottom: 14px; }
.gate-sub { font-size: 16px; color: var(--mid-gray); line-height: 1.65; max-width: 480px; margin: 0 auto 32px; }
.gate-card { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); max-width: 460px; margin: 0 auto; }
.time-pill { display: flex; align-items: center; gap: 9px; background: var(--navy-subtle); border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 24px; }
.time-pill-icon { font-size: 15px; }
.time-pill-text { font-size: 13px; color: var(--navy); line-height: 1.45; }
.flabel { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin-bottom: 7px; }
.finput { width: 100%; padding: 12px 15px; border: 2px solid var(--light-gray); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--dark); background: var(--off-white); outline: none; transition: var(--ease); margin-bottom: 18px; }
.finput:focus { border-color: var(--coral); background: white; }
.finput::placeholder { color: var(--mid-gray); }
.finput:read-only { background: var(--navy-subtle); color: var(--navy); cursor: default; }

/* ── IDENTITY LOCK (Build C-2) ── */
.gate-field { margin-bottom: 18px; }
.identity-display { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--navy-subtle); border: 1.5px solid rgba(1,49,72,0.12); font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.notme-link { display: inline-flex; align-items: center; min-height: 32px; margin-top: 8px; padding: 4px 0; background: none; border: none; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--mid-gray); text-decoration: underline; cursor: pointer; }
.notme-link:hover { color: var(--coral); }
.inline-email { color: var(--coral); font-weight: 600; text-decoration: none; }
.inline-email:hover { text-decoration: underline; }
.contact-email { display: inline-block; margin-top: 18px; padding: 13px 22px; border-radius: var(--radius-sm); background: var(--coral-light); border: 1.5px solid rgba(250,115,87,0.25); color: var(--coral); font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600; text-decoration: none; }
.contact-email:hover { background: var(--coral); color: white; }

/* ── BUTTONS ── */
.btn-p { display: block; width: 100%; padding: 15px 28px; background: var(--coral); color: white; border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600; cursor: pointer; transition: var(--ease); letter-spacing: 0.02em; }
.btn-p:hover { background: var(--coral-hover); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(250,115,87,0.38); }
.btn-p:active { transform: translateY(0); }
.btn-p:disabled { background: var(--light-gray); color: var(--mid-gray); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-p.sm { width: auto; display: inline-block; padding: 13px 28px; font-size: 15px; }
.btn-s { padding: 13px 24px; background: transparent; color: var(--mid-gray); border: 2px solid var(--light-gray); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--ease); }
.btn-s:hover { border-color: var(--navy); color: var(--navy); }

/* ── SECTION HEADER ── */
.sec-hdr { margin-bottom: 28px; }
.sec-tag { display: inline-block; background: var(--coral-light); color: var(--coral); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 12px; border-radius: 100px; margin-bottom: 11px; }
.sec-h { font-family: 'Fraunces', serif; font-size: clamp(22px,4vw,32px); font-weight: 600; color: var(--navy); line-height: 1.18; margin-bottom: 8px; }
.sec-desc { font-size: 15px; color: var(--mid-gray); line-height: 1.65; }

/* ── SNAPSHOT GRID ── */
.snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; }
.snap-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.snap-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid-gray); margin-bottom: 10px; }
.snap-sel { width: 100%; padding: 10px 36px 10px 12px; border: 2px solid var(--light-gray); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--dark); background: var(--off-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C8680' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; outline: none; cursor: pointer; transition: var(--ease); }
.snap-sel:focus { border-color: var(--coral); }

/* ── QUESTION CARD ── */
.q-card { background: white; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 14px; box-shadow: var(--shadow); }
.q-num { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid-gray); margin-bottom: 9px; }
.q-text { font-size: 16px; font-weight: 500; color: var(--navy); line-height: 1.55; margin-bottom: 20px; }
.ans-list { display: flex; flex-direction: column; gap: 9px; }
.ans-btn { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; background: var(--off-white); border: 2px solid var(--light-gray); border-radius: var(--radius-sm); cursor: pointer; transition: var(--ease); text-align: left; width: 100%; font-family: 'DM Sans', sans-serif; }
.ans-btn:hover { border-color: rgba(250,115,87,0.4); background: var(--coral-light); }
.ans-btn.sel { border-color: var(--coral); background: var(--coral-light); }
.ans-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--light-gray); background: white; flex-shrink: 0; margin-top: 1px; transition: var(--ease); position: relative; }
.ans-btn.sel .ans-dot { background: var(--coral); border-color: var(--coral); }
.ans-btn.sel .ans-dot::after { content: ''; position: absolute; width: 6px; height: 6px; background: white; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.ans-text { font-size: 14px; color: var(--dark); line-height: 1.5; }

/* ── QUALITATIVE ── */
.open-ta { width: 100%; padding: 13px 15px; border: 2px solid var(--light-gray); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--dark); background: var(--off-white); resize: vertical; min-height: 96px; outline: none; transition: var(--ease); line-height: 1.6; }
.open-ta:focus { border-color: var(--coral); background: white; }
.open-ta::placeholder { color: var(--mid-gray); }
.opt-tag { font-size: 11px; color: var(--mid-gray); font-weight: 400; margin-left: 5px; }

/* ── NAV ROW ── */
.nav-row { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; gap: 14px; }
.nav-row.end { justify-content: flex-end; }

/* ── LOADING SCREEN ── */
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 70vh; text-align: center; padding: 48px 24px; }
.loading-icon { width: 72px; height: 72px; margin: 0 auto 28px; border-radius: 50%; background: var(--coral-light); display: flex; align-items: center; justify-content: center; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: 0.8; } }
.loading-icon svg { width: 32px; height: 32px; }
.loading-h { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.loading-sub { font-size: 15px; color: var(--mid-gray); line-height: 1.65; max-width: 380px; margin: 0 auto 32px; }
.loading-dots { display: flex; gap: 8px; justify-content: center; }
.loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: dot-bounce 1.4s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* ── RESULTS HERO ── */
.results-hero { text-align: center; padding: 28px 0 20px; }
.results-hero-name { font-family: 'Fraunces', serif; font-size: clamp(22px,4vw,32px); font-weight: 600; color: var(--navy); line-height: 1.18; margin: 12px 0 6px; }
.results-hero-sub { font-size: 14px; color: var(--mid-gray); }

/* ── SCORE CARD ── */
.score-card { background: white; border-radius: var(--radius); padding: 40px 32px; box-shadow: var(--shadow-lg); text-align: center; margin-bottom: 20px; position: relative; overflow: hidden; }
.score-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--coral); }
.score-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid-gray); margin-bottom: 6px; }
.score-num { font-family: 'Fraunces', serif; font-size: clamp(64px,12vw,88px); font-weight: 700; color: var(--navy); line-height: 1; }
.score-denom { font-size: 20px; color: var(--mid-gray); margin-bottom: 12px; }
.score-interp { font-family: 'Fraunces', serif; font-size: 20px; color: var(--coral); font-weight: 600; margin-bottom: 10px; }
.score-blurb { font-size: 14px; color: var(--mid-gray); line-height: 1.65; max-width: 380px; margin: 0 auto; }

/* ── AI NOTICE ── */
.ai-notice { font-size: 11px; color: var(--mid-gray); text-align: center; margin-bottom: 16px; letter-spacing: 0.03em; opacity: 0.7; }

/* ── SECTION SCORES ── */
.sec-scores-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid-gray); margin: 28px 0 14px; }
.sec-scores { display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px; }
.ss-card { background: white; border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.ss-info { flex: 1; min-width: 0; }
.ss-name { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.ss-bar-bg { height: 6px; background: var(--light-gray); border-radius: 3px; overflow: hidden; }
.ss-bar { height: 100%; border-radius: 3px; transition: width 0.9s cubic-bezier(0.4,0,0.2,1); }
.ss-bar.good { background: var(--navy); }
.ss-bar.flag { background: var(--coral); }
.ss-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ss-val { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: var(--navy); }
.ss-val span { font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--mid-gray); font-weight: 400; }
.flag-pill { background: var(--coral-light); color: var(--coral); font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 3px 9px; border-radius: 100px; }

/* ── SUBMIT NOTICE ── */
.sub-notice { background: var(--navy-subtle); border: 1.5px solid rgba(1,49,72,0.12); border-radius: var(--radius-sm); padding: 13px 17px; margin-bottom: 20px; font-size: 13px; color: var(--navy); line-height: 1.5; }
.sub-notice.error { background: rgba(250,115,87,0.08); border-color: rgba(250,115,87,0.25); color: #c0392b; }

/* ── ROADMAP ── */
.rdmap-top { text-align: center; padding: 28px 0 20px; }
.guide-card { background: var(--navy); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 20px; }
.guide-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.guide-text { font-size: 16px; color: rgba(255,255,255,0.85); line-height: 1.72; }
.phase-card { background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 14px; }
.phase-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); margin-bottom: 8px; }
.phase-h { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.phase-body { font-size: 14px; color: var(--mid-gray); line-height: 1.7; }
.p-item { border-left: 3px solid var(--coral); padding: 11px 15px; background: var(--off-white); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 14px; }
.p-item-h { font-size: 12px; font-weight: 700; color: var(--navy); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 3px; }
.p-item-b { font-size: 13px; color: var(--mid-gray); line-height: 1.6; }

/* ── CTA ── */
.cta-card { background: var(--coral); border-radius: var(--radius); padding: 36px 32px; text-align: center; margin-top: 20px; }
.cta-h { font-family: 'Fraunces', serif; font-size: 26px; color: white; font-weight: 600; margin-bottom: 8px; }
.cta-b { font-size: 15px; color: rgba(255,255,255,0.85); line-height: 1.65; margin-bottom: 16px; }
.cta-email { color: white; font-weight: 700; font-size: 16px; }

/* ── DOWNLOAD ── */
.download-wrap { display: flex; justify-content: center; margin-top: 28px; }
.btn-download { display: inline-flex; align-items: center; gap: 9px; padding: 14px 28px; background: var(--navy); color: white; border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--ease); }
.btn-download:hover { background: var(--navy-deep); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(1,49,72,0.3); }
.btn-download svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── PRINT HEADER/FOOTER ── */
.print-page-hdr { display: none; }
.print-footer { display: none; text-align: center; font-size: 11px; color: var(--mid-gray); line-height: 1.6; margin-top: 40px; }

/* ── MOBILE ── */
@media(max-width:560px){
  /* Layout */
  .main { padding: 72px 14px 48px; }

  /* Header — hide long subtitle on phones */
  .hdr-inner { padding: 10px 14px; }
  .hdr-logo { width: 30px; height: 30px; }
  .hdr-name span { display: none; }
  .hdr-name strong { font-size: 13px; }
  .hdr-step { font-size: 11px; }

  /* Gate / Intro */
  .gate-top { padding: 20px 0 18px; }
  .gate-h1 { font-size: 26px; }
  .gate-sub { font-size: 14px; margin-bottom: 20px; }
  .gate-card { padding: 20px 16px; }
  .time-pill { padding: 10px 12px; }
  .time-pill-text { font-size: 12px; }
  .badge { font-size: 10px; padding: 4px 11px; }

  /* Snapshot */
  .snap-grid { grid-template-columns: 1fr; gap: 10px; }
  .snap-card { padding: 16px; }
  .snap-sel { font-size: 15px; padding: 12px 36px 12px 12px; }

  /* Section headers */
  .sec-hdr { margin-bottom: 20px; }
  .sec-h { font-size: 22px; }
  .sec-desc { font-size: 14px; }

  /* Question cards */
  .q-card { padding: 18px 16px; margin-bottom: 12px; }
  .q-text { font-size: 15px; margin-bottom: 16px; }

  /* Answer buttons — 48px min touch targets */
  .ans-btn { padding: 14px 14px; gap: 10px; min-height: 48px; }
  .ans-text { font-size: 14px; }
  .ans-dot { width: 20px; height: 20px; margin-top: 0; }

  /* Textareas */
  .open-ta { font-size: 15px; min-height: 100px; padding: 12px 14px; }

  /* Nav buttons — easy thumb targets */
  .nav-row { margin-top: 20px; gap: 10px; }
  .btn-p { padding: 16px 20px; font-size: 16px; min-height: 52px; }
  .btn-p.sm { padding: 14px 22px; font-size: 15px; min-height: 48px; }
  .btn-s { padding: 14px 18px; font-size: 14px; min-height: 48px; }

  /* Inputs — 16px prevents iOS auto-zoom */
  .finput { font-size: 16px; padding: 14px 15px; }

  /* Results / Score */
  .results-hero { padding: 16px 0 12px; }
  .results-hero-name { font-size: 22px; }
  .score-card { padding: 28px 16px; }
  .score-num { font-size: 64px; }

  /* Section scores */
  .ss-card { padding: 14px 16px; gap: 12px; }
  .ss-name { font-size: 13px; }
  .ss-val { font-size: 18px; }

  /* Roadmap */
  .guide-card { padding: 20px 16px; }
  .guide-text { font-size: 15px; }
  .phase-card { padding: 20px 16px; }
  .phase-h { font-size: 18px; }
  .phase-body { font-size: 13px; }
  .p-item { padding: 10px 12px; }

  /* CTA */
  .cta-card { padding: 24px 16px; }
  .cta-h { font-size: 22px; }
  .cta-b { font-size: 14px; }
  .cta-email { font-size: 15px; }

  /* Download — full width on mobile */
  .btn-download { width: 100%; justify-content: center; padding: 16px 24px; font-size: 15px; }
}

/* ── PRINT ── */
@page { margin: 1.1in 0.75in 1in 0.75in; }
@media print {
  body { background: white; }
  .hdr { display: none !important; }
  .main { padding: 0 0 40px; }
  .btn-download, .download-wrap, .nav-row, .ai-notice, .loading-screen { display: none !important; }
  .score-card, .ss-card, .guide-card, .phase-card, .cta-card, .q-card, .p-item, .snap-card {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    box-shadow: none; border: 1px solid var(--light-gray);
    break-inside: avoid; page-break-inside: avoid;
  }
  .scr { display: none !important; }
  .scr.on { display: block !important; }
  .print-page-hdr {
    display: block; position: fixed; top: 0; left: 0; right: 0;
    background: white; padding: 12px 0 10px;
    border-bottom: 2.5px solid var(--coral);
    -webkit-print-color-adjust: exact; print-color-adjust: exact; z-index: 1000;
  }
  .print-page-hdr-inner { display: flex; align-items: center; justify-content: space-between; max-width: 780px; margin: 0 auto; padding: 0 8px; }
  .print-page-hdr-brand strong { display: block; font-family: 'Fraunces', serif; font-size: 13px; font-weight: 600; color: var(--navy); }
  .print-page-hdr-brand span { font-size: 10px; color: var(--mid-gray); font-weight: 400; letter-spacing: 0.03em; text-transform: uppercase; }
  .print-page-hdr-client { text-align: right; font-size: 10px; color: var(--mid-gray); line-height: 1.55; }
  .print-page-hdr-client strong { display: block; font-size: 12px; color: var(--navy); font-weight: 600; }
  .print-footer { display: block; position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--light-gray); padding: 8px 0; font-size: 10px; color: var(--mid-gray); text-align: center; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-footer strong { color: var(--navy); }
}
