/* Guided "New letter" flow (public/wizard.js). Uses the tokens and components in styles.css. */
/* Library suggestions waiting for approval (nav count). */
.nav-count { margin-left: auto; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: #d97706; color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.3rem; text-align: center; }
/* Pre-send "fix" links: the field they jump to flashes. */
.fix-link { font-weight: 600; white-space: nowrap; }
@keyframes fixFlash { 0%, 60% { box-shadow: 0 0 0 3px rgba(217, 119, 6, .55); } 100% { box-shadow: 0 0 0 3px rgba(217, 119, 6, 0); } }
.fix-flash { animation: fixFlash 2.4s ease-out; border-radius: 8px; }
/* One tax question (public/app.js taxBlockHtml). */
.tax-block { margin-bottom: 1rem; }
.tax-opts { display: grid; gap: .4rem; margin: .4rem 0 .6rem; }
.tax-opt { display: flex; gap: .55rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: .55rem .7rem; cursor: pointer; background: var(--surface); }
.tax-opt.on { border-color: var(--m-info); background: var(--m-info-bg); }
.tax-opt input { margin-top: .2rem; }
.tax-detail { border-left: 3px solid var(--m-info); padding: .2rem 0 .2rem .8rem; margin: .2rem 0 .6rem; }
/* Tax return builder. Row 1: Return | States.  Row 2: For whom | Add return. */
.tax-add { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: .6rem .7rem; margin: .6rem 0 .35rem; padding: .75rem; border: 1px solid var(--border); border-radius: var(--m-radius); background: var(--surface); align-items: end; }
.tx-cell { display: flex; flex-direction: column; gap: .25rem; min-width: 0; position: relative; }
.tx-cap { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.tax-add #txStates[hidden] { display: none; }
.tx-go { align-items: flex-start; }
/* The states box looks like an input, holding tags and a borderless search field. */
.tx-tags { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; min-height: 2.3rem; padding: .25rem .35rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: text; }
.tx-tags:focus-within { border-color: var(--primary); box-shadow: var(--m-focus); }
.tx-chips { display: contents; }
.tx-tags #txStateFind { flex: 1 1 8rem; width: auto; min-width: 8rem; border: 0; padding: .25rem .2rem; background: transparent; box-shadow: none; }
.tx-chip { display: inline-flex; align-items: center; gap: .2rem; padding: .12rem .15rem .12rem .5rem; border-radius: 999px; background: var(--m-info-bg); color: var(--m-info); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.tx-chip.warn { background: var(--m-warn-bg); color: var(--m-warn); }
.tx-chip.none { background: var(--m-neutral-bg); color: var(--text-muted); text-decoration: line-through; }
.tx-chip .tx-x { all: unset; cursor: pointer; width: 1.1rem; height: 1.1rem; display: inline-grid; place-items: center; border-radius: 50%; font-size: .9rem; line-height: 1; color: inherit; }
.tx-chip .tx-x:hover { background: color-mix(in srgb, currentColor 15%, transparent); }
.tx-menu { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin-top: .25rem; max-height: 16rem; overflow-y: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px var(--shadow-strong); padding: .25rem; }
.tx-menu[hidden] { display: none; }
.tx-opt { display: flex; justify-content: space-between; gap: .8rem; padding: .4rem .55rem; border-radius: 4px; font-size: .86rem; cursor: pointer; }
.tx-opt.on, .tx-opt:hover { background: var(--accent); color: var(--accent-text); }
.tx-opt-form { color: var(--text-muted); font-size: .8rem; white-space: nowrap; }
.tx-opt.muted { cursor: default; color: var(--text-muted); }
.tx-opt.muted:hover { background: none; }
textarea.tx-line { field-sizing: content; min-height: 2.35rem; resize: vertical; line-height: 1.4; overflow: hidden; }
.tx-preview { grid-column: 1 / -1; font-size: .84rem; padding: .45rem .6rem; border-radius: 6px; background: var(--m-neutral-bg); color: var(--text); }
.tx-prev-k { color: var(--text-muted); font-weight: 600; margin-right: .25rem; }
@media (max-width: 720px) { .tax-add { grid-template-columns: 1fr; } }
/* Additional fees on the Fees step. */
.addl-fee { border: 1px solid var(--border); border-radius: 8px; padding: .5rem; margin-bottom: .5rem; display: grid; gap: .4rem; }
.addl-fee-h { display: flex; gap: .4rem; align-items: center; }
.addl-fee-h input { flex: 1; font-weight: 600; }
.addl-fee textarea { width: 100%; }
/* Spreadsheet import (public/import.js). */
.imp-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.imp-table td { vertical-align: top; }
.imp-table tr.imp-error td { background: var(--m-bad-bg); }
.imp-table tr.imp-skip td { opacity: .65; }
.imp-issues { margin: 0; padding-left: 1rem; font-size: .82rem; max-width: 380px; }
.imp-issues li { margin: .1rem 0; }
.imp-issues li.warn { color: var(--text-muted); }
.wz-steps { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.wz-step { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--text-muted); padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.wz-step .n, .wz-nav .n { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--surface-2); font-size: .72rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.wz-step.on { border-color: var(--primary); color: var(--accent-text); background: var(--accent); font-weight: 600; }
.wz-step.on .n, .wz-nav li.on .n { background: var(--primary); color: var(--on-primary, #fff); }
.wz-step.done .n, .wz-nav li.done .n { background: var(--m-ok-bg); color: var(--m-ok); }
.wz-card { max-width: 860px; }
.wz-h { font-size: 1.15rem; font-weight: 600; margin: .15rem 0 1rem; letter-spacing: -.01em; }
.wz-row { display: flex; gap: .5rem; }
.wz-row > select, .wz-row > input { flex: 1; min-width: 0; }
.wz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.wz-cards .kind-card input { position: absolute; opacity: 0; pointer-events: none; }
.wz-cards .kind-card { position: relative; }
.wz-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-light); flex-wrap: wrap; }
.wz-layout { display: grid; grid-template-columns: minmax(380px, 560px) 1fr; gap: 1rem; align-items: start; }
.wz-layout .wz-card { max-width: none; }
.wz-progress { height: 4px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: .75rem; }
.wz-progress > div { height: 100%; background: var(--primary); transition: width .2s; }
.wz-nav { list-style: none; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.wz-nav a { display: flex; align-items: center; gap: .4rem; padding: .3rem .6rem .3rem .35rem; border-radius: 999px; font-size: .78rem; color: var(--text-muted); text-decoration: none; border: 1px solid transparent; }
.wz-nav a:hover { background: var(--surface-2); color: var(--text); }
.wz-nav li.on a { border-color: var(--primary); color: var(--accent-text); background: var(--accent); font-weight: 600; }
.wz-tip { display: flex; gap: .5rem; align-items: flex-start; font-size: .79rem; line-height: 1.45; color: var(--text); background: var(--m-info-bg); border-radius: 6px; padding: .45rem .6rem; margin: .35rem 0 .55rem; }
.wz-tip-tag { font-size: .62rem; font-weight: 700; letter-spacing: .06em; color: var(--m-info); border: 1px solid currentColor; border-radius: 4px; padding: 0 .3rem; margin-top: 1px; flex-shrink: 0; }
/* Bulk delete on the letters and proposals lists */
.bulk-cell { width: 2.2rem; text-align: center; padding-left: .5rem !important; padding-right: .25rem !important; }
.bulk-cell input { width: 1rem; height: 1rem; cursor: pointer; margin: 0; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem .8rem; margin: 0 0 .6rem; border: 1px solid var(--primary); border-radius: var(--m-radius, 8px); background: var(--accent); font-size: .88rem; position: sticky; top: 0; z-index: 5; }
.bulk-bar[hidden] { display: none; }
.bulk-bar > span { margin-right: auto; }
/* Info cards ("i" beside a question) */
.wz-q { position: relative; }
.wz-q.has-info > .check { padding-right: 2.4rem; }
.wz-q > .wz-info-btn { position: absolute; top: .55rem; right: .6rem; z-index: 1; }
.wz-info-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.2rem; height: 1.2rem; margin-left: .4rem; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: italic 600 .72rem/1 Georgia, 'Times New Roman', serif; cursor: pointer; vertical-align: middle; flex-shrink: 0; }
.wz-info-btn:hover, .wz-info-btn[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.wz-info-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wz-info { position: relative; font-size: .8rem; line-height: 1.5; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 6px; padding: .6rem .75rem .65rem; margin: .1rem 0 .55rem; display: grid; gap: .35rem; }
.wz-info[hidden] { display: none; }
.wz-info-src { justify-self: start; font-size: .64rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 .35rem; }
.wz-info-h { font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .05rem; }
.wz-info-q { margin: 0; padding: .3rem .6rem; border-left: 2px solid var(--border); color: var(--text-muted); font-style: italic; }
.wz-info-faq summary { cursor: pointer; font-weight: 500; }
.wz-info-faq > div { margin: .2rem 0 .3rem .9rem; color: var(--text); }
.wz-sub { margin: -.2rem 0 .7rem 1.6rem; padding-left: .8rem; border-left: 2px solid var(--border); }
.wz-more { margin: .8rem 0; border: 1px solid var(--border-light); border-radius: var(--m-radius); padding: .55rem .8rem; background: var(--surface); }
.wz-more > summary { cursor: pointer; font-weight: 500; font-size: .86rem; color: var(--text); }
.wz-more[open] > summary { margin-bottom: .6rem; }
.wz-seg { flex-wrap: wrap; }
.wz-check { border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .8rem; background: var(--surface); }
.wz-check.warn { border-color: color-mix(in srgb, var(--m-warn) 35%, transparent); background: var(--m-warn-bg); }
.wz-check.ok { border-color: color-mix(in srgb, var(--m-ok) 35%, transparent); background: var(--m-ok-bg); }
.wz-check.info { background: var(--surface); }
.wz-check-h { font-weight: 600; margin-bottom: .35rem; display: flex; gap: .4rem; align-items: center; }
.wz-check ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.wz-check li { margin-bottom: .4rem; font-size: .86rem; line-height: 1.45; }
.wz-preview .preview-frame { height: calc(100vh - 150px); }
@media (max-width: 1080px) {
  .wz-layout { grid-template-columns: 1fr; }
  .wz-preview { position: static; }
  .wz-preview .preview-frame { height: 70vh; }
}
@media (max-width: 600px) {
  .wz-row { flex-direction: column; }
  .wz-cards { grid-template-columns: 1fr; }
  .wz-nav { display: none; }
}