.plc-bench-widget{
    --plc-red:#b62025;
    --plc-red-dark:#8f171b;
    --plc-dark:#17191d;
    --plc-text:#292d34;
    --plc-muted:#68707c;
    --plc-soft:#f5f6f8;
    --plc-line:#dde1e7;
    --plc-warm:#fff7e8;
    border:1px solid var(--plc-line);
    border-radius:16px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 8px 28px rgba(0,0,0,.06);
    margin:26px 0;
    color:var(--plc-text);
}
.plc-bench-widget *{box-sizing:border-box}
.plc-bench-header{
    display:flex;
    justify-content:space-between;
    gap:24px;
    align-items:center;
    padding:22px 24px;
    background:var(--plc-dark);
    color:#fff;
}
.plc-bench-header h3{
    margin:4px 0 6px;
    font-size:clamp(23px,3vw,30px);
    line-height:1.15;
    color:#fff;
}
.plc-bench-header p{margin:0;color:#c8ccd2}
.plc-bench-kicker{
    font-size:11px;
    font-weight:800;
    letter-spacing:.14em;
    color:#ef7e82;
}
.plc-bench-pill{
    border:1px solid #454951;
    border-radius:999px;
    padding:8px 12px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}
.plc-bench-controls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    padding:18px 20px;
    background:var(--plc-soft);
    border-bottom:1px solid var(--plc-line);
}
.plc-bench-widget label{
    font-size:12px;
    font-weight:750;
    color:#4d525b;
}
.plc-bench-widget select{
    width:100%;
    margin-top:5px;
    min-height:42px;
    border:1px solid #cbd0d8;
    border-radius:8px;
    background:#fff;
    padding:7px 9px;
    color:#222;
}
.plc-bench-rule-note{
    padding:11px 20px;
    font-size:13px;
    line-height:1.5;
    background:var(--plc-warm);
    border-bottom:1px solid #f0dfb3;
    color:#6a541f;
}
.plc-bench-stage{text-align:center;padding:30px 20px 26px}
.plc-bench-round{font-size:13px;color:#747a84;margin-bottom:10px}
.plc-bench-command{
    font-size:clamp(40px,7vw,58px);
    font-weight:900;
    letter-spacing:.03em;
    color:var(--plc-dark);
    line-height:1.05;
    transition:.15s ease;
}
.plc-bench-command.is-live{color:var(--plc-red);transform:scale(1.03)}
.plc-bench-sub{margin-top:10px;color:#616771;min-height:24px}
.plc-bench-meter{
    height:6px;
    background:#eceff3;
    border-radius:999px;
    overflow:hidden;
    max-width:420px;
    margin:20px auto 0;
}
.plc-bench-meter span{
    display:block;
    height:100%;
    width:0;
    background:var(--plc-red);
    transition:width .15s linear;
}
.plc-bench-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
    padding:0 20px 24px;
}
.plc-bench-widget button{
    border:1px solid #cdd2da;
    background:#fff;
    color:#24272c;
    border-radius:9px;
    padding:11px 14px;
    font-weight:800;
    cursor:pointer;
}
.plc-bench-widget button:hover:not(:disabled){border-color:#aeb5bf}
.plc-bench-widget button:disabled{opacity:.42;cursor:not-allowed}
.plc-bench-widget .plc-bench-primary{
    background:var(--plc-red);
    border-color:var(--plc-red);
    color:#fff;
}
.plc-bench-widget .plc-bench-primary:hover:not(:disabled){
    background:var(--plc-red-dark);
    border-color:var(--plc-red-dark);
}
.plc-bench-help{
    border-top:1px solid var(--plc-line);
    padding:16px 20px;
    color:#5f6570;
    font-size:13px;
    line-height:1.6;
    background:#fafbfc;
}

/* Rule checker */
.plc-checker-select-wrap{
    display:grid;
    grid-template-columns:minmax(240px,360px) 1fr;
    gap:18px;
    align-items:end;
    padding:18px 20px;
    background:var(--plc-soft);
    border-bottom:1px solid var(--plc-line);
}
.plc-checker-source{
    display:flex;
    flex-direction:column;
    gap:3px;
    padding-bottom:2px;
    color:var(--plc-muted);
    font-size:12px;
}
.plc-checker-source strong{color:#343941;font-size:13px}
.plc-command-strip{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:16px 20px;
    background:#fff;
    border-bottom:1px solid var(--plc-line);
}
.plc-command-strip span{
    color:var(--plc-muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.plc-command-strip strong{
    color:var(--plc-red);
    font-size:20px;
}
.plc-rule-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    border-bottom:1px solid var(--plc-line);
}
.plc-rule-card{
    padding:18px 20px;
    border-bottom:1px solid var(--plc-line);
}
.plc-rule-card:nth-child(odd){border-right:1px solid var(--plc-line)}
.plc-rule-card:nth-last-child(-n+2){border-bottom:0}
.plc-rule-card h4{
    margin:0 0 6px;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.05em;
    color:#4f5661;
}
.plc-rule-card p{margin:0;line-height:1.55}
.plc-checker-lower{
    display:grid;
    grid-template-columns:1.45fr .9fr;
    gap:0;
}
.plc-failures{padding:20px 22px}
.plc-failures h4{margin:0 0 10px}
.plc-failures ul{
    margin:0;
    padding-left:20px;
    columns:2;
    column-gap:30px;
}
.plc-failures li{
    margin:0 0 8px;
    break-inside:avoid;
    line-height:1.45;
}
.plc-difference{
    padding:20px 22px;
    background:#fafbfc;
    border-left:1px solid var(--plc-line);
}
.plc-difference p{line-height:1.55}
.plc-difference a{
    display:inline-flex;
    margin-top:6px;
    color:var(--plc-red);
    font-weight:800;
    text-decoration:none;
}
.plc-disclaimer{
    margin:0;
    padding:12px 20px;
    border-top:1px solid var(--plc-line);
    font-size:12px;
    color:#737a84;
    background:#fff;
}
.plc-bench-tools-stack>.plc-bench-widget:first-child{margin-bottom:18px}
.plc-bench-tools-stack>.plc-bench-widget:last-child{margin-top:18px}

@media(max-width:760px){
    .plc-bench-header{align-items:flex-start;flex-direction:column}
    .plc-bench-controls{grid-template-columns:1fr}
    .plc-checker-select-wrap{grid-template-columns:1fr}
    .plc-rule-grid{grid-template-columns:1fr}
    .plc-rule-card,
    .plc-rule-card:nth-child(odd),
    .plc-rule-card:nth-last-child(-n+2){
        border-right:0;
        border-bottom:1px solid var(--plc-line);
    }
    .plc-rule-card:last-child{border-bottom:0}
    .plc-checker-lower{grid-template-columns:1fr}
    .plc-difference{border-left:0;border-top:1px solid var(--plc-line)}
    .plc-failures ul{columns:1}
    .plc-command-strip{align-items:flex-start;flex-direction:column;gap:5px}
    .plc-bench-actions button{width:100%}
}

.plc-bench-custom{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.plc-bench-custom[hidden]{display:none}
.plc-bench-custom label{display:flex;flex-direction:column;gap:4px;font-size:.9em}
.plc-bench-custom input{padding:6px 8px;max-width:140px}


/* Match the host typography; preserve keyboard and small-screen usability. */
.plc-bench-widget{font-family:inherit;max-width:100%;min-width:0}
.plc-bench-widget :is(button,select,input){font:inherit;font-size:14px;min-height:44px}
.plc-bench-widget :is(button,select,input,a):focus-visible{outline:3px solid var(--plc-red);outline-offset:3px}
.plc-bench-custom{padding:16px 20px;margin:0;background:var(--plc-soft)}
.plc-bench-widget [hidden]{display:none}
.plc-bench-pill{white-space:normal;overflow-wrap:anywhere}
.plc-bench-widget p,.plc-bench-widget li{overflow-wrap:anywhere}
.plc-bench-table-wrap{max-width:100%;overflow-x:auto;border:1px solid #dde1e7;border-radius:12px;margin:24px 0}
.plc-bench-table-wrap table{width:100%;border-collapse:collapse;min-width:720px;margin:0;font-size:14px}
.plc-bench-table-wrap :is(th,td){padding:12px;border-bottom:1px solid #dde1e7;text-align:left;vertical-align:top}
.plc-bench-table-wrap thead{background:#f5f6f8}
.plc-bench-table-wrap caption{text-align:left;padding:14px;font-weight:700}
.plc-bench-quick-answer{border-left:4px solid #b62025;background:#f5f6f8;padding:18px 22px;margin:24px 0;border-radius:0 12px 12px 0}
.plc-bench-toc{display:flex;flex-wrap:wrap;gap:10px 20px;padding:18px 0;border-block:1px solid #dde1e7;margin:24px 0}
.plc-bench-toc a{font-size:14px;font-weight:700}
@media(prefers-reduced-motion:reduce){.plc-bench-command,.plc-bench-meter span{transition:none}.plc-bench-command.is-live{transform:none}}

/* Keep widget heading contrast inside article themes. */
.plc-bench-widget .plc-bench-header h3{color:#fff;line-height:1.15;margin:4px 0 6px}
