.page-tool--accessible-form-checker .tool-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-tool--accessible-form-checker .tool-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.page-tool--accessible-form-checker .tool-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-tool--accessible-form-checker .tool-pane__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.page-tool--accessible-form-checker .afc-textarea {
    display: block;
    flex: 1 1 auto;
    min-height: 30rem;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    tab-size: 2;
}

.page-tool--accessible-form-checker .afc-textarea:focus {
    box-shadow: none;
}

.page-tool--accessible-form-checker .tool-hint--note {
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.78rem;
}

.page-tool--accessible-form-checker .tool-hint--note code {
    padding: 0.05rem 0.3rem;
    border-radius: var(--radius-xs);
    background: var(--surface-3);
    color: var(--ink-2);
    font-family: var(--font-mono);
}

.page-tool--accessible-form-checker .tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 14px;
    background: var(--surface-2);
}

.page-tool--accessible-form-checker .tool-status {
    min-height: 0;
    margin: 0;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.page-tool--accessible-form-checker .tool-status.status {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.page-tool--accessible-form-checker .tool-status.status--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.page-tool--accessible-form-checker .tool-status.status--success {
    background: var(--success-soft);
    color: var(--success);
}

.page-tool--accessible-form-checker .afc-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.page-tool--accessible-form-checker .afc-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 8px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.page-tool--accessible-form-checker .afc-stat:last-child {
    border-right: 0;
}

.page-tool--accessible-form-checker .afc-stat__value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.page-tool--accessible-form-checker .afc-stat__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.page-tool--accessible-form-checker .afc-stat--error .afc-stat__value {
    color: var(--danger);
}

.page-tool--accessible-form-checker .afc-stat--warning .afc-stat__value {
    color: var(--accent);
}

.page-tool--accessible-form-checker .afc-stat--pass .afc-stat__value {
    color: var(--success);
}

.page-tool--accessible-form-checker .afc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.page-tool--accessible-form-checker .afc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--ink-2);
    cursor: pointer;
}

.page-tool--accessible-form-checker .afc-toggle input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}

.page-tool--accessible-form-checker .afc-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-tool--accessible-form-checker .afc-results {
    flex: 1 1 auto;
    min-height: 12rem;
    max-height: 32rem;
    overflow: auto;
    background: var(--surface);
}

.page-tool--accessible-form-checker .afc-results .empty-state {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 2.5rem 1.25rem;
}

.page-tool--accessible-form-checker .afc-finding {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.page-tool--accessible-form-checker .afc-finding:last-child {
    border-bottom: 0;
}

.page-tool--accessible-form-checker .afc-finding--error {
    box-shadow: inset 3px 0 0 var(--danger);
}

.page-tool--accessible-form-checker .afc-finding--warning {
    box-shadow: inset 3px 0 0 var(--accent);
}

.page-tool--accessible-form-checker .afc-finding--pass {
    box-shadow: inset 3px 0 0 var(--success);
}

.page-tool--accessible-form-checker .afc-finding__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.page-tool--accessible-form-checker .afc-finding__target {
    min-width: 0;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.page-tool--accessible-form-checker .afc-finding__kind {
    margin-right: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--faint);
}

.page-tool--accessible-form-checker .afc-finding__target code {
    font-family: var(--font-mono);
    color: var(--accent);
}

.page-tool--accessible-form-checker .afc-finding__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.page-tool--accessible-form-checker .afc-badge {
    padding: 0.1rem 0.42rem;
    border-radius: var(--radius-xs);
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--surface-3);
    color: var(--ink-2);
}

.page-tool--accessible-form-checker .afc-badge--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.page-tool--accessible-form-checker .afc-badge--warning {
    background: var(--accent-soft);
    color: var(--accent);
}

.page-tool--accessible-form-checker .afc-badge--pass {
    background: var(--success-soft);
    color: var(--success);
}

.page-tool--accessible-form-checker .afc-finding__name {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.page-tool--accessible-form-checker .afc-finding__name code {
    font-family: var(--font-mono);
    color: var(--ink-2);
}

.page-tool--accessible-form-checker .afc-issues {
    list-style: none;
    margin: 9px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-tool--accessible-form-checker .afc-issue {
    padding: 6px 9px;
    border-left: 2px solid var(--line);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    background: var(--surface-2);
    font-size: 0.79rem;
}

.page-tool--accessible-form-checker .afc-issue--error {
    border-left-color: var(--danger);
}

.page-tool--accessible-form-checker .afc-issue--warning {
    border-left-color: var(--accent);
}

.page-tool--accessible-form-checker .afc-issue__message {
    display: block;
    color: var(--ink-2);
}

.page-tool--accessible-form-checker .afc-issue__hint {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.74rem;
}

.page-tool--accessible-form-checker .tool-about__text {
    max-width: 80ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.page-tool--accessible-form-checker .tool-about__text code {
    padding: 0.05rem 0.3rem;
    border-radius: var(--radius-xs);
    background: var(--surface-3);
    color: var(--ink-2);
    font-family: var(--font-mono);
}

@media (max-width: 860px) {
    .page-tool--accessible-form-checker .tool-workspace {
        grid-template-columns: 1fr;
    }

    .page-tool--accessible-form-checker .afc-textarea {
        min-height: 18rem;
    }

    .page-tool--accessible-form-checker .afc-results {
        max-height: 26rem;
    }
}

@media (max-width: 520px) {
    .page-tool--accessible-form-checker .afc-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-tool--accessible-form-checker .afc-stat:nth-child(2) {
        border-right: 0;
    }

    .page-tool--accessible-form-checker .afc-stat:nth-child(1),
    .page-tool--accessible-form-checker .afc-stat:nth-child(2) {
        border-bottom: 1px solid var(--line);
    }

    .page-tool--accessible-form-checker .afc-toolbar {
        align-items: stretch;
    }

    .page-tool--accessible-form-checker .afc-toolbar__actions {
        width: 100%;
    }

    .page-tool--accessible-form-checker .afc-toolbar__actions .btn {
        flex: 1 1 auto;
    }
}
