/**
 * Tool workspace UI — single tool pages.
 */

.tnx-tool {
  --tnx-tool-border: var(--tnx-border);
  --tnx-tool-radius: var(--tnx-radius);
}

.tnx-tool-lead {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--tnx-muted);
  max-width: 56rem;
}

.tnx-tool .tnx-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.tnx-tool .tnx-textarea,
.tnx-tool .tnx-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tnx-tool-border);
  border-radius: var(--tnx-tool-radius);
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(2, 6, 23, 0.74);
  color: var(--tnx-text);
}

.tnx-tool .tnx-textarea:focus,
.tnx-tool .tnx-input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.22);
  outline-offset: 1px;
  border-color: var(--tnx-primary);
}

.tnx-tool .tnx-code,
.tnx-tool .tnx-input-mono,
.tnx-tool .tnx-pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
}

.tnx-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.tnx-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.tnx-stat-box {
  background: var(--tnx-bg-soft);
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 0.85rem;
  text-align: center;
}

.tnx-stat-val {
  display: block;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--tnx-primary);
}

.tnx-stat-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--tnx-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.25rem;
}

/* Password generator */
.tnx-field-row {
  margin-bottom: 1rem;
}

.tnx-range {
  width: 100%;
  accent-color: var(--tnx-primary);
}

.tnx-fieldset {
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 1rem 1rem 0.75rem;
  margin: 0 0 1rem;
}

.tnx-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.tnx-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.tnx-pw-out-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.tnx-pw-out-wrap .tnx-input {
  flex: 1 1 220px;
}

.tnx-meter-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.tnx-meter-label {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 0 0 100%;
}

@media (min-width: 480px) {
  .tnx-meter-label {
    flex: 0 0 auto;
  }
}

.tnx-meter {
  flex: 1;
  height: 8px;
  background: var(--tnx-border);
  border-radius: 999px;
  overflow: hidden;
  min-width: 120px;
}

#tnx-pw-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.2s;
  background: #dc2626;
}

#tnx-pw-meter-fill.weak {
  background: #dc2626;
}

#tnx-pw-meter-fill.mid {
  background: #f59e0b;
}

#tnx-pw-meter-fill.strong {
  background: #16a34a;
}

#tnx-pw-meter-txt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tnx-muted);
}

/* Meta / SERP */
.tnx-field-group {
  margin-bottom: 1.15rem;
}

.tnx-hint {
  font-size: 0.8rem;
  color: var(--tnx-muted);
  display: block;
  margin-top: 0.35rem;
}

.tnx-serp-preview {
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 1rem;
  background: rgba(248, 250, 252, 0.96);
  margin-bottom: 1.25rem;
  max-width: 560px;
}

.tnx-serp-title {
  color: #1a0dab;
  font-size: 1.1rem;
  text-decoration: underline;
  margin-bottom: 0.2rem;
}

.tnx-serp-url {
  color: #006621;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.tnx-serp-desc {
  color: #4d5156;
  font-size: 0.875rem;
  line-height: 1.45;
}

.tnx-pre {
  background: var(--tnx-bg-soft);
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 1rem;
  overflow: auto;
  max-height: 220px;
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* JSON */
.tnx-json-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 767px) {
  .tnx-json-cols {
    grid-template-columns: 1fr;
  }
}

.tnx-msg {
  min-height: 1.5rem;
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.tnx-msg.ok {
  color: #15803d;
}

.tnx-msg.err {
  color: #b91c1c;
}

/* Image compressor */
.tnx-dropzone {
  border: 2px dashed var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 2rem 1rem;
  text-align: center;
  background: var(--tnx-bg-soft);
  transition: border-color 0.2s, background 0.2s;
}

.tnx-dropzone:hover {
  border-color: var(--tnx-primary);
  background: rgba(56, 189, 248, 0.1);
}

.tnx-file-label {
  color: var(--tnx-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.tnx-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

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

.tnx-img-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

@media (max-width: 767px) {
  .tnx-img-preview {
    grid-template-columns: 1fr;
  }
}

.tnx-img-preview img {
  max-width: 100%;
  height: auto;
  border-radius: var(--tnx-tool-radius);
  border: 1px solid var(--tnx-border);
  background: rgba(15, 23, 42, 0.78);
}

/* Tool page single extras */
.tnx-tool-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.tnx-tool-docs h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

/* AI Humanizer */
.tnx-ai-humanizer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tnx-aih-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.08), rgba(14, 165, 233, 0.06));
}

.tnx-aih-head h2 {
  margin: 0.35rem 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.tnx-aih-badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--tnx-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tnx-aih-limit {
  white-space: nowrap;
  font-weight: 800;
  color: var(--tnx-primary);
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid var(--tnx-border);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.tnx-aih-limit.warn {
  color: #b45309;
  background: #fffbeb;
}

.tnx-aih-limit.bad {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.tnx-aih-controls {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 0.65rem 0.9rem;
  align-items: center;
}

.tnx-aih-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tnx-aih-score {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--tnx-tool-radius);
  border: 1px solid var(--tnx-border);
  background: var(--tnx-bg-soft);
  color: var(--tnx-muted);
}

.tnx-aih-output {
  min-height: 374px;
  max-height: 520px;
  overflow: auto;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tnx-tool-border);
  border-radius: var(--tnx-tool-radius);
  background: rgba(2, 6, 23, 0.74);
  color: var(--tnx-text);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.tnx-aih-output:focus {
  outline: 2px solid rgba(56, 189, 248, 0.22);
  outline-offset: 1px;
  border-color: var(--tnx-primary);
}

.tnx-aih-output p {
  margin: 0 0 0.85rem;
}

.tnx-aih-output p:last-child {
  margin-bottom: 0;
}

.tnx-aih-changed {
  background: #dcfce7;
  color: #14532d;
  border-bottom: 2px solid #22c55e;
  padding: 0.05em 0.18em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.tnx-aih-kept {
  background: rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.65);
  padding: 0.05em 0.18em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.tnx-aih-score strong {
  color: var(--tnx-primary);
  font-size: 1.15rem;
}

.tnx-aih-note {
  padding: 0.85rem 1rem;
  border-radius: var(--tnx-tool-radius);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--tnx-border);
  color: var(--tnx-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .tnx-aih-grid {
    grid-template-columns: 1fr;
  }

  .tnx-aih-controls {
    grid-template-columns: 1fr;
  }

  .tnx-aih-head {
    flex-direction: column;
  }
}

/* AI Presentation Generator */
.tnx-aip {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tnx-aip-panel,
.tnx-aip-preview-wrap {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--tnx-tool-radius);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 42%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.tnx-aip-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 1rem;
}

.tnx-aip-panel {
  padding: 1.2rem;
}

.tnx-aip-panel-head,
.tnx-aip-preview-head,
.tnx-aip-download-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.tnx-aip-panel-head {
  margin-bottom: 1rem;
}

.tnx-aip-panel-head h3,
.tnx-aip-preview-head h3 {
  margin: 0;
  color: #f8fafc;
  letter-spacing: -0.04em;
}

.tnx-aip-panel-head span {
  color: var(--tnx-muted);
  font-size: 0.82rem;
}

.tnx-aip-textarea {
  min-height: 220px;
  resize: vertical;
}

.tnx-aip-file-name {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--tnx-muted);
}

.tnx-aip-notes-title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tnx-muted);
}

.tnx-aip-tip-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.tnx-aip-upload {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(125, 211, 252, 0.34);
  border-radius: var(--tnx-tool-radius);
  background: rgba(2, 6, 23, 0.38);
}

.tnx-aip-file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #7dd3fc;
  font-weight: 700;
  cursor: pointer;
}

.tnx-aip-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tnx-aip-options .tnx-input-hint {
  margin: -0.25rem 0 0;
  font-size: 0.88rem;
  line-height: 1.48;
}

.tnx-aip-deck-style-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.tnx-aip-deck-style-row .tnx-input {
  flex: 1 1 12rem;
  min-width: 0;
}

.tnx-aip-deck-style-row .tnx-btn {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.tnx-aip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.tnx-aip-progress {
  min-height: 2.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--tnx-tool-radius);
  background: rgba(2, 6, 23, 0.46);
  color: var(--tnx-muted);
  font-size: 0.9rem;
}

.tnx-aip-progress .err {
  color: #fca5a5;
}

.tnx-aip-progress-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 0.55rem;
  overflow: hidden;
}

.tnx-aip-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #8b5cf6, #ec4899);
  transition: width 0.35s ease, opacity 0.35s ease;
}

.tnx-aip--busy .tnx-aip-progress-bar {
  width: 92%;
  animation: tnx-aip-bar-pulse 1.2s ease-in-out infinite;
}

@keyframes tnx-aip-bar-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.tnx-aip-status-text {
  display: block;
}

.tnx-aip-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.tnx-aip-slide--dynamic:not(.tnx-aip-slide--tone-light) .tnx-aip-slide-badge {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tnx-aip-slide--dynamic.tnx-aip-slide--tone-light .tnx-aip-slide-badge {
  color: rgba(39, 39, 42, 0.95);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 18px rgba(24, 24, 27, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tnx-aip-preview-wrap {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.tnx-aip-preview-head {
  align-items: center;
  margin-bottom: 1rem;
}

.tnx-aip-preview-head p {
  margin: 0.35rem 0 0;
  color: var(--tnx-muted);
}

.tnx-aip-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tnx-aip-counter {
  color: #dbeafe;
  font-weight: 700;
  min-width: 3.5rem;
  text-align: center;
}

.tnx-aip-slide-stage {
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 1.5rem);
}

.tnx-aip-slide {
  --tnx-aip-slide-accent: #38bdf8;
  position: relative;
  width: min(100%, 860px);
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  padding: clamp(1.4rem, 4vw, 3rem);
  padding-left: clamp(1.6rem, 5vw, 3.25rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: auto;
}

.tnx-aip-slide:not(.tnx-aip-slide--type-title)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 28px 0 0 28px;
  background: linear-gradient(
    180deg,
    var(--tnx-aip-slide-accent) 0%,
    color-mix(in srgb, var(--tnx-aip-slide-accent) 45%, transparent) 42%,
    transparent 100%
  );
  box-shadow:
    4px 0 36px color-mix(in srgb, var(--tnx-aip-slide-accent) 40%, transparent),
    inset -1px 0 0 rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.tnx-aip-slide--dynamic {
  --tnx-aip-slide-accent: #a1a1aa;
  background:
    conic-gradient(from 235deg at 90% -5%, rgba(161, 161, 170, 0.12), transparent 40%),
    radial-gradient(ellipse 92% 72% at 8% -4%, rgba(244, 244, 245, 0.12), transparent 56%),
    radial-gradient(ellipse 80% 55% at 92% 100%, rgba(120, 120, 128, 0.18), transparent 52%),
    linear-gradient(158deg, #070708 0%, #141418 42%, #222226 100%);
  color: #fafafa;
}

.tnx-aip-slide--dynamic.tnx-aip-slide--tone-light {
  background:
    radial-gradient(ellipse 126% 86% at -4% -6%, rgba(139, 92, 246, 0.1), transparent 52%),
    radial-gradient(ellipse 95% 80% at 102% -2%, rgba(56, 189, 248, 0.1), transparent 48%),
    linear-gradient(152deg, #ffffff 0%, #f4f4f5 48%, #e8e8ec 100%);
  color: #18181b;
  border-color: rgba(24, 24, 27, 0.09);
}

.tnx-aip-slide-label {
  color: var(--tnx-aip-slide-label, #67e8f9);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}

.tnx-aip-slide--dynamic.tnx-aip-slide--tone-light .tnx-aip-slide-label {
  color: var(--tnx-aip-slide-label, #52525b);
}

.tnx-aip-slide h4 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
  font-weight: 750;
}

.tnx-aip-slide--dynamic:not(.tnx-aip-slide--tone-light) h4 {
  text-shadow: 0 2px 36px rgba(0, 0, 0, 0.45);
}

.tnx-aip-slide--dynamic.tnx-aip-slide--tone-light h4 {
  letter-spacing: -0.058em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.tnx-aip-slide--type-title h4 {
  text-align: center;
  font-size: clamp(1.6rem, 4.6vw, 3.15rem);
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

.tnx-aip-slide--type-title .tnx-aip-slide-sub {
  text-align: center;
  max-width: 85%;
  margin-left: auto;
  margin-right: auto;
}

.tnx-aip-slide--type-section h4 {
  font-size: clamp(1.55rem, 4.2vw, 2.75rem);
}

.tnx-aip-slide--type-conclusion ul {
  list-style-type: "\2713\00a0";
}

.tnx-aip-slide--type-conclusion li::marker {
  color: var(--tnx-aip-slide-accent);
  font-weight: 700;
}

.tnx-aip-slide-sub {
  margin: 0 0 1rem;
  opacity: 0.82;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--tnx-aip-slide-muted, inherit);
}

.tnx-aip-slide ul {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.6rem;
}

.tnx-aip-slide:not(.tnx-aip-slide--type-conclusion) li::marker {
  color: var(--tnx-aip-slide-accent);
  font-size: 1.05em;
}

.tnx-aip-slide li {
  font-size: clamp(0.95rem, 1.7vw, 1.12rem);
  line-height: 1.38;
  padding-left: 0.25rem;
}

.tnx-aip-slide-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(152px, 0.5fr);
  gap: 1.2rem;
  align-items: stretch;
  margin-top: 0.35rem;
}

.tnx-aip-slide--media-left .tnx-aip-slide-inner {
  grid-template-columns: minmax(152px, 0.5fr) minmax(0, 1.14fr);
}

.tnx-aip-slide--media-left .tnx-aip-slide-main {
  order: 2;
}

.tnx-aip-slide--media-left .tnx-aip-slide-media {
  order: 1;
}

.tnx-aip-slide-media {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

@media (max-width: 720px) {
  .tnx-aip-slide--with-ref .tnx-aip-slide-inner,
  .tnx-aip-slide--media-left .tnx-aip-slide-inner {
    grid-template-columns: 1fr;
  }

  .tnx-aip-slide--media-left .tnx-aip-slide-main,
  .tnx-aip-slide--media-left .tnx-aip-slide-media {
    order: unset;
  }
}

.tnx-aip-slide-photo-credit {
  margin: 0;
  padding: 0 0.1rem;
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.5;
}

.tnx-aip-slide--with-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tnx-aip-slide-hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.025);
}

.tnx-aip-slide-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      110deg,
      rgba(7, 8, 12, 0.93) 0%,
      rgba(7, 8, 12, 0.55) 40%,
      rgba(12, 14, 20, 0.18) 100%
    ),
    linear-gradient(to top, rgba(0, 0, 0, 0.76) 0%, transparent 58%);
}

.tnx-aip-slide-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 100%;
  padding: clamp(1.75rem, 5vw, 2.85rem) clamp(1rem, 3vw, 2rem)
    clamp(1.5rem, 4vw, 2.25rem);
}

.tnx-aip-slide--with-hero .tnx-aip-slide-badge {
  margin-bottom: 0.25rem;
}

.tnx-aip-slide--with-hero .tnx-aip-slide-label {
  margin-bottom: 0.45rem;
}

.tnx-aip-slide--with-hero h4 {
  text-shadow: 0 4px 48px rgba(0, 0, 0, 0.55);
}

.tnx-aip-slide--with-hero .tnx-aip-slide-sub {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.tnx-aip-slide--with-hero .tnx-aip-slide-photo-credit {
  opacity: 0.7;
  margin-top: 0.75rem;
}

.tnx-aip-slide--with-hero.tnx-aip-slide--tone-light .tnx-aip-slide-badge {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.tnx-aip-slide--type-title ul:empty {
  display: none;
}

.tnx-aip-slide-fig {
  margin: 0;
  flex: 1 1 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.tnx-aip-slide--dynamic.tnx-aip-slide--tone-light .tnx-aip-slide-fig {
  border-color: rgba(24, 24, 27, 0.12);
  box-shadow: 0 16px 44px rgba(24, 24, 27, 0.12);
  background: rgba(255, 255, 255, 0.65);
}

.tnx-aip-slide-fig img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 200px;
  max-height: min(440px, 52vh);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  vertical-align: middle;
}

.tnx-aip-thumbs {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.9rem;
}

.tnx-aip-thumb {
  min-width: 150px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.6);
  color: #dbeafe;
  padding: 0.65rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.tnx-aip-thumb span {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  font-size: 0.78rem;
}

.tnx-aip-thumb.is-active {
  border-color: rgba(125, 211, 252, 0.62);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.12);
}

.tnx-aip-download-row {
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

#tnx-aip-download.tnx-aip-download--loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 11.5rem;
  padding-inline: 1.35rem;
  cursor: progress;
}

#tnx-aip-download.tnx-aip-download--loading::before {
  content: "";
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  animation: tnx-aip-download-spin 0.65s linear infinite;
}

@keyframes tnx-aip-download-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .tnx-aip-layout,
  .tnx-aip-preview-head,
  .tnx-aip-download-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

/* —— SEO Meta Tag Generator —— */
.tnx-seo-meta {
  --tnx-seo-navy: #1e3a8a;
}

.tnx-seo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

@media (max-width: 991px) {
  .tnx-seo-layout {
    grid-template-columns: 1fr;
  }
}

.tnx-seo-lead {
  margin: 0 0 1.25rem;
  color: var(--tnx-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.tnx-seo-optional {
  font-weight: 400;
  color: var(--tnx-muted);
}

.tnx-seo-tip {
  cursor: help;
  color: var(--tnx-primary);
  font-weight: 600;
}

.tnx-seo-fieldset {
  margin-bottom: 1.25rem;
}

.tnx-seo-hint-inline {
  font-size: 0.82rem;
  color: var(--tnx-muted);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.tnx-seo-sug-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tnx-seo-sug-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.tnx-seo-sug-row--desc {
  align-items: start;
}

.tnx-seo-sug-row--desc .tnx-seo-radio {
  margin-top: 0.6rem;
}

.tnx-seo-radio {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tnx-muted);
  cursor: pointer;
  white-space: nowrap;
}

.tnx-seo-sug-lbl {
  min-width: 1rem;
}

.tnx-seo-sug-hint {
  font-size: 0.75rem;
  color: var(--tnx-muted);
  font-variant-numeric: tabular-nums;
  min-width: 3.25rem;
  text-align: right;
}

.tnx-seo-actions {
  margin-top: 0.5rem;
}

.tnx-seo-copy-msg {
  min-height: 1.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #15803d;
  margin: 0.35rem 0 0;
}

.tnx-seo-history-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tnx-border);
}

.tnx-seo-subhead {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--tnx-text);
}

.tnx-seo-history {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

.tnx-seo-history-item {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.tnx-seo-muted {
  color: var(--tnx-muted);
  font-size: 0.88rem;
}

.tnx-seo-help {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tnx-border);
}

.tnx-seo-details {
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.5rem;
  background: var(--tnx-bg-soft);
}

.tnx-seo-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--tnx-primary);
}

.tnx-seo-details p,
.tnx-seo-details ul {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--tnx-text);
  line-height: 1.5;
}

.tnx-seo-details ul {
  padding-left: 1.2rem;
}

.tnx-seo-score-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.06) 0%, rgba(30, 58, 138, 0.02) 100%);
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  padding: 1rem 1.15rem 1.15rem;
  margin-bottom: 1rem;
}

.tnx-seo-gauge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.tnx-seo-gauge-track {
  flex: 1;
  min-width: 140px;
  height: 10px;
  background: var(--tnx-border);
  border-radius: 999px;
  overflow: hidden;
}

.tnx-seo-gauge-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.35s ease, background 0.25s;
  background: var(--tnx-primary);
}

.tnx-seo-gauge-fill.tnx-seo-gauge--low {
  background: #dc2626;
}

.tnx-seo-gauge-fill.tnx-seo-gauge--mid {
  background: #d97706;
}

.tnx-seo-gauge-fill.tnx-seo-gauge--high {
  background: #15803d;
}

.tnx-seo-score-val {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--tnx-primary);
}

.tnx-seo-score-max {
  font-size: 0.95rem;
  color: var(--tnx-muted);
}

.tnx-seo-tips {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--tnx-text);
  line-height: 1.45;
}

.tnx-seo-tips li {
  margin-bottom: 0.35rem;
}

.tnx-seo-kw-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.tnx-seo-kw-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--tnx-bg-soft);
  border: 1px solid var(--tnx-border);
  color: var(--tnx-muted);
}

.tnx-seo-kw-badge.ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.tnx-seo-kw-badge.bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.tnx-seo-kw-suggest {
  font-size: 0.82rem;
  color: var(--tnx-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.tnx-seo-preview-tools {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.tnx-seo-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.tnx-seo-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tnx-muted);
}

.tnx-seo-select-wrap .tnx-input {
  font-weight: 400;
}

.tnx-seo-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.35rem;
}

.tnx-seo-count {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tnx-seo-count--ok {
  color: #15803d;
}

.tnx-seo-count--warn {
  color: #d97706;
}

.tnx-seo-count--short {
  color: #ca8a04;
}

.tnx-seo-count--bad {
  color: #b91c1c;
}

.tnx-seo-warn {
  font-size: 0.8rem;
  color: #b45309;
  margin: 0 0 0.35rem;
  min-height: 1.1rem;
}

.tnx-seo-serp {
  max-width: 600px;
  transition: max-width 0.2s ease;
}

.tnx-seo-serp.tnx-seo-serp--mobile {
  max-width: 360px;
}

.tnx-seo-serp.tnx-seo-serp--mobile .tnx-serp-title {
  font-size: 1rem;
}

.tnx-seo-serp.tnx-seo-serp--mobile .tnx-serp-desc {
  font-size: 0.8125rem;
}

.tnx-seo-serp-rich {
  margin-bottom: 0.5rem;
}

.tnx-seo-rich-line {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.tnx-seo-stars {
  color: #f59e0b;
  letter-spacing: 0.05em;
}

.tnx-seo-rich-muted {
  color: #70757a;
}

.tnx-seo-rich-date {
  color: #70757a;
}

.tnx-seo-kw-mark {
  background: #fef08a;
  padding: 0 0.1em;
  border-radius: 2px;
}

.tnx-seo-social {
  margin-top: 1.25rem;
  max-width: 520px;
}

.tnx-seo-soc-fb {
  border: 1px solid var(--tnx-border);
  border-radius: var(--tnx-tool-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--tnx-shadow);
}

.tnx-seo-soc-fb-img {
  height: 140px;
  background: linear-gradient(120deg, #e0e7ff, #c7d2fe);
}

.tnx-seo-soc-fb-body {
  padding: 0.65rem 0.85rem;
}

.tnx-seo-soc-domain {
  display: block;
  font-size: 0.7rem;
  color: #65676b;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.tnx-seo-soc-title {
  display: block;
  font-size: 0.95rem;
  color: #050505;
  margin-bottom: 0.25rem;
}

.tnx-seo-soc-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #65676b;
  line-height: 1.35;
}

.tnx-seo-soc-tw {
  border: 1px solid var(--tnx-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
  max-width: 420px;
}

.tnx-seo-soc-tw-desc {
  margin: 0.35rem 0;
  font-size: 0.85rem;
  color: #536471;
}

.tnx-seo-soc-tw-url {
  font-size: 0.75rem;
  color: #1d9bf0;
}

/* ---- AI Image Background Remover & Upscaler ---- */
.tnx-ibu-dropzone {
  border: 1px dashed rgba(125, 211, 252, 0.35);
  border-radius: var(--tnx-tool-radius);
  padding: 2rem 1.25rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.tnx-ibu-drop-title {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tnx-text);
}

.tnx-ibu-drop-or {
  margin: 0.15rem 0;
  font-size: 0.8rem;
  color: var(--tnx-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Label styled as primary button — opens file dialog via `for` + input id */
.tnx-ibu-browse-btn {
  margin-top: 0.35rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.tnx-ibu-dropzone .tnx-hint {
  margin: 0.75rem 0 0;
  max-width: 32rem;
}

.tnx-ibu-drop-icon {
  display: block;
  font-size: 2rem;
  color: var(--tnx-primary);
  line-height: 1;
}

.tnx-ibu-solid-fieldset {
  margin-top: 0.25rem;
}

.tnx-ibu-solid-lead {
  font-size: 0.88rem;
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.tnx-ibu-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr));
  gap: 0.5rem;
  max-width: 24rem;
  margin-bottom: 0.85rem;
}

.tnx-ibu-swatch {
  width: 100%;
  aspect-ratio: 1;
  max-width: 3rem;
  border-radius: 8px;
  border: 2px solid rgba(148, 163, 184, 0.5);
  background-color: var(--sw, #94a3b8);
  cursor: pointer;
  padding: 0;
  transition:
    box-shadow 0.15s ease,
    transform 0.12s ease,
    border-color 0.15s ease;
}

.tnx-ibu-swatch:hover {
  transform: scale(1.06);
  border-color: rgba(125, 211, 252, 0.7);
}

.tnx-ibu-swatch.is-selected {
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.9);
  border-color: rgba(56, 189, 248, 0.95);
}

.tnx-ibu-swatch:focus-visible {
  outline: 2px solid var(--tnx-primary);
  outline-offset: 2px;
}

.tnx-ibu-custom-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tnx-ibu-color-input {
  width: 3.25rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--tnx-border);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.5);
}

.tnx-ibu-hex-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tnx-muted);
  letter-spacing: 0.02em;
}

.tnx-ibu-main {
  margin-top: 0.5rem;
}

.tnx-ibu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tnx-ibu-tab {
  flex: 1 1 auto;
  min-width: 8rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--tnx-tool-radius);
  border: 1px solid var(--tnx-border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--tnx-text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.tnx-ibu-tab:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #e2e8f0;
}

.tnx-ibu-tab.is-active {
  border-color: var(--tnx-primary);
  background: rgba(30, 58, 138, 0.42);
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}

.tnx-ibu-panel-hint {
  font-size: 0.88rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.tnx-ibu-preview-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.tnx-ibu-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: var(--tnx-tool-radius);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  pointer-events: all;
}

.tnx-ibu-busy.is-on {
  display: flex;
}

.tnx-ibu-busy-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

.tnx-ibu-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: rgba(56, 189, 248, 0.95);
  border-radius: 50%;
  animation: tnx-ibu-spin 0.7s linear infinite;
}

@keyframes tnx-ibu-spin {
  to {
    transform: rotate(360deg);
  }
}

.tnx-ibu-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}

.tnx-ibu-pane {
  min-width: 0;
}

.tnx-ibu-pane-badge {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tnx-muted);
  margin-bottom: 0.45rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--tnx-border);
}

.tnx-ibu-pane-badge--after {
  color: #7dd3fc;
  border-bottom-color: rgba(56, 189, 248, 0.35);
}

.tnx-ibu-pane-frame {
  border-radius: var(--tnx-tool-radius);
  overflow: auto;
  border: 1px solid var(--tnx-border);
  background:
    linear-gradient(45deg, rgba(30, 41, 59, 0.85) 25%, rgba(15, 23, 42, 0.9) 25%, rgba(15, 23, 42, 0.9) 50%, rgba(30, 41, 59, 0.85) 50%, rgba(30, 41, 59, 0.85) 75%, rgba(15, 23, 42, 0.9) 75%);
  background-size: 16px 16px;
  line-height: 0;
  max-height: min(68vh, 520px);
}

.tnx-ibu-pane--before .tnx-ibu-pane-frame {
  border-color: rgba(148, 163, 184, 0.28);
}

.tnx-ibu-pane--after .tnx-ibu-pane-frame {
  border-color: rgba(56, 189, 248, 0.28);
}

.tnx-ibu-pane--after.tnx-ibu-after-solid .tnx-ibu-pane-frame {
  background-color: rgba(15, 23, 42, 0.55);
  background-image: none;
}

.tnx-ibu-canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.tnx-ibu-pane-hint {
  font-size: 0.78rem;
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.tnx-ibu-erase-ready.tnx-ibu-canvas--after {
  cursor: crosshair;
  touch-action: none;
}

.tnx-ibu-is-busy .tnx-btn-primary:disabled,
.tnx-ibu-is-busy .tnx-btn-secondary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.tnx-ibu-btn-loading {
  position: relative;
}

@media (max-width: 768px) {
  .tnx-ibu-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tnx-ibu-tabs {
    flex-direction: column;
  }

  .tnx-ibu-tab {
    width: 100%;
  }
}

/* --- Content Repurposing Studio --- */
.tnx-crs {
  --tnx-crs-tab-bg: rgba(15, 23, 42, 0.72);
}

.tnx-crs-ai-hint {
  font-size: 0.88rem;
  padding: 0.65rem 1rem;
  border-radius: var(--tnx-tool-radius, 12px);
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(56, 189, 248, 0.08);
  margin-bottom: 1rem;
}

.tnx-crs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tnx-crs-tab {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--tnx-border);
  background: var(--tnx-crs-tab-bg);
  color: var(--tnx-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.tnx-crs-tab:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.tnx-crs-tab.is-active {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
}

.tnx-crs-h {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #f8fafc;
}

.tnx-crs-inline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
  margin: 1rem 0;
  align-items: end;
}

.tnx-crs-panel {
  margin-bottom: 0.5rem;
}

.tnx-crs-output-wrap {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tnx-border);
}

.tnx-crs-output-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.tnx-crs-output-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tnx-crs-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tnx-crs-output {
  box-sizing: border-box;
  min-height: 16rem;
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  overflow-x: auto;
  padding: 0.9rem 1rem;
}

.tnx-crs-output-rich {
  font-family: system-ui, "Segoe UI", Roboto, Ubuntu, Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.56;
  letter-spacing: 0.01em;
}

.tnx-crs-output-rich:empty::before {
  content: attr(data-placeholder);
  display: block;
  color: var(--tnx-muted, rgba(226, 232, 240, 0.45));
  font-family: inherit;
}

.tnx-crs-output-rich h1,
.tnx-crs-output-rich h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tnx-crs-output-rich h1 {
  font-size: 1.25rem;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

.tnx-crs-output-rich h2 {
  font-size: 1.05rem;
  margin: 1.15rem 0 0.45rem;
  line-height: 1.3;
}

.tnx-crs-output-rich h3 {
  font-size: 0.96rem;
  margin: 0.85rem 0 0.35rem;
  font-weight: 650;
}

.tnx-crs-output-rich p {
  margin: 0 0 0.6rem;
}

.tnx-crs-output-rich hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--tnx-border);
}

.tnx-crs-output-rich ul,
.tnx-crs-output-rich ol {
  margin: 0 0 0.75rem 0;
  padding-left: 1.2rem;
}

.tnx-crs-output-rich blockquote {
  margin: 0.6rem 0 0.75rem;
  padding: 0.35rem 0 0.35rem 0.85rem;
  border-left: 3px solid var(--tnx-border-strong, rgba(226, 232, 240, 0.25));
}

.tnx-crs-output-rich table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75rem 0;
  font-size: 0.82rem;
}

.tnx-crs-output-rich thead th {
  font-weight: 650;
}

.tnx-crs-output-rich th,
.tnx-crs-output-rich td {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--tnx-border);
  text-align: left;
}

.tnx-crs-output-rich pre.tnx-crs-output-pre,
.tnx-crs-output-rich code.tnx-crs-output-code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tnx-crs-output-rich pre.tnx-crs-output-pre {
  padding: 0.65rem 0.75rem;
  margin: 0.65rem 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.tnx-crs-output-rich code.tnx-crs-output-code {
  padding: 0.1rem 0.25rem;
  border-radius: 0.22rem;
  font-size: 0.82em;
}

.tnx-crs-status {
  min-height: 1.25rem;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.tnx-crs-status--err {
  color: #fecaca;
}

.tnx-crs-fetch-row {
  margin-bottom: 0.75rem;
}

.tnx-crs-dl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 1rem;
}

.tnx-crs-dl-label {
  font-size: 0.88rem;
  opacity: 0.88;
  margin-right: 0.25rem;
}

.tnx-crs-dl-hint {
  margin: 0;
  font-size: 0.82rem;
}

.tnx-crs-fetch-feedback {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  min-height: 0;
}

.tnx-crs-fetch-feedback:empty {
  display: none;
}

.tnx-crs-fetch-feedback--ok {
  color: #a5f3fc;
}

.tnx-crs-fetch-feedback--err {
  color: #fecaca;
}

.tnx-crs-btn--loading {
  cursor: wait;
}

.tnx-crs-btn--loading::before {
  content: '';
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.45em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tnx-crs-spin 0.65s linear infinite;
  vertical-align: -0.12em;
}

@keyframes tnx-crs-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .tnx-crs-nav {
    gap: 0.35rem;
  }

  .tnx-crs-tab {
    font-size: 0.76rem;
    padding: 0.4rem 0.65rem;
  }
}