/* ================================================================
   TOOLSHUB4U — SEO TOOLKIT DESIGN SYSTEM
   Shared component library for every SEO tool page.
   Uses main.css tokens (--surface, --border, --accent, ...) so
   light and dark themes both work automatically.

   Components:
     .tk-section / .tk-shell / .tk-header / .tk-grid / .tk-card
     .tk-field / .tk-label / .tk-input / .tk-select / .tk-textarea
     .tk-row / .tk-btn / .tk-tabs / .tk-stats / .tk-stat
     .tk-score / .tk-badge / .tk-issue / .tk-table / .tk-progress
     .tk-chip / .tk-seg / .tk-switch / .tk-toast / .tk-empty
     .tk-loading / .tk-alert / .tk-code / .tk-pagination
     .tk-chart / .tk-rel / .tk-tree / .tk-flow / .tk-kv / .tk-note
   ================================================================ */

/* ── Section shell ─────────────────────────────────────────── */
.tk-section {
  padding: 3.5rem 0;
  background: linear-gradient(180deg, var(--bg-secondary, #0b1120) 0%, var(--bg, #070b14) 100%);
}
.tk-shell { max-width: 1140px; margin: 0 auto; }

.tk-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1.75rem;
}
.tk-header__icon-wrap {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .32), rgba(79, 70, 229, .14));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 26px rgba(139, 92, 246, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tk-header__icon { width: 26px; height: 26px; color: var(--primary-light, #818cf8); stroke-width: 1.7; }
.tk-header__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #e7ecf5);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.tk-header__desc {
  font-size: 0.9rem;
  color: var(--text-secondary, #9aa8bd);
  margin: 0;
  line-height: 1.55;
  max-width: 640px;
}

/* ── Layout grid ───────────────────────────────────────────── */
.tk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.tk-grid--wide { grid-template-columns: 1fr; }
.tk-grid--38 { grid-template-columns: minmax(0, .38fr) minmax(0, .62fr); }
.tk-grid--62 { grid-template-columns: minmax(0, .62fr) minmax(0, .38fr); }

/* ── Cards ─────────────────────────────────────────────────── */
.tk-card {
  background: var(--surface, #0e1626);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 18px;
  box-shadow: var(--shadow-md, 0 6px 24px rgba(0, 0, 0, .4));
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.tk-card--pad-sm { padding: 1.1rem; }
.tk-card--flush { padding: 0; overflow: hidden; }

/* ── Fields ────────────────────────────────────────────────── */
.tk-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.tk-field__label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #9aa8bd);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.tk-label__opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-tertiary, #64748b); }
.tk-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border-strong, rgba(148, 163, 184, .28));
  border-radius: 10px;
  background: var(--bg, #070b14);
  color: var(--text-primary, #e7ecf5);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.4;
}
.tk-input::placeholder { color: var(--text-tertiary, #64748b); }
.tk-input:hover { border-color: var(--primary, #6366f1); }
.tk-input:focus {
  outline: none;
  border-color: var(--primary, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 18%, transparent);
}
.tk-input--area { resize: vertical; min-height: 200px; line-height: 1.6; }
.tk-input--area-sm { min-height: 110px; }
.tk-input--mono { font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; font-size: 0.84rem; }
.tk-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'><path d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.tk-row { display: flex; gap: 1rem; align-items: flex-end; }
.tk-row--top { align-items: flex-start; }
.tk-row--wrap { flex-wrap: wrap; }
.tk-hint { font-size: 0.78rem; color: var(--text-tertiary, #64748b); line-height: 1.55; }
.tk-hint code {
  background: var(--bg-secondary, #0b1120);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.75rem;
}
.tk-divider { height: 1px; background: var(--border, rgba(148, 163, 184, .16)); }

/* ── Buttons ───────────────────────────────────────────────── */
.tk-btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong, rgba(148, 163, 184, .28));
  background: var(--bg, #070b14);
  color: var(--text-secondary, #9aa8bd);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tk-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.tk-btn:hover { border-color: var(--primary, #6366f1); color: var(--primary-light, #818cf8); }
.tk-btn:active { transform: scale(0.97); }
.tk-btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.tk-btn--primary {
  background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-dark, #4f46e5));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .35);
}
.tk-btn--primary:hover { color: #fff; filter: brightness(1.08); }
.tk-btn--ghost { background: transparent; }
.tk-btn--sm { padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; }
.tk-btn--sm svg { width: 14px; height: 14px; }
.tk-btn--danger { border-color: color-mix(in srgb, #ef4444 45%, transparent); color: #f87171; }
.tk-btn--danger:hover { background: rgba(239, 68, 68, .12); border-color: #ef4444; color: #f87171; }
.tk-btn--success { border-color: color-mix(in srgb, #10b981 45%, transparent); color: #34d399; }
.tk-btn--success:hover { background: rgba(16, 185, 129, .12); border-color: #10b981; color: #34d399; }
.tk-btn--block { width: 100%; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tk-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, .16));
  margin-bottom: 1.25rem;
}
.tk-tab {
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary, #9aa8bd);
  border: none;
  background: none;
  border-radius: 9px 9px 0 0;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.tk-tab:hover { color: var(--primary-light, #818cf8); background: var(--primary-50, rgba(99, 102, 241, .12)); }
.tk-tab--active { color: var(--primary-light, #818cf8); }
.tk-tab--active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary, #6366f1), var(--accent, #22d3ee));
}
.tk-panel { display: none; }
.tk-panel--active { display: block; animation: tk-fade-in .25s ease; }
@keyframes tk-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Stat cards (KPIs) ─────────────────────────────────────── */
.tk-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.tk-stat {
  background: var(--surface, #0e1626);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.tk-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-brand, linear-gradient(135deg, #6366f1, #a855f7, #22d3ee));
  opacity: .7;
}
.tk-stat__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #e7ecf5);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.tk-stat__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary, #64748b);
  margin-top: 4px;
  font-weight: 600;
}
.tk-stat__delta { font-size: 0.72rem; font-weight: 700; margin-top: 2px; }
.tk-stat__delta--up { color: #34d399; }
.tk-stat__delta--down { color: #f87171; }

/* ── Score ring ────────────────────────────────────────────── */
.tk-score-wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.tk-score {
  --score: 0;
  --score-color: #34d399;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(closest-side, var(--surface, #0e1626) 79%, transparent 80% 100%),
    conic-gradient(var(--score-color) calc(var(--score) * 1%), color-mix(in srgb, var(--score-color) 18%, transparent) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tk-score__inner { text-align: center; }
.tk-score__num { font-size: 2rem; font-weight: 800; color: var(--text-primary, #e7ecf5); line-height: 1; font-variant-numeric: tabular-nums; }
.tk-score__of { font-size: .75rem; color: var(--text-tertiary, #64748b); font-weight: 600; }
.tk-score__label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-tertiary, #64748b); font-weight: 700; margin-top: 4px; }
.tk-score--warn { --score-color: #f59e0b; }
.tk-score--crit { --score-color: #ef4444; }

/* ── Badges / pills ────────────────────────────────────────── */
.tk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.tk-badge--ok { background: rgba(16, 185, 129, .14); color: #34d399; border: 1px solid rgba(16, 185, 129, .3); }
.tk-badge--warn { background: rgba(245, 158, 11, .14); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .3); }
.tk-badge--crit { background: rgba(239, 68, 68, .14); color: #f87171; border: 1px solid rgba(239, 68, 68, .3); }
.tk-badge--muted { background: var(--bg-secondary, #0b1120); color: var(--text-tertiary, #64748b); border: 1px solid var(--border, rgba(148, 163, 184, .16)); }
.tk-badge--accent { background: var(--primary-50, rgba(99, 102, 241, .12)); color: var(--primary-light, #818cf8); border: 1px solid var(--primary-100, rgba(99, 102, 241, .22)); }

/* ── Issue cards (results) ─────────────────────────────────── */
.tk-issues { display: flex; flex-direction: column; gap: 10px; }
.tk-issue {
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--surface, #0e1626);
}
.tk-issue--ok { border-left: 4px solid #10b981; }
.tk-issue--warn { border-left: 4px solid #f59e0b; }
.tk-issue--crit { border-left: 4px solid #ef4444; }
.tk-issue__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-issue__title { font-size: 0.92rem; font-weight: 700; color: var(--text-primary, #e7ecf5); display: flex; align-items: center; gap: 8px; }
.tk-issue__body { font-size: 0.85rem; color: var(--text-secondary, #9aa8bd); line-height: 1.65; margin-top: 7px; }
.tk-issue__body p { margin: 0 0 6px; }
.tk-issue__body p:last-child { margin-bottom: 0; }
.tk-issue__body strong { color: var(--text-primary, #e7ecf5); }
.tk-issue__fix {
  margin-top: 8px;
  padding: 9px 12px;
  background: var(--bg-secondary, #0b1120);
  border: 1px dashed var(--border-strong, rgba(148, 163, 184, .28));
  border-radius: 9px;
  font-size: 0.83rem;
  color: var(--text-secondary, #9aa8bd);
  line-height: 1.6;
}

/* ── Tables ────────────────────────────────────────────────── */
.tk-table-wrap {
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 12px;
  overflow: hidden;
  overflow-x: auto;
}
.tk-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 480px; }
.tk-table th {
  text-align: left;
  padding: 9px 12px;
  background: var(--bg-secondary, #0b1120);
  color: var(--text-tertiary, #64748b);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, .16));
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.tk-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light, rgba(148, 163, 184, .08));
  color: var(--text-primary, #e7ecf5);
  vertical-align: top;
}
.tk-table tr:last-child td { border-bottom: none; }
.tk-table tbody tr:hover { background: var(--primary-50, rgba(99, 102, 241, .12)); }
.tk-table td.tk-num, .tk-table th.tk-num { text-align: right; font-variant-numeric: tabular-nums; }
.tk-table td.tk-mono { font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; font-size: 0.78rem; word-break: break-all; }
.tk-table .tk-strong { font-weight: 700; }

/* bar inside table cells */
.tk-bar {
  height: 6px;
  border-radius: 100px;
  background: var(--primary-50, rgba(99, 102, 241, .12));
  overflow: hidden;
  max-width: 160px;
  display: inline-block;
  vertical-align: middle;
}
.tk-bar span { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--primary, #6366f1), var(--accent, #22d3ee)); }

/* ── Progress ──────────────────────────────────────────────── */
.tk-progress { display: flex; flex-direction: column; gap: 6px; }
.tk-progress__meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-tertiary, #64748b); }
.tk-progress__track { height: 8px; border-radius: 100px; background: var(--bg-secondary, #0b1120); overflow: hidden; border: 1px solid var(--border, rgba(148, 163, 184, .16)); }
.tk-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary, #6366f1), var(--accent, #22d3ee));
  transition: width .25s ease;
}

/* ── Chips / toggle chips ──────────────────────────────────── */
.tk-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--border-strong, rgba(148, 163, 184, .28));
  background: var(--bg, #070b14);
  color: var(--text-secondary, #9aa8bd);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.tk-chip:hover { border-color: var(--primary, #6366f1); color: var(--primary-light, #818cf8); }
.tk-chip--on { background: var(--primary-50, rgba(99, 102, 241, .12)); border-color: var(--primary, #6366f1); color: var(--primary-light, #818cf8); }

/* segmented control */
.tk-seg { display: inline-flex; background: var(--bg-secondary, #0b1120); border: 1px solid var(--border, rgba(148, 163, 184, .16)); border-radius: 10px; padding: 3px; gap: 3px; }
.tk-seg button {
  padding: 7px 15px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text-secondary, #9aa8bd);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.tk-seg button:hover { color: var(--text-primary, #e7ecf5); }
.tk-seg button.tk-seg--active { background: var(--surface, #0e1626); color: var(--text-primary, #e7ecf5); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }

/* toggle switch */
.tk-switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.tk-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tk-switch__track { width: 34px; height: 19px; border-radius: 100px; background: var(--border-strong, rgba(148, 163, 184, .28)); transition: background .2s; position: relative; flex-shrink: 0; }
.tk-switch__track::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.tk-switch input:checked ~ .tk-switch__track { background: var(--primary, #6366f1); }
.tk-switch input:checked ~ .tk-switch__track::after { transform: translateX(15px); }
.tk-switch input:focus-visible ~ .tk-switch__track { outline: 2px solid var(--accent, #22d3ee); outline-offset: 2px; }
.tk-switch__text { font-size: 0.84rem; color: var(--text-secondary, #9aa8bd); font-weight: 600; }

/* ── Alerts / notes ────────────────────────────────────────── */
.tk-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid;
}
.tk-alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }
.tk-alert--info { background: var(--primary-50, rgba(99, 102, 241, .12)); border-color: var(--primary-100, rgba(99, 102, 241, .22)); color: var(--text-secondary, #9aa8bd); }
.tk-alert--info strong, .tk-alert--info b { color: var(--primary-light, #818cf8); }
.tk-alert--warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); color: var(--text-secondary, #9aa8bd); }
.tk-alert--warn strong, .tk-alert--warn b { color: #fbbf24; }
.tk-alert--error { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); color: var(--text-secondary, #9aa8bd); }
.tk-alert--error strong, .tk-alert--error b { color: #f87171; }
.tk-alert--success { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); color: var(--text-secondary, #9aa8bd); }
.tk-alert--success strong, .tk-alert--success b { color: #34d399; }
.tk-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-secondary, #0b1120);
  border: 1px dashed var(--border-strong, rgba(148, 163, 184, .28));
  font-size: 0.8rem;
  color: var(--text-tertiary, #64748b);
  line-height: 1.55;
}
.tk-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--primary-light, #818cf8); }

/* ── Toast ─────────────────────────────────────────────────── */
.tk-toast {
  padding: 10px 16px;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #34d399;
  animation: tk-toast-in .25s ease;
}
.tk-toast[hidden] { display: none; }
@keyframes tk-toast-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── Empty / loading states ────────────────────────────────── */
/* The `hidden` attribute must always win over display rules
   (e.g. .tk-loading's display:flex), so toggled elements never
   show before the user starts a task. */
[hidden] { display: none !important; }
.tk-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-tertiary, #64748b);
  font-size: 0.88rem;
  border: 1px dashed var(--border-strong, rgba(148, 163, 184, .28));
  border-radius: 12px;
  background: var(--bg-secondary, #0b1120);
}
.tk-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 2rem 1rem; color: var(--text-secondary, #9aa8bd); font-size: 0.9rem; font-weight: 600; }
.tk-spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid var(--border-strong, rgba(148, 163, 184, .28));
  border-top-color: var(--primary, #6366f1);
  animation: tk-spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* ── Numerical progress bar (0–100%) ───────────────────────── */
.tk-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.tk-progress__label {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #9aa8bd);
  white-space: nowrap;
}
.tk-progress__bar {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: var(--border-strong, rgba(148, 163, 184, .28));
  overflow: hidden;
}
.tk-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary, #6366f1), var(--primary-light, #818cf8));
  transition: width .22s ease;
}
.tk-progress__pct {
  flex-shrink: 0;
  min-width: 3.2ch;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text, #e2e8f0);
}
@media (max-width: 480px) {
  .tk-progress { flex-wrap: wrap; }
  .tk-progress__label { width: 100%; }
  .tk-progress__pct { min-width: 2.8ch; }
}

/* ── Code output ───────────────────────────────────────────── */
.tk-code {
  width: 100%;
  box-sizing: border-box;
  min-height: 180px;
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 12px;
  background: #0b1220;
  color: #dbe4f3;
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  tab-size: 2;
  white-space: pre;
}
.tk-code--plain { background: var(--bg-secondary, #0b1120); color: var(--text-primary, #e7ecf5); white-space: pre-wrap; }

/* ── Pagination ────────────────────────────────────────────── */
.tk-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-tertiary, #64748b); }
.tk-pagination__btns { display: flex; gap: 6px; }

/* ── Chart containers ──────────────────────────────────────── */
.tk-chart { width: 100%; }
.tk-chart svg { display: block; width: 100%; height: auto; }
.tk-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-secondary, #9aa8bd); }
.tk-legend__dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ── Tree (heading hierarchy) ──────────────────────────────── */
.tk-tree {
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.75;
  background: var(--bg-secondary, #0b1120);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-primary, #e7ecf5);
}
.tk-tree .tk-tree-h1 { color: var(--primary-light, #818cf8); font-weight: 700; }
.tk-tree .tk-tree-h2 { color: #34d399; }
.tk-tree .tk-tree-h3 { color: #fbbf24; }
.tk-tree .tk-tree-h4 { color: #22d3ee; }
.tk-tree .tk-tree-h5, .tk-tree .tk-tree-h6 { color: #f472b6; }

/* ── Chain / flow diagram ──────────────────────────────────── */
.tk-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; }
.tk-flow__node {
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong, rgba(148, 163, 184, .28));
  background: var(--surface, #0e1626);
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--text-primary, #e7ecf5);
  max-width: 260px;
}
.tk-flow__node--final { border-color: rgba(16, 185, 129, .45); background: rgba(16, 185, 129, .08); }
.tk-flow__node--loop { border-color: rgba(239, 68, 68, .5); background: rgba(239, 68, 68, .08); }
.tk-flow__arrow { color: var(--text-tertiary, #64748b); font-weight: 700; flex-shrink: 0; }
.tk-flow__code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-secondary, #0b1120);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  font-size: 0.76rem;
  font-weight: 700;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}

/* ── Key-value grid (inspection results) ───────────────────── */
.tk-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tk-kv__item {
  background: var(--bg-secondary, #0b1120);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 10px;
  padding: 11px 13px;
}
.tk-kv__key { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-tertiary, #64748b); font-weight: 700; margin-bottom: 4px; }
.tk-kv__val { font-size: 0.88rem; color: var(--text-primary, #e7ecf5); word-break: break-word; line-height: 1.5; }

/* ── Related tools grid ────────────────────────────────────── */
.tk-rel { margin-top: 2.5rem; }
.tk-rel__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-primary, #e7ecf5); }
.tk-rel__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tk-rel-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--surface, #0e1626);
  border: 1px solid var(--border, rgba(148, 163, 184, .16));
  border-radius: 12px;
  transition: all .15s;
}
.tk-rel-card:hover { border-color: var(--primary, #6366f1); transform: translateY(-2px); box-shadow: var(--shadow-md, 0 6px 24px rgba(0, 0, 0, .4)); }
.tk-rel-card__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-50, rgba(99, 102, 241, .12)); color: var(--primary-light, #818cf8); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tk-rel-card__icon svg { width: 18px; height: 18px; }
.tk-rel-card__name { font-size: 0.84rem; font-weight: 700; color: var(--text-primary, #e7ecf5); line-height: 1.35; }

/* ── Misc helpers ──────────────────────────────────────────── */
.tk-mt { margin-top: 1.25rem; }
.tk-mb { margin-bottom: 1.25rem; }
.tk-muted { color: var(--text-tertiary, #64748b); }
.tk-small { font-size: 0.8rem; }
.tk-mono { font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; }
.tk-num { font-variant-numeric: tabular-nums; }
.tk-wrap-anywhere { overflow-wrap: anywhere; word-break: break-word; }
.tk-center { text-align: center; }
.tk-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.tk-dot--ok { background: #10b981; }
.tk-dot--warn { background: #f59e0b; }
.tk-dot--crit { background: #ef4444; }
.tk-dot--muted { background: var(--text-tertiary, #64748b); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tk-grid, .tk-grid--38, .tk-grid--62 { grid-template-columns: 1fr; }
  .tk-section { padding: 2.5rem 0; }
}
@media (max-width: 560px) {
  .tk-row { flex-direction: column; align-items: stretch; }
  .tk-row > .tk-field { width: 100%; }
  .tk-card { padding: 1.1rem; }
  .tk-header__icon-wrap { display: none; }
  .tk-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tk-tabs::-webkit-scrollbar { display: none; }
  .tk-tab { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-spinner { animation-duration: 1.6s; }
  .tk-panel--active { animation: none; }
}

/* ════════════════════════════════════════════════════════════
   TOOLSHUB4U TOOLKIT — EXTENSIONS
   Components used by the 2026 SEO toolkit additions:
   distribution bars, hreflang map, keyword clusters, merge bar,
   method picker, dropzone, range slider, score gauge, code block
   ════════════════════════════════════════════════════════════ */

/* ── Alert / issue variants ────────────────────────────────── */
.tk-alert--crit { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); color: var(--text-secondary, #9aa8bd); }
.tk-alert--crit strong, .tk-alert--crit b { color: #f87171; }
.tk-issue--info { border-left: 4px solid #38bdf8; }

/* ── Distribution bars ─────────────────────────────────────── */
.tk-dist { display: flex; flex-direction: column; gap: 12px; }
.tk-dist-row { display: flex; flex-direction: column; gap: 4px; }
.tk-dist-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--text-secondary, #9aa8bd); margin-bottom: 4px; }
.tk-dist-label strong { color: var(--text-primary, #e7ecf5); font-variant-numeric: tabular-nums; }
.tk-dist-track { height: 8px; border-radius: 99px; background: var(--bg-secondary, #0b1120); overflow: hidden; }
.tk-dist-fill { height: 100%; border-radius: 99px; transition: width .4s ease; min-width: 2px; }

/* ── Hreflang map ──────────────────────────────────────────── */
.tk-hlang-map { display: flex; flex-direction: column; gap: 8px; }
.tk-hlang-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--border, rgba(148, 163, 184, .16)); border-radius: 10px; background: var(--surface, #0e1626); font-size: .85rem; }
.tk-hlang-lang { min-width: 74px; text-align: center; font-variant-numeric: tabular-nums; }
.tk-hlang-arrow { color: var(--text-tertiary, #64748b); }
.tk-hlang-url { font-family: 'Fira Code', Consolas, 'Courier New', monospace; font-size: .8rem; color: var(--primary-light, #818cf8); overflow-wrap: anywhere; }

/* ── Keyword clusters ──────────────────────────────────────── */
.tk-clusters { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.tk-cluster { border: 1px solid var(--border, rgba(148, 163, 184, .16)); border-radius: 14px; padding: 16px; background: var(--surface, #0e1626); }
.tk-cluster--selected { border-color: var(--primary, #6366f1); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.tk-cluster__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-cluster__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .98rem; font-weight: 700; color: var(--text-primary, #e7ecf5); }
.tk-cluster__name { outline: none; border-bottom: 1px dashed transparent; padding: 0 2px; border-radius: 4px; }
.tk-cluster__name:hover { border-bottom-color: var(--border-strong, rgba(148, 163, 184, .28)); }
.tk-cluster__name:focus { border-bottom-color: var(--primary, #6366f1); background: var(--primary-50, rgba(99, 102, 241, .1)); }
.tk-cluster__pick { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--border, rgba(148, 163, 184, .16)); color: var(--text-secondary, #9aa8bd); border-radius: 8px; padding: 5px 10px; font-size: .78rem; cursor: pointer; }
.tk-cluster__pick:hover { border-color: var(--primary, #6366f1); }
.tk-checkbox { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border-strong, rgba(148, 163, 184, .28)); font-size: 11px; color: #fff; }
.tk-checkbox--on { background: var(--primary, #6366f1); border-color: var(--primary, #6366f1); }
.tk-cluster__pillar { margin: 12px 0; padding: 11px 13px; border: 1px dashed var(--border-strong, rgba(148, 163, 184, .28)); border-radius: 10px; background: var(--bg-secondary, #0b1120); }
.tk-cluster__pillar-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-tertiary, #64748b); font-weight: 700; margin-bottom: 4px; }
.tk-cluster__pillar-title { font-size: .9rem; font-weight: 600; color: var(--primary-light, #818cf8); }
.tk-cluster__pillar-url { font-family: 'Fira Code', Consolas, 'Courier New', monospace; font-size: .76rem; color: var(--text-tertiary, #64748b); }
.tk-cluster__list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: .84rem; color: var(--text-secondary, #9aa8bd); }
.tk-cluster__list li { padding-left: 14px; position: relative; }
.tk-cluster__list li::before { content: '·'; position: absolute; left: 2px; color: var(--primary-light, #818cf8); }
.tk-cluster__primary { font-weight: 600; color: var(--text-primary, #e7ecf5); }
.tk-cluster__more { color: var(--text-tertiary, #64748b); font-style: italic; }
.tk-cluster__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Merge bar ─────────────────────────────────────────────── */
.tk-merge-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 11px 14px; border: 1px dashed var(--primary-100, rgba(99, 102, 241, .22)); border-radius: 10px; background: var(--primary-50, rgba(99, 102, 241, .08)); font-size: .85rem; color: var(--text-secondary, #9aa8bd); }
.tk-merge-bar .tk-btn { margin-left: auto; }

/* ── Method picker ─────────────────────────────────────────── */
.tk-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tk-method { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 13px; border: 1px solid var(--border, rgba(148, 163, 184, .16)); border-radius: 12px; background: var(--surface, #0e1626); color: var(--text-secondary, #9aa8bd); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.tk-method:hover { border-color: var(--primary, #6366f1); }
.tk-method--active { border-color: var(--primary, #6366f1); background: var(--primary-50, rgba(99, 102, 241, .1)); }
.tk-method__icon { font-size: 1.15rem; }
.tk-method__name { font-size: .85rem; font-weight: 700; color: var(--text-primary, #e7ecf5); }
.tk-method__desc { font-size: .75rem; line-height: 1.5; color: var(--text-tertiary, #64748b); }

/* ── Dropzone ──────────────────────────────────────────────── */
.tk-dropzone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1.5px dashed var(--border-strong, rgba(148, 163, 184, .28)); border-radius: 12px; padding: 18px; }
.tk-dropzone strong { color: var(--text-primary, #e7ecf5); font-size: .92rem; }

/* ── Range slider ──────────────────────────────────────────── */
.tk-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: var(--bg-secondary, #0b1120); outline: none; cursor: pointer; }
.tk-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary, #6366f1); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.tk-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary, #6366f1); border: 2px solid #fff; }

/* ── Label row ─────────────────────────────────────────────── */
.tk-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ── Score head / gauge ────────────────────────────────────── */
.tk-score-head { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.tk-score-gauge { text-align: center; }
.tk-score-note { max-width: 340px; font-size: .9rem; color: var(--text-secondary, #9aa8bd); line-height: 1.6; }
.tk-stats--grow { flex: 1; min-width: 260px; }

/* ── Code block ────────────────────────────────────────────── */
.tk-code-block { display: block; background: var(--bg-secondary, #0b1120); border: 1px solid var(--border, rgba(148, 163, 184, .16)); border-radius: 10px; padding: 13px 15px; font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; font-size: .8rem; line-height: 1.6; color: var(--text-primary, #e7ecf5); white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; }

/* ── Inline SVG sizing (badges, chips, alerts, method icons) ─ */
.tk-badge svg, .tk-chip svg, .tk-badge__icon { width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }
.tk-alert > svg { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; }
.tk-method__icon svg { width: 17px; height: 17px; }
.tk-btn svg { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }

/* ── Misc helpers ──────────────────────────────────────────── */
.tk-break { overflow-wrap: anywhere; word-break: break-word; }
.tk-ml { margin-left: 8px; }
.tk-input--sm { padding: 6px 10px; font-size: .8rem; min-height: 0; }

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

/* ════════════════════════════════════════════════════════════
   GSC PERFORMANCE REPLICA — Google Search Console look
   A faithful re-creation of the GSC "Performance" report.
   Hardcoded light palette so it renders exactly like the real
   report in both the site's light and dark themes.
   ════════════════════════════════════════════════════════════ */
.gsc-ui {
  --gsc-blue: #1a73e8;
  --gsc-purple: #a142f4;
  --gsc-teal: #00897b;
  --gsc-orange: #e8710a;
  --gsc-bg: #f8f9fa;
  --gsc-card: #ffffff;
  --gsc-border: #dadce0;
  --gsc-grid: #e8eaed;
  --gsc-text: #202124;
  --gsc-text-2: #5f6368;
  --gsc-text-3: #9aa0a6;
  --gsc-hover: #f1f3f4;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  background: var(--gsc-bg);
  border: 1px solid var(--gsc-border);
  border-radius: 10px;
  padding: 14px 16px 18px;
  color: var(--gsc-text);
  font-size: 14px;
  line-height: 1.45;
}
.gsc-ui * { box-sizing: border-box; }

/* ── Header row ────────────────────────────────────────────── */
.gsc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.gsc-title { font-size: 22px; font-weight: 500; color: var(--gsc-text); }
.gsc-top__right { display: flex; align-items: center; gap: 14px; }
.gsc-export {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gsc-card); color: var(--gsc-text);
  border: 1px solid var(--gsc-border); border-radius: 4px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .4px; cursor: pointer; font-family: inherit;
}
.gsc-export:hover { background: var(--gsc-hover); }
.gsc-export__icon { width: 15px; height: 15px; }

/* ── Filter bar ────────────────────────────────────────────── */
.gsc-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.gsc-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gsc-datepicker { display: flex; align-items: center; gap: 6px; }
.gsc-more { position: relative; }
.gsc-more__menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  background: var(--gsc-card); border: 1px solid var(--gsc-border); border-radius: 8px;
  box-shadow: 0 4px 14px rgba(60, 64, 67, .24); min-width: 170px; padding: 6px 0;
}
.gsc-more__opt {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 9px 14px; font-size: 13px; color: var(--gsc-text); cursor: pointer; font-family: inherit;
}
.gsc-more__opt:hover { background: var(--gsc-hover); }
.gsc-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gsc-card); color: var(--gsc-text);
  border: 1px solid var(--gsc-border); border-radius: 16px;
  padding: 6px 13px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.gsc-pill:hover { background: var(--gsc-hover); }
.gsc-pill--active { background: var(--gsc-blue); border-color: var(--gsc-blue); color: #fff; }
.gsc-pill--active:hover { background: #1b66c9; }
.gsc-pill__caret { width: 12px; height: 12px; color: var(--gsc-text-3); }
.gsc-pill--active .gsc-pill__caret { color: #fff; }
.gsc-pill--search strong { font-weight: 600; }
.gsc-pill--add { color: var(--gsc-blue); }
.gsc-pill--add svg { width: 13px; height: 13px; }
.gsc-iconbtn {
  width: 32px; height: 32px; border-radius: 4px;
  background: var(--gsc-blue); border: none; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.gsc-iconbtn svg { width: 17px; height: 17px; }
.gsc-resetlink { background: none; border: none; color: var(--gsc-blue); font-size: 13px; cursor: pointer; padding: 6px 4px; font-family: inherit; }
.gsc-resetlink:hover { text-decoration: underline; }
.gsc-lastupdate { color: var(--gsc-text-3); font-size: 12px; white-space: nowrap; }

/* ── Filter chips ──────────────────────────────────────────── */
.gsc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gsc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gsc-card); border: 1px solid var(--gsc-border);
  border-radius: 14px; padding: 5px 10px; font-size: 12.5px; color: var(--gsc-text);
}
.gsc-chip strong { font-weight: 500; color: var(--gsc-blue); }
.gsc-chip__x { border: none; background: none; color: var(--gsc-text-3); cursor: pointer; font-size: 14px; line-height: 1; padding: 2px; font-family: inherit; }
.gsc-chip__x:hover { color: var(--gsc-text); }

/* ── White report card ─────────────────────────────────────── */
.gsc-card { background: var(--gsc-card); border: 1px solid var(--gsc-border); border-radius: 8px; padding: 14px; margin-bottom: 16px; }

/* ── Metric tiles (4 across on desktop, 2x2 on mobile) ────── */
.gsc-tiles { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: stretch; }
.gsc-tile {
  position: relative; min-width: 0;
  background: var(--gsc-card); border: 1px solid var(--gsc-border);
  border-radius: 8px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; transition: background .15s ease, box-shadow .15s ease;
}
.gsc-tile:hover { box-shadow: 0 1px 3px rgba(60, 64, 67, .28); }
.gsc-tile input { position: absolute; opacity: 0; pointer-events: none; }
.gsc-tile__check {
  width: 16px; height: 16px; border: 2px solid var(--gsc-text-3);
  border-radius: 3px; display: inline-flex; align-items: center; justify-content: center;
}
.gsc-tile__check::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid transparent; border-bottom: 2px solid transparent;
  transform: rotate(-45deg) translate(0, -1px);
}
.gsc-tile input:checked + .gsc-tile__check { border-color: var(--gsc-blue); }
.gsc-tile input:checked + .gsc-tile__check::after { border-color: var(--gsc-blue); }
.gsc-tile__name { font-size: 12.5px; color: var(--gsc-text-2); }
.gsc-tile__num { font-size: 25px; font-weight: 600; color: var(--gsc-text); font-variant-numeric: tabular-nums; }
.gsc-tile__help {
  position: absolute; right: 12px; bottom: 12px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--gsc-text-3); color: var(--gsc-text-3);
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  transition: color .15s ease, border-color .15s ease;
}
/* checked → solid color fill with white content (GSC classic tiles) */
.gsc-tile--on.gsc-tile--clicks { background: var(--gsc-blue); border-color: var(--gsc-blue); }
.gsc-tile--on.gsc-tile--impressions { background: var(--gsc-purple); border-color: var(--gsc-purple); }
.gsc-tile--on.gsc-tile--ctr { background: var(--gsc-teal); border-color: var(--gsc-teal); }
.gsc-tile--on.gsc-tile--position { background: var(--gsc-orange); border-color: var(--gsc-orange); }
.gsc-tile--on:hover { box-shadow: 0 2px 6px rgba(32, 33, 36, .35); }
.gsc-tile--on .gsc-tile__name, .gsc-tile--on .gsc-tile__num { color: #fff; }
.gsc-tile--on .gsc-tile__check { border-color: #fff; }
.gsc-tile--on .gsc-tile__check::after { border-color: #fff; }
.gsc-tile--on .gsc-tile__help { color: rgba(255, 255, 255, .92); border-color: rgba(255, 255, 255, .92); }
.gsc-tiles__right { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; justify-content: flex-end; padding-bottom: 4px; }
.gsc-sel-label { font-size: 12px; color: var(--gsc-text-2); }
.gsc-select {
  font-family: inherit; font-size: 12.5px; color: var(--gsc-text);
  border: 1px solid var(--gsc-border); border-radius: 4px;
  padding: 6px 10px; background: var(--gsc-card); cursor: pointer;
}

/* ── Chart ─────────────────────────────────────────────────── */
.gsc-chart { margin-top: 14px; }
.gsc-chart svg { width: 100%; height: auto; display: block; }

/* ── Info banner (GSC-style notice) ────────────────────────── */
.gsc-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #e8f0fe; border: 1px solid #d2e3fc; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: #1a0dab;
}
.gsc-banner > svg { width: 17px; height: 17px; flex-shrink: 0; color: #1967d2; }
.gsc-banner__link {
  margin-left: auto; color: #1967d2; font-weight: 600; text-decoration: none;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
}
.gsc-banner__link:hover { text-decoration: underline; }
.gsc-banner__link svg { width: 13px; height: 13px; }
.gsc-sort { width: 11px; height: 11px; margin-left: 3px; vertical-align: -1px; color: var(--gsc-text-2); }

/* ── Breakdown tabs + table ────────────────────────────────── */
.gsc-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--gsc-border); }
.gsc-tab {
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 12px 14px; font-size: 13px; font-weight: 500; letter-spacing: .3px;
  color: var(--gsc-text-2); text-transform: uppercase; cursor: pointer; font-family: inherit;
}
.gsc-tab:hover { color: var(--gsc-text); background: var(--gsc-hover); }
.gsc-tab--active { color: var(--gsc-text); font-weight: 600; border-bottom-color: var(--gsc-text); }
.gsc-card--table { margin-bottom: 0; border-radius: 0 0 8px 8px; padding: 0; overflow: hidden; }
.gsc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gsc-table th {
  text-align: right; font-weight: 500; color: var(--gsc-text-2);
  padding: 12px 14px; border-bottom: 1px solid var(--gsc-border); font-size: 12px;
}
.gsc-table th:first-child { text-align: left; }
.gsc-table td {
  padding: 11px 14px; border-bottom: 
  padding: 11px 14px; border-bottom: 1px solid var(--gsc-grid);
  text-align: right; color: var(--gsc-text); font-variant-numeric: tabular-nums;
}
.gsc-table td:first-child { text-align: left; }
.gsc-table tbody tr:last-child td { border-bottom: none; }
.gsc-table tbody tr:hover { background: var(--gsc-hover); }
.gsc-table .gsc-cell--link { color: var(--gsc-blue); }
.gsc-table .gsc-cell--mono { font-family: Consolas, Menlo, monospace; font-size: 12px; }
.gsc-note { padding: 10px 14px; font-size: 11.5px; color: var(--gsc-text-3); border-top: 1px solid var(--gsc-border); }

/* ── Table footer (rows per page + pager) ──────────────────── */
.gsc-table-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--gsc-border);
  font-size: 12px; color: var(--gsc-text-2);
}
.gsc-page-size { display: inline-flex; align-items: center; gap: 6px; }
.gsc-page-size select {
  font-family: inherit; font-size: 12px; color: var(--gsc-text);
  border: 1px solid var(--gsc-border); border-radius: 4px;
  padding: 4px 8px; background: var(--gsc-card); cursor: pointer;
}
.gsc-pager { display: inline-flex; align-items: center; gap: 4px; }
.gsc-pager button {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--gsc-border); border-radius: 4px;
  color: var(--gsc-text-2); cursor: pointer; font-family: inherit;
}
.gsc-pager button:hover:not(:disabled) { background: var(--gsc-hover); }
.gsc-pager button:disabled { opacity: .4; cursor: default; }
.gsc-pager button svg { width: 14px; height: 14px; }
.gsc-page-info { font-variant-numeric: tabular-nums; }

/* ── Table scrolling (mobile) ──────────────────────────────── */
.gsc-table-scroll { overflow-x: auto; }
@media (max-width: 720px) {
  .gsc-table { min-width: 620px; }
  .gsc-table th:first-child, .gsc-table td:first-child {
    position: sticky; left: 0; background: var(--gsc-card); z-index: 1;
  }
  .gsc-table tbody tr:hover td:first-child { background: var(--gsc-hover); }
}

/* ── Full-width layout spacing ─────────────────────────────── */
.gsc-ui { margin-bottom: 24px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gsc-tiles { grid-template-columns: repeat(2, 1fr); }
  .gsc-tiles__right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-end; }
}
@media (max-width: 620px) {
  .gsc-ui { padding: 12px 10px 14px; }
  .gsc-tiles { gap: 8px; }
  .gsc-lastupdate { margin-left: 0; width: 100%; }
}

/* ── Config card (top, full-width, collapsible) ────────────── */
.gsc-config { margin-bottom: 20px; }
.gsc-config__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.gsc-config__title { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--text-primary, #e7ecf5); }
.gsc-config__toggle {
  background: none; border: 1px solid var(--border-strong, rgba(148, 163, 184, .28));
  color: var(--text-secondary, #9aa8bd); border-radius: 8px;
  padding: 6px 12px; font-size: .8rem; font-weight: 600; cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.gsc-config__toggle:hover { color: var(--text-primary, #e7ecf5); border-color: var(--text-tertiary, #64748b); }
.gsc-config__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gsc-span-2 { grid-column: span 2; }
.gsc-config__hint { margin: 0 0 12px; }
.gsc-advanced { margin-top: 0; }
@media (max-width: 900px) {
  .gsc-config__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gsc-config__grid { grid-template-columns: 1fr; }
  .gsc-span-2 { grid-column: span 1; }
  .gsc-config__head { flex-wrap: wrap; }
}
