:root {
  --bg-cosmos: #0d1324;
  --bg-cosmos-soft: #16203a;
  --bg-parchment: #f7f4ec;
  --bg-card: #ffffff;
  --bg-subtle: #faf8f2;
  --gold-primary: #b88928;
  --gold-bright: #e4c167;
  --gold-soft: #fbf4e2;
  --indigo-accent: #312e81;
  --text-main: #182032;
  --text-muted: #525e75;
  --border-sand: #e3dccb;
  --border-focus: #b88928;
  --ok-bg: #ecfdf5;
  --ok-text: #065f46;
  --ok-border: #a7f3d0;
  --warn-bg: #fffbeb;
  --warn-text: #92400e;
  --warn-border: #fde68a;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger-border: #fecaca;
  --shadow-card: 0 18px 42px -18px rgba(13, 19, 36, 0.16);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-parchment);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Prismatic Rainbow Crest Line (Arco-Íris UCCAI) */
.rainbow-ribbon {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #d4af37 0%,
    #e06c75 18%,
    #d19a66 36%,
    #98c379 54%,
    #56b6c2 72%,
    #7e77e6 88%,
    #d4af37 100%
  );
}

/* Demo Bar */
.demo-toolbar {
  background: #10172b;
  border-bottom: 1px solid rgba(228, 193, 103, 0.22);
  padding: 10px 16px;
  color: #e8e2d0;
}

.demo-toolbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-demo {
  border: 1px solid rgba(228, 193, 103, 0.45);
  background: rgba(228, 193, 103, 0.12);
  color: #fef8e7;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-demo:hover {
  background: rgba(228, 193, 103, 0.25);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-demo.btn-demo-warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(217, 119, 6, 0.18);
}

.btn-demo.btn-demo-ghost {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

/* Sacred Hero Header */
.hero-header {
  background: radial-gradient(circle at 50% 18%, #15346c 0%, #091836 55%, #050c1d 100%);
  color: #f8f5ec;
  padding: 28px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(228, 193, 103, 0.18) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 48px 48px, 26px 26px;
  background-position: 0 0, 13px 13px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  border: 1px solid rgba(228, 193, 103, 0.5);
  background: rgba(228, 193, 103, 0.12);
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-banner-frame {
  position: relative;
  max-width: 780px;
  margin: 0 auto 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(228, 193, 103, 0.52);
  box-shadow:
    0 22px 48px -14px rgba(0, 0, 0, 0.75),
    0 0 36px rgba(212, 175, 55, 0.18);
  background: #08152f;
}

.hero-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 290px;
  object-fit: cover;
  object-position: center;
}

.hero-banner-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 34px rgba(5, 12, 29, 0.65);
  border-radius: 18px;
}

.sacred-symbols-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 18px;
  max-width: 780px;
}

.symbol-badge {
  flex: 1 1 200px;
  max-width: 248px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(11, 22, 48, 0.72);
  border: 1px solid rgba(228, 193, 103, 0.28);
  backdrop-filter: blur(6px);
  text-align: left;
}

.symbol-badge-center {
  border-color: rgba(228, 193, 103, 0.52);
  background: rgba(17, 34, 72, 0.82);
}

.symbol-svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.symbol-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.symbol-info strong {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.84rem;
  color: var(--gold-bright);
  letter-spacing: 0.03em;
}

.symbol-info span {
  font-size: 0.73rem;
  color: #cbd5e1;
}

.hero-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.03em;
  color: #fffdf8;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #d6cfbd;
  max-width: 680px;
  margin: 0 auto 16px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ebe4d3;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Main Container overlapping Hero */
.main-container {
  max-width: 960px;
  margin: -34px auto 48px;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

/* Stepper */
.stepper-card {
  background: var(--bg-card);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.stepper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  background: var(--bg-subtle);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}

.step-btn:hover {
  border-color: var(--gold-primary);
}

.step-btn.active {
  background: #131b31;
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(19, 27, 49, 0.55);
}

.step-btn.done:not(.active) {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  background: #e9e2d2;
  color: var(--text-main);
}

.step-btn.active .step-num {
  background: var(--gold-bright);
  color: #131b31;
}

.step-btn.done:not(.active) .step-num {
  background: #10b981;
  color: #fff;
}

.step-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.step-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
}

.step-name {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Form Card */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 30px;
}

.step-panel {
  display: none;
  animation: fadeSlideIn 0.25s ease-out;
}

.step-panel.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  border-bottom: 2px solid var(--gold-soft);
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.section-header h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.42rem;
  margin: 0 0 6px;
  color: #11182c;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* Sub-block inside form */
.sub-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 22px;
}

.sub-card.emergency-card {
  border-left: 4px solid var(--gold-primary);
  background: #fdf9ef;
}

.sub-card-title {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #141e38;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 18px;
  align-items: start;
}

.col-12 { grid-column: span 12; }
.col-11 { grid-column: span 11; }
.col-10 { grid-column: span 10; }
.col-9 { grid-column: span 9; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-1 { grid-column: span 1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label:not(.upload-zone) {
  font-size: 0.84rem;
  font-weight: 600;
  color: #263147;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req {
  color: #be123c;
}

.field input:not([type="checkbox"]):not([type="file"]),
.field select {
  width: 100%;
  height: 46px;
  padding: 10px 13px;
  border: 1.5px solid #d7cfbe;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.93rem;
  line-height: normal;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #d7cfbe;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(184, 137, 40, 0.18);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: #dc2626;
  background: #fffafa;
}

.field-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.field-error {
  font-size: 0.78rem;
  color: #dc2626;
  font-weight: 600;
  display: none;
}

.field-error.visible {
  display: block;
}

/* Callout Alerts */
.callout {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.callout-gold {
  background: #fdf7e6;
  border-color: #ead39a;
  color: #6b4c10;
}

.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.callout-ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* Triage Questions */
.triage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.triage-item {
  border: 1.5px solid var(--border-sand);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: #ffffff;
  transition: border-color 0.2s, background-color 0.2s;
}

.triage-item.answered-no {
  border-color: #bbf7d0;
  background: #fbfefc;
}

.triage-item.answered-yes-info {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.triage-item.answered-yes-relative {
  border-color: #fcd34d;
  background: #fffdf5;
}

.triage-item.answered-yes-absolute {
  border-color: #fca5a5;
  background: #fff8f8;
}

.triage-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.triage-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.q-code {
  background: #131b31;
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.q-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.q-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #162038;
  margin: 0 0 6px;
}

.q-helper {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.triage-choices {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.choice-btn {
  min-width: 78px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #d5ccb9;
  background: #f9f7f2;
  color: #334155;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.choice-btn:hover {
  border-color: #94a3b8;
}

.choice-btn.active-no {
  background: #065f46;
  border-color: #065f46;
  color: #ffffff;
}

.choice-btn.active-yes-info {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.choice-btn.active-yes-warn {
  background: #b45309;
  border-color: #b45309;
  color: #ffffff;
}

.choice-btn.active-yes-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.triage-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #dcd4c2;
  display: none;
}

.triage-detail.visible {
  display: block;
}

.triage-detail label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #27324b;
}

.triage-detail textarea {
  width: 100%;
  min-height: 64px;
  padding: 9px 12px;
  border: 1.5px solid #d6cdbc;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}

/* 12 Principles Grid */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 24px;
}

.principle-card {
  background: #fdfaf2;
  border: 1px solid #e6dec9;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}

.principle-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.principle-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #151e36;
  margin: 2px 0 3px;
}

.principle-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* Legal Clauses Box */
.legal-box {
  border: 1.5px solid var(--border-sand);
  border-radius: var(--radius-md);
  background: #fcfbf8;
  max-height: 410px;
  overflow-y: auto;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.legal-section {
  margin-bottom: 18px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #131b31;
  border-left: 3px solid var(--gold-primary);
  padding-left: 10px;
}

.legal-section.highlight-box {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.legal-section p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #2f3b52;
}

.checklist-accept {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-sand);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.check-row:hover {
  border-color: var(--gold-primary);
}

.check-row.checked {
  border-color: #10b981;
  background: #f6fef9;
}

.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #065f46;
  flex-shrink: 0;
}

.check-row span {
  font-size: 0.88rem;
  color: #1f2937;
  font-weight: 500;
}

/* Upload & Signature */
.upload-zone {
  display: block;
  width: 100%;
  border: 2px dashed #cbbd9f;
  border-radius: var(--radius-md);
  background: #fdfbf6;
  padding: 24px 20px;
  text-align: center;
  white-space: normal;
  overflow: visible;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-zone:hover {
  border-color: var(--gold-primary);
  background: #fbf6ea;
}

.upload-zone input[type="file"] {
  display: none;
}

.doc-preview {
  margin-top: 12px;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: var(--radius-sm);
}

.doc-preview.visible {
  display: flex;
}

.doc-preview img {
  width: 78px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.signature-wrapper {
  border: 1.5px solid #cbbd9f;
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
}

.signature-pad {
  width: 100%;
  height: 185px;
  display: block;
  touch-action: none;
  cursor: crosshair;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 35px,
    rgba(184, 137, 40, 0.08) 36px
  );
}

.signature-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #faf7f0;
  border-top: 1px solid var(--border-sand);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Buttons */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-sand);
  gap: 12px;
}

.btn {
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ece6d8;
  color: #27324b;
}

.btn-secondary:hover:not(:disabled) {
  background: #e2dac6;
}

.btn-primary {
  background: linear-gradient(135deg, #162241 0%, #243462 100%);
  color: #fffdf8;
  box-shadow: 0 8px 18px -6px rgba(19, 27, 49, 0.5);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(19, 27, 49, 0.65);
}

.btn-gold {
  background: linear-gradient(135deg, #b88928 0%, #d4ab46 100%);
  color: #131b31;
  box-shadow: 0 10px 22px -8px rgba(184, 137, 40, 0.55);
}

.btn-gold:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-whatsapp {
  background: #15803d;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #166534;
}

/* Summary / Result View */
.result-panel {
  display: none;
}

.result-panel.visible {
  display: block;
}

.result-banner {
  background: linear-gradient(135deg, #11192f 0%, #1d2b53 100%);
  color: #fffdf7;
  padding: 26px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(228, 193, 103, 0.4);
  margin-bottom: 20px;
}

.result-banner h3 {
  font-family: 'Cinzel', Georgia, serif;
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 1.38rem;
}

.meta-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.meta-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.meta-box span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.meta-box strong {
  display: block;
  font-size: 0.9rem;
  color: #141d35;
  margin-top: 3px;
  word-break: break-all;
}

.pdf-viewer-box {
  border: 1.5px solid var(--border-sand);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #eef0f4;
  margin-top: 16px;
}

.pdf-viewer-bar {
  background: #18223d;
  color: #f8f4ea;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.86rem;
}

.pdf-iframe {
  width: 100%;
  height: 580px;
  border: none;
  display: block;
}

.qa-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.86rem;
}

.qa-preview-table th,
.qa-preview-table td {
  border: 1px solid var(--border-sand);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.qa-preview-table th {
  background: #141d35;
  color: #f9f5eb;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill-ok { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border); }
.pill-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.pill-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 28, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gold-primary);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

.modal-header {
  background: #131b31;
  color: #fffdf8;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.12rem;
  color: var(--gold-bright);
}

.modal-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.site-footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 860px) {
  .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 {
    grid-column: span 6;
  }
  .stepper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .meta-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stepper-card {
    padding: 12px;
  }
  .step-btn {
    padding: 9px 10px;
    gap: 8px;
  }
  .step-name {
    font-size: 0.78rem;
  }
  .form-card {
    padding: 20px 16px;
  }
  .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 {
    grid-column: span 12;
  }
  .field > label:not(.upload-zone) {
    white-space: normal;
    min-height: auto;
  }
  .symbol-badge {
    max-width: none;
  }
  .triage-top {
    flex-direction: column;
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
  .form-nav {
    flex-direction: column-reverse;
  }
  .form-nav .btn {
    width: 100%;
  }
  .pdf-iframe {
    height: 400px;
  }
}

/* ==========================================================================
   Página de confirmação — "fique de olho no WhatsApp" (envio para assinatura)
   ========================================================================== */
.success-hero { text-align: center; padding: 6px 0 22px; }
.success-check {
  width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.1rem; font-weight: 700; color: #0b3d2e;
  background: radial-gradient(circle at 30% 25%, #d8f7e6, #a7f3d0);
  border: 2px solid #6ee7b7;
  box-shadow: 0 12px 26px -12px rgba(16, 185, 129, 0.55);
}
.success-hero h3 {
  font-family: 'Cinzel', serif; color: var(--text-main);
  font-size: 1.6rem; margin: 0 0 10px; line-height: 1.25;
}
.success-hero p {
  color: var(--text-muted); max-width: 620px; margin: 0 auto; line-height: 1.65;
}

.callout-whatsapp { background: var(--ok-bg); border-color: var(--ok-border); }
.callout-whatsapp strong { color: var(--ok-text); }
.callout-whatsapp p { margin: 6px 0 0; color: #14532d; line-height: 1.6; }

.next-steps-title {
  font-family: 'Cinzel', serif; color: var(--text-main);
  font-size: 1.05rem; letter-spacing: 0.02em; margin: 26px 0 14px;
}
.next-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.next-steps li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-subtle); border: 1px solid var(--border-sand);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.next-steps .step-n {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  color: #1b1300; font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 6px 14px -8px rgba(184, 137, 40, 0.8);
}
.next-steps strong { display: block; color: var(--text-main); font-size: 0.98rem; margin-bottom: 3px; }
.next-steps p { margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.result-footnote {
  margin: 18px 0 0; text-align: center; font-size: 0.84rem;
  color: var(--text-muted); letter-spacing: 0.02em;
}
.result-footnote strong { color: var(--text-main); }

@media (max-width: 620px) {
  .next-steps li { padding: 12px; }
  .result-actions .btn { width: 100%; text-align: center; }
}


/* Aviso discreto da data do ritual (definida automaticamente) */
.ritual-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-soft);
  border: 1px solid #efe2bd;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.ritual-note strong { color: var(--text-main); }
.ritual-note-icon { font-size: 1rem; line-height: 1; }
