
  .qsbs-tool {
    /* Vickery Law brand tokens — see Brand Style Guide */
    --slate:      #2B3453;
    --slate-deep: #232B45;
    --slate-mid:  #3D4765;
    --sage:       #7C8B5F;
    --sage-deep:  #5F6E47;
    --sage-light: #B4BF97;
    --paper:      #F5F6F3;
    --paper-2:    #ECEEE8;
    --ink:        #1F2540;
    --body:       #4B5560;
    --muted:      #6A7480;
    --line:       #DBDFD9;
    --white:      #FFFFFF;
    --amber:      #B0812B;   /* caution only — never the retired brand gold */
    --shadow:     0 1px 2px rgba(31,37,64,.05), 0 6px 22px rgba(31,37,64,.07);
    /* chart: taxed portion, hatched to separate it from the solid over-cap band */
    --hatch: repeating-linear-gradient(135deg, #2B3453 0 3px, #C3C8D4 3px 8px);
    color-scheme: light;
  }
  .qsbs-tool * { box-sizing: border-box; }
  .qsbs-tool { -webkit-text-size-adjust: 100%; }
  .qsbs-tool {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--body);
    background: var(--paper);
  }
  .qsbs-tool h1, .qsbs-tool h2, .qsbs-tool h3, .qsbs-tool .serif {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -.012em;
    line-height: 1.16;
    text-wrap: balance;
  }
  .qsbs-tool a { color: var(--slate); text-underline-offset: 3px; }
  .qsbs-tool a:hover { color: var(--sage-deep); }
  .qsbs-tool :focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
  .qsbs-tool .wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
  .qsbs-tool .prose { max-width: 68ch; }

  /* Kicker — mono, uppercase, .22em, per style guide */
  .qsbs-tool .kick {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; font-weight: 500;
    letter-spacing: .22em; text-transform: uppercase;
    color: var(--sage-deep); display: block; margin-bottom: 12px;
  }
  .qsbs-tool .kick.on-dark { color: var(--sage-light); }
  /* Sage hairline beneath section headings */
  .qsbs-tool .rule { width: 38px; height: 2px; background: var(--sage); border: 0; margin: 0 0 20px; }

  /* Site header. Matches the main site so this page reads as part of it.
     Hidden while embedded - see the script at the foot of this file. */
  .qsbs-tool .site-head { background: var(--slate-deep); border-bottom: 1px solid rgba(255,255,255,.08); }
  .qsbs-tool .site-head .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding-block: 16px; flex-wrap: wrap;
  }
  .qsbs-tool .site-head .brand {
    font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 400;
    letter-spacing: 0; color: #fff; text-decoration: none; white-space: nowrap;
  }
  .qsbs-tool .site-head nav { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; }
  .qsbs-tool .site-head nav a {
    font-size: 14.5px; color: #fff; text-decoration: none;
    border-bottom: 1px solid transparent; padding-bottom: 2px;
  }
  .qsbs-tool .site-head nav a:hover { opacity: .75; }
  .qsbs-tool .site-head nav a[aria-current="page"] { border-bottom-color: var(--sage-light); }
  @media (max-width: 720px) {
    .qsbs-tool .site-head .wrap { gap: 12px; }
    .qsbs-tool .site-head .brand { font-size: 19px; }
    .qsbs-tool .site-head nav { gap: 6px 16px; }
    .qsbs-tool .site-head nav a { font-size: 13px; }
  }

  /* Notice bar */
  .qsbs-tool .notice { background: var(--slate-deep); color: #C8D0DF; font-size: 13.5px; }
  .qsbs-tool .notice .wrap { padding-block: 11px; }
  .qsbs-tool .notice a { color: var(--sage-light); }
  .qsbs-tool .notice a:hover { color: var(--white); }

  /* Hero */
  .qsbs-tool .hero { padding-block: 60px 30px; }
  .qsbs-tool .hero h1 {
    font-size: clamp(32px, 5.4vw, 54px);
    margin: 0 0 20px; max-width: 16ch;
  }
  .qsbs-tool .hero .lede { font-size: 18.5px; color: var(--slate-mid); margin: 0; max-width: 62ch; }

  /* Tool */
  .qsbs-tool .tool {
    display: grid; grid-template-columns: minmax(280px, 370px) 1fr;
    gap: 34px; padding-block: 28px 52px; align-items: start;
  }
  .qsbs-tool .inputs {
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    padding: 26px; box-shadow: var(--shadow);
  }
  .qsbs-tool .inputs h2, .qsbs-tool .results h2 { font-size: 21px; margin: 0 0 4px; }
  .qsbs-tool .privacy-inline { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
  .qsbs-tool .field { margin-bottom: 20px; }
  .qsbs-tool .field > label, .qsbs-tool .field > .label {
    display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; color: var(--ink);
  }
  .qsbs-tool .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
  .qsbs-tool input[type="text"], .qsbs-tool select {
    width: 100%; font: inherit; font-size: 16.5px; color: var(--ink);
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white);
  }
  .qsbs-tool input[type="text"]:hover, .qsbs-tool select:hover { border-color: var(--sage-light); }
  .qsbs-tool .money { position: relative; }
  .qsbs-tool .money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
  .qsbs-tool .money input { padding-left: 26px; }
  .qsbs-tool .segmented {
    display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line);
    border-radius: 999px; overflow: hidden; background: var(--white);
  }
  .qsbs-tool .segmented input { position: absolute; opacity: 0; pointer-events: none; }
  .qsbs-tool .segmented label {
    padding: 10px 8px; text-align: center; font-size: 13.5px; cursor: pointer;
    line-height: 1.3; color: var(--body); transition: background .15s, color .15s;
  }
  .qsbs-tool .segmented label + input + label { border-left: 1px solid var(--line); }
  .qsbs-tool .segmented input:checked + label { background: var(--slate); color: var(--white); font-weight: 500; }
  .qsbs-tool .segmented input:focus-visible + label { outline: 3px solid var(--sage); outline-offset: -3px; }
  .qsbs-tool .stepper {
    display: flex; align-items: center; width: max-content;
    border: 1px solid var(--line); border-radius: 999px; background: var(--white); overflow: hidden;
  }
  .qsbs-tool .stepper button {
    font: inherit; font-size: 20px; width: 44px; height: 42px; border: 0;
    background: transparent; color: var(--slate); cursor: pointer;
  }
  .qsbs-tool .stepper button:hover:not(:disabled) { background: var(--paper-2); }
  .qsbs-tool .stepper button:disabled { color: #C3C8C0; cursor: default; }
  .qsbs-tool .stepper output {
    min-width: 46px; text-align: center; font-weight: 600; font-size: 18px; color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .qsbs-tool input[type="range"] { width: 100%; accent-color: var(--sage-deep); }
  .qsbs-tool .range-row { display: flex; justify-content: space-between; align-items: baseline; }
  .qsbs-tool .range-row output { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
  .qsbs-tool details.advanced { border-top: 1px solid var(--line); padding-top: 16px; }
  .qsbs-tool details.advanced summary {
    cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--slate);
  }
  .qsbs-tool .adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
  .qsbs-tool .adv-grid label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; color: var(--ink); }
  .qsbs-tool .check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-top: 10px; }
  .qsbs-tool .check input { margin-top: 4px; accent-color: var(--sage-deep); }

  /* Results */
  .qsbs-tool .results {
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    padding: 26px 28px 28px; box-shadow: var(--shadow);
  }
  .qsbs-tool .headline-result { border-left: 3px solid var(--sage); padding: 4px 0 4px 18px; margin: 16px 0 26px; }
  .qsbs-tool .headline-result .big {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(34px, 5vw, 48px); font-weight: 500; line-height: 1.1;
    color: var(--ink); font-variant-numeric: tabular-nums;
  }
  .qsbs-tool .headline-result p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
  .qsbs-tool .chart { display: grid; grid-template-columns: minmax(84px, 1fr) 4fr; gap: 22px; margin-bottom: 8px; }
  .qsbs-tool .panel h3 {
    font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .14em;
    text-transform: uppercase; margin: 0 0 12px; color: var(--muted); font-weight: 600;
  }
  .qsbs-tool .plot { height: 280px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 2px solid var(--slate); }
  .qsbs-tool .col {
    flex: 1 1 0; max-width: 76px; min-width: 18px; height: 100%; position: relative;
    display: flex; flex-direction: column; justify-content: flex-end;
  }
  .qsbs-tool .bar {
    display: flex; flex-direction: column-reverse; width: 100%;
    transition: height .35s ease; border-radius: 4px 4px 0 0; overflow: hidden;
  }
  /* 2px surface gap between stacked fills, per mark specs */
  .qsbs-tool .seg { width: 100%; transition: height .35s ease; box-shadow: 0 -2px 0 0 var(--white); }
  .qsbs-tool .seg:first-child { box-shadow: none; }
  .qsbs-tool .seg.ex   { background: var(--sage); }
  .qsbs-tool .seg.p28  { background: var(--hatch); }
  .qsbs-tool .seg.over { background: var(--slate); }
  .qsbs-tool .cap-tick { position: absolute; left: -5px; right: -5px; border-top: 2px dashed var(--sage-deep); }
  .qsbs-tool .val {
    font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600;
    text-align: center; margin-bottom: 5px; white-space: nowrap; color: var(--ink);
  }
  .qsbs-tool .labels { display: flex; gap: 10px; margin-top: 8px; }
  .qsbs-tool .labels span {
    flex: 1 1 0; max-width: 76px; min-width: 18px; font-size: 11.5px;
    text-align: center; color: var(--muted); line-height: 1.25;
  }
  .qsbs-tool .legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--body); margin: 16px 0 24px; }
  .qsbs-tool .legend i { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 7px; border-radius: 2px; }
  .qsbs-tool .legend .l-ex   { background: var(--sage); }
  .qsbs-tool .legend .l-28   { background: var(--hatch); }
  .qsbs-tool .legend .l-over { background: var(--slate); }
  .qsbs-tool .legend .l-cap  { height: 0; border-top: 2px dashed var(--sage-deep); vertical-align: 4px; border-radius: 0; }
  .qsbs-tool table.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
  .qsbs-tool .table-scroll { overflow-x: auto; }
  .qsbs-tool table.compare th, .qsbs-tool table.compare td {
    padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .qsbs-tool table.compare th:first-child, .qsbs-tool table.compare td:first-child { text-align: left; font-variant-numeric: normal; }
  .qsbs-tool table.compare thead th {
    font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--slate); font-weight: 600;
  }
  .qsbs-tool table.compare tr.total td { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--slate); }
  .qsbs-tool .alert {
    background: #FBF6EC; border: 1px solid #E6D7B8; border-left: 3px solid var(--amber);
    border-radius: 8px; padding: 13px 15px; font-size: 14.5px; margin: 18px 0 0;
  }
  .qsbs-tool .alert:empty { display: none; }
  .qsbs-tool .insight { font-size: 15px; margin: 18px 0 0; color: var(--body); }

  /* Content sections */
  .qsbs-tool .section { padding-block: 54px; border-top: 1px solid var(--line); }
  .qsbs-tool .section h2 { font-size: clamp(25px, 3.2vw, 33px); margin: 0 0 16px; }
  .qsbs-tool .section p { margin: 0 0 16px; }
  .qsbs-tool .section ul { padding-left: 20px; margin: 0 0 16px; }
  .qsbs-tool .section li { margin-bottom: 9px; }
  .qsbs-tool .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
  .qsbs-tool .col-follow { padding-top: 64px; }
  .qsbs-tool .team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0 30px; }
  .qsbs-tool .team div {
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    padding: 22px 22px 18px; box-shadow: var(--shadow);
  }
  .qsbs-tool .team .tick { width: 24px; height: 2px; background: var(--sage); margin-bottom: 14px; }
  .qsbs-tool .team strong {
    display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 500;
    font-size: 17px; color: var(--ink); margin-bottom: 7px;
  }
  .qsbs-tool .team p { font-size: 14.5px; color: var(--body); margin: 0; }
  /* Pill button — slate bg, white text; hover sage with slate-deep text */
  .qsbs-tool .cta {
    display: inline-block; background: var(--slate); color: var(--white); text-decoration: none;
    font-weight: 600; font-size: 14.5px; padding: 13px 26px; border-radius: 999px;
    transition: background .16s, color .16s;
  }
  .qsbs-tool .cta:hover { background: var(--sage); color: var(--slate-deep); }

  /* Disclaimers */
  .qsbs-tool .legal { background: var(--paper-2); }
  .qsbs-tool .legal .section { border-top: 0; }
  .qsbs-tool .legal h3 {
    font-family: 'Fraunces', Georgia, serif; font-weight: 500;
    font-size: 17px; margin: 24px 0 6px; color: var(--ink);
  }
  .qsbs-tool .legal p { font-size: 15px; }

  @media (max-width: 900px) {
    .qsbs-tool .tool { grid-template-columns: 1fr; }
    .qsbs-tool .two-col { grid-template-columns: 1fr; gap: 0; }
    .qsbs-tool .col-follow { padding-top: 0; }
    .qsbs-tool .team { grid-template-columns: 1fr; }
  }
  @media (max-width: 520px) {
    .qsbs-tool { font-size: 16px; }
    .qsbs-tool .wrap { padding-inline: 18px; }
    .qsbs-tool .hero { padding-top: 38px; }
    .qsbs-tool .results { padding: 20px 18px 22px; }
    .qsbs-tool .inputs { padding: 20px; }
    .qsbs-tool .plot { height: 220px; gap: 6px; }
    .qsbs-tool .labels { gap: 6px; }
    .qsbs-tool .chart { gap: 14px; grid-template-columns: minmax(64px, 1fr) 4fr; }
    .qsbs-tool .val { font-size: 10px; }
    .qsbs-tool .adv-grid { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    .qsbs-tool .bar, .qsbs-tool .seg, .qsbs-tool .cta, .qsbs-tool .segmented label { transition: none; }
  }
  @media print {
    .qsbs-tool .notice, .qsbs-tool .inputs details, .qsbs-tool .site-head { display: none; }
    .qsbs-tool .tool { grid-template-columns: 1fr; }
    .qsbs-tool { background: #fff; }
  }

/* V4: the Illustrator already uses the Brand Style Guide palette */
.qsbs-tool .wrap { max-width: var(--wide); padding-inline: var(--gutter); }
