  :root {
    --bg: #0C1116;
    --surface: #131A21;
    --surface-2: #1B242D;
    --line: #2A3540;
    --text: #E7ECEF;
    --muted: #7C8A94;
    --copper: #E8A33D;
    --copper-dim: #8A6529;
    --teal: #4FD1C5;
    --bad: #E36565;
    --good: #6FCF97;
    --radius: 3px;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--bg);
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 48px 48px;
    background-attachment: fixed;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
  }

  /* subtle grid fade so it doesn't overwhelm content */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at top, transparent 0%, var(--bg) 75%);
    pointer-events: none;
    z-index: 0;
  }

  .wrap { max-width: 880px; margin: 0 auto; padding: 0 20px 100px; position: relative; z-index: 1; }

  h1, h2, h3 { font-family: 'Archivo Expanded', sans-serif; font-weight: 800; letter-spacing: -0.01em; margin: 0; }

  .mono { font-family: 'JetBrains Mono', monospace; }

  /* HEADER */
  header {
    padding: 40px 0 28px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 40px;
  }
  .eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--copper);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
  }
  header h1 { font-size: 34px; color: var(--text); }
  header h1 span { color: var(--copper); }
  header p { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 520px; }

  /* FORM CARD */
  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
  }
  .card-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 10px;
  }

  .field { margin-bottom: 24px; }
  .field:last-child { margin-bottom: 0; }
  .field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
  }
  .field .hint { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }

  input[type="range"] {
    width: 100%;
    accent-color: var(--copper);
    height: 4px;
  }
  .budget-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--copper);
    margin-top: 8px;
  }
  .budget-scale {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
  }

  .pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
  .pill {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    user-select: none;
  }
  .pill:hover { border-color: var(--copper-dim); color: var(--text); }
  .pill.active {
    border-color: var(--copper);
    color: var(--copper);
    background: rgba(232, 163, 61, 0.08);
  }

  .checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .checkbox-row input { accent-color: var(--copper); width: 16px; height: 16px; }
  .checkbox-row label { margin: 0; font-size: 13px; font-weight: 400; color: var(--text); cursor: pointer; }

  button.generate {
    width: 100%;
    padding: 16px;
    background: var(--copper);
    color: #0C1116;
    border: none;
    border-radius: var(--radius);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    margin-top: 8px;
    transition: background .15s;
  }
  button.generate:hover { background: #f0b355; }

  /* RESULTS: build sheet / receipt style */
  #results { display: none; }
  .sheet {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .sheet-head {
    padding: 22px 28px;
    border-bottom: 1px dashed var(--line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  .sheet-head h2 { font-size: 20px; }
  .sheet-head .sheet-id { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }

  .line-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
  }
  .line-item:last-child { border-bottom: none; }
  .li-slot {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--copper);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .li-name { font-size: 14px; font-weight: 500; }
  .li-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
  .li-price { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text); white-space: nowrap; }
  .li-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--teal);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
  }
  .li-link:hover { text-decoration: underline; }

  .sheet-total {
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-2);
    border-top: 1px solid var(--line);
  }
  .sheet-total .label { font-size: 13px; color: var(--muted); font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.08em; }
  .sheet-total .amount { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 700; color: var(--copper); }

  .compat-check {
    margin-top: 20px;
    padding: 20px 28px;
  }
  .compat-check h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; font-family: 'JetBrains Mono', monospace; font-weight: 700;}
  .check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
  .check-icon { width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
  .check-icon.ok { background: rgba(111,207,151,0.15); color: var(--good); }

  .disclaimer {
    margin-top: 24px;
    padding: 16px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--muted);
    background: var(--surface);
  }
  .disclaimer strong { color: var(--text); }

  footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
  }

  @media (max-width: 600px) {
    header h1 { font-size: 26px; }
    .line-item { grid-template-columns: 1fr; gap: 4px; }
    .li-price { text-align: left; }
  }