  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    /* Spectora brand palette */
    --navy: #052339;        /* Dark Blue – primary */
    --navy-mid: #1E3A5F;    /* Night Blue */
    --blue: #3577A8;        /* Open Sky */
    --blue-light: #e4eff7;  /* Open Sky tint */
    --teal: #00A341;        /* Spectora Green */
    --teal-light: #e0f5ea;  /* Green tint */
    --amber: #EC792B;       /* Orange accent */
    --amber-light: #fdf0e6; /* Orange tint */
    --green: #00A341;       /* Spectora Green */
    --green-light: #e0f5ea; /* Green tint */
    --red: #dc2626;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --radius: 8px;
    --radius-lg: 12px;
  }

  body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
  }


  /* ── Layout ── */
  .layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
  }

  @media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; }
  }

  /* ── Card ── */
  .card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--gray-500);
  }
  .card-body { padding: 20px; }

  /* ── Form sections ── */
  .section { margin-bottom: 24px; }
  .section:last-child { margin-bottom: 0; }

  .section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .section-title span {
    font-size: 1rem;
  }

  /* ── Fields ── */
  .field { margin-bottom: 14px; }
  .field:last-child { margin-bottom: 0; }
  label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
  }
  .label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
  }
  .label-row label { margin-bottom: 0; }
  .label-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--blue);
  }

  select, input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-900);
    background: var(--white);
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s;
    outline: none;
  }
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
  }
  select:focus, input[type="number"]:focus {
    border-color: var(--blue);
  }

  /* ── Slider ── */
  input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    cursor: pointer;
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(37,99,235,0.4);
  }
  input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--blue);
    border: none;
    cursor: pointer;
  }

  /* ── Two-col fields ── */
  .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* ── Toggle switches ── */
  .addon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .addon-toggle {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--white);
    user-select: none;
  }
  .addon-toggle:hover {
    border-color: var(--blue);
    background: #f8fbff;
  }
  .addon-toggle.active {
    border-color: var(--blue);
    background: var(--blue-light);
  }
  .addon-toggle-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .addon-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .addon-toggle.active .addon-name { color: var(--navy); }
  .addon-price {
    font-size: 0.775rem;
    color: var(--gray-500);
    font-weight: 600;
  }
  .addon-toggle.active .addon-price { color: var(--blue); }
  .addon-check {
    width: 18px; height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--gray-300);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--white);
    transition: all 0.15s;
  }
  .addon-toggle.active .addon-check {
    background: var(--blue);
    border-color: var(--blue);
  }
  .addon-check svg { display: none; }
  .addon-toggle.active .addon-check svg { display: block; }
  .addon-desc {
    font-size: 0.725rem;
    color: var(--gray-500);
    line-height: 1.3;
  }

  /* ── Sticky Results Panel ── */
  .results-panel {
    position: sticky;
    top: 20px;
  }

  /* ── Price Display ── */
  .price-hero {
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px 24px 20px;
    text-align: center;
  }
  .price-hero-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 4px;
  }
  .price-range {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
  }
  .price-suggested {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  .price-range-band {
    font-size: 0.875rem;
    color: #94a3b8;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
  }
  .price-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 8px;
  }

  /* ── Breakdown ── */
  .breakdown-card {
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
  }
  .breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
  }
  .breakdown-row:last-child { border-bottom: none; }
  .breakdown-label { color: var(--gray-700); }
  .breakdown-value { font-weight: 700; color: var(--gray-900); }
  .breakdown-value.addon { color: var(--teal); }
  .breakdown-total {
    background: var(--gray-50);
    border-top: 2px solid var(--gray-200) !important;
  }
  .breakdown-total .breakdown-label { font-weight: 700; color: var(--navy); }
  .breakdown-total .breakdown-value { font-size: 1.05rem; color: var(--navy); }

  .breakdown-section-head {
    padding: 8px 18px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
  }

  /* ── Metrics row ── */
  .metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--gray-200);
    border-top: 1px solid var(--gray-200);
  }
  .metric-cell {
    background: var(--white);
    padding: 14px 16px;
    text-align: center;
  }
  .metric-cell:first-child { border-radius: 0; }
  .metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    font-weight: 700;
  }
  .metric-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--navy);
    margin-top: 2px;
    letter-spacing: -0.02em;
  }
  .metric-sub {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 1px;
  }

  /* ── Market comparison bar ── */
  .market-card {
    margin-top: 16px;
  }
  .market-bar-wrap {
    padding: 16px 20px;
  }
  .market-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 8px;
    font-weight: 600;
  }
  .bar-track {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    position: relative;
    overflow: visible;
  }
  .bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    transition: width 0.4s ease;
    position: relative;
  }
  .bar-marker {
    position: absolute;
    top: -5px;
    width: 2px;
    height: 18px;
    background: var(--amber);
    border-radius: 1px;
  }
  .bar-marker::after {
    content: attr(data-label);
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--amber);
    font-weight: 700;
    white-space: nowrap;
  }
  .market-insight {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 500;
  }
  .market-insight.low { background: var(--amber-light); color: #92400e; }
  .market-insight.fair { background: var(--green-light); color: #14532d; }
  .market-insight.high { background: var(--blue-light); color: #1e3a8a; }

  /* ── Tips ── */
  .tips-card { margin-top: 16px; }
  .tip-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.8rem;
    color: var(--gray-700);
    display: flex;
    gap: 8px;
    line-height: 1.4;
  }
  .tip-item:last-child { border-bottom: none; }

  /* ── Methodology note ── */
  .methodology {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.5;
  }
  .methodology strong { color: var(--gray-700); }

  /* ── Animations ── */
  .fade-in { animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from { opacity: 0.6; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

  /* ── Highlight update ── */
  .flash { animation: flash 0.35s ease; }
  @keyframes flash { 0% { background: #e4eff7; } 100% { background: transparent; } }