/* ====================================================================
   GAIXM by GISplan — modern, mobile-first stylesheet
   Brand color: #035BE2
   Single-column on phones; multi-column only on wide screens.
   ==================================================================== */

:root {
  --brand: #035BE2;
  --brand-dark: #0247B0;
  --brand-soft: #E7F0FF;
  --accent: #FFB23F;
  --sunset-1: #1E1B4B;
  --sunset-2: #6D28D9;
  --sunset-3: #F97316;
  --sunset-4: #FBBF24;
  --ink: #0B1F3A;
  --ink-soft: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-soft: #EEF2F7;
  --bg: #F4F7FB;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --success: #15803D;
  --success-bg: #ECFDF5;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --info: #1D4ED8;
  --info-bg: #EFF6FF;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.04), 0 1px 4px rgba(11, 31, 58, 0.04);
  --shadow: 0 6px 18px rgba(11, 31, 58, 0.06), 0 2px 4px rgba(11, 31, 58, 0.04);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, 0.12);

  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  line-height: 1.5;
}

/* ----------------------------- Typography --------------------------- */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.01em; }
h2 { font-size: clamp(18px, 2.6vw, 22px); }
h3 { font-size: 16px; }

p { margin: 0 0 12px; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.muted { color: var(--muted); }

/* ------------------------------ Nav bar ----------------------------- */
.nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
  min-width: 0;
}

.brand-logo {
  height: 40px;
  width: auto;
  flex: 0 0 auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.brand-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-left: 2px;
}

@media (max-width: 480px) {
  .brand-logo { height: 34px; }
  .brand-sub { font-size: 10px; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle:focus-visible { outline: 2px solid var(--brand); }

.nav-toggle svg { width: 22px; height: 22px; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.navlinks a {
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.navlinks a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.language-switcher { margin: 0; }

.language-switcher select {
  width: auto;
  min-width: 130px;
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 13px;
}

/* Mobile nav (hamburger) */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 12px 18px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav.open .navlinks { display: flex; }
  .nav.open .navlinks a { padding: 12px; font-size: 16px; }
  .language-switcher { margin-top: 8px; }
  .language-switcher select { width: 100%; }
  .nav { position: relative; }
}

/* ------------------------------ Layout ------------------------------ */
.container {
  max-width: 1180px;
  margin: 28px auto 56px;
  padding: 0 18px;
}

.dataconvert-page .container,
.validation-page .container {
  max-width: 1320px;
}

@media (max-width: 600px) {
  .container { margin: 18px auto 36px; padding: 0 14px; }
}

/* ------------------------------- Cards ------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .card { padding: 18px; border-radius: 12px; }
}

.card h2 { margin-bottom: 12px; }

/* --------------------------- Page header bar ------------------------ */
.pagebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.pagebar h1 { margin: 0; flex: 1 1 auto; min-width: 0; }

/* ----------------------------- Grid utility ------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
}

/* ----------------------------- Forms -------------------------------- */
label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 4px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(3, 91, 226, 0.12);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-top: 0;
}

/* ----------------------------- Buttons ------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  padding: 12px 18px;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
  transition: background .15s, transform .05s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(2, 71, 176, 0.18);
}
.button:hover { background: var(--brand-dark); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid rgba(3, 91, 226, 0.35); outline-offset: 2px; }
.button.disabled,
.button[disabled] { opacity: .55; pointer-events: none; }

.button.secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button.secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }

.button.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button.ghost:hover { background: var(--bg); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* On phones, full-width primary action */
@media (max-width: 480px) {
  .actions .button { flex: 1 1 100%; }
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ------------------------------ Pills ------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--brand-soft);
  border: 1px solid #C7DBFF;
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  letter-spacing: .02em;
}

/* ---------------------------- Tables -------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 10px;
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .04em;
  background: #FBFCFE;
}

.tablewrap { overflow: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* On small screens, table cells stack */
@media (max-width: 700px) {
  .responsive-table thead { display: none; }
  .responsive-table tr {
    display: block;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 0;
    padding: 6px 10px;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    flex: 0 0 40%;
  }
}

/* preview table specifically */
.preview-table { table-layout: auto; min-width: 100%; }
.preview-tablewrap { max-height: 520px; }
.preview-table thead th { position: sticky; top: 0; background: #FBFCFE; z-index: 1; }
.preview-table tbody tr:nth-child(even) { background: #FAFCFF; }
.preview-table th, .preview-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* ===================== LANDING PAGE (hero) ========================== */
.landing { background: #0B1320; }
.landing .container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
  padding: 56px 24px 88px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
  background-image: url("/static/img/hero-helicopter.jpg");
  background-size: cover;
  background-position: center 35%;
  z-index: -2;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-photo-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 11, 22, .15) 0%, rgba(8, 11, 22, .35) 50%, rgba(8, 11, 22, .82) 100%),
    linear-gradient(90deg, rgba(8, 11, 22, .55) 0%, rgba(8, 11, 22, .1) 50%, rgba(8, 11, 22, .55) 100%);
  z-index: -1;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 22px;
  justify-items: center;
}

.hero-logo {
  height: clamp(72px, 11vw, 120px);
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .45));
}

.hero h1 {
  /* fallback if used */
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.hero .tag {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  color: rgba(255,255,255,0.94);
  max-width: 620px;
  line-height: 1.55;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hero-actions .button {
  font-size: 16px;
  padding: 14px 22px;
}

.hero-actions .button.ghost-light {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.hero-actions .button.ghost-light:hover { background: rgba(255,255,255,0.2); }

.hero-footer {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  z-index: 1;
}

.hero-footer-logo {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
}

@media (max-width: 600px) {
  .hero { padding: 44px 18px 78px; min-height: calc(100vh - 72px); }
  .hero-footer { bottom: 16px; font-size: 11px; gap: 10px; }
  .hero-footer-logo { height: 22px; }
}

/* Feature row below the hero */
.feature-strip {
  background: #0F172A;
  color: rgba(255,255,255,0.95);
  padding: 44px 24px;
}
.feature-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .feature-strip-inner { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 22px;
}
.feature-card h3 {
  color: #fff;
  margin-bottom: 8px;
  font-size: 17px;
}
.feature-card p {
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-size: 14px;
}

/* ========================= DASHBOARD TILES ========================== */
.dash-header {
  margin-bottom: 26px;
}
.dash-header h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4.2vw, 38px);
  letter-spacing: -0.01em;
}
.dash-header .dash-who { color: var(--brand); }
.dash-lede {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.dash-lede .dash-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 10px;
  background: var(--brand-soft);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 13px;
}
.dash-lede .dash-stat strong { color: var(--brand-dark); font-weight: 800; }

.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1100px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
}

.tile {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  min-height: 200px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.tile::before {
  /* subtle brand glow on hover */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 100% 0%, rgba(3, 91, 226, 0.07) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #C7DBFF;
}
.tile:hover::before { opacity: 1; }
.tile:focus-visible {
  outline: 3px solid rgba(3, 91, 226, 0.4);
  outline-offset: 2px;
}

.tile h2 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: .005em;
}
.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(3, 91, 226, 0.12);
}
.tile-icon svg { width: 26px; height: 26px; }

.tile-icon-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(3, 91, 226, 0.25);
}

.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
  transition: gap .15s ease;
}
.tile:hover .tile-cta { gap: 10px; color: var(--brand-dark); }

.tile-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
}

/* ----------------------------- Login -------------------------------- */
.login {
  width: 100%;
  max-width: 420px;
  margin: 60px auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.login h1 { text-align: center; margin-bottom: 18px; }
.login .button { width: 100%; margin-top: 16px; }

/* ========================== DATACONVERT ============================= */
.dataconvert-page {
  background: linear-gradient(180deg, #EEF5FF 0%, #F7FAFC 30%, #F4F7FB 100%);
  min-height: 100vh;
}

.dataconvert-page .dataconvert-hero {
  display: grid;
  gap: 14px;
  padding: 24px 26px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0B1F3A 0%, #035BE2 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .dataconvert-page .dataconvert-hero {
    grid-template-columns: 1fr auto;
    align-items: flex-start;
    gap: 24px;
  }
}

.dataconvert-page .dataconvert-hero h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(24px, 4vw, 34px);
}

.dataconvert-page .dataconvert-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.55;
}

.dataconvert-page .dataconvert-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dataconvert-page .hero-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 800;
}
.dataconvert-page .hero-pill.ghost { background: rgba(255, 255, 255, 0.08); }

.dataconvert-page .backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  opacity: .9;
}
.dataconvert-page .backlink:hover { opacity: 1; }

.dataconvert-page .notice-banner {
  background: var(--warning-bg);
  border: 1px solid #FED7AA;
  color: #9A3412;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* SINGLE COLUMN ALWAYS on phones, two columns only on wide screens */
.dataconvert-page .dataconvert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1080px) {
  .dataconvert-page .dataconvert-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 24px;
  }
}

.dataconvert-page .dataconvert-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

/* SINGLE COLUMN form grid on phones */
.dataconvert-page .dataconvert-formgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (min-width: 720px) {
  .dataconvert-page .dataconvert-formgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

.dataconvert-page .dataconvert-source { margin-top: 4px; }
.dataconvert-page .dataconvert-rules { margin-top: 18px; }
.dataconvert-page .dataconvert-source-analysis { margin-top: 18px; }

.dataconvert-page .dataconvert-result {
  background: linear-gradient(180deg, #ffffff 0%, #F8FBFF 100%);
}

.dataconvert-page .dataconvert-result-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dataconvert-page .dataconvert-hint {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  border: 1px dashed #D7DFEA;
}

.dataconvert-page .dataconvert-lower { margin-top: 22px; }

/* ============================ VALIDATION ============================ */
.validation-page {
  background: var(--bg);
  min-height: 100vh;
}

.validation-page .validation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}
@media (min-width: 1080px) {
  .validation-page .validation-grid {
    grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
    gap: 24px;
  }
}

.validation-page .validation-panel { height: 100%; }
.validation-page .notice-banner {
  background: var(--warning-bg);
  border: 1px solid #FED7AA;
  color: #9A3412;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* ============================ MAPPING ============================== */
.mapping {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .mapping { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
}

.mapping-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 12px;
}

.mapping-columns {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.mapping-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mapping-chip,
.mini-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 6px 10px;
}
.mapping-chip.success, .mini-pill.success { background: var(--success-bg); border-color: #BBF7D0; color: #166534; }
.mapping-chip.warning, .mini-pill.warning { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; }
.mini-pill.info       { background: var(--info-bg); border-color: #BFDBFE; color: var(--info); }
.mini-pill.neutral    { background: #F8FAFC; border-color: #CBD5E1; color: var(--ink-soft); }
.mini-pill.muted      { background: #F8FAFC; border-color: #E2E8F0; color: var(--muted); }
.mapping-chip.error   { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }

.column-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 18px 0;
}
@media (min-width: 720px) {
  .column-preview-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.column-preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FBFDFF;
  padding: 14px;
}

.column-preview-head { display: grid; gap: 10px; margin-bottom: 8px; }
.column-preview-title { display: grid; gap: 6px; }

.dataconvert-page .source-assigner {
  display: grid;
  gap: 6px;
  width: 100%;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.dataconvert-page .source-assigner select { margin-top: 0; width: 100%; min-width: 0; font-size: 13px; }

.column-preview-head strong { font-size: 14px; word-break: break-word; }
.column-preview-meta {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
  color: var(--muted); font-size: 12px; font-weight: 700;
}
.column-preview-values { display: grid; gap: 6px; }
.column-preview-values code {
  display: block; background: #EEF2FF; color: var(--ink); border-radius: 6px;
  padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ----------------------------- Rules -------------------------------- */
.rule-group {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.rule-group legend { font-weight: 800; padding: 0 8px; color: var(--ink); }

.rule-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .rule-options { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.rule-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #FBFDFF;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rule-option:hover { background: #F1F5FF; border-color: #C7DBFF; }
.rule-option input { width: auto; margin-top: 2px; }
.rule-option span { display: grid; gap: 4px; }
.rule-option small { display: block; font-weight: 500; color: var(--muted); }

/* ----------------------------- Misc --------------------------------- */
pre {
  white-space: pre-wrap;
  background: #0B1F3A;
  color: #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13px;
  line-height: 1.5;
  overflow: auto;
}

.error, .notice {
  background: var(--danger-bg);
  color: #991B1B;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.notice { background: var(--info-bg); color: #075985; }
.notice-card { border-color: #BAE6FD; }

.status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}
.status-pill.success { background: var(--success-bg); border-color: #BBF7D0; color: #166534; }
.status-pill.warning { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; }
.status-pill.error   { background: var(--danger-bg);  border-color: #FECACA; color: #991B1B; }
.status-pill.info    { background: var(--info-bg);    border-color: #BFDBFE; color: var(--info); }
.status-pill.muted   { background: #F8FAFC;           border-color: #E2E8F0; color: var(--ink-soft); }

.messages {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 12px;
  line-height: 1.45;
}
.message-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; min-width: 20px; font-weight: 900;
}
.message.success { background: var(--success-bg); border-color: #BBF7D0; color: #166534; }
.message.warning { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; }
.message.error   { background: var(--danger-bg);  border-color: #FECACA; color: #991B1B; }
.message.info    { background: var(--info-bg);    border-color: #BFDBFE; color: var(--info); }
.messages.compact .message { padding: 10px 12px; }

.deterministic-parts { display: grid; gap: 16px; margin-top: 18px; }
.part-block { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.part-block h3 { margin: 0 0 6px; font-size: 17px; }

/* --------------------------- Settings ------------------------------- */
.settings-card { max-width: 680px; }

.settings-library { margin-top: 28px; width: 100%; }
.settings-library-groups { display: grid; gap: 22px; }
.settings-library-group h3 { margin: 0 0 12px; font-size: 17px; }

.reference-list { display: grid; gap: 12px; }

.reference-row {
  display: grid;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
@media (min-width: 720px) {
  .reference-row {
    grid-template-columns: 1fr auto;
    align-items: flex-start;
  }
}
.reference-row:first-child { border-top: 0; padding-top: 0; }

.reference-copy { min-width: 0; }
.reference-topline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reference-filename { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; word-break: break-all; }
.reference-copy .muted { margin: 8px 0 0; }

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}
@media (max-width: 480px) {
  .reference-actions .button { flex: 1 1 100%; }
}

/* --------------------------- Misc helpers --------------------------- */
.inline-form { display: inline; margin: 0; }

.link-button {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.danger-link { color: var(--danger); }

/* ============================ SITE FOOTER =========================== */
.site-footer {
  margin-top: 64px;
  background: #0B1F3A;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.6;
}

/* Landing page already has its own dark hero — tighten the spacing */
.landing .site-footer { margin-top: 0; }
/* Dataconvert/validation pages have tinted backgrounds — let footer break out */
.dataconvert-page .site-footer,
.validation-page .site-footer { margin-top: 56px; }

.site-footer a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  display: block;
}
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 22px 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 760px) {
  .site-footer-inner {
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    padding: 44px 22px 28px;
  }
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer-logo {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .95;
}

.site-footer-tag {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  max-width: 480px;
}

.site-footer-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 480px) {
  .site-footer-contact { grid-template-columns: 1fr 1fr; gap: 28px; }
}

.site-footer-block { display: grid; gap: 4px; }

.site-footer-label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}

.site-footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 22px 22px;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: .02em;
}

.site-footer-base-right { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 480px) {
  .site-footer-inner { padding: 28px 18px 22px; }
  .site-footer-base { padding: 14px 18px 20px; font-size: 11px; }
}
