/*
Theme Name: SpeedWrite Blog
Theme URI: https://thesis-speedwrite.ai
Author: Thesisprofs
Author URI: https://thesis-speedwrite.ai
Description: The Thesis SpeedWrite blog theme. Carries the app's warm scholarly design language — parchment canvas, white cards, Fraunces headings, DM Sans body — and works with Elementor and Elementor Pro Theme Builder.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: speedwrite-blog
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ─── Tokens (mirrors the app's tailwind.config.js) ─── */
:root {
  --sw-bg: #F4F2EE;
  --sw-surface: #FFFFFF;
  --sw-surface2: #ECEAE5;
  --sw-border: #DDD9D0;
  --sw-border2: #C8C4BA;
  --sw-accent: #1E5FD8;
  --sw-accent2: #316EE0;
  --sw-accent-bg: #EAF1FD;
  --sw-gold: #E8A020;
  --sw-gold-ink: #9A6500;
  --sw-gold-bg: #FDF7E8;
  --sw-danger: #B83232;
  --sw-text: #1B2030;
  --sw-muted: #7E8A9A;
  --sw-muted2: #4B5872;
  --sw-navy: #08192F;
  --sw-navy2: #0D2040;

  --sw-font-display: 'Fraunces', Georgia, serif;
  --sw-font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sw-font-mono: 'DM Mono', ui-monospace, Menlo, monospace;

  --sw-r-sm: 6px;
  --sw-r: 10px;
  --sw-r-lg: 14px;
  --sw-r-xl: 20px;

  --sw-shadow-card: 0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --sw-shadow-panel: 0 4px 24px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.05);
  --sw-shadow-float: 0 8px 32px rgba(0,0,0,.12);
  --sw-shadow-glow: 0 0 0 3px rgba(30,95,216,.15);
  --sw-shadow-inset: inset 0 1px 3px rgba(0,0,0,.06);

  --sw-max: 1180px;
  --sw-header-h: 64px;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sw-bg);
  color: var(--sw-text);
  font-family: var(--sw-font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--sw-accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--sw-accent2); }

h1, h2, h3, h4, h5, h6 { font-family: var(--sw-font-display); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; color: var(--sw-text); margin: 0 0 .5em; }
p { margin: 0 0 1em; }

::selection { background: rgba(30,95,216,.18); color: var(--sw-text); }
*:focus-visible { outline: 2px solid rgba(30,95,216,.5); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.sw-skip { position: absolute; left: -9999px; top: 8px; z-index: 999; background: var(--sw-accent); color: #fff; padding: 8px 14px; border-radius: var(--sw-r-sm); font-size: 14px; font-weight: 600; }
.sw-skip:focus { left: 8px; color: #fff; }

.sw-wrap { width: min(var(--sw-max), calc(100% - 40px)); margin-inline: auto; }
.sw-wrap--mid { width: min(960px, calc(100% - 40px)); }
.sw-wrap--narrow { width: min(760px, calc(100% - 40px)); }
.sw-wrap--article { width: min(1090px, calc(100% - 40px)); }

@keyframes sw-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─── Buttons (BaseButton.vue) ─── */
.sw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border: 1px solid transparent; border-radius: var(--sw-r);
  font-family: var(--sw-font-sans); font-size: 14px; font-weight: 600; line-height: 1.45;
  white-space: nowrap; cursor: pointer; user-select: none;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.sw-btn:active { transform: scale(.98); }
.sw-btn--accent { background: var(--sw-accent); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sw-btn--accent:hover { background: var(--sw-accent2); color: #fff; }
.sw-btn--ghost { background: transparent; color: var(--sw-muted2); border-color: var(--sw-border); }
.sw-btn--ghost:hover { background: var(--sw-surface2); color: var(--sw-text); }
.sw-btn--surface { background: var(--sw-surface); color: var(--sw-text); border-color: var(--sw-border); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.sw-btn--surface:hover { background: var(--sw-surface2); color: var(--sw-text); }
.sw-btn--gold { background: var(--sw-gold); color: var(--sw-navy); font-weight: 700; }
.sw-btn--gold:hover { background: #F0AB1A; color: var(--sw-navy); transform: translateY(-1px); }
.sw-btn--onnavy { background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.14); }
.sw-btn--onnavy:hover { background: rgba(255,255,255,.12); color: #fff; }
.sw-btn--sm { padding: 6px 12px; font-size: 12px; }
.sw-btn--lg { padding: 12px 22px; font-size: 15px; }
.sw-btn--full { width: 100%; }

.sw-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  background: transparent; border: 0; border-radius: var(--sw-r-sm); color: var(--sw-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.sw-iconbtn:hover { background: var(--sw-surface2); color: var(--sw-text); }

/* ─── Badges, tags, labels ─── */
.sw-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px;
  background: var(--sw-accent-bg); color: var(--sw-accent); border: 1px solid rgba(30,95,216,.2);
  border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.6;
}
a.sw-badge:hover { background: var(--sw-accent); color: #fff; border-color: var(--sw-accent); }
.sw-badge--gold { background: var(--sw-gold-bg); color: var(--sw-gold-ink); border-color: rgba(232,160,32,.35); }

.sw-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sw-accent); }
.sw-tag__line { width: 22px; height: 2px; background: currentColor; border-radius: 1px; }
.sw-tag--gold { color: var(--sw-gold); }

.sw-section-label { display: block; margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sw-muted); }

.sw-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--sw-font-mono); font-size: 11.5px; color: var(--sw-muted); letter-spacing: -.01em; }

/* ─── Inputs ─── */
.sw-input, .sw-comments input[type="text"], .sw-comments input[type="email"], .sw-comments input[type="url"], .sw-comments textarea {
  width: 100%; padding: 10px 14px; background: var(--sw-surface); color: var(--sw-text);
  border: 1px solid var(--sw-border); border-radius: var(--sw-r); box-shadow: var(--sw-shadow-inset);
  font-family: var(--sw-font-sans); font-size: 14px; line-height: 1.45; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.sw-input::placeholder { color: var(--sw-muted); }
.sw-input:focus, .sw-comments input:focus, .sw-comments textarea:focus { border-color: var(--sw-accent); box-shadow: var(--sw-shadow-glow); }

.sw-search { position: relative; display: flex; gap: 8px; }
.sw-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sw-muted); pointer-events: none; }
.sw-search .sw-input { padding-left: 38px; }
.sw-search .sw-input::-webkit-search-cancel-button { display: none; }

/* ─── Header (AppTopbar.vue) ─── */
.sw-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--sw-border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: box-shadow .25s; }
.sw-header.is-scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.admin-bar .sw-header { top: 32px; }
.sw-header__inner { width: min(var(--sw-max), calc(100% - 40px)); height: var(--sw-header-h); margin-inline: auto; display: flex; align-items: center; gap: 20px; }
.sw-header__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sw-logo, .custom-logo-link { display: inline-flex; }
.sw-logo img, .custom-logo-link img { height: 36px; width: auto; display: block; }
.sw-header__pill { padding: 2px 9px; background: var(--sw-surface2); border: 1px solid var(--sw-border); border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sw-muted2); }

.sw-nav { flex: 1; min-width: 0; }
.sw-menu, .sw-menu ul { list-style: none; margin: 0; padding: 0; }
.sw-menu { display: flex; align-items: center; gap: 2px; }
.sw-menu li { position: relative; }
.sw-menu a { display: block; padding: 7px 11px; border-radius: var(--sw-r-sm); font-size: 14px; font-weight: 500; color: var(--sw-muted2); white-space: nowrap; transition: background .15s, color .15s; }
.sw-menu a:hover { background: var(--sw-surface2); color: var(--sw-text); }
.sw-menu .current-menu-item > a, .sw-menu .current_page_item > a, .sw-menu .current-menu-ancestor > a { background: var(--sw-accent-bg); color: var(--sw-accent); }
.sw-menu .sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; padding: 6px; background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-r); box-shadow: var(--sw-shadow-panel); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
.sw-menu li:hover > .sub-menu, .sw-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sw-nav__mobile-actions { display: none; }

.sw-header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sw-header__login { padding: 7px 10px; font-size: 14px; font-weight: 500; color: var(--sw-muted2); }
.sw-header__login:hover { color: var(--sw-text); }
.sw-burger { display: none; }

.sw-searchbar { border-top: 1px solid var(--sw-border); background: var(--sw-surface); animation: sw-fade-up .2s ease both; }
.sw-searchbar__inner { width: min(680px, calc(100% - 40px)); margin-inline: auto; padding: 14px 0; }

/* ─── Hero ─── */
.sw-hero { position: relative; padding: 72px 0 44px; text-align: center; }
.sw-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(30,95,216,.08) 0%, transparent 62%); }
.sw-hero > .sw-wrap { position: relative; animation: sw-fade-up .5s cubic-bezier(.16,1,.3,1) both; }
.sw-hero--compact { padding: 52px 0 32px; }
.sw-hero__title { max-width: 820px; margin: 0 auto 16px; font-size: clamp(34px, 5.2vw, 58px); font-weight: 700; line-height: 1.06; letter-spacing: -.025em; }
.sw-hero--compact .sw-hero__title { font-size: clamp(28px, 4vw, 42px); }
.sw-hero__title em, .sw-cta__title em { font-style: italic; font-weight: 400; color: var(--sw-accent); }
.sw-hero__text { max-width: 620px; margin: 0 auto 26px; font-size: 17px; line-height: 1.7; color: var(--sw-muted2); }
.sw-hero__text p:last-child { margin: 0; }
.sw-hero__search { max-width: 520px; margin: 0 auto 28px; }

.sw-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.sw-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; background: var(--sw-surface); color: var(--sw-muted2); border: 1px solid var(--sw-border); border-radius: 999px; font-size: 13px; font-weight: 500; transition: all .15s; }
.sw-chip:hover { border-color: var(--sw-border2); color: var(--sw-text); box-shadow: var(--sw-shadow-card); }
.sw-chip.is-active { background: var(--sw-accent-bg); border-color: rgba(30,95,216,.25); color: var(--sw-accent); font-weight: 600; }
.sw-chip__count { font-family: var(--sw-font-mono); font-size: 10.5px; color: var(--sw-muted); }
.sw-chip.is-active .sw-chip__count { color: inherit; opacity: .7; }

/* ─── Cards (.sw-card) ─── */
.sw-listing { padding: 12px 0 80px; }
.sw-listing > .sw-section-label { margin: 44px 0 16px; }
.sw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.sw-card { display: flex; flex-direction: column; overflow: hidden; background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-r-lg); box-shadow: var(--sw-shadow-card); transition: border-color .2s, box-shadow .2s, transform .2s; }
.sw-card:hover { border-color: var(--sw-border2); box-shadow: var(--sw-shadow-panel); transform: translateY(-2px); }
.sw-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sw-surface2); border-bottom: 1px solid var(--sw-border); }
.sw-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.sw-card:hover .sw-card__media img { transform: scale(1.035); }
.sw-card__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(30,95,216,.45); background: linear-gradient(135deg, rgba(30,95,216,.10) 0%, rgba(232,160,32,.10) 100%); }
.sw-card__body { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 18px; }
.sw-card__title { margin: 12px 0 8px; font-size: 20px; line-height: 1.25; }
.sw-card__title a { color: var(--sw-text); }
.sw-card__title a:hover { color: var(--sw-accent); }
.sw-card__excerpt { margin: 0 0 18px; font-size: 14.5px; line-height: 1.62; color: var(--sw-muted2); }
.sw-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sw-border); }
.sw-card__more { font-size: 13px; font-weight: 600; white-space: nowrap; }

.sw-card--featured { flex-direction: row; border-radius: var(--sw-r-xl); }
.sw-card--featured .sw-card__media { flex: 1.15; aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--sw-border); }
.sw-card--featured .sw-card__body { flex: 1; justify-content: center; padding: 36px 40px; }
.sw-card--featured .sw-card__flag { align-self: flex-start; margin-bottom: 10px; }
.sw-card--featured .sw-card__title { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; margin: 14px 0 12px; }
.sw-card--featured .sw-card__excerpt { font-size: 16px; }
.sw-card--featured .sw-card__foot { margin-top: 8px; }

/* ─── Pagination ─── */
.sw-pagination { margin-top: 44px; }
.sw-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sw-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; background: var(--sw-surface); color: var(--sw-muted2); border: 1px solid var(--sw-border); border-radius: var(--sw-r); font-size: 13px; font-weight: 600; transition: all .15s; }
.sw-pagination a.page-numbers:hover { background: var(--sw-surface2); color: var(--sw-text); }
.sw-pagination .page-numbers.current { background: var(--sw-accent); border-color: var(--sw-accent); color: #fff; }
.sw-pagination .page-numbers.dots { background: transparent; border-color: transparent; }

/* ─── Empty state ─── */
.sw-empty { display: flex; flex-direction: column; align-items: center; padding: 64px 0; text-align: center; }
.sw-empty--page { padding: 96px 0 120px; }
.sw-empty__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 16px; background: var(--sw-surface2); border: 1px solid var(--sw-border); border-radius: 50%; color: var(--sw-muted); }
.sw-empty__code { margin-bottom: 14px; font-family: var(--sw-font-mono); font-size: 13px; font-weight: 500; letter-spacing: .2em; color: var(--sw-gold-ink); }
.sw-empty__title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.sw-empty__text { max-width: 440px; margin: 0 0 22px; font-size: 14.5px; color: var(--sw-muted2); }
.sw-empty .sw-hero__search { width: 100%; }

/* ─── Article ─── */
.sw-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 3px; pointer-events: none; }
.admin-bar .sw-progress { top: 32px; }
.sw-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--sw-accent), var(--sw-gold)); transform: scaleX(0); transform-origin: left; }

.sw-article__head { position: relative; padding: 52px 0 32px; }
.sw-article__head::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(30,95,216,.07) 0%, transparent 62%); }
.sw-article__head > .sw-wrap { position: relative; animation: sw-fade-up .45s cubic-bezier(.16,1,.3,1) both; }
.sw-crumbs { display: flex; align-items: center; gap: 7px; margin-bottom: 20px; font-size: 13px; }
.sw-crumbs a { color: var(--sw-muted); }
.sw-crumbs a:hover { color: var(--sw-text); }
.sw-crumbs span { color: var(--sw-border2); }
.sw-article__title { max-width: 860px; margin: 14px 0 22px; font-size: clamp(30px, 4.6vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; }

.sw-byline { display: flex; align-items: center; gap: 12px; }
.sw-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, var(--sw-accent), var(--sw-gold)); color: #fff; font-size: 13px; font-weight: 700; }
.sw-byline__name { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }

.sw-article__cover { margin: 0 0 8px; overflow: hidden; background: var(--sw-surface2); border: 1px solid var(--sw-border); border-radius: var(--sw-r-xl); box-shadow: var(--sw-shadow-card); }
.sw-article__cover img { display: block; width: 100%; max-height: 540px; object-fit: cover; }

.sw-article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; padding: 40px 0 72px; }
.sw-article__content { min-width: 0; }
.sw-article__elementor { padding-bottom: 56px; }
.sw-page .sw-prose, .page .sw-prose { padding-bottom: 72px; }

.sw-aside__sticky { position: sticky; top: calc(var(--sw-header-h) + 24px); display: flex; flex-direction: column; gap: 18px; }
.admin-bar .sw-aside__sticky { top: calc(var(--sw-header-h) + 56px); }
.sw-toc { padding: 16px 12px 12px; background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-r-lg); box-shadow: var(--sw-shadow-card); }
.sw-toc[hidden] { display: none; }
.sw-toc .sw-section-label { padding: 0 10px; margin-bottom: 6px; }
.sw-toc ol { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.sw-toc a { display: block; padding: 7px 10px; border-radius: var(--sw-r-sm); font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--sw-muted2); transition: background .15s, color .15s; }
.sw-toc a:hover { background: var(--sw-surface2); color: var(--sw-text); }
.sw-toc a.is-active { background: var(--sw-accent-bg); color: var(--sw-accent); }

.sw-promo { padding: 20px; background: linear-gradient(135deg, rgba(30,95,216,.07) 0%, var(--sw-surface) 60%); border: 1px solid rgba(30,95,216,.16); border-radius: var(--sw-r-lg); }
.sw-promo__title { margin: 12px 0 6px; font-family: var(--sw-font-display); font-size: 19px; font-weight: 600; line-height: 1.25; }
.sw-promo__text { margin: 0 0 16px; font-size: 13.5px; line-height: 1.6; color: var(--sw-muted2); }

/* Prose — scoped so it never touches Elementor widgets */
.sw-prose { font-size: 17.5px; line-height: 1.8; color: #262C3D; overflow-wrap: break-word; }
.sw-prose > *:first-child { margin-top: 0; }
.sw-prose p, .sw-prose ul, .sw-prose ol, .sw-prose figure, .sw-prose blockquote, .sw-prose pre, .sw-prose table { margin: 0 0 1.5em; }
.sw-prose h2 { margin: 2em 0 .6em; font-size: clamp(25px, 3vw, 31px); scroll-margin-top: calc(var(--sw-header-h) + 32px); }
.sw-prose h3 { margin: 1.8em 0 .5em; font-size: 22px; scroll-margin-top: calc(var(--sw-header-h) + 32px); }
.sw-prose h4 { margin: 1.6em 0 .5em; font-family: var(--sw-font-sans); font-size: 17px; font-weight: 700; letter-spacing: 0; }
.sw-prose a { text-decoration: underline; text-decoration-color: rgba(30,95,216,.35); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.sw-prose a:hover { text-decoration-color: currentColor; }
.sw-prose strong { font-weight: 600; color: var(--sw-text); }
.sw-prose ul, .sw-prose ol { padding-left: 1.4em; }
.sw-prose li { margin-bottom: .5em; }
.sw-prose li::marker { color: var(--sw-accent); font-weight: 600; }
.sw-prose img { border-radius: var(--sw-r-lg); }
.sw-prose figure img { display: block; border: 1px solid var(--sw-border); }
.sw-prose figcaption { margin-top: 10px; font-size: 13px; text-align: center; color: var(--sw-muted); }
.sw-prose blockquote { padding: 18px 24px; background: var(--sw-gold-bg); border: 1px solid rgba(232,160,32,.25); border-left: 3px solid var(--sw-gold); border-radius: var(--sw-r); font-family: var(--sw-font-display); font-size: 1.1em; font-style: italic; line-height: 1.6; color: var(--sw-text); }
.sw-prose blockquote p:last-child { margin: 0; }
.sw-prose blockquote cite { display: block; margin-top: 10px; font-family: var(--sw-font-sans); font-size: 13px; font-style: normal; color: var(--sw-muted2); }
.sw-prose code { padding: 2px 6px; background: var(--sw-surface2); border-radius: 4px; font-family: var(--sw-font-mono); font-size: .86em; }
.sw-prose pre { padding: 18px 20px; overflow-x: auto; background: var(--sw-navy); color: #E7ECF5; border-radius: var(--sw-r); font-family: var(--sw-font-mono); font-size: 14px; line-height: 1.65; }
.sw-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.sw-prose hr { height: 1px; margin: 2.6em 0; background: var(--sw-border); border: 0; }
.sw-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.sw-prose th, .sw-prose td { padding: 10px 14px; border: 1px solid var(--sw-border); text-align: left; }
.sw-prose th { background: var(--sw-surface2); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sw-muted2); }
.sw-prose td { background: var(--sw-surface); }
.sw-prose .wp-block-button__link { padding: 11px 22px; background: var(--sw-accent); color: #fff; border-radius: var(--sw-r); font-size: 15px; font-weight: 600; text-decoration: none; }
.sw-prose .wp-block-button__link:hover { background: var(--sw-accent2); }
.sw-prose .alignwide { width: min(960px, calc(100vw - 40px)); max-width: none; margin-inline: 50%; transform: translateX(-50%); }
.sw-prose .aligncenter { display: block; margin-inline: auto; }
.sw-prose .alignleft { float: left; margin: .4em 1.5em 1em 0; }
.sw-prose .alignright { float: right; margin: .4em 0 1em 1.5em; }
.sw-prose::after { content: ''; display: table; clear: both; }
.sw-pages { display: flex; gap: 8px; font-size: 14px; font-weight: 600; }

.sw-article__foot { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--sw-border); }
.sw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.sw-tags a { padding: 4px 11px; background: var(--sw-surface2); border: 1px solid var(--sw-border); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--sw-muted2); }
.sw-tags a::before { content: '#'; opacity: .5; }
.sw-tags a:hover { background: var(--sw-accent-bg); border-color: rgba(30,95,216,.2); color: var(--sw-accent); }
.sw-share__row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── CTA band ─── */
.sw-cta { position: relative; overflow: hidden; padding: 84px 0; background: var(--sw-navy); text-align: center; }
.sw-cta::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 48px 48px; }
.sw-cta::after { content: ''; position: absolute; left: 50%; top: -40%; width: 720px; height: 520px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(circle, rgba(36,103,232,.28) 0%, transparent 65%); }
.sw-cta__inner { position: relative; z-index: 1; width: min(680px, calc(100% - 40px)); margin-inline: auto; }
.sw-cta__title { margin: 0 0 16px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; line-height: 1.08; letter-spacing: -.022em; color: #fff; }
.sw-cta__title em { color: var(--sw-gold); }
.sw-cta__text { margin: 0 auto 28px; font-size: 16.5px; line-height: 1.75; color: rgba(255,255,255,.58); }
.sw-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sw-cta__foot { margin: 22px 0 0; font-family: var(--sw-font-mono); font-size: 11.5px; letter-spacing: .04em; color: rgba(255,255,255,.34); }

/* ─── Related + comments ─── */
.sw-related { padding: 72px 0 80px; }
.sw-related__title { margin: 0 0 26px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; }

.sw-comments { margin: 0 0 80px; padding: 28px; background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-r-lg); box-shadow: var(--sw-shadow-card); }
.sw-comments__title { margin: 0 0 18px; font-size: 22px; }
.sw-comments__list, .sw-comments__list ol { list-style: none; margin: 0; padding: 0; }
.sw-comments__list .children { margin-left: 28px; }
.sw-comments .comment-body { padding: 16px 0; border-bottom: 1px solid var(--sw-border); font-size: 15px; }
.sw-comments .comment-author { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.sw-comments .comment-author img { border-radius: 50%; }
.sw-comments .comment-author .says { display: none; }
.sw-comments .comment-metadata, .sw-comments .comment-metadata a, .sw-comments .logged-in-as, .sw-comments .comment-notes { font-size: 12px; color: var(--sw-muted); }
.sw-comments .comment-metadata { margin: 2px 0 8px 46px; font-family: var(--sw-font-mono); }
.sw-comments .comment-content { margin-left: 46px; }
.sw-comments .reply { margin-left: 46px; font-size: 12px; font-weight: 600; }
.sw-comments .comment-respond { margin-top: 24px; }
.sw-comments .comment-form label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: var(--sw-muted2); }
.sw-comments .comment-form p { margin: 0 0 14px; }
.sw-comments .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.sw-comments .comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* ─── Footer ─── */
.sw-footer { background: var(--sw-navy); color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.06); }
.sw-footer__inner { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; width: min(var(--sw-max), calc(100% - 40px)); margin-inline: auto; padding: 60px 0 44px; }
.sw-footer__brand p { max-width: 330px; margin: 18px 0 22px; font-size: 14px; line-height: 1.7; }
.sw-footer__label { display: block; margin-bottom: 14px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.34); }
.sw-footer ul { list-style: none; margin: 0; padding: 0; }
.sw-footer li { margin-bottom: 9px; }
.sw-footer li a { font-size: 14px; color: rgba(255,255,255,.62); }
.sw-footer li a:hover { color: #fff; }
.sw-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; width: min(var(--sw-max), calc(100% - 40px)); margin-inline: auto; padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12.5px; color: rgba(255,255,255,.36); }
.sw-footer__mark { font-family: var(--sw-font-display); font-weight: 700; letter-spacing: .12em; }

/* ─── Responsive ─── */
@media (max-width: 1040px) {
  .sw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-wrap--article { width: min(760px, calc(100% - 40px)); }
  .sw-article__layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sw-aside__sticky { position: static; }
  .sw-toc { display: none; }
  .sw-footer__inner { grid-template-columns: 1fr 1fr 1fr; }
  .sw-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .sw-burger { display: inline-flex; }
  .sw-header__login, .sw-header__cta { display: none; }
  .sw-header__inner { justify-content: space-between; }
  .sw-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 20px 20px; background: var(--sw-surface); border-bottom: 1px solid var(--sw-border); box-shadow: var(--sw-shadow-panel); }
  .sw-nav.is-open { display: block; animation: sw-fade-up .2s ease both; }
  .sw-menu { flex-direction: column; align-items: stretch; }
  .sw-menu a { padding: 11px 12px; font-size: 15px; }
  .sw-menu .sub-menu { position: static; min-width: 0; padding: 0 0 0 14px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .sw-nav__mobile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--sw-border); }

  .sw-card--featured { flex-direction: column; border-radius: var(--sw-r-lg); }
  .sw-card--featured .sw-card__media { flex: none; min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--sw-border); }
  .sw-card--featured .sw-card__body { padding: 22px; }
}

@media (max-width: 782px) {
  .admin-bar .sw-header, .admin-bar .sw-progress { top: 46px; }
}

@media (max-width: 640px) {
  .sw-wrap, .sw-wrap--mid, .sw-wrap--narrow, .sw-wrap--article, .sw-header__inner, .sw-footer__inner, .sw-footer__bottom { width: calc(100% - 32px); }
  .sw-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sw-hero { padding: 48px 0 32px; }
  .sw-hero__text { font-size: 16px; }
  .sw-chips { flex-wrap: nowrap; justify-content: flex-start; margin-inline: -16px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; }
  .sw-chips::-webkit-scrollbar { display: none; }
  .sw-chip { flex-shrink: 0; }
  .sw-search .sw-btn { padding-inline: 13px; }
  .sw-listing { padding-bottom: 56px; }
  .sw-article__head { padding: 36px 0 24px; }
  .sw-article__cover { border-radius: var(--sw-r-lg); }
  .sw-article__layout { padding: 28px 0 56px; }
  .sw-prose { font-size: 16.5px; line-height: 1.75; }
  .sw-prose .alignleft, .sw-prose .alignright { float: none; margin: 0 0 1.5em; }
  .sw-cta { padding: 60px 0; }
  .sw-cta__actions .sw-btn { width: 100%; }
  .sw-related { padding: 52px 0 56px; }
  .sw-comments { padding: 20px; margin-bottom: 56px; }
  .sw-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding: 44px 0 32px; }
}

@media (max-width: 600px) {
  .admin-bar .sw-header, .admin-bar .sw-progress { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
