/* ============================================================
   Maharashtra Grand Innovation Challenge Portal
   Simple & Elegant UI — v3
   ============================================================ */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* === Design Tokens === */
:root {
  /* Core palette — mostly navy + neutrals, one restrained accent */
  --navy: #10233f;
  --navy-mid: #163256;
  --navy-light: #24466f;
  --accent: #9c6b2e;       /* muted bronze — used sparingly, brand nod only */
  --accent-soft: #b98a4d;
  --blue-link: #2461c7;
  --success: #157a4c;
  --success-bg: #eaf6f0;
  --danger: #b6392a;
  --warning-bg: #fbf7ec;
  --warning-border: #e3d2a3;

  /* Neutrals */
  --white: #ffffff;
  --bg-canvas: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-input: #f9fafb;
  --bg-muted: #eef1f5;
  --border: #e1e5eb;
  --border-input: #d3d9e1;
  --border-focus: #2461c7;

  /* Text */
  --text-heading: #14213a;
  --text-body: #364357;
  --text-muted: #667289;
  --text-faint: #97a1b3;
  --text-label: #1b2a44;

  /* Shape */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows — flatter, quieter */
  --shadow-xs: 0 1px 2px rgba(16,35,63,0.05);
  --shadow-card: 0 1px 2px rgba(16,35,63,0.04), 0 4px 14px -4px rgba(16,35,63,0.07);
  --shadow-raised: 0 4px 14px -2px rgba(16,35,63,0.10);
  --shadow-btn: 0 1px 3px rgba(16,35,63,0.12);
  --shadow-focus: 0 0 0 3px rgba(36,97,199,0.13);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: rgba(36,97,199,0.16); }

a:focus-visible,
button:focus-visible,
.step-node:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   TOP GOVERNMENT IDENTITY BAR
   ============================================================ */
.gov-identity-bar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.78);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gov-identity-bar .gov-id-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gov-ashoka {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.9;
}

.gov-identity-bar .sep { opacity: 0.3; margin: 0 0.25rem; }

.gov-identity-bar .gov-id-right {
  color: rgba(255,255,255,0.55);
  font-size: 0.65rem;
  font-weight: 600;
}

/* ============================================================
   HEADER
   ============================================================ */
.portal-header {
  background: var(--navy);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 2px 12px rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--accent);
}

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

.brand-wrapper { display: flex; align-items: center; gap: 1rem; min-width: 0; }

.gov-seal {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.brand-text { min-width: 0; }

.brand-text h1 {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.brand-meta span {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}

.annexure-badge {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-admin-nav:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.3);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-wrapper {
  max-width: 800px;
  margin: 2rem auto 5rem;
  padding: 0 1.25rem;
  flex: 1;
  width: 100%;
}

/* ============================================================
   STEPPER NAVIGATION
   ============================================================ */
.stepper-rail {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.4rem 1.05rem;
  margin-bottom: 1.6rem;
  display: none;
  position: sticky;
  top: 0.8rem;
  z-index: 90;
}

.stepper-rail.visible { display: block; animation: fadeIn 0.2s var(--ease); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.stepper-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.stepper-section-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.stepper-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.progress-bar-track {
  height: 4px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 999px;
  transition: width 0.4s var(--ease);
  width: 0%;
}

.step-bubbles-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.step-bubbles-row::-webkit-scrollbar { display: none; }

.step-bubbles-row::before {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(14px + 6px);
  right: calc(14px + 6px);
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: default;
  flex: 1;
  min-width: 42px;
  position: relative;
  z-index: 1;
}

.step-node.clickable { cursor: pointer; }
.step-node.clickable:hover .step-dot { border-color: var(--text-faint); }

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.step-node.active .step-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.step-node.done .step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-node.done .step-dot::before {
  content: '✓';
  font-size: 0.8rem;
  font-weight: 900;
}

.step-dot-label { display: none; }

.step-node .step-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-faint);
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s var(--ease);
}

.step-node.active .step-name { color: var(--navy); font-weight: 700; }
.step-node.done .step-name { color: var(--success); }

/* ============================================================
   FORM CARDS / SECTIONS
   ============================================================ */
.form-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: none;
}

.form-card.active { display: block; animation: slideUp 0.3s var(--ease); }

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

/* Section accent bar — quiet, single color */
.card-section-bar {
  height: 3px;
  background: var(--navy);
}

.card-inner { padding: 2rem 2.25rem; }

/* Section heading block */
.section-heading-block {
  margin-bottom: 1.85rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--bg-muted);
}

.section-chapter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-heading-block h2 {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.section-heading-block p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
  max-width: 600px;
}

/* ============================================================
   GUIDELINE SCREEN (STEP 0)
   ============================================================ */
.guidelines-hero-banner {
  background: var(--navy);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin-bottom: 1.6rem;
  color: #fff;
}

.guidelines-hero-banner .hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  margin-bottom: 0.6rem;
}

.guidelines-hero-banner h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
  max-width: 620px;
}

.guidelines-hero-banner p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  max-width: 610px;
  line-height: 1.65;
}

.guidelines-hero-banner strong { color: #fff; }

/* Info Card Grid */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.2s var(--ease);
}

.info-card:hover { border-color: var(--border-input); }

.info-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.info-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.info-card p, .info-card ul {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.info-card ul {
  padding-left: 1rem;
}

.info-card ul li { margin-bottom: 0.28rem; }

/* Sections Roadmap */
.sections-roadmap {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}

.sections-roadmap h4 {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.roadmap-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.roadmap-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text-body);
  background: #fff;
  white-space: nowrap;
}

.roadmap-pill .pill-letter {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--navy);
  font-size: 0.64rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contact Banner */
.contact-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.35rem;
  margin-bottom: 1.6rem;
}

.contact-strip-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.contact-person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--text-body);
}

.contact-person .cp-name {
  font-weight: 700;
  color: var(--text-heading);
}

.contact-person a {
  color: var(--blue-link);
  text-decoration: none;
  font-weight: 600;
}

.contact-person a:hover { text-decoration: underline; }

/* Draft status + CTA row */
.guidelines-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--bg-muted);
}

.draft-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.draft-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}

.draft-status.has-draft .dot { background: var(--navy); animation: pulse-dot 1.5s infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.cta-button-group { display: flex; gap: 0.7rem; }

/* ============================================================
   FORM FIELDS
   ============================================================ */
.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1.85rem;
}

.field-full { grid-column: 1 / -1; }

.field-group { display: flex; flex-direction: column; gap: 0.35rem; }
.field-group[hidden] { display: none !important; }
.field-control[readonly] {
  background: #f0f4f9;
  color: #2c3e55;
  cursor: default;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-label);
  line-height: 1.35;
}

.field-sr-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-faint);
  min-width: 1.4em;
  display: inline-block;
}

.req-star { color: var(--danger); margin-left: 1px; font-weight: 700; }

.field-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-xs);
  line-height: 1.5;
  margin-bottom: 0.1rem;
}

/* Half-width fields sharing a grid row can have hints of different
   lengths that wrap to a different number of lines — reserve enough
   height for two lines so the inputs below stay aligned across the row. */
.fields-grid .field-group:not(.field-full) .field-hint {
  min-height: 3.05rem;
}

.field-control {
  width: 100%;
  padding: 0.68rem 0.9rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background-color 0.16s var(--ease);
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
}

.field-control::placeholder { color: var(--text-faint); }

.field-control:hover:not(:focus) { border-color: #b7bfcb; }

.field-control:focus {
  background: #fff;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

textarea.field-control {
  min-height: 90px;
  resize: vertical;
}

select.field-control {
  cursor: pointer;
  background-color: var(--bg-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23667289' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.5rem;
}

.searchable-select {
  position: relative;
}

.searchable-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.searchable-select-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23667289' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21-4.3-4.3M11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.5rem;
}

.searchable-select-input::-webkit-search-cancel-button { display: none; }

.searchable-select-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(10, 31, 60, 0.12);
  max-height: 15rem; /* 6 option rows */
  overflow-y: auto;
}

.searchable-select-option,
.searchable-select-empty {
  padding: 0.52rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.45;
  min-height: 2.5rem;
  color: var(--text-body);
}

.searchable-select-option { cursor: pointer; }
.searchable-select-option:hover,
.searchable-select-option.is-active { background: #eef3f9; }
.searchable-select-option.is-selected { font-weight: 700; color: #0a1f3c; }
.searchable-select-empty { color: var(--text-faint); }

.word-counter {
  font-size: 0.73rem;
  color: var(--text-faint);
  font-weight: 600;
  text-align: right;
  margin-top: -0.05rem;
}

.word-counter.warn { color: var(--danger); }

/* Subsection Divider Inside Cards */
.sub-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.85rem 0 1.25rem;
}

.sub-section-header:first-child { margin-top: 0; }

.sub-section-line { flex: 1; height: 1px; background: var(--bg-muted); }

.sub-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Canvas Card (Section F) */
.canvas-wrapper {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.canvas-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
}

/* Confirmation Box (Section H) */
.cert-declaration-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.75rem;
}

.cert-declaration-box .cert-intro {
  font-size: 0.87rem;
  color: #5e5335;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.cert-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 700;
  color: #5e5335;
  line-height: 1.5;
}

.cert-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 1px;
  cursor: pointer;
  accent-color: var(--navy);
  border-radius: 4px;
}

/* Note box */
.form-note {
  background: var(--bg-subtle);
  border: 1px solid var(--bg-muted);
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.55;
}

/* ============================================================
   FORM ACTION BAR
   ============================================================ */
.form-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--bg-muted);
}

.action-bar-autosave {
  font-size: 0.8rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.save-icon { font-size: 0.9rem; }

.btn-nav-group { display: flex; gap: 0.65rem; margin-left: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.4rem;
  font-size: 0.89rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-body); border-color: var(--border-input); }

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-navy:hover { background: var(--navy-light); }

/* Primary emphasis CTA — restrained bronze accent, used only for
   Start Submission / Submit Problem Statement */
.btn-saffron {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-saffron:hover { background: #895f28; }

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-success:hover { background: #0f6039; }

.btn-lg { padding: 0.8rem 1.7rem; font-size: 0.98rem; }

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

/* Loading spinner in button */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-icon { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SUCCESS / CONFIRMATION SCREEN
   ============================================================ */
.success-screen {
  padding: 3.5rem 2rem;
  text-align: center;
}

.success-check-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-screen h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.success-screen p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 1.75rem;
  max-width: 470px;
  margin-left: auto;
  margin-right: auto;
}

.ref-id-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-md);
  padding: 1rem 2.1rem;
  margin-bottom: 2rem;
}

.ref-id-label {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.ref-id-value {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.03em;
}

.success-actions { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.portal-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.45);
  font-size: 0.77rem;
  text-align: center;
  padding: 1.2rem 1rem;
  line-height: 1.7;
  margin-top: auto;
  border-top: 2px solid var(--accent);
}

.portal-footer a { color: rgba(255,255,255,0.62); text-decoration: none; }
.portal-footer a:hover { color: #fff; text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .info-cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-container { padding: 0.75rem 1rem; }
  .brand-text h1 { font-size: 0.92rem; }
  .gov-seal { width: 38px; height: 38px; font-size: 1.05rem; }
  .main-wrapper { margin: 1rem auto 4rem; }
  .card-inner { padding: 1.35rem 1.1rem; }
  .fields-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .field-full { grid-column: 1; }
  .info-cards-grid { grid-template-columns: 1fr; }
  .stepper-rail { position: static; padding: 1rem; }
  .step-node .step-name { display: none; }
  .step-node { min-width: 32px; }
  .form-action-bar { flex-direction: column-reverse; align-items: stretch; }
  .btn-nav-group { margin-left: 0; }
  .btn { width: 100%; justify-content: center; }
  .guidelines-cta-row { flex-direction: column; align-items: stretch; }
  .cta-button-group { width: 100%; }
  .cta-button-group .btn { flex: 1; }
  .success-screen { padding: 2.5rem 1rem; }
  .success-actions { flex-direction: column; }
  .success-actions .btn { width: 100%; }
  .section-heading-block h2 { font-size: 1.22rem; }
  .guidelines-hero-banner { padding: 1.5rem 1.3rem; }
  .guidelines-hero-banner h2 { font-size: 1.18rem; }
}

@media (max-width: 480px) {
  .roadmap-pills { gap: 0.4rem; }
  .roadmap-pill { font-size: 0.73rem; padding: 0.26rem 0.65rem 0.26rem 0.32rem; }
  .gov-identity-bar { display: none; }
  .contact-strip { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
}
