.html-filter-hero {
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(242, 169, 59, 0.2),
      transparent 28%
    ),
    linear-gradient(135deg, #edf3ff, #f7f8fb);
}
.html-filter-tool-section {
  padding-top: 58px;
}
.html-filter-toolbar {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 26px;
}
.html-filter-toolbar p {
  color: var(--muted);
  margin: 0;
  max-width: 380px;
}
.html-filter-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}
.html-filter-input-panel,
.html-filter-results-panel {
  min-width: 0;
  padding: 24px;
}
.html-filter-input-panel {
  border-right: 1px solid var(--line);
}
.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-heading label,
.panel-heading h3 {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}
.panel-heading span {
  color: var(--muted);
  font-size: 0.78rem;
}
#source-html {
  background: #111c2d;
  border: 1px solid #243653;
  border-radius: 12px;
  color: #dce6ff;
  display: block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  min-height: 390px;
  padding: 16px;
  resize: vertical;
  width: 100%;
}
#source-html:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.2);
  outline: 0;
}
.html-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}
.html-filter-actions .button {
  font-size: 0.85rem;
  padding: 10px 13px;
}
.button-quiet {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 10px 13px;
}
.button-quiet:hover,
.button-quiet:focus-visible {
  background: var(--sky);
  color: var(--brand);
}
.tag-results {
  min-height: 390px;
  overflow: auto;
}
.empty-state {
  align-items: center;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  padding: 28px;
  text-align: center;
}
.analysis-summary {
  align-items: center;
  background: var(--sky);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px 16px;
}
.analysis-summary strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
}
.analysis-summary span {
  color: var(--muted);
  font-size: 0.82rem;
}
.result-filter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 10px 12px;
  width: 100%;
}
.tag-table {
  border-collapse: collapse;
  width: 100%;
}
.tag-table th,
.tag-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
}
.tag-table th {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag-table td {
  color: var(--ink);
  font-size: 0.88rem;
}
.tag-table td:last-child {
  text-align: right;
}
.attribute-summary {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}
.info-button {
  background: var(--sky);
  border: 0;
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 10px;
}
.info-button:hover,
.info-button:focus-visible {
  background: var(--brand);
  color: #fff;
}
.content-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  line-height: 1.75;
  min-height: 390px;
  overflow: auto;
  padding: 18px;
  white-space: pre-wrap;
}
.content-result-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.content-result-header strong {
  color: var(--ink);
}
.copy-button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 10px;
}
.html-filter-note {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 14px 0 0;
}
.html-filter-guide {
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.html-filter-guide .prose {
  max-width: 860px;
}
.html-filter-guide .prose > h2 {
  margin-top: 8px;
}
.article-byline {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 8px 0 40px;
}
.html-filter-guide section {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 28px;
}
.html-filter-guide h3 {
  font-size: 1.55rem;
  margin-bottom: 14px;
}
.html-filter-guide p,
.html-filter-guide li {
  color: var(--muted);
  line-height: 1.8;
}
.html-filter-guide ol,
.html-filter-guide ul {
  padding-left: 24px;
}
.html-filter-guide-expanded {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.html-filter-guide-expanded h4 {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  margin: 24px 0 8px;
}
.tag-dialog {
  background: var(--surface);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(24, 34, 48, 0.3);
  max-height: min(760px, calc(100vh - 40px));
  max-width: 900px;
  padding: 0;
  width: calc(100% - 40px);
}
.tag-dialog::backdrop {
  background: rgba(24, 34, 48, 0.62);
}
.tag-dialog-content {
  padding: 26px;
}
.tag-dialog-header {
  align-items: start;
  display: flex;
  justify-content: space-between;
}
.tag-dialog-header h2 {
  margin-top: 8px;
}
.dialog-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}
.copy-button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}
.dialog-close {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  height: 36px;
  width: 36px;
}
.detail-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}
.detail-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  padding: 10px 12px;
}
.detail-tab.is-active {
  border-bottom-color: var(--brand);
  color: var(--brand);
}
.detail-panel {
  margin-top: 16px;
  max-height: 460px;
  overflow: auto;
}
.detail-code {
  background: #111c2d;
  border-radius: 10px;
  color: #dce6ff;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
  margin: 0;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}
.detail-list {
  color: var(--ink);
  line-height: 1.8;
  margin: 0;
  padding-left: 22px;
}
.detail-empty {
  color: var(--muted);
  padding: 20px 0;
}
@media (max-width: 800px) {
  .html-filter-workspace {
    grid-template-columns: 1fr;
  }
  .html-filter-input-panel {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
  .html-filter-toolbar {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
}
@media (max-width: 520px) {
  .html-filter-input-panel,
  .html-filter-results-panel {
    padding: 18px;
  }
  .html-filter-actions .button,
  .button-quiet {
    flex: 1 1 calc(50% - 9px);
  }
  .tag-dialog-content {
    padding: 20px;
  }
}
