/* Hero illustration (flat, drawn in SVG) */
  .hero-art { margin: 0; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--paper-2); }
  .hero-art svg { display: block; width: 100%; height: auto; }
  .hero-art figcaption { background: var(--yellow); border-top: 3px solid var(--ink); padding: 12px 18px; font-weight: 800; font-size: 1.1rem; }
  @media (max-width: 960px) { .hero-art { max-width: 560px; } }

  /* Sample bill with a cover button */
  .cover-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
  @media (max-width: 960px) { .cover-grid { grid-template-columns: 1fr; } }
  .bill { background: var(--white); border: 3px solid var(--ink); border-radius: 6px; padding: 26px 26px 22px; position: relative; margin: 0; box-shadow: 10px 10px 0 var(--paper-2), 10px 10px 0 2px var(--line); }
  @media (max-width: 600px) { .bill { padding: 24px 14px 16px; box-shadow: none; } }
  .bill-tag { position: absolute; top: -18px; left: 22px; background: var(--ink); color: #fff; font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
  .bill-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; border-bottom: 3px solid var(--ink); padding-bottom: 10px; margin-bottom: 4px; }
  .bill-head strong { font-size: 1.15rem; }
  .bill-head span { color: var(--ink-2); font-size: .9rem; }
  .pd { margin: 6px 0 10px; font-size: .95rem; }
  .pd div { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 3px 0; }
  .pd dt { font-weight: 700; }
  .pd dd { margin: 0; }
  .redact { padding: 0 4px; border-radius: 3px; background: var(--yellow-soft); box-shadow: inset 0 -2px 0 var(--amber); }
  .redact.is-covered { background: var(--ink); color: transparent; box-shadow: none; user-select: none; }
  .bill table { width: 100%; border-collapse: collapse; font-size: .95rem; }
  .bill td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
  .bill td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
  .bill tr.dup td { background: var(--yellow); }
  .bill tr.dup td:first-child { box-shadow: inset 6px 0 0 var(--red); }
  .bill .twice { display: inline-block; font-size: .8rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 6px; padding: 0 6px; margin-left: 4px; background: var(--white); }
  .bill .total td { border-bottom: 0; font-weight: 800; font-size: 1.05rem; }
  .ai-note { margin: 14px 0 0; display: flex; gap: 14px; background: var(--blue-soft); border: 2px solid var(--blue); border-radius: 14px; padding: 14px 16px; }
  .ai-note .who { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; text-align: center; line-height: 1.05; }
  .ai-note p { margin: 0; }
  .bill-cap { margin: 14px 0 0; color: var(--ink-2); font-size: .95rem; }
  .cover-side .status { min-height: 1.6em; margin: 0 0 14px; }
  #cover-btn[aria-pressed="true"] { background: var(--white); color: var(--ink); }
  .sticky { background: var(--yellow-soft); border: 3px solid var(--ink); border-radius: 4px; padding: 18px 22px; margin: 0 0 20px; box-shadow: 6px 6px 0 var(--yellow); transform: rotate(-1deg); }
  .sticky h3 { margin: 0 0 6px; }
  .sticky p { margin: 0; font-size: 1.1rem; }
  @media (prefers-reduced-motion: reduce) { .sticky { transform: none; } }

  /* Directions */
  .directions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; list-style: none; padding: 0; margin: 0; background: var(--white); border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; }
  .directions > li { padding: 28px 28px 30px; }
  .directions > li + li { border-left: 2px solid var(--line); }
  .directions .num { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.7rem; margin-bottom: 14px; }
  .directions h3 { font-size: 1.35rem; }
  .cover-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
  .cover-chips li { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: .95rem; }
  .cover-chips li::before { content: ""; width: 26px; height: 12px; background: var(--ink); border-radius: 2px; }
  @media (max-width: 960px) {
    .directions { grid-template-columns: 1fr; }
    .directions > li + li { border-left: 0; border-top: 2px solid var(--line); }
    .directions > li { display: grid; grid-template-columns: 64px 1fr; gap: 0 18px; }
    .directions .num { grid-row: span 3; margin: 0; }
  }
  @media (max-width: 600px) { .directions > li { grid-template-columns: 1fr; padding: 22px 18px; } .directions .num { grid-row: auto; margin-bottom: 10px; width: 52px; height: 52px; font-size: 1.4rem; } }

  /* One-job-at-a-time picker */
  .picker { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
  .picker legend { font-weight: 800; font-size: 1.25rem; margin-bottom: 14px; padding: 0; }
  .pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  @media (max-width: 960px) { .pick { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .pick { grid-template-columns: 1fr; gap: 10px; } }
  .pick-opt { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; background: var(--white); border: 3px solid var(--ink); border-radius: 14px; font-weight: 800; font-size: 1.1rem; line-height: 1.25; cursor: pointer; }
  .pick-opt:hover { background: var(--yellow-soft); }
  .pick-opt input { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--yellow); cursor: pointer; }
  .pick-opt .ic { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; color: var(--ink); }
  .pick-opt .ic .icon { width: 28px; height: 28px; }
  .pick-opt:has(input:checked) { background: var(--ink); color: #fff; }
  .pick-opt:has(input:focus-visible) { box-shadow: var(--focus); }
  .pick-opt input:focus-visible { box-shadow: none; }
  @media (max-width: 560px) { .pick-opt { min-height: 64px; } .pick-opt .ic { width: 40px; height: 40px; } }
  #builder.enhanced .rx { display: none; }
  #builder.enhanced .rx.is-on { display: block; }

  /* Prescription-label task cards */
  .rx-list { display: grid; gap: 40px; }
  .rx { background: var(--white); border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; scroll-margin-top: 20px; }
  .rx-head { display: flex; align-items: center; gap: 16px; padding: 18px 26px; border-bottom: 3px solid var(--ink); background: var(--paper-2); flex-wrap: wrap; }
  .rx-head .ic { width: 60px; height: 60px; border-radius: 14px; background: var(--yellow); border: 3px solid var(--ink); display: grid; place-items: center; flex: none; }
  .rx-head .ic .icon { width: 34px; height: 34px; }
  .rx-head h3 { margin: 0; font-size: 1.6rem; flex: 1; min-width: 12ch; }
  .rx-no { font-weight: 800; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; display: block; color: var(--ink-2); }
  .rx-body { padding: 26px; }
  @media (max-width: 600px) { .rx-head { padding: 16px; gap: 12px; } .rx-head h3 { font-size: 1.3rem; } .rx-head .ic { width: 50px; height: 50px; } .rx-body { padding: 20px 16px; } }
  .rx-desc { font-size: 1.1rem; max-width: 60ch; }
  .rx-cols { display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; gap: 28px; align-items: start; }
  .rx-cols.solo { grid-template-columns: 1fr; }
  @media (max-width: 860px) { .rx-cols { grid-template-columns: 1fr; } }
  .step-label { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 800; margin: 0 0 12px; }
  .step-label .n { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .9rem; flex: none; }
  .field { margin-bottom: 18px; }
  .field label { display: block; font-weight: 700; margin-bottom: 6px; }
  .field .eg { display: block; font-weight: 400; color: var(--ink-2); font-size: .9rem; }
  .field input {
    width: 100%; min-height: 56px; padding: 10px 14px; font: inherit; font-size: 1.05rem; color: var(--ink);
    border: 2px solid var(--ink); border-radius: 10px; background: var(--white);
  }
  .field input:focus-visible { box-shadow: var(--focus); border-radius: 10px; }
  .field input[aria-invalid="true"] { border-color: var(--red); border-width: 3px; }
  .guard { margin-top: 8px; padding: 12px 14px; border-radius: 10px; background: var(--red-soft); border: 2px solid var(--red); color: var(--ink); font-weight: 700; display: flex; gap: 10px; }
  .guard .icon { color: var(--red); width: 28px; height: 28px; }
  .words {
    margin: 0; padding: 20px 22px; background: var(--paper); border: 2px dashed var(--ink); border-radius: 14px; font-size: 1.15rem; line-height: 1.65;
  }
  .words mark { background: var(--yellow); color: var(--ink); padding: 0 .2em; border-radius: 4px; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  .words mark.filled { background: var(--green-soft); outline: 2px solid var(--green); outline-offset: -1px; }
  .words mark.bad { background: var(--red-soft); outline: 2px solid var(--red); }
  .copy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
  .copy-btn.done { background: var(--green); border-color: var(--green); }
  .copied { margin: 14px 0 0; padding: 14px 18px; background: var(--green-soft); border: 2px solid var(--green); border-radius: 12px; }
  .copied.fail { background: var(--yellow-soft); border-color: var(--ink); }
  .copied p { margin: 0; }
  .copied p + p { margin-top: 6px; }
  .rx-after { margin: 22px 0 0; padding: 14px 18px; border-left: 6px solid var(--ink); background: var(--paper); }
  .legend { color: var(--ink-2); font-size: .95rem; margin-top: 10px; }
  .legend mark { background: var(--yellow); color: var(--ink); padding: 0 .3em; border-radius: 4px; font-weight: 700; }

  /* Checklists */
  .checklist { list-style: none; padding: 0; margin: 0; }
  .checklist li + li { border-top: 1px solid var(--line); }
  .checklist label { display: flex; gap: 16px; align-items: flex-start; padding: 14px 4px; cursor: pointer; min-height: 56px; }
  .checklist input { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 36px; margin: 0; border: 3px solid var(--ink); border-radius: 8px; background: var(--white); cursor: pointer; display: grid; place-items: center; }
  .checklist input:checked { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/24px no-repeat; border-color: var(--green); }
  .checklist input:focus-visible { box-shadow: var(--focus); }
  .checklist input:checked + span { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-2); }
  .card h3 .icon { width: 34px; height: 34px; }

  /* Extras */
  .extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
  @media (max-width: 760px) { .extras { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 520px) { .extras { grid-template-columns: 1fr; } }
  .extras li { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; }
  .extras .icon { width: 40px; height: 40px; }
  .extras b { font-size: 1.1rem; }
  .extras q { quotes: "\201C" "\201D"; flex: 1; }
  .extras .btn { margin-top: 6px; width: 100%; }

  /* Help */
  .help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  @media (max-width: 960px) { .help-grid { grid-template-columns: 1fr; } }
  .help-grid .card { display: flex; flex-direction: column; }
  .help-grid .ic { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; margin-bottom: 12px; background: var(--yellow); }
  .help-grid .ic .icon { width: 32px; height: 32px; }
  .help-grid .say { font-size: 1.5rem; font-weight: 800; border-bottom: 3px solid var(--ink); align-self: flex-start; }

  @media print {
    #builder .rx { display: block !important; }
    .redact { background: none; box-shadow: none; }
    .field, .copy-row, .guard, .copied, .step-label .n { display: none !important; }
    .rx-cols { grid-template-columns: 1fr !important; }
    .rx { break-inside: avoid; }
    .words mark { background: none; border-bottom: 1px solid #000; }
    .checklist input { width: 14pt; height: 14pt; border-width: 1.5pt; }
  }

/* former inline style attributes */
.x1 { position:absolute !important; }
.x2 { font-size:18px !important; }
.x3 { font-size:22px !important; }
.x4 { font-size:27px !important; }
.x5 { margin:0 0 10px !important; }
.x6 { background:var(--yellow) !important; color:var(--ink) !important; padding:0 .3em !important; border-radius:4px !important; font-weight:700 !important; }
.x7 { margin:16px 0 0 !important; }
.x8 { margin-top:28px !important; }
.x9 { margin:18px 0 0 !important; font-size:1.15rem !important; }
.x10 { color:#fff !important; }

/* Video */
.video-band .video-frame { margin: 0; }
.video-band video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border: 3px solid var(--ink); border-radius: 16px; }
.video-band figcaption { margin-top: 12px; font-size: 1rem; }
.video-band details { margin-top: 16px; }
.video-band summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.video-band .transcript p { max-width: 70ch; }
