@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&display=swap');
@import url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/style.css');

:root {
  --navy:        #050507;
  --navy-soft:   #0d0e12;
  --cream:       #ececec;
  --cream-soft:  #b6b8bf;
  --gold:        #b8bec8;
  --gold-soft:   #6f7783;
  --border:      rgba(255, 255, 255, 0.07);
  --border-hi:   rgba(255, 255, 255, 0.13);
  --glass:       rgba(13, 14, 18, 0.7);
  --error:       #e15c5c;
  --success:     #5ecb87;
  --warning:     #c9a84c;

  --font-heading: 'Cormorant Garant', Georgia, serif;
  --font-body:    'Geist', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, #171922 0, var(--navy) 40%, #010102 100%);
  background-attachment: fixed;
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(140,149,173,0.1) 0, transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(143,151,166,0.1) 0, transparent 55%);
  mix-blend-mode: soft-light;
  z-index: 0;
}

a { color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.text-accent { color: var(--gold); }

/* ── UTILITIES ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(4,9,20,0.94), rgba(4,9,20,0.82), transparent);
  backdrop-filter: blur(16px);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream);
}

.nav-logo span { color: var(--gold); }

.nav-links { display: flex; gap: 1.8rem; }

.nav-links a {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cream-soft);
  opacity: 0.72;
  transition: opacity 0.18s;
}

.nav-links a:hover { opacity: 1; color: var(--cream); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #0a0912;
  border: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 16px 38px rgba(0,0,0,0.7);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 22px 46px rgba(0,0,0,0.85);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--cream-soft);
}

.btn-outline:hover {
  background: rgba(8,20,51,0.96);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-2px);
  color: var(--cream);
  opacity: 1;
}

.btn-large { width: 100%; padding: 0.9rem 1.6rem; font-size: 0.95rem; margin-top: 1rem; }

/* ── LAYOUT ── */
.main-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── HERO ── */
.hero { text-align: center; margin-bottom: 3rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 1rem;
  border-radius: 0;
  background: rgba(184,190,200,0.08);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(184,190,200,0.18);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-subtitle {
  font-size: 0.96rem;
  color: rgba(245,242,234,0.78);
  max-width: 52ch;
  margin: 0 auto;
  line-height: 1.72;
}

/* ── GLASS PANEL / FORM ── */
.glass-panel {
  background: radial-gradient(circle at top left, #1a2a4e 0, #07101f 52%, #040813 100%);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 2.4rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 26px 60px rgba(0,0,0,0.6);
}

.recovery-notice,
.evidence-notice {
  margin-bottom: 1.2rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.recovery-notice {
  border-color: rgba(200,140,50,0.26);
  background: rgba(200,140,50,0.09);
}

.evidence-notice {
  border-color: rgba(80,120,180,0.24);
  background: rgba(80,120,180,0.08);
}

.notice-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.35rem;
}

.notice-copy {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--cream-soft);
}

.notice-list {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notice-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(255,255,255,0.03);
}

.form-group { margin-bottom: 1.4rem; }

.input-wrapper label {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.45rem;
  color: var(--cream-soft);
  opacity: 0.86;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: radial-gradient(circle at top, rgba(26,44,92,0.75), rgba(4,9,22,0.96));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.7rem;
  padding: 0.65rem 0.9rem;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  box-sizing: border-box;
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(184,190,200,0.9);
  box-shadow: 0 0 0 1px rgba(184,190,200,0.7), 0 0 24px rgba(154,162,178,0.3);
  background: radial-gradient(circle at top, rgba(35,56,112,0.95), rgba(6,14,32,0.98));
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b6b8bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1em;
  background-color: radial-gradient(circle at top, rgba(26,44,92,0.75), rgba(4,9,22,0.96));
}

select option { background-color: #0d0e12; color: var(--cream); }

textarea { min-height: 110px; resize: vertical; }

.form-section-divider {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 1.9rem 0 1.35rem;
  padding-top: 1.3rem;
}

.form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.form-helper {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--cream-soft);
  opacity: 0.8;
}

.input-wrapper.is-dynamic-required label,
.input-wrapper.is-recovery-target label {
  color: var(--cream);
}

.input-wrapper.is-dynamic-required input,
.input-wrapper.is-dynamic-required select,
.input-wrapper.is-dynamic-required textarea {
  border-color: rgba(80,120,180,0.42);
  box-shadow: 0 0 0 1px rgba(80,120,180,0.22);
}

.input-wrapper.is-recovery-target input,
.input-wrapper.is-recovery-target select,
.input-wrapper.is-recovery-target textarea {
  border-color: rgba(200,140,50,0.44);
  box-shadow: 0 0 0 1px rgba(200,140,50,0.24);
}

.field-requirement-note {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--cream-soft);
}

.field-requirement-note.visible {
  display: block;
}

/* ── CHECKBOX ── */
.checkbox-group { margin-top: 1.6rem; margin-bottom: 1.6rem; }

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--cream-soft);
}

.checkbox-label input { display: none; }

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
  transition: all 0.2s;
}

.checkbox-label input:checked + .custom-checkbox {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  border-color: var(--gold);
}

.checkbox-label input:checked + .custom-checkbox::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid #0a0912;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* ── TRUST SIGNALS ── */
.trust-signals {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 1.8rem;
  font-size: 0.8rem;
  color: var(--cream-soft);
  opacity: 0.72;
}

.dot-separator { color: var(--border-hi); }

/* ── LOADING ── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
}

.scanner {
  width: 88px;
  height: 88px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 0 30px rgba(184,190,200,0.15);
}

.scanner-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  position: absolute;
  top: 0;
  box-shadow: 0 0 10px var(--gold);
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0%   { top: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  animation: fadePulse 1.5s ease-in-out infinite;
}

.text-muted { color: var(--cream-soft); opacity: 0.7; font-size: 0.9rem; }

@keyframes fadePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── REPORT HEADER ── */
.report-header {
  background: radial-gradient(circle at top left, #1a2a4e 0, #07101f 52%, #040813 100%);
  border: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 2rem;
  padding: 2.4rem;
  box-shadow: 0 26px 60px rgba(0,0,0,0.6);
}

.rh-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.status-large {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.status-large.compliant    { background: rgba(94,203,135,0.12); color: #5ecb87; border: 1px solid rgba(94,203,135,0.25); }
.status-large.at_risk      { background: rgba(201,168,76,0.12);  color: #c9a84c; border: 1px solid rgba(201,168,76,0.28); }
.status-large.non_compliant{ background: rgba(225,92,92,0.12);  color: #e15c5c; border: 1px solid rgba(225,92,92,0.28); }

.score-display { display: flex; align-items: baseline; gap: 0.4rem; }

.score-number {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
}

/* ── REGULATION GRID ── */
.regulations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.reg-card {
  background: linear-gradient(145deg, #111d3a, #060b17);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.6rem;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.reg-card:hover { transform: translateY(-3px); border-color: var(--border-hi); }

.reg-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.reg-title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 500; margin: 0 0 0.3rem; }

.reg-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--border-hi);
  color: var(--cream-soft);
  background: rgba(255,255,255,0.04);
}

.status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.compliant     { background: rgba(94,203,135,0.12);  color: #5ecb87; border: 1px solid rgba(94,203,135,0.22); }
.status-pill.at_risk       { background: rgba(201,168,76,0.12);  color: #c9a84c; border: 1px solid rgba(201,168,76,0.24); }
.status-pill.non_compliant { background: rgba(225,92,92,0.12);   color: #e15c5c; border: 1px solid rgba(225,92,92,0.24); }
.status-pill.not_applicable{ background: rgba(255,255,255,0.04); color: var(--cream-soft); border: 1px solid var(--border); }

.reg-summary { font-size: 0.92rem; margin-bottom: 1.2rem; line-height: 1.65; opacity: 0.88; }

.reg-details {
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  margin-bottom: 0.6rem;
  background: rgba(255,255,255,0.02);
}

.reg-details summary {
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.88rem;
  outline: none;
  color: var(--cream-soft);
}

.reg-details ul {
  margin: 0;
  padding: 0 1.2rem 0.9rem 2rem;
  color: var(--cream-soft);
  opacity: 0.82;
}

.reg-details li { margin-bottom: 0.4rem; font-size: 0.86rem; }

.reg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--cream-soft);
  opacity: 0.75;
}

/* ── PRIORITY CARD ── */
.priority-card {
  background: radial-gradient(circle at top left, #1a2a4e 0, #07101f 52%, #040813 100%);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 2.2rem;
  margin-bottom: 2.4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
}

.prio-action {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.prio-action:last-child { margin-bottom: 0; }

.prio-num {
  width: 2.2rem;
  height: 2.2rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #0a0912;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.prio-text { font-size: 0.96rem; padding-top: 0.3rem; opacity: 0.9; }

/* ── PRINT ── */
@media print {
  .navbar, button[onclick="window.print()"] { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .glass-panel, .reg-card, .priority-card, .report-header { background: #fff !important; box-shadow: none !important; border: 1px solid #ddd !important; border-radius: 0 !important; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .nav-links { display: none; }
  .glass-panel { padding: 1.4rem; }
}
