/*
 * 123TinyTools - PDF Splitter
 * Version: 1.0.0
 * All selectors scoped under .tia-ps-wrap
 * Category: PDF Tools — red accent #EF4444
 */

/* ── TOKENS ──────────────────────────────────────────────────── */
.tia-ps-wrap {
  --ps-accent:        #EF4444;
  --ps-accent-h:      #DC2626;
  --ps-accent-rgb:    239,68,68;
  --ps-accent-light:  #FEE2E2;
  --ps-accent-border: #FCA5A5;
  --ps-accent-dark:   #7F1D1D;
  --ps-surface:       #FFFFFF;
  --ps-bg:            #F8FAFD;
  --ps-border:        #E4EAF4;
  --ps-border-s:      #CBD5E1;
  --ps-text:          #1E293B;
  --ps-body:          #475569;
  --ps-muted:         #64748B;
  --ps-r-sm:          6px;
  --ps-r-md:          10px;
  --ps-r-lg:          12px;
  --ps-r-xl:          22px;
  --ps-r-pill:        9999px;
  --ps-sh-card:       0 2px 20px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --ps-sh-sm:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.06);
  --ps-font-h:        'Plus Jakarta Sans', system-ui, sans-serif;
  --ps-font-b:        'Inter', system-ui, sans-serif;
  --ps-font-m:        'JetBrains Mono', 'Fira Code', monospace;

  font-family: var(--ps-font-b);
  color: var(--ps-text);
  padding: 24px 0 64px;
}

/* ── DARK MODE (all 6 signals) ───────────────────────────────── */
html[data-theme="dark"] .tia-ps-wrap,
html.wp-dark-mode-active .tia-ps-wrap,
body.wp-dark-mode-active .tia-ps-wrap,
body.kt-dark-mode .tia-ps-wrap,
body.dark-mode .tia-ps-wrap,
body[data-theme="dark"] .tia-ps-wrap {
  --ps-surface: #1E293B;
  --ps-bg:      #0F172A;
  --ps-border:  #334155;
  --ps-border-s:#475569;
  --ps-text:    #F1F5F9;
  --ps-body:    #CBD5E1;
  --ps-muted:   #94A3B8;
}

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

.tia-ps-wrap .tia-ps-title {
  font-family: var(--ps-font-h);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--ps-text);
  margin: 0 0 6px;
  line-height: 1.2;
}

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

.tia-ps-wrap .tia-ps-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.tia-ps-wrap .tia-ps-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--ps-r-pill);
  padding: 3px 10px;
  color: var(--ps-accent-dark);
  background: var(--ps-accent-light);
  border: 1px solid var(--ps-accent-border);
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-badge,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-badge,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-badge,
body.kt-dark-mode .tia-ps-wrap .tia-ps-badge,
body.dark-mode .tia-ps-wrap .tia-ps-badge,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-badge {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.30);
  color: #FCA5A5;
}

/* ── PRIVACY NOTICE ─────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EFF4FF;
  border: 1px solid #B8D0FF;
  border-radius: var(--ps-r-md);
  padding: 10px 14px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 20px;
}
.tia-ps-wrap .tia-ps-notice svg { flex-shrink: 0; stroke: #5B8DEF; }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-notice,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-notice,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-notice,
body.kt-dark-mode .tia-ps-wrap .tia-ps-notice,
body.dark-mode .tia-ps-wrap .tia-ps-notice,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-notice {
  background: rgba(91,141,239,.12);
  border-color: rgba(91,141,239,.30);
  color: #CBD5E1;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-card {
  background: var(--ps-surface);
  border-radius: var(--ps-r-xl);
  box-shadow: var(--ps-sh-card);
  overflow: hidden;
  margin-bottom: 20px;
}

/* ── UPLOAD / DROP ZONE ──────────────────────────────────────── */
.tia-ps-wrap .tia-ps-card--upload { padding: 0; }

.tia-ps-wrap .tia-ps-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 24px;
  border: 2.5px dashed var(--ps-accent-border);
  border-radius: var(--ps-r-xl);
  background: var(--ps-accent-light);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tia-ps-wrap .tia-ps-drop-zone:hover,
.tia-ps-wrap .tia-ps-drop-zone--active {
  border-color: var(--ps-accent);
  background: #FECACA;
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-drop-zone,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-drop-zone,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-drop-zone,
body.kt-dark-mode .tia-ps-wrap .tia-ps-drop-zone,
body.dark-mode .tia-ps-wrap .tia-ps-drop-zone,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-drop-zone {
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.35);
}

.tia-ps-wrap .tia-ps-drop-icon-box {
  width: 64px;
  height: 64px;
  background: rgba(239,68,68,.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  stroke: var(--ps-accent);
}

.tia-ps-wrap .tia-ps-drop-text  { font-size: 15px; font-weight: 600; color: var(--ps-text); margin: 0; }
.tia-ps-wrap .tia-ps-drop-link  { color: var(--ps-accent); text-decoration: underline; }
.tia-ps-wrap .tia-ps-drop-hint  { font-size: 12.5px; color: var(--ps-muted); margin: 0; }
.tia-ps-wrap .tia-ps-file-hidden { display: none; }

/* ── FILE INFO CARD ──────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-card--file { padding: 16px 20px; }

.tia-ps-wrap .tia-ps-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tia-ps-wrap .tia-ps-file-icon-wrap {
  width: 44px;
  height: 54px;
  min-width: 44px;
  background: var(--ps-accent-light);
  border: 1.5px solid var(--ps-accent-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  stroke: var(--ps-accent);
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-file-icon-wrap,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-file-icon-wrap,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-file-icon-wrap,
body.kt-dark-mode .tia-ps-wrap .tia-ps-file-icon-wrap,
body.dark-mode .tia-ps-wrap .tia-ps-file-icon-wrap,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-file-icon-wrap {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.28);
}

.tia-ps-wrap .tia-ps-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tia-ps-wrap .tia-ps-file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tia-ps-wrap .tia-ps-file-meta {
  font-size: 12.5px;
  color: var(--ps-muted);
}

.tia-ps-wrap .tia-ps-btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ps-bg);
  border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-r-sm);
  cursor: pointer;
  color: var(--ps-muted);
  transition: all .12s;
  flex-shrink: 0;
}
/* Explicit stroke so theme button colour overrides can't blank the icon */
.tia-ps-wrap .tia-ps-btn-icon svg {
  stroke: var(--ps-muted);
  fill: none;
  display: block;
  flex-shrink: 0;
}
.tia-ps-wrap .tia-ps-btn-icon:hover {
  background: var(--ps-accent-light);
  border-color: var(--ps-accent-border);
  color: var(--ps-accent);
}
.tia-ps-wrap .tia-ps-btn-icon:hover svg { stroke: var(--ps-accent); }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-btn-icon:hover,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-btn-icon:hover,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-btn-icon:hover,
body.kt-dark-mode .tia-ps-wrap .tia-ps-btn-icon:hover,
body.dark-mode .tia-ps-wrap .tia-ps-btn-icon:hover,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-btn-icon:hover {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.35);
  color: #FCA5A5;
}
html[data-theme="dark"] .tia-ps-wrap .tia-ps-btn-icon:hover svg,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-btn-icon:hover svg,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-btn-icon:hover svg,
body.kt-dark-mode .tia-ps-wrap .tia-ps-btn-icon:hover svg,
body.dark-mode .tia-ps-wrap .tia-ps-btn-icon:hover svg,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-btn-icon:hover svg { stroke: #FCA5A5; }

/* ── SPLIT SETTINGS CARD ─────────────────────────────────────── */
.tia-ps-wrap .tia-ps-card--settings { padding: 20px 22px 24px; }

.tia-ps-wrap .tia-ps-settings-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ps-text);
  margin: 0 0 18px;
}

.tia-ps-wrap .tia-ps-setting-group { display: flex; flex-direction: column; gap: 7px; }

.tia-ps-wrap .tia-ps-setting-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ps-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tia-ps-wrap .tia-ps-setting-hint {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ps-muted);
}

/* ── MODE BAR ────────────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-mode-bar {
  display: flex;
  gap: 3px;
  background: var(--ps-bg);
  border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-r-md);
  padding: 3px;
  flex-wrap: wrap;
}

.tia-ps-wrap .tia-ps-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ps-muted);
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--ps-font-b);
  transition: all .13s;
  white-space: nowrap;
}
.tia-ps-wrap .tia-ps-mode-btn.active {
  background: var(--ps-accent);
  color: #fff;
  font-weight: 600;
}
.tia-ps-wrap .tia-ps-mode-btn:not(.active):hover { color: var(--ps-text); background: #F1F5F9; }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-mode-btn:not(.active):hover,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-mode-btn:not(.active):hover,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-mode-btn:not(.active):hover,
body.kt-dark-mode .tia-ps-wrap .tia-ps-mode-btn:not(.active):hover,
body.dark-mode .tia-ps-wrap .tia-ps-mode-btn:not(.active):hover,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-mode-btn:not(.active):hover { background: #334155; color: #F1F5F9; }

/* ── RANGE TEXTAREA ──────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-textarea {
  width: 100%;
  min-height: 110px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--ps-font-m);
  color: var(--ps-text);
  background: var(--ps-bg);
  border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-r-md);
  outline: none;
  resize: vertical;
  line-height: 1.7;
  transition: border-color .15s;
  box-sizing: border-box;
}
.tia-ps-wrap .tia-ps-textarea:focus {
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb),.14);
  background: var(--ps-surface);
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-textarea,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-textarea,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-textarea,
body.kt-dark-mode .tia-ps-wrap .tia-ps-textarea,
body.dark-mode .tia-ps-wrap .tia-ps-textarea,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-textarea {
  background: #0F172A;
  color: #F1F5F9;
  border-color: #334155;
}

.tia-ps-wrap .tia-ps-textarea::placeholder { color: var(--ps-muted); }

.tia-ps-wrap .tia-ps-input-help {
  font-size: 12px;
  color: var(--ps-muted);
  margin: 0;
  line-height: 1.55;
}
.tia-ps-wrap .tia-ps-input-help code {
  font-family: var(--ps-font-m);
  font-size: 11.5px;
  background: var(--ps-bg);
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ps-accent);
}

/* ── INTERVAL INPUT ──────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-number-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tia-ps-wrap .tia-ps-number-input {
  width: 80px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-text);
  background: var(--ps-bg);
  border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-r-md);
  outline: none;
  text-align: center;
  font-family: var(--ps-font-m);
  transition: border-color .15s;
}
.tia-ps-wrap .tia-ps-number-input:focus {
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb),.14);
  background: var(--ps-surface);
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-number-input,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-number-input,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-number-input,
body.kt-dark-mode .tia-ps-wrap .tia-ps-number-input,
body.dark-mode .tia-ps-wrap .tia-ps-number-input,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-number-input {
  background: #0F172A;
  color: #F1F5F9;
  border-color: #334155;
}

.tia-ps-wrap .tia-ps-number-suffix {
  font-size: 13px;
  color: var(--ps-muted);
}

/* ── EVERY PAGE INFO ─────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-pages-info {
  font-size: 13.5px;
  color: var(--ps-body);
  background: var(--ps-bg);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r-md);
  padding: 12px 14px;
  line-height: 1.55;
}

/* ── FILENAME PREFIX ─────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-filename-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ps-border);
  border-radius: var(--ps-r-md);
  overflow: hidden;
  transition: border-color .15s;
}
.tia-ps-wrap .tia-ps-filename-wrap:focus-within {
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 3px rgba(var(--ps-accent-rgb),.14);
}
.tia-ps-wrap .tia-ps-input {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ps-text);
  background: var(--ps-bg);
  border: none;
  outline: none;
  font-family: var(--ps-font-b);
}
.tia-ps-wrap .tia-ps-filename-ext {
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-muted);
  background: var(--ps-border);
  border-left: 1.5px solid var(--ps-border);
  white-space: nowrap;
  font-family: var(--ps-font-m);
}

/* ── SPLIT PREVIEW CARD ──────────────────────────────────────── */
.tia-ps-wrap .tia-ps-card--preview { padding: 18px 20px 20px; }

.tia-ps-wrap .tia-ps-preview-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tia-ps-wrap .tia-ps-preview-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ps-text);
  margin: 0;
}

.tia-ps-wrap .tia-ps-preview-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--ps-accent-dark);
  background: var(--ps-accent-light);
  border: 1px solid var(--ps-accent-border);
  border-radius: var(--ps-r-pill);
  padding: 2px 10px;
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-badge,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-badge,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-badge,
body.kt-dark-mode .tia-ps-wrap .tia-ps-preview-badge,
body.dark-mode .tia-ps-wrap .tia-ps-preview-badge,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-badge {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.35);
  color: #FCA5A5;
}

/* ── PREVIEW TABLE ───────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-preview-table {
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r-md);
  overflow: hidden;
}

.tia-ps-wrap .tia-ps-preview-row {
  display: grid;
  grid-template-columns: 58px 1fr 68px 1fr;
  gap: 0;
  padding: 8px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--ps-border);
  align-items: center;
}
.tia-ps-wrap .tia-ps-preview-row:last-child { border-bottom: none; }
.tia-ps-wrap .tia-ps-preview-row:nth-child(even) { background: var(--ps-bg); }

.tia-ps-wrap .tia-ps-preview-row--head {
  background: var(--ps-bg);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ps-muted);
  border-bottom: 2px solid var(--ps-border);
}
html[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-row:nth-child(even),
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-row:nth-child(even),
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-row:nth-child(even),
body.kt-dark-mode .tia-ps-wrap .tia-ps-preview-row:nth-child(even),
body.dark-mode .tia-ps-wrap .tia-ps-preview-row:nth-child(even),
body[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-row:nth-child(even) { background: #162032; }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-row--head,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-row--head,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-row--head,
body.kt-dark-mode .tia-ps-wrap .tia-ps-preview-row--head,
body.dark-mode .tia-ps-wrap .tia-ps-preview-row--head,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-row--head { background: #162032; }

.tia-ps-wrap .tia-ps-col-part  { font-weight: 700; color: var(--ps-accent); }
.tia-ps-wrap .tia-ps-col-range { color: var(--ps-text); padding-right: 8px; }
.tia-ps-wrap .tia-ps-col-pages { color: var(--ps-muted); font-size: 12px; }
.tia-ps-wrap .tia-ps-col-fname {
  color: var(--ps-muted);
  font-family: var(--ps-font-m);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 8px;
}

.tia-ps-wrap .tia-ps-preview-more {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ps-muted);
  text-align: center;
  border-top: 1px solid var(--ps-border);
  font-style: italic;
}

.tia-ps-wrap .tia-ps-preview-warn {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: var(--ps-r-md);
  padding: 9px 12px;
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-warn,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-warn,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-preview-warn,
body.kt-dark-mode .tia-ps-wrap .tia-ps-preview-warn,
body.dark-mode .tia-ps-wrap .tia-ps-preview-warn,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-preview-warn {
  background: rgba(234,179,8,.12);
  border-color: rgba(234,179,8,.30);
  color: #FCD34D;
}

/* ── ACTION BAR ──────────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-action-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.tia-ps-wrap .tia-ps-status-wrap { display: flex; flex-direction: column; gap: 6px; }

.tia-ps-wrap .tia-ps-progress-track {
  height: 6px;
  background: var(--ps-border);
  border-radius: var(--ps-r-pill);
  overflow: hidden;
}
.tia-ps-wrap .tia-ps-progress-fill {
  height: 100%;
  background: var(--ps-accent);
  border-radius: var(--ps-r-pill);
  transition: width .3s ease;
}

.tia-ps-wrap .tia-ps-status-msg { font-size: 13px; color: var(--ps-muted); }
.tia-ps-wrap .tia-ps-status--success { color: #14532D; }
.tia-ps-wrap .tia-ps-status--error   { color: #991B1B; }
.tia-ps-wrap .tia-ps-status--warn    { color: #78350F; }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-status--success,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-status--success,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-status--success,
body.kt-dark-mode .tia-ps-wrap .tia-ps-status--success,
body.dark-mode .tia-ps-wrap .tia-ps-status--success,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-status--success { color: #86EFAC; }

/* ── PRIMARY BUTTON ──────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--ps-accent);
  color: #fff;
  border: none;
  border-radius: var(--ps-r-pill);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(var(--ps-accent-rgb),.45);
  transition: all .15s;
  font-family: var(--ps-font-b);
  width: 100%;
}
.tia-ps-wrap .tia-ps-btn-primary:hover {
  background: var(--ps-accent-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(var(--ps-accent-rgb),.55);
}
.tia-ps-wrap .tia-ps-btn-primary:active { transform: translateY(0); }
.tia-ps-wrap .tia-ps-btn-primary:disabled {
  background: #CBD5E1;
  color: #64748B;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

html[data-theme="dark"] .tia-ps-wrap .tia-ps-btn-primary:disabled,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-btn-primary:disabled,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-btn-primary:disabled,
body.kt-dark-mode .tia-ps-wrap .tia-ps-btn-primary:disabled,
body.dark-mode .tia-ps-wrap .tia-ps-btn-primary:disabled,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-btn-primary:disabled {
  background: #1E293B;
  color: #475569;
}

/* ── GATE MODALS ─────────────────────────────────────────────── */
.tia-ps-wrap .tia-ps-gate {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tia-ps-wrap .tia-ps-gate-modal {
  background: var(--ps-surface);
  border-radius: var(--ps-r-xl);
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.tia-ps-wrap .tia-ps-gate-icon {
  width: 56px;
  height: 56px;
  background: var(--ps-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  stroke: var(--ps-accent);
}
.tia-ps-wrap .tia-ps-gate-title { font-family: var(--ps-font-h); font-size: 20px; font-weight: 800; color: var(--ps-text); margin: 0 0 8px; }
.tia-ps-wrap .tia-ps-gate-sub   { font-size: 14px; color: var(--ps-body); margin: 0 0 20px; line-height: 1.55; }
.tia-ps-wrap .tia-ps-gate-btn {
  display: block;
  padding: 12px 24px;
  background: var(--ps-accent);
  color: #fff;
  border: none;
  border-radius: var(--ps-r-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(var(--ps-accent-rgb),.4);
  transition: all .15s;
  font-family: var(--ps-font-b);
}
.tia-ps-wrap .tia-ps-gate-btn:hover { background: var(--ps-accent-h); transform: translateY(-1px); }
.tia-ps-wrap .tia-ps-gate-link {
  font-size: 13px;
  color: var(--ps-muted);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ps-font-b);
  display: block;
  margin: 0 auto;
}
.tia-ps-wrap .tia-ps-gate-link:hover { color: var(--ps-text); text-decoration: underline; }

/* ── SEO CONTENT & FAQ ───────────────────────────────────────── */
.tia-ps-wrap .tia-ps-seo-content { margin: 36px 0 0; font-size: 15px; line-height: 1.8; color: var(--ps-body); }
.tia-ps-wrap .tia-ps-seo-content h2 { font-family: var(--ps-font-h); font-size: 21px; font-weight: 700; color: var(--ps-text); margin: 0 0 14px; }
.tia-ps-wrap .tia-ps-seo-content h3 { font-size: 17px; font-weight: 700; color: var(--ps-text); margin: 22px 0 8px; }
.tia-ps-wrap .tia-ps-seo-content p  { margin: 0 0 14px; }
.tia-ps-wrap .tia-ps-seo-content ul,
.tia-ps-wrap .tia-ps-seo-content ol { margin: 0 0 14px; padding-left: 20px; }
.tia-ps-wrap .tia-ps-seo-content li { margin-bottom: 6px; }

.tia-ps-wrap .tia-ps-faq-section { margin: 32px 0 0; }
.tia-ps-wrap .tia-ps-faq-heading { font-family: var(--ps-font-h); font-size: 18px; font-weight: 700; color: var(--ps-text); margin: 0 0 14px; }
.tia-ps-wrap .tia-ps-faq-list    { display: flex; flex-direction: column; gap: 8px; }
.tia-ps-wrap .tia-ps-faq-item    { background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-r-lg); overflow: hidden; }
.tia-ps-wrap .tia-ps-faq-q {
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  color: var(--ps-text); cursor: pointer; list-style: none;
  transition: background .15s, color .15s;
}
.tia-ps-wrap .tia-ps-faq-q::-webkit-details-marker { display: none; }
.tia-ps-wrap .tia-ps-faq-q:hover { background: var(--ps-accent-light); color: var(--ps-accent); }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-faq-q,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-faq-q,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-faq-q,
body.kt-dark-mode .tia-ps-wrap .tia-ps-faq-q,
body.dark-mode .tia-ps-wrap .tia-ps-faq-q,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-faq-q { color: #F1F5F9 !important; }

.tia-ps-wrap .tia-ps-faq-a { padding: 14px 18px 18px; font-size: 14px; color: var(--ps-body); line-height: 1.7; background: var(--ps-bg); border-top: 1px solid var(--ps-border); }

html[data-theme="dark"] .tia-ps-wrap .tia-ps-faq-a,
html.wp-dark-mode-active .tia-ps-wrap .tia-ps-faq-a,
body.wp-dark-mode-active .tia-ps-wrap .tia-ps-faq-a,
body.kt-dark-mode .tia-ps-wrap .tia-ps-faq-a,
body.dark-mode .tia-ps-wrap .tia-ps-faq-a,
body[data-theme="dark"] .tia-ps-wrap .tia-ps-faq-a { background: #0F172A; color: #CBD5E1; border-color: #334155; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tia-ps-wrap .tia-ps-header  { text-align: center; }
  .tia-ps-wrap .tia-ps-tagline { text-align: center; }
  .tia-ps-wrap .tia-ps-badges  { justify-content: center; }
  .tia-ps-wrap .tia-ps-preview-row {
    grid-template-columns: 52px 1fr 56px;
  }
  .tia-ps-wrap .tia-ps-col-fname { display: none; }
}

@media (max-width: 540px) {
  .tia-ps-wrap { overflow-x: hidden; padding: 16px 0 48px; }
  .tia-ps-wrap .tia-ps-card--file,
  .tia-ps-wrap .tia-ps-card--settings,
  .tia-ps-wrap .tia-ps-card--preview { padding: 14px; }
  .tia-ps-wrap .tia-ps-mode-bar { flex-direction: column; }
  .tia-ps-wrap .tia-ps-mode-btn { justify-content: center; }
  .tia-ps-wrap .tia-ps-gate-modal { padding: 28px 18px; }
  .tia-ps-wrap .tia-ps-preview-row { grid-template-columns: 48px 1fr 52px; padding: 7px 10px; }
}

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