﻿/* ===================================================================
   Kitpace Design System — Clean, Professional (Google/Fluent-inspired)
   =================================================================== */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --brand: #1a73e8;
  --brand-2: #34a853;
  --brand-3: #fbbc04;
  --success: #188038;
  --warning: #f9ab00;
  --danger: #d93025;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-brand: 0 4px 16px rgba(26, 115, 232, 0.22);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

:root[data-theme="dark"] {
  --bg: #0c0f17;
  --surface: #151922;
  --surface-muted: #1c212d;
  --surface-elevated: #1f2633;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #2d3748;
  --border-hover: #4a5568;
  --brand: #8ab4f8;
  --brand-2: #81c995;
  --brand-3: #fde293;
  --success: #81c995;
  --warning: #fdd663;
  --danger: #f28b82;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-brand: 0 4px 16px rgba(138, 180, 248, 0.25);
}

/* Prism dark theme override */
:root[data-theme="dark"] .code-output,
:root[data-theme="dark"] pre[class*="language-"] {
  background: var(--surface-muted);
}
:root[data-theme="dark"] code[class*="language-"],
:root[data-theme="dark"] pre[class*="language-"] {
  color: #e2e8f0;
  text-shadow: none;
}
:root[data-theme="dark"] .token.comment,
:root[data-theme="dark"] .token.prolog,
:root[data-theme="dark"] .token.doctype,
:root[data-theme="dark"] .token.cdata { color: #64748b; }
:root[data-theme="dark"] .token.punctuation { color: #94a3b8; }
:root[data-theme="dark"] .token.property,
:root[data-theme="dark"] .token.tag,
:root[data-theme="dark"] .token.boolean,
:root[data-theme="dark"] .token.number,
:root[data-theme="dark"] .token.constant,
:root[data-theme="dark"] .token.symbol,
:root[data-theme="dark"] .token.deleted { color: #f87171; }
:root[data-theme="dark"] .token.selector,
:root[data-theme="dark"] .token.attr-name,
:root[data-theme="dark"] .token.string,
:root[data-theme="dark"] .token.char,
:root[data-theme="dark"] .token.builtin,
:root[data-theme="dark"] .token.inserted { color: #34d399; }
:root[data-theme="dark"] .token.operator,
:root[data-theme="dark"] .token.entity,
:root[data-theme="dark"] .token.url { color: #fbbf24; }
:root[data-theme="dark"] .token.atrule,
:root[data-theme="dark"] .token.attr-value,
:root[data-theme="dark"] .token.keyword { color: #818cf8; }
:root[data-theme="dark"] .token.function,
:root[data-theme="dark"] .token.class-name { color: #f472b6; }
:root[data-theme="dark"] .token.regex,
:root[data-theme="dark"] .token.important,
:root[data-theme="dark"] .token.variable { color: #fb923c; }

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--brand);
  color: white;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand);
}

img {
  max-width: 100%;
}

/* ===== LAYOUT ===== */

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* ===== HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.site-header .brand {
  position: relative;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
  border-radius: 11px;
  box-shadow:
    0 10px 22px rgba(26, 115, 232, 0.24),
    0 3px 8px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.site-header .brand .brand-mark {
  width: 34px;
  height: 34px;
}

.brand:hover .brand-mark {
  transform: translateY(-1px) scale(1.04);
  filter: saturate(1.08);
  box-shadow:
    0 14px 28px rgba(26, 115, 232, 0.30),
    0 5px 12px rgba(52, 168, 83, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -8px 16px rgba(15, 23, 42, 0.12);
}

.brand-text {
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-text span {
  color: color-mix(in srgb, var(--brand) 68%, var(--text));
  font-weight: inherit;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme-toggle] {
  position: relative;
  color: var(--text);
  background: var(--surface-muted);
  border-color: transparent;
  overflow: hidden;
}

[data-theme-toggle]:hover {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-muted));
  border-color: transparent;
  box-shadow: none;
}

[data-theme-toggle]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

[data-theme-toggle] svg {
  color: currentColor;
  stroke: currentColor;
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme-toggle]:hover svg { transform: rotate(20deg); }
:root[data-theme="dark"] [data-theme-toggle]:hover svg { transform: rotate(-20deg); }

[data-theme-toggle] .icon-sun { display: none; }
[data-theme-toggle] .icon-moon { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .icon-sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .icon-moon { display: none; }

.nav-toggle {
  display: none !important;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex !important;
  }
}

[data-theme-toggle].btn-icon,
.nav-toggle.btn-icon {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-muted);
}

/* ===== BUTTONS ===== */

.btn,
button,
input,
select,
textarea {
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-size: 0.925rem;
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-muted);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn-primary {
  border-color: transparent;
  background: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--brand) 90%, black);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}

/* ===== FORM ELEMENTS ===== */

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 0.7rem 1rem;
  transition: all var(--transition);
  font-size: 0.925rem;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.textarea {
  min-height: 180px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ===== SECTIONS ===== */

.section {
  padding: 2.5rem 0;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  letter-spacing: -0.02em;
  color: var(--text);
  scroll-margin-top: 100px;
}

.section p.lead {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

/* ===== TAGS ===== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag:not(.token) {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.tag:not(.token):hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(26, 115, 232, 0.06);
}

.tag-category:not(.token) {
  background: rgba(26, 115, 232, 0.08);
  border-color: rgba(26, 115, 232, 0.2);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Prism markup tokens — keep inline */
.code-output .token,
pre[class*="language-"] .token {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: inherit !important;
  display: inline !important;
}

/* ===== GRID ===== */

.grid {
  display: grid;
  gap: 1.25rem;
}

.tools-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ===== CARDS ===== */

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.card:hover::before {
  opacity: 1;
}

.card .tag {
  margin-bottom: 0.75rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

.card:hover h3 {
  color: var(--brand);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.card-icon,
.tool-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(26, 115, 232, 0.10);
  color: var(--brand);
  margin-bottom: 0.85rem;
  transition: background var(--transition);
}

.tool-icon svg,
.card-icon svg {
  display: block;
}

.card:hover .tool-icon,
.card:hover .card-icon {
  background: rgba(26, 115, 232, 0.16);
}

/* Featured cards */
.card-featured {
  padding-top: 1.5rem;
}

.card-featured .tool-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
}

/* ===== AD/AFFILIATE ===== */

.ad-banner,
.affiliate-block {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  background: var(--surface-muted);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.ad-banner {
  margin: 1.5rem 0;
}

/* ===== TOOL SHELL ===== */

.tool-shell {
  display: grid;
  gap: 1.25rem;
}

.tool-shell label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.tool-shell label > .input,
.tool-shell label > .select,
.tool-shell label > .textarea {
  margin-top: 0.4rem;
}

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

@media (max-width: 600px) {
  .toolbar {
    width: 100%;
  }
  .toolbar .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }
  .toolbar .btn-primary {
    flex-basis: 100%;
  }
}

/* ===== OUTPUT AREAS ===== */

.output {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 1rem;
  white-space: normal;
  word-break: break-word;
  min-height: 140px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.output pre {
  margin: 0;
}

.plain-output {
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

.code-output {
  overflow: auto;
  border-radius: calc(var(--radius-sm) - 1px);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.code-output code {
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

/* ===== COLOR TOOLS ===== */

.swatch-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-bottom: 0.9rem;
}

.swatch-chip {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.10);
  transition: transform var(--transition), box-shadow var(--transition);
}

.swatch-chip:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18), var(--shadow-sm);
}

.visual-preview {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.8rem;
  margin-bottom: 0.9rem;
}

.gradient-preview {
  width: 100%;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0.45rem;
}

.shadow-preview-surface {
  min-height: 130px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.shadow-preview-card {
  width: min(220px, 80%);
  height: 80px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.dynamic-qr {
  margin-bottom: 0.9rem;
}

/* ===== STATUS ===== */

.muted {
  color: var(--text-muted);
}

.status {
  font-size: 0.9rem;
  font-weight: 500;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

/* ===== TWO COLUMN ===== */

.two-col {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== FAQ ===== */

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 0.75rem;
  transition: all var(--transition);
  overflow: hidden;
}

.faq details:hover {
  border-color: var(--border-hover);
}

.faq details[open] {
  background: var(--surface-muted);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
}

.faq summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: '−';
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  padding: 0 1.25rem 1rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background: var(--surface-muted);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

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

.link-list a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color var(--transition);
}

.link-list a:hover {
  color: var(--brand);
}

/* ===== ANIMATIONS ===== */

.fade-in {
  animation: fadeUp 0.55s ease-out both;
}

.fade-in-delay-1 { animation-delay: 0.08s; }
.fade-in-delay-2 { animation-delay: 0.16s; }
.fade-in-delay-3 { animation-delay: 0.24s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== COPY BUTTON ===== */

.copy-btn {
  opacity: 0;
  transition: opacity var(--transition);
}

.output:hover .copy-btn,
.copy-btn:focus {
  opacity: 1;
}

/* ===== UTILITIES ===== */

.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== STATS SECTION ===== */

.stats-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  text-align: center;
  margin: 1.5rem 0;
}

.stat-item {
  padding: 1.5rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  color: var(--brand);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

/* ===== MOBILE NAV ===== */

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 99;
  }

  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 700px) {
  .search-bar {
    flex-direction: column;
  }

  .section {
    padding: 1.5rem 0;
  }

  .card {
    padding: 1.1rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }

  .nav-row {
    min-height: 60px;
  }

  .nav-links {
    inset-block-start: 60px;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--surface-muted);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== FOCUS STATES ===== */

*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ===== SKELETON ===== */

.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ===== BADGE STYLES ===== */

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

.card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.badge-new {
  background: var(--success);
  color: white;
}

.badge-popular {
  background: var(--warning);
  color: white;
}

/* ===== TOOL PAGE STYLES ===== */

.tool-header {
  text-align: center;
  padding-bottom: 1.5rem;
}

.tool-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

/* Color preview for color tools */
.color-preview {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

/* QR Code container */
.qr-output {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.qr-output canvas,
.qr-output img {
  max-width: 200px;
}

/* HTML Preview */
.html-preview-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 1rem;
  overflow: hidden;
}

.html-preview-label {
  background: var(--surface-muted);
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.html-preview-output {
  padding: 1.5rem;
  min-height: 100px;
  line-height: 1.7;
}

.html-preview-output h1 { font-size: 1.8rem; margin: 0 0 0.75rem; font-weight: 700; }
.html-preview-output h2 { font-size: 1.4rem; margin: 0.75rem 0; font-weight: 600; }
.html-preview-output h3 { font-size: 1.2rem; margin: 0.5rem 0; font-weight: 600; }
.html-preview-output p { margin: 0.5rem 0; }
.html-preview-output strong { font-weight: 700; }
.html-preview-output em { font-style: italic; }
.html-preview-output code {
  background: var(--surface-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.html-preview-output a { color: var(--brand); text-decoration: underline; }
.html-preview-output li { margin-left: 1.5rem; margin-bottom: 0.25rem; }
.html-preview-output ul, .html-preview-output ol { margin: 0.5rem 0; padding-left: 1rem; }
.html-preview-output blockquote {
  border-left: 3px solid var(--brand);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--surface-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.html-preview-output pre {
  background: var(--surface-muted);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.html-preview-output table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
.html-preview-output th, .html-preview-output td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.html-preview-output th {
  background: var(--surface-muted);
  font-weight: 600;
}

.html-code-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.html-code-details summary {
  padding: 0.75rem 1rem;
  background: var(--surface-muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  user-select: none;
}

.html-code-details summary:hover {
  background: var(--surface);
}

.html-code-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.html-code-details .code-output {
  border: none;
  border-radius: 0;
  margin: 0;
}

/* Image preview */
.image-preview-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.image-preview-container .html-preview-label {
  background: var(--surface-muted);
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-image {
  display: block;
  margin: 1rem auto;
  padding: 1rem;
}

/* ===== HERO SECTION ===== */

.hero-enhanced {
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-text p {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 540px;
}

.search-bar {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  max-width: 560px;
}

.search-bar .input {
  flex: 1;
  box-shadow: var(--shadow-sm);
  padding-left: 1rem;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 0.75rem;
  background: var(--surface);
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 4px);
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .search-bar {
    max-width: 100%;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ===== FEATURE HIGHLIGHTS ===== */

.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}

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

.feature-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.feature-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(26, 115, 232, 0.10);
  color: var(--brand);
}

.feature-icon svg {
  display: block;
}

.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.55;
}

/* ===== CATEGORY CARDS ===== */

.category-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.category-card {
  position: relative;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.category-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: rgba(26, 115, 232, 0.10);
  color: var(--brand);
  transition: transform var(--transition);
}

.category-icon svg {
  display: block;
}

.category-card:hover .category-icon {
  transform: scale(1.06);
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.category-count {
  font-size: 0.82rem;
  color: var(--brand);
  font-weight: 600;
}

/* Category color variants */
.category-card[data-category="developer"] .category-icon { background: rgba(26, 115, 232, 0.10); color: #1a73e8; }
.category-card[data-category="ai"] .category-icon { background: rgba(236, 72, 153, 0.10); color: #ec4899; }
.category-card[data-category="design"] .category-icon { background: rgba(52, 168, 83, 0.10); color: #34a853; }
.category-card[data-category="security"] .category-icon { background: rgba(16, 185, 129, 0.10); color: #10b981; }
.category-card[data-category="generator"] .category-icon { background: rgba(6, 182, 212, 0.10); color: #0891b2; }
.category-card[data-category="daily"] .category-icon { background: rgba(249, 115, 22, 0.10); color: #ea580c; }
.category-card[data-category="text"] .category-icon { background: rgba(202, 138, 4, 0.10); color: #b45309; }
.category-card[data-category="finance"] .category-icon { background: rgba(34, 197, 94, 0.10); color: #16a34a; }

/* ===== TOOL FILTER TABS ===== */

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-tab {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(26, 115, 232, 0.06);
}

.filter-tab.active {
  background: var(--brand);
  border-color: transparent;
  color: white;
}

/* ===== ENHANCED FOOTER ===== */

.footer-enhanced {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-top {
  padding: 3.5rem 0 2.5rem;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.footer-grid-enhanced {
  display: grid;
  gap: 3rem;
  grid-template-columns: 2fr repeat(3, 1fr);
}

.footer-brand p {
  color: var(--text-muted);
  margin: 0.85rem 0 0;
  max-width: 300px;
  line-height: 1.65;
  font-size: 0.925rem;
}

.footer-column h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.footer-column a {
  color: var(--text);
  font-size: 0.925rem;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: var(--brand);
}

.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--brand);
}

.cookie-consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  width: min(440px, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 0.85rem;
}

.cookie-consent-copy strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.cookie-consent-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.legal-page {
  max-width: 920px;
  padding-top: 3rem;
}

.legal-page .tool-hero {
  margin-bottom: 2rem;
}

.legal-page .tool-hero-head {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.legal-page .tool-hero-title-block {
  width: 100%;
  max-width: 780px;
}

.legal-page .tool-hero-lead {
  max-width: 72ch;
}

.legal-content {
  display: grid;
  gap: 1rem;
}

.legal-content .card {
  padding: 1.35rem;
}

.legal-content h2 {
  margin-top: 0;
}

.legal-content ul {
  margin: 0;
  padding-left: 1.2rem;
}

.legal-content li + li {
  margin-top: 0.45rem;
}

@media (max-width: 900px) {
  .footer-grid-enhanced {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .footer-grid-enhanced {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== TOOL PAGE HEADER ===== */

.tool-page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.tool-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}

.tool-breadcrumb li {
  display: flex;
  align-items: center;
}

.tool-breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.tool-breadcrumb a:hover {
  color: var(--brand);
}

.tool-breadcrumb svg {
  width: 14px;
  height: 14px;
  opacity: 0.4;
  margin: 0 2px;
}

.tool-breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.tool-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.tool-page-header h1 {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tool-page-header .lead {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.tool-main-content {
  display: grid;
  gap: 2rem;
}

/* ===== TOOL FEATURE BADGES (on tool pages) ===== */

.tool-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.badge-free,
.badge-privacy,
.badge-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid;
}

.badge-free {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

.badge-privacy {
  background: rgba(26, 115, 232, 0.08);
  border-color: rgba(26, 115, 232, 0.25);
  color: var(--brand);
}

.badge-offline {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.25);
  color: #ea580c;
}

/* ===== TOOL CARD ===== */

.tool-card {
  padding: 1.5rem;
}

/* ===== HOW-TO STEPS ===== */

.how-to-steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.step:hover {
  border-color: rgba(26, 115, 232, 0.3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
}

/* ===== EXAMPLE CARDS ===== */

.example-card h3 {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.example-output {
  min-height: 80px;
  margin: 0;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

/* ===== FEATURES GRID (tool pages) ===== */

.features-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.features-grid .feature-icon {
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  margin: 0 auto 0.65rem;
}

/* ===== SHARE SECTION ===== */

.share-section {
  text-align: center;
  padding: 1.75rem;
  background: var(--surface-muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.share-text {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.925rem;
}

.share-buttons {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-share {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* ===== RELATED TAGS ===== */

.related-tags {
  gap: 0.5rem;
}

.related-tags .tag:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ===== FOOTER EXTRAS ===== */

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ===== ACCESSIBILITY ===== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  font-weight: 500;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 480px) {
  .container {
    width: 95%;
  }

  .hero-enhanced {
    padding: 2rem 0;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.875rem;
  }
}

/* =============================================================
   NEW TOOL PAGE — slot-driven, rich content layout (April 2026)
   ============================================================= */

.tool-page {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  padding-bottom: 3.5rem;
}

.tool-hero {
  padding: 2rem 0 0.5rem;
}

.tool-hero .tool-breadcrumb ol {
  margin-bottom: 1rem;
}

.tool-hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.tool-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.07);
  color: var(--brand);
  border: 1px solid rgba(26, 115, 232, 0.18);
}

.tool-hero-pill svg {
  flex-shrink: 0;
}

.tool-hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.tool-hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  max-width: 64ch;
}

.tool-app {
  padding: 1.5rem;
  margin: 0;
}

.tool-section {
  display: block;
}

.tool-section > h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--text);
}

.tool-intro p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  max-width: 72ch;
}

.tool-intro p:last-child {
  margin-bottom: 0;
}

.tool-intro p strong {
  color: var(--text);
}

/* Feature cards (responsive 3-column grid) */
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: rgba(26, 115, 232, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.feature-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  margin-bottom: 0.65rem;
}

.feature-card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* How it works steps */
.how-it-works {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  counter-reset: step;
}

.how-it-works li {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.how-it-works .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.how-it-works .step-body h3 {
  font-family: "Manrope", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--text);
}

.how-it-works .step-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Examples grid */
.examples-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.example-card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.55rem;
}

.example-card pre {
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.65rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.83rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.example-card pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.example-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Use cases */
.use-case-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.use-case-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.use-case-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #10b981;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item[open] {
  border-color: rgba(26, 115, 232, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--text);
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.15rem 1.05rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-answer p {
  margin: 0;
}

.faq-answer code {
  background: rgba(26, 115, 232, 0.08);
  border-radius: 4px;
  padding: 0.08rem 0.32rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  color: var(--brand);
}

/* Related pills */
.related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: all var(--transition);
  text-decoration: none;
}

.related-pill:hover {
  border-color: rgba(26, 115, 232, 0.4);
  background: rgba(26, 115, 232, 0.06);
  color: var(--brand);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .tool-app {
    padding: 1rem;
  }
  .tool-section > h2 {
    font-size: 1.25rem;
  }
  .feature-card,
  .how-it-works li,
  .example-card {
    padding: 0.95rem 1rem;
  }
}

/* =============================================================
   PREMIUM POLISH — April 2026 redesign pass
   Refines tool page hero, feature cards, examples, FAQs, CTA.
   Builds on the existing Google/Fluent-inspired base above.
   ============================================================= */

/* Tool page wrapper: relies on .container for horizontal sizing.
   This rule only controls vertical rhythm and bottom padding. */
.tool-page {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  padding-bottom: 3.5rem;
}

/* ----- Tool hero: icon + title + lead + pills, with subtle accent strip ----- */
.tool-hero {
  position: relative;
  padding: 2.25rem 0 0.5rem;
}

.tool-hero-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.1rem;
  align-items: center;
  margin: 0.25rem 0 0.85rem;
}

.tool-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.14), rgba(52, 168, 83, 0.10));
  color: var(--brand);
  border: 1px solid rgba(26, 115, 232, 0.18);
  box-shadow: 0 1px 2px rgba(26, 115, 232, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

:root[data-theme="dark"] .tool-hero-icon {
  background: linear-gradient(135deg, rgba(138, 180, 248, 0.18), rgba(129, 201, 149, 0.12));
  border-color: rgba(138, 180, 248, 0.30);
  box-shadow: none;
}

.tool-hero-icon svg { display: block; }

.tool-hero-title-block { min-width: 0; }

.tool-hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.85rem, 3.2vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.tool-hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  max-width: 64ch;
}

.tool-hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
  margin: 0 0 0.4rem;
}

.tool-workspace-brief {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-brief-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 1rem 1.1rem;
  min-width: 0;
}

.tool-brief-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
}

.tool-brief-card:nth-child(2)::before { background: var(--brand-2); }
.tool-brief-card:nth-child(3)::before { background: var(--brand-3); }

.tool-brief-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-brief-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.3;
}

.tool-brief-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .tool-workspace-brief {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tool-hero-head {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .tool-hero-icon { width: 52px; height: 52px; border-radius: 13px; }
}

/* Trust pills: subtle, content-aware coloring */
.tool-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.tool-hero-pill + .tool-hero-pill {
  background: rgba(26, 115, 232, 0.08);
  color: var(--brand);
  border-color: rgba(26, 115, 232, 0.22);
}

.tool-hero-pill + .tool-hero-pill + .tool-hero-pill {
  background: rgba(249, 115, 22, 0.08);
  color: #ea580c;
  border-color: rgba(249, 115, 22, 0.22);
}

:root[data-theme="dark"] .tool-hero-pill { background: rgba(16, 185, 129, 0.14); color: #34d399; border-color: rgba(52, 211, 153, 0.30); }
:root[data-theme="dark"] .tool-hero-pill + .tool-hero-pill { background: rgba(138, 180, 248, 0.14); color: #8ab4f8; border-color: rgba(138, 180, 248, 0.30); }
:root[data-theme="dark"] .tool-hero-pill + .tool-hero-pill + .tool-hero-pill { background: rgba(251, 146, 60, 0.14); color: #fdba74; border-color: rgba(251, 146, 60, 0.30); }

/* ----- Tool app surface: lift visually and keep clean ----- */
.tool-app {
  padding: 1.75rem;
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
}

.tool-app::before { display: none; }

@media (max-width: 640px) {
  .tool-app { padding: 1.1rem; border-radius: 12px; }
}

/* ----- Section headings: subtle eyebrow line for scan-ability ----- */
.tool-section { display: block; }

.tool-section > h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  color: var(--text);
  font-weight: 700;
}

.tool-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}

.tool-intro p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  max-width: 72ch;
}

.tool-intro p:last-child { margin-bottom: 0; }
.tool-intro p strong { color: var(--text); font-weight: 700; }

.tool-intro code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.06rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
}

/* ----- Feature cards: rotating accent colors so a 6-card grid isn't monochrome ----- */
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: rgba(26, 115, 232, 0.32);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.feature-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

/* Six rotating accent colors, applied in source order */
.feature-grid > .feature-card:nth-child(6n+1) .feature-card-icon { background: rgba(26, 115, 232, 0.12);  color: #1a73e8; }
.feature-grid > .feature-card:nth-child(6n+2) .feature-card-icon { background: rgba(16, 185, 129, 0.12);  color: #059669; }
.feature-grid > .feature-card:nth-child(6n+3) .feature-card-icon { background: rgba(249, 115, 22, 0.12);  color: #ea580c; }
.feature-grid > .feature-card:nth-child(6n+4) .feature-card-icon { background: rgba(52, 168, 83, 0.12);  color: #34a853; }
.feature-grid > .feature-card:nth-child(6n+5) .feature-card-icon { background: rgba(6, 182, 212, 0.12);   color: #0891b2; }
.feature-grid > .feature-card:nth-child(6n+6) .feature-card-icon { background: rgba(236, 72, 153, 0.12);  color: #db2777; }

:root[data-theme="dark"] .feature-grid > .feature-card:nth-child(6n+1) .feature-card-icon { color: #8ab4f8; }
:root[data-theme="dark"] .feature-grid > .feature-card:nth-child(6n+2) .feature-card-icon { color: #34d399; }
:root[data-theme="dark"] .feature-grid > .feature-card:nth-child(6n+3) .feature-card-icon { color: #fdba74; }
:root[data-theme="dark"] .feature-grid > .feature-card:nth-child(6n+4) .feature-card-icon { color: #81c995; }
:root[data-theme="dark"] .feature-grid > .feature-card:nth-child(6n+5) .feature-card-icon { color: #67e8f9; }
:root[data-theme="dark"] .feature-grid > .feature-card:nth-child(6n+6) .feature-card-icon { color: #f9a8d4; }

.feature-card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
  letter-spacing: -0.005em;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ----- How-it-works steps: numbered cards, spacious ----- */
.how-it-works {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.how-it-works li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color var(--transition);
}

.how-it-works li:hover {
  border-color: rgba(26, 115, 232, 0.32);
}

.how-it-works .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: "Space Grotesk", sans-serif;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.30);
}

.how-it-works .step-body { flex: 1; }

.how-it-works .step-body h3 {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.how-it-works .step-body p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ----- Examples: split label + code + caption with terminal-style frame ----- */
.examples-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color var(--transition);
}

.example-card:hover { border-color: rgba(26, 115, 232, 0.32); }

.example-card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin: 0;
}

.example-card pre {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  position: relative;
}

.example-card pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border: none;
}

.example-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ----- Use cases: cleaner check icon + 2 column on desktop ----- */
.use-case-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.use-case-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  transition: border-color var(--transition);
}

.use-case-list li:hover { border-color: rgba(16, 185, 129, 0.32); }

.use-case-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #059669;
  width: 18px;
  height: 18px;
  background: rgba(16, 185, 129, 0.10);
  border-radius: 50%;
  padding: 3px;
  box-sizing: content-box;
}

:root[data-theme="dark"] .use-case-list li svg { color: #34d399; background: rgba(52, 211, 153, 0.14); }

/* Programmatic SEO workflow cards for consolidated studios */
.textops-seo-hub,
.studio-seo-hub {
  display: grid;
  gap: 1rem;
}

.textops-seo-heading,
.studio-seo-heading {
  max-width: 74ch;
}

.textops-seo-heading h2,
.studio-seo-heading h2 {
  margin-bottom: 0.45rem;
}

.textops-seo-heading p,
.studio-seo-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.seo-intent-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.seo-intent-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.seo-intent-card:hover {
  border-color: rgba(26, 115, 232, 0.36);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.seo-intent-card:target {
  border-color: rgba(26, 115, 232, 0.55);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.seo-intent-eyebrow {
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: rgba(26, 115, 232, 0.08);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.seo-intent-card:nth-child(4n+2) .seo-intent-eyebrow {
  background: rgba(16, 185, 129, 0.10);
  color: #059669;
}

.seo-intent-card:nth-child(4n+3) .seo-intent-eyebrow {
  background: rgba(249, 115, 22, 0.10);
  color: #ea580c;
}

.seo-intent-card:nth-child(4n+4) .seo-intent-eyebrow {
  background: rgba(6, 182, 212, 0.10);
  color: #0891b2;
}

.seo-intent-card h3 {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
}

.seo-intent-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.seo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.seo-keywords span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
}

.seo-intent-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  margin-top: 0.1rem;
  padding: 0.38rem 0.7rem;
  border-radius: 8px;
  background: rgba(26, 115, 232, 0.08);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.seo-intent-link:hover {
  background: var(--brand);
  color: #fff;
}

.textops-howto,
.studio-howto {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

:root[data-theme="dark"] .seo-intent-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .seo-intent-card:nth-child(4n+2) .seo-intent-eyebrow {
  color: #34d399;
}

:root[data-theme="dark"] .seo-intent-card:nth-child(4n+3) .seo-intent-eyebrow {
  color: #fdba74;
}

:root[data-theme="dark"] .seo-intent-card:nth-child(4n+4) .seo-intent-eyebrow {
  color: #67e8f9;
}

/* ----- FAQ: roomier, animated chevron ----- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover { border-color: var(--border-hover); }

.faq-item[open] {
  border-color: rgba(26, 115, 232, 0.40);
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.06);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--text);
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}

.faq-item summary:hover { background: var(--surface-muted); }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a73e8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] summary::after { transform: rotate(180deg); }

.faq-answer {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-answer p { margin: 0; }
.faq-answer p + p { margin-top: 0.65rem; }

.faq-answer code {
  background: rgba(26, 115, 232, 0.08);
  border-radius: 4px;
  padding: 0.06rem 0.32rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  color: var(--brand);
}

/* ----- Final CTA: invite users to keep exploring ----- */
.tool-cta {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.06), rgba(52, 168, 83, 0.04));
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  text-align: center;
  margin: 0.5rem 0;
}

:root[data-theme="dark"] .tool-cta {
  background: linear-gradient(135deg, rgba(138, 180, 248, 0.10), rgba(129, 201, 149, 0.06));
  border-color: rgba(138, 180, 248, 0.30);
}

.tool-cta h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  letter-spacing: -0.015em;
  color: var(--text);
}

.tool-cta p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.97rem;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.tool-cta-actions {
  display: inline-flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ----- Related tools: pill grid with category dots ----- */
.related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: all var(--transition);
  text-decoration: none;
}

.related-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.65;
}

.related-pill:hover {
  border-color: rgba(26, 115, 232, 0.45);
  background: rgba(26, 115, 232, 0.06);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.10);
}

.related-pill:hover::before { opacity: 1; }

/* ----- Breadcrumb: tighter spacing, clearer separator ----- */
.tool-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
}

.tool-breadcrumb li { display: flex; align-items: center; }

.tool-breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.tool-breadcrumb a:hover { color: var(--brand); }

.tool-breadcrumb svg {
  width: 13px;
  height: 13px;
  opacity: 0.45;
  margin: 0 1px;
}

.tool-breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* ----- Mobile spacing tightening for the whole tool page ----- */
@media (max-width: 640px) {
  .tool-page { gap: 1.75rem; padding-bottom: 2.5rem; }
  .tool-section > h2 { font-size: 1.2rem; }
  .feature-card,
  .how-it-works li,
  .example-card { padding: 1rem 1.1rem; }
  .tool-intro { padding: 1.15rem 1.2rem; }
  .tool-cta { padding: 1.5rem 1.25rem; }
}

/* =============================================================
   UNIVERSAL TOOL WORKBENCH
   Shared product-grade shell for every generated tool page.
   ============================================================= */

.tool-workbench {
  display: grid;
  gap: 1rem;
}

.tool-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0.1rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.tool-command-title {
  min-width: 0;
}

.tool-command-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
  color: var(--tool-accent, var(--brand));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-command-title h2 {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.tool-command-intent {
  margin: 0.35rem 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.tool-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-command-actions .btn svg {
  flex: none;
}

.tool-preset-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--tool-accent, var(--brand)) 18%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--tool-accent, var(--brand)) 6%, transparent);
}

.tool-preset-row > span {
  margin-right: 0.1rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-preset-chip {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0.4rem 0.72rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.tool-preset-chip:hover {
  color: var(--tool-accent, var(--brand));
  border-color: color-mix(in srgb, var(--tool-accent, var(--brand)) 45%, var(--border));
  transform: translateY(-1px);
}

.tool-control-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  padding: 0.95rem;
}

.tool-panel-label {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tool-control-grid {
  display: grid;
  gap: 0.85rem;
}

.tool-control-grid .two-col {
  gap: 0.85rem;
}

.tool-control-grid > label,
.tool-control-grid .two-col > label {
  margin: 0;
}

.tool-control-grid .muted {
  margin: 0;
  font-size: 0.9rem;
}

.tool-io-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.tool-io-grid.is-output-only {
  grid-template-columns: 1fr;
}

.tool-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tool-pane-header {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
}

.tool-pane-title {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-pane-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex: none;
}

.tool-icon-action {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.tool-icon-action:hover {
  color: var(--tool-accent, var(--brand));
  background: color-mix(in srgb, var(--tool-accent, var(--brand)) 9%, transparent);
  border-color: color-mix(in srgb, var(--tool-accent, var(--brand)) 22%, transparent);
}

.tool-icon-action:active {
  transform: scale(0.96);
}

.tool-icon-action svg {
  display: block;
}

.tool-input-textarea {
  min-height: 360px;
  flex: 1;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  padding: 1rem;
}

.tool-input-textarea:focus {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tool-accent, var(--brand)) 30%, transparent);
}

.tool-output {
  min-height: 360px;
  flex: 1;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  padding: 1rem;
  overflow: auto;
  transition: opacity var(--transition);
}

.tool-output.is-busy {
  opacity: 0.72;
}

.tool-output .plain-output,
.tool-output pre {
  margin: 0;
}

.tool-empty-state,
.tool-error-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  color: var(--text-muted);
  text-align: center;
}

.tool-empty-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--tool-accent, var(--brand));
  background: color-mix(in srgb, var(--tool-accent, var(--brand)) 10%, transparent);
}

.tool-empty-state strong {
  color: var(--text);
  font-size: 0.95rem;
}

.tool-error-state {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  border-radius: 10px;
  padding: 1rem;
  min-height: 180px;
  font-weight: 600;
}

.tool-workbench-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.tool-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.tool-status.success {
  background: color-mix(in srgb, var(--success) 10%, transparent);
  border-color: color-mix(in srgb, var(--success) 26%, transparent);
}

.tool-status.error {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  border-color: color-mix(in srgb, var(--danger) 26%, transparent);
}

.tool-result-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.tool-metric {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.34rem 0.64rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 860px) {
  .tool-command-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-command-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tool-io-grid {
    grid-template-columns: 1fr;
  }

  .tool-input-textarea,
  .tool-output {
    min-height: 280px;
  }
}

@media (max-width: 560px) {
  .tool-command-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }

  .tool-command-actions .btn-primary {
    flex-basis: 100%;
  }

  .tool-control-panel,
  .tool-pane {
    border-radius: 12px;
  }

  .tool-workbench-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-result-stats {
    justify-content: flex-start;
  }
}

.ptool {
  display: grid;
  gap: 1rem;
}

/* Top action bar: title + global actions (sample/clear/etc.) */
.ptool-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ptool-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.ptool-bar-title svg { flex: none; opacity: 0.8; }

.ptool-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Mode chips / dialect chips */
.ptool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ptool-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}

.ptool-chip:hover {
  color: var(--text);
  border-color: rgba(26, 115, 232, 0.35);
  background: rgba(26, 115, 232, 0.04);
}

.ptool-chip.is-active {
  background: #1a73e8;
  color: white;
  border-color: #1a73e8;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3);
}

:root[data-theme="dark"] .ptool-chip.is-active {
  background: #818cf8;
  border-color: #818cf8;
  color: #0f172a;
}

/* Settings row — secondary controls (case, indent, etc.) */
.ptool-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ptool-settings .ptool-setting {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ptool-settings .ptool-setting > label {
  margin: 0;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ptool-settings select,
.ptool-settings input[type="number"],
.ptool-settings input[type="text"] {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--surface-muted);
  color: var(--text);
  min-width: 0;
  font-weight: 500;
}

.ptool-settings select {
  min-height: 34px;
  min-width: 144px;
  padding-right: 2.15rem;
  cursor: pointer;
  font-weight: 650;
  background-color: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
  background-image:
    linear-gradient(180deg, color-mix(in srgb, #fff 34%, transparent), transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a73e8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M7 10l5 5 5-5'/></svg>");
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right 0.68rem center;
  background-size: 100% 100%, 15px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition), transform 140ms ease;
}

.ptool-settings select:hover {
  border-color: rgba(26, 115, 232, 0.42);
  background-color: color-mix(in srgb, var(--surface) 84%, rgba(26, 115, 232, 0.10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 7px rgba(26, 115, 232, 0.10);
}

.ptool-settings select:focus,
.ptool-settings input:focus {
  border-color: rgba(26, 115, 232, 0.6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.ptool-settings select:focus {
  background-color: var(--surface);
}

.ptool-settings select option,
.ptool-form select option {
  background: var(--surface);
  color: var(--text);
}

:root[data-theme="dark"] .ptool-settings select {
  background-color: color-mix(in srgb, var(--surface-muted) 76%, #000 24%);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ab4f8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M7 10l5 5 5-5'/></svg>");
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .ptool-settings select:hover {
  background-color: color-mix(in srgb, var(--surface-muted) 82%, rgba(138, 180, 248, 0.12));
}

.ptool-settings .ptool-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  gap: 0.5rem;
  user-select: none;
}

.ptool-settings .ptool-toggle input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 30px;
  height: 17px;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.ptool-settings .ptool-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: white;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.ptool-settings .ptool-toggle input[type="checkbox"]:checked {
  background: #1a73e8;
}

.ptool-settings .ptool-toggle input[type="checkbox"]:checked::after {
  left: 15px;
}

/* Split panes — input | output */
.ptool-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 820px) {
  .ptool-panes { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  [data-ptool="regex-tester"] .ptool-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .regex-preset-chips {
    justify-content: flex-start;
  }
}

.ptool-pane {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  min-height: 320px;
}

.ptool [hidden] {
  display: none !important;
}

.ptool-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ptool-pane-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ptool-pane-title svg { opacity: 0.7; }

.ptool-pane-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ptool-icon-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.ptool-icon-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.ptool-icon-btn:active { transform: scale(0.95); }

.ptool-icon-btn svg { display: block; }

/* Editor area inside a pane */
.ptool-editor {
  flex: 1;
  display: flex;
  position: relative;
  background: var(--surface);
}

.ptool-editor textarea {
  flex: 1;
  width: 100%;
  border: 0;
  resize: none;
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background: transparent;
  color: var(--text);
  outline: none;
  tab-size: 2;
}

.ptool-editor textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.ptool-editor pre {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.ptool-editor pre code {
  background: transparent;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  white-space: pre;
}

/* Empty pane state */
.ptool-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 1rem;
  opacity: 0.7;
}

.ptool-empty svg {
  margin-bottom: 0.6rem;
  opacity: 0.5;
}

/* Stats strip below panes */
.ptool-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ptool-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.ptool-stat strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ptool-stat.is-success { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.25); color: #047857; }
.ptool-stat.is-success strong { color: #047857; }
.ptool-stat.is-error { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.25); color: #b91c1c; }
.ptool-stat.is-error strong { color: #b91c1c; }
.ptool-stat.is-warn { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.25); color: #b45309; }
.ptool-stat.is-warn strong { color: #b45309; }

:root[data-theme="dark"] .ptool-stat.is-success { color: #34d399; }
:root[data-theme="dark"] .ptool-stat.is-success strong { color: #34d399; }
:root[data-theme="dark"] .ptool-stat.is-error { color: #fca5a5; }
:root[data-theme="dark"] .ptool-stat.is-error strong { color: #fca5a5; }
:root[data-theme="dark"] .ptool-stat.is-warn { color: #fcd34d; }
:root[data-theme="dark"] .ptool-stat.is-warn strong { color: #fcd34d; }

/* Inline status (errors / parse messages) */
.ptool-status {
  display: none;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  align-items: center;
  gap: 0.5rem;
}

.ptool-status.is-visible { display: flex; }

.ptool-status.is-error {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
  color: #b91c1c;
}

.ptool-status.is-success {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
}

.ptool-status.is-info {
  background: rgba(26, 115, 232, 0.06);
  border-color: rgba(26, 115, 232, 0.25);
  color: #4338ca;
}

:root[data-theme="dark"] .ptool-status.is-error { color: #fca5a5; }
:root[data-theme="dark"] .ptool-status.is-success { color: #34d399; }
:root[data-theme="dark"] .ptool-status.is-info { color: #8ab4f8; }

/* Decoded card grid (for JWT, URL Parser) */
.ptool-decoded {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.ptool-decoded-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.ptool-decoded-card h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ptool-decoded-card h4::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #1a73e8);
}

.ptool-decoded-card[data-band="header"] { --accent: #ef4444; }
.ptool-decoded-card[data-band="payload"] { --accent: #34a853; }
.ptool-decoded-card[data-band="signature"] { --accent: #0891b2; }
.ptool-decoded-card[data-band="protocol"] { --accent: #ef4444; }
.ptool-decoded-card[data-band="host"] { --accent: #1a73e8; }
.ptool-decoded-card[data-band="path"] { --accent: #059669; }
.ptool-decoded-card[data-band="query"] { --accent: #ea580c; }
.ptool-decoded-card[data-band="hash"] { --accent: #db2777; }

.ptool-decoded-card pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Claim / property table inside decoded card */
.ptool-claims {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 0.85rem;
  font-size: 0.84rem;
  align-items: baseline;
}

.ptool-claims .ck {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.ptool-claims .cv {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  word-break: break-all;
  font-weight: 500;
}

.ptool-claims .cv.cv-meta {
  font-family: inherit;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

/* SQL keyword highlighting */
.sql-kw { color: #1a73e8; font-weight: 600; }
.sql-fn { color: #db2777; }
.sql-str { color: #059669; }
.sql-num { color: #ea580c; }
.sql-param { color: #7c3aed; font-weight: 600; }
.sql-op { color: var(--text-muted); }
.sql-comment { color: var(--text-muted); font-style: italic; opacity: 0.75; }

:root[data-theme="dark"] .sql-kw { color: #8ab4f8; }
:root[data-theme="dark"] .sql-fn { color: #f9a8d4; }
:root[data-theme="dark"] .sql-str { color: #6ee7b7; }
:root[data-theme="dark"] .sql-num { color: #fdba74; }
:root[data-theme="dark"] .sql-param { color: #c4b5fd; }

/* SQL Formatter Studio */
[data-ptool="sql-formatter"] .ptool-bar {
  align-items: center;
}

.sqlstudio-run {
  color: #174ea6;
  border-color: color-mix(in srgb, #1a73e8 34%, var(--border));
  background:
    radial-gradient(circle at 20% 0%, rgba(26, 115, 232, 0.16), transparent 34%),
    color-mix(in srgb, var(--surface) 86%, rgba(26, 115, 232, 0.08));
}

.sqlstudio-run:hover {
  color: #0b57d0;
  border-color: rgba(26, 115, 232, 0.52);
  background:
    radial-gradient(circle at 20% 0%, rgba(26, 115, 232, 0.22), transparent 36%),
    color-mix(in srgb, var(--surface) 80%, rgba(26, 115, 232, 0.12));
}

.sqlstudio-settings {
  align-items: stretch;
}

.sqlstudio-settings .ptool-setting,
.sqlstudio-settings .ptool-toggle {
  min-height: 34px;
}

.sqlstudio-settings .ptool-setting select {
  min-width: 150px;
}

.sqlstudio-panes {
  grid-template-columns: minmax(300px, 1fr) 14px minmax(300px, 1fr);
  gap: 0;
  align-items: stretch;
}

.sqlstudio-source-pane {
  grid-column: 1;
}

.sqlstudio-output-pane {
  grid-column: 3;
}

.sqlstudio-panes .ptool-pane {
  min-width: 0;
  min-height: clamp(430px, 54vh, 720px);
}

.sqlstudio-splitter {
  grid-column: 2;
  min-width: 14px;
  border-radius: 999px;
}

.sqlstudio-splitter::before {
  margin: 0.65rem 0;
  background: color-mix(in srgb, var(--brand) 30%, var(--border-hover));
}

.sqlstudio-splitter:hover::before,
.sqlstudio-splitter:focus-visible::before,
.sqlstudio-panes.is-resizing .sqlstudio-splitter::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.sqlstudio-panes.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.sqlstudio-output-pane .ptool-editor pre[data-language]::before {
  content: attr(data-language);
  position: sticky;
  top: 0;
  right: 0;
  float: right;
  margin: 0.55rem 0.65rem 0 0;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.1);
  color: #174ea6;
  font-size: 0.66rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  z-index: 2;
}

:root[data-theme="dark"] .sqlstudio-run {
  color: #dbeafe;
  border-color: rgba(138, 180, 248, 0.32);
  background:
    radial-gradient(circle at 20% 0%, rgba(138, 180, 248, 0.16), transparent 34%),
    color-mix(in srgb, var(--surface-muted) 78%, rgba(138, 180, 248, 0.10));
}

:root[data-theme="dark"] .sqlstudio-output-pane .ptool-editor pre[data-language]::before {
  background: rgba(138, 180, 248, 0.13);
  color: #dbeafe;
}

@media (max-width: 820px) {
  .sqlstudio-panes {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }

  .sqlstudio-source-pane,
  .sqlstudio-output-pane {
    grid-column: 1;
  }

  .sqlstudio-splitter {
    display: none;
  }
}

@media (max-width: 640px) {
  [data-ptool="sql-formatter"] .ptool-bar {
    align-items: stretch;
    flex-direction: column;
  }

  [data-ptool="sql-formatter"] .ptool-tabs,
  [data-ptool="sql-formatter"] .ptool-bar-actions {
    width: 100%;
  }

  [data-ptool="sql-formatter"] .ptool-tabs .ptool-tab,
  [data-ptool="sql-formatter"] .ptool-bar-actions .ptool-chip,
  [data-ptool="sql-formatter"] [data-sample] {
    flex: 1 1 auto;
    justify-content: center;
  }

  .sqlstudio-settings .ptool-setting,
  .sqlstudio-settings .ptool-toggle {
    width: 100%;
  }

  .sqlstudio-settings .ptool-setting select {
    flex: 1;
    min-width: 0;
    max-width: 100%;
  }
}

/* Regex tester highlight overlay */
[data-ptool="regex-tester"] .ptool-bar {
  align-items: flex-start;
}

.regex-preset-chips {
  justify-content: flex-end;
  max-width: min(1120px, 100%);
}

.regex-preset-chips .ptool-chip {
  min-height: 30px;
  padding: 0.36rem 0.62rem;
}

.ptool-regex-text-pane {
  min-height: clamp(420px, 48vh, 620px);
}

.ptool-regex-input {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 360px;
}

.ptool-regex-input .ptool-regex-highlight,
.ptool-regex-input textarea {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: auto;
  border: 0;
  background: transparent;
  tab-size: 2;
  box-sizing: border-box;
}

.ptool-regex-input .ptool-regex-highlight {
  pointer-events: none;
  color: transparent;
  z-index: 3;
  right: var(--regex-scrollbar-gutter, 0px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ptool-regex-input .ptool-regex-highlight::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.ptool-regex-input textarea {
  resize: vertical;
  outline: none;
  color: var(--text);
  z-index: 2;
  caret-color: var(--text);
  background: transparent !important;
}

.ptool-regex-input mark {
  background: rgba(26, 115, 232, 0.34);
  color: transparent;
  border-radius: 3px;
  padding: 1px 0;
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.5) inset;
}

.ptool-regex-input mark.g1 { background: rgba(16, 185, 129, 0.34); box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.55) inset; }
.ptool-regex-input mark.g2 { background: rgba(249, 115, 22, 0.34); box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.55) inset; }
.ptool-regex-input mark.g3 { background: rgba(236, 72, 153, 0.34); box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.55) inset; }

/* AI answer and LLM-readable SEO blocks */
.ai-summary {
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--brand) 4%), var(--surface));
  border-radius: 8px;
  padding: clamp(1rem, 2vw, 1.35rem);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ai-summary h2,
.llm-section h2 {
  margin-top: 0;
}

.ai-summary p:last-child,
.llm-section p:last-child {
  margin-bottom: 0;
}

.llm-decision-grid,
.llm-fact-grid,
.llm-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.llm-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 1rem;
}

.llm-card h3 {
  margin-top: 0;
}

.tool-maintenance-note {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Match table */
.ptool-match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ptool-match-table th,
.ptool-match-table td {
  padding: 0.5rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ptool-match-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  background: var(--surface-muted);
}

.ptool-match-table td.tc-mono {
  font-family: var(--font-mono);
  color: var(--text);
}

.ptool-match-table tr:hover td { background: var(--surface-muted); }

/* UUID list */
.ptool-uuid-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}

.ptool-uuid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  transition: background var(--transition);
}

.ptool-uuid-row:last-child { border-bottom: 0; }
.ptool-uuid-row:hover { background: var(--surface-muted); }

.ptool-uuid-row .ptool-uuid-num {
  color: var(--text-muted);
  font-size: 0.78rem;
  width: 32px;
  flex: none;
  text-align: right;
}

.ptool-uuid-row .ptool-uuid-val {
  flex: 1;
  word-break: break-all;
}

/* UTM form */
.ptool-form {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 700px) {
  .ptool-form { grid-template-columns: 1fr; }
}

.ptool-form .ptool-field-full { grid-column: 1 / -1; }

.ptool-form label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.005em;
}

.ptool-form label .req { color: #ef4444; }

.ptool-form input,
.ptool-form select,
.ptool-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
}

.ptool-form select {
  appearance: none;
  min-height: 42px;
  padding-right: 2.35rem;
  cursor: pointer;
  font-weight: 650;
  background-color: color-mix(in srgb, var(--surface) 90%, var(--surface-muted));
  background-image:
    linear-gradient(180deg, color-mix(in srgb, #fff 28%, transparent), transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a73e8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M7 10l5 5 5-5'/></svg>");
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right 0.78rem center;
  background-size: 100% 100%, 16px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ptool-form select:hover {
  border-color: rgba(26, 115, 232, 0.42);
  background-color: color-mix(in srgb, var(--surface) 88%, rgba(26, 115, 232, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 2px 7px rgba(26, 115, 232, 0.10);
}

.ptool-form input:focus,
.ptool-form select:focus,
.ptool-form textarea:focus {
  outline: none;
  border-color: rgba(26, 115, 232, 0.6);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.13);
}

.ptool-form select:focus {
  background-color: var(--surface);
}

:root[data-theme="dark"] .ptool-form select {
  background-color: color-mix(in srgb, var(--surface-muted) 70%, #000 30%);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ab4f8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M7 10l5 5 5-5'/></svg>");
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .ptool-form select:hover {
  background-color: color-mix(in srgb, var(--surface-muted) 78%, rgba(138, 180, 248, 0.12));
}

.ptool-form .ptool-help {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Large preview output (URL parser, UTM builder URL display) */
.ptool-preview {
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.55;
  word-break: break-all;
  color: var(--text);
  position: relative;
}

.ptool-preview .ptool-preview-label {
  display: block;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.utm-key { color: #1a73e8; font-weight: 600; }
.utm-eq { color: var(--text-muted); }
.utm-val { color: #059669; }
.utm-amp { color: var(--text-muted); }

:root[data-theme="dark"] .utm-key { color: #8ab4f8; }
:root[data-theme="dark"] .utm-val { color: #6ee7b7; }

/* Mode tabs (top of tool app, e.g. SQL: Format / Minify) */
.ptool-tabs {
  display: inline-flex;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.ptool-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 160ms;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ptool-tab:hover { color: var(--text); }

.ptool-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

:root[data-theme="dark"] .ptool-tab.is-active {
  background: rgba(255,255,255,0.06);
}

/* Copy feedback toast (shown briefly after copy) */
.ptool-icon-btn[data-copied="true"] {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

:root[data-theme="dark"] .ptool-icon-btn[data-copied="true"] {
  color: #34d399;
}

.ptool-section-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0.5rem 0 0.4rem;
  color: var(--text);
}

/* Text Operations Studio */
.textops {
  --textops-blue: #1a73e8;
  --textops-green: #188038;
  --textops-yellow: #f9ab00;
  --textops-red: #d93025;
}

.textops .ptool-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.textops .ptool-tab {
  justify-content: center;
  flex: 1 1 auto;
}

.textops-controls {
  align-items: stretch;
}

.textops-controls[hidden] {
  display: none !important;
}

.textops .ptool-setting {
  min-height: 34px;
}

.textops .ptool-setting.textops-wide input {
  min-width: min(220px, 46vw);
}

.textops [data-font-style] {
  min-width: 260px;
}

.textops-panes {
  grid-template-columns: minmax(260px, 1fr) 12px minmax(260px, 1fr);
  gap: 0;
  align-items: stretch;
}

.textops-panes .ptool-pane {
  min-width: 0;
  min-height: 430px;
}

.textops-source-pane {
  grid-column: 1;
}

.textops-output-pane {
  grid-column: 3;
}

.textops-splitter {
  grid-column: 2;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: col-resize;
  min-width: 12px;
  min-height: 100%;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  touch-action: none;
  position: relative;
}

.textops-splitter::before {
  content: "";
  width: 4px;
  margin: 0.65rem 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-hover) 58%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 65%, transparent);
  transition: background var(--transition), box-shadow var(--transition), width var(--transition);
}

.textops-splitter:hover::before,
.textops-splitter:focus-visible::before,
.textops-panes.is-resizing .textops-splitter::before {
  width: 6px;
  background: #1a73e8;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.textops-splitter:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.55);
  outline-offset: 2px;
  border-radius: 999px;
}

.textops-panes.is-source-full,
.textops-panes.is-output-full {
  grid-template-columns: 1fr;
}

.textops-panes.is-source-full .textops-output-pane,
.textops-panes.is-output-full .textops-source-pane,
.textops-panes.is-source-full .textops-splitter,
.textops-panes.is-output-full .textops-splitter {
  display: none;
}

.textops-panes.is-source-full .textops-source-pane,
.textops-panes.is-output-full .textops-output-pane {
  grid-column: 1;
}

.textops-panes .ptool-editor pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.textops-output-pane {
  border-color: color-mix(in srgb, var(--border-hover) 58%, var(--border));
  background: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
}

.textops-output-pane .ptool-pane-header {
  background: color-mix(in srgb, var(--surface-muted) 88%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--border-hover) 55%, var(--border));
}

.textops-output-pane .ptool-editor {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface-muted) 92%, var(--surface)),
      color-mix(in srgb, var(--surface-muted) 82%, var(--surface))
    );
}

.textops-output-pane .ptool-editor pre {
  background: transparent;
  color: var(--text);
  cursor: default;
  user-select: text;
}

.textops-output-pane .ptool-editor pre.is-social-font-output {
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0;
}

.textops-output-pane.is-rendering-preview .ptool-editor {
  padding: 0;
}

.textops-output-pane.is-rendering-code .ptool-editor {
  padding: 0;
}

.textops-markdown-preview {
  width: 100%;
  min-height: 100%;
  padding: 1rem;
  overflow: auto;
}

.textops-code-output {
  width: 100%;
  min-height: 100%;
  padding: 1rem;
  overflow: auto;
}

.textops-code-output-inner {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.textops-code-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.textops-code-output .code-output {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--surface-muted) 86%, var(--surface));
}

.textops-preview-container {
  margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--surface) 92%, #fff 8%);
}

.textops-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.textops-preview-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.textops-preview-action {
  min-height: 30px;
  padding: 0.34rem 0.58rem;
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  background: var(--surface);
}

.textops-preview-action svg {
  width: 14px;
  height: 14px;
}

.textops-rendered-markdown {
  color: var(--text);
}

.textops-rendered-markdown > :first-child {
  margin-top: 0;
}

.textops-rendered-markdown > :last-child {
  margin-bottom: 0;
}

.textops-rendered-markdown img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.textops-rendered-markdown hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.textops-rendered-markdown pre code {
  background: transparent;
  padding: 0;
}

.textops-preview-code {
  background: var(--surface);
}

:root[data-theme="dark"] .textops-output-pane {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

:root[data-theme="dark"] .textops-output-pane .ptool-pane-header {
  background: color-mix(in srgb, var(--surface-muted) 74%, #000 26%);
}

:root[data-theme="dark"] .textops-output-pane .ptool-editor {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface-muted) 72%, #000 28%),
      color-mix(in srgb, var(--surface-muted) 64%, #000 36%)
    );
}

:root[data-theme="dark"] .textops-preview-container,
:root[data-theme="dark"] .textops-preview-code {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

.textops-kpis {
  padding-top: 0.1rem;
}

.textops-detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.25fr) minmax(280px, 1.1fr);
  gap: 0.85rem;
  align-items: start;
}

@media (max-width: 980px) {
  .textops-detail-grid {
    grid-template-columns: 1fr;
  }
}

.textops-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: auto;
  min-height: 100%;
}

.textops-card h3 {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.textops-signal-list {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
}

.textops-signal-list span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  padding-bottom: 0.45rem;
}

.textops-signal-list span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.textops-signal-list strong {
  color: var(--text);
  font-weight: 750;
  text-align: right;
  word-break: break-word;
}

.textops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.textops-table th,
.textops-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.textops-table th {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-muted) 70%, var(--surface));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.textops-table tr:last-child td {
  border-bottom: 0;
}

.textops-table .tc-mono {
  font-family: var(--font-mono);
  color: var(--text);
}

.textops-font-preview-cell {
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.textops-bar {
  display: block;
  width: 100%;
  min-width: 84px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.textops-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a73e8, #34a853);
}

.textops-empty {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.textops-diff {
  max-height: 360px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
}

.textops-diff-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.45rem;
  padding: 0.32rem 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.textops-diff-row span {
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.textops-diff-row code {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.textops-diff-row.is-added {
  background: rgba(16, 185, 129, 0.07);
}

.textops-diff-row.is-added span {
  color: #047857;
}

.textops-diff-row.is-removed {
  background: rgba(239, 68, 68, 0.07);
}

.textops-diff-row.is-removed span {
  color: #b91c1c;
}

:root[data-theme="dark"] .textops-diff-row.is-added span {
  color: #34d399;
}

:root[data-theme="dark"] .textops-diff-row.is-removed span {
  color: #fca5a5;
}

@media (max-width: 640px) {
  .textops .ptool-tab {
    flex-basis: calc(50% - 2px);
  }

  .textops .ptool-setting.textops-wide,
  .textops .ptool-setting.textops-wide input {
    width: 100%;
  }

  .textops-panes .ptool-pane {
    min-height: 340px;
  }
}

@media (max-width: 820px) {
  .textops-panes {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }

  .textops-source-pane,
  .textops-output-pane {
    grid-column: 1;
  }

  .textops-panes.is-source-full .textops-output-pane,
  .textops-panes.is-output-full .textops-source-pane {
    display: flex;
  }

  .textops-splitter {
    display: none;
  }

  .textops-source-pane [data-action="expand-source"],
  .textops-output-pane [data-action="expand-output"] {
    display: none;
  }
}

.text-studio-page.container {
  width: min(1760px, calc(100% - 32px));
}

.text-studio-page .tool-hero,
.text-studio-page > .tool-section,
.text-studio-page > .tool-workspace-brief {
  width: 100%;
  margin-inline: auto;
}

.text-studio-page .tool-hero-lead {
  max-width: 96ch;
}

.text-studio-page .tool-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.text-studio-page .tool-intro p {
  max-width: none;
}

.text-studio-page .feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.text-studio-page .textops-seo-heading {
  max-width: 100%;
}

.text-studio-page .textops-seo-heading p {
  max-width: 112ch;
}

.text-studio-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.text-studio-page .textops-howto {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.text-studio-page .use-case-list,
.text-studio-page .examples-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.text-studio-page .related-tags {
  max-width: none;
}

.text-studio-page .text-studio-app-card {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.06);
}

/* Data Converter Studio */
.datastudio {
  --datastudio-blue: #1a73e8;
  --datastudio-green: #188038;
  --datastudio-yellow: #f9ab00;
  --datastudio-red: #d93025;
  position: relative;
}

.datastudio.is-loading {
  cursor: progress;
}

.datastudio.has-loading-overlay .datastudio-assist,
.datastudio.has-loading-overlay .ptool-tabs,
.datastudio.has-loading-overlay .datastudio-controls,
.datastudio.has-loading-overlay .datastudio-panes,
.datastudio.has-loading-overlay .datastudio-kpis,
.datastudio.has-loading-overlay [data-insights] {
  filter: saturate(0.9);
}

.datastudio [data-action].is-loading,
.datastudio [data-quick].is-loading,
.datastudio [data-mode].is-loading,
.datastudio [data-json-tree-action].is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.datastudio [data-action].is-loading > *,
.datastudio [data-quick].is-loading > *,
.datastudio [data-mode].is-loading > *,
.datastudio [data-json-tree-action].is-loading > * {
  visibility: hidden;
}

.datastudio [data-action].is-loading::after,
.datastudio [data-quick].is-loading::after,
.datastudio [data-mode].is-loading::after,
.datastudio [data-json-tree-action].is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  left: calc(50% - 8px);
  top: calc(50% - 8px);
  border-radius: 50%;
  background: conic-gradient(from 90deg, #2f5bea, #039b9a, #15a36d, transparent 78%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: mockmint-spin 0.68s linear infinite;
}

.data-studio-page.container {
  width: min(1760px, calc(100% - 32px));
}

.data-studio-page .tool-hero,
.data-studio-page > .tool-section,
.data-studio-page > .tool-workspace-brief {
  width: 100%;
  margin-inline: auto;
}

.data-studio-page .tool-hero-lead {
  max-width: 96ch;
}

.data-studio-page .tool-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.data-studio-page .tool-intro p {
  max-width: none;
}

.data-studio-page .feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.data-studio-page .studio-seo-heading {
  max-width: 100%;
}

.data-studio-page .studio-seo-heading p {
  max-width: 112ch;
}

.data-studio-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.data-studio-page .studio-howto {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.data-studio-page .use-case-list,
.data-studio-page .examples-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.data-studio-page .related-tags {
  max-width: none;
}

.data-studio-page .data-studio-app-card {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.06);
}

/* Synthetic Data Studio */
.mockmint-page.container {
  width: 95%;
  max-width: none;
}

.mockmint-page .tool-hero,
.mockmint-page > .tool-section,
.mockmint-page > .tool-workspace-brief {
  width: 100%;
  margin-inline: auto;
}

.mockmint-page .tool-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.mockmint-page .tool-intro p {
  max-width: none;
}

.mockmint-page .feature-grid,
.mockmint-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mockmint-page .studio-seo-heading {
  max-width: 100%;
}

.mockmint-page .studio-seo-heading p {
  max-width: 112ch;
}

.mockmint-page .studio-howto {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.mockmint-page .use-case-list,
.mockmint-page .examples-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.mockmint-page .related-tags {
  max-width: none;
}

.mockmint-page .mockmint-app-card {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #e8f0fe), var(--surface) 52%),
    var(--surface);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 12px 28px rgba(60, 64, 67, 0.10);
}

.mockmint-boot {
  min-height: clamp(520px, 70vh, 860px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.72rem;
  border: 1px solid rgba(47, 91, 234, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 32% 24%, rgba(47, 91, 234, 0.16), transparent 30%),
    radial-gradient(circle at 68% 38%, rgba(3, 155, 154, 0.14), transparent 34%),
    linear-gradient(180deg, #ffffff, #f7fbff);
  color: #102033;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 22px 65px rgba(16, 32, 51, 0.10);
}

.mockmint-boot strong {
  color: #102033;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.36rem);
  letter-spacing: 0;
}

.mockmint-boot span:last-child {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
}

.mockmint-boot-spinner,
.mockmint-loading-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    conic-gradient(from 90deg, #2f5bea, #039b9a, #15a36d, transparent 78%),
    radial-gradient(circle, #ffffff 55%, transparent 57%);
  animation: mockmint-spin 0.85s linear infinite;
  box-shadow: 0 14px 30px rgba(47, 91, 234, 0.20);
}

.mockmint {
  --mockmint-blue: #1a73e8;
  --mockmint-green: #188038;
  --mockmint-yellow: #f9ab00;
  --mockmint-red: #d93025;
  position: relative;
}

.mockmint.is-loading {
  cursor: progress;
}

.mockmint .ptool-bar {
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(26, 115, 232, 0.08), transparent 34%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-muted) 70%, var(--surface)));
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.mockmint-loading {
  position: fixed;
  top: 76px;
  right: max(18px, env(safe-area-inset-right));
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: min(300px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(47, 91, 234, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.10), rgba(3, 155, 154, 0.10)),
    rgba(255, 255, 255, 0.96);
  color: #102033;
  padding: 0.62rem 0.88rem 0.78rem;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 18px 46px rgba(16, 32, 51, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  animation: mockmint-loader-in 0.18s ease-out both;
}

.mockmint:not(.datastudio) > .mockmint-loading::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, rgba(47, 91, 234, 0.72), rgba(3, 155, 154, 0.62), rgba(21, 163, 109, 0.58));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.mockmint:not(.datastudio) > .mockmint-loading {
  position: sticky;
  top: 74px;
  right: auto;
  left: auto;
  z-index: 18;
  width: fit-content;
  min-height: 44px;
  min-width: 0;
  max-width: min(420px, 100%);
  margin: 0.62rem 0;
  border-radius: 999px;
  border-color: rgba(47, 91, 234, 0.24);
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.12), rgba(3, 155, 154, 0.10)),
    rgba(255, 255, 255, 0.98);
  padding: 0.48rem 0.78rem 0.62rem;
  font-size: 0.78rem;
  box-shadow: 0 14px 34px rgba(16, 32, 51, 0.14);
}

.mockmint:not(.datastudio) > .mockmint-loading .mockmint-spinner {
  width: 20px;
  height: 20px;
  background:
    conic-gradient(from 90deg, #2f5bea, #039b9a, #15a36d, transparent 78%),
    radial-gradient(circle, #ffffff 55%, transparent 57%);
  box-shadow: 0 0 0 4px rgba(47, 91, 234, 0.08), 0 8px 18px rgba(47, 91, 234, 0.18);
}

.mockmint-loading[hidden] {
  display: none;
}

.mockmint-loading-track {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 91, 234, 0.12);
}

.mockmint-loading-track::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 48%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #2f5bea, #039b9a, transparent);
  animation: mockmint-loading-track 0.9s ease-in-out infinite;
}

.mockmint-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.68);
  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
}

.mockmint-loading-overlay[hidden] {
  display: none !important;
}

.mockmint-loading-card {
  display: grid;
  place-items: center;
  gap: 0.52rem;
  min-width: min(320px, calc(100% - 48px));
  border: 1px solid rgba(47, 91, 234, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.08), rgba(3, 155, 154, 0.08)),
    rgba(255, 255, 255, 0.96);
  color: #102033;
  padding: 1.25rem 1.4rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(16, 32, 51, 0.18);
}

.mockmint-loading-card strong {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.96rem;
  letter-spacing: 0;
}

.mockmint-loading-card span:last-child {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
}

.mockmint-spinner,
.mockmint [data-action].is-loading::after {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(from 90deg, #2f5bea, #039b9a, #15a36d, transparent 78%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: mockmint-spin 0.68s linear infinite;
}

.mockmint [data-action].is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.mockmint [data-action].is-loading > * {
  visibility: hidden;
}

.mockmint [data-action].is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  left: calc(50% - 8px);
  top: calc(50% - 8px);
}

.mockmint.is-loading [data-action]:not(.is-loading) {
  cursor: progress;
}

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

@keyframes mockmint-loader-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mockmint-loading-track {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(220%);
  }
}

@keyframes mockmint-preview-skeleton {
  0% {
    background-position: 0 0, -80% 0, 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 120% 0, 0 0, 0 0;
  }
}

@keyframes mockmint-boot-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes mockmint-boot-card {
  0% {
    background-position: -80% 0, 0 0;
  }
  100% {
    background-position: 120% 0, 0 0;
  }
}

@keyframes mockmint-preview-spin {
  from {
    transform: translate(-50%, calc(-50% - 1.42rem)) rotate(0deg);
  }
  to {
    transform: translate(-50%, calc(-50% - 1.42rem)) rotate(360deg);
  }
}

@keyframes mockmint-loader-pulse {
  from {
    box-shadow: 0 18px 44px rgba(16, 32, 51, 0.16), 0 0 0 0 rgba(47, 91, 234, 0.14);
  }
  to {
    box-shadow: 0 22px 52px rgba(16, 32, 51, 0.20), 0 0 0 7px rgba(47, 91, 234, 0.04);
  }
}

@keyframes mockmint-panel-sweep {
  0% {
    transform: translateX(-115%);
  }
  100% {
    transform: translateX(115%);
  }
}

.mockmint-safety {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(249, 171, 0, 0.34);
  border-radius: 12px;
  background: color-mix(in srgb, #fef7e0 70%, var(--surface));
  color: #7a4d00;
  font-size: 0.88rem;
  line-height: 1.45;
}

.mockmint-safety strong {
  flex: 0 0 auto;
  color: #5f3b00;
}

.mockmint-controls {
  align-items: stretch;
}

.mockmint-controls input[type="number"],
.mockmint-controls input[type="text"] {
  min-height: 34px;
}

.mockmint-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 0.62fr) minmax(var(--mockmint-builder-size, 440px), var(--mockmint-builder-size, 1.18fr)) 12px minmax(420px, 1.35fr);
  gap: 0.85rem;
  align-items: stretch;
}

.mockmint-layout.is-template-collapsed {
  grid-template-columns: 70px minmax(var(--mockmint-builder-size, 420px), var(--mockmint-builder-size, 1.18fr)) 12px minmax(420px, 1.38fr);
}

.mockmint-layout.is-builder-collapsed {
  grid-template-columns: minmax(230px, 0.62fr) 70px 0 minmax(420px, 1.52fr);
}

.mockmint-layout.is-template-collapsed.is-builder-collapsed {
  grid-template-columns: 70px 70px 0 minmax(420px, 1fr);
}

.mockmint-layout.is-preview-full {
  grid-template-columns: minmax(0, 1fr);
}

.mockmint-layout.is-builder-collapsed .mockmint-splitter,
.mockmint-layout.is-preview-full .mockmint-template-panel,
.mockmint-layout.is-preview-full .mockmint-builder-panel,
.mockmint-layout.is-preview-full .mockmint-splitter {
  display: none;
}

.mockmint-layout.is-builder-collapsed .mockmint-preview-panel {
  grid-column: 4 / -1;
}

.mockmint-layout.is-preview-full .mockmint-preview-panel {
  grid-column: 1 / -1;
}

.mockmint-layout.is-resizing-builder {
  cursor: col-resize;
  user-select: none;
}

.mockmint-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.85rem;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.06);
}

.mockmint-splitter {
  position: relative;
  align-self: stretch;
  min-height: 220px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}

.mockmint-splitter::before {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent, rgba(26, 115, 232, 0.18), transparent),
    color-mix(in srgb, var(--border) 82%, transparent);
  transition: background var(--transition), box-shadow var(--transition), inset var(--transition);
}

.mockmint-splitter::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 42px;
  border-radius: 999px;
  background: #1a73e8;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity var(--transition);
}

.mockmint-splitter:hover::before,
.mockmint-splitter:focus-visible::before,
.mockmint-layout.is-resizing-builder .mockmint-splitter::before {
  inset: 0 2px;
  background: color-mix(in srgb, #1a73e8 34%, var(--border));
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.10);
}

.mockmint-splitter:hover::after,
.mockmint-splitter:focus-visible::after,
.mockmint-layout.is-resizing-builder .mockmint-splitter::after {
  opacity: 1;
}

.mockmint-panel-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
}

.mockmint-panel-head > span:first-child,
.mockmint-preview-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mockmint-template-panel {
  overflow: hidden;
  transition: padding var(--transition), min-width var(--transition), background var(--transition);
}

.mockmint-template-head,
.mockmint-builder-head {
  align-items: center;
}

.mockmint-template-title {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}

.mockmint-builder-title {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}

.mockmint-panel-head-actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.48rem;
}

.mockmint-template-head .mockmint-panel-head-actions {
  flex: 1 1 auto;
}

.mockmint-template-head [data-mm-template-search] {
  width: min(190px, 100%);
  min-width: 0;
}

.mockmint-collapse-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-muted) 68%, var(--surface));
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.mockmint-collapse-toggle:hover {
  border-color: rgba(26, 115, 232, 0.42);
  background: color-mix(in srgb, #e8f0fe 52%, var(--surface));
  color: #1a73e8;
}

.mockmint-collapse-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.mockmint-collapse-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mockmint-template-body {
  display: grid;
  gap: 0.75rem;
}

.mockmint-template-panel.is-collapsed {
  align-content: start;
  justify-items: center;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 0.64rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, #e8f0fe 34%, var(--surface)), var(--surface));
}

.mockmint-builder-panel.is-collapsed {
  padding: 0.64rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, #e8f0fe 34%, var(--surface)), var(--surface));
}

.mockmint-template-panel.is-collapsed .mockmint-template-head {
  min-height: auto;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  gap: 0;
  width: 100%;
  border-bottom: 0;
  padding-bottom: 0;
}

.mockmint-builder-panel.is-collapsed .mockmint-builder-head {
  width: 100%;
  min-height: auto;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  gap: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.mockmint-template-panel.is-collapsed .mockmint-panel-head-actions,
.mockmint-builder-panel.is-collapsed .mockmint-panel-head-actions {
  width: 100%;
  margin-left: 0;
  justify-content: flex-end;
}

.mockmint-template-panel.is-collapsed .mockmint-collapse-toggle svg {
  transform: rotate(180deg);
}

.mockmint-builder-panel.is-collapsed .mockmint-collapse-toggle svg {
  transform: rotate(180deg);
}

.mockmint-template-panel.is-collapsed .mockmint-template-title,
.mockmint-template-panel.is-collapsed [data-mm-template-search] {
  display: none;
}

.mockmint-builder-panel.is-collapsed .mockmint-builder-title,
.mockmint-builder-panel.is-collapsed [data-mm-column-count],
.mockmint-builder-panel.is-collapsed .mockmint-add-column,
.mockmint-builder-panel.is-collapsed .mockmint-builder-assist,
.mockmint-builder-panel.is-collapsed .mockmint-column-list {
  display: none;
}

.mockmint-template-panel.is-collapsed::after {
  content: "Templates";
  align-self: start;
  justify-self: center;
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.mockmint-builder-panel.is-collapsed::after {
  content: "Builder";
  justify-self: center;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.mockmint-panel-head small,
.mockmint-code-head > span:last-child {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.mockmint-panel-head input,
.mockmint-add-column input,
.mockmint-add-column select,
.mockmint-schema-save input,
.mockmint-schema-save select,
.mockmint-column input,
.mockmint-column select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  padding: 0.38rem 0.55rem;
}

.mockmint-panel-head input {
  width: min(190px, 44vw);
}

.mockmint-template-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 0.45rem;
}

.mockmint-template-list button {
  appearance: none;
  width: 100%;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 0.16rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  padding: 0.72rem 0.78rem;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.mockmint-template-list button:hover,
.mockmint-template-list button.is-active {
  border-color: rgba(26, 115, 232, 0.45);
  background: color-mix(in srgb, #e8f0fe 48%, var(--surface));
  box-shadow: 0 6px 18px rgba(60, 64, 67, 0.08);
}

.mockmint-template-list button:active {
  transform: scale(0.99);
}

.mockmint-template-list strong {
  font-size: 0.88rem;
}

.mockmint-template-list span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mockmint-schema-save {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.mockmint-schema-save label {
  display: grid;
  gap: 0.28rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.mockmint-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mockmint-save-actions select {
  flex: 1 1 140px;
}

.mockmint-add-column {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) auto;
  gap: 0.45rem;
}

.mockmint-builder-panel {
  align-content: stretch;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}

.mockmint-column-list {
  order: 4;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 0.6rem;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
  padding-right: 0.15rem;
}

.mockmint-column {
  flex: 0 0 auto;
  display: grid;
  gap: 0.52rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, #e8f0fe), var(--surface));
  padding: 0.68rem;
}

.mockmint-column-main {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr) 30px 30px;
  gap: 0.42rem;
  align-items: center;
}

.mockmint-column-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform 160ms ease;
}

.mockmint-column:not(.is-collapsed) .mockmint-column-toggle svg {
  transform: rotate(180deg);
}

.mockmint-column-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.mockmint-column.is-collapsed {
  gap: 0;
  padding-block: 0.56rem;
}

.mockmint-column.is-collapsed .mockmint-column-settings,
.mockmint-column.is-collapsed p {
  display: none;
}

.mockmint-column-settings label {
  display: grid;
  gap: 0.18rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.mockmint-column-settings .mockmint-inline-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
  color: var(--text);
}

.mockmint-column-settings input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a73e8;
}

.mockmint-column p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.mockmint-builder-assist {
  order: 3;
  display: grid;
  align-content: start;
  gap: 0.72rem;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #e8f0fe 36%, var(--surface)), var(--surface));
  padding: 0.75rem;
}

.mockmint-assist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
}

.mockmint-assist-head small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.mockmint-quick-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.mockmint-quick-fields button {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0.28rem 0.58rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.mockmint-quick-fields button:hover {
  border-color: rgba(26, 115, 232, 0.42);
  background: color-mix(in srgb, #e8f0fe 54%, var(--surface));
  color: #1a73e8;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.08);
}

.mockmint-quick-fields button:active {
  transform: translateY(1px);
}

.mockmint-builder-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.mockmint-builder-summary div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 82%, var(--surface-muted));
  padding: 0.52rem 0.58rem;
}

.mockmint-builder-summary strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockmint-builder-summary span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mockmint-preview-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-content: stretch;
  align-items: stretch;
  align-self: start;
  overflow: visible;
}

.mockmint-preview-panel > * {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

.mockmint-preview-loader {
  position: absolute;
  left: 50%;
  top: min(48%, 420px);
  z-index: 13;
  width: 34px;
  height: 34px;
  display: none;
  border-radius: 50%;
  background: conic-gradient(from 90deg, #2f5bea, #039b9a, #15a36d, transparent 78%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  transform: translate(-50%, calc(-50% - 1.42rem));
  animation: mockmint-preview-spin 0.78s linear infinite;
  pointer-events: none;
}

.mockmint.is-preview-loading .mockmint-preview-loader {
  display: block;
}

.mockmint.is-preview-loading .mockmint-right-section:not(.is-collapsed) .mockmint-section-body {
  filter: blur(2px) saturate(0.82);
  opacity: 0.46;
  pointer-events: none;
}

.mockmint.is-preview-loading .mockmint-right-section:not(.is-collapsed)::before,
.mockmint.is-preview-loading .mockmint-right-section:not(.is-collapsed)::after {
  content: none;
}

.mockmint.is-preview-loading .mockmint-preview-panel::before,
.mockmint.is-preview-loading .mockmint-preview-panel::after {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.mockmint.is-preview-loading .mockmint-preview-panel::before {
  content: "";
  inset: 0.85rem;
  border: 1px solid rgba(47, 91, 234, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.94) 0 74px, transparent 75px),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.60), transparent) 0 0 / 220% 100%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 255, 0.90)),
    repeating-linear-gradient(
      180deg,
      rgba(47, 91, 234, 0.10) 0 12px,
      transparent 12px 26px,
      rgba(3, 155, 154, 0.08) 26px 38px,
      transparent 38px 52px
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 18px 44px rgba(16, 32, 51, 0.14);
  animation: mockmint-preview-skeleton 1.1s ease-in-out infinite;
  backdrop-filter: blur(7px) saturate(118%);
  -webkit-backdrop-filter: blur(7px) saturate(118%);
}

.mockmint.is-preview-loading .mockmint-preview-panel::after {
  content: attr(data-loading-label);
  left: 50%;
  top: min(48%, 420px);
  transform: translate(-50%, -50%);
  min-width: min(250px, calc(100% - 64px));
  max-width: min(360px, calc(100% - 48px));
  border: 1px solid rgba(47, 91, 234, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.10), rgba(3, 155, 154, 0.09)),
    rgba(255, 255, 255, 0.96);
  color: #102033;
  padding: 3.25rem 1rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 18px 44px rgba(16, 32, 51, 0.18);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  animation: mockmint-loader-pulse 0.9s ease-in-out infinite alternate;
}

.mockmint-preview-head {
  align-items: center;
}

.mockmint-preview-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mockmint-full-toggle {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-muted) 68%, var(--surface));
  color: var(--text);
  padding: 0.3rem 0.62rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.mockmint-full-toggle:hover,
.mockmint-full-toggle[aria-pressed="true"] {
  border-color: rgba(26, 115, 232, 0.42);
  background: color-mix(in srgb, #e8f0fe 54%, var(--surface));
  color: #1a73e8;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.08);
}

.mockmint-full-toggle:active {
  transform: translateY(1px);
}

.mockmint-full-toggle svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.mockmint-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: start;
  gap: 0.42rem;
}

.mockmint-actions .ptool-chip {
  flex: 0 0 auto;
  min-height: 36px;
}

.mockmint-kpis {
  align-items: center;
  align-self: start;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
}

.mockmint-kpis .ptool-stat {
  flex: 0 0 auto;
  min-height: 34px;
}

.mockmint-preview-panel [data-mm-table] {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.mockmint-preview-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.62rem;
  border: 1px solid rgba(47, 91, 234, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.08), rgba(3, 155, 154, 0.06)),
    #ffffff;
  color: #64748b;
  padding: 0.58rem 0.72rem;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(16, 32, 51, 0.04);
}

.mockmint-preview-note::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--studio-blue, #2f5bea), var(--studio-teal, #039b9a));
  box-shadow: 0 0 0 4px rgba(47, 91, 234, 0.10);
}

.mockmint-preview-note strong {
  color: var(--studio-ink, var(--text));
  font-weight: 850;
}

.mockmint-preview-table-wrap {
  --mockmint-preview-header-height: 48px;
  --mockmint-preview-row-height: 50px;
  --mockmint-preview-visible-rows: 10;
  width: 100%;
  max-width: 100%;
  height: clamp(
    calc(var(--mockmint-preview-header-height) + (var(--mockmint-preview-row-height) * var(--mockmint-preview-visible-rows)) + 18px),
    58vh,
    720px
  );
  min-height: calc(var(--mockmint-preview-header-height) + (var(--mockmint-preview-row-height) * var(--mockmint-preview-visible-rows)) + 18px);
  overflow-x: scroll;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mockmint-preview-table-wrap:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.72);
  outline-offset: 2px;
}

.mockmint-preview-table-wrap::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

.mockmint-preview-table-wrap::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
  border-radius: 999px;
}

.mockmint-preview-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
  border-radius: 999px;
  background: color-mix(in srgb, #1a73e8 48%, var(--border-hover));
}

.mockmint-preview-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #1a73e8;
}

.mockmint-preview-table {
  width: max-content;
  min-width: max(100%, calc(var(--mockmint-preview-columns, 6) * 140px));
}

.mockmint-preview-table th,
.mockmint-preview-table td {
  height: var(--mockmint-preview-row-height);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockmint-preview-table thead th {
  height: var(--mockmint-preview-header-height);
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--surface-muted) 86%, var(--surface));
}

.mockmint-right-section {
  position: relative;
  width: 100%;
  align-self: start;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 70%, var(--surface));
}

.mockmint-table-section .mockmint-section-body {
  padding: 0.7rem;
}

.mockmint-section-body {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.mockmint-code-panel .mockmint-section-body,
.mockmint-schema-panel .mockmint-section-body {
  display: grid;
  max-height: 360px;
}

.mockmint-schema-panel .mockmint-section-body {
  max-height: 320px;
}

.mockmint-right-section.is-collapsed {
  grid-template-rows: auto;
  min-height: 0;
}

.mockmint-right-section.is-collapsed .mockmint-code-head {
  border-bottom: 0;
}

.mockmint-right-section.is-collapsed .mockmint-section-body,
.mockmint-section-body[hidden] {
  display: none;
}

.mockmint-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 38px;
  padding: 0.54rem 0.72rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.mockmint-code-head > span:first-child {
  min-width: 0;
}

.mockmint-code-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.38rem;
  flex: 0 0 auto;
}

.mockmint-head-btn {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0.28rem 0.56rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.mockmint-head-btn:hover {
  border-color: rgba(26, 115, 232, 0.42);
  background: color-mix(in srgb, #e8f0fe 54%, var(--surface));
  color: #1a73e8;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.08);
}

.mockmint-head-btn:active {
  transform: translateY(1px);
}

.mockmint-head-btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.mockmint-section-toggle {
  background: color-mix(in srgb, #e8f0fe 54%, var(--surface));
  color: #1a73e8;
}

.mockmint-section-chevron {
  transition: transform var(--transition);
}

.mockmint-right-section.is-collapsed .mockmint-section-chevron {
  transform: rotate(180deg);
}

.mockmint-code-panel pre,
.mockmint-schema-panel pre {
  margin: 0;
  min-height: 180px;
  max-height: 360px;
  height: clamp(180px, 30vh, 360px);
  overflow: auto;
  padding: 0.82rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre;
}

.mockmint-schema-panel pre {
  min-height: 170px;
  max-height: 320px;
  height: clamp(170px, 24vh, 320px);
}

.mockmint-layout.is-preview-full .mockmint-preview-table-wrap {
  height: clamp(
    calc(var(--mockmint-preview-header-height) + (var(--mockmint-preview-row-height) * 12) + 18px),
    64vh,
    820px
  );
}

.mockmint-layout.is-preview-full .mockmint-code-panel pre {
  max-height: min(72vh, 820px);
}

.mockmint-layout.is-preview-full .mockmint-schema-panel pre {
  max-height: min(48vh, 520px);
}

:root[data-theme="dark"] .mockmint-safety {
  background: rgba(249, 171, 0, 0.10);
  color: #fde293;
}

:root[data-theme="dark"] .mockmint-safety strong {
  color: #fde293;
}

:root[data-theme="dark"] .mockmint-template-list button:hover,
:root[data-theme="dark"] .mockmint-template-list button.is-active {
  background: rgba(138, 180, 248, 0.10);
}

@media (min-width: 1261px) {
  .mockmint-page .mockmint-app-card {
    display: grid;
  }

  .mockmint-page .mockmint-app-card > div {
    min-height: 0;
    display: grid;
  }

  .mockmint-page .mockmint-app-card .mockmint {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    gap: 0.9rem;
  }

  .mockmint-layout {
    height: var(--mockmint-layout-height, auto);
    max-height: var(--mockmint-layout-height, none);
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }

  .mockmint-template-panel,
  .mockmint-builder-panel {
    height: 100%;
    max-height: 100%;
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
  }

  .mockmint-preview-panel {
    display: flex;
    flex-direction: column;
    align-content: stretch;
    align-items: stretch;
    align-self: start;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .mockmint-template-panel {
    align-content: stretch;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .mockmint-template-body {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .mockmint-template-list {
    min-height: 0;
    max-height: 100%;
    overflow: auto;
  }

  .mockmint-column-list {
    height: auto;
    min-height: 0;
    max-height: 100%;
    align-self: stretch;
    overflow: auto;
  }
}

@media (max-width: 1260px) {
  .mockmint-layout {
    grid-template-columns: minmax(240px, 0.7fr) minmax(420px, 1.3fr);
    height: auto;
  }

  .mockmint-layout.is-builder-collapsed {
    grid-template-columns: minmax(240px, 0.7fr) 70px minmax(420px, 1.3fr);
  }

  .mockmint-splitter {
    display: none;
  }

  .mockmint-preview-panel {
    grid-column: 1 / -1;
  }

  .mockmint-layout.is-builder-collapsed .mockmint-preview-panel {
    grid-column: 3 / -1;
  }
}

@media (max-width: 900px) {
  .mockmint-layout,
  .mockmint-add-column,
  .mockmint-column-settings,
  .mockmint-page .tool-intro,
  .mockmint-page .studio-howto,
  .mockmint-page .use-case-list,
  .mockmint-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .mockmint-page.container {
    width: 95%;
  }

  .mockmint-page .mockmint-app-card {
    padding: 0.75rem;
  }

  .mockmint-layout.is-template-collapsed {
    grid-template-columns: 1fr;
  }

  .mockmint-layout.is-builder-collapsed {
    grid-template-columns: 1fr;
  }

  .mockmint-layout.is-preview-full {
    grid-template-columns: 1fr;
  }

  .mockmint-layout.is-builder-collapsed .mockmint-preview-panel {
    grid-column: 1 / -1;
  }

  .mockmint-template-panel.is-collapsed .mockmint-template-head {
    min-height: 38px;
    flex-direction: row;
    justify-content: space-between;
  }

  .mockmint-builder-panel.is-collapsed .mockmint-builder-head {
    min-height: 38px;
    flex-direction: row;
    justify-content: space-between;
  }

  .mockmint-template-panel.is-collapsed::after {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .mockmint-builder-panel.is-collapsed::after {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .mockmint-code-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mockmint-code-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .mockmint-builder-panel {
    grid-template-rows: auto;
  }

  .mockmint-builder-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mockmint-safety {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .mockmint-kpis {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .mockmint-column-list {
    height: auto;
    max-height: none;
  }
}

/* Synthetic Data Studio modern polish */
.mockmint-page {
  --studio-ink: #102033;
  --studio-muted: #64748b;
  --studio-line: #dbe5ef;
  --studio-soft: #f5f8fc;
  --studio-blue: #2f5bea;
  --studio-teal: #039b9a;
  --studio-mint: #15a36d;
  --studio-amber: #f59e0b;
  --studio-coral: #e4574f;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mockmint-page.container {
  width: 95%;
  max-width: none;
}

.mockmint-page .tool-hero {
  position: relative;
  overflow: hidden;
  margin-top: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.86)),
    #ffffff;
  padding: 0.76rem 1rem 0.9rem;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.035);
}

.mockmint-page.tool-page {
  gap: 1rem;
}

.mockmint-page .tool-breadcrumb ol {
  margin-bottom: 0.62rem;
  font-size: 0.78rem;
}

.mockmint-page .tool-breadcrumb,
.mockmint-page .tool-hero-row {
  display: none !important;
}

.mockmint-page .tool-hero-icon {
  display: none;
}

.mockmint-page .tool-hero-head {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0.55rem 0 0;
}

.mockmint-page .tool-hero-title-block {
  width: 100%;
}

.mockmint-page .tool-hero-title {
  max-width: 900px;
}

.mockmint-page .tool-hero-lead {
  max-width: 1080px;
  margin-bottom: 0;
}

.mockmint-page .tool-hero-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
}

.mockmint-page .tool-hero-pill,
.mockmint-page .tag-category {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 91, 234, 0.22);
  background: linear-gradient(180deg, rgba(240, 245, 255, 0.96), rgba(232, 240, 254, 0.82));
  color: #2f5bea;
  padding: 0.42rem 0.82rem;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 8px 20px rgba(47, 91, 234, 0.06);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mockmint-page .tool-hero-pill svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.mockmint-page .tool-hero-row .tool-hero-pill:nth-child(2) {
  border-color: rgba(21, 163, 109, 0.24);
  background: linear-gradient(180deg, rgba(232, 250, 244, 0.98), rgba(210, 244, 233, 0.84));
  color: #07805d;
}

.mockmint-page .tool-hero-row .tool-hero-pill:nth-child(3) {
  border-color: rgba(47, 91, 234, 0.24);
  background: linear-gradient(180deg, rgba(240, 245, 255, 0.98), rgba(228, 236, 255, 0.84));
  color: #3553d8;
}

.mockmint-page .tool-hero-row .tool-hero-pill:nth-child(4) {
  border-color: rgba(245, 110, 35, 0.24);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.98), rgba(255, 231, 213, 0.82));
  color: #d94b0a;
}

.mockmint-page .tool-hero-pill:hover,
.mockmint-page .tag-category:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 22px rgba(16, 32, 51, 0.08);
}

.mockmint-page .mockmint-app-card {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.96)),
    #ffffff;
  padding: 0.85rem;
  box-shadow: 0 14px 44px rgba(16, 32, 51, 0.08);
}

.mockmint-page .mockmint-app-card:hover {
  transform: none;
  border-color: rgba(148, 163, 184, 0.20);
  box-shadow: 0 14px 44px rgba(16, 32, 51, 0.08);
}

.mockmint-page .mockmint-app-card:hover::before {
  opacity: 0;
}

.mockmint-boot-loader {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1rem;
  min-height: 360px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 8%, rgba(47, 91, 234, 0.16), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(3, 155, 154, 0.13), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.98));
  padding: 1rem;
  color: var(--studio-ink);
}

.mockmint-boot-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transform: translateX(-100%);
  animation: mockmint-boot-sweep 1.6s ease-in-out infinite;
  pointer-events: none;
}

.mockmint-boot-loader-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.mockmint-boot-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--studio-blue), var(--studio-teal));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(47, 91, 234, 0.24);
  animation: mockmint-loader-pulse 1.2s ease-in-out infinite;
}

.mockmint-boot-mark svg {
  width: 24px;
  height: 24px;
}

.mockmint-boot-loader strong,
.mockmint-boot-loader-head div > span {
  display: block;
}

.mockmint-boot-loader strong {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.12rem;
  color: var(--studio-ink);
}

.mockmint-boot-loader-head div > span {
  margin-top: 0.2rem;
  color: var(--studio-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.mockmint-boot-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr) minmax(260px, 1.25fr);
  gap: 0.9rem;
}

.mockmint-boot-grid span,
.mockmint-boot-preview {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(47, 91, 234, 0.08), rgba(255, 255, 255, 0)) 0 0 / 220% 100%,
    rgba(255, 255, 255, 0.72);
  animation: mockmint-boot-card 1.45s ease-in-out infinite;
}

.mockmint-boot-grid span {
  min-height: 116px;
}

.mockmint-boot-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
  min-height: 170px;
  padding: 1rem;
}

.mockmint-boot-preview i {
  display: block;
  height: 18px;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.20);
}

.mockmint-boot-preview i:nth-child(1) { width: 64%; }
.mockmint-boot-preview i:nth-child(2) { width: 88%; }
.mockmint-boot-preview i:nth-child(3) { width: 72%; }
.mockmint-boot-preview i:nth-child(4) { width: 54%; }

.mockmint {
  --mockmint-blue: var(--studio-blue);
  --mockmint-green: var(--studio-mint);
  --mockmint-yellow: var(--studio-amber);
  --mockmint-red: var(--studio-coral);
  color: var(--studio-ink);
}

.mockmint .ptool-bar {
  min-height: 66px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(47, 91, 234, 0.07), rgba(3, 155, 154, 0.055)),
    linear-gradient(180deg, #ffffff, #f9fbfe);
  padding: 0.68rem 0.82rem;
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.055);
}

.mockmint .ptool-bar-title {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  min-width: 0;
}

.mockmint-product-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--studio-blue), var(--studio-teal));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 91, 234, 0.20);
}

.mockmint-product-mark svg {
  width: 20px;
  height: 20px;
}

.mockmint-title-stack {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.mockmint-title-stack strong {
  color: var(--studio-ink);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1rem, 1.3vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0;
}

.mockmint-title-stack small {
  color: var(--studio-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.mockmint .ptool-chip,
.mockmint-head-btn,
.mockmint-full-toggle,
.mockmint-quick-fields button {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.mockmint .ptool-chip:hover,
.mockmint-head-btn:hover,
.mockmint-full-toggle:hover,
.mockmint-quick-fields button:hover {
  border-color: rgba(47, 91, 234, 0.32);
  background: #ffffff;
  color: var(--studio-blue);
  box-shadow: 0 8px 20px rgba(47, 91, 234, 0.10);
}

.mockmint .ptool-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--studio-blue), var(--studio-teal));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(47, 91, 234, 0.24);
}

.mockmint .ptool-chip.is-active:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.mockmint-safety {
  position: relative;
  border-color: rgba(245, 158, 11, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.13), rgba(255, 255, 255, 0.82) 38%),
    #ffffff;
  color: #7c4a03;
  box-shadow: 0 10px 24px rgba(124, 74, 3, 0.06);
}

.mockmint-safety::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--studio-amber);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.mockmint-controls {
  border: 1px solid rgba(47, 91, 234, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.78rem 0.9rem;
  min-height: 0;
  height: auto;
  align-items: center;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.06);
}

.mockmint-controls .ptool-setting,
.mockmint-controls .ptool-toggle {
  border-radius: 14px;
  background: #f8fbff;
  padding: 0.38rem 0.55rem;
  min-height: 42px;
  height: auto;
}

.mockmint-panel {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.94)),
    #ffffff;
  padding: 0.95rem;
  box-shadow: 0 14px 36px rgba(16, 32, 51, 0.08);
}

.mockmint-panel-head {
  min-height: 42px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding-bottom: 0.52rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
}

.mockmint-panel-head > span:first-child::before,
.mockmint-builder-title-text::before,
.mockmint-preview-title span::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 0.44rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--studio-blue), var(--studio-teal));
  box-shadow: 0 0 0 4px rgba(47, 91, 234, 0.10);
  vertical-align: 0.04em;
}

.mockmint-panel-head small,
.mockmint-code-head > span:last-child {
  color: var(--studio-muted);
}

.mockmint-panel-head input,
.mockmint-add-column input,
.mockmint-add-column select,
.mockmint-schema-save input,
.mockmint-schema-save select,
.mockmint-column input,
.mockmint-column select,
.mockmint-controls input,
.mockmint-controls select {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--studio-ink);
  font-weight: 700;
}

.mockmint-panel-head input:focus,
.mockmint-add-column input:focus,
.mockmint-add-column select:focus,
.mockmint-schema-save input:focus,
.mockmint-schema-save select:focus,
.mockmint-column input:focus,
.mockmint-column select:focus,
.mockmint-controls input:focus,
.mockmint-controls select:focus {
  border-color: rgba(47, 91, 234, 0.58);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47, 91, 234, 0.10);
  outline: none;
}

.mockmint-template-list button {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.78rem 0.88rem 0.78rem 1rem;
}

.mockmint-template-list button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--studio-blue), var(--studio-teal));
  opacity: 0.18;
}

.mockmint-template-list button:hover,
.mockmint-template-list button.is-active {
  border-color: rgba(47, 91, 234, 0.34);
  background: linear-gradient(135deg, rgba(47, 91, 234, 0.09), rgba(3, 155, 154, 0.06)), #ffffff;
  box-shadow: 0 10px 24px rgba(47, 91, 234, 0.10);
}

.mockmint-template-list button.is-active::before {
  opacity: 1;
}

.mockmint-template-list strong {
  color: var(--studio-ink);
}

.mockmint-template-list span,
.mockmint-column p,
.mockmint-assist-head small {
  color: var(--studio-muted);
}

.mockmint-add-column {
  border: 1px solid rgba(47, 91, 234, 0.10);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 91, 234, 0.06), rgba(21, 163, 109, 0.05));
  padding: 0.56rem;
}

.mockmint-builder-assist {
  border-color: rgba(3, 155, 154, 0.20);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(3, 155, 154, 0.10), rgba(47, 91, 234, 0.06)),
    #ffffff;
}

.mockmint-quick-fields button:nth-child(3n + 1) {
  color: #1d4ed8;
}

.mockmint-quick-fields button:nth-child(3n + 2) {
  color: #047857;
}

.mockmint-quick-fields button:nth-child(3n) {
  color: #b45309;
}

.mockmint-builder-summary div {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 18px rgba(16, 32, 51, 0.05);
}

.mockmint-builder-summary strong {
  color: var(--studio-blue);
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.mockmint-builder-summary span {
  color: var(--studio-muted);
}

.mockmint-column {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.mockmint-column::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--studio-blue), var(--studio-teal), var(--studio-mint));
  opacity: 0.32;
}

.mockmint-column:hover {
  border-color: rgba(47, 91, 234, 0.30);
  box-shadow: 0 14px 28px rgba(16, 32, 51, 0.08);
  transform: translateY(-1px);
}

.mockmint-column-main,
.mockmint-column-settings,
.mockmint-column p {
  position: relative;
  z-index: 1;
}

.mockmint-inline-check {
  border-radius: 12px;
  padding: 0.32rem 0.42rem;
  background: rgba(47, 91, 234, 0.04);
}

.mockmint-preview-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.96)),
    #ffffff;
}

.mockmint-kpis .ptool-stat {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 32, 51, 0.04);
}

.mockmint-kpis .ptool-stat.is-success {
  border-color: rgba(21, 163, 109, 0.24);
  background: rgba(21, 163, 109, 0.08);
}

.mockmint-preview-table-wrap {
  contain: paint;
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(16, 32, 51, 0.06);
}

.mockmint-preview-table thead th {
  background: linear-gradient(180deg, #eef6ff, #eaf3fb);
  color: #475569;
  font-size: 0.72rem;
  letter-spacing: 0.045em;
}

.mockmint-preview-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.mockmint-preview-table tbody tr:hover {
  background: rgba(47, 91, 234, 0.06);
}

.mockmint-table-section,
.mockmint-code-panel,
.mockmint-schema-panel {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(16, 32, 51, 0.06);
}

.mockmint-code-head {
  background: linear-gradient(180deg, #f8fbff, #f1f6fb);
}

.mockmint-code-panel pre,
.mockmint-schema-panel pre {
  background:
    linear-gradient(90deg, rgba(47, 91, 234, 0.04), transparent 24%),
    #fbfdff;
  color: #1f2937;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

.mockmint-splitter::before {
  background: linear-gradient(180deg, transparent, rgba(47, 91, 234, 0.28), rgba(3, 155, 154, 0.26), transparent);
}

.mockmint-splitter:hover::before,
.mockmint-splitter:focus-visible::before,
.mockmint-layout.is-resizing-builder .mockmint-splitter::before {
  background: linear-gradient(180deg, var(--studio-blue), var(--studio-teal));
  box-shadow: 0 0 0 5px rgba(47, 91, 234, 0.12);
}

.mockmint .ptool-status {
  border-radius: 16px;
  font-weight: 800;
}

:root[data-theme="dark"] .mockmint-page {
  --studio-ink: #e5edf7;
  --studio-muted: #9aa8bd;
  --studio-line: #2b3749;
  --studio-soft: #111827;
  --studio-blue: #8ab4f8;
  --studio-teal: #5eead4;
  --studio-mint: #81c995;
  --studio-amber: #fdd663;
  --studio-coral: #f28b82;
}

:root[data-theme="dark"] .mockmint-page .tool-hero {
  border-color: rgba(138, 180, 248, 0.18);
  background:
    linear-gradient(180deg, rgba(21, 27, 38, 0.94), rgba(15, 23, 42, 0.90)),
    #111827;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .mockmint-page .tool-breadcrumb a,
:root[data-theme="dark"] .mockmint-page .tool-breadcrumb li {
  color: #a7b4c9;
}

:root[data-theme="dark"] .mockmint-page .tool-breadcrumb li[aria-current="page"] {
  color: #e5edf7;
}

:root[data-theme="dark"] .mockmint-page .tool-hero-pill,
:root[data-theme="dark"] .mockmint-page .tag-category {
  border-color: rgba(138, 180, 248, 0.24);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(17, 24, 39, 0.88));
  color: #bcd4ff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 8px 20px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .mockmint-page .tool-hero-row .tool-hero-pill:nth-child(2) {
  border-color: rgba(129, 201, 149, 0.24);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.32), rgba(15, 23, 42, 0.88));
  color: #9be7b0;
}

:root[data-theme="dark"] .mockmint-page .tool-hero-row .tool-hero-pill:nth-child(3) {
  border-color: rgba(138, 180, 248, 0.28);
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 0.88));
  color: #bcd4ff;
}

:root[data-theme="dark"] .mockmint-page .tool-hero-row .tool-hero-pill:nth-child(4) {
  border-color: rgba(253, 186, 116, 0.26);
  background: linear-gradient(180deg, rgba(154, 52, 18, 0.28), rgba(15, 23, 42, 0.88));
  color: #fdba74;
}

:root[data-theme="dark"] .mockmint-page .mockmint-app-card {
  border-color: rgba(138, 180, 248, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(12, 18, 29, 0.98)),
    #0f172a;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .mockmint-page .mockmint-app-card:hover {
  border-color: rgba(138, 180, 248, 0.14);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .mockmint-boot-loader {
  border-color: rgba(71, 85, 105, 0.66);
  background:
    radial-gradient(circle at 18% 8%, rgba(138, 180, 248, 0.18), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(94, 234, 212, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(22, 31, 45, 0.98), rgba(15, 23, 42, 0.98)),
    #0f172a;
  color: #e5edf7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .mockmint-boot-loader::before {
  background: linear-gradient(90deg, transparent, rgba(138, 180, 248, 0.12), transparent);
}

:root[data-theme="dark"] .mockmint-boot-loader strong {
  color: #e5edf7;
}

:root[data-theme="dark"] .mockmint-boot-loader-head div > span {
  color: #9aa8bd;
}

:root[data-theme="dark"] .mockmint-boot-grid span,
:root[data-theme="dark"] .mockmint-boot-preview {
  border-color: rgba(71, 85, 105, 0.62);
  background:
    linear-gradient(90deg, transparent, rgba(138, 180, 248, 0.10), transparent) 0 0 / 220% 100%,
    rgba(17, 24, 39, 0.88);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .mockmint-boot-preview i {
  background: rgba(148, 163, 184, 0.18);
}

:root[data-theme="dark"] .mockmint {
  color: #e5edf7;
}

:root[data-theme="dark"] .mockmint .ptool-bar,
:root[data-theme="dark"] .mockmint-panel,
:root[data-theme="dark"] .mockmint-preview-panel {
  border-color: rgba(71, 85, 105, 0.64);
  background:
    linear-gradient(180deg, rgba(22, 31, 45, 0.98), rgba(15, 23, 42, 0.96)),
    #111827;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .mockmint .ptool-bar {
  background:
    linear-gradient(135deg, rgba(138, 180, 248, 0.10), rgba(94, 234, 212, 0.07)),
    linear-gradient(180deg, #172033, #111827);
}

:root[data-theme="dark"] .mockmint-title-stack strong,
:root[data-theme="dark"] .mockmint-panel-head,
:root[data-theme="dark"] .mockmint-assist-head,
:root[data-theme="dark"] .mockmint-preview-title span,
:root[data-theme="dark"] .mockmint-template-list strong {
  color: #e5edf7;
}

:root[data-theme="dark"] .mockmint-title-stack small,
:root[data-theme="dark"] .mockmint-panel-head small,
:root[data-theme="dark"] .mockmint-template-list span,
:root[data-theme="dark"] .mockmint-column p,
:root[data-theme="dark"] .mockmint-assist-head small,
:root[data-theme="dark"] .mockmint-code-head > span:last-child {
  color: #9aa8bd;
}

:root[data-theme="dark"] .mockmint-safety {
  border-color: rgba(253, 214, 99, 0.22);
  background: rgba(120, 76, 0, 0.16);
  color: #fde293;
}

:root[data-theme="dark"] .mockmint-safety strong {
  color: #fde293;
}

:root[data-theme="dark"] .mockmint-controls,
:root[data-theme="dark"] .mockmint-add-column,
:root[data-theme="dark"] .mockmint-builder-assist {
  border-color: rgba(71, 85, 105, 0.60);
  background:
    linear-gradient(135deg, rgba(138, 180, 248, 0.08), rgba(94, 234, 212, 0.06)),
    #111827;
}

:root[data-theme="dark"] .mockmint-controls .ptool-setting,
:root[data-theme="dark"] .mockmint-controls .ptool-toggle {
  border: 1px solid rgba(71, 85, 105, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #0f172a;
  color: #aebbd0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .mockmint-controls .ptool-setting > label {
  color: #9aa8bd;
}

:root[data-theme="dark"] .mockmint-controls .ptool-toggle input[type="checkbox"] {
  border: 1px solid rgba(71, 85, 105, 0.72);
  background: #1e293b;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .mockmint-controls .ptool-toggle input[type="checkbox"]:checked {
  border-color: rgba(138, 180, 248, 0.72);
  background: linear-gradient(135deg, #4f6fea, #2dd4bf);
}

:root[data-theme="dark"] .mockmint-panel-head input,
:root[data-theme="dark"] .mockmint-add-column input,
:root[data-theme="dark"] .mockmint-add-column select,
:root[data-theme="dark"] .mockmint-schema-save input,
:root[data-theme="dark"] .mockmint-schema-save select,
:root[data-theme="dark"] .mockmint-column input,
:root[data-theme="dark"] .mockmint-column select,
:root[data-theme="dark"] .mockmint-controls input,
:root[data-theme="dark"] .mockmint-controls select {
  border-color: rgba(71, 85, 105, 0.68);
  background: #0f172a;
  color: #e5edf7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .mockmint-panel-head input:focus,
:root[data-theme="dark"] .mockmint-add-column input:focus,
:root[data-theme="dark"] .mockmint-add-column select:focus,
:root[data-theme="dark"] .mockmint-schema-save input:focus,
:root[data-theme="dark"] .mockmint-schema-save select:focus,
:root[data-theme="dark"] .mockmint-column input:focus,
:root[data-theme="dark"] .mockmint-column select:focus,
:root[data-theme="dark"] .mockmint-controls input:focus,
:root[data-theme="dark"] .mockmint-controls select:focus {
  border-color: rgba(138, 180, 248, 0.70);
  background: #111827;
  box-shadow: 0 0 0 4px rgba(138, 180, 248, 0.12);
}

:root[data-theme="dark"] .mockmint-template-list button,
:root[data-theme="dark"] .mockmint-column,
:root[data-theme="dark"] .mockmint-builder-summary div,
:root[data-theme="dark"] .mockmint-kpis .ptool-stat,
:root[data-theme="dark"] .mockmint-table-section,
:root[data-theme="dark"] .mockmint-code-panel,
:root[data-theme="dark"] .mockmint-schema-panel,
:root[data-theme="dark"] .mockmint-preview-table-wrap {
  border-color: rgba(71, 85, 105, 0.62);
  background: #111827;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .mockmint-template-list button:hover,
:root[data-theme="dark"] .mockmint-template-list button.is-active,
:root[data-theme="dark"] .mockmint-column:hover {
  border-color: rgba(138, 180, 248, 0.36);
  background:
    linear-gradient(135deg, rgba(138, 180, 248, 0.12), rgba(94, 234, 212, 0.08)),
    #111827;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.30);
}

:root[data-theme="dark"] .mockmint-inline-check {
  background: rgba(138, 180, 248, 0.08);
}

:root[data-theme="dark"] .mockmint-code-head {
  border-color: rgba(71, 85, 105, 0.58);
  background: linear-gradient(180deg, #182235, #111827);
}

:root[data-theme="dark"] .mockmint-preview-table thead th {
  background: linear-gradient(180deg, #1f2a3a, #1a2333);
  color: #c7d2e1;
}

:root[data-theme="dark"] .mockmint-preview-table tbody tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.42);
}

:root[data-theme="dark"] .mockmint-preview-table tbody tr:hover {
  background: rgba(138, 180, 248, 0.10);
}

:root[data-theme="dark"] .mockmint-preview-note,
:root[data-theme="dark"] .mockmint-code-panel pre,
:root[data-theme="dark"] .mockmint-schema-panel pre {
  border-color: rgba(71, 85, 105, 0.58);
  background:
    linear-gradient(90deg, rgba(138, 180, 248, 0.05), transparent 26%),
    #0f172a;
  color: #dbeafe;
}

:root[data-theme="dark"] .mockmint-preview-note strong {
  color: #e5edf7;
}

:root[data-theme="dark"] .mockmint-preview-note {
  color: #9aa8bd;
}

:root[data-theme="dark"] .mockmint .ptool-chip,
:root[data-theme="dark"] .mockmint-head-btn,
:root[data-theme="dark"] .mockmint-full-toggle,
:root[data-theme="dark"] .mockmint-collapse-toggle,
:root[data-theme="dark"] .mockmint .ptool-icon-btn,
:root[data-theme="dark"] .mockmint-quick-fields button {
  border-color: rgba(71, 85, 105, 0.68);
  background: #111827;
  color: #dbeafe;
}

:root[data-theme="dark"] .mockmint .ptool-chip.is-active {
  border-color: rgba(138, 180, 248, 0.45);
  background: linear-gradient(135deg, #3456e8, #0f8f8c);
  color: #ffffff;
}

:root[data-theme="dark"] .mockmint .ptool-status {
  border-color: rgba(71, 85, 105, 0.60);
  background: #111827;
}

:root[data-theme="dark"] .mockmint-loading-overlay {
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .mockmint:not(.datastudio) > .mockmint-loading {
  border-color: rgba(138, 180, 248, 0.28);
  background:
    linear-gradient(135deg, rgba(138, 180, 248, 0.14), rgba(94, 234, 212, 0.10)),
    rgba(17, 24, 39, 0.98);
  color: #e5edf7;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .mockmint.is-preview-loading .mockmint-preview-panel::before {
  border-color: rgba(138, 180, 248, 0.18);
  background:
    radial-gradient(circle at 50% 44%, rgba(17, 24, 39, 0.94) 0 74px, transparent 75px),
    linear-gradient(90deg, transparent, rgba(148, 180, 248, 0.14), transparent) 0 0 / 220% 100%,
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.88)),
    repeating-linear-gradient(
      180deg,
      rgba(138, 180, 248, 0.10) 0 12px,
      transparent 12px 26px,
      rgba(94, 234, 212, 0.08) 26px 38px,
      transparent 38px 52px
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .mockmint.is-preview-loading .mockmint-preview-panel::after {
  border-color: rgba(138, 180, 248, 0.24);
  background:
    linear-gradient(135deg, rgba(138, 180, 248, 0.13), rgba(94, 234, 212, 0.10)),
    rgba(17, 24, 39, 0.96);
  color: #e5edf7;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

/* Keep Synthetic Data Studio calm while preserving useful interaction motion. */
.mockmint .ptool-chip,
.mockmint .ptool-icon-btn,
.mockmint-head-btn,
.mockmint-full-toggle,
.mockmint-collapse-toggle,
.mockmint-quick-fields button,
.mockmint-template-list button,
.mockmint-column,
.mockmint-column-toggle svg,
.mockmint-section-chevron,
.mockmint-splitter::before,
.mockmint-splitter::after {
  transition-duration: 160ms;
  transition-timing-function: ease;
}

.mockmint .ptool-chip:hover,
.mockmint .ptool-chip.is-active:hover,
.mockmint-head-btn:hover,
.mockmint-full-toggle:hover,
.mockmint-quick-fields button:hover,
.mockmint-template-list button:hover,
.mockmint-column:hover {
  transform: translateY(-1px);
}

.mockmint .ptool-chip:active,
.mockmint-head-btn:active,
.mockmint-full-toggle:active,
.mockmint-quick-fields button:active,
.mockmint-template-list button:active {
  transform: translateY(0) scale(0.99);
}

.mockmint-loading-overlay {
  animation: mockmint-loader-in 0.18s ease-out both;
}

.mockmint.has-loading-overlay .mockmint-layout,
.mockmint.has-loading-overlay .mockmint-safety,
.mockmint.has-loading-overlay .mockmint-controls {
  filter: saturate(0.9);
}

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

@media (max-width: 900px) {
  .mockmint-page.container {
    width: 95%;
  }

  .mockmint .ptool-bar {
    align-items: flex-start;
  }

  .mockmint-title-stack small {
    display: none;
  }

  .mockmint-controls {
    padding: 0.7rem;
  }
}

/* Time & Date Studio */
.time-date-page.container {
  width: min(1760px, calc(100% - 32px));
}

.time-date-page .tool-hero,
.time-date-page > .tool-section,
.time-date-page > .tool-workspace-brief {
  width: 100%;
  margin-inline: auto;
}

.time-date-page .tool-hero-lead {
  max-width: 96ch;
}

.time-date-page .tool-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.time-date-page .tool-intro p {
  max-width: none;
}

.time-date-page .feature-grid,
.time-date-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.time-date-page .studio-seo-heading,
.time-date-page .related-tags {
  max-width: none;
}

.time-date-page .studio-seo-heading p {
  max-width: 112ch;
}

.time-date-page .studio-howto {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.time-date-page .use-case-list,
.time-date-page .examples-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.time-date-page .time-date-app-card {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.06);
}

.timedate {
  --timedate-blue: #1a73e8;
  --timedate-green: #188038;
  --timedate-yellow: #f9ab00;
  --timedate-red: #d93025;
}

.timedate .ptool-bar {
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(26, 115, 232, 0.08), transparent 32%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-muted) 70%, var(--surface)));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.timedate .ptool-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.timedate .ptool-tab {
  justify-content: center;
  flex: 1 1 auto;
}

.timedate-controls {
  align-items: stretch;
}

.timedate-controls[hidden] {
  display: none !important;
}

.timedate-controls .ptool-setting {
  min-height: 36px;
}

.timedate-controls .ptool-setting.timedate-wide input {
  min-width: min(320px, 64vw);
}

.timedate-controls input[type="date"],
.timedate-controls input[type="datetime-local"],
.timedate-controls input[type="time"],
.timedate-controls input[type="number"] {
  appearance: none;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  background: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.timedate-controls input:focus {
  border-color: rgba(26, 115, 232, 0.6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.timedate-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 374px);
  gap: 0.9rem;
  align-items: stretch;
}

.timedate-visual-pane {
  grid-column: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.timedate-visual {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  min-height: 430px;
  padding: 0.9rem;
  overflow: auto;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 70%, var(--surface)), var(--surface));
}

.timedate .timedate-report-pane {
  grid-column: 2;
  min-height: 430px;
  min-width: 0;
}

.timedate-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.timedate-card,
.timedate-list-card,
.timedate-clock-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.06);
}

.timedate-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem;
  border-left: 4px solid var(--timedate-blue);
}

.timedate-card.is-green { border-left-color: var(--timedate-green); }
.timedate-card.is-yellow { border-left-color: var(--timedate-yellow); }
.timedate-card.is-red { border-left-color: var(--timedate-red); }

.timedate-card span,
.timedate-clock-card span,
.timedate-countdown span,
.timedate-ring span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timedate-card strong {
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  word-break: break-word;
}

.timedate-card p,
.timedate-clock-card p,
.timedate-list-card p,
.timedate-countdown p,
.timedate-ring p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.timedate-clock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
}

.timedate-clock-grid.is-large {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.timedate-clock-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.timedate-clock-card strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  letter-spacing: 0;
  line-height: 1.1;
}

.timedate-list-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem;
}

.timedate-list-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.timedate-countdown {
  display: grid;
  gap: 0.35rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.11), rgba(24, 128, 56, 0.08)),
    var(--surface);
}

.timedate-countdown.is-done {
  border-color: rgba(24, 128, 56, 0.26);
  background: rgba(24, 128, 56, 0.08);
}

.timedate-countdown strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 7vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.timedate-pomodoro {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(220px, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.timedate-ring {
  --progress: 0%;
  display: grid;
  place-items: center;
  gap: 0.25rem;
  width: min(260px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 58%, transparent 59%),
    conic-gradient(var(--timedate-blue) var(--progress), color-mix(in srgb, var(--border) 75%, transparent) 0);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 12px var(--surface), 0 12px 32px rgba(60, 64, 67, 0.10);
  text-align: center;
  padding: 1.2rem;
}

.timedate-ring strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1;
}

:root[data-theme="dark"] .timedate .ptool-bar {
  background:
    linear-gradient(90deg, rgba(138, 180, 248, 0.11), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 78%, #000 22%), color-mix(in srgb, var(--surface-muted) 66%, #000 34%));
}

:root[data-theme="dark"] .timedate-visual {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 72%, #000 28%), color-mix(in srgb, var(--surface-muted) 60%, #000 40%));
}

:root[data-theme="dark"] .timedate-controls input[type="date"],
:root[data-theme="dark"] .timedate-controls input[type="datetime-local"],
:root[data-theme="dark"] .timedate-controls input[type="time"],
:root[data-theme="dark"] .timedate-controls input[type="number"] {
  background: color-mix(in srgb, var(--surface-muted) 76%, #000 24%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 980px) {
  .timedate-workspace,
  .timedate-pomodoro,
  .time-date-page .tool-intro {
    grid-template-columns: 1fr;
  }

  .timedate-visual-pane,
  .timedate .timedate-report-pane {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .timedate .ptool-tab {
    flex-basis: calc(50% - 2px);
  }

  .timedate-controls .ptool-setting,
  .timedate-controls .ptool-setting input,
  .timedate-controls .ptool-setting select {
    width: 100%;
  }

  .timedate-visual,
  .timedate-report-pane {
    min-height: 340px;
  }
}

/* SEO/Web Studio */
.seo-studio-page.container {
  width: min(1760px, calc(100% - 32px));
}

.seo-studio-page .tool-hero,
.seo-studio-page > .tool-section,
.seo-studio-page > .tool-workspace-brief {
  width: 100%;
  margin-inline: auto;
}

.seo-studio-page .tool-hero-lead {
  max-width: 96ch;
}

.seo-studio-page .tool-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.seo-studio-page .tool-intro p {
  max-width: none;
}

.seo-studio-page .feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.seo-studio-page .studio-seo-heading {
  max-width: 100%;
}

.seo-studio-page .studio-seo-heading p {
  max-width: 112ch;
}

.seo-studio-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.seo-studio-page .studio-howto {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.seo-studio-page .use-case-list,
.seo-studio-page .examples-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.seo-studio-page .related-tags {
  max-width: none;
}

.seo-studio-page .seo-web-app-card {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.06);
}

/* Security Toolkit Studio */
.security-studio-page.container {
  width: min(1760px, calc(100% - 32px));
}

.security-studio-page .tool-hero,
.security-studio-page > .tool-section,
.security-studio-page > .tool-workspace-brief {
  width: 100%;
  margin-inline: auto;
}

.security-studio-page .tool-hero-lead {
  max-width: 96ch;
}

.security-studio-page .tool-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.security-studio-page .tool-intro p {
  max-width: none;
}

.security-studio-page .feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.security-studio-page .studio-seo-heading {
  max-width: 100%;
}

.security-studio-page .studio-seo-heading p {
  max-width: 112ch;
}

.security-studio-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.security-studio-page .studio-howto {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.security-studio-page .use-case-list,
.security-studio-page .examples-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.security-studio-page .related-tags {
  max-width: none;
}

.security-studio-page .security-studio-app-card {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.06);
}

.securitystudio {
  --security-blue: #1a73e8;
  --security-green: #188038;
  --security-yellow: #f9ab00;
  --security-red: #d93025;
}

.securitystudio .ptool-bar {
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(26, 115, 232, 0.08), transparent 34%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-muted) 70%, var(--surface)));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.securitystudio-primary-action {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
  box-shadow: 0 1px 4px rgba(26, 115, 232, 0.24);
}

.securitystudio .ptool-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.securitystudio .ptool-tab {
  justify-content: center;
  flex: 1 1 auto;
}

.securitystudio-controls {
  align-items: stretch;
}

.securitystudio-controls[hidden] {
  display: none !important;
}

.securitystudio-panes {
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  align-items: stretch;
}

.securitystudio-panes.is-output-only {
  grid-template-columns: 1fr;
}

.securitystudio-panes.is-output-only .securitystudio-source-pane {
  display: none;
}

.securitystudio-output-pane {
  border-color: color-mix(in srgb, var(--border-hover) 58%, var(--border));
  background: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
}

.securitystudio-output-pane .ptool-pane-header {
  background: color-mix(in srgb, var(--surface-muted) 88%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--border-hover) 55%, var(--border));
}

.securitystudio-output-editor {
  min-height: 430px;
  overflow: auto;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface-muted) 92%, var(--surface)),
      color-mix(in srgb, var(--surface-muted) 82%, var(--surface))
    );
}

.securitystudio-output {
  width: 100%;
  min-width: 0;
  padding: 1rem;
  overflow: auto;
}

.securitystudio-secret-list,
.securitystudio-uuid-list {
  max-height: 520px;
  overflow: auto;
}

.securitystudio-secret-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.securitystudio-secret-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.68rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.securitystudio-secret-row:last-child {
  border-bottom: 0;
}

.securitystudio-secret-row span,
.securitystudio-secret-row small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.securitystudio-secret-row code {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  word-break: break-all;
}

.securitystudio-score-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 0.9rem;
}

.securitystudio-score-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.securitystudio-score-card span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.securitystudio-score-card strong {
  color: var(--text);
  font-size: 1.25rem;
}

.securitystudio-score-card.is-success {
  border-color: rgba(24, 128, 56, 0.26);
  background: linear-gradient(180deg, rgba(24, 128, 56, 0.08), var(--surface));
}

.securitystudio-score-card.is-warn {
  border-color: rgba(249, 171, 0, 0.32);
  background: linear-gradient(180deg, rgba(249, 171, 0, 0.1), var(--surface));
}

.securitystudio-score-card.is-error {
  border-color: rgba(217, 48, 37, 0.28);
  background: linear-gradient(180deg, rgba(217, 48, 37, 0.08), var(--surface));
}

.securitystudio-score-meter {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 72%, transparent);
  overflow: hidden;
}

.securitystudio-score-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d93025, #f9ab00, #188038);
}

.securitystudio-metric-grid,
.securitystudio-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.securitystudio-metric-grid span,
.securitystudio-check-grid span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.securitystudio-metric-grid strong {
  color: var(--text);
  font-weight: 800;
  word-break: break-word;
}

.securitystudio-metric-grid .is-success strong,
.securitystudio-check-grid .is-pass {
  color: #137333;
}

.securitystudio-metric-grid .is-warn strong {
  color: #a16207;
}

.securitystudio-metric-grid .is-error strong,
.securitystudio-check-grid .is-fail {
  color: #b3261e;
}

.securitystudio-check-grid svg {
  flex: none;
}

.securitystudio-code-result {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
}

.securitystudio-decoded {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.securitystudio-decoded-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.securitystudio-decoded-card h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  font-weight: 800;
}

.securitystudio-decoded-card pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

.securitystudio-claims {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 0.85rem;
  font-size: 0.84rem;
}

.securitystudio-claims .ck {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.securitystudio-claims .cv {
  color: var(--text);
  font-family: var(--font-mono);
  word-break: break-all;
}

.securitystudio-claims .cv-meta,
.securitystudio-muted {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.securitystudio-muted {
  margin-top: 0.8rem;
}

:root[data-theme="dark"] .securitystudio .ptool-bar {
  background:
    linear-gradient(90deg, rgba(138, 180, 248, 0.11), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 78%, #000 22%), color-mix(in srgb, var(--surface-muted) 66%, #000 34%));
}

:root[data-theme="dark"] .securitystudio-output-pane,
:root[data-theme="dark"] .securitystudio-output-editor {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

:root[data-theme="dark"] .securitystudio-check-grid .is-pass {
  color: #81c995;
}

:root[data-theme="dark"] .securitystudio-check-grid .is-fail {
  color: #f28b82;
}

@media (max-width: 820px) {
  .security-studio-page.container {
    width: min(100% - 24px, 1760px);
  }

  .security-studio-page .tool-intro,
  .security-studio-page .studio-howto,
  .security-studio-page .use-case-list,
  .security-studio-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .security-studio-page .security-studio-app-card {
    padding: 0.7rem;
  }

  .securitystudio-panes {
    grid-template-columns: 1fr;
  }

  .securitystudio-secret-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .securitystudio-secret-row small {
    grid-column: 2;
  }

  .securitystudio .ptool-tab {
    flex-basis: calc(50% - 2px);
  }
}

.seoweb {
  --seoweb-left: 42%;
  grid-template-columns: minmax(320px, calc(var(--seoweb-left) - 9px)) 18px minmax(440px, calc((100% - var(--seoweb-left)) - 9px));
  align-items: start;
  gap: 1rem 0;
}

.seoweb .ptool-bar,
.seoweb .datastudio-assist {
  grid-column: 1 / -1;
}

.seoweb .ptool-bar {
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(26, 115, 232, 0.08), transparent 32%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-muted) 70%, var(--surface)));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.seoweb .ptool-bar-title {
  font-weight: 800;
}

.datastudio.seoweb .ptool-tabs {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-muted) 64%, var(--surface));
}

.datastudio.seoweb .ptool-tab {
  justify-content: flex-start;
  min-height: 42px;
  border-radius: 9px;
}

.datastudio.seoweb .datastudio-controls {
  grid-column: 1;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.datastudio.seoweb .datastudio-controls textarea {
  resize: vertical;
}

.datastudio.seoweb .datastudio-panes {
  grid-column: 3;
  grid-row: 3 / span 2;
  grid-template-columns: 1fr;
  gap: 0;
}

.seoweb-resizer {
  grid-column: 2;
  grid-row: 3 / span 2;
  min-width: 18px;
  border-radius: 999px;
}

.seoweb-resizer::before {
  margin: 0.2rem 0;
  background: color-mix(in srgb, var(--brand) 28%, var(--border-hover));
}

.seoweb-resizer:hover::before,
.seoweb-resizer:focus-visible::before,
.seoweb.is-resizing-layout .seoweb-resizer::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.seoweb.is-resizing-layout {
  cursor: col-resize;
  user-select: none;
}

.datastudio.seoweb .datastudio-panes .ptool-pane {
  min-height: clamp(520px, 58vh, 720px);
}

.datastudio.seoweb .datastudio-kpis {
  grid-column: 3;
}

.datastudio.seoweb .ptool-status {
  grid-column: 1 / -1;
}

.datastudio.seoweb .ptool-decoded {
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.datastudio.seoweb .ptool-decoded-card {
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 58%, var(--surface)), var(--surface));
}

.datastudio.seoweb .datastudio-quick-actions button {
  min-height: 34px;
}

.seoweb .ptool-editor pre.has-syntax {
  min-height: 100%;
}

:root[data-theme="dark"] .seoweb .ptool-bar {
  background:
    linear-gradient(90deg, rgba(138, 180, 248, 0.11), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 78%, #000 22%), color-mix(in srgb, var(--surface-muted) 66%, #000 34%));
}

:root[data-theme="dark"] .seoweb .datastudio-controls,
:root[data-theme="dark"] .seoweb .ptool-tabs {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

:root[data-theme="dark"] .seoweb-resizer::before {
  background: color-mix(in srgb, var(--brand) 34%, var(--border-hover));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 980px) {
  .seoweb {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .seoweb .ptool-bar,
  .seoweb .datastudio-assist,
  .datastudio.seoweb .ptool-tabs,
  .datastudio.seoweb .datastudio-controls,
  .seoweb-resizer,
  .datastudio.seoweb .datastudio-panes,
  .datastudio.seoweb .datastudio-kpis,
  .datastudio.seoweb .ptool-status,
  .datastudio.seoweb .ptool-decoded {
    grid-column: 1;
    grid-row: auto;
  }

  .seoweb-resizer {
    display: none;
  }
}

.datastudio .ptool-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.datastudio .ptool-tab {
  justify-content: center;
  flex: 1 1 auto;
}

.datastudio-controls {
  align-items: stretch;
}

.datastudio-controls[hidden] {
  display: none !important;
}

.datastudio .ptool-setting {
  min-height: 34px;
}

.datastudio-controls[data-controls="diff"] {
  align-items: center;
  gap: 0.6rem;
}

.datastudio-controls[data-controls="diff"] .ptool-toggle {
  min-height: 36px;
  padding: 0.32rem 0.58rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 700;
}

.datastudio-controls[data-controls="diff"] .ptool-chip {
  min-height: 36px;
  border-radius: 999px;
}

.datastudio-diff-input-action {
  display: none;
}

.datastudio-panes.is-diff .datastudio-diff-input-action {
  display: inline-flex;
}

.datastudio-input-ribbon {
  margin-bottom: -0.1rem;
  border-color: color-mix(in srgb, var(--border-hover) 50%, var(--border));
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-muted) 72%, var(--surface)));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.datastudio-result-ribbon {
  margin-top: 0.15rem;
  margin-bottom: -0.1rem;
  border-color: color-mix(in srgb, var(--border-hover) 54%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 74%, var(--surface)), var(--surface));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.datastudio-panes {
  position: relative;
  grid-template-columns: minmax(260px, 1fr) 12px minmax(260px, 1fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.datastudio.is-loading:not(.has-loading-overlay) .datastudio-panes::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(47, 91, 234, 0.08) 42%, rgba(3, 155, 154, 0.08) 50%, transparent 68%);
  transform: translateX(-115%);
  animation: mockmint-panel-sweep 1.05s ease-in-out infinite;
}

.datastudio-source-pane {
  grid-column: 1;
}

.datastudio-splitter {
  grid-column: 2;
}

.datastudio-compare-pane,
.datastudio-output-pane {
  grid-column: 3;
}

.datastudio-panes.is-diff .datastudio-output-pane {
  display: none;
}

.datastudio-panes.is-resizing .datastudio-splitter::before {
  width: 6px;
  background: #1a73e8;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.datastudio-panes.is-source-full,
.datastudio-panes.is-output-full {
  grid-template-columns: 1fr;
}

.datastudio-panes.is-source-full .datastudio-compare-pane,
.datastudio-panes.is-source-full .datastudio-output-pane,
.datastudio-panes.is-source-full .datastudio-splitter,
.datastudio-panes.is-output-full .datastudio-source-pane,
.datastudio-panes.is-output-full .datastudio-compare-pane,
.datastudio-panes.is-output-full .datastudio-splitter {
  display: none !important;
}

.datastudio-panes.is-source-full .datastudio-source-pane,
.datastudio-panes.is-output-full .datastudio-output-pane {
  grid-column: 1;
}

.datastudio-assist {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 78%, var(--surface)), var(--surface));
}

.datastudio-assist-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.datastudio-detect-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.1);
  border: 1px solid rgba(26, 115, 232, 0.2);
  color: #174ea6;
  font-size: 0.78rem;
  font-weight: 800;
}

.datastudio-detect-pill[data-kind="csv"] {
  background: rgba(24, 128, 56, 0.1);
  border-color: rgba(24, 128, 56, 0.22);
  color: #137333;
}

.datastudio-detect-pill[data-kind="xml"] {
  background: rgba(249, 171, 0, 0.12);
  border-color: rgba(249, 171, 0, 0.28);
  color: #a16207;
}

.datastudio-hint {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.datastudio-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.datastudio-quick-actions button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.datastudio-quick-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(26, 115, 232, 0.45);
  background: rgba(26, 115, 232, 0.06);
}

.datastudio-panes .ptool-pane {
  min-height: 430px;
}

.datastudio-panes.is-diff {
  grid-template-columns: minmax(420px, 1fr) 12px minmax(420px, 1fr);
}

.datastudio-panes.is-diff .ptool-pane {
  min-height: clamp(480px, 56vh, 720px);
}

.datastudio-panes .ptool-editor pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.datastudio-highlight-editor {
  overflow: hidden;
}

.datastudio-highlight-editor .datastudio-input-highlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: auto;
  padding: 1rem 1.1rem;
  background: transparent;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
  scrollbar-width: none;
}

.datastudio-highlight-editor .datastudio-input-highlight::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.datastudio-highlight-editor textarea {
  position: relative;
  z-index: 2;
  padding-left: 3.9rem;
  color: transparent;
  caret-color: var(--text);
  -webkit-text-fill-color: transparent;
}

.datastudio-highlight-editor.is-editing .datastudio-input-highlight {
  opacity: 0;
}

.datastudio-highlight-editor.is-editing textarea {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 82%, var(--surface)) 0 3.1rem, transparent 3.1rem),
    var(--surface);
}

.datastudio-highlight-editor textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  -webkit-text-fill-color: var(--text-muted);
}

.datastudio-highlight-editor textarea::selection {
  background: rgba(26, 115, 232, 0.18);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.datastudio-highlight-editor.is-editing textarea::selection {
  background: rgba(26, 115, 232, 0.22);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.datastudio-highlight-editor:focus-within {
  box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.datastudio-highlight-editor.has-diff-active {
  box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.16);
}

.datastudio-output-pane {
  border-color: color-mix(in srgb, var(--border-hover) 58%, var(--border));
  background: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
}

.datastudio-output-pane .ptool-pane-header {
  background: color-mix(in srgb, var(--surface-muted) 88%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--border-hover) 55%, var(--border));
}

.datastudio-output-pane .ptool-editor {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface-muted) 92%, var(--surface)),
      color-mix(in srgb, var(--surface-muted) 82%, var(--surface))
    );
}

.datastudio-output-pane .ptool-editor pre {
  cursor: default;
  user-select: text;
}

.datastudio-output-editor {
  min-height: 0;
}

.datastudio-output-tree {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.datastudio-output-tree .datastudio-json-tree-shell {
  height: 100%;
  min-height: 100%;
  max-height: none;
}

.datastudio-output-tree .datastudio-json-tree {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface-muted) 92%, var(--surface)),
      color-mix(in srgb, var(--surface-muted) 82%, var(--surface))
    );
}

.datastudio-panes .ptool-editor pre.has-syntax {
  padding: 0;
  white-space: pre;
  word-break: normal;
  overflow: auto;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 82%, var(--surface)) 0 3.1rem, transparent 3.1rem),
    var(--surface);
}

.datastudio-output-pane .ptool-editor pre.has-syntax {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 86%, var(--surface)) 0 3.1rem, transparent 3.1rem),
    color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
}

.datastudio-panes .datastudio-highlight-editor .datastudio-input-highlight.has-syntax {
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 82%, var(--surface)) 0 3.1rem, transparent 3.1rem),
    var(--surface);
}

.datastudio-highlight-editor .datastudio-input-highlight::before {
  content: none;
  display: none;
}

.datastudio-highlight-editor .datastudio-code-line {
  min-height: 1.6em;
}

.datastudio-highlight-editor .datastudio-code-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.datastudio-panes .ptool-editor pre::before {
  content: attr(data-language);
  position: sticky;
  top: 0;
  right: 0;
  float: right;
  margin: 0.55rem 0.65rem 0 0;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.1);
  color: #174ea6;
  font-size: 0.66rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  z-index: 2;
}

.datastudio-panes .datastudio-highlight-editor .datastudio-input-highlight::before {
  content: none;
  display: none;
}

.datastudio-code-line {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  min-height: 1.52em;
}

.datastudio-line-number {
  padding: 0 0.75rem 0 0.35rem;
  color: var(--text-muted);
  opacity: 0.68;
  text-align: right;
  user-select: none;
  border-right: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.datastudio-line-number::before {
  content: attr(data-line);
}

.datastudio-code-text {
  padding: 0 0.8rem;
  min-width: 0;
}

.datastudio-input-highlight .datastudio-code-line.is-diff-active {
  background: rgba(26, 115, 232, 0.1);
  box-shadow: inset 4px 0 0 #1a73e8, inset 0 1px 0 rgba(26, 115, 232, 0.14), inset 0 -1px 0 rgba(26, 115, 232, 0.14);
}

.datastudio-input-highlight .datastudio-code-line.is-diff-active.is-right {
  background: rgba(24, 128, 56, 0.11);
  box-shadow: inset 4px 0 0 #188038, inset 0 1px 0 rgba(24, 128, 56, 0.14), inset 0 -1px 0 rgba(24, 128, 56, 0.14);
}

.datastudio-token-key { color: #174ea6; font-weight: 650; }
.datastudio-token-string { color: #0b8043; }
.datastudio-token-number { color: #b06000; }
.datastudio-token-literal { color: #9334e6; font-weight: 650; }
.datastudio-token-punct { color: #5f6368; }
.datastudio-token-tag { color: #1a73e8; font-weight: 650; }
.datastudio-token-attr { color: #a142f4; }
.datastudio-token-comment { color: #6b7280; font-style: italic; }
.datastudio-token-added { color: #047857; }
.datastudio-token-removed { color: #b91c1c; }
.datastudio-token-changed { color: #a16207; }

:root[data-theme="dark"] .datastudio-detect-pill {
  color: #8ab4f8;
}

:root[data-theme="dark"] .datastudio-detect-pill[data-kind="csv"] {
  color: #81c995;
}

:root[data-theme="dark"] .datastudio-detect-pill[data-kind="xml"] {
  color: #fdd663;
}

:root[data-theme="dark"] .datastudio-output-pane {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

:root[data-theme="dark"] .datastudio-output-pane .ptool-pane-header {
  background: color-mix(in srgb, var(--surface-muted) 74%, #000 26%);
}

:root[data-theme="dark"] .datastudio-output-pane .ptool-editor {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface-muted) 72%, #000 28%),
      color-mix(in srgb, var(--surface-muted) 64%, #000 36%)
    );
}

:root[data-theme="dark"] .datastudio-output-pane .ptool-editor pre.has-syntax {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 72%, #000 28%) 0 3.1rem, transparent 3.1rem),
    color-mix(in srgb, var(--surface-muted) 64%, #000 36%);
}

:root[data-theme="dark"] .datastudio-token-key { color: #8ab4f8; }
:root[data-theme="dark"] .datastudio-token-string { color: #81c995; }
:root[data-theme="dark"] .datastudio-token-number { color: #fdd663; }
:root[data-theme="dark"] .datastudio-token-literal { color: #c58af9; }
:root[data-theme="dark"] .datastudio-token-punct { color: #bdc1c6; }
:root[data-theme="dark"] .datastudio-token-tag { color: #8ab4f8; }
:root[data-theme="dark"] .datastudio-token-attr { color: #c58af9; }
:root[data-theme="dark"] .datastudio-token-comment { color: #9aa0a6; }
:root[data-theme="dark"] .datastudio-token-added { color: #34d399; }
:root[data-theme="dark"] .datastudio-token-removed { color: #fca5a5; }
:root[data-theme="dark"] .datastudio-token-changed { color: #fcd34d; }

.datastudio-kpis {
  padding-top: 0.1rem;
}

.datastudio-detail-grid {
  grid-template-columns: minmax(220px, 0.8fr) minmax(250px, 0.9fr) minmax(300px, 1.3fr);
}

.datastudio-note {
  padding: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  font-size: 0.9rem;
}

.datastudio-table-scroll {
  overflow: auto;
  max-height: 360px;
}

.datastudio-json-tree-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 360px;
  max-height: 540px;
  overflow: hidden;
}

.datastudio-json-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 62%, var(--surface));
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.datastudio-json-tree-toolbar div {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.datastudio-json-tree-toolbar button {
  min-height: 28px;
  padding: 0.26rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.datastudio-json-tree-toolbar button:hover {
  border-color: rgba(26, 115, 232, 0.42);
  background: rgba(26, 115, 232, 0.07);
}

.datastudio-json-tree {
  min-height: 0;
  padding: 0.65rem 0.75rem 0.85rem;
  overflow: auto;
  background: color-mix(in srgb, var(--surface-muted) 42%, var(--surface));
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.datastudio-json-tree.is-code {
  padding: 0.65rem 0 0.85rem;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 82%, var(--surface)) 0 0.7rem, transparent 0.7rem),
    color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
  font-size: 0.86rem;
  line-height: 1.6;
}

.datastudio-json-code-node {
  margin: 0;
}

.datastudio-json-code-node > summary {
  position: relative;
  display: block;
  min-height: 1.6em;
  padding: 0.05rem 0.8rem 0.05rem calc(1.25rem + (var(--tree-depth, 0) * 1.25rem));
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.datastudio-json-code-node > summary::before {
  content: "›";
  position: absolute;
  left: calc(0.48rem + (var(--tree-depth, 0) * 1.25rem));
  top: 0.07rem;
  color: var(--text-muted);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  transition: transform 140ms ease;
}

.datastudio-json-code-node[open] > summary::before {
  transform: rotate(90deg);
}

.datastudio-json-code-node > summary::-webkit-details-marker {
  display: none;
}

.datastudio-json-code-node > summary:hover,
.datastudio-json-code-line:hover {
  background: rgba(26, 115, 232, 0.06);
}

.datastudio-json-code-node[open] > summary .datastudio-json-code-closed {
  display: none;
}

.datastudio-json-code-line,
.datastudio-json-code-line-inline {
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.datastudio-json-code-line {
  display: block;
  min-height: 1.6em;
  padding: 0.05rem 0.8rem 0.05rem calc(1.25rem + (var(--tree-depth, 0) * 1.25rem));
  border-radius: 6px;
  color: var(--text);
}

.datastudio-json-code-key {
  color: #174ea6;
  font-weight: 700;
}

.datastudio-json-code-string {
  color: #0b8043;
}

.datastudio-json-code-number {
  color: #b06000;
}

.datastudio-json-code-literal {
  color: #9334e6;
  font-weight: 700;
}

.datastudio-json-code-punct {
  color: #5f6368;
}

.datastudio-json-code-preview {
  color: var(--text-muted);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 750;
}

.datastudio-json-node,
.datastudio-json-leaf,
.datastudio-json-empty,
.datastudio-json-tree-limit {
  margin-left: calc(var(--tree-depth, 0) * 0.8rem);
}

.datastudio-json-node {
  margin-block: 0.2rem;
}

.datastudio-json-node summary,
.datastudio-json-leaf {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
  color: var(--text);
}

.datastudio-json-node summary {
  cursor: pointer;
  list-style-position: outside;
}

.datastudio-json-node summary:hover,
.datastudio-json-leaf:hover {
  background: rgba(26, 115, 232, 0.06);
}

.datastudio-json-node summary::-webkit-details-marker {
  color: var(--text-muted);
}

.datastudio-json-children {
  border-left: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  margin-left: 0.5rem;
  padding-left: 0.15rem;
}

.datastudio-json-key {
  min-width: 0;
  color: #174ea6;
  font-weight: 750;
  word-break: break-word;
}

.datastudio-json-type,
.datastudio-json-count {
  flex: 0 0 auto;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.08);
  color: #1a73e8;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.datastudio-json-count {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.datastudio-json-node code,
.datastudio-json-leaf code {
  min-width: 0;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.datastudio-json-leaf.is-string code { color: #0b8043; }
.datastudio-json-leaf.is-number code { color: #b06000; }
.datastudio-json-leaf.is-boolean code,
.datastudio-json-leaf.is-null code { color: #9334e6; }

.datastudio-json-empty,
.datastudio-json-tree-limit {
  padding: 0.35rem 0.5rem;
  color: var(--text-muted);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.78rem;
}

:root[data-theme="dark"] .datastudio-json-key {
  color: #8ab4f8;
}

:root[data-theme="dark"] .datastudio-json-leaf.is-string code { color: #81c995; }
:root[data-theme="dark"] .datastudio-json-leaf.is-number code { color: #fdd663; }
:root[data-theme="dark"] .datastudio-json-leaf.is-boolean code,
:root[data-theme="dark"] .datastudio-json-leaf.is-null code { color: #c58af9; }

:root[data-theme="dark"] .datastudio-json-code-key { color: #8ab4f8; }
:root[data-theme="dark"] .datastudio-json-code-string { color: #81c995; }
:root[data-theme="dark"] .datastudio-json-code-number { color: #fdd663; }
:root[data-theme="dark"] .datastudio-json-code-literal { color: #c58af9; }
:root[data-theme="dark"] .datastudio-json-code-punct { color: #bdc1c6; }

.datastudio-diff-workspace {
  --datastudio-diff-panel-height: clamp(600px, 64vh, 760px);
  display: grid;
  gap: 0.85rem;
}

.datastudio-diff-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.65rem;
}

.datastudio-diff-metric {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.datastudio-diff-metric strong {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.datastudio-diff-metric.is-added {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.07);
}

.datastudio-diff-metric.is-removed {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.07);
}

.datastudio-diff-metric.is-changed {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.datastudio-diff-preview {
  height: var(--datastudio-diff-panel-height);
}

.datastudio-diff-preview .textops-table {
  min-width: 720px;
}

.datastudio-diff-preview,
.datastudio-diff-navigator {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.datastudio-diff-preview-body,
.datastudio-diff-navigator-body {
  min-height: 0;
  overflow: auto;
}

.datastudio-diff-preview-body .textops-table {
  margin: 0;
}

.datastudio-diff-preview-body .textops-diff {
  max-height: none;
}

.datastudio-diff-preview tbody tr,
.datastudio-diff .textops-diff-row {
  transition: background 160ms ease, box-shadow 160ms ease;
}

.datastudio-diff-preview [data-diff-index] {
  cursor: pointer;
}

.datastudio-diff-preview tbody tr.is-active,
.datastudio-diff .textops-diff-row.is-active {
  background: rgba(26, 115, 232, 0.095);
  box-shadow: inset 4px 0 0 #1a73e8, inset 0 1px 0 rgba(26, 115, 232, 0.12), inset 0 -1px 0 rgba(26, 115, 232, 0.12);
}

.datastudio-diff-side-head {
  display: inline-grid;
  gap: 0.12rem;
  line-height: 1.25;
}

.datastudio-diff-side-head span {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.datastudio-diff-side-value {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.datastudio-diff-side-value > span {
  width: fit-content;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.datastudio-diff-side-value.is-left > span {
  background: rgba(26, 115, 232, 0.08);
  color: #1a73e8;
}

.datastudio-diff-side-value.is-right > span {
  background: rgba(24, 128, 56, 0.09);
  color: #188038;
}

.datastudio-diff-side-value.is-missing > span {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.datastudio-diff-side-value code,
.datastudio-diff-side-value em {
  display: block;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.datastudio-diff-side-value code {
  color: var(--text);
}

.datastudio-diff-side-value em {
  color: var(--text-muted);
  font-style: normal;
}

.datastudio-diff-change-card .datastudio-diff-side-value code,
.datastudio-diff-change-card .datastudio-diff-side-value em {
  padding: 0.35rem 0.45rem;
  border-radius: 7px;
  background: var(--surface-muted);
}

.datastudio-diff-report {
  min-height: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-muted) 78%, var(--surface));
}

.datastudio-diff-report pre.has-syntax {
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow: auto;
  border-radius: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-muted) 86%, var(--surface)) 0 3.1rem, transparent 3.1rem),
    color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.datastudio-diff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 0.85rem;
  align-items: stretch;
}

.datastudio-diff-navigator {
  height: var(--datastudio-diff-panel-height);
}

.datastudio-diff-change-list {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  max-height: none;
  overflow: auto;
}

.datastudio-diff-change-card {
  display: grid;
  gap: 0.42rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.datastudio-diff-change-card.is-added { border-left-color: #10b981; }
.datastudio-diff-change-card.is-removed { border-left-color: #ef4444; }
.datastudio-diff-change-card.is-changed { border-left-color: #f59e0b; }

.datastudio-diff-change-card:hover,
.datastudio-diff-change-card:focus-visible {
  border-color: rgba(26, 115, 232, 0.38);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.datastudio-diff-change-card.is-active {
  border-color: rgba(26, 115, 232, 0.42);
  background: rgba(26, 115, 232, 0.055);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.11);
}

.datastudio-diff-change-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.datastudio-diff-change-card strong {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-word;
}

.datastudio-diff-change-card code {
  display: block;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.datastudio-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.datastudio-badge.is-added {
  color: #047857;
  background: rgba(16, 185, 129, 0.09);
  border-color: rgba(16, 185, 129, 0.24);
}

.datastudio-badge.is-removed {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.24);
}

.datastudio-badge.is-changed {
  color: #a16207;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.28);
}

:root[data-theme="dark"] .datastudio-badge.is-added {
  color: #34d399;
}

:root[data-theme="dark"] .datastudio-badge.is-removed {
  color: #fca5a5;
}

:root[data-theme="dark"] .datastudio-badge.is-changed {
  color: #fcd34d;
}

/* Number & Unit Lab */
.number-lab-page.container {
  --number-lab-max: 1680px;
  width: min(100% - 28px, var(--number-lab-max));
}

.number-lab-page.tool-page {
  gap: 1.15rem;
}

.number-lab-page > .tool-hero,
.number-lab-page > .tool-section,
.number-lab-page > .tool-workspace-brief,
.number-lab-page > .number-lab-app-card {
  width: 100%;
  max-width: var(--number-lab-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.number-lab-page .tool-hero-lead {
  max-width: 1040px;
}

.number-lab-page .tool-hero {
  padding: 1.2rem 0 0.1rem;
}

.number-lab-page .breadcrumbs {
  margin-bottom: 0.5rem;
}

.number-lab-page .tool-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
}

.number-lab-page .tool-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.number-lab-page .tool-hero-content h1 {
  margin: 0.7rem 0 0.45rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.number-lab-page .tool-hero-content .tool-hero-lead {
  margin: 0;
}

.number-lab-page .tool-hero-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  justify-self: end;
}

.number-lab-page .tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.number-lab-page .tool-intro p {
  margin: 0 0 0.8rem;
}

.number-lab-page .feature-grid,
.number-lab-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.number-lab-page .studio-seo-heading {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(260px, 0.46fr) minmax(360px, 0.54fr);
  gap: 1rem;
  align-items: end;
}

.number-lab-page .studio-seo-heading p {
  max-width: none;
}

.number-lab-page .tool-workspace-brief {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.number-lab-page .number-lab-app-card {
  padding: 0.75rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #e8f0fe), var(--surface) 48%),
    var(--surface);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 8px 24px rgba(60, 64, 67, 0.10);
}

.numberlab {
  gap: 0.7rem;
}

.numberlab .ptool-bar {
  min-height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 68%, var(--surface));
}

.numberlab-assist {
  grid-template-columns: minmax(260px, 0.78fr) minmax(360px, 1.22fr);
  align-items: center;
  gap: 0.7rem 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(26, 115, 232, 0.08), transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, #e8f0fe 42%, var(--surface)), var(--surface));
}

.numberlab-assist .datastudio-quick-actions {
  justify-content: flex-end;
}

.numberlab .ptool-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 82%, var(--surface));
}

.numberlab .ptool-tab {
  justify-content: center;
  flex: 1 1 auto;
  min-height: 38px;
  border-radius: 9px;
}

.numberlab-controls {
  align-items: stretch;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
}

.numberlab-controls[hidden] {
  display: none !important;
}

.numberlab .ptool-setting {
  min-height: 34px;
}

.numberlab .ptool-setting input,
.numberlab .ptool-setting select {
  min-width: 110px;
}

.numberlab .ptool-setting.numberlab-wide input {
  min-width: min(220px, 46vw);
}

.numberlab-panes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.numberlab-source-pane,
.numberlab-output-pane {
  grid-column: auto;
}

.numberlab-panes .ptool-pane {
  min-height: clamp(500px, 58vh, 690px);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.numberlab-source-editor,
.numberlab-output-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  overflow: auto;
}

.numberlab-source-editor {
  grid-template-rows: auto minmax(240px, 1fr);
}

.numberlab-source-editor textarea {
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-muted));
}

.numberlab-output-editor {
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-muted) 62%, var(--surface));
}

.numberlab-visual-output {
  min-height: 0;
  overflow: auto;
  padding-right: 0.1rem;
}

.numberlab-code-panel {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
  overflow: hidden;
}

.numberlab-code-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  background: color-mix(in srgb, var(--surface) 78%, var(--surface-muted));
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.numberlab-code-toggle:hover {
  background: color-mix(in srgb, #e8f0fe 42%, var(--surface));
}

.numberlab-code-toggle small {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.numberlab-code-panel pre {
  display: block;
  min-height: 136px;
  max-height: 260px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  white-space: pre-wrap;
  word-break: break-word;
}

.numberlab-output-editor.is-code-expanded {
  grid-template-rows: minmax(0, 1fr);
}

.numberlab-output-editor.is-code-expanded .numberlab-visual-output {
  display: none;
}

.numberlab-output-editor.is-code-expanded .numberlab-code-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.numberlab-output-editor.is-code-expanded .numberlab-code-panel pre {
  max-height: none;
  height: 100%;
  overflow: auto;
}

.numberlab-live-preview {
  display: grid;
  gap: 0.7rem;
}

.numberlab-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.55rem;
}

.numberlab-mini-card,
.numberlab-primary,
.numberlab-matrix-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.numberlab-mini-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 0.22rem;
  padding: 0.75rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, #e8f0fe), var(--surface));
}

.numberlab-mini-card:nth-child(3n+2) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, #e6f4ea), var(--surface));
}

.numberlab-mini-card:nth-child(3n+3) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, #fef7e0), var(--surface));
}

.numberlab-mini-card span,
.numberlab-primary span,
.numberlab-primary small,
.numberlab-mini-card small {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.numberlab-mini-card strong,
.numberlab-primary strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.numberlab-primary {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.12), transparent 42%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-muted) 70%, var(--surface)));
}

.numberlab-primary strong {
  font-size: clamp(1.25rem, 3.2vw, 2.15rem);
}

.numberlab-table {
  background: var(--surface);
}

.numberlab-table th {
  width: 180px;
}

.numberlab-table td:last-child {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.numberlab-matrix-card {
  overflow: auto;
  padding: 0.85rem;
}

.numberlab-matrix-card h4 {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.numberlab-matrix {
  border-collapse: collapse;
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.numberlab-matrix td {
  min-width: 70px;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--border);
  text-align: right;
  background: color-mix(in srgb, var(--surface-muted) 58%, var(--surface));
}

:root[data-theme="dark"] .numberlab-source-editor textarea,
:root[data-theme="dark"] .numberlab-code-panel,
:root[data-theme="dark"] .numberlab-output-editor {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

@media (max-width: 1100px) {
  .numberlab-assist {
    grid-template-columns: 1fr;
  }

  .numberlab-assist .datastudio-quick-actions {
    justify-content: flex-start;
  }

  .numberlab-panes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .number-lab-page.container {
    width: min(100% - 24px, 1180px);
  }

  .number-lab-page .tool-intro,
  .number-lab-page .studio-seo-heading,
  .number-lab-page .studio-howto,
  .number-lab-page .use-case-list,
  .number-lab-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .number-lab-page .number-lab-app-card {
    padding: 0.65rem;
  }

  .number-lab-page .tool-hero-content {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .number-lab-page .tool-hero-icon {
    justify-self: start;
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }

  .numberlab .ptool-tab {
    flex-basis: calc(50% - 0.25rem);
  }

  .numberlab-panes .ptool-pane {
    min-height: 340px;
  }
}

/* Color & CSS Studio */
.color-studio-page.container {
  --color-studio-max: 1680px;
  width: min(100% - 28px, var(--color-studio-max));
}

.color-studio-page.tool-page {
  gap: 1.15rem;
}

.color-studio-page > .tool-hero,
.color-studio-page > .tool-section,
.color-studio-page > .tool-workspace-brief,
.color-studio-page > .color-css-app-card {
  width: 100%;
  max-width: var(--color-studio-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.color-studio-page .tool-hero-lead {
  max-width: 1040px;
}

.color-studio-page .tool-hero {
  padding: 1.2rem 0 0.1rem;
}

.color-studio-page .breadcrumbs {
  margin-bottom: 0.5rem;
}

.color-studio-page .tool-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
}

.color-studio-page .tool-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.color-studio-page .tool-hero-content h1 {
  margin: 0.7rem 0 0.45rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.color-studio-page .tool-hero-content .tool-hero-lead {
  margin: 0;
}

.color-studio-page .tool-hero-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  justify-self: end;
}

.color-studio-page .tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.color-studio-page .tool-intro p {
  margin: 0 0 0.8rem;
}

.color-studio-page .feature-grid,
.color-studio-page .seo-intent-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.color-studio-page .studio-seo-heading {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(360px, 0.52fr);
  gap: 1rem;
  align-items: end;
}

.color-studio-page .studio-seo-heading p {
  max-width: none;
}

.color-studio-page .tool-workspace-brief {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.color-studio-page .color-css-app-card {
  padding: 0.75rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #e8f0fe), var(--surface) 46%),
    var(--surface);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 8px 24px rgba(60, 64, 67, 0.10);
}

.colorstudio {
  gap: 0.7rem;
}

.colorstudio .ptool-bar {
  min-height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 68%, var(--surface));
}

.colorstudio-assist {
  grid-template-columns: minmax(260px, 0.78fr) minmax(360px, 1.22fr);
  align-items: center;
  gap: 0.7rem 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #e8f0fe 48%, var(--surface)), var(--surface));
}

.colorstudio-assist .datastudio-quick-actions {
  justify-content: flex-end;
}

.colorstudio .ptool-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 82%, var(--surface));
}

.colorstudio .ptool-tab {
  justify-content: center;
  flex: 1 1 auto;
  min-height: 38px;
  border-radius: 9px;
  border: 0;
  background: transparent;
}

.colorstudio .ptool-tab.is-active {
  color: #fff;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 92%, #0f172a 8%),
      color-mix(in srgb, var(--brand) 72%, var(--brand-2) 28%));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 16%, transparent);
}

.colorstudio-controls {
  align-items: center;
  gap: 0.7rem;
  padding: 0.76rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 38%),
    var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.colorstudio-controls[hidden] {
  display: none !important;
}

.colorstudio .ptool-setting {
  min-height: 34px;
}

.colorstudio-color-control {
  align-items: stretch !important;
  gap: 0.4rem !important;
  min-width: min(240px, 100%);
  min-height: 58px !important;
  padding: 0.5rem 0.58rem;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--brand) 28%);
  border-radius: 13px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--picker-color) 16%, transparent), transparent 46%),
    color-mix(in srgb, var(--surface-muted) 50%, var(--surface));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.colorstudio-color-control.is-compact {
  min-width: 190px;
}

.colorstudio-color-control > span:first-child {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 820;
}

.colorstudio-picker-shell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.colorstudio-color-control.is-compact .colorstudio-picker-shell {
  grid-template-columns: 50px minmax(0, 1fr);
}

.colorstudio .ptool-settings .colorstudio-color-control input[type="color"] {
  width: 58px;
  min-width: 58px;
  height: 38px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 70%, var(--picker-color) 30%);
  border-radius: 11px;
  background: var(--picker-color);
  box-shadow:
    inset 0 0 0 3px var(--surface),
    0 5px 14px color-mix(in srgb, var(--picker-color) 22%, transparent);
  cursor: pointer;
}

.colorstudio .ptool-settings .colorstudio-color-control.is-compact input[type="color"] {
  width: 50px;
  min-width: 50px;
}

.colorstudio .ptool-settings input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.colorstudio .ptool-settings input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.colorstudio .ptool-settings input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}

.colorstudio-picker-shell strong {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.colorstudio .ptool-settings input[type="range"] {
  width: min(180px, 48vw);
  accent-color: #1a73e8;
}

.colorstudio-panes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.colorstudio-source-pane,
.colorstudio-output-pane {
  grid-column: auto;
}

.colorstudio-panes .ptool-pane {
  min-height: clamp(500px, 58vh, 690px);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.colorstudio-source-editor,
.colorstudio-output-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  overflow: auto;
}

.colorstudio-source-editor {
  grid-template-rows: auto minmax(240px, 1fr);
}

.colorstudio-output-editor {
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-muted) 62%, var(--surface));
}

.colorstudio-visual-output {
  min-height: 0;
  overflow: auto;
  padding-right: 0.1rem;
}

.colorstudio-source-editor textarea {
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-muted));
}

.colorstudio-output-editor pre {
  min-height: 136px;
  max-height: 260px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
  white-space: pre-wrap;
  word-break: break-word;
}

.colorstudio-code-panel {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
  overflow: hidden;
}

.colorstudio-code-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  background: color-mix(in srgb, var(--surface) 78%, var(--surface-muted));
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.colorstudio-code-toggle:hover {
  background: color-mix(in srgb, #e8f0fe 42%, var(--surface));
}

.colorstudio-code-toggle small {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.colorstudio-code-panel pre {
  display: block;
  min-height: 0;
  max-height: none;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.colorstudio-output-editor.is-code-expanded {
  grid-template-rows: minmax(0, 1fr);
}

.colorstudio-output-editor.is-code-expanded .colorstudio-visual-output {
  display: none;
}

.colorstudio-output-editor.is-code-expanded .colorstudio-code-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.colorstudio-output-editor.is-code-expanded .colorstudio-code-panel pre {
  height: 100%;
  overflow: auto;
}

.colorstudio-live-preview {
  display: grid;
  gap: 0.7rem;
}

.colorstudio-hero-swatch,
.colorstudio-gradient-preview,
.colorstudio-contrast-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 150px;
  overflow: hidden;
}

.colorstudio-hero-swatch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--swatch) 86%, #fff), var(--swatch)),
    var(--swatch);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.colorstudio-hero-swatch span,
.colorstudio-mini-note {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text-muted);
}

.colorstudio-hero-swatch strong {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  line-height: 1.1;
}

.colorstudio-preview-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.colorstudio-gradient-preview {
  min-height: 180px;
}

.colorstudio-gradient-preview.is-output {
  min-height: 220px;
  margin-bottom: 0.85rem;
}

.colorstudio-palette-hero {
  display: grid;
  align-content: end;
  gap: 0.18rem;
  min-height: 152px;
  margin-bottom: 0.8rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--palette-base) 36%, var(--border));
  border-radius: 14px;
  background:
    radial-gradient(circle at 14% 18%, color-mix(in srgb, #fff 32%, transparent), transparent 30%),
    linear-gradient(135deg, color-mix(in srgb, var(--palette-base) 82%, #fff 18%), var(--palette-base));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 28px color-mix(in srgb, var(--palette-base) 16%, transparent);
}

.colorstudio-palette-hero span,
.colorstudio-palette-hero small,
.colorstudio-palette-section h3 {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 840;
  letter-spacing: 0;
  opacity: 0.84;
}

.colorstudio-palette-hero strong {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.08;
}

.colorstudio-palette-section {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.colorstudio-palette-section h3 {
  color: var(--text-muted);
  text-transform: uppercase;
}

.colorstudio-code-preview {
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-muted) 84%, var(--surface));
}

.colorstudio-code-preview pre {
  margin: 0;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.colorstudio-contrast-preview {
  display: grid;
  align-content: center;
  gap: 0.4rem;
  padding: 1.2rem;
  line-height: 1.45;
}

.colorstudio-contrast-preview strong {
  display: block;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0;
}

.colorstudio-contrast-preview span {
  display: block;
  overflow-wrap: anywhere;
}

.colorstudio-format-grid,
.colorstudio-swatch-grid,
.colorstudio-pass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.colorstudio-swatch-grid.is-compact {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.colorstudio-format,
.colorstudio-swatch,
.colorstudio-pass-grid span {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0.72rem 0.78rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
  min-width: 0;
}

.colorstudio-format:hover,
.colorstudio-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(26, 115, 232, 0.42);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.colorstudio-format[data-copied="true"],
.colorstudio-swatch[data-copied="true"] {
  border-color: rgba(24, 128, 56, 0.45);
  box-shadow: 0 0 0 3px rgba(24, 128, 56, 0.12);
}

.colorstudio-format span,
.colorstudio-swatch span,
.colorstudio-swatch small {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0.78;
}

.colorstudio-format strong,
.colorstudio-swatch strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.colorstudio-swatch {
  min-height: 92px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--swatch) 88%, #fff 12%), var(--swatch));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.colorstudio-pass-grid span {
  cursor: default;
  text-align: center;
  font-weight: 850;
}

.colorstudio-pass-grid .is-pass {
  border-color: rgba(24, 128, 56, 0.28);
  color: #137333;
  background: rgba(24, 128, 56, 0.08);
}

.colorstudio-pass-grid .is-fail {
  border-color: rgba(217, 48, 37, 0.28);
  color: #a50e0e;
  background: rgba(217, 48, 37, 0.08);
}

.colorstudio-unit-scale {
  display: flex;
  align-items: end;
  gap: 0.45rem;
  min-height: 150px;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
}

.colorstudio-unit-scale span {
  flex: 1;
  min-width: 18px;
  max-width: 54px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #1a73e8, #34a853);
}

.colorstudio-unit-table {
  margin-bottom: 0.85rem;
}

:root[data-theme="dark"] .colorstudio-output-editor pre,
:root[data-theme="dark"] .colorstudio-source-editor textarea {
  background: color-mix(in srgb, var(--surface-muted) 72%, #000 28%);
}

:root[data-theme="dark"] .colorstudio .ptool-tab.is-active {
  color: #eaf2ff;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 28%, var(--surface-elevated)),
      color-mix(in srgb, var(--brand) 16%, var(--surface-muted)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.20);
}

:root[data-theme="dark"] .colorstudio-controls,
:root[data-theme="dark"] .colorstudio-color-control,
:root[data-theme="dark"] .colorstudio-code-preview {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-muted) 74%, #000 26%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .colorstudio-pass-grid .is-pass {
  color: #81c995;
  background: rgba(129, 201, 149, 0.12);
}

:root[data-theme="dark"] .colorstudio-pass-grid .is-fail {
  color: #f28b82;
  background: rgba(242, 139, 130, 0.12);
}

@media (max-width: 1100px) {
  .colorstudio-assist {
    grid-template-columns: 1fr;
  }

  .colorstudio-assist .datastudio-quick-actions {
    justify-content: flex-start;
  }

  .colorstudio-panes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .color-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .color-studio-page .tool-intro,
  .color-studio-page .studio-seo-heading,
  .color-studio-page .studio-howto,
  .color-studio-page .use-case-list,
  .color-studio-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .color-studio-page .color-css-app-card {
    padding: 0.65rem;
  }

  .color-studio-page .tool-hero-content {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .color-studio-page .tool-hero-icon {
    justify-self: start;
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }

  .colorstudio .ptool-bar,
  .colorstudio-assist,
  .colorstudio-controls {
    border-radius: 11px;
  }

  .colorstudio .ptool-tab {
    flex-basis: calc(50% - 0.25rem);
  }

  .colorstudio-panes .ptool-pane {
    min-height: 340px;
  }

  .colorstudio-preview-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .datastudio-detail-grid {
    grid-template-columns: 1fr;
  }

  .datastudio-diff-summary-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .datastudio-diff-layout {
    grid-template-columns: 1fr;
  }

  .datastudio-diff-workspace {
    --datastudio-diff-panel-height: min(620px, 72vh);
  }
}

@media (max-width: 820px) {
  .text-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .text-studio-page .tool-intro,
  .text-studio-page .textops-howto,
  .text-studio-page .use-case-list,
  .text-studio-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .text-studio-page .text-studio-app-card {
    padding: 0.75rem;
  }

  .data-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .data-studio-page .tool-intro,
  .data-studio-page .studio-howto,
  .data-studio-page .use-case-list,
  .data-studio-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .data-studio-page .data-studio-app-card {
    padding: 0.75rem;
  }

  .seo-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .seo-studio-page .tool-intro,
  .seo-studio-page .studio-howto,
  .seo-studio-page .use-case-list,
  .seo-studio-page .examples-grid {
    grid-template-columns: 1fr;
  }

  .seo-studio-page .seo-web-app-card {
    padding: 0.75rem;
  }

  .datastudio-panes,
  .datastudio-panes.is-diff {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }

  .datastudio-source-pane,
  .datastudio-compare-pane,
  .datastudio-output-pane,
  .datastudio-panes.is-diff .datastudio-output-pane {
    grid-column: 1;
  }

  .datastudio-panes.is-source-full .datastudio-output-pane,
  .datastudio-panes.is-output-full .datastudio-source-pane,
  .datastudio-panes.is-output-full .datastudio-compare-pane {
    display: flex;
  }

  .datastudio-panes.is-diff .datastudio-output-pane {
    display: none;
  }

  .datastudio-splitter,
  .datastudio-source-pane [data-action="expand-source"],
  .datastudio-output-pane [data-action="expand-output"] {
    display: none;
  }
}

@media (max-width: 640px) {
  .datastudio .ptool-tab {
    flex-basis: calc(50% - 2px);
  }

  .datastudio-diff-summary-grid {
    grid-template-columns: 1fr;
  }

  .datastudio-panes .ptool-pane {
    min-height: 340px;
  }
}

/* HTTP Status — color bands by status range */
.http-band-1 { --band: #6b7280; }
.http-band-2 { --band: #059669; }
.http-band-3 { --band: #d97706; }
.http-band-4 { --band: #dc2626; }
.http-band-5 { --band: #b91c1c; }

.http-status-card {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-left: 4px solid var(--band, #1a73e8);
}

.http-status-code {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--band, #1a73e8);
}

.http-status-meta { flex: 1; }
.http-status-meta h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.http-status-meta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

@media print {
  .site-header,
  .footer,
  .footer-enhanced,
  .btn,
  .toolbar,
  [data-theme-toggle] {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .output {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* Tool pages use a consistent 95% workspace without changing non-tool pages. */
.tool-page.container {
  width: min(1760px, 95%);
  max-width: 1760px;
}

.tool-page > .tool-hero,
.tool-page > .tool-app,
.tool-page > .tool-section,
.tool-page > .tool-workspace-brief {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Git Studio */
.git-studio-page.container {
  width: min(1760px, 95%);
  max-width: 1760px;
}

.git-studio-breadcrumb {
  margin: 1.1rem 0 0.75rem;
}

.git-studio-app-card {
  padding: 0.75rem;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.10), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, #0f172a 10%), color-mix(in srgb, var(--surface-muted) 88%, #020617 12%));
  border-color: color-mix(in srgb, var(--border) 78%, #22c55e 22%);
}

.gitstudio {
  --git-accent: #22c55e;
  --git-blue: #60a5fa;
  --git-warn: #f59e0b;
  --git-danger: #ef4444;
  gap: 0.7rem;
}

.gitstudio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--border) 78%, var(--git-accent) 22%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, rgba(34, 197, 94, 0.08));
}

.gitstudio-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.gitstudio-title h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: 0;
}

.gitstudio-title p {
  margin: 0.12rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.gitstudio-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  color: #052e16;
  background: linear-gradient(135deg, #86efac, #60a5fa);
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.18);
}

.gitstudio-suggest {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 82%, transparent);
}

.gitstudio-suggest label {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

.gitstudio-suggest label span,
.gitstudio-form label span,
.gitstudio-checks legend,
.gitstudio-techs legend {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}

.gitstudio-form input,
.gitstudio-form select,
.gitstudio-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, #000 8%);
  font: inherit;
  font-size: 0.88rem;
}

.gitstudio-form textarea {
  min-height: 96px;
  resize: vertical;
}

.gitstudio-form input:focus,
.gitstudio-form select:focus,
.gitstudio-form textarea:focus {
  border-color: color-mix(in srgb, var(--git-blue) 72%, var(--border));
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.13);
}

.gitstudio-suggest-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.gitstudio-suggest-list > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.gitstudio-suggest-chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--git-blue) 28%);
  border-radius: 999px;
  padding: 0.42rem 0.6rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 86%, rgba(96, 165, 250, 0.10));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.gitstudio-suggest-chip:hover {
  border-color: var(--git-blue);
  transform: translateY(-1px);
}

.gitstudio-tabs {
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.08rem;
}

.gitstudio-tabs .ptool-tab {
  flex: 0 0 auto;
  min-width: 122px;
  padding: 0.56rem 0.7rem;
  border-radius: 9px;
}

.gitstudio-tabs .ptool-tab.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--brand) 78%, var(--border));
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 92%, #0f172a 8%),
      color-mix(in srgb, var(--brand) 74%, var(--brand-2) 26%));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 18%, transparent);
}

.gitstudio-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 0.75rem;
}

.gitstudio-workspace.is-expanded {
  grid-template-columns: minmax(0, 1fr);
}

.gitstudio-workspace.is-expanded .gitstudio-input-pane {
  display: none;
}

.gitstudio-workspace.is-expanded .gitstudio-output-pane {
  grid-column: 1 / -1;
}

.gitstudio-input-pane,
.gitstudio-output-pane {
  min-height: 520px;
  border-radius: 12px;
}

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

.gitstudio-form label {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

.gitstudio-form .is-wide,
.gitstudio-checks,
.gitstudio-techs {
  grid-column: 1 / -1;
}

.gitstudio-toggle {
  align-self: end;
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.45rem !important;
  min-height: 36px;
  padding: 0.52rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, rgba(34, 197, 94, 0.08));
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.gitstudio-toggle input,
.gitstudio-checks input,
.gitstudio-techs input {
  flex: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--git-accent);
}

.gitstudio-checks,
.gitstudio-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.gitstudio-checks label,
.gitstudio-techs label {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin: 0;
  padding: 0.34rem 0.48rem;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-muted) 76%, transparent);
  font-size: 0.78rem;
}

.gitstudio-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 0.75rem 0.75rem;
}

.gitstudio-output-body {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  gap: 0.65rem;
  flex: 1;
  padding: 0.75rem;
  min-height: 0;
}

.gitstudio-risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.gitstudio-risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #047857;
  background: rgba(34, 197, 94, 0.10);
  font-size: 0.74rem;
  font-weight: 800;
}

.gitstudio-risk.is-medium {
  border-color: rgba(245, 158, 11, 0.38);
  color: #b45309;
  background: rgba(245, 158, 11, 0.10);
}

.gitstudio-risk.is-danger {
  border-color: rgba(239, 68, 68, 0.42);
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.10);
}

.gitstudio-output-body pre {
  overflow: auto;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #60a5fa 22%);
  border-radius: 10px;
  color: #f8fafc;
  background: color-mix(in srgb, #020617 88%, var(--surface) 12%);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.gitstudio-explain,
.gitstudio-warning {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.gitstudio-explain strong,
.gitstudio-warning strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 0.82rem;
}

.gitstudio-explain p,
.gitstudio-warning p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.gitstudio-explain p + p {
  margin-top: 0.35rem;
}

.gitstudio-warning {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.08);
}

.gitstudio-warning strong,
.gitstudio-warning p {
  color: #b91c1c;
}

:root[data-theme="dark"] .git-studio-app-card {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.10), transparent 26%),
    linear-gradient(135deg, #07111f, #0f172a 54%, #111827);
}

:root[data-theme="dark"] .gitstudio-head,
:root[data-theme="dark"] .gitstudio-suggest,
:root[data-theme="dark"] .gitstudio-input-pane,
:root[data-theme="dark"] .gitstudio-output-pane {
  background: rgba(15, 23, 42, 0.84);
}

:root[data-theme="dark"] .gitstudio-form input,
:root[data-theme="dark"] .gitstudio-form select,
:root[data-theme="dark"] .gitstudio-form textarea {
  background: #08111f;
}

:root[data-theme="dark"] .gitstudio-tabs .ptool-tab.is-active {
  color: #eaf2ff;
  border-color: color-mix(in srgb, var(--brand) 54%, var(--border));
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 26%, var(--surface-elevated)),
      color-mix(in srgb, var(--brand) 16%, var(--surface-muted)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.20);
}

:root[data-theme="dark"] .gitstudio-risk {
  color: #86efac;
}

:root[data-theme="dark"] .gitstudio-risk.is-medium {
  color: #fcd34d;
}

:root[data-theme="dark"] .gitstudio-risk.is-danger,
:root[data-theme="dark"] .gitstudio-warning strong,
:root[data-theme="dark"] .gitstudio-warning p {
  color: #fca5a5;
}

@media (max-width: 1020px) {
  .gitstudio-head,
  .gitstudio-suggest,
  .gitstudio-workspace {
    grid-template-columns: 1fr;
  }

  .gitstudio-head {
    align-items: stretch;
    flex-direction: column;
  }

  .gitstudio .ptool-bar-actions {
    justify-content: flex-start;
  }

  .gitstudio-workspace.is-expanded {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .git-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .git-studio-app-card {
    padding: 0.55rem;
  }

  .gitstudio-title {
    align-items: flex-start;
  }

  .gitstudio-mark {
    width: 34px;
    height: 34px;
  }

  .gitstudio-tabs .ptool-tab {
    min-width: calc(50% - 0.25rem);
    font-size: 0.78rem;
  }

  .gitstudio-form {
    grid-template-columns: 1fr;
  }

  .gitstudio-input-pane,
  .gitstudio-output-pane {
    min-height: 420px;
  }

  .gitstudio-output-body {
    grid-template-rows: auto minmax(180px, 1fr) auto auto;
  }
}

/* DevOps Studio */
.devops-studio-page.container {
  width: min(1760px, 95%);
  max-width: 1760px;
}

.devops-studio-breadcrumb {
  margin: 1.1rem 0 0.75rem;
}

.devops-studio-app-card {
  padding: 0.75rem;
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.10), transparent 28%),
    linear-gradient(135deg, rgba(52, 168, 83, 0.08), transparent 58%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, #0f172a 8%), color-mix(in srgb, var(--surface-muted) 88%, #020617 12%));
  border-color: color-mix(in srgb, var(--border) 76%, #1a73e8 24%);
}

.devopsstudio {
  --devops-blue: #1a73e8;
  --devops-green: #34a853;
  --devops-yellow: #fbbc04;
  --devops-red: #d93025;
  gap: 0.7rem;
}

.devops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--border) 76%, var(--devops-blue) 24%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, rgba(26, 115, 232, 0.07));
}

.devops-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.devops-title h1 {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: 0;
}

.devops-title p {
  margin: 0.12rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.devops-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  color: #061a35;
  background: linear-gradient(135deg, #8ab4f8, #81c995);
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(26, 115, 232, 0.18);
}

.devops-suggest {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) 1fr;
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 82%, transparent);
}

.devops-suggest-copy {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--border) 76%, var(--devops-blue) 24%);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 8%, rgba(26, 115, 232, 0.13), transparent 34%),
    color-mix(in srgb, var(--surface) 86%, rgba(26, 115, 232, 0.06));
}

.devops-suggest-copy span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0;
}

.devops-suggest-copy strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 800;
}

.devops-suggest label,
.devops-form label {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

.devops-suggest label span,
.devops-form label span,
.devops-kv legend {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}

.devops-suggest input,
.devops-form input,
.devops-form select,
.devops-form textarea,
.devops-kv-row input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, #000 8%);
  font: inherit;
  font-size: 0.88rem;
}

.devops-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.5;
}

.devops-form small {
  color: var(--text-muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.devops-suggest input:focus,
.devops-form input:focus,
.devops-form select:focus,
.devops-form textarea:focus,
.devops-kv-row input:focus {
  border-color: color-mix(in srgb, var(--devops-blue) 72%, var(--border));
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.13);
}

.devops-suggest-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.devops-workflow-chips {
  align-content: center;
}

.devops-suggest-list > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.devops-suggest-list button,
.devops-output-tab {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--devops-blue) 28%);
  border-radius: 999px;
  padding: 0.42rem 0.6rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 86%, rgba(26, 115, 232, 0.10));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.devops-workflow-chip {
  min-height: 48px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  text-align: left;
}

.devops-workflow-chip span,
.devops-workflow-chip small {
  display: block;
  line-height: 1.15;
}

.devops-workflow-chip small {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 760;
}

.devops-suggest-list button:hover,
.devops-output-tab:hover {
  border-color: var(--devops-blue);
  transform: translateY(-1px);
}

.devops-tabs {
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.08rem;
}

.devops-tabs .ptool-tab {
  flex: 0 0 auto;
  min-width: 136px;
  padding: 0.56rem 0.7rem;
  border-radius: 9px;
}

.devops-tabs .ptool-tab.is-active,
.devops-workflow-chip.is-active,
.devops-output-tab.is-active {
  background: color-mix(in srgb, var(--devops-blue) 84%, #0f172a 16%);
  border-color: var(--devops-blue);
  color: #fff;
}

.devops-workflow-chip.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

.devops-workspace {
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(460px, 1.1fr);
  gap: 0.75rem;
}

.devops-input-pane,
.devops-output-pane {
  min-height: 540px;
  border-radius: 12px;
}

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

.devops-form .is-wide,
.devops-kv {
  grid-column: 1 / -1;
}

.devops-toggle {
  align-self: end;
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.45rem !important;
  min-height: 36px;
  padding: 0.52rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, rgba(26, 115, 232, 0.08));
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.devops-toggle input {
  flex: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--devops-blue);
}

.devops-kv {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.62rem;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.devops-kv-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(160px, 1fr) 34px;
  gap: 0.42rem;
}

.devops-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 0.75rem 0.75rem;
}

.devops-output-body {
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto auto;
  gap: 0.65rem;
  flex: 1;
  padding: 0.75rem;
  min-height: 0;
}

.devops-output-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.devops-output-body pre {
  overflow: auto;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #1a73e8 22%);
  border-radius: 10px;
  color: #f8fafc;
  background: color-mix(in srgb, #020617 88%, var(--surface) 12%);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.devops-risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.devops-risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 168, 83, 0.35);
  color: #047857;
  background: rgba(52, 168, 83, 0.10);
  font-size: 0.74rem;
  font-weight: 800;
}

.devops-risk.is-medium {
  border-color: rgba(249, 171, 0, 0.42);
  color: #b45309;
  background: rgba(249, 171, 0, 0.10);
}

.devops-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.devops-note {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.devops-note strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 0.82rem;
}

.devops-note p {
  margin: 0;
  color: var(--text-muted);
  white-space: pre-wrap;
  font-size: 0.84rem;
  line-height: 1.55;
}

.devops-note.is-warning {
  border-color: rgba(249, 171, 0, 0.42);
  background: rgba(249, 171, 0, 0.08);
}

:root[data-theme="dark"] .devops-studio-app-card {
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.14), transparent 26%),
    linear-gradient(135deg, rgba(52, 168, 83, 0.10), transparent 60%),
    linear-gradient(135deg, #07111f, #0f172a 54%, #111827);
}

:root[data-theme="dark"] .devops-head,
:root[data-theme="dark"] .devops-suggest,
:root[data-theme="dark"] .devops-suggest-copy,
:root[data-theme="dark"] .devops-input-pane,
:root[data-theme="dark"] .devops-output-pane {
  background: rgba(15, 23, 42, 0.84);
}

:root[data-theme="dark"] .devops-suggest input,
:root[data-theme="dark"] .devops-form input,
:root[data-theme="dark"] .devops-form select,
:root[data-theme="dark"] .devops-form textarea,
:root[data-theme="dark"] .devops-kv-row input {
  background: #08111f;
}

:root[data-theme="dark"] .devops-workflow-chip.is-active,
:root[data-theme="dark"] .devops-output-tab.is-active {
  background: rgba(138, 180, 248, 0.24);
  color: #e8f0fe;
}

:root[data-theme="dark"] .devops-risk {
  color: #81c995;
}

:root[data-theme="dark"] .devops-risk.is-medium {
  color: #fde293;
}

@media (max-width: 1020px) {
  .devops-head,
  .devops-suggest,
  .devops-workspace,
  .devops-info-grid {
    grid-template-columns: 1fr;
  }

  .devops-head {
    align-items: stretch;
    flex-direction: column;
  }

  .devopsstudio .ptool-bar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .devops-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .devops-studio-app-card {
    padding: 0.55rem;
  }

  .devops-title {
    align-items: flex-start;
  }

  .devops-mark {
    width: 34px;
    height: 34px;
  }

  .devops-tabs .ptool-tab {
    min-width: calc(50% - 0.25rem);
    font-size: 0.78rem;
  }

  .devops-workflow-chip {
    flex: 1 1 calc(50% - 0.3rem);
  }

  .devops-form {
    grid-template-columns: 1fr;
  }

  .devops-input-pane,
  .devops-output-pane {
    min-height: 420px;
  }

  .devops-output-body {
    grid-template-rows: auto minmax(190px, 1fr) auto auto;
  }

  .devops-kv-row {
    grid-template-columns: 1fr;
  }
}

/* REST API Studio */
.rest-api-studio-page.container {
  width: min(1760px, calc(100% - 32px));
  max-width: 1760px;
}

.rest-api-studio-page .tool-hero {
  padding-top: 1.35rem;
}

.rest-api-studio-page .tool-hero-title {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  letter-spacing: 0;
}

.rest-api-studio-page .tool-hero-lead {
  max-width: 96ch;
  font-size: 0.98rem;
}

.rest-api-card {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.10), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, #0f172a 8%), color-mix(in srgb, var(--surface-muted) 88%, #020617 12%));
  border-color: color-mix(in srgb, var(--border) 78%, #1a73e8 22%);
}

.apistudio {
  --api-blue: #1a73e8;
  --api-green: #188038;
  --api-yellow: #f9ab00;
  --api-red: #d93025;
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.apistudio-head,
.apistudio-suggest,
.apistudio-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, rgba(26, 115, 232, 0.05));
}

.apistudio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.78rem 0.85rem;
}

.apistudio-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.apistudio-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  color: #e8f0fe;
  background: linear-gradient(135deg, #1a73e8, #0f9f8f 58%, #35b46f);
  box-shadow: 0 14px 30px rgba(26, 115, 232, 0.18);
}

.apistudio-title h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  letter-spacing: 0;
}

.apistudio-title p {
  margin: 0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.apistudio-actions,
.apistudio-row-actions,
.apistudio-output-tabs,
.apistudio-suggestion-chips,
.apistudio-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.apistudio-btn,
.apistudio-chip {
  appearance: none;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, var(--api-blue) 22%);
  border-radius: 8px;
  padding: 0.48rem 0.62rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, rgba(26, 115, 232, 0.08));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.apistudio-btn:hover,
.apistudio-chip:hover {
  border-color: var(--api-blue);
  transform: translateY(-1px);
}

.apistudio-btn[data-copied="true"] {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.38);
  background: rgba(16, 185, 129, 0.10);
}

.apistudio-btn.is-primary {
  color: #fff;
  border-color: var(--api-blue);
  background: var(--api-blue);
}

.apistudio-btn.is-danger {
  border-color: rgba(217, 48, 37, 0.36);
  background: rgba(217, 48, 37, 0.09);
}

.apistudio-suggest {
  display: block;
  padding: 0.62rem;
}

.apistudio-suggestion-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.apistudio-chip {
  min-height: 30px;
  border-radius: 999px;
  padding: 0.38rem 0.56rem;
  background: color-mix(in srgb, var(--surface-muted) 78%, rgba(26, 115, 232, 0.10));
}

.apistudio-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.16rem 0 0.1rem;
  scrollbar-width: thin;
}

.apistudio-tab {
  appearance: none;
  flex: 0 0 auto;
  min-width: 124px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-muted) 80%, transparent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.apistudio-tab.is-active {
  color: #fff;
  border-color: var(--api-blue);
  background: var(--api-blue);
}

.apistudio-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 0.75rem;
  min-width: 0;
}

.apistudio-panel {
  min-width: 0;
  min-height: clamp(520px, 65vh, 760px);
  overflow: hidden;
}

.apistudio-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.65rem 0.72rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 86%, var(--surface));
}

.apistudio-panel-head > div {
  min-width: 0;
}

.apistudio-panel-head .apistudio-row-actions {
  justify-content: flex-end;
}

.apistudio-panel-head h2,
.apistudio-panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.apistudio-panel-head p {
  margin: 0.12rem 0 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.apistudio-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
  min-width: 0;
  padding: 0.72rem;
}

.apistudio-field,
.apistudio-toggle {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.apistudio-field.is-wide,
.apistudio-kv,
.apistudio-form > .apistudio-warning,
.apistudio-form-actions {
  grid-column: 1 / -1;
}

.apistudio-field span,
.apistudio-kv-title,
.apistudio-toggle span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.apistudio-kv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.apistudio-kv-add {
  appearance: none;
  min-height: 26px;
  border: 1px solid color-mix(in srgb, var(--border) 74%, var(--api-blue) 26%);
  border-radius: 999px;
  padding: 0.25rem 0.52rem;
  color: var(--api-blue);
  background: rgba(26, 115, 232, 0.08);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.apistudio-kv-add:hover {
  border-color: var(--api-blue);
  background: rgba(26, 115, 232, 0.13);
}

.apistudio-field input,
.apistudio-field select,
.apistudio-field textarea,
.apistudio-kv input,
.apistudio-kv select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.52rem 0.58rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, #000 8%);
  font: inherit;
  font-size: 0.84rem;
}

.apistudio-field textarea {
  min-height: 108px;
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.5;
}

.apistudio-field textarea[data-field="curl"] {
  min-height: 260px;
}

.apistudio-field input:focus,
.apistudio-field select:focus,
.apistudio-field textarea:focus,
.apistudio-kv input:focus {
  border-color: rgba(26, 115, 232, 0.72);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.13);
}

.apistudio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.46rem 0.58rem;
  background: color-mix(in srgb, var(--surface) 90%, rgba(26, 115, 232, 0.08));
}

.apistudio-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--api-blue);
}

.apistudio-kv {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
}

.apistudio-kv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 1fr) 34px;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.apistudio-kv-remove {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--surface);
  cursor: pointer;
}

.apistudio-output-body {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  gap: 0.65rem;
  height: calc(100% - 58px);
  min-width: 0;
  min-height: 0;
  padding: 0.72rem;
}

.apistudio-output-tabs button {
  appearance: none;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.58rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.apistudio-output-tabs button.is-active {
  color: var(--api-blue);
  border-color: rgba(26, 115, 232, 0.46);
  background: rgba(26, 115, 232, 0.10);
}

.apistudio-code {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #1a73e8 22%);
  border-radius: 10px;
  color: #dbeafe;
  background: #020617;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.apistudio-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.apistudio-metric {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.48rem 0.55rem;
  background: color-mix(in srgb, var(--surface-muted) 76%, transparent);
}

.apistudio-metric strong {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
}

.apistudio-metric span {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.apistudio-note,
.apistudio-warning {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.66rem 0.72rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.apistudio-note strong,
.apistudio-warning strong {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--text);
  font-size: 0.8rem;
}

.apistudio-note p,
.apistudio-warning p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.apistudio-warning {
  border-color: rgba(249, 171, 0, 0.38);
  background: rgba(249, 171, 0, 0.08);
}

.apistudio-warning strong,
.apistudio-warning p {
  color: #a16207;
}

.rest-api-seo {
  margin-top: 1.2rem;
}

.rest-api-seo .tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
}

.rest-api-disclaimer {
  max-width: 1180px;
}

.rest-api-notice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.rest-api-notice > div {
  position: relative;
  padding: 1rem 1rem 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #d93025 22%);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(217, 48, 37, 0.08), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.rest-api-notice > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 3px;
  border-radius: 999px;
  background: #d93025;
}

.rest-api-notice h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: 0;
}

.rest-api-notice p,
.rest-api-terms-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.rest-api-terms-note {
  margin-top: 0.9rem;
}

.rest-api-terms-note a {
  color: var(--brand);
  font-weight: 800;
}

:root[data-theme="dark"] .rest-api-card {
  background:
    linear-gradient(135deg, rgba(138, 180, 248, 0.10), transparent 26%),
    linear-gradient(135deg, #07111f, #0f172a 54%, #111827);
}

:root[data-theme="dark"] .rest-api-notice > div {
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.10), transparent 44%),
    rgba(15, 23, 42, 0.92);
  border-color: rgba(248, 113, 113, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 16px 34px rgba(0,0,0,0.22);
}

:root[data-theme="dark"] .rest-api-notice > div::before {
  background: #f87171;
}

:root[data-theme="dark"] .rest-api-notice h3 {
  color: #f8fafc;
}

:root[data-theme="dark"] .rest-api-notice p,
:root[data-theme="dark"] .rest-api-terms-note {
  color: #b7c2d3;
}

:root[data-theme="dark"] .rest-api-terms-note a {
  color: #8ab4f8;
}

:root[data-theme="dark"] .apistudio-head,
:root[data-theme="dark"] .apistudio-suggest,
:root[data-theme="dark"] .apistudio-panel {
  background: rgba(15, 23, 42, 0.84);
}

:root[data-theme="dark"] .apistudio-field input,
:root[data-theme="dark"] .apistudio-field select,
:root[data-theme="dark"] .apistudio-field textarea,
:root[data-theme="dark"] .apistudio-kv input,
:root[data-theme="dark"] .apistudio-kv select {
  background: #08111f;
}

:root[data-theme="dark"] .apistudio-warning strong,
:root[data-theme="dark"] .apistudio-warning p {
  color: #fcd34d;
}

@media (max-width: 1240px) {
  .apistudio-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .apistudio-panel {
    min-height: 0;
  }

  .apistudio-output-body {
    height: auto;
    min-height: 440px;
  }
}

@media (max-width: 1040px) {
  .apistudio-head,
  .apistudio-suggest,
  .apistudio-workspace,
  .rest-api-seo .tool-intro,
  .rest-api-notice {
    grid-template-columns: 1fr;
  }

  .apistudio-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .rest-api-studio-page.container {
    width: min(100% - 24px, 1180px);
  }

  .rest-api-card {
    padding: 0.55rem;
  }

  .apistudio-form {
    grid-template-columns: 1fr;
  }

  .apistudio-tab {
    min-width: calc(50% - 0.25rem);
  }

  .apistudio-kv-row {
    grid-template-columns: 1fr;
  }

  .apistudio-kv-remove {
    width: 100%;
  }

  .apistudio-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* OpenAPI Studio */
.openapi-studio-page.container {
  width: min(100% - 24px, 1720px);
}

.openapi-studio-page .tool-hero,
.openapi-studio-page > .tool-section,
.openapi-studio-page > .tool-workspace-brief {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.openapi-studio-app-card {
  max-width: 1720px;
  margin-left: auto;
  margin-right: auto;
}

.openapistudio .ptool-bar {
  background: linear-gradient(135deg, color-mix(in srgb, #1a73e8 10%, var(--surface)), color-mix(in srgb, #34a853 8%, var(--surface)));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
}

.openapistudio .ptool-tabs {
  margin-top: 0.85rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.openapi-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0.85rem 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.openapi-controls select,
.openapi-controls input[type="text"],
.openapi-control-input {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 0.7rem;
  font: inherit;
}

.openapi-controls label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.openapi-live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.7rem;
  border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 850;
}

.openapi-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--border));
  border-radius: 8px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.openapi-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.openapi-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
}

.openapi-workspace.is-diff {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.openapi-workspace .ptool-pane {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.openapi-editor,
.openapi-output {
  min-height: clamp(520px, 64vh, 780px);
  max-height: clamp(520px, 64vh, 780px);
}

.openapi-editor textarea,
.openapi-editor pre {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
}

.openapi-output {
  overflow: auto;
  padding: 1rem;
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-muted));
}

.openapi-output pre {
  margin: 0.7rem 0;
  padding: 0.85rem;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.openapi-empty,
.openapi-result-card,
.openapi-doc-hero,
.openapi-endpoint,
.openapi-response {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.openapi-empty {
  padding: 1rem;
  color: var(--text-muted);
}

.openapi-empty.is-success {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 28%, var(--border));
}

.openapi-empty.is-error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}

.openapi-result-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
  padding: 1rem;
  margin-bottom: 0.9rem;
}

.openapi-result-card strong {
  grid-column: 1 / -1;
  font-size: 1.05rem;
}

.openapi-result-card span,
.openapi-diff-summary span,
.openapi-doc-meta span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.openapi-result-card.is-success {
  border-color: color-mix(in srgb, var(--success) 32%, var(--border));
  background: color-mix(in srgb, var(--success) 7%, var(--surface));
}

.openapi-result-card.is-error {
  border-color: color-mix(in srgb, var(--danger) 32%, var(--border));
  background: color-mix(in srgb, var(--danger) 6%, var(--surface));
}

.openapi-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.openapi-filter-row button {
  min-height: 32px;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.openapi-filter-row button:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
}

.openapi-table-scroll {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.openapi-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.openapi-table-scroll th,
.openapi-table-scroll td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}

.openapi-table-scroll th {
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.openapi-table-scroll td small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
}

.openapi-severity,
.openapi-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 0.45rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.openapi-severity.is-error,
.openapi-severity.is-breaking {
  color: #b3261e;
  background: #fce8e6;
}

.openapi-severity.is-warning {
  color: #b06000;
  background: #fef7e0;
}

.openapi-severity.is-info,
.openapi-severity.is-non-breaking {
  color: #174ea6;
  background: #e8f0fe;
}

.openapi-method.is-get { color: #0b8043; background: #e6f4ea; }
.openapi-method.is-post { color: #174ea6; background: #e8f0fe; }
.openapi-method.is-put { color: #b06000; background: #fef7e0; }
.openapi-method.is-patch { color: #681da8; background: #f3e8fd; }
.openapi-method.is-delete { color: #b3261e; background: #fce8e6; }
.openapi-method.is-options,
.openapi-method.is-head,
.openapi-method.is-trace { color: #5f6368; background: #f1f3f4; }

.openapi-doc-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.openapi-doc-hero h3,
.openapi-doc-group h3,
.openapi-endpoint h4,
.openapi-snippet-tabs h3,
.openapi-snippet-tabs h4 {
  margin: 0 0 0.45rem;
  letter-spacing: 0;
}

.openapi-doc-hero p {
  margin: 0;
  color: var(--text-muted);
}

.openapi-doc-meta {
  display: grid;
  gap: 0.35rem;
  min-width: min(260px, 100%);
}

.openapi-doc-group {
  margin: 1rem 0;
}

.openapi-endpoint {
  padding: 1rem;
  margin: 0.65rem 0;
}

.openapi-endpoint-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.openapi-schema-tree,
.openapi-response {
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.openapi-schema-tree {
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.openapi-response small {
  display: block;
  color: var(--text-muted);
}

.openapi-diff-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.openapi-diff-summary span {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.openapi-diff-summary strong {
  color: var(--text);
  font-size: 1.35rem;
}

:root[data-theme="dark"] .openapi-severity.is-error,
:root[data-theme="dark"] .openapi-severity.is-breaking,
:root[data-theme="dark"] .openapi-method.is-delete {
  color: #f28b82;
  background: rgba(242, 139, 130, 0.14);
}

:root[data-theme="dark"] .openapi-severity.is-warning,
:root[data-theme="dark"] .openapi-method.is-put {
  color: #fdd663;
  background: rgba(253, 214, 99, 0.14);
}

:root[data-theme="dark"] .openapi-severity.is-info,
:root[data-theme="dark"] .openapi-severity.is-non-breaking,
:root[data-theme="dark"] .openapi-method.is-post {
  color: #8ab4f8;
  background: rgba(138, 180, 248, 0.14);
}

:root[data-theme="dark"] .openapi-method.is-get {
  color: #81c995;
  background: rgba(129, 201, 149, 0.14);
}

@media (max-width: 980px) {
  .openapi-workspace,
  .openapi-workspace.is-diff {
    grid-template-columns: 1fr;
  }

  .openapi-editor,
  .openapi-output {
    min-height: 420px;
    max-height: 620px;
  }

  .openapi-doc-hero,
  .openapi-diff-summary {
    display: grid;
    grid-template-columns: 1fr;
  }
}
