  
  * { box-sizing:border-box; }
  html,body { margin:0; padding:0; }
  body { background:var(--cream); color:var(--text); font-family:var(--body); font-size:var(--t-body); line-height:1.55; }
  .wrap { max-width:760px; margin:0 auto; padding:32px 24px 80px; }
  .topline { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; }
  .wordmark { font-family:var(--display); font-weight:600; font-size:var(--t-h3); color:var(--text); text-decoration:none; padding-inline-start:18px; position:relative; }
  .wordmark::before { content:''; position:absolute; left:0; top:50%; transform:translateY(-50%); width:9px; height:9px; background:var(--forest); border-radius:50%; }
  h1 { font-family:var(--display); font-weight:600; font-size:30px; margin:0 0 6px; }
  .lede { color:var(--text-muted); font-size: var(--t-body); margin:0 0 var(--s-5); max-width:60ch; }
  .empty { background:var(--surface); border:1px solid var(--rule); border-radius:14px; padding:28px; text-align:center; }
  .empty a.btn { margin-top:14px; }
  .card { background:var(--surface); border:1px solid var(--rule); border-radius:14px; padding:22px 24px; margin-bottom:16px; }
  .field { margin-bottom:22px; }
  .field:last-child { margin-bottom:0; }
  .field-label { font-family:var(--sans); font-weight:600; font-size: var(--t-body); margin-bottom:3px; text-transform:none; letter-spacing:0; color:var(--ink); }
  .field-label .req { color:var(--forest); margin-inline-start:3px; font-weight:700; }
  .field-help { font-size: var(--t-small); color:var(--text-muted); margin-bottom:10px; }
  /* Missing-required highlight (applied on a failed save attempt) */
  .field.has-error { scroll-margin-top:24px; }
  .field.has-error .field-label { color:var(--forest-deep); }
  .field.has-error .opt { border-color:var(--forest); }
  .field.has-error input.input { border-color:var(--clay-soft); background:var(--clay-tint); }
  .field-error { display:none; font-size: var(--t-small); color:var(--forest-deep); font-weight:500; margin-top:9px; }
  .field.has-error .field-error { display:block; }
  .opts { display:flex; flex-wrap:wrap; gap:var(--s-2); }
  /* Real <button>s since CQ-37 (keyboard access) — font/color resets
     keep them pixel-identical to the spans they replaced. */
  .opt {
    border:1px solid var(--rule); background:var(--cream); border-radius:var(--r-pill);
    padding:8px 15px; font-size: var(--t-small); cursor:pointer; user-select:none;
    font-family:inherit; color:inherit; line-height:inherit;
    transition:border-color 120ms, background 120ms, color 120ms;
  }
  .opt:hover { border-color:var(--ink-soft); }
  .opt.sel { background:var(--ink); border-color:var(--ink); color:var(--cream); }
  .opt.multi.sel { background:var(--grow); border-color:var(--grow); color:#fff; }
  /* Box style comes from base.css .input (UX-1); intake only caps width. */
  input.input { max-width:320px; }
  .savebar { position:sticky; bottom:0; background:linear-gradient(180deg, rgba(250,248,241,0) 0%, var(--cream) 40%); padding:20px 0 4px; display:flex; align-items:center; gap:var(--s-4); }
  .btn { display:inline-flex; align-items:center; gap:var(--s-2); background:var(--forest); color:var(--cream); border:1px solid var(--forest); border-radius:10px; padding:12px 22px; font:inherit; font-weight:600; font-size: var(--t-body); cursor:pointer; text-decoration:none; }
  .btn:hover { background:var(--forest-deep); border-color:var(--forest-deep); }
  .btn:disabled { opacity:0.55; cursor:not-allowed; }
  .save-note { font-size:var(--t-small); color:var(--text-muted); }
  .save-note.ok { color:var(--grow); }
  .save-note.err { color:var(--forest-deep); }
  .skeleton { color:var(--text-muted); padding:40px; text-align:center; }
  /* Success banner shown at the top after a save, so the patient (who
     is down at the save button) is scrolled up to their new matches. */
  .save-success-top {
    display:flex; align-items:center; gap:10px;
    background:var(--grow-tint); border:1px solid var(--grow);
    color:var(--olive-deep); border-radius:10px;
    padding:11px 14px; margin:0 0 var(--s-4); font-size: var(--t-small); font-weight:500;
    animation: save-pop 260ms ease-out;
  }
  .save-success-top .check {
    display:inline-flex; align-items:center; justify-content:center;
    width:20px; height:20px; flex-shrink:0; border-radius:50%;
    background:var(--grow); color:#fff; font-size:12px; font-weight:700;
  }
  @keyframes save-pop { from { opacity:0; transform:translateY(-6px);} to { opacity:1; transform:none; } }
  /* Top matches */
  .section-title { font-family:var(--display); font-weight:600; font-size:19px; margin:4px 0 3px; }
  .section-sub { color:var(--text-muted); font-size:var(--t-small); margin:0 0 14px; }
  .matches-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; margin-bottom:8px; }
  .match-card { background:var(--surface); border:1px solid var(--rule); border-radius:14px; padding:16px 18px; display:flex; flex-direction:column; }
  .match-card.top { border-color:var(--forest); box-shadow:0 3px 16px rgba(184,93,58,0.10); }
  .mc-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
  .mc-name { font-weight:600; font-size:var(--t-body); }
  .mc-pct { font-family:var(--mono); font-weight:700; font-size:19px; color:var(--forest-deep); line-height:1; text-align: end; }
  .mc-pct span { display:block; font-size:9px; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-muted); font-weight:600; margin-top:2px; }
  .match-card.top .mc-pct { color:var(--forest); }
  .mc-cred { font-size:12px; color:var(--text-muted); margin:2px 0 9px; }
  .mc-reasons { list-style:none; margin:0 0 var(--s-3); padding:0; display:flex; flex-direction:column; gap:var(--s-1); }
  .mc-reasons li { font-size: var(--t-small); color:var(--text); padding-inline-start:17px; position:relative; }
  .mc-reasons li::before { content:'✓'; position:absolute; left:0; color:var(--grow); font-weight:700; }
  .mc-foot { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:var(--s-2); padding-top:6px; }
  .mc-price { font-size: var(--t-small); color:var(--text-muted); }
  .mc-book { background:var(--forest); color:#fff; font-size: var(--t-small); font-weight:600; padding:7px 13px; border-radius:var(--r-pill); text-decoration:none; white-space:nowrap; }
  .mc-book:hover { background:var(--forest-deep); }
  .matches-empty { background:var(--cream-deep); border:1px dashed var(--rule); border-radius:var(--r-md); padding:18px; color:var(--text-muted); font-size: var(--t-small); text-align:center; }
  .editor-title { font-family:var(--display); font-weight:600; font-size:19px; margin:30px 0 3px; }
  .rule { height:1px; background:var(--rule); border:0; margin:28px 0 0; }
  .explore-row { display:flex; align-items:center; gap:var(--s-3); flex-wrap:wrap; margin-top:14px; }
  .explore-link { display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:600; color:var(--forest); text-decoration:none; }
  .explore-link:hover { color:var(--forest-deep); }
  .explore-note { font-size:12px; color:var(--text-muted); }

  /* Responsive (UX-3) — single column by construction; phones just
     get tighter padding. */
  @media (max-width: 640px) {
    .wrap { padding: 20px 16px 60px; }
  }
