.sht-html-structure {

  --bg: #f7f8fc;
  --panel: #ffffff;
  --text: #080d27;
  --muted: #5f6475;
  --line: #cfd3dd;
  --soft-line: #e8eaf1;
  --navy: #080d27;
  --navy-2: #111735;
  --soft: #f1f3f8;
  --success: #0f7a4f;
  --warning: #ad6b00;
  --danger: #a32929;

  width: 100%;
  color: var(--text);
  line-height: 1.5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sht-html-structure *, .sht-html-structure *::before, .sht-html-structure *::after { box-sizing: border-box; }

.sht-html-structure * {
  box-sizing: border-box;
}

.sht-html-structure a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sht-html-structure {
  width: 100%;
  max-width: none;
  margin: 0 0 64px;
}

.sht-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--soft-line);
  margin-bottom: 34px;
}

.sht-brand {
  font-size: 13px;
  letter-spacing: .16em;
  font-weight: 850;
}

.sht-site-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.sht-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 12px 0 34px;
}

.sht-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
}

.sht-html-structure h1,
.sht-html-structure h2,
.sht-html-structure h3 {
  color: var(--text);
  letter-spacing: -0.03em;
}

.sht-html-structure h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: .92;
  margin: 0 0 18px;
}

.sht-html-structure h2 {
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.06;
  margin: 0 0 14px;
}

.sht-html-structure h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.sht-intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.sht-hero-action,
.sht-html-structure button {
  appearance: none;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 13px 18px;
  cursor: pointer;
  white-space: nowrap;
}

.sht-hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sht-html-structure button:hover,
.sht-hero-action:hover {
  background: var(--navy-2);
}

.sht-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: none;
}

.sht-sticky-checker {
  position: sticky;
  top: 0;
  z-index: 5;
}

.sht-form-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 24px;
  align-items: start;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--soft-line);
}

.sht-form-head h2 {
  margin-bottom: 0;
}

.sht-privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.sht-url-form label {
  font-weight: 800;
}

.sht-mode-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.sht-mode-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 15px;
}

.sht-mode-row input[type="radio"] {
  width: auto;
  accent-color: var(--navy);
}

.sht-max-pages {
  margin-left: auto;
}

.sht-max-pages input {
  width: 78px;
  padding: 9px 10px;
}

.sht-url-row {
  display: flex;
  gap: 10px;
}

.sht-html-structure input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
}

.sht-html-structure input:focus {
  outline: 2px solid rgba(8, 13, 39, .12);
  outline-offset: 2px;
  border-color: var(--navy);
}

.sht-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sht-example details,
.sht-all-headings {
  cursor: pointer;
}

.sht-example summary,
.sht-all-headings summary {
  font-weight: 850;
}

.sht-example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.sht-example-grid > div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

.sht-example code {
  display: block;
  margin-top: 8px;
  white-space: normal;
  color: var(--navy);
}

.sht-example p,
.sht-empty-state p,
.sht-summary p {
  margin: 8px 0 0;
  color: var(--muted);
}

.sht-empty-state {
  background: transparent;
  border-style: dashed;
}

.sht-status.sht-bad,
.sht-summary.sht-bad {
  border-color: rgba(163, 41, 41, .35);
  background: #fff7f7;
}

.sht-summary.sht-ok {
  border-color: rgba(15, 122, 79, .35);
  background: #f6fbf8;
}

.sht-summary {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: center;
}

.sht-counts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.sht-count-card {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  padding: 13px;
}

.sht-count-card span {
  display: block;
  color: var(--muted);
  font-weight: 850;
  font-size: 13px;
}

.sht-count-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sht-compact {
  padding: 18px 22px;
}

.sht-sequence {
  margin: 0;
  line-height: 1.7;
  word-break: break-word;
  color: var(--text);
}

.sht-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sht-issue {
  border-radius: 8px;
  padding: 14px;
}

.sht-issue p {
  margin: 8px 0;
}

.sht-issue small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  word-break: break-word;
}

.sht-issue.sht-error {
  border: 1px solid rgba(163, 41, 41, .35);
  background: #fff7f7;
}

.sht-issue.sht-warning {
  border: 1px solid rgba(173, 107, 0, .35);
  background: #fffaf0;
}

.sht-heading-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.sht-heading-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

.sht-tag {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--soft-line);
  font-weight: 850;
}

.sht-heading-list small {
  display: block;
  margin: 5px 0 0 48px;
  color: var(--muted);
  word-break: break-word;
}

.sht-table-wrap {
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
}

.sht-html-structure table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.sht-html-structure th,
.sht-html-structure td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--soft-line);
  font-size: 14px;
}

.sht-html-structure th {
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sht-html-structure td:not(:first-child),
.sht-html-structure th:not(:first-child) {
  text-align: center;
}

.sht-link-button {
  background: transparent;
  color: var(--navy);
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: left;
  white-space: normal;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sht-link-button:hover {
  background: transparent;
}

.sht-num-bad {
  font-weight: 900;
  color: var(--danger);
}

.sht-num-warn {
  font-weight: 900;
  color: var(--warning);
}

.sht-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.sht-tab-button {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sht-tab-button:hover {
  background: var(--soft);
}

.sht-tab-button.sht-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.sht-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.sht-pill.sht-bad {
  background: #fee2e2;
  color: #991b1b;
}

.sht-pill.sht-warn {
  background: #fef3c7;
  color: #92400e;
}

.sht-tab-panel {
  display: none;
  border-top: 1px solid var(--soft-line);
  padding-top: 18px;
}

.sht-tab-panel.sht-active {
  display: block;
}

.sht-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.sht-page-head h3 {
  word-break: break-word;
}

.sht-mini-counts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
}

.sht-mini-counts span {
  border: 1px solid var(--soft-line);
  background: var(--soft);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
}

.sht-mini-counts strong {
  color: var(--text);
}

.sht-subsection {
  margin-top: 20px;
}

.sht-all-headings {
  margin-top: 20px;
}

.sht-small-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  word-break: break-word;
}

@media (max-width: 860px) {
  .sht-html-structure {
    width: min(100% - 24px, 1160px);
  }

  .sht-site-header {
    margin-bottom: 24px;
  }

  .sht-hero,
  .sht-summary,
  .sht-form-head,
  .sht-page-head {
    grid-template-columns: 1fr;
  }

  .sht-hero {
    align-items: start;
  }

  .sht-hero-action {
    width: 100%;
  }

  .sht-counts {
    grid-template-columns: repeat(3, 1fr);
  }

  .sht-cards,
  .sht-example-grid {
    grid-template-columns: 1fr;
  }

  .sht-url-row {
    flex-direction: column;
  }

  .sht-sticky-checker {
    position: static;
  }

  .sht-max-pages {
    margin-left: 0;
  }

  .sht-mini-counts {
    grid-template-columns: repeat(2, auto);
    justify-content: start;
  }
}

@media (max-width: 520px) {
  .sht-counts {
    grid-template-columns: repeat(2, 1fr);
  }

  .sht-mode-row {
    align-items: flex-start;
    flex-direction: column;
  }

  button,
  .sht-hero-action {
    width: 100%;
  }
}

.sht-html-structure .sht-checker { position: relative; top: auto; }
.sht-html-structure .sht-url-form button[disabled] { opacity: .65; cursor: wait; }
.sht-html-structure .sht-status:empty { display:none; }
.sht-html-structure .sht-status { margin-bottom:16px; }
.sht-html-structure .sht-loading { padding:18px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
@media (max-width: 720px) {
  .sht-html-structure .sht-form-head { grid-template-columns: 1fr; gap: 10px; }
  .sht-html-structure .sht-url-row { flex-direction: column; }
  .sht-html-structure .sht-example-grid { grid-template-columns: 1fr; }
  .sht-html-structure .sht-max-pages { margin-left: 0; }
}

/* WordPress container integration */
.skarpere-tool[data-skarpere-tool="html-structure"] { width: 100%; max-width: none; }
.skarpere-tool[data-skarpere-tool="html-structure"] .sht-html-structure { width: 100%; max-width: none; }
