/* ============================================================
   123TinyTools – JSON to CSV Converter  ·  json-csv.css
   Version: 2.1.2
   All selectors scoped under .tia-jc-wrap
   Dark mode: body-class only — never @media(prefers-color-scheme)
   ============================================================ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
.tia-jc-wrap {
  --jc-blue:      #5B8DEF;
  --jc-blue-h:    #4B7CF3;
  --jc-blue-50:   #EFF4FF;
  --jc-blue-200:  #B8D0FF;
  --jc-green:     #16A34A;
  --jc-green-h:   #15803D;
  --jc-green-50:  #F0FDF4;
  --jc-green-100: #DCFCE7;
  --jc-green-200: #BBF7D0;
  --jc-green-700: #15803D;
  --jc-text:      #1E293B;
  --jc-body:      #475569;
  --jc-muted:     #64748B;
  --jc-surface:   #FFFFFF;
  --jc-bg:        #F8FAFD;
  --jc-border:    #E4EAF4;
  --jc-border-s:  #CBD5E1;
  --jc-slate-50:  #F8FAFD;
  --jc-slate-100: #F1F5F9;
  --jc-success:   #22C55E;
  --jc-warn-bg:   #FEF3C7;
  --jc-err-bg:    #FEE2E2;
  --jc-sh-sm:  0 1px 2px rgba(74,124,243,.04), 0 1px 3px rgba(0,0,0,.06);
  --jc-sh-md:  0 4px 8px  rgba(74,124,243,.07), 0 2px 4px rgba(0,0,0,.05);
  --jc-sh-lg:  0 10px 24px rgba(74,124,243,.09), 0 4px 8px rgba(0,0,0,.05);
  --jc-r-sm:   6px;
  --jc-r-md:   10px;
  --jc-r-lg:   16px;
  --jc-r-xl:   22px;
  --jc-r-pill: 9999px;
  --jc-fh: 'Plus Jakarta Sans', system-ui, sans-serif;
  --jc-fb: 'Inter', system-ui, sans-serif;
  --jc-fm: 'JetBrains Mono', 'Fira Code', monospace;

  font-family: var(--jc-fb);
  color: var(--jc-text);
  padding: 24px 0 64px;
  -webkit-font-smoothing: antialiased;
}

/* ── DARK MODE ─────────────────────────────────────────────── */
/* html[data-theme="dark"] = Kadence primary signal */
html[data-theme="dark"] .tia-jc-wrap,
.kt-dark-mode .tia-jc-wrap,
.dark-mode .tia-jc-wrap,
body[data-theme="dark"] .tia-jc-wrap,
.is-dark .tia-jc-wrap,
html.wp-dark-mode-active .tia-jc-wrap,
body.wp-dark-mode-active .tia-jc-wrap {
  --jc-text:     #F1F5F9;
  --jc-body:     #CBD5E1;
  --jc-muted:    #94A3B8;
  --jc-surface:  #1E293B;
  --jc-bg:       #0F172A;
  --jc-border:   #334155;
  --jc-border-s: #475569;
  --jc-slate-50: #0F172A;  /* darker than surface (#1E293B) → tab bar ≠ active tab */
  --jc-slate-100:#334155;
}

/* ── INTRO CONTENT ─────────────────────────────────────────── */
.tia-jc-intro-content {
  margin-bottom: 24px;
}

/* ── HEADER ────────────────────────────────────────────────── */
.tia-jc-header {
  margin-bottom: 20px;
}

.tia-jc-h1 {
  font-family: var(--jc-fh);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.15;
  color: var(--jc-text);
  margin: 0 0 5px;
}

.tia-jc-tagline {
  font-size: 14px;
  color: var(--jc-muted);
  line-height: 1.55;
  margin: 0 0 10px;
}

.tia-jc-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.tia-jc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 500;
  color: var(--jc-green-700);
  background: var(--jc-green-50);
  border: 1px solid var(--jc-green-200);
  border-radius: var(--jc-r-pill);
  padding: 3px 10px;
  white-space: nowrap;
}
.tia-jc-badge svg { width: 11px; height: 11px; flex-shrink: 0; }

/* Badge: dark mode — green tokens not flipped; light green bg jarring on dark surface */
html[data-theme="dark"] .tia-jc-wrap .tia-jc-badge,
.kt-dark-mode .tia-jc-wrap .tia-jc-badge,
.dark-mode .tia-jc-wrap .tia-jc-badge,
body[data-theme="dark"] .tia-jc-wrap .tia-jc-badge,
.is-dark .tia-jc-wrap .tia-jc-badge,
html.wp-dark-mode-active .tia-jc-wrap .tia-jc-badge,
body.wp-dark-mode-active .tia-jc-wrap .tia-jc-badge {
  background: rgba(22,163,74,.15);
  border-color: rgba(22,163,74,.30);
  color: #86EFAC;
}

/* ── PRIVACY NOTICE ────────────────────────────────────────── */
.tia-jc-privacy {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px;
  color: var(--jc-body);
  background: var(--jc-blue-50);
  border: 1px solid var(--jc-blue-200);
  border-radius: var(--jc-r-md);
  padding: 10px 14px;
  margin: 0 0 20px;
  line-height: 1.5;
}
.tia-jc-privacy svg { flex-shrink: 0; color: var(--jc-blue); }

/* ── INPUT CARD ────────────────────────────────────────────── */
.tia-jc-input-card {
  background: var(--jc-surface);
  border: none;
  border-radius: var(--jc-r-xl);
  box-shadow: 0 2px 20px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  overflow: hidden;
  margin-bottom: 14px;
}

/* Tabs */
.tia-jc-tabs {
  display: flex;
  background: var(--jc-slate-50);
  border-bottom: 1px solid var(--jc-border);
}

.tia-jc-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 16px;
  font-family: var(--jc-fb);
  font-size: 13.5px; font-weight: 600;
  color: var(--jc-muted);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.tia-jc-tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.tia-jc-tab--active {
  color: var(--jc-blue);
  border-bottom-color: var(--jc-blue);
  background: var(--jc-surface);
}
.tia-jc-tab:not(.tia-jc-tab--active):hover {
  color: var(--jc-body);
  background: var(--jc-slate-100);
}
.tia-jc-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--jc-blue);
}

/* Paste pane */
.tia-jc-paste-pane { padding: 16px; }

.tia-jc-textarea {
  width: 100%; min-height: 200px; max-height: 420px;
  font-family: var(--jc-fm);
  font-size: 13px; line-height: 1.65;
  color: var(--jc-text);
  background: var(--jc-slate-50);
  border: 1.5px solid var(--jc-border);
  border-radius: var(--jc-r-md);
  padding: 14px 16px;
  resize: none;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  display: block;
}
.tia-jc-textarea:focus {
  border-color: var(--jc-green);
  background: var(--jc-surface);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.tia-jc-textarea::placeholder {
  color: var(--jc-muted);
  font-family: var(--jc-fb);
  font-size: 13.5px;
}

.tia-jc-paste-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}

.tia-jc-char-count {
  font-size: 12px;
  color: var(--jc-muted);
  font-family: var(--jc-fm);
}

.tia-jc-paste-btns { display: flex; align-items: center; gap: 6px; }

/* Upload pane */
.tia-jc-upload-pane { padding: 16px; }

.tia-jc-dropzone {
  border: 2px dashed var(--jc-green-200);
  border-radius: var(--jc-r-lg);
  background: var(--jc-green-50);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tia-jc-dropzone:hover,
.tia-jc-dropzone--over,
.tia-jc-dropzone:focus-visible {
  border-color: var(--jc-green);
  background: var(--jc-green-100);
  outline: none;
}

.tia-jc-dropzone-icon {
  width: 52px; height: 52px;
  background: var(--jc-green-100);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  color: var(--jc-green);
}
.tia-jc-dropzone-icon svg { width: 26px; height: 26px; }

.tia-jc-dropzone-title {
  font-family: var(--jc-fh);
  font-size: 16px; font-weight: 700;
  color: var(--jc-text);
  margin: 0 0 4px;
}
.tia-jc-dropzone-sub {
  font-size: 13.5px;
  color: var(--jc-muted);
  margin: 0 0 4px;
}
.tia-jc-browse {
  color: var(--jc-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tia-jc-file-note {
  font-size: 12px;
  color: var(--jc-muted);
  font-family: var(--jc-fm);
  margin: 8px 0 0;
}
.tia-jc-file-input { display: none; }

/* ── STATUS BAR ────────────────────────────────────────────── */
.tia-jc-status {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: var(--jc-r-md);
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 14px;
  transition: background .2s, border-color .2s;
}
.tia-jc-status--idle {
  background: var(--jc-slate-100);
  color: var(--jc-muted);
  border: 1px solid var(--jc-border);
}
.tia-jc-status--valid {
  background: var(--jc-green-50);
  color: var(--jc-green-700);
  border: 1px solid var(--jc-green-200);
}
.tia-jc-status--error {
  background: var(--jc-err-bg);
  color: #991B1B;
  border: 1px solid #FCA5A5;
}
.tia-jc-status--warning {
  background: var(--jc-warn-bg);
  color: #92400E;
  border: 1px solid #FCD34D;
}
.tia-jc-status__icon {
  flex-shrink: 0; width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tia-jc-status__text { flex: 1; }
.tia-jc-status__pills {
  margin-left: auto;
  display: flex; gap: 5px; flex-wrap: wrap; flex-shrink: 0;
}
.tia-jc-stat-pill {
  font-size: 11.5px; font-weight: 600;
  font-family: var(--jc-fm);
  padding: 2px 10px;
  border-radius: var(--jc-r-pill);
  background: var(--jc-green-100);
  color: var(--jc-green-700);
}

/* ── OPTIONS CARD ──────────────────────────────────────────── */
.tia-jc-options-card {
  background: var(--jc-surface);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-lg);
  box-shadow: var(--jc-sh-sm);
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
}

.tia-jc-option-group {
  display: flex; align-items: center; gap: 8px;
}
.tia-jc-option-label {
  font-size: 13px; font-weight: 500;
  color: var(--jc-body);
  white-space: nowrap;
}

.tia-jc-select {
  font-family: var(--jc-fb);
  font-size: 13px; font-weight: 500;
  color: var(--jc-text);
  background: var(--jc-slate-50);
  border: 1.5px solid var(--jc-border);
  border-radius: var(--jc-r-sm);
  padding: 5px 28px 5px 10px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.tia-jc-select:focus {
  border-color: var(--jc-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}

.tia-jc-opt-divider {
  width: 1px; height: 26px;
  background: var(--jc-border);
  flex-shrink: 0;
}

/* Custom delimiter text input */
.tia-jc-custom-delim-input {
  font-family: var(--jc-fm);
  font-size: 13px; font-weight: 500;
  color: var(--jc-text);
  background: var(--jc-slate-50);
  border: 1.5px solid var(--jc-green-200);
  border-radius: var(--jc-r-sm);
  padding: 5px 10px;
  width: 80px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.tia-jc-custom-delim-input::placeholder {
  color: var(--jc-muted);
  font-family: var(--jc-fb);
}
.tia-jc-custom-delim-input:focus {
  border-color: var(--jc-green);
  background: var(--jc-surface);
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}

/* Toggle switch */
.tia-jc-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--jc-body);
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
.tia-jc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tia-jc-toggle-track {
  width: 32px; height: 17px;
  border-radius: 9px;
  background: var(--jc-border-s);
  position: relative; flex-shrink: 0;
  transition: background .15s;
}
.tia-jc-toggle input:checked + .tia-jc-toggle-track { background: var(--jc-green); }
.tia-jc-toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s;
}
.tia-jc-toggle input:checked + .tia-jc-toggle-track::after { transform: translateX(15px); }
.tia-jc-toggle input:focus-visible + .tia-jc-toggle-track {
  box-shadow: 0 0 0 3px rgba(22,163,74,.3);
}

/* ── COLUMN PICKER ─────────────────────────────────────────── */
.tia-jc-columns-card {
  background: var(--jc-surface);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-lg);
  box-shadow: var(--jc-sh-sm);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.tia-jc-columns-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.tia-jc-columns-label {
  font-size: 13px; font-weight: 700;
  color: var(--jc-text);
  font-family: var(--jc-fh);
}
.tia-jc-col-actions { display: flex; gap: 4px; }
.tia-jc-col-list { display: flex; flex-wrap: wrap; gap: 7px; }

/* Column chip */
.tia-jc-col-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500;
  font-family: var(--jc-fm);
  color: var(--jc-body);
  background: var(--jc-slate-50);
  border: 1.5px solid var(--jc-border);
  border-radius: var(--jc-r-sm);
  padding: 4px 12px 4px 8px;
  cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.tia-jc-col-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tia-jc-col-chip--on {
  border-color: var(--jc-green);
  background: var(--jc-green-50);
  color: var(--jc-green-700);
}

.tia-jc-col-check {
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--jc-border-s);
  background: var(--jc-surface);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.tia-jc-col-chip--on .tia-jc-col-check {
  background: var(--jc-green);
  border-color: var(--jc-green);
}
.tia-jc-col-check svg {
  width: 9px; height: 9px;
  stroke: #fff; fill: none;
  stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  display: none;
}
.tia-jc-col-chip--on .tia-jc-col-check svg { display: block; }

/* ── PREVIEW TABLE ─────────────────────────────────────────── */
.tia-jc-preview-card {
  background: var(--jc-surface);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-lg);
  box-shadow: var(--jc-sh-sm);
  margin-bottom: 20px;
  overflow: hidden;
}
.tia-jc-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--jc-border);
  background: var(--jc-slate-50);
}
.tia-jc-preview-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700;
  color: var(--jc-text);
  font-family: var(--jc-fh);
}
.tia-jc-preview-meta {
  font-size: 12px;
  color: var(--jc-muted);
}
.tia-jc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tia-jc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tia-jc-table th {
  text-align: left;
  padding: 9px 14px;
  font-family: var(--jc-fm);
  font-size: 11.5px; font-weight: 500;
  color: var(--jc-muted);
  background: var(--jc-slate-50);
  border-bottom: 1px solid var(--jc-border);
  white-space: nowrap;
}
.tia-jc-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--jc-border);
  color: var(--jc-body);
  font-family: var(--jc-fm);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tia-jc-table tr:last-child td { border-bottom: none; }
.tia-jc-table tbody tr:hover td { background: var(--jc-slate-50); }
.tia-jc-null     { color: var(--jc-muted) !important; font-style: italic; }
.tia-jc-num      { color: #7C3AED !important; }
.tia-jc-bool-t   { color: #16A34A !important; }
.tia-jc-bool-f   { color: #DC2626 !important; }

.tia-jc-more-rows {
  text-align: center;
  padding: 9px;
  font-size: 12px;
  color: var(--jc-muted);
  background: var(--jc-slate-50);
  border-top: 1px solid var(--jc-border);
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.tia-jc-actions {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Primary — green */
.tia-jc-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--jc-green);
  color: #fff;
  border: none;
  border-radius: var(--jc-r-pill);
  padding: 11px 24px;
  font-family: var(--jc-fb);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(22,163,74,.35);
  transition: background .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
}
.tia-jc-btn-primary:hover {
  background: var(--jc-green-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(22,163,74,.45);
}
.tia-jc-btn-primary:active { transform: translateY(0); }
.tia-jc-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22,163,74,.35);
}
.tia-jc-btn-primary:disabled {
  background: var(--jc-border-s);
  color: var(--jc-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.tia-jc-btn-primary--sm { padding: 8px 18px; font-size: 13px; }

/* Primary SVG icon */
.tia-jc-btn-primary svg,
.tia-jc-btn-secondary svg,
.tia-jc-btn-ghost svg {
  width: 15px; height: 15px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Secondary — outlined */
.tia-jc-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--jc-surface);
  color: var(--jc-text);
  border: 1.5px solid var(--jc-border);
  border-radius: var(--jc-r-pill);
  padding: 10px 22px;
  font-family: var(--jc-fb);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--jc-sh-sm);
  transition: border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.tia-jc-btn-secondary:hover {
  background: var(--jc-green-50);
  border-color: var(--jc-green-200);
  color: var(--jc-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22,163,74,.2);
}
.tia-jc-btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(91,141,239,.25);
}
.tia-jc-btn-secondary:disabled {
  color: var(--jc-muted);
  border-color: var(--jc-border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Ghost — text only */
.tia-jc-btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: none;
  color: var(--jc-muted);
  border: none;
  border-radius: var(--jc-r-md);
  padding: 6px 8px;
  font-family: var(--jc-fb);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.tia-jc-btn-ghost:hover { color: var(--jc-body); background: var(--jc-slate-100); }
.tia-jc-btn-ghost:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--jc-green); }
.tia-jc-btn-ghost--sm { font-size: 12px; padding: 4px 6px; }

/* Icon button */
.tia-jc-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--jc-slate-50);
  border: 1.5px solid var(--jc-border);
  border-radius: var(--jc-r-md);
  color: var(--jc-body) !important;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.tia-jc-btn-icon svg {
  width: 14px; height: 14px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  display: block;
  overflow: visible;
}
.tia-jc-btn-icon:hover { background: var(--jc-slate-100); color: var(--jc-text) !important; }
.tia-jc-btn-icon:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--jc-blue); }

/* Uploaded filename */
.tia-jc-uploaded-name {
  font-size: 12px;
  color: var(--jc-muted);
  font-family: var(--jc-fm);
}

/* ── ACCESS GATE OVERLAY ────────────────────────────────────── */
.tia-jc-gate-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9990;
  display: flex; align-items: center; justify-content: center;
  animation: tia-jc-overlay-in .22s ease forwards;
}
@keyframes tia-jc-overlay-in { from { opacity: 0; } to { opacity: 1; } }

.tia-jc-gate-modal {
  background: var(--jc-surface);
  border-radius: var(--jc-r-xl);
  box-shadow: var(--jc-sh-lg);
  padding: 40px 36px;
  max-width: 420px; width: 90%;
  position: relative;
  text-align: center;
  animation: tia-jc-modal-in .22s ease forwards;
}
@keyframes tia-jc-modal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.tia-jc-gate-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--jc-slate-100); border: none;
  border-radius: var(--jc-r-md);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--jc-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tia-jc-gate-close:hover { background: var(--jc-border); color: var(--jc-text); }

.tia-jc-gate-icon {
  width: 56px; height: 56px;
  background: var(--jc-green-100);   /* paywall gate — green */
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.tia-jc-gate-icon--login {
  background: var(--jc-blue-50);     /* login gate — blue */
}
.tia-jc-gate-icon svg { width: 28px; height: 28px; }

.tia-jc-gate-heading {
  font-family: var(--jc-fh);
  font-size: 20px; font-weight: 800;
  color: var(--jc-text);
  margin: 0 0 10px;
  letter-spacing: -.3px;
}
.tia-jc-gate-message {
  font-size: 14px; color: var(--jc-body);
  line-height: 1.6; margin: 0 0 20px;
}
.tia-jc-gate-cta {
  display: inline-flex;
  margin-top: 4px;
  justify-content: center;
  text-decoration: none;
}

.tia-jc-blurred { filter: blur(5px); pointer-events: none; user-select: none; }

/* Gate banner */
.tia-jc-gate-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  background: var(--jc-blue-50);
  border: 1px solid var(--jc-blue-200);
  border-radius: var(--jc-r-lg);
  padding: 14px 18px;
  margin-top: 14px;
  animation: tia-jc-banner-in .22s ease forwards;
}
.tia-jc-gate-banner__text { font-size: 14px; font-weight: 500; color: var(--jc-text); }
@keyframes tia-jc-banner-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ── TOAST ─────────────────────────────────────────────────── */
.tia-jc-toast {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  background: #1E293B;
  color: #fff;
  border-radius: var(--jc-r-lg);
  padding: 12px 18px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-width: 300px;
  animation: tia-jc-toast-in .22s ease forwards;
}
.tia-jc-toast svg {
  flex-shrink: 0; width: 16px; height: 16px;
  stroke: #4ADE80; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.tia-jc-toast--hidden { display: none; }
@keyframes tia-jc-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── SEO CONTENT ───────────────────────────────────────────── */
.tia-jc-seo-content {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--jc-border);
}
.tia-jc-seo-content h2 {
  font-family: var(--jc-fh);
  font-size: 20px; font-weight: 800;
  letter-spacing: -.4px;
  color: var(--jc-text);
  margin: 0 0 12px;
}
.tia-jc-seo-content h3 {
  font-family: var(--jc-fh);
  font-size: 16px; font-weight: 700;
  color: var(--jc-text);
  margin: 22px 0 8px;
}
.tia-jc-seo-content p  { font-size: 14.5px; color: var(--jc-body); line-height: 1.72; margin-bottom: 12px; }
.tia-jc-seo-content ul,
.tia-jc-seo-content ol { padding-left: 20px; margin-bottom: 14px; }
.tia-jc-seo-content li { font-size: 14.5px; color: var(--jc-body); line-height: 1.72; margin-bottom: 5px; }
.tia-jc-seo-content a  { color: var(--jc-blue); text-decoration: none; }
.tia-jc-seo-content a:hover { text-decoration: underline; }
.tia-jc-seo-content code {
  font-family: var(--jc-fm);
  font-size: 12.5px;
  background: var(--jc-slate-100);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-sm);
  padding: 1px 6px;
}
.tia-jc-seo-content strong { font-weight: 600; color: var(--jc-text); }

/* ── FAQ ACCORDION ─────────────────────────────────────────── */
.tia-jc-faq-section {
  margin-top: 32px;
}
.tia-jc-faq-heading {
  font-family: var(--jc-fh);
  font-size: 18px; font-weight: 800;
  letter-spacing: -.3px;
  color: var(--jc-text);
  margin: 0 0 14px;
}
.tia-jc-faq-list {
  display: flex; flex-direction: column; gap: 8px;
}
.tia-jc-faq-item {
  background: var(--jc-surface);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-lg);
  overflow: hidden;
  transition: box-shadow .2s;
}
.tia-jc-faq-item[open] { box-shadow: var(--jc-sh-sm); }

summary.tia-jc-faq-q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px; font-weight: 600;
  color: var(--jc-text);
  cursor: pointer; list-style: none;
  transition: background .15s;
}
summary.tia-jc-faq-q:hover { background: var(--jc-slate-50); }
summary.tia-jc-faq-q::-webkit-details-marker { display: none; }
summary.tia-jc-faq-q:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--jc-green);
}
summary.tia-jc-faq-q::after {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .2s;
}
.tia-jc-faq-item[open] summary.tia-jc-faq-q::after { transform: rotate(180deg); }

.tia-jc-faq-a {
  padding: 14px 18px 18px;
  font-size: 14px; color: var(--jc-body);
  line-height: 1.7;
  border-top: 1px solid var(--jc-border);
  background: var(--jc-slate-50);
  animation: tia-jc-faq-open .2s ease;
}
.tia-jc-faq-a code {
  font-family: var(--jc-fm); font-size: 12.5px;
  background: var(--jc-surface);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-sm);
  padding: 1px 6px;
}
.tia-jc-faq-a strong { font-weight: 600; }
@keyframes tia-jc-faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RELATED TOOLS ─────────────────────────────────────────── */
.tia-jc-related { margin-top: 36px; }
.tia-jc-related__heading {
  font-family: var(--jc-fh);
  font-size: 18px; font-weight: 800;
  letter-spacing: -.3px;
  color: var(--jc-text);
  margin: 0 0 6px;
}
.tia-jc-related__sub { font-size: 14px; color: var(--jc-muted); margin: 0 0 16px; }
.tia-jc-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.tia-jc-related__card {
  background: var(--jc-surface);
  border: 1px solid var(--jc-border);
  border-radius: var(--jc-r-lg);
  padding: 18px;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--jc-sh-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tia-jc-related__card:hover {
  border-color: var(--jc-blue-200);
  box-shadow: var(--jc-sh-lg);
  transform: translateY(-2px);
}
.tia-jc-related__icon {
  width: 44px; height: 44px;
  border-radius: var(--jc-r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.tia-jc-related__name { font-family: var(--jc-fh); font-size: 14px; font-weight: 700; color: var(--jc-text); }
.tia-jc-related__desc { font-size: 12.5px; color: var(--jc-muted); line-height: 1.5; }
.tia-jc-related__cat  { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ── RESPONSIVE ────────────────────────────────────────────── */

/* Tablet + mobile: center the header block */
@media (max-width: 768px) {
  .tia-jc-header { text-align: center; }
  .tia-jc-badges { justify-content: center; }
  .tia-jc-tagline { text-align: center; }
}

@media (max-width: 640px) {
  .tia-jc-wrap { padding: 16px 0 48px; }
  .tia-jc-options-card { gap: 10px; }
  .tia-jc-opt-divider { display: none; }
  .tia-jc-options-card { flex-direction: column; align-items: flex-start; }
  .tia-jc-related__grid { grid-template-columns: 1fr 1fr; }
  .tia-jc-gate-modal { padding: 28px 20px; }
  .tia-jc-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

@media (max-width: 420px) {
  .tia-jc-related__grid { grid-template-columns: 1fr; }
  .tia-jc-actions { flex-direction: column; align-items: stretch; }
  .tia-jc-btn-primary,
  .tia-jc-btn-secondary { justify-content: center; }
}

/* ── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
