/* Stacks Tax shared design system + chat UI (extracted from live index 2026-11) */
/* Layout: single-column editorial landing - sticky wordmark header, full-bleed color bands, centered content column */
  :root {
    --bg: #faf7f2;
    --surface: #ffffff;
    --ink: #16130f;
    --ink-soft: #5b534a;
    --accent: #e8542a;
    --accent-deep: #c23c16;
    --accent-tint: #fdeee7;
    --band: #16130f;
    --band-ink: #f7f1e8;
    --line: #e7ddce;
    --good: #1f7a4d;
    --display: "Archivo", "Arial Black", system-ui, sans-serif;
    --body: "Figtree", system-ui, -apple-system, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #141210;
      --surface: #1f1b17;
      --ink: #f6efe6;
      --ink-soft: #b3a899;
      --accent: #ff6a3d;
      --accent-deep: #ff865f;
      --accent-tint: #2c1d16;
      --band: #0c0a09;
      --band-ink: #f6efe6;
      --line: #342c24;
      --good: #4fd08a;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #141210;
    --surface: #1f1b17;
    --ink: #f6efe6;
    --ink-soft: #b3a899;
    --accent: #ff6a3d;
    --accent-deep: #ff865f;
    --accent-tint: #2c1d16;
    --band: #0c0a09;
    --band-ink: #f6efe6;
    --line: #342c24;
    --good: #4fd08a;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.04; margin: 0; letter-spacing: -0.02em; }
  p { margin: 0; }
  a { color: inherit; }

  .wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
  .narrow { max-width: 760px; }

  /* ---- Header ---- */
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
  header {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
  .mark { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; text-decoration: none; }
  .mark .glyph { width: 30px; height: 30px; flex: none; }
  .mark .s { color: var(--ink); }
  .mark .t { color: var(--accent); }
  .nav-cta {
    font-family: var(--display); font-weight: 700; font-size: 0.95rem;
    background: var(--accent); color: #fff; text-decoration: none;
    padding: 10px 18px; border-radius: 999px; white-space: nowrap;
    transition: background .15s ease;
  }
  .nav-cta:hover { background: var(--accent-deep); }

  /* ---- Hero ---- */
  .hero { padding-block: clamp(48px, 9vw, 96px) clamp(40px, 7vw, 72px); }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--display); font-weight: 700; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-deep);
    background: var(--accent-tint); padding: 7px 14px; border-radius: 999px;
  }
  .hero h1 { font-weight: 800; font-size: clamp(2.6rem, 8vw, 5rem); margin-block: 22px 20px; }
  .hero h1 em { font-style: normal; color: var(--accent); }
  .hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--ink-soft); max-width: 40ch; }
  .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
  .btn {
    font-family: var(--display); font-weight: 700; font-size: 1.02rem;
    text-decoration: none; padding: 15px 28px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: none;
    transition: transform .12s ease, background .15s ease;
  }
  .btn-primary { background: var(--accent); color: #fff; }
  .btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
  .btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
  .btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

  /* ---- Trust strip ---- */
  .trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 8px; }
  .trust div { background: var(--surface); padding: 20px 18px; }
  .trust b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; display: block; }
  .trust span { color: var(--ink-soft); font-size: 0.9rem; }

  /* ---- Section scaffolding ---- */
  section { padding-block: clamp(44px, 7vw, 76px); }
  .band { background: var(--band); color: var(--band-ink); }
  .band .sec-ink { color: var(--band-ink); }
  .sec-head { max-width: 46ch; margin-bottom: 40px; }
  .sec-head .kicker { font-family: var(--display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
  .sec-head h2 { font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 3rem); margin-top: 12px; }
  .sec-head p { color: var(--ink-soft); margin-top: 14px; font-size: 1.08rem; }
  .band .sec-head p { color: color-mix(in srgb, var(--band-ink) 72%, transparent); }

  /* ---- Steps ---- */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
  .step { position: relative; padding: 28px 24px; border-radius: 18px; background: color-mix(in srgb, var(--band-ink) 6%, transparent); border: 1px solid color-mix(in srgb, var(--band-ink) 14%, transparent); }
  .step::before { counter-increment: step; content: counter(step); font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--band); background: var(--accent); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
  .step h3 { font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; }
  .step p { color: color-mix(in srgb, var(--band-ink) 74%, transparent); font-size: 0.98rem; }

  /* ---- Pricing ---- */
  .prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
  .card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; }
  .card.feature { border: 2px solid var(--accent); box-shadow: 0 18px 40px -24px var(--accent); }
  .card .tag { font-family: var(--display); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
  .card.feature .tag { color: var(--accent-deep); }
  .card .price { font-family: var(--display); font-weight: 800; font-size: 3.2rem; letter-spacing: -0.03em; margin: 10px 0 4px; }
  .card .price span { font-size: 1.1rem; color: var(--ink-soft); font-weight: 600; letter-spacing: 0; }
  .card ul { list-style: none; padding: 0; margin: 20px 0 26px; display: flex; flex-direction: column; gap: 11px; }
  .card li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.98rem; color: var(--ink-soft); }
  .card li svg { flex: none; margin-top: 3px; color: var(--good); }
  .card .btn { width: 100%; justify-content: center; margin-top: auto; }
  .switch-note { margin-top: 26px; text-align: center; font-size: 0.98rem; color: var(--ink-soft); }
  .switch-note b { color: var(--accent-deep); font-family: var(--display); }

  /* ---- Who we help ---- */
  .who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .who div { padding: 26px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
  .who h3 { font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; }
  .who p { color: var(--ink-soft); font-size: 0.97rem; }
  .who .ic { font-family: var(--display); font-weight: 800; color: var(--accent); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

  /* ---- Security ---- */
  .secure-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
  .secure-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
  .secure-list li { display: flex; gap: 14px; align-items: flex-start; }
  .secure-list b { font-family: var(--display); font-weight: 700; }
  .secure-list span { color: color-mix(in srgb, var(--band-ink) 72%, transparent); }
  .secure-list .dot { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: var(--band); }

  /* ---- FAQ ---- */
  .faq { display: flex; flex-direction: column; gap: 6px; }
  details { padding: 6px 0; }
  summary { font-family: var(--display); font-weight: 700; font-size: 1.1rem; padding: 20px 40px 20px 0; cursor: pointer; list-style: none; position: relative; }
  summary::-webkit-details-marker { display: none; }
  summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.6rem; color: var(--accent); font-weight: 400; transition: transform .2s ease; }
  details[open] summary::after { transform: rotate(45deg); }
  details p { color: var(--ink-soft); padding-bottom: 20px; max-width: 64ch; }

  /* ---- Start / contact ---- */
  .start-card { background: var(--accent); color: #fff; border-radius: 24px; padding: clamp(32px, 6vw, 56px); text-align: center; }
  .start-card h2 { font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); color: #fff; }
  .start-card p { color: rgba(255,255,255,0.9); margin: 14px auto 0; max-width: 48ch; }
  .start-card .btn-primary { background: #fff; color: var(--accent-deep); margin-top: 28px; }
  .start-card .btn-primary:hover { background: #fff; }
  .contact-line { margin-top: 22px; font-size: 1.05rem; color: rgba(255,255,255,0.95); }
  .contact-line .email { font-family: var(--display); font-weight: 700; border-bottom: 2px solid rgba(255,255,255,0.5); text-decoration: none; }

  /* ---- Footer ---- */
  footer { padding-block: 40px; color: var(--ink-soft); font-size: 0.88rem; }
  footer .foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-start; }
  footer .disc { max-width: 60ch; margin-top: 18px; font-size: 0.8rem; line-height: 1.5; }

  @media (max-width: 860px) {
    .secure-grid { grid-template-columns: 1fr; gap: 28px; }
  }
  @media (max-width: 680px) {
    .trust, .steps, .prices, .who { grid-template-columns: 1fr; }
    .trust { border-radius: 14px; }
    .card.feature { order: -1; }
  }
  /* ---- Nav ---- */
  .nav-wrap { display: flex; align-items: center; gap: 22px; }
  .nav-link { font-family: var(--display); font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--ink-soft); }
  .nav-link:hover { color: var(--accent-deep); }
  .nav-tel { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--accent-deep); white-space: nowrap; }
  .nav-tel:hover { color: var(--accent); }
  @media (max-width: 460px) { .nav-tel-num { display: none; } }
  /* ---- Surplus recovery ---- */
  .surplus-note { background: color-mix(in srgb, var(--band-ink) 8%, transparent); border-left: 4px solid var(--accent); border-radius: 12px; padding: 22px 24px; margin-top: clamp(24px, 4vh, 36px); max-width: 68ch; }
  .surplus-note p { color: color-mix(in srgb, var(--band-ink) 82%, transparent); }
  .surplus-note .sn-head { color: var(--band-ink); font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }
  .surplus-fee { margin-top: 22px; max-width: 68ch; color: color-mix(in srgb, var(--band-ink) 80%, transparent); }
  .surplus-states { margin-top: 10px; font-family: var(--display); font-weight: 700; color: var(--accent); }
  .surplus-fine { margin-top: 20px; font-size: 0.8rem; line-height: 1.5; color: color-mix(in srgb, var(--band-ink) 58%, transparent); max-width: 68ch; }

  /* ---- Refund estimator ---- */
  .est { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
  .est-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; align-content: start; }
  .field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
  .field > span { font-family: var(--display); font-weight: 600; font-size: 0.8rem; color: var(--ink-soft); }
  .field select, .field input { font-family: var(--body); font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); width: 100%; }
  .field select:focus, .field input:focus { outline: none; border-color: var(--accent); }
  .money { position: relative; display: flex; align-items: center; }
  .money i { position: absolute; left: 14px; font-style: normal; color: var(--ink-soft); font-weight: 600; }
  .money input { padding-left: 28px; }
  .est-out { background: var(--band); color: var(--band-ink); border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
  .est-amount { display: flex; flex-direction: column; gap: 4px; }
  .est-label { font-family: var(--display); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: color-mix(in srgb, var(--band-ink) 64%, transparent); }
  .est-num { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 3.6rem); color: var(--accent); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
  .est-sub { color: color-mix(in srgb, var(--band-ink) 72%, transparent); font-size: 0.92rem; }
  .est-break { list-style: none; padding: 16px 0 0; margin: 0; display: flex; flex-direction: column; gap: 9px; border-top: 1px solid color-mix(in srgb, var(--band-ink) 16%, transparent); }
  .est-break:empty { display: none; }
  .est-break li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.94rem; color: color-mix(in srgb, var(--band-ink) 80%, transparent); font-variant-numeric: tabular-nums; }
  .est-break li b { font-family: var(--display); font-weight: 700; color: var(--band-ink); }
  .est-break li.pos b { color: var(--good); }
  .est-out .btn { justify-content: center; }
  .est-disc { font-size: 0.74rem; line-height: 1.5; color: color-mix(in srgb, var(--band-ink) 56%, transparent); }
  .est-capture { display: flex; flex-direction: column; gap: 12px; }
  .est-capture-h { font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--band-ink); line-height: 1.3; }

  /* ---- Checklist ---- */
  .check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .check { display: flex; align-items: flex-start; gap: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s ease; }
  .check:hover { border-color: var(--accent); }
  .check .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); margin-top: 1px; display: grid; place-items: center; transition: all .15s ease; }
  .check .box::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .15s ease; margin-top: -2px; }
  .check[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); }
  .check[aria-pressed="true"] .box::after { transform: rotate(-45deg) scale(1); }
  .check[aria-pressed="true"] { border-color: var(--accent); }
  .check span b { font-family: var(--display); font-weight: 700; }
  .check span { font-size: 0.95rem; color: var(--ink-soft); min-width: 0; }
  .check span b { color: var(--ink); }

  @media (max-width: 760px) { .est { grid-template-columns: 1fr; } }
  @media (max-width: 520px) { .est-form, .check-grid { grid-template-columns: 1fr; } .nav-link { display: none; } }

  @media (max-width: 380px) { .mark { font-size: 1.25rem; gap: 6px; } .nav-cta { padding: 8px 14px; font-size: 0.85rem; } }

  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Chat widget ---- */
#stxChat { font-family: var(--body); }
  #stxChatOpen { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 13px 20px; font: 700 0.98rem var(--body); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
  #stxChatOpen:hover { background: var(--accent-deep); }
  #stxChatPanel { position: fixed; right: 16px; bottom: 16px; z-index: 61; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 32px)); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.3); overflow: hidden; }
  #stxChatPanel[hidden], #stxChatOpen[hidden] { display: none !important; }
  .stx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--band); color: var(--band-ink); }
  .stx-head b { font-family: var(--display); font-size: 1.05rem; display: block; }
  .stx-head span { font-size: 0.8rem; opacity: 0.8; }
  .stx-close { background: none; border: 0; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
  .stx-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
  .stx-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 0.95rem; line-height: 1.4; overflow-wrap: anywhere; }
  .stx-bot { align-self: flex-start; background: var(--accent-tint); }
  .stx-me { align-self: flex-end; background: var(--accent); color: #fff; }
  .stx-err { align-self: flex-start; border: 1.5px solid var(--accent-deep); color: var(--ink); }
  .stx-act { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
  .stx-act:empty { display: none; }
  .stx-chip { background: transparent; color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; font: 600 0.95rem var(--body); text-align: left; cursor: pointer; }
  .stx-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
  .stx-row { display: flex; gap: 8px; }
  .stx-row input { flex: 1; min-width: 0; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; font: 16px var(--body); }
  .stx-select { flex: 1; min-width: 0; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; font: 16px var(--body); }
  .stx-send { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 16px; font: 700 0.95rem var(--body); cursor: pointer; }
  .stx-send:disabled { opacity: 0.6; cursor: default; }
  .stx-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; line-height: 1.35; }
  .stx-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
  .stx-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
  #stxChat button:focus-visible, #stxChat input:focus-visible, #stxChat select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  @media (max-width: 480px) { #stxChatPanel { left: 0; right: 0; bottom: 0; width: auto; height: 100dvh; border-radius: 0; border: 0; } }
