/* ===================================================
   ePRAWO.PL BLOG - Premium Design System
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bg: #f8fafc;
  --bg-accent: #f0f2ff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-hover: #f8faff;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(124, 58, 237, 0.25);
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-bg: rgba(124, 58, 237, 0.06);
  --cyan: #06b6d4;
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  --header-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04);
  --radius: 20px;
  --radius-sm: 14px;
}

html.dark {
  --bg: #050510;
  --bg-accent: #0a0a1f;
  --surface: #111127;
  --surface-muted: #181835;
  --surface-hover: #1e1e42;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(124, 58, 237, 0.4);
  --accent-bg: rgba(124, 58, 237, 0.15);
  --header-bg: rgba(5, 5, 16, 0.92);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---------- Reset ---------- */
html {
  color-scheme: light;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html.dark {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* ---------- Reading Progress Bar ---------- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-brand);
  z-index: 9999;
  width: 0%;
  transition: width 60ms linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

/* ---------- Body ---------- */
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

html.dark body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
}

body.menu-open {
  overflow: hidden;
}

/* ---------- Links ---------- */
.page-main a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.page-main a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.site-footer a {
  color: var(--accent);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  padding-left: 24px;
  padding-right: 24px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ---------- Main ---------- */
.page-main {
  padding: 120px 0 60px;
  overflow-x: clip;
}

/* ---------- Blog Index Hero ---------- */
.page-hero {
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

h1 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 .gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero>p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ---------- Search ---------- */
.search-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-form:focus-within {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.search-form label {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-row input[type="search"] {
  flex: 1;
  min-width: 180px;
}

input[type="search"],
input[type="text"],
input[type="date"],
select,
textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-muted);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

textarea {
  resize: vertical;
}

.page-main button,
.page-main .search-row .clear-link {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.page-main button {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.page-main button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.search-row .clear-link {
  text-decoration: none;
}

.search-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Post Cards Grid ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.post-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.35s;
}

.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-card:hover::before {
  opacity: 1;
}

.post-meta {
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.post-card h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-card h2 a {
  color: var(--text) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.post-card:hover h2 a {
  color: var(--accent) !important;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ---------- Tags ---------- */
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: var(--gradient-brand-soft);
  color: var(--accent);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 4px 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s;
}

html.dark .tag {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.2);
}

.tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Read More ---------- */
.read-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent) !important;
  transition: gap 0.2s;
}

.read-more::after {
  content: '→';
  transition: transform 0.2s;
}

.post-card:hover .read-more::after {
  transform: translateX(4px);
}

/* ---------- Empty State ---------- */
.empty-state {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  background: var(--surface);
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: 16px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.breadcrumb a {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ---------- Article Layout ---------- */
.article-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  min-width: 0;
}

/* ---------- Article Sidebar ---------- */
.article-aside {
  position: sticky;
  top: 110px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.article-aside h2 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.article-aside dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.article-aside dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.article-aside dd {
  margin: 3px 0 0;
  font-weight: 600;
  font-size: 0.93rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent) !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  border: 1px solid rgba(124, 58, 237, 0.12);
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  transform: translateX(-2px);
}

/* ---------- TOC ---------- */
.toc-sidebar {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.toc-sidebar h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 10px;
}

.toc-sidebar ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-sidebar li {
  margin: 0;
}

.toc-sidebar a {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 0.82rem;
  color: var(--muted) !important;
  text-decoration: none !important;
  border-left: 2px solid var(--border);
  transition: all 0.2s;
  line-height: 1.4;
}

.toc-sidebar a:hover,
.toc-sidebar a.active {
  color: var(--accent) !important;
  border-left-color: var(--accent);
}

/* ---------- Article Content ---------- */
.article-content {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(24px, 3vw, 40px);
  min-width: 0;
  overflow-x: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.article-content h1,
.article-content h2,
.article-content h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.25;
  scroll-margin-top: 100px;
}

.article-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: 2.5em 0 0.8em;
  padding-left: 16px;
  border-left: 3px solid;
  border-image: var(--gradient-brand) 1;
}

.article-content h3 {
  font-size: 1.15rem;
  margin: 2em 0 0.6em;
  color: var(--text-secondary);
}

.article-content p {
  margin: 0.8em 0;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 1em 0 1em 24px;
}

.article-content li {
  margin: 0.4em 0;
}

.article-content code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.88em;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

html.dark .article-content code {
  background: rgba(148, 163, 184, 0.1);
}

.article-content pre {
  background: #1e293b;
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.93rem;
}

.article-content th {
  background: var(--surface-muted);
  font-weight: 700;
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border);
}

.article-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Callout Boxes (Article) ---------- */
.article-content .box,
.seo-pillar-gtm-ga4 .box {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 1.5em 0;
}

.article-content .callout,
.seo-pillar-gtm-ga4 .callout {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px;
  margin: 1.5em 0;
}

.article-content .warn,
.seo-pillar-gtm-ga4 .warn {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 3px solid #ef4444;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px;
  margin: 1.5em 0;
}

/* ---------- SEO Pillar Content ---------- */
.seo-pillar-gtm-ga4 {
  font-family: inherit;
  color: var(--text);
  line-height: 1.75;
  max-width: 980px;
  margin: 0 auto;
}

.seo-pillar-gtm-ga4 h1,
.seo-pillar-gtm-ga4 h2,
.seo-pillar-gtm-ga4 h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.25;
  margin: 2em 0 0.8em;
  letter-spacing: -0.01em;
}

.seo-pillar-gtm-ga4 h1 {
  font-size: clamp(1.9rem, 4vw, 2.2rem);
}

.seo-pillar-gtm-ga4 h2 {
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  padding-left: 16px;
  border-left: 3px solid;
  border-image: var(--gradient-brand) 1;
}

.seo-pillar-gtm-ga4 h3 {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.seo-pillar-gtm-ga4 p {
  margin: 0.8em 0;
}

.seo-pillar-gtm-ga4 ul,
.seo-pillar-gtm-ga4 ol {
  margin: 1em 0 1em 24px;
}

.seo-pillar-gtm-ga4 .meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 0 16px;
}

.seo-pillar-gtm-ga4 .toc {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.seo-pillar-gtm-ga4 .toc a {
  color: var(--text);
}

.seo-pillar-gtm-ga4 .faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--surface);
  transition: border-color 0.2s;
}

.seo-pillar-gtm-ga4 .faq details:hover,
.seo-pillar-gtm-ga4 .faq details[open] {
  border-color: var(--border-hover);
}

.seo-pillar-gtm-ga4 .faq summary {
  cursor: pointer;
  font-weight: 700;
}

.seo-pillar-gtm-ga4 .small {
  font-size: 0.88rem;
  color: var(--muted);
}

.seo-pillar-gtm-ga4 code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 5px;
}

html.dark .seo-pillar-gtm-ga4 code {
  background: rgba(148, 163, 184, 0.1);
}

/* ---------- Dark Mode Overrides ---------- */
html.dark .article-content code {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.15);
}

html.dark .article-content blockquote {
  background: rgba(124, 58, 237, 0.1);
  border-left-color: var(--accent-light);
}

html.dark .article-content .box,
html.dark .seo-pillar-gtm-ga4 .box {
  background: #1a1a3a;
  border-color: rgba(148, 163, 184, 0.15);
}

html.dark .article-content .callout,
html.dark .seo-pillar-gtm-ga4 .callout {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.2);
}

html.dark .article-content .warn,
html.dark .seo-pillar-gtm-ga4 .warn {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

html.dark .article-content .toc,
html.dark .seo-pillar-gtm-ga4 .toc {
  background: #151530;
  border-color: rgba(148, 163, 184, 0.12);
}

html.dark .article-content .toc a,
html.dark .seo-pillar-gtm-ga4 .toc a {
  color: var(--text-secondary);
}

html.dark .article-content .toc a:hover,
html.dark .seo-pillar-gtm-ga4 .toc a:hover {
  color: var(--accent-light);
}

html.dark .article-content th {
  background: #1a1a3a;
}

html.dark .seo-pillar-gtm-ga4 .faq details {
  background: #151530;
  border-color: rgba(148, 163, 184, 0.1);
}

html.dark .seo-pillar-gtm-ga4 .faq details:hover,
html.dark .seo-pillar-gtm-ga4 .faq details[open] {
  border-color: rgba(124, 58, 237, 0.35);
}

html.dark .seo-pillar-gtm-ga4 h2 {
  border-image: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%) 1;
}

html.dark .tag {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.25);
  color: #a78bfa;
}

html.dark .post-card {
  background: #111127;
}

html.dark .article-content {
  background: #111127;
}

html.dark .article-aside {
  background: #111127;
}

html.dark .search-form {
  background: #111127;
}

html.dark .panel-card {
  background: #111127;
}

html.dark .empty-state {
  background: #111127;
}

html.dark .simple-message {
  background: #111127;
}

html.dark .alert.success {
  background: rgba(22, 163, 74, 0.1);
}

html.dark .alert.error {
  background: rgba(220, 38, 38, 0.08);
}

html.dark .alert.warning {
  background: rgba(202, 138, 4, 0.08);
}

html.dark .back-link {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.2);
}

html.dark .eyebrow {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
}

/* ---------- Tailwind Utility Fallbacks for Article Content ---------- */
/* Article HTML uses Tailwind classes (bg-purple-50, bg-gray-50, etc.)   */
/* but Tailwind CSS is not loaded on blog pages. These rules provide     */
/* the missing definitions so articles render correctly.                 */

.article-content .bg-purple-50 {
  background-color: #faf5ff;
}

.article-content .bg-gray-50 {
  background-color: #f9fafb;
}

.article-content .bg-purple-100 {
  background-color: #f3e8ff;
}

.article-content .border-purple-100 {
  border-color: #f3e8ff;
}

.article-content .border-gray-200 {
  border-color: #e5e7eb;
}

.article-content .border-gray-100 {
  border-color: #f3f4f6;
}

.article-content .text-purple-600 {
  color: #9333ea;
}

.article-content .text-purple-800 {
  color: #6b21a8;
}

.article-content .text-gray-600 {
  color: #4b5563;
}

.article-content .text-gray-500 {
  color: #6b7280;
}

.article-content .text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.article-content .text-sm {
  font-size: 0.875rem;
}

.article-content .text-lg {
  font-size: 1.125rem;
}

.article-content .text-xl {
  font-size: 1.25rem;
}

.article-content .text-2xl {
  font-size: 1.5rem;
}

.article-content .font-bold {
  font-weight: 700;
}

.article-content .font-semibold {
  font-weight: 600;
}

.article-content .uppercase {
  text-transform: uppercase;
}

.article-content .tracking-widest {
  letter-spacing: 0.1em;
}

.article-content .rounded-xl {
  border-radius: 12px;
}

.article-content .rounded-3xl {
  border-radius: 24px;
}

.article-content .rounded-full {
  border-radius: 9999px;
}

.article-content .p-4 {
  padding: 16px;
}

.article-content .p-6 {
  padding: 24px;
}

.article-content .p-8 {
  padding: 32px;
}

.article-content .px-3 {
  padding-left: 12px;
  padding-right: 12px;
}

.article-content .py-1 {
  padding-top: 4px;
  padding-bottom: 4px;
}

.article-content .mb-10 {
  margin-bottom: 40px;
}

.article-content .gap-8 {
  gap: 32px;
}

.article-content .cursor-pointer {
  cursor: pointer;
}

.article-content .flex {
  display: flex;
}

.article-content .flex-col {
  flex-direction: column;
}

.article-content .items-center {
  align-items: center;
}

.article-content .text-center {
  text-align: center;
}

/* Dark-mode overrides for Tailwind classes in article HTML */
html.dark .article-content .bg-purple-50 {
  background-color: rgba(124, 58, 237, 0.1) !important;
}

html.dark .article-content .bg-gray-50 {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

html.dark .article-content .bg-purple-100 {
  background-color: rgba(124, 58, 237, 0.15) !important;
}

html.dark .article-content .border-purple-100 {
  border-color: rgba(124, 58, 237, 0.2) !important;
}

html.dark .article-content .border-gray-200 {
  border-color: rgba(148, 163, 184, 0.12) !important;
}

html.dark .article-content .border-gray-100 {
  border-color: rgba(148, 163, 184, 0.08) !important;
}

html.dark .article-content .text-purple-600 {
  color: #a78bfa !important;
}

html.dark .article-content .text-purple-800 {
  color: #c4b5fd !important;
}

html.dark .article-content .text-gray-600 {
  color: #94a3b8 !important;
}

html.dark .article-content .text-gray-500 {
  color: #94a3b8 !important;
}

@media (min-width: 768px) {
  .article-content .md\:flex-row {
    flex-direction: row;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 40px 0;
  color: var(--muted);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-wrap p {
  margin: 0;
  font-size: 0.88rem;
}

.footer-wrap a {
  font-weight: 600;
  transition: color 0.2s;
}

.footer-wrap a:hover {
  color: var(--accent);
}

/* ---------- Simple Message (404) ---------- */
.simple-message {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.simple-message h1 {
  margin: 0 0 12px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 4rem;
}

.simple-message p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid transparent;
  font-size: 0.93rem;
}

.alert.success {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.08);
}

.alert.error {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.06);
}

.alert.warning {
  border-color: rgba(202, 138, 4, 0.3);
  background: rgba(202, 138, 4, 0.06);
}

/* ---------- Panel Styles ---------- */
.panel-header code {
  background: var(--surface-muted);
  border-radius: 8px;
  padding: 2px 8px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.panel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.panel-card h2 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", sans-serif;
}

.panel-list-toolbar {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 16px;
  margin-bottom: 16px;
}

.panel-list-toolbar label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.panel-list-row {
  flex-wrap: wrap;
  align-items: flex-end;
}

.panel-list-row select {
  width: auto;
  min-width: 190px;
}

.panel-list-row button {
  white-space: nowrap;
}

.table-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-form {
  display: grid;
  gap: 14px;
}

.panel-form button,
.panel-list-toolbar button {
  background: var(--gradient-brand);
  border: none;
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.panel-form button:hover,
.panel-list-toolbar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.35);
}

.panel-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.inline-check input[type="checkbox"] {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
}

.posts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.posts-table th,
.posts-table td {
  border-top: 1px solid var(--border);
  padding: 12px 10px;
  vertical-align: top;
  text-align: left;
}

.posts-table th {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.posts-table td strong {
  display: block;
  line-height: 1.35;
}

.posts-table td small {
  color: var(--muted);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-actions form {
  margin: 0;
}

.row-actions a,
.danger-link {
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.danger-link {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.page-main button.danger-link {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.row-actions a:hover,
.danger-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
  text-decoration: none;
}

.danger-link:hover,
.page-main button.danger-link:hover {
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-main {
    padding-top: 110px;
  }
}

@media (max-width: 680px) {
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-list-row select {
    width: 100%;
    min-width: 0;
  }

  .search-row .clear-link {
    text-align: center;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeInUp 0.5s ease both;
}

.post-card:nth-child(2) {
  animation-delay: 0.08s;
}

.post-card:nth-child(3) {
  animation-delay: 0.16s;
}

.post-card:nth-child(4) {
  animation-delay: 0.24s;
}

.post-card:nth-child(5) {
  animation-delay: 0.32s;
}

.post-card:nth-child(6) {
  animation-delay: 0.4s;
}

.page-hero {
  animation: fadeInUp 0.6s ease both;
}

.search-form {
  animation: fadeInUp 0.6s ease 0.15s both;
}