/* ===== Base ===== */
:root {
  --gradient-start: #103a75;
  --gradient-end: #1e5aa8;
  --gold: #d4a017;
  --card-bg: #ffffff;
  --card-radius: 20px;
  --card-shadow: 0 10px 30px rgba(30, 41, 59, 0.10);
  --text-main: #1e2430;
  --text-muted: #667085;
  --green: #16a34a;
  --green-bg: #eafaf0;
  --red: #dc2626;
  --red-bg: #fdeceb;
  --amber: #b45309;
  --amber-bg: #fef6e7;
  --border-color: #e5e7eb;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-system);
  color: var(--text-main);
  background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 320px, #f4f6fb 320px);
  min-height: 100vh;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Header ===== */
.header {
  position: relative;
  text-align: center;
  padding: 40px 20px 30px;
  color: #ffffff;
  overflow: hidden;
}

.header-watermark {
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 160px;
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
  transform: rotate(-8deg);
}

.header-badge {
  position: relative;
  width: 64px;
  height: 64px;
  line-height: 64px;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(212, 160, 23, 0.6);
  border-radius: 18px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.header-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.header-subtitle {
  font-size: 14.5px;
  margin: 0;
  opacity: 0.92;
}

/* ===== Layout ===== */
.container {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: -14px auto 0;
  padding: 0 16px 20px;
}

/* ===== Card ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 22px 20px;
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

/* ===== Step badges ===== */
.step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.step-badge {
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

/* ===== Fields ===== */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 14px 0 6px;
}

.field-label-sm {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-system);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: #fafbfc;
  color: var(--text-main);
  transition: border-color 0.15s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--gradient-start);
  background: #ffffff;
}

.name-input {
  font-size: 17px;
  font-weight: 700;
  padding: 14px 16px;
  border: 2px solid var(--gold);
  background: #fffdf5;
}

.name-input:focus {
  border-color: var(--gradient-start);
  background: #ffffff;
}

.dob-row {
  display: flex;
  gap: 10px;
}

.dob-field {
  flex: 1;
}

.dob-field-month {
  flex: 1.6;
}

/* ===== Checkbox rows ===== */
.check-row {
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
}

.check-row:first-of-type {
  margin-top: 4px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.check-input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gradient-start);
}

.hint-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 6px 0 0 28px;
  line-height: 1.45;
}

.hint-small {
  margin-top: 4px;
}

.service-inputs {
  display: flex;
  gap: 12px;
  margin: 12px 0 0 28px;
}

.service-field {
  flex: 1;
}

/* ===== Calculate button ===== */
.calc-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-system);
  color: #ffffff;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border: none;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(16, 58, 117, 0.35);
  cursor: pointer;
  margin-bottom: 16px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.calc-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(16, 58, 117, 0.3);
}

/* ===== Result card ===== */
.result-card {
  animation: fadeInUp 0.35s ease;
}

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

.result-summary {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.result-name {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 4px;
}

.result-dob {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.result-age-row {
  border-bottom: none;
  padding-bottom: 0;
}

.result-post-block {
  margin-bottom: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: #fbfcff;
  overflow: hidden;
}

.result-post-block:last-of-type {
  margin-bottom: 0;
}

.result-post-strip {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  color: #ffffff;
}

.result-post-si {
  border-color: #c7d7ee;
}

.result-post-si .result-post-strip {
  background: var(--gradient-start);
}

.result-post-const {
  border-color: #bfe3d8;
}

.result-post-const .result-post-strip {
  background: #0f7a5c;
}

.result-post-body {
  padding: 16px 16px 18px;
}

.result-status {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 12px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.result-status.eligible {
  color: var(--green);
  background: var(--green-bg);
}

.result-status.not-eligible {
  color: var(--red);
  background: var(--red-bg);
}

.result-status.min-age {
  color: var(--amber);
  background: var(--amber-bg);
}

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.result-value {
  font-size: 14.5px;
  font-weight: 700;
  text-align: left;
  line-height: 1.4;
}

.result-age-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.result-reason-row .result-value {
  font-weight: 500;
}

.result-warning {
  margin: 16px 0 0;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--amber);
  background: var(--amber-bg);
  border-radius: 12px;
}

.share-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-system);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.download-btn {
  color: var(--gradient-start);
  background: #fff;
  border: 2px solid var(--gradient-start);
}

.download-btn:hover {
  background: #eef3ff;
}

.download-btn:active {
  transform: scale(0.97);
  background: #eef3ff;
}

.share-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border: 2px solid transparent;
  box-shadow: 0 6px 16px rgba(16, 58, 117, 0.3);
}

.share-btn:hover {
  box-shadow: 0 8px 20px rgba(16, 58, 117, 0.4);
}

.share-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(16, 58, 117, 0.3);
}

/* ===== Prepared by ===== */
.prepared-by-card {
  text-align: center;
  background: #f8f9fb;
  box-shadow: none;
  border: 1px solid var(--border-color);
  padding: 16px 20px;
}

.prepared-by-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
}

.prepared-by-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 2px;
}

.prepared-by-role {
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 600;
  margin: 0;
}

.share-canvas-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Important Notes ===== */
.notes-card {
  background: #f8f9fb;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.notes-card .step-title {
  margin-bottom: 12px;
}

.notes-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.notes-list li {
  margin-bottom: 8px;
}

.notes-list li:last-child {
  margin-bottom: 0;
}

/* ===== Website disclaimer ===== */
.disclaimer-card {
  background: #f8f9fb;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.disclaimer-card .step-title {
  margin-bottom: 12px;
}

.disclaimer-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 10px 0 26px;
}

/* ===== Desktop responsive ===== */
@media (min-width: 700px) {
  .header {
    padding: 56px 20px 40px;
  }

  .header-title {
    font-size: 28px;
  }

  .header-subtitle {
    font-size: 16px;
  }

  .container {
    max-width: 560px;
  }

  .card {
    padding: 28px 30px;
  }

  .calc-btn {
    cursor: pointer;
  }

  .calc-btn:hover {
    box-shadow: 0 10px 24px rgba(16, 58, 117, 0.4);
  }
}
