:root {
  --accent-600: #ff7a00;
  --accent-500: #ff8f26;
  --accent-400: #ffa64d;
  --brand-950: #000000;
  --brand-900: #111111;
  --brand-800: #1a1a1a;
  --brand-700: #262626;
  --brand-600: #333333;
  --surface-muted: #f4f4f4;
  --line: #e6e6e6;
  --muted: #6b6b6b;
  --ok: #188038;
  --danger: #d93025;
  --surface: #ffffff;
  --radius: 16px;
  --font: "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--brand-800);
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 122, 0, 0.08), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f7f7f7 100%);
}

a { color: var(--accent-600); text-decoration: none; }
a:hover { color: #e86e00; }

.wrap {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand-900);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav a, .ghost-btn {
  color: var(--brand-600);
  font: 500 0.82rem/1 var(--font);
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav a:hover, .ghost-btn:hover {
  background: rgba(255, 122, 0, 0.08);
  color: var(--accent-600);
}

.lang-switch {
  display: inline-flex;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font: 600 0.72rem/1 var(--font);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--accent-600);
  color: #fff;
}

.hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--brand-900);
}

.hero h1 span { color: var(--accent-600); }

.hero p {
  margin: 0.75rem auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.5rem 0 2.5rem;
}

.tool-card {
  display: block;
  padding: 1.2rem 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
  color: inherit;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 0, 0.35);
  color: inherit;
}

.tool-card .emoji {
  font-size: 1.4rem;
  margin-bottom: 0.55rem;
}

.tool-card h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-900);
}

.tool-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.page-hero {
  padding: 1.5rem 0 1rem;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--brand-900);
}

.page-hero p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}

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

.field {
  display: grid;
  gap: 0.35rem;
  text-align: left;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-600);
}

.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font: 500 0.95rem/1.2 var(--font);
  color: var(--brand-800);
  background: #fff;
}

.field input:focus, .field select:focus {
  outline: 2px solid rgba(255, 122, 0, 0.3);
  border-color: var(--accent-600);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  font: 600 0.9rem/1 var(--font);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent-600);
  color: #fff;
}

.btn.primary:hover { background: #e86e00; }

.btn.secondary {
  background: var(--surface-muted);
  color: var(--brand-700);
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.results.cron-results {
  grid-template-columns: 1fr 2fr;
}

.stat {
  padding: 0.9rem;
  border-radius: 12px;
  background: #fffaf5;
  border: 1px solid rgba(255, 122, 0, 0.15);
}

.stat .label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.stat .value {
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-600);
  letter-spacing: -0.02em;
}

.chart-wrap {
  margin-top: 1rem;
  min-height: 280px;
}

.ad-slot {
  margin: 1.25rem 0;
  min-height: 90px;
  text-align: center;
  overflow: hidden;
}

.ad-slot .adsbygoogle {
  display: block;
}

.ad-placeholder {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  background: var(--surface-muted);
  padding: 1rem;
  text-align: center;
}

.seo {
  margin: 2rem 0 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ebebeb;
}

.seo h2 {
  margin: 0 0 0.65rem;
  font-size: 1.3rem;
  color: var(--brand-900);
}

.seo h3 {
  margin: 1.25rem 0 0.45rem;
  font-size: 1.02rem;
  color: var(--accent-600);
}

.seo p, .seo li {
  color: var(--muted);
  font-size: 0.92rem;
}

.seo details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.55rem 0;
  background: #fff;
}

.seo summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-800);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th:first-child, td:first-child { text-align: left; }

th { color: var(--brand-600); font-weight: 600; }

.footer {
  margin-top: 1rem;
  padding: 1.35rem 0 2rem;
  background: var(--surface-muted);
  color: #8a8a8a;
  font-size: 0.8rem;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  justify-content: center;
  align-items: center;
}

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

.note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.support {
  margin: 2rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid #ebebeb;
  text-align: center;
}

.support-copy h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--brand-900);
}

.support-copy p {
  margin: 0.45rem auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.pay-methods {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
}

.pay-card {
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.pay-card-head {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.pay-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pix-logo {
  line-height: 0;
  background: #000;
  border-radius: 8px;
  padding: 0.15rem 0.35rem;
}

.pix-logo img {
  display: block;
  height: 28px;
  width: auto;
}

.pay-card-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn.donate {
  background: #ffc43a;
  color: #111;
  border-color: #ffc43a;
  width: 100%;
}

.btn.donate:hover { filter: brightness(0.96); }

.pix-key-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-600);
}

.pix-key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.pix-key {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: 500 0.78rem/1.3 ui-monospace, Consolas, monospace;
  color: var(--brand-800);
  background: #fffaf5;
}

.pix-feedback {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.8rem;
  color: var(--ok);
}

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

.seo-grid article {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.seo-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--accent-600);
}

.seo-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.editor-area {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: 500 0.88rem/1.55 ui-monospace, Consolas, monospace;
  color: var(--accent-600);
  background: #fffaf5;
  resize: vertical;
  outline: none;
}

.editor-area:focus {
  border-color: var(--accent-600);
  outline: 2px solid rgba(255, 122, 0, 0.25);
}

.diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.diff-out {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font: 500 0.85rem/1.45 ui-monospace, Consolas, monospace;
}

.diff-line {
  padding: 0.2rem 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-line.add { background: #e6f4ea; color: #137333; }
.diff-line.del { background: #fce8e6; color: #c5221f; }
.diff-line.same { color: var(--brand-700); }
.diff-line.empty { color: #aaa; }

.jwt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.jwt-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
}

.jwt-box h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--accent-600);
}

.jwt-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 500 0.82rem/1.45 ui-monospace, Consolas, monospace;
  color: var(--brand-800);
}

.cron-builder {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #fffaf5;
  border: 1px solid rgba(255, 122, 0, 0.2);
  color: var(--accent-600);
  font-weight: 600;
  font-size: 0.9rem;
}

.wrap-wide {
  max-width: 1120px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.tool-main { min-width: 0; }

.tool-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.ad-slot-sidebar {
  min-height: 250px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf5;
  padding: 0.5rem;
}

.trust-seo h2 {
  margin-top: 1.25rem;
}

.sql-out, .regex-explain {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 500 0.85rem/1.55 ui-monospace, Consolas, monospace;
  color: var(--brand-800);
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  min-height: 160px;
}

.sql-out .kw { color: #0b57d0; font-weight: 700; }
.sql-out .str { color: #137333; }
.sql-out .num { color: #c5221f; }
.sql-out .cm { color: #888; }

.regex-match {
  background: #ffe8cc;
  border-radius: 3px;
  padding: 0 2px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font: 600 0.82rem/1 var(--font);
  cursor: pointer;
  color: var(--brand-700);
}

.tabs button.is-active {
  background: var(--accent-600);
  border-color: var(--accent-600);
  color: #fff;
}

.wrap-html {
  max-width: min(1480px, calc(100vw - 2rem));
}

.html-viewer-page .page-hero.html-hero-compact {
  margin-bottom: 0.75rem;
}

.html-viewer-page .page-hero.html-hero-compact h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin-bottom: 0.35rem;
}

.html-viewer-page .page-hero.html-hero-compact p {
  margin: 0;
  max-width: 70ch;
  font-size: 0.95rem;
}

.html-panel {
  padding: 0.85rem;
}

.html-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.75rem;
}

.html-bar-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf5;
}

.html-bar-group button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 0.45rem 0.7rem;
  font: 600 0.8rem/1 var(--font);
  cursor: pointer;
  color: var(--brand-700);
}

.html-bar-group button.is-active {
  background: var(--accent-600);
  color: #fff;
}

.html-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.html-bar-actions .btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

.html-status {
  font-size: 0.78rem;
  color: var(--ok);
  font-weight: 600;
  white-space: nowrap;
}

.html-bar-end {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.html-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

.html-panel.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 1000;
  margin: 0;
  border-radius: 0;
  border: 0;
  padding: 0.75rem;
  background: #fffaf5;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.html-panel.is-expanded .html-workspace {
  flex: 1;
  height: auto;
  min-height: 0;
}

body.html-expanded {
  overflow: hidden;
}

body.html-expanded .atmosphere,
body.html-expanded .topbar,
body.html-expanded .html-hero-compact,
body.html-expanded .ad-slot,
body.html-expanded .seo,
body.html-expanded .footer {
  display: none !important;
}

.html-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  height: min(72vh, 820px);
  min-height: 560px;
}

.html-workspace[data-view="code"],
.html-workspace[data-view="preview"],
.html-workspace[data-view="highlight"] {
  grid-template-columns: 1fr;
}

.html-workspace[data-view="code"] .html-pane-preview,
.html-workspace[data-view="code"] .html-pane-highlight,
.html-workspace[data-view="split"] .html-pane-highlight,
.html-workspace[data-view="preview"] .html-pane-editor,
.html-workspace[data-view="preview"] .html-pane-highlight,
.html-workspace[data-view="highlight"] .html-pane-editor,
.html-workspace[data-view="highlight"] .html-pane-preview {
  display: none;
}

.html-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.html-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: #fff4e8;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-600);
}

.html-hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
}

.html-editor {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  resize: none;
  padding: 0.85rem 1rem;
  font: 500 0.84rem/1.5 ui-monospace, Consolas, monospace;
  color: var(--brand-800);
  background: #fffefb;
}

.html-editor:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(255, 122, 0, 0.35);
}

.html-frame-wrap {
  flex: 1;
  min-height: 0;
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.05) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(rgba(255, 122, 0, 0.05) 1px, transparent 1px) 0 0 / 14px 14px,
    #f7f3ee;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0.65rem;
  overflow: auto;
}

.html-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid #e7d7c5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 18, 8, 0.08);
  transition: width 0.2s ease;
}

.html-frame-wrap.is-tablet .html-frame {
  width: min(768px, 100%);
}

.html-frame-wrap.is-mobile .html-frame {
  width: min(390px, 100%);
  border-radius: 16px;
  box-shadow:
    0 0 0 8px #1a1208,
    0 12px 28px rgba(26, 18, 8, 0.18);
}

.html-highlight {
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #1a1208;
  color: #f6efe7;
  padding: 0.65rem 0.35rem;
  font: 500 0.8rem/1.55 ui-monospace, Consolas, monospace;
}

.html-line {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.55rem;
  padding: 0 0.35rem;
}

.html-ln {
  color: #9a8470;
  text-align: right;
  user-select: none;
}

.html-code {
  white-space: pre-wrap;
  word-break: break-word;
  border-left: 1px dashed rgba(255, 122, 0, 0.28);
  padding-left: 0.65rem;
}

.html-tag { color: #ff9d4d; font-weight: 700; }
.html-attr { color: #7dd3fc; }
.html-val { color: #86efac; }
.html-punct { color: #d6c4b0; }
.html-cm { color: #9ca3af; font-style: italic; }

/* URL Parser */
.up-tabs { margin-bottom: 1rem; }
.up-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.up-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.up-params-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.up-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.up-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.up-table th,
.up-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.up-table th {
  background: #fff4e8;
  color: var(--accent-600);
  font-weight: 700;
  font-size: 0.75rem;
}
.up-table tr:last-child td { border-bottom: 0; }
.up-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: 500 0.82rem/1.3 ui-monospace, Consolas, monospace;
  color: var(--brand-800);
  background: #fffaf5;
}
.up-table code {
  font: 500 0.8rem/1.35 ui-monospace, Consolas, monospace;
  word-break: break-all;
}
.up-row-del {
  padding: 0.25rem 0.55rem;
  min-width: 2rem;
}
.up-subhead {
  margin: 1.15rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--brand-900);
}
.up-empty { color: var(--muted); }
.up-diff-same { background: #f7fff8; }
.up-diff-changed { background: #fff4e8; }
.up-diff-only-a { background: #fff0f0; }
.up-diff-only-b { background: #eef5ff; }
.up-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.up-badge-same { background: #dcfce7; color: #166534; }
.up-badge-changed { background: #ffedd5; color: #9a3412; }
.up-badge-only-a { background: #fecaca; color: #991b1b; }
.up-badge-only-b { background: #dbeafe; color: #1e40af; }

.cc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.cc-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf5;
  padding: 0.75rem 0.85rem;
  text-align: center;
}
.cc-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-600);
  margin-bottom: 0.25rem;
}
.cc-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-900);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

@media (max-width: 800px) {
  .up-grid,
  .up-compare-grid {
    grid-template-columns: 1fr;
  }
  .cc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Empty AdSense slot: keep compact so it doesn't dominate UX while ads are pending */
.ad-slot-sidebar:not(:has(iframe)) {
  min-height: 120px;
}

.ad-slot-sidebar {
  min-height: 250px;
}

@media (max-width: 960px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .tool-sidebar {
    position: static;
    order: 3;
  }
  .html-workspace[data-view="split"] {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .html-pane-editor,
  .html-pane-preview {
    min-height: 360px;
  }
  .html-status {
    /* keep inline with expand on mobile */
  }
  .html-bar-end {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 800px) {
  .diff-grid, .jwt-grid, .cron-builder, .tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
