.correction-banner {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--warning-text);
    font-size: 13.5px;
    line-height: 1.55;
}

.correction-banner strong {
    color: var(--warning-text);
}

.correction-banner a {
    color: var(--warning-text);
    text-decoration: underline;
}

.correction-banner code {
    background: color-mix(in oklab, var(--warning) 14%, transparent);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 12.5px;
}

.correction-banner-warn {
    display: block;
    margin-top: 6px;
    color: var(--warning-text);
}

.form1099-page {
    display: flex;
    flex-direction: column;

    padding-bottom: 96px;
}

.form1099-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.form1099-topline .meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form1099-topline .acct {
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.form1099-topline .title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.625rem, 2.4vw, 2.125rem);
    letter-spacing: -.04em;
    color: var(--heading);
    margin: 0;
    line-height: 1.05;
}

.form1099-topline .title .year {
    color: var(--blue);
}

.form1099-topline .title .year-inline {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1.5px dashed transparent;
    border-radius: 8px;
    padding: 2px 26px 2px 6px;
    margin-right: 4px;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: var(--blue);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230385FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
}

.form1099-topline .title .year-inline:hover {
    border-color: var(--blue-soft);
}

.form1099-topline .title .year-inline:focus {
    outline: none;
    border-color: var(--blue);
}

.form1099-topline .corrected-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1.5px solid var(--hairline-2);
    border-radius: 999px;
    padding: 7px 16px 7px 9px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11.5px;
    color: var(--text-2);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 140ms ease;
    user-select: none;
}

.form1099-topline .corrected-toggle input[type="checkbox"] {
    accent-color: var(--warning);
    width: 14px;
    height: 14px;
    margin: 0;
}

.form1099-topline .corrected-toggle.on {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: rgba(245, 158, 11, .35);
}

.form1099-topline .corrected-toggle:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.form1099-topline .corrected-toggle.on:hover {
    border-color: var(--warning);
    color: var(--warning-text);
}

.editor-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}

.editor-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.editor-card {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.editor-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 13px;
    border-bottom: 1px solid var(--hairline);
}

.editor-card-head h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--heading);
    margin: 0;
}

.picker-select-btn {
    appearance: none;
    -webkit-appearance: none;
    background: var(--card);
    border: 1.5px solid var(--hairline-2);
    border-radius: 12px;
    padding: 8px 38px 8px 16px;
    color: var(--blue);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 140ms ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230385FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    min-width: 180px;
    text-align: left;
}

.picker-select-btn:hover {
    border-color: var(--blue);
}

.picker-select-btn:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(3, 133, 255, .18);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}

.field-cell {
    grid-column: span 12;
    padding: 8px 16px 9px;
    border-bottom: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    min-height: 44px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.field-cell:last-child {
    border-bottom: none;
}

.field-cell.span-12 {
    grid-column: span 12;
    border-right: none;
}

.field-cell.span-6 {
    grid-column: span 6;
}

.field-cell.span-6:nth-child(even),
.field-cell.span-6.no-right {
    border-right: none;
}

.field-cell.span-4 {
    grid-column: span 4;
}

.field-cell.span-4:nth-last-child(1) {
    border-right: none;
}

.field-cell.span-3 {
    grid-column: span 3;
}

.field-cell.span-2 {
    grid-column: span 2;
}

.field-cell.span-8 {
    grid-column: span 8;
}

.field-cell.no-right {
    border-right: none;
}

.field-label {
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-2);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
}

:root[data-theme="dark"] .field-label {
    color: var(--text-3);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .field-label {
        color: var(--text-3);
    }
}

.field-label .box-num {
    display: inline-block;
    color: var(--text-2);
    font-weight: 600;
    padding-right: 3px;
}

/* Emails are single long tokens — ellipsis with a hover title instead of breaking mid-word. */
.field-value.fv-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-value {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.35;
    word-break: break-word;
}

.field-value.mono {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    letter-spacing: .02em;
}

.field-value.muted {
    color: var(--text-4);
    font-weight: 500;
    font-style: italic;
}

.field-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--heading);
    padding: 0;
    margin: 0;
    line-height: 1.35;
    transition: all 140ms ease;
}

.field-input.mono {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
}

.field-input:focus {
    outline: none;
    background: var(--blue-bg);
    margin: -6px -8px;
    padding: 6px 8px;
    border-radius: 6px;
}

.field-input::placeholder {
    color: var(--text-4);
    font-weight: 400;
}

.field-input-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.field-input-row .dollar {
    color: var(--text-3);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
}

.field-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
    margin: 0;
    cursor: pointer;
}

.field-checkbox label {
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
}

.tin-row {
    background: rgba(245, 158, 11, .055);
}

.tin-row-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

.tin-row-body .field-value {
    flex-shrink: 0;
}

.tin-warning {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--warning-text);
    margin-top: 0;
    flex-shrink: 0;
    text-align: left;
    line-height: 1.35;
}

.tin-warning svg {
    margin-top: 1px;
}

.tin-warning-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tin-warning-text a {
    display: inline-block;
    color: var(--warning-text);
    text-decoration: underline;
    font-weight: 600;
    width: fit-content;
}

.tin-warning-text a:hover {
    color: #6F4E00;
}

.tin-warning svg {
    width: 14px;
    height: 14px;
    color: var(--warning);
    flex-shrink: 0;
}

.tin-warning a {
    color: var(--warning-text);
    text-decoration: underline;
    font-weight: 600;
}

.tin-warning a:hover {
    color: #6F4E00;
}

.empty-state {
    padding: 56px 32px 64px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-height: 320px;
    justify-content: center;
}

.empty-state .num-circle {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, #5BAFFF 0%, #0385FF 55%, #0270D9 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 34px;
    letter-spacing: -.04em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
    box-shadow:
        inset 0 -10px 24px -10px rgba(2, 88, 181, .55),
        0 10px 26px -8px rgba(3, 133, 255, .55);
}

.empty-state .num-circle.alt {

    background:
        radial-gradient(circle at 32% 28%, #8BC4FF 0%, #4A9CE5 55%, #2778C0 100%);
    box-shadow:
        inset 0 -10px 24px -10px rgba(39, 120, 192, .55),
        0 10px 26px -8px rgba(74, 156, 229, .55);
}

.empty-state .msg {
    font-size: 14px;
    color: var(--text-2);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.55;
}

.empty-state .msg strong {
    color: var(--heading);
    font-weight: 700;
}

.form-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.form-meta .year-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg);
    border: 1.5px solid var(--hairline-2);
    border-radius: 999px;
    padding: 5px 26px 5px 12px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11.5px;
    color: var(--heading);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.form-meta .year-select:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* The 1099 facsimile is a printed paper form: white sheet + ink print in BOTH
   themes (a sheet of paper on the desk), so its palette is pinned locally
   rather than following the dark theme. */
.form1099-paper,
.irs-form-banner {
    --bg-1: #FFFFFF;
    --bg-2: #F5F8FC;
    --bg-3: #ECF2F9;
    --card: #FFFFFF;
    --bg: #FFFFFF;
    --text-1: #0B1220;
    --text: #0B1220;
    --text-2: #3D4859;
    --text-3: #6B7688;
    --heading: #0B1220;
    --heading-2: #3D4859;
    --hairline: #E5EBF3;
    --hairline-2: #E5EBF3;
    color-scheme: light;
}

.form1099-paper {
    background: var(--bg-1);
    border: 2px solid var(--text-1, #111);
    border-top: none;
    margin: -22px 0 22px;
    padding: 0;
}

.form1099-paper .editor-grid {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.form1099-paper .editor-col {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.form1099-paper .editor-col+.editor-col {
    border-left: 1.5px solid var(--text-1, #111);
}

.form1099-paper .editor-card {
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1.5px solid var(--text-1, #111);
    box-shadow: none;
    margin: 0;
    padding: 14px 16px;
}

.form1099-paper .editor-card:last-child {
    border-bottom: none;
}

.form1099-paper .editor-card-head {
    background: transparent;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.form1099-paper .editor-card-head h2 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-1);
}

.form1099-paper .box-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-right: 6px;
    border: 1px solid var(--text-1);
    border-radius: 2px;
    background: var(--bg-2);
    font-family: 'Times New Roman', Times, serif;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-1);
}

.form1099-paper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1.5px solid var(--text-1, #111);
    background: var(--bg-2);
    font-family: 'Times New Roman', Times, serif;
    font-size: 11.5px;
    color: var(--text-2);
    letter-spacing: 0.03em;
}

.form1099-paper-footer strong {
    color: var(--text-1);
    font-weight: 700;
}

.form1099-banner-attached {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.form1099-detail-page .form1099-paper {
    margin-top: -22px;
}

@media (max-width: 720px) {
    .form1099-paper .editor-col+.editor-col {
        border-left: none;
        border-top: 1.5px solid var(--text-1, #111);
    }
}

.irs-form-banner {
    display: grid;
    grid-template-columns: 220px 1fr 240px;
    gap: 24px;
    align-items: stretch;
    padding: 18px 22px;
    margin: 0 0 22px;
    border: 2px solid var(--text-1, #111);
    border-radius: 6px;
    background: var(--bg-1);
    font-family: 'Times New Roman', Times, serif;
}

.irs-form-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    border-right: 1px solid var(--hairline);
    padding-right: 16px;
}

.irs-form-left .irs-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-2);
    letter-spacing: 0.04em;
    cursor: pointer;
    user-select: none;
}

.irs-form-left .irs-checkbox input[type=checkbox] {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--text-1, #111);
    appearance: none;
    background: var(--bg-1);
    cursor: pointer;
    flex: 0 0 14px;
}

.irs-form-left .irs-checkbox input[type=checkbox]:checked {
    background: var(--text-1, #111);
}

.irs-form-left .irs-checkbox.void {
    color: var(--text-2);
}

.irs-form-left .irs-checkbox.corrected.on {
    color: var(--accent, #b00020);
}

.irs-form-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.irs-form-center .irs-form-name {
    font-size: 14px;
    color: var(--text-2);
    letter-spacing: 0.04em;
}

.irs-form-center .irs-form-name strong {
    font-size: 22px;
    color: var(--text-1);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.irs-form-center .irs-form-subtitle {
    font-size: 13.5px;
    font-style: italic;
    color: var(--text-2);
}

.irs-form-center .irs-form-payer {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
    border-top: 1px dashed var(--hairline);
    padding-top: 6px;
    width: 100%;
}

.irs-form-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    border-left: 1px solid var(--hairline);
    padding-left: 16px;
    text-align: right;
}

.irs-form-right .irs-form-omb {
    font-size: 11.5px;
    color: var(--text-2);
}

.irs-form-right .irs-form-omb .omb-label {
    display: block;
    letter-spacing: 0.06em;
}

.irs-form-right .irs-form-omb .omb-value {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-1);
}

.irs-form-right .irs-form-year {
    border: 2px solid var(--text-1, #111);
    border-radius: 4px;
    padding: 4px 10px;
    margin: 6px 0;
    background: var(--bg-1);
}

.irs-form-right .irs-form-year .year-inline {
    border: none;
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    font-family: inherit;
    color: var(--heading);
    cursor: pointer;
    padding: 0;
}

.irs-form-right .irs-form-copy {
    font-size: 10.5px;
    color: var(--text-2);
    letter-spacing: 0.03em;
    max-width: 200px;
}

.form1099-detail-page .irs-form-banner .irs-checkbox {
    cursor: default;
}

.form1099-detail-page .irs-form-banner .irs-checkbox input[type=checkbox] {
    cursor: default;
}

@media (max-width: 720px) {
    .irs-form-banner {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .irs-form-left,
    .irs-form-right {
        border: none;
        padding: 0;
    }

    .irs-form-right {
        align-items: flex-start;
        text-align: left;
    }
}

.form1099-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 18px;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--bg-2);
    border: 1px solid var(--hairline);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    transition: all 160ms ease;
}

.step-pill .step-num {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-2);
    color: var(--bg-2);
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.step-pill.active {
    background: var(--accent, #0d6efd);
    border-color: var(--accent, #0d6efd);
    color: #fff;
}

.step-pill.active .step-num {
    background: #fff;
    color: var(--accent, #0d6efd);
}

.step-pill.done {
    background: var(--bg-2);
    border-color: var(--accent, #0d6efd);
    color: var(--accent, #0d6efd);
}

.step-pill.done .step-num {
    background: var(--accent, #0d6efd);
    color: #fff;
}

.step-divider {
    flex: 0 0 28px;
    height: 2px;
    background: var(--hairline);
}

.services-step {
    background: var(--bg-1);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 80px;
}

.services-step-head h2 {
    margin: 0 0 4px;
    font-size: 19px;
}

.services-step-head .subtle {
    color: var(--text-2);
    font-size: 13.5px;
    margin: 0 0 18px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.service-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--bg-2);
    cursor: pointer;
    transition: all 140ms ease;
}

.service-row:hover {
    border-color: var(--accent, #0d6efd);
}

.service-row.off {
    opacity: 0.55;
}

.service-row.resolved {
    cursor: default;
    background: transparent;
    border-style: dashed;
    opacity: 0.85;
}

.service-row.resolved:hover {
    border-color: var(--hairline);
}

.service-row input[type=checkbox] {
    margin-top: 4px;
}

.service-row .srv-check {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent, #0d6efd);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.service-row.resolved .srv-check {
    background: var(--text-2);
}

.service-row .srv-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.service-row .srv-text strong {
    font-size: 14px;
}

.service-row .srv-text .srv-meta {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.5;
}

.state-notice {
    background: var(--bg-2);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.55;
}

.state-notice strong {
    color: var(--heading);
    font-weight: 700;
}

.form1099-errors {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, .25);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--danger-text);
    font-size: 13.5px;
    font-weight: 500;
}

.form1099-errors a {
    color: var(--danger-text);
    text-decoration: underline;
    font-weight: 700;
}

.form1099-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: var(--topbar-blur);
    backdrop-filter: var(--topbar-blur);
    border-top: 1px solid var(--hairline);
}

.form1099-actions .inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 32px;
}

.form1099-actions .left,
.form1099-actions .right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form1099-actions .cancel-link {
    color: var(--text-2);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
}

.form1099-actions .cancel-link:hover {
    color: var(--heading);
}

.form1099-actions .submit-error {
    font-size: 12.5px;
    color: var(--danger-text);
    max-width: 280px;
}

.state-withholding {
    display: grid;
    grid-template-columns: 1fr;
}

.state-withholding .swh-head {
    display: grid;
    grid-template-columns: 1.1fr .8fr 1fr 1fr;
    border-bottom: 1px solid var(--hairline);
    background: var(--bg-2);
}

.state-withholding .swh-head .col {
    padding: 12px 16px;
    border-right: 1px solid var(--hairline);
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-2);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
}

:root[data-theme="dark"] .state-withholding .swh-head .col {
    color: var(--text-3);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .state-withholding .swh-head .col {
        color: var(--text-3);
    }
}

.state-withholding .swh-head .col:last-child {
    border-right: none;
}

.state-withholding .swh-head .col .box-num {
    color: var(--text-2);
    font-weight: 600;
    padding-right: 3px;
}

.state-withholding .swh-row {
    display: grid;
    grid-template-columns: 1.1fr .8fr 1fr 1fr;
    border-bottom: 1px solid var(--hairline);
}

.state-withholding .swh-row:last-child {
    border-bottom: none;
}

.state-withholding .swh-row .col {
    padding: 14px 16px;
    border-right: 1px solid var(--hairline);
    min-height: 58px;
    display: flex;
    align-items: center;
}

.state-withholding .swh-row .col:last-child {
    border-right: none;
}

.state-withholding .swh-row .col.state-id {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 8px;
    align-items: center;
}

.state-withholding .swh-row .col.state-id select.field-input {
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .form1099-topline {
        flex-direction: column;
        gap: 12px;
    }

    .editor-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .picker-select-btn {
        width: 100%;
    }

    .form1099-actions .inner {
        padding: 12px 18px;
    }

    .field-cell.span-6 {
        grid-column: span 12;
        border-right: none;
    }

    .field-cell.span-4 {
        grid-column: span 12;
        border-right: none;
    }

    .field-cell.span-8 {
        grid-column: span 12;
        border-right: none;
    }
}

@media (max-width: 640px) {

    /* Phones: every box goes full-width — no squeezed fractional cells. */
    .field-cell.span-3,
    .field-cell.span-2 {
        grid-column: span 12;
        border-right: none;
    }
}

@media (max-width: 900px) and (min-width: 721px) {

    /* Small tablets: state-withholding drops from 4 columns to 2. */
    .state-withholding .swh-head {
        display: none;
    }

    .state-withholding .swh-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form1099-readonly {
    position: relative;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 12px;
    border-radius: 999px;
    background: var(--bg-muted);
    border: 1px solid var(--hairline);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: -.005em;
    white-space: nowrap;
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-3);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}

.status-pill.is-draft {
    background: #F3F4F6;
    color: #374151;
    border-color: #E5E7EB;
}

.status-pill.is-draft .dot {
    background: #9CA3AF;
}

.status-pill.is-ready-to-file {
    background: #EFF6FF;
    color: #1D4ED8;
    border-color: #DBEAFE;
}

.status-pill.is-ready-to-file .dot {
    background: #3B82F6;
}

.status-pill.is-incart {
    background: #EEF2FF;
    color: #4338CA;
    border-color: #E0E7FF;
}

.status-pill.is-incart .dot {
    background: #6366F1;
}

.status-pill.is-ready {
    background: #FEFCE8;
    color: #854D0E;
    border-color: #FEF3C7;
}

.status-pill.is-ready .dot {
    background: #EAB308;
}

.status-pill.is-transmitting {
    background: #F0F9FF;
    color: #075985;
    border-color: #E0F2FE;
}

.status-pill.is-transmitting .dot {
    background: #0EA5E9;
    animation: pill-pulse 1.4s ease-in-out infinite;
}

.status-pill.is-accepted {
    background: #ECFDF5;
    color: #065F46;
    border-color: #D1FAE5;
}

.status-pill.is-accepted .dot {
    background: #10B981;
}

.status-pill.is-accepted-warn {
    background: #FFFBEB;
    color: #92400E;
    border-color: #FEF3C7;
}

.status-pill.is-accepted-warn .dot {
    background: #F59E0B;
}

.status-pill.is-rejected {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FEE2E2;
}

.status-pill.is-rejected .dot {
    background: #EF4444;
}

@keyframes pill-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .45;
        transform: scale(.7);
    }
}

.form1099-actionstrip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.form1099-actionstrip .strip-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-3);
    font-size: 12px;
    flex-wrap: wrap;
}

.form1099-actionstrip .strip-meta .form-id {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-3);
    background: var(--bg-muted);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: .02em;
}

.form1099-actionstrip .strip-link a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.form1099-actionstrip .strip-link a:hover {
    text-decoration: underline;
}

.form1099-actionstrip .strip-meta-soft {
    color: var(--text-3);
    font-size: 12.5px;
    font-style: italic;
}

.form1099-actionstrip .strip-warn {
    padding: 4px 10px;
    border-radius: 6px;
    background: #FEF2F2;
    color: #991B1B;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -.005em;
}

.form1099-actionstrip .strip-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form1099-readonly .field-cell .field-value {
    min-height: 22px;
    line-height: 1.5;
}

.form1099-readonly .field-cell .field-value.muted {
    color: var(--text-3);
    font-style: italic;
}

.form1099-readonly .field-cell.tin-row {
    background: var(--bg-muted);
}

.form1099-readonly .field-cell.tin-row .field-label {
    color: var(--text-2);
    font-weight: 600;
}

.form1099-readonly .picker-link {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background-color .15s ease;
}

.form1099-readonly .picker-link:hover {
    background: var(--blue-soft);
}

.form1099-topline .title .title-tag {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0;
    margin-left: 4px;
}

.form1099-topline .year-static {
    display: inline-flex;
    align-items: center;
    padding: 2px 0px;
    border-radius: 8px;
    background: var(--bg-muted);
    color: var(--heading);
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    font-weight: 700;
    font-size: .9em;
    letter-spacing: -.01em;
    margin-right: 6px;
}

.editor-card.detail-card {
    margin-top: 20px;
}

.editor-card.detail-card .editor-card-head h2 {
    font-family: var(--font-display);
}

.detail-empty {
    color: var(--text-3);
    font-size: 13.5px;
    font-style: italic;
    padding: 14px 22px 18px;
    margin: 0;
}

.detail-list {
    padding: 14px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-list .detail-row {
    color: var(--text-2);
    font-size: 13.5px;
}

.detail-list .detail-row a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.detail-list .detail-row a:hover {
    text-decoration: underline;
}

.delivery-summary {
    padding: 14px 22px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--text-2);
}

.delivery-summary .sep {
    color: var(--text-3);
}

.delivery-summary .muted {
    color: var(--text-3);
}

.delivery-timeline {
    list-style: none;
    margin: 0;
    padding: 4px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-timeline .dt-step {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: flex-start;
}

.delivery-timeline .dt-mark {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
}

.delivery-timeline .dt-step.done .dt-mark {
    background: #ECFDF5;
    color: #065F46;
}

.delivery-timeline .dt-step.pending .dt-mark {
    background: var(--bg-muted);
    color: var(--text-3);
}

.delivery-timeline .dt-body .dt-label {
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
}

.delivery-timeline .dt-body .dt-time {
    color: var(--text-3);
    font-size: 11.5px;
    margin-top: 2px;
    font-family: var(--font-mono);
}

.delivery-tracking {
    padding: 10px 22px 14px;
    border-top: 1px solid var(--hairline);
    color: var(--text-2);
    font-size: 13px;
}

.delivery-tracking code {
    font-family: var(--font-mono);
    background: var(--bg-muted);
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
}

.delivery-failure {
    margin: 0 22px 18px;
    padding: 12px 14px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #991B1B;
    font-size: 13.5px;
}

.delivery-failure .failure-reason {
    margin-top: 6px;
    font-size: 12.5px;
    color: #B91C1C;
}

.tm-rows {
    padding: 6px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-log {
    padding: 6px 22px 6px;
    display: flex;
    flex-direction: column;
}

.activity-event {
    padding: 10px 0;
    border-bottom: 1px dashed var(--hairline);
}

.activity-event:last-child {
    border-bottom: none;
}

.activity-event summary {
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    list-style: none;
    user-select: none;
}

.activity-event summary::-webkit-details-marker {
    display: none;
}

.activity-event summary::marker {
    display: none;
}

.activity-event .ae-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    font-feature-settings: 'tnum';
}

.activity-event .ae-type {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
}

.activity-event .ae-actor {
    font-size: 11.5px;
    color: var(--text-3);
    text-align: right;
}

.activity-event .ae-payload {
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: var(--bg-muted);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-2);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 280px;
    overflow-y: auto;
}

.form1099-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 56px;
    flex-wrap: wrap;
}

.form1099-footer-actions .footer-hint {
    color: var(--text-3);
    font-size: 12.5px;
    font-style: italic;
}

.form1099-errors.warn {
    background: #FFFBEB;
    border-color: #FCD34D;
    color: #92400E;
}

.ac-btn.danger-ghost {
    background: #fff;
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}

.ac-btn.danger-ghost:hover {
    background: #FEF2F2;
}

.ac-btn.danger {
    background: #B91C1C;
    color: #fff;
    border: 1px solid #B91C1C;
}

.ac-btn.danger:hover {
    background: #991B1B;
}

@media (max-width: 720px) {
    .activity-event summary {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .activity-event .ae-actor {
        text-align: left;
    }

    .form1099-actionstrip {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .state-withholding .swh-head {
        display: none;
    }

    .state-withholding .swh-row {
        grid-template-columns: 1fr;
    }

    .state-withholding .swh-row .col {
        border-right: none;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 14px;
    }

    .state-withholding .swh-row .col.state-id {
        display: flex;
    }

    .state-withholding .swh-row .col::before {
        font-size: .72rem;
        font-weight: 600;
        color: var(--text-2);
    }

    .state-withholding .swh-row .col:nth-child(1)::before {
        content: "Box 5 · State tax withheld";
    }

    .state-withholding .swh-row .col:nth-child(2)::before {
        content: "Box 6 · State";
    }

    .state-withholding .swh-row .col:nth-child(3)::before {
        content: "Box 6 · Payer's state no.";
    }

    .state-withholding .swh-row .col:nth-child(4)::before {
        content: "Box 7 · State income";
    }
}

:root[data-theme="dark"] .status-pill.is-draft,
:root[data-theme="dark"] .status-pill.is-skip {
    background: rgba(148, 163, 184, .12);
    color: #CBD5E1;
    border-color: rgba(148, 163, 184, .20);
}

:root[data-theme="dark"] .status-pill.is-ready-to-file {
    background: rgba(3, 133, 255, .12);
    color: #3D9EFF;
    border-color: rgba(3, 133, 255, .28);
}

:root[data-theme="dark"] .status-pill.is-incart {
    background: rgba(99, 102, 241, .18);
    color: #C7D2FE;
    border-color: rgba(99, 102, 241, .30);
}

:root[data-theme="dark"] .status-pill.is-ready {
    background: rgba(251, 191, 36, .15);
    color: #FCD34D;
    border-color: rgba(251, 191, 36, .28);
}

:root[data-theme="dark"] .status-pill.is-transmitting {
    background: rgba(14, 165, 233, .15);
    color: #7DD3FC;
    border-color: rgba(14, 165, 233, .30);
}

:root[data-theme="dark"] .status-pill.is-accepted {
    background: rgba(34, 197, 94, .15);
    color: #4ADE80;
    border-color: rgba(34, 197, 94, .28);
}

:root[data-theme="dark"] .status-pill.is-accepted-warn {
    background: rgba(245, 158, 11, .15);
    color: #FCD34D;
    border-color: rgba(245, 158, 11, .28);
}

:root[data-theme="dark"] .status-pill.is-rejected {
    background: rgba(239, 68, 68, .15);
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, .28);
}

:root[data-theme="dark"] .ac-btn.danger-ghost {
    background: transparent;
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, .45);
}

:root[data-theme="dark"] .ac-btn.danger-ghost:hover {
    background: rgba(239, 68, 68, .12);
}

:root[data-theme="dark"] .form1099-actionstrip .strip-warn {
    background: rgba(239, 68, 68, .15);
    color: #FCA5A5;
}

:root[data-theme="dark"] .delivery-timeline .dt-step.done .dt-mark {
    background: rgba(34, 197, 94, .15);
    color: #4ADE80;
}

:root[data-theme="dark"] .delivery-failure {
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .30);
    color: #FCA5A5;
}

:root[data-theme="dark"] .delivery-failure .failure-reason {
    color: #F87171;
}

:root[data-theme="dark"] .form1099-errors.warn {
    background: rgba(251, 191, 36, .12);
    border-color: rgba(251, 191, 36, .35);
    color: #FCD34D;
}

@media (prefers-color-scheme: dark) {

    :root:not([data-theme="light"]) .status-pill.is-draft,
    :root:not([data-theme="light"]) .status-pill.is-skip {
        background: rgba(148, 163, 184, .12);
        color: #CBD5E1;
        border-color: rgba(148, 163, 184, .20);
    }

    :root:not([data-theme="light"]) .status-pill.is-ready-to-file {
        background: rgba(3, 133, 255, .12);
        color: #3D9EFF;
        border-color: rgba(3, 133, 255, .28);
    }

    :root:not([data-theme="light"]) .status-pill.is-incart {
        background: rgba(99, 102, 241, .18);
        color: #C7D2FE;
        border-color: rgba(99, 102, 241, .30);
    }

    :root:not([data-theme="light"]) .status-pill.is-ready {
        background: rgba(251, 191, 36, .15);
        color: #FCD34D;
        border-color: rgba(251, 191, 36, .28);
    }

    :root:not([data-theme="light"]) .status-pill.is-transmitting {
        background: rgba(14, 165, 233, .15);
        color: #7DD3FC;
        border-color: rgba(14, 165, 233, .30);
    }

    :root:not([data-theme="light"]) .status-pill.is-accepted {
        background: rgba(34, 197, 94, .15);
        color: #4ADE80;
        border-color: rgba(34, 197, 94, .28);
    }

    :root:not([data-theme="light"]) .status-pill.is-accepted-warn {
        background: rgba(245, 158, 11, .15);
        color: #FCD34D;
        border-color: rgba(245, 158, 11, .28);
    }

    :root:not([data-theme="light"]) .status-pill.is-rejected {
        background: rgba(239, 68, 68, .15);
        color: #FCA5A5;
        border-color: rgba(239, 68, 68, .28);
    }

    :root:not([data-theme="light"]) .ac-btn.danger-ghost {
        background: transparent;
        color: #FCA5A5;
        border-color: rgba(239, 68, 68, .45);
    }

    :root:not([data-theme="light"]) .ac-btn.danger-ghost:hover {
        background: rgba(239, 68, 68, .12);
    }

    :root:not([data-theme="light"]) .form1099-actionstrip .strip-warn {
        background: rgba(239, 68, 68, .15);
        color: #FCA5A5;
    }

    :root:not([data-theme="light"]) .delivery-timeline .dt-step.done .dt-mark {
        background: rgba(34, 197, 94, .15);
        color: #4ADE80;
    }

    :root:not([data-theme="light"]) .delivery-failure {
        background: rgba(239, 68, 68, .12);
        border-color: rgba(239, 68, 68, .30);
        color: #FCA5A5;
    }

    :root:not([data-theme="light"]) .delivery-failure .failure-reason {
        color: #F87171;
    }

    :root:not([data-theme="light"]) .form1099-errors.warn {
        background: rgba(251, 191, 36, .12);
        border-color: rgba(251, 191, 36, .35);
        color: #FCD34D;
    }
}

.copyb-preview-toggle {
    margin: 10px 0;
}

.copyb-preview-frame {
    display: block;
    width: 100%;
    height: 78vh;
    max-height: 900px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    margin-top: 10px;
    background: #fff;
}
