/* ==========================================================
   WordPressistic theme — global brand system + components
   Light + dark via [data-theme] on <html>. These --wpistic-*
   tokens are the single source of truth for the whole
   ecosystem; plugin UIs (Tools Hub, portal, etc.) inherit them.
   ========================================================== */

:root {
	/* Brand */
	--wpistic-accent:        #86DBB8;
	--wpistic-accent-strong: #00FF85;
	--wpistic-accent-ink:    #04130d;
	--wpistic-accent-soft:   rgba(134, 219, 184, 0.18);

	/* Light surfaces */
	--wpistic-bg:        #f7f8fb;
	--wpistic-surface:   #ffffff;
	--wpistic-surface-2: #f2f4f8;
	--wpistic-text:      #101828;
	--wpistic-muted:     #667085;
	--wpistic-border:    #eaecf0;

	/* Semantic */
	--wpistic-success: #16a34a;
	--wpistic-warn:    #d97706;
	--wpistic-danger:  #dc2626;
	--wpistic-info:    #0ea5e9;

	/* Scale */
	--wpistic-radius:    16px;
	--wpistic-radius-sm: 10px;
	--wpistic-radius-xs: 8px;
	--wpistic-pill:      999px;
	--wpistic-shadow:    0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
	--wpistic-shadow-lg: 0 12px 40px rgba(16,24,40,.12);
	--wpistic-container: 1160px;
	--wpistic-gap:       24px;
	--wpistic-font:      'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--wpistic-mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
	--wpistic-bg:        #0b1110;
	--wpistic-surface:   #111c1a;
	--wpistic-surface-2: #16201e;
	--wpistic-text:      #f5f7f6;
	--wpistic-muted:     #9ca3af;
	--wpistic-border:    rgba(255,255,255,.10);
	--wpistic-accent-soft: rgba(134, 219, 184, 0.14);
	--wpistic-success: #34d399;
	--wpistic-warn:    #fbbf24;
	--wpistic-danger:  #f87171;
	--wpistic-info:    #38bdf8;
	--wpistic-shadow:    0 1px 2px rgba(0,0,0,.30), 0 10px 30px rgba(0,0,0,.35);
	--wpistic-shadow-lg: 0 16px 48px rgba(0,0,0,.45);
}

/* Base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--wpistic-bg); color: var(--wpistic-text);
	font-family: var(--wpistic-font); font-size: 16px; line-height: 1.6;
	-webkit-font-smoothing: antialiased; transition: background .25s ease, color .25s ease;
}
a { color: var(--wpistic-text); text-decoration-color: var(--wpistic-accent); }
a:hover { color: var(--wpistic-success); }
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--wpistic-border); margin: 2rem 0; }
:focus-visible { outline: 2px solid var(--wpistic-accent-strong); outline-offset: 2px; border-radius: 4px; }
.wpistic-skip-link { position: absolute; left: -999px; top: 0; background: var(--wpistic-surface); color: var(--wpistic-text); padding: 10px 16px; border-radius: var(--wpistic-radius-sm); z-index: 1000; }
.wpistic-skip-link:focus { left: 12px; top: 12px; }

/* Layout --------------------------------------------------- */
.wpistic-container { width: 100%; max-width: var(--wpistic-container); margin-inline: auto; padding-inline: 20px; }
.wpistic-section { padding-block: clamp(48px, 8vw, 96px); }
.wpistic-stack > * + * { margin-top: var(--wpistic-gap); }
.wpistic-grid { display: grid; gap: var(--wpistic-gap); }
.wpistic-grid--2 { grid-template-columns: repeat(2, 1fr); }
.wpistic-grid--3 { grid-template-columns: repeat(3, 1fr); }
.wpistic-grid--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 880px) { .wpistic-grid--2, .wpistic-grid--3 { grid-template-columns: 1fr; } }
.wpistic-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--wpistic-muted); margin-bottom: 10px; }
.wpistic-lead { font-size: 1.15rem; color: var(--wpistic-muted); max-width: 60ch; }

/* Header --------------------------------------------------- */
.wpistic-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--wpistic-surface) 86%, transparent);
	backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid var(--wpistic-border);
}
.wpistic-header__inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.wpistic-header__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; color: var(--wpistic-text); }
.wpistic-header__brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--wpistic-accent), var(--wpistic-accent-strong)); display: inline-flex; align-items: center; justify-content: center; color: var(--wpistic-accent-ink); font-weight: 900; }
.wpistic-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.wpistic-nav__menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.wpistic-nav__menu a { display: inline-block; padding: 8px 12px; border-radius: var(--wpistic-radius-sm); font-size: 14px; font-weight: 600; color: var(--wpistic-muted); text-decoration: none; transition: background .15s, color .15s; }
.wpistic-nav__menu a:hover, .wpistic-nav__menu .current-menu-item > a { color: var(--wpistic-text); background: var(--wpistic-surface-2); }
.wpistic-header__actions { display: flex; align-items: center; gap: 10px; }
.wpistic-nav-toggle { display: none; }
@media (max-width: 880px) {
	.wpistic-nav__menu { display: none; }
	.wpistic-nav__menu--open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px; background: var(--wpistic-surface); border-bottom: 1px solid var(--wpistic-border); box-shadow: var(--wpistic-shadow); }
	.wpistic-nav-toggle { display: inline-flex; }
}

/* Mode toggle ---------------------------------------------- */
.wpistic-mode-toggle {
	position: relative; width: 44px; height: 30px; border-radius: var(--wpistic-pill);
	border: 1px solid var(--wpistic-border); background: var(--wpistic-surface-2);
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
	color: var(--wpistic-text); transition: border-color .15s, background .15s;
}
.wpistic-mode-toggle:hover { border-color: var(--wpistic-accent); }
.wpistic-mode-toggle__icon { font-size: 14px; line-height: 1; }
.wpistic-mode-toggle__icon--moon { display: none; }
html[data-theme="dark"] .wpistic-mode-toggle__icon--sun { display: none; }
html[data-theme="dark"] .wpistic-mode-toggle__icon--moon { display: inline; }

/* Buttons -------------------------------------------------- */
.wpistic-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
	padding: 12px 20px; border-radius: var(--wpistic-radius-sm); border: 1px solid transparent;
	text-decoration: none; white-space: nowrap;
	transition: transform .12s ease, box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.wpistic-btn--primary { background: linear-gradient(135deg, var(--wpistic-accent), var(--wpistic-accent-strong)); color: var(--wpistic-accent-ink); box-shadow: 0 6px 18px var(--wpistic-accent-soft); }
.wpistic-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px var(--wpistic-accent-soft); color: var(--wpistic-accent-ink); }
.wpistic-btn--ghost { background: var(--wpistic-surface); border-color: var(--wpistic-border); color: var(--wpistic-text); }
.wpistic-btn--ghost:hover { border-color: var(--wpistic-accent); background: var(--wpistic-accent-soft); color: var(--wpistic-text); }
.wpistic-btn--link { background: transparent; color: var(--wpistic-text); padding-inline: 6px; }
.wpistic-btn--link:hover { color: var(--wpistic-success); }
.wpistic-btn--sm { padding: 8px 14px; font-size: 13px; }
.wpistic-btn--lg { padding: 15px 26px; font-size: 15px; }
.wpistic-btn--block { width: 100%; }
.wpistic-btn:disabled, .wpistic-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

/* Cards ---------------------------------------------------- */
.wpistic-card {
	background: var(--wpistic-surface); border: 1px solid var(--wpistic-border);
	border-radius: var(--wpistic-radius); padding: 24px; box-shadow: var(--wpistic-shadow);
}
.wpistic-card--hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.wpistic-card--hover:hover { transform: translateY(-3px); box-shadow: var(--wpistic-shadow-lg); border-color: var(--wpistic-accent); }
.wpistic-card__icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; background: var(--wpistic-accent-soft); color: var(--wpistic-text); margin-bottom: 14px; }
.wpistic-card__title { font-size: 1.15rem; margin: 0 0 6px; }
.wpistic-card__text { color: var(--wpistic-muted); margin: 0; font-size: .95rem; }

/* Forms ---------------------------------------------------- */
.wpistic-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wpistic-field label { font-size: 13px; font-weight: 600; color: var(--wpistic-text); }
.wpistic-input, .wpistic-field input, .wpistic-field textarea, .wpistic-field select {
	font-family: inherit; font-size: 15px; color: var(--wpistic-text);
	background: var(--wpistic-surface); border: 1px solid var(--wpistic-border);
	border-radius: var(--wpistic-radius-sm); padding: 12px 14px; width: 100%;
	transition: border-color .15s, box-shadow .15s;
}
.wpistic-input:focus, .wpistic-field input:focus, .wpistic-field textarea:focus, .wpistic-field select:focus {
	outline: none; border-color: var(--wpistic-accent); box-shadow: 0 0 0 3px var(--wpistic-accent-soft);
}

/* Tables --------------------------------------------------- */
.wpistic-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--wpistic-surface); border: 1px solid var(--wpistic-border); border-radius: var(--wpistic-radius); overflow: hidden; }
.wpistic-table th, .wpistic-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--wpistic-border); }
.wpistic-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--wpistic-muted); background: var(--wpistic-surface-2); }
.wpistic-table tr:last-child td { border-bottom: 0; }

/* Badges --------------------------------------------------- */
.wpistic-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: var(--wpistic-pill); background: var(--wpistic-surface-2); color: var(--wpistic-muted); border: 1px solid var(--wpistic-border); }
.wpistic-badge--tier { background: var(--wpistic-accent-soft); color: var(--wpistic-text); border-color: var(--wpistic-accent); text-transform: capitalize; }
.wpistic-badge--pro, .wpistic-badge--agency { background: linear-gradient(135deg, var(--wpistic-accent), var(--wpistic-accent-strong)); color: var(--wpistic-accent-ink); border-color: transparent; }
.wpistic-badge--success { color: var(--wpistic-success); border-color: var(--wpistic-success); background: var(--wpistic-accent-soft); }
.wpistic-badge--warn { color: var(--wpistic-warn); border-color: var(--wpistic-warn); background: transparent; }
.wpistic-badge--danger { color: var(--wpistic-danger); border-color: var(--wpistic-danger); background: transparent; }

/* Notices -------------------------------------------------- */
.wpistic-notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--wpistic-radius-sm); border: 1px solid var(--wpistic-border); background: var(--wpistic-surface-2); color: var(--wpistic-text); font-size: 14px; }
.wpistic-notice--info { border-color: var(--wpistic-info); }
.wpistic-notice--success { border-color: var(--wpistic-success); }
.wpistic-notice--warn { border-color: var(--wpistic-warn); }
.wpistic-notice--danger { border-color: var(--wpistic-danger); }

/* Hero ----------------------------------------------------- */
.wpistic-hero { position: relative; overflow: hidden; padding-block: clamp(56px, 10vw, 120px); }
.wpistic-hero::before { content: ''; position: absolute; inset: -40% 30% auto -10%; height: 480px; background: radial-gradient(circle at 30% 30%, var(--wpistic-accent-soft), transparent 60%); pointer-events: none; }
.wpistic-hero__inner { position: relative; max-width: 760px; }
.wpistic-hero h1 { margin-bottom: 18px; }
.wpistic-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Pricing cards -------------------------------------------- */
.wpistic-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.wpistic-plan { background: var(--wpistic-surface); border: 1px solid var(--wpistic-border); border-radius: var(--wpistic-radius); padding: 26px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.wpistic-plan--featured { border-color: var(--wpistic-accent); box-shadow: 0 0 0 1px var(--wpistic-accent), var(--wpistic-shadow-lg); }
.wpistic-plan__badge { position: absolute; top: -11px; left: 26px; background: linear-gradient(135deg, var(--wpistic-accent), var(--wpistic-accent-strong)); color: var(--wpistic-accent-ink); font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: var(--wpistic-pill); }
.wpistic-plan__name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--wpistic-muted); }
.wpistic-plan__price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.wpistic-plan__price span { font-size: .9rem; font-weight: 600; color: var(--wpistic-muted); }
.wpistic-plan__features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--wpistic-text); }
.wpistic-plan__features li { display: flex; gap: 10px; }
.wpistic-plan__features li::before { content: '✓'; color: var(--wpistic-success); font-weight: 800; }

/* Products catalog ----------------------------------------- */
.wpistic-products { margin-top: 8px; }
.wpistic-product-card { display: flex; flex-direction: column; gap: 8px; }
.wpistic-product-card__top { display: flex; align-items: center; justify-content: space-between; }
.wpistic-product-card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wpistic-badge--free { color: var(--wpistic-success); border-color: var(--wpistic-success); background: var(--wpistic-accent-soft); }
.wpistic-badge--core { background: linear-gradient(135deg, var(--wpistic-accent), var(--wpistic-accent-strong)); color: var(--wpistic-accent-ink); border-color: transparent; }
.wpistic-product__head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* Usage meter ---------------------------------------------- */
.wpistic-meter { display: flex; flex-direction: column; gap: 6px; }
.wpistic-meter__head { display: flex; justify-content: space-between; font-size: 13px; color: var(--wpistic-muted); }
.wpistic-meter__bar { height: 8px; border-radius: var(--wpistic-pill); background: var(--wpistic-surface-2); overflow: hidden; }
.wpistic-meter__fill { height: 100%; border-radius: var(--wpistic-pill); background: linear-gradient(90deg, var(--wpistic-accent), var(--wpistic-accent-strong)); transition: width .4s ease; }
.wpistic-meter__fill--warn { background: var(--wpistic-warn); }
.wpistic-meter__fill--full { background: var(--wpistic-danger); }

/* Download cards ------------------------------------------- */
.wpistic-download { display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--wpistic-surface); border: 1px solid var(--wpistic-border); border-radius: var(--wpistic-radius); box-shadow: var(--wpistic-shadow); }
.wpistic-download__icon { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; background: var(--wpistic-accent-soft); }
.wpistic-download__meta { flex: 1; min-width: 0; }
.wpistic-download__name { font-weight: 700; }
.wpistic-download__sub { font-size: 13px; color: var(--wpistic-muted); }
.wpistic-download--locked { opacity: .82; }

/* Empty states --------------------------------------------- */
.wpistic-empty { text-align: center; padding: 40px 22px; border: 1px dashed var(--wpistic-border); border-radius: var(--wpistic-radius); background: var(--wpistic-surface-2); color: var(--wpistic-muted); }

/* Footer --------------------------------------------------- */
.wpistic-footer { border-top: 1px solid var(--wpistic-border); background: var(--wpistic-surface); margin-top: 64px; }
.wpistic-footer__inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 48px; }
@media (max-width: 880px) { .wpistic-footer__inner { grid-template-columns: 1fr 1fr; } }
.wpistic-footer__widget-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--wpistic-muted); margin: 0 0 12px; }
.wpistic-footer__bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-block: 20px; border-top: 1px solid var(--wpistic-border); font-size: 13px; color: var(--wpistic-muted); }
.wpistic-footer a { color: var(--wpistic-muted); text-decoration: none; }
.wpistic-footer a:hover { color: var(--wpistic-text); }

/* Posts / content ----------------------------------------- */
.wpistic-article { max-width: 760px; margin-inline: auto; }
.wpistic-article__meta { color: var(--wpistic-muted); font-size: 14px; margin-bottom: 18px; }
.wpistic-prose :where(h2, h3) { margin-top: 1.6em; }
.wpistic-prose img { border-radius: var(--wpistic-radius-sm); }
.wpistic-prose blockquote { border-left: 3px solid var(--wpistic-accent); padding-left: 18px; color: var(--wpistic-muted); margin-inline: 0; }
.wpistic-prose code { font-family: var(--wpistic-mono); background: var(--wpistic-surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.wpistic-prose pre { background: var(--wpistic-surface-2); border: 1px solid var(--wpistic-border); border-radius: var(--wpistic-radius-sm); padding: 16px; overflow: auto; }

/* Utilities ------------------------------------------------ */
.wpistic-text-center { text-align: center; }
.wpistic-mt-0 { margin-top: 0; }
.wpistic-muted { color: var(--wpistic-muted); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
