body.tt-tool-body {
  background: #f4f7fb;
  color: #1c2733;
}

.tt-page {
  padding: 2rem 0 4rem;
  font-size: 1rem;
}

.tt-page h1,
.tt-page h2,
.tt-page h3,
.tt-page h4 {
  line-height: 1.25;
}

.tt-page h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  margin-bottom: 0.75rem;
}

.tt-page h2 {
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
  margin-bottom: 0.75rem;
}

.tt-page h3 {
  font-size: 1.12rem;
  margin-bottom: 0.5rem;
}

.tt-page p,
.tt-page li {
  font-size: 1rem;
}

.tt-page ul,
.tt-page ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.tt-page li {
  margin-bottom: 0.35rem;
}

.tt-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: #0b5ed7;
  color: #fff !important;
  padding: 0.75rem 1rem;
  border-radius: 0 0 8px 0;
}

.tt-skip-link:focus {
  left: 0;
}

.tt-hero {
  max-width: 880px;
  margin: 0 auto 2rem;
  text-align: center;
}

.tt-hero p {
  color: #526173;
  font-size: 1.06rem;
  margin-bottom: 1rem;
}

.tt-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.tt-breadcrumb a {
  color: #0b5ed7 !important;
}

.tt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.tt-layout--even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tt-stack > * + * {
  margin-top: 1.25rem;
}

.tt-card {
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.tt-card--flat {
  box-shadow: none;
}

.tt-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tt-card-head h2,
.tt-card-head h3 {
  margin: 0;
}

.tt-help {
  color: #5b6978;
  font-size: 0.875rem;
  margin: 0.35rem 0 0;
}

.tt-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2a37;
  margin-bottom: 0.35rem;
}

.tt-input,
.tt-select,
.tt-textarea,
.tt-codearea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #17212b;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
}

.tt-select {
  appearance: auto;
  min-height: 44px;
}

.tt-textarea {
  min-height: 150px;
  resize: vertical;
}

.tt-codearea {
  min-height: 220px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}

.tt-input:focus,
.tt-select:focus,
.tt-textarea:focus,
.tt-codearea:focus {
  border-color: #0b5ed7;
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.16);
  outline: none;
}

.tt-form-row {
  margin-bottom: 1rem;
}

.tt-form-row:last-child {
  margin-bottom: 0;
}

.tt-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tt-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

.tt-fieldset legend {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tt-check,
.tt-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #fbfdff;
}

.tt-check input,
.tt-switch input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: #0b5ed7;
}

.tt-check span,
.tt-switch span {
  display: block;
  font-size: 0.92rem;
}

.tt-check small,
.tt-switch small {
  display: block;
  color: #5b6978;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.tt-check-stack {
  display: grid;
  gap: 0.65rem;
}

.tt-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tt-btn i {
  font-size: 1rem;
}

.tt-btn-primary {
  background: #0b5ed7;
  color: #fff !important;
}

.tt-btn-primary:hover {
  background: #0a53be;
  color: #fff !important;
}

.tt-btn-secondary {
  background: #fff;
  border-color: #cbd5e1;
  color: #1f2a37 !important;
}

.tt-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #111827 !important;
}

.tt-btn-danger {
  background: #b42318;
  color: #fff !important;
}

.tt-btn-danger:hover {
  background: #981b12;
  color: #fff !important;
}

.tt-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #334155 !important;
}

.tt-btn-ghost:hover {
  background: #eef2f6;
  color: #111827 !important;
}

.tt-btn-small {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.tt-btn-icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.tt-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.tt-btn:focus-visible,
.tt-tab:focus-visible,
.tt-skip-link:focus-visible,
.tt-link-button:focus-visible {
  outline: 3px solid rgba(11, 94, 215, 0.4);
  outline-offset: 2px;
}

.tt-link-button {
  border: 0;
  background: transparent;
  color: #0b5ed7;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.2rem 0;
  cursor: pointer;
}

.tt-tabs {
  display: flex;
  gap: 0.25rem;
  background: #eef2f6;
  border-radius: 12px;
  padding: 0.25rem;
  margin-bottom: 1rem;
}

.tt-tab {
  flex: 1 1 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #526173;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.tt-tab[aria-selected="true"] {
  background: #fff;
  color: #17212b;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.tt-status {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.tt-status i {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.tt-status--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #0b4a8f;
}

.tt-status--success {
  background: #ecfdf3;
  border-color: #a7f3d0;
  color: #065f46;
}

.tt-status--warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #7a4b00;
}

.tt-status--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.tt-status--neutral {
  background: #f8fafc;
  border-color: #dfe6ee;
  color: #526173;
}

.tt-notice {
  border-left: 4px solid #0b5ed7;
  border-radius: 0 10px 10px 0;
  background: #f4f8ff;
  padding: 0.9rem 1rem;
  color: #27415f;
  font-size: 0.92rem;
}

.tt-warning-box {
  border: 1px solid #f2d58a;
  border-radius: 12px;
  background: #fff8e6;
  padding: 0.9rem 1rem;
  color: #5f4300;
  font-size: 0.92rem;
}

.tt-privacy {
  border: 1px solid #b7e4c7;
  border-radius: 12px;
  background: #eefaf3;
  padding: 0.9rem 1rem;
  color: #14532d;
  font-size: 0.92rem;
}

.tt-output {
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  overflow: auto;
  max-height: 560px;
}

.tt-output pre {
  margin: 0;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tt-output--light {
  background: #f8fafc;
  border: 1px solid #dfe6ee;
  color: #17212b;
}

.tt-output--light pre {
  color: #17212b;
}

.tt-empty {
  color: #64748b;
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

.tt-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.65rem;
}

.tt-metric {
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.65rem 0.75rem;
}

.tt-metric-label {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.tt-metric-value {
  display: block;
  color: #17212b;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
}

.tt-rule-row,
.tt-group-rule {
  display: grid;
  gap: 0.5rem;
  align-items: end;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.65rem;
}

.tt-rule-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 104px auto;
}

.tt-group-rule {
  grid-template-columns: 108px minmax(0, 1fr) auto;
}

.tt-rule-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.tt-rows {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.tt-group {
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
}

.tt-group + .tt-group {
  margin-top: 1rem;
}

.tt-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tt-group-head .tt-form-row {
  flex: 1 1 240px;
  margin-bottom: 0;
}

.tt-group-subhead {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0.9rem 0 0.35rem;
}

.tt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #dfe6ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.tt-chip.is-on {
  border-color: #a7f3d0;
  background: #ecfdf3;
  color: #065f46;
}

.tt-chip i {
  font-size: 0.85rem;
}

.tt-meter {
  height: 12px;
  border-radius: 999px;
  background: #e6ebf0;
  overflow: hidden;
}

.tt-meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #b42318;
  transition: width 0.35s ease, background-color 0.35s ease;
}

.tt-meter-fill[data-level="0"] {
  background: #b42318;
}

.tt-meter-fill[data-level="1"] {
  background: #d9480f;
}

.tt-meter-fill[data-level="2"] {
  background: #b7791f;
}

.tt-meter-fill[data-level="3"] {
  background: #2f855a;
}

.tt-meter-fill[data-level="4"] {
  background: #047857;
}

.tt-rating {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 0.5rem;
}

.tt-rating strong {
  font-size: 1.15rem;
}

.tt-rating span {
  color: #64748b;
  font-size: 0.85rem;
}

.tt-messages {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tt-message {
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.tt-message--error {
  border-color: #fecaca;
  background: #fff7f7;
}

.tt-message--warning {
  border-color: #fde68a;
  background: #fffdf5;
}

.tt-message--info {
  border-color: #bfdbfe;
  background: #f7fbff;
}

.tt-message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.tt-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tt-badge--error {
  background: #fee2e2;
  color: #991b1b;
}

.tt-badge--warning {
  background: #fef3c7;
  color: #7a4b00;
}

.tt-badge--info {
  background: #dbeafe;
  color: #0b4a8f;
}

.tt-badge--crawler {
  background: #ede9fe;
  color: #4c1d95;
}

.tt-line {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.tt-details {
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem 1rem;
}

.tt-details + .tt-details {
  margin-top: 0.65rem;
}

.tt-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #17212b;
}

.tt-details summary:focus-visible {
  outline: 3px solid rgba(11, 94, 215, 0.4);
  outline-offset: 2px;
}

.tt-details p,
.tt-details ul {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.tt-content {
  max-width: 960px;
  margin: 2.5rem auto 0;
}

.tt-content h2 {
  margin-top: 1.75rem;
}

.tt-content h2:first-child {
  margin-top: 0;
}

.tt-related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tt-related a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2a37 !important;
  text-decoration: none !important;
}

.tt-related a:hover {
  border-color: #0b5ed7;
  color: #0b5ed7 !important;
}

.tt-password-wrap {
  position: relative;
}

.tt-password-wrap .tt-input {
  padding-right: 3rem;
}

.tt-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #526173;
  cursor: pointer;
}

.tt-password-toggle:hover {
  background: #eef2f6;
}

.tt-password-toggle:focus-visible {
  outline: 3px solid rgba(11, 94, 215, 0.4);
  outline-offset: 1px;
}

.tt-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  color: #64748b;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.tt-inline-meta strong {
  color: #1f2a37;
}

.tt-kbd {
  display: inline-block;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f8fafc;
  padding: 0.05rem 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
}

.tt-hidden {
  display: none !important;
}

.tt-mt-0 {
  margin-top: 0 !important;
}

.tt-mt-1 {
  margin-top: 0.5rem !important;
}

.tt-mt-2 {
  margin-top: 1rem !important;
}

.tt-mb-0 {
  margin-bottom: 0 !important;
}

.tt-mb-1 {
  margin-bottom: 0.5rem !important;
}

.tt-mb-2 {
  margin-bottom: 1rem !important;
}

@media (max-width: 991.98px) {
  .tt-layout,
  .tt-layout--even {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-output {
    max-height: 420px;
  }
}

@media (max-width: 767.98px) {
  .tt-page {
    padding: 1.25rem 0 3rem;
  }

  .tt-hero {
    margin-bottom: 1.25rem;
  }

  .tt-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-rule-row,
  .tt-group-rule {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-rule-actions {
    justify-content: flex-start;
  }

  .tt-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .tt-btn-row .tt-btn {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-page *,
  .tt-page *::before,
  .tt-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
