/* ===================================================================
   ClaimSetu (क्लेमसेतु) — Comprehensive Stylesheet
   Grounded in Indian Legal-Tech Aesthetics: High Trust, Deep Navy, Saffron, Emerald
   Zero Overflow, Full Responsive Mobile & Desktop Layout
   =================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;

  /* Palette */
  --bg-main: #0B1120;
  --bg-surface: #0F172A;
  --bg-card: #1E293B;
  --bg-card-subtle: #162032;
  --bg-card-hover: #24344D;

  --border-color: #334155;
  --border-light: #475569;
  --border-accent: rgba(249, 115, 22, 0.35);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-inverse: #0F172A;

  /* Accent Colors */
  --saffron: #F97316;
  --saffron-hover: #EA580C;
  --saffron-glow: rgba(249, 115, 22, 0.2);

  --emerald: #10B981;
  --emerald-dark: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.18);

  --blue-brand: #38BDF8;
  --blue-navy: #1E3A8A;
  --purple-brand: #8B5CF6;
  --amber: #F59E0B;
  --red-danger: #EF4444;
  --red-glow: rgba(239, 68, 68, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.25);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Base & Global Reset with Absolute Overflow Protection */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

/* Toast System */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: calc(100vw - 2.5rem);
}

.toast {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--saffron);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 440px;
}

.toast.toast-success {
  border-left-color: var(--emerald);
}

.toast.toast-error {
  border-left-color: var(--red-danger);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

/* Header */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  width: 100%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.brand-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 40%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--saffron);
  letter-spacing: 0.04em;
}

.version-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: -2px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Mode Switcher Pill */
.mode-selector {
  display: flex;
  background: var(--bg-main);
  padding: 3px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.mode-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.mode-pill:hover {
  color: var(--text-main);
}

.mode-pill.active {
  background: var(--bg-card);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-demo {
  background-color: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.dot-gemini {
  background-color: var(--blue-brand);
  box-shadow: 0 0 6px var(--blue-brand);
}

/* Settings Toggle */
.btn-settings-toggle {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-settings-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

/* BYOK Collapsible Drawer */
.byok-drawer {
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  animation: slideDown 0.25s ease forwards;
}

.byok-drawer.hidden {
  display: none;
}

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

.byok-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.byok-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-brand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.byok-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.byok-desc code {
  background: var(--bg-main);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--blue-brand);
  border: 1px solid var(--border-color);
}

.byok-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.input-with-icon {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
}

.input-with-icon input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 2.4rem 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--blue-brand);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.btn-input-icon {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-primary-sm {
  background: var(--blue-brand);
  color: var(--text-inverse);
  font-weight: 700;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  transition: opacity var(--transition-fast);
}

.btn-primary-sm:hover {
  opacity: 0.9;
}

.btn-ghost-sm {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.btn-ghost-sm:hover {
  color: var(--text-main);
  border-color: var(--border-light);
}

.link-get-key {
  color: var(--blue-brand);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
}

.link-get-key:hover {
  text-decoration: underline;
}

.byok-status-text {
  font-size: 0.8rem;
  color: var(--emerald);
  font-weight: 500;
}

/* ===================================================================
   Statutory Trust Strip — Responsive, No Horizontal Scrollbar
   =================================================================== */
.trust-ticker {
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem 0;
  width: 100%;
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  white-space: normal;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  line-height: 1.4;
}

.ticker-sep {
  color: var(--border-light);
  user-select: none;
}

@media (max-width: 820px) {
  .ticker-sep {
    display: none;
  }
  .ticker-inner {
    gap: 0.35rem 0.65rem;
    font-size: 0.74rem;
  }
  .ticker-item {
    background: rgba(30, 41, 59, 0.7);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding-top: 1.25rem;
  padding-bottom: 3.5rem;
}

/* ===================================================================
   3-STEP "HOW TO USE" QUICK ORIENTATION STRIP
   =================================================================== */
.how-to-use-strip {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.how-to-use-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.how-to-use-tag-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--blue-brand);
  box-shadow: 0 0 6px var(--blue-brand);
  animation: pulseDot 1.2s infinite alternate;
}

.how-to-use-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blue-brand);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.how-to-use-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.how-to-use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.how-to-use-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.how-to-use-card:hover {
  border-color: var(--blue-brand);
  background: var(--bg-card-hover);
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  color: var(--blue-brand);
  border: 1.5px solid var(--blue-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ===================================================================
   MASTER 4-PRESET SHOWCASE BANNER
   =================================================================== */
.master-presets-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.presets-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.presets-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.presets-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--saffron);
  letter-spacing: -0.01em;
}

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

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  font-family: inherit;
  width: 100%;
}

.preset-card:hover {
  border-color: var(--saffron);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.preset-card.active-preset {
  border-color: var(--emerald);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.preset-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.preset-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.preset-helper-note {
  font-size: 0.72rem;
  color: var(--blue-brand);
  font-weight: 600;
  margin-top: 0.15rem;
  padding-top: 0.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Badges */
.preset-badge,
.badge-warning,
.badge-danger,
.badge-info,
.badge-success,
.badge-teal,
.badge-primary {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue-brand);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-teal {
  background: rgba(20, 184, 166, 0.15);
  color: #14B8A6;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.badge-primary {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-brand);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ===================================================================
   NAVIGATION TABS (4 TABS)
   =================================================================== */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.tab-button {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all var(--transition-normal);
  position: relative;
}

.tab-button:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
  color: var(--text-main);
}

.tab-button.active {
  background: var(--bg-card);
  border-color: var(--saffron);
  color: var(--text-main);
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.15);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--saffron);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.tab-icon {
  color: var(--saffron);
  margin-bottom: 0.15rem;
  display: inline-flex;
}

.tab-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tab-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Tab Panels */
.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tab-panel.hidden {
  display: none !important;
}

/* Cards & Forms */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header-icon {
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-row-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
}

.required {
  color: var(--saffron);
}

.label-with-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-clear-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}

.btn-clear-text:hover {
  color: var(--saffron);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 2px var(--saffron-glow);
}

select {
  cursor: pointer;
}

textarea {
  resize: vertical;
  line-height: 1.5;
  font-family: var(--font-sans);
}

.input-prefix-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-prefix {
  position: absolute;
  left: 0.85rem;
  color: var(--saffron);
  font-weight: 700;
  font-size: 1rem;
  pointer-events: none;
}

.input-prefix-wrapper input {
  padding-left: 2rem;
  width: 100%;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--emerald);
  font-weight: 500;
  min-height: 1.1rem;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.confidential-badge {
  color: var(--emerald);
  font-weight: 500;
}

/* Primary Button */
.btn-primary-lg {
  background: linear-gradient(135deg, var(--saffron) 0%, #EA580C 100%);
  color: #FFFFFF;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-fast);
  width: 100%;
}

.btn-primary-lg:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-primary-lg.btn-teal {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary-lg.btn-teal:hover {
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

/* 3-Stage Animated Progress Bar */
.progress-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(249, 115, 22, 0.2);
  border-top-color: var(--saffron);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.progress-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.progress-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stage-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0;
}

.stage-item.active {
  border-color: var(--saffron);
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.stage-item.active .stage-dot {
  background: var(--saffron);
  box-shadow: 0 0 8px var(--saffron);
  animation: pulseDot 1s infinite alternate;
}

.stage-item.completed {
  border-color: var(--emerald);
  color: var(--text-main);
}

.stage-item.completed .stage-dot {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

@keyframes pulseDot {
  from { transform: scale(0.9); opacity: 0.7; }
  to { transform: scale(1.2); opacity: 1; }
}

.progress-bar-track {
  height: 6px;
  background: var(--bg-main);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--saffron) 0%, var(--emerald) 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Results Container */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.35s ease-out;
}

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

/* Ombudsman Alert Banner */
.ombudsman-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-left: 5px solid var(--emerald);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ombudsman-banner-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 300px;
}

.ombudsman-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ombudsman-banner-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ombudsman-badge-pill {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  border: 1px solid var(--emerald);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

/* Pipeline Stepper */
.pipeline-stepper {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.6rem 1rem;
  gap: 0.75rem;
  overflow-x: auto;
}

.step-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}

.step-nav.active {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
}

.step-num {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--saffron);
  color: #FFFFFF;
}

.step-connector {
  flex: 1;
  height: 1px;
  background: var(--border-color);
  min-width: 15px;
}

/* Step Cards */
.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.step-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.step-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.step-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(249, 115, 22, 0.15);
  color: var(--saffron);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.step-heading {
  font-size: 1.15rem;
  font-weight: 700;
}

.step-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Contestability Pill */
.contestability-pill {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.contestability-high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.contestability-medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.contestability-low {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Audit Grid */
.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.audit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.audit-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.audit-card-val {
  font-size: 1.05rem;
  font-weight: 700;
}

.text-danger { color: var(--red-danger); }
.text-success { color: var(--emerald); }
.text-warning { color: var(--amber); }
.text-primary { color: var(--blue-brand); }

/* Side by Side Comparison */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.comparison-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.col-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.col-insurer .col-header {
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
}

.col-law .col-header {
  background: rgba(16, 185, 129, 0.1);
  color: #6EE7B7;
}

.col-body {
  padding: 1rem;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  line-height: 1.5;
}

.col-point {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.col-point-bullet {
  color: var(--saffron);
  font-weight: 800;
  flex-shrink: 0;
}

.rationale-box {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rationale-box h4 {
  font-size: 0.9rem;
  color: var(--saffron);
  font-weight: 700;
}

.rationale-box p {
  font-size: 0.86rem;
  color: var(--text-main);
  line-height: 1.55;
}

/* Checklist */
.checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checklist-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.checklist-item.checked {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--emerald);
  flex-shrink: 0;
}

.checklist-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.checklist-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.checklist-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.consumables-alert-card {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.consumables-icon {
  font-size: 1.1rem;
  color: var(--blue-brand);
  flex-shrink: 0;
}

.consumables-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.consumables-text strong {
  color: var(--text-main);
}

/* Escalation Protocol Bar */
.escalation-protocol-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.protocol-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 200px;
  min-width: 0;
}

.protocol-badge {
  background: var(--bg-main);
  border: 1px solid var(--saffron);
  color: var(--saffron);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.protocol-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.protocol-info strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.protocol-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.protocol-arrow {
  color: var(--text-dim);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Appeal Letter Preview */
.letter-preview-wrapper {
  background: #090D16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.letter-toolbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.letter-type-label {
  font-weight: 700;
  color: var(--saffron);
}

.letter-format-tag {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.letter-content {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #E2E8F0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
}

.appeal-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-copy {
  background: var(--emerald);
  color: #FFFFFF;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--emerald-dark);
}

.letter-footer-notice {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.letter-footer-notice a {
  color: var(--blue-brand);
  text-decoration: none;
}

.letter-footer-notice a:hover {
  text-decoration: underline;
}

/* ===================================================================
   TAB 2: POLICY FINE-PRINT X-RAY STYLES
   =================================================================== */
.reality-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.reality-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 800;
}

.metric-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.reality-narrative-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
}

.reality-narrative-box p {
  margin-bottom: 0.6rem;
}

.reality-narrative-box p:last-child {
  margin-bottom: 0;
}

/* Hidden Trap Scanner */
.filter-legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trap-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.traps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.trap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform var(--transition-fast);
}

.trap-card:hover {
  transform: translateY(-2px);
}

.trap-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.trap-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.trap-clause {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--saffron);
}

.trap-impact {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Shield Section */
.shield-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-md);
}

.shield-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.shield-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.shield-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shield-box-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.shield-icon {
  font-size: 1.1rem;
}

.shield-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.shield-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.shield-list li strong {
  color: var(--text-main);
}

.shield-bullet {
  color: var(--emerald);
  font-weight: 800;
  flex-shrink: 0;
}

/* ===================================================================
   TAB 3: JARGON IN SIMPLE WORDS (PLAIN-ENGLISH TERM HELPER)
   =================================================================== */
.terms-helper-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.terms-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.terms-filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.terms-chip-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.term-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.term-chip:hover {
  color: var(--text-main);
  border-color: var(--border-light);
}

.term-chip.active {
  background: var(--emerald);
  color: #FFFFFF;
  border-color: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.term-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.term-card:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.term-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.65rem;
}

.term-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.term-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.term-statute {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: var(--bg-main);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}

.term-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.term-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.term-row-label {
  font-size: 0.78rem;
  color: var(--emerald);
  font-weight: 700;
}

.term-row p {
  color: var(--text-muted);
}

.term-row p strong {
  color: var(--text-main);
}

/* ===================================================================
   TAB 4: PROMPT ARCHITECTURE & ACCORDION
   =================================================================== */
.architecture-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.accordion-header:hover {
  background: var(--bg-card-hover);
}

.accordion-toggle-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item.open .accordion-toggle-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.accordion-item.open .accordion-content {
  display: block;
  animation: fadeIn 0.2s ease;
}

.statutory-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.75rem;
  width: 100%;
}

.statutory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
  min-width: 580px;
}

.statutory-table th,
.statutory-table td {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
}

.statutory-table th {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
}

.statutory-table td strong {
  color: var(--saffron);
}

.code-block {
  background: #090D16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #E2E8F0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 0.65rem;
  max-width: 100%;
}

.prompt-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

.architecture-privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.privacy-point {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.9rem;
  border-radius: var(--radius-md);
}

.privacy-point h4 {
  font-size: 0.9rem;
  color: var(--blue-brand);
  margin-bottom: 0.25rem;
}

.privacy-point p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Footer & Disclaimers */
.app-footer {
  background: #060A12;
  border-top: 1px solid var(--border-color);
  padding: 2.25rem 0 1.75rem 0;
  margin-top: auto;
  width: 100%;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.disclaimer-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.disclaimer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--amber);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.disclaimer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.footer-statutory-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-statutory-links a {
  color: var(--blue-brand);
  text-decoration: none;
}

.footer-statutory-links a:hover {
  text-decoration: underline;
}

/* ===================================================================
   Responsive Media Queries — Strict Overflow Prevention
   =================================================================== */
@media (max-width: 1040px) {
  .nav-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .how-to-use-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .nav-tabs {
    grid-template-columns: 1fr;
  }

  .form-row-three,
  .form-row-two,
  .comparison-container,
  .shield-grid,
  .progress-stages {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .escalation-protocol-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .protocol-arrow {
    display: none;
  }
}

@media (max-width: 540px) {
  .presets-grid {
    grid-template-columns: 1fr;
  }

  .terms-grid {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .btn-primary-lg {
    font-size: 0.92rem;
    padding: 0.75rem 1rem;
  }

  .card {
    padding: 1.15rem;
  }
}

@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  .app-header,
  .nav-tabs,
  .how-to-use-strip,
  .master-presets-banner,
  .form-card,
  .progress-box,
  .byok-drawer,
  .trust-ticker,
  .appeal-actions,
  .btn-ghost-sm,
  .app-footer {
    display: none !important;
  }

  .results-container,
  .step-card {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .letter-preview-wrapper,
  .letter-content {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1px solid #CCCCCC !important;
    max-height: none !important;
  }
}
