.tool-wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.tool-header { border-bottom: 1px solid var(--line); }
.tool-header .tool-wrap, .tool-footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-block: 1rem; }
.tool-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 750; }
.tool-brand img { border-radius: .25rem; }
.tool-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-weight: 600; font-size: .92rem; }
.tool-nav a, .tool-footer a { text-decoration: underline; text-underline-offset: .2em; }
.tool-main { padding-block: clamp(2rem, 6vw, 4rem); }
.tool-intro { max-width: 48rem; margin-bottom: 2rem; }
.tool-intro h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.65rem, 6vw, 4.5rem); line-height: .98; margin: .35rem 0 .7rem; }
.tool-intro > p:last-child { font-size: 1.08rem; color: var(--muted); }

.html-lab-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.35rem; margin-bottom: 1.5rem; }
.html-editor-card, .html-audit-card { min-width: 0; border: 1px solid var(--line); border-radius: .5rem; background: #fffdf8; padding: clamp(1rem, 3vw, 1.75rem); display: flex; flex-direction: column; gap: .9rem; }
.html-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.html-card-head h2, .tool-next h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.85rem, 3vw, 2.45rem); line-height: 1.05; margin: 0; }
.html-editor-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.html-textarea { width: 100%; min-height: 22rem; border: 1px solid var(--control); border-radius: .4rem; background: #172a21; color: #f4f7ef; padding: .95rem; font: 400 .9rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; }
.html-score { font-weight: 750; font-size: .95rem; background: #e5ebdc; color: var(--forest); padding: .35rem .75rem; border-radius: .3rem; }
.html-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.html-checks li { display: flex; align-items: baseline; gap: .55rem; padding: .48rem .65rem; border-radius: .35rem; font-size: .9rem; border: 1px solid var(--line); }
.html-checks li[data-pass="true"] { background: #e4f0df; border-color: #bdd3b5; color: #173d24; }
.html-checks li[data-pass="false"] { background: #fbf4f2; border-color: #e4c6c4; color: #5f2225; }
.html-status { font-weight: 700; color: #1b442c; min-height: 1.4em; margin: 0; }
.preview-heading { font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: .25rem 0 0; }
.html-preview-frame { width: 100%; min-height: 12rem; border: 1px solid var(--control); border-radius: .4rem; background: #fff; }
.tool-note { font-size: .88rem; color: var(--muted); margin: 0; }
.tool-next { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; padding: clamp(1.1rem, 3vw, 2rem); background: #e5ebdc; border-radius: .5rem; }
.tool-next p { margin: 0; color: var(--muted); }
.tool-next a { flex-shrink: 0; }
.tool-footer { border-top: 1px solid var(--line); margin-top: 2rem; }

@media (max-width: 54rem) {
  .html-lab-grid { grid-template-columns: 1fr; }
  .tool-next { flex-direction: column; align-items: start; }
}
