:root {
  color-scheme: light;

  /* --- Premium Color System --- */
  /* Primary: Trustworthy, Deep Royal Blue */
  --primary: #0f53d6;
  --primary-hover: #0a3bb0;
  --primary-light: #eff4ff; /* Very subtle blue tint */
  --primary-border: #bfdbfe;

  /* Neutrals: Clean, Sophisticated Slate */
  --bg-page: #f0f4f8;       /* Cool light gray/blue background for depth */
  --bg-surface: #ffffff;    /* Pure white for cards */
  --text-main: #0f172a;     /* Deep slate for headings */
  --text-body: #334155;     /* Softer slate for body text */
  --text-muted: #64748b;    /* Muted text */
  --border-subtle: #e2e8f0; /* Light borders */
  --border-strong: #cbd5e1; /* Interaction borders */

  /* Status Colors: Refined & Modern */
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --success-border: #a7f3d0;

  --warning-bg: #fffbeb;
  --warning-text: #b45309;
  --warning-border: #fde68a;

  --danger-bg: #fef2f2;
  --danger-text: #b91c1c;
  --danger-border: #fecaca;

  /* Shadows: Elevation System */
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.04);
  --shadow-input: 0 0 0 3px rgba(15, 83, 214, 0.15); /* Focus ring */

  /* Typography & Sizing */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px; /* Softer, modern corners */
  
  --container-width: 720px;
  --header-height: 72px;
}

/* --- Global Reset & Base --- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
}

/* --- Typography Utilities --- */
h1, h2, h3, h4 {
  color: var(--text-main);
  margin-top: 0;
  letter-spacing: -0.025em; /* Tighter headings for modern look */
}

p {
  margin: 0 0 1.5em;
}

/* --- Layout Components --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header: Clean & Solid --- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.brand__subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 0;
}

.site-nav a:hover {
  color: var(--primary);
  border-bottom-color: transparent; /* No underline for nav items, maybe just color change */
}

/* --- Main Content --- */
#main {
  flex: 1;
  padding-top: 40px;
  padding-bottom: 60px;
}

/* --- Card Component: The Paper Metaphor --- */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5); /* Subtle inner light */
  padding: 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden; /* For containing potential backgrounds */
}

/* Subtle accent line on top of card */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  opacity: 1;
}

@media (max-width: 640px) {
  .card {
    padding: 24px;
    border-radius: var(--radius-md);
  }
  
  .site-header {
    height: auto;
    padding: 16px 0;
  }
  
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
  }
}

/* --- Forms & Inputs --- */
.field {
  margin-bottom: 28px;
  border: 0;
  padding: 0;
}

.question__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.question__desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

input[type="date"],
select {
  appearance: none;
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-main);
  background-color: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

input[type="date"] {
  background-image: none; /* Let date picker UI handle it, or use custom icon */
}

input[type="date"]:hover,
select:hover {
  border-color: var(--border-strong);
}

input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-input);
}

/* --- Radio Option Tiles --- */
.option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.option {
  position: relative;
  display: flex;
  align-items: center; /* Center vertically specifically */
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 2px solid var(--border-subtle); /* Thicker border for touch targets */
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.option:hover {
  border-color: var(--border-strong);
  background: var(--bg-page);
}

/* Selected State */
.option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.option__label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
}

/* --- Buttons --- */
.wizard-actions {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border-radius: 9999px; /* Pill shape */
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(15, 83, 214, 0.2);
}

.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -1px rgba(15, 83, 214, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

/* --- Results --- */
.result-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.result-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin: 16px 0 8px;
  letter-spacing: -0.03em;
}

.result-meta {
  color: var(--text-muted);
  font-size: 16px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.badge--ok { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.badge--warn { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.badge--danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.badge--info { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }

/* --- Callouts --- */
.callout {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.callout__title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 15px;
}

.callout--warning .callout__title {
  color: #9a3412; /* Darker orange for contrast */
}

/* --- FAQ Section --- */
.faq-section h2 {
    font-size: 24px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-subtle);
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-item[open] {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  background: var(--primary-light);
}

.faq-question {
  padding: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none; /* Reset standard styles */
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '';
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7' /%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s;
}

details[open] .faq-question::after {
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f53d6' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7' /%3e%3c/svg%3e");
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--text-body);
  border-top: 1px solid transparent;
}

/* --- Footer & Extras --- */
.fineprint {
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 32px;
  text-align: center;
}

.fineprint a, .privacy-note a {
  text-decoration: underline;
  color: var(--text-muted);
}

.privacy-note {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
}

.site-footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-top: auto; /* Push to bottom */
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus {
  left: 20px;
}
