/* TSS Redesign — Foundation (Slice 0)
 * Tokens + component primitives. Loaded site-wide.
 * No !important. Single-class specificity (0,1,0).
 * Dynamic palette tokens (--teal/--navy/--orange/--bg) come from inline :root
 * block printed by class-tss-tokens.php at wp_head:1.
 */

/* --- Static tokens (not user-tunable) --- */
:root {
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(14,42,71,0.06);
  --shadow-md: 0 4px 16px rgba(14,42,71,0.08);
  --shadow-lg: 0 12px 40px rgba(14,42,71,0.12);
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-serif-i: "Instrument Serif", Georgia, serif;
  --teal-soft: #ECFDF8;
  --line-strong: #D1D1C8;
  --ink-2: #2A3F5A;
  --mute-2: #94A3B5;
}

/* --- Reset / base --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink, #0E2A47);
  background: var(--bg, #F8FAFB);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; }
input, textarea, select { font-family: inherit; }

/* --- Type scale --- */
.tss-h1 { font-size: 48px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.tss-h2 { font-size: 38px; line-height: 1.1;  letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.tss-h3 { font-size: 24px; line-height: 1.2;  letter-spacing: -0.015em; font-weight: 600; margin: 0; }
.tss-eyebrow {
  font-size: 11px; line-height: 1; letter-spacing: 0.14em;
  font-weight: 700; text-transform: uppercase; color: var(--teal-darker, #115E59);
}
.tss-body  { font-size: 15px; line-height: 1.55; color: var(--ink, #0E2A47); margin: 0; }
.tss-small { font-size: 13px; line-height: 1.5;  color: var(--mute, #6B7A8C); margin: 0; }
.tss-serif-i { font-family: var(--font-serif-i); font-style: italic; font-weight: 400; }

@media (max-width: 640px) {
  .tss-h1 { font-size: 36px; }
  .tss-h2 { font-size: 30px; }
}

/* --- Buttons --- */
.tss-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  transition: all 0.15s; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.tss-btn-orange    { background: var(--orange, #F26A3F); color: #fff; border-color: var(--orange, #F26A3F); }
.tss-btn-orange:hover { background: var(--orange-h, #DD5A30); border-color: var(--orange-h, #DD5A30); }
.tss-btn-teal-out  { background: transparent; color: var(--teal-darker, #115E59); border-color: var(--teal, #14B8A6); }
.tss-btn-teal-out:hover { background: var(--teal, #14B8A6); color: #fff; }
.tss-btn-teal      { background: var(--teal-deep, #0D9488); color: #fff; border-color: var(--teal-deep, #0D9488); }
.tss-btn-teal:hover{ background: var(--teal-darker, #115E59); border-color: var(--teal-darker, #115E59); }
.tss-btn-ghost     { background: transparent; color: var(--ink, #0E2A47); border-color: var(--line, #E8ECF1); }
.tss-btn-ghost:hover { background: var(--bg, #F8FAFB); border-color: var(--mute-2); }
.tss-btn:disabled  { opacity: 0.5; cursor: not-allowed; }
.tss-btn:focus-visible { outline: 2px solid var(--teal, #14B8A6); outline-offset: 2px; }
.tss-btn:active    { transform: translateY(0); box-shadow: inset 0 2px 4px rgba(0,0,0,0.08); }

/* --- Inputs --- */
.tss-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: 14px; background: #fff;
  color: var(--ink, #0E2A47); transition: border-color 0.15s, box-shadow 0.15s;
}
.tss-input:focus {
  outline: none;
  border-color: var(--teal, #14B8A6);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.12);
}

/* --- Cards / chips / badges --- */
.tss-card { background: #fff; border: 1px solid var(--line, #E8ECF1); border-radius: var(--r-lg); }
.tss-card-elev { box-shadow: var(--shadow-md); }
.tss-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1.5px solid var(--line-strong);
  border-radius: 999px; font-size: 13px; font-weight: 500;
  background: #fff; color: var(--ink, #0E2A47);
}
.tss-chip-active { background: var(--ink, #0E2A47); color: #fff; border-color: var(--ink, #0E2A47); }
.tss-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
}
.tss-badge-open     { background: #ECFDF5; color: #065F46; }
.tss-badge-closed   { background: #FEF2F2; color: #991B1B; }
.tss-badge-verified { background: #EFF6FF; color: #1E40AF; }
.tss-badge-pro      { background: #F59E0B; color: #1F1207; }

/* --- Stars --- */
.tss-stars { display: inline-flex; gap: 2px; color: var(--orange, #F26A3F); font-size: 14px; }

/* --- Image placeholder (admin-side empty state) --- */
.tss-img-ph {
  background: repeating-linear-gradient(135deg, transparent 0 16px, rgba(14,42,71,0.025) 16px 17px), #EEF2F5;
  display: flex; align-items: center; justify-content: center;
  color: var(--mute, #6B7A8C);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
}

/* --- Utility helpers --- */
.tss-stack-12 > * + * { margin-top: 12px; }
.tss-stack-16 > * + * { margin-top: 16px; }
.tss-stack-24 > * + * { margin-top: 24px; }
.tss-row-center { display: flex; align-items: center; }
.tss-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tss-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tss-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tss-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
