/*
Theme Name:   Waleed Alsadi (GeneratePress Child)
Theme URI:    https://waleedalsadi.com
Description:  Arabic RTL tech blog design on top of GeneratePress: sticky glass header, hero, card grid, TOC, dark mode, code copy.
Template:     generatepress
Version:      1.0.0
Text Domain:  wa-child
*/

/* ================================================================ tokens */
:root {
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: rgba(37, 99, 235, .08);
  --link: #2563EB;
  --text: #334155;
  --heading: #0F172A;
  --muted: #64748B;
  --header-bg: rgba(248, 250, 252, .78);
  --input-bg: #F1F5F9;
  --toc-bg: #F8FAFC;
  --code-bg: #0D1117;
  --code-text: #E6EDF3;
  --code-border: #1F2937;
  --inline-code-bg: #EEF2FF;
  --inline-code-text: #1E40AF;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-hover: 0 18px 40px -18px rgba(15, 23, 42, .28);
  --radius: 16px;
  --container: 1200px;
  --header-h: 68px;
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0B1120;
  --card: #1E293B;
  --border: #2A3A52;
  --primary: #2563EB;
  --primary-hover: #3B82F6;
  --primary-soft: rgba(59, 130, 246, .16);
  --link: #60A5FA;
  --text: #CBD5E1;
  --heading: #F1F5F9;
  --muted: #94A3B8;
  --header-bg: rgba(11, 17, 32, .72);
  --input-bg: #162033;
  --toc-bg: #162033;
  --code-border: #263244;
  --inline-code-bg: rgba(96, 165, 250, .14);
  --inline-code-text: #93C5FD;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-hover: 0 18px 40px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ================================================================ base */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body,
button, input, select, textarea {
  font-family: var(--font);
}
body {
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-family: var(--font); font-weight: 700; line-height: 1.4; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--primary-hover); }
::selection { background: rgba(37, 99, 235, .22); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
.wa-i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }

/* neutralise GeneratePress containers: our templates manage their own widths */
.site.grid-container, .site.container, #page { max-width: none !important; padding: 0 !important; background: transparent; }
.site-content { display: block !important; padding: 0 !important; }
.site-footer, .site-info { background: transparent !important; padding: 0 !important; }
.wa-container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.wa-main { min-height: 50vh; }

/* ================================================================ header */
.wa-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.admin-bar .wa-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .wa-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wa-header { top: 0; } }

.wa-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.wa-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); flex: none; }
.wa-brand:hover { color: var(--heading); }
.wa-brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #2563EB, #1E40AF); color: #fff;
  font-weight: 700; font-size: 20px; line-height: 1; box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8);
}
.wa-brand__avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; display: block;
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--primary), 0 6px 16px -8px rgba(37, 99, 235, .7);
  transition: transform .2s ease;
}
.wa-brand:hover .wa-brand__avatar { transform: scale(1.05); }
.wa-brand--footer .wa-brand__avatar { width: 48px; height: 48px; box-shadow: 0 0 0 2px #0B1120, 0 0 0 4px var(--primary); }
.wa-brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.wa-brand__name { font-weight: 700; font-size: 18px; }
.wa-brand__tag { font-size: 12px; color: var(--muted); }

.wa-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.wa-nav ul, .wa-mobile ul { list-style: none; margin: 0; padding: 0; }
.wa-nav ul { display: flex; gap: 2px; }
.wa-nav a, .wa-mobile a {
  display: block; padding: 7px 12px; border-radius: 9px; font-size: 15px; font-weight: 500;
  color: var(--text); white-space: nowrap; transition: background .15s, color .15s;
}
.wa-nav a:hover, .wa-mobile a:hover { background: var(--primary-soft); color: var(--primary); }
.wa-nav a.is-active, .wa-mobile a.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

.wa-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.wa-search { position: relative; display: flex; align-items: center; margin: 0; }
.wa-search .wa-i { position: absolute; inset-inline-start: 11px; color: var(--muted); pointer-events: none; }
.wa-search input[type="search"] {
  width: 190px; height: 38px; margin: 0; padding: 0 36px 0 12px; padding-inline-start: 36px; padding-inline-end: 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--input-bg); color: var(--heading);
  font-size: 14px; transition: width .2s, border-color .2s, background .2s;
}
.wa-search input[type="search"]::placeholder { color: var(--muted); }
.wa-search input[type="search"]:focus { width: 230px; outline: none; border-color: var(--primary); background: var(--card); }

.wa-icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--heading); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.wa-icon-btn:hover, .wa-icon-btn:focus { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.wa-icon-btn .wa-i { width: 18px; height: 18px; }
.wa-theme-toggle__sun { display: none; }
html[data-theme="dark"] .wa-theme-toggle__sun { display: inline; }
html[data-theme="dark"] .wa-theme-toggle__moon { display: none; }
.wa-menu-toggle { display: none; }

.wa-mobile { border-top: 1px solid var(--border); padding: 14px 0 18px; }
.wa-mobile[hidden] { display: none; }
.wa-mobile .wa-search { margin-bottom: 10px; }
.wa-mobile .wa-search input[type="search"], .wa-mobile .wa-search input[type="search"]:focus { width: 100%; }
.wa-mobile ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }

@media (max-width: 1080px) {
  .wa-nav a { padding: 7px 9px; font-size: 14px; }
  .wa-search input[type="search"] { width: 150px; }
  .wa-search input[type="search"]:focus { width: 180px; }
}
@media (max-width: 960px) {
  .wa-nav, .wa-actions > .wa-search { display: none; }
  .wa-menu-toggle { display: inline-grid; }
  .wa-header__inner { justify-content: space-between; }
}
@media (min-width: 961px) { .wa-mobile { display: none !important; } }

/* ================================================================ buttons, badges, pills */
.wa-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 16px; border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.wa-btn:hover { transform: translateY(-1px); }
.wa-btn--primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .9); }
.wa-btn--primary:hover { background: var(--primary-hover); color: #fff; }
.wa-btn--ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .22); }
.wa-btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); }
.wa-btn--primary .wa-i, .wa-btn--ghost .wa-i { width: 18px; height: 18px; }

.wa-badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--primary-soft); color: var(--primary);
}
a.wa-badge:hover { background: var(--primary); color: #fff; }
html[data-theme="dark"] .wa-badge { color: #93C5FD; }

.wa-filters { margin: 0 0 28px; }
.wa-filters__track { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.wa-filters__track::-webkit-scrollbar { display: none; }
.wa-pill {
  flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14.5px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.wa-pill:hover { border-color: var(--primary); color: var(--primary); }
.wa-pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ================================================================ hero */
.wa-hero {
  position: relative; overflow: hidden; color: #E2E8F0;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}
.wa-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(148, 163, 184, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%);
}
.wa-hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; inset-inline-end: -140px; top: -220px; pointer-events: none;
  background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 65%);
}
.wa-hero__inner { position: relative; z-index: 1; padding-block: 88px 96px; max-width: 920px; margin-inline-start: auto; margin-inline-end: auto; text-align: center; }
.wa-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  color: #BFDBFE; background: rgba(37, 99, 235, .16); border: 1px solid rgba(96, 165, 250, .28);
}
.wa-hero__title { margin: 22px 0 16px; color: #F8FAFC; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.3; letter-spacing: -0.01em; }
.wa-hero__lead { max-width: 680px; margin: 0 auto 32px; font-size: clamp(16px, 1.8vw, 19px); color: #94A3B8; line-height: 1.9; }
.wa-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ================================================================ sections + grid */
.wa-section { padding-block: 56px; }
.wa-section--tight { padding-block: 32px 64px; }
.wa-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.wa-section__title { margin: 0 0 18px; font-size: 26px; }
.wa-section__head .wa-section__title { margin: 0; }
.wa-link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }

.wa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1024px) { .wa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wa-grid { grid-template-columns: 1fr; gap: 18px; } }

.wa-empty { margin: 24px 0 0; padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.wa-empty[hidden] { display: none; }

/* ================================================================ card */
.wa-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.wa-card[hidden] { display: none; }
.wa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(37, 99, 235, .35); }
.wa-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0F172A; }
.wa-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.wa-card:hover .wa-card__media img { transform: scale(1.04); }
.wa-card__placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255, 255, 255, .5);
  background: linear-gradient(135deg, #1E3A8A, #0F172A);
}
.wa-card__placeholder .wa-i { width: 40px; height: 40px; }
.wa-card__badge {
  position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(255, 255, 255, .94); color: var(--primary);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .wa-card__badge { background: rgba(15, 23, 42, .85); color: #93C5FD; }
.wa-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 18px; }
.wa-card__title { margin: 0 0 8px; font-size: 18.5px; line-height: 1.55; }
.wa-card__title a { color: var(--heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.wa-card:hover .wa-card__title a { color: var(--primary); }
html[data-theme="dark"] .wa-card:hover .wa-card__title a { color: #93C5FD; }
.wa-card__excerpt {
  margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wa-card .wa-meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }

.wa-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.wa-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.wa-meta a { color: var(--muted); position: relative; z-index: 2; }
.wa-meta a:hover { color: var(--primary); }
.wa-meta--lg { font-size: 14.5px; justify-content: center; }

/* ================================================================ YouTube band */
.wa-yt { background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); color: #DBEAFE; position: relative; overflow: hidden; }
.wa-yt::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000);
}
.wa-yt__inner { position: relative; display: flex; align-items: center; gap: 28px; padding-block: 52px; }
.wa-yt__icon { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: rgba(255, 255, 255, .14); color: #fff; }
.wa-yt__icon .wa-i { width: 38px; height: 38px; }
.wa-yt__text { flex: 1; }
.wa-yt__text h2 { margin: 0 0 6px; color: #fff; font-size: clamp(22px, 2.6vw, 28px); }
.wa-yt__text p { margin: 0; max-width: 640px; line-height: 1.85; }
.wa-btn--yt { flex: none; background: #fff; color: #0F172A; }
.wa-btn--yt .wa-i { color: #FF0033; width: 22px; height: 22px; }
.wa-btn--yt:hover { color: #0F172A; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); }
@media (max-width: 760px) {
  .wa-yt__inner { flex-direction: column; text-align: center; gap: 18px; }
  .wa-yt__text p { margin-inline: auto; }
}

/* ================================================================ page head (archives) */
.wa-page-head { padding-block: 48px 8px; }
.wa-page-head__title { margin: 0; font-size: clamp(28px, 3.6vw, 38px); }
.wa-page-head__desc { margin-top: 8px; color: var(--muted); font-size: 17px; }
.wa-page-head__desc p { margin: 0; }
.wa-page-head--center { text-align: center; padding-block: 96px; }
.wa-page-head--center .wa-search { justify-content: center; margin: 24px auto; max-width: 360px; }
.wa-page-head--center .wa-search input[type="search"] { width: 100%; }
.wa-404 { margin: 0; font-size: 88px; font-weight: 700; line-height: 1; color: var(--primary); }
.wa-empty-state { text-align: center; padding: 48px 0; color: var(--muted); }
.wa-empty-state .wa-search { justify-content: center; }

.wa-pagination, .navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nav-links .page-numbers {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-weight: 600;
}
.nav-links .page-numbers.current, .nav-links a.page-numbers:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ================================================================ single article */
.wa-article { max-width: 850px; margin-inline: auto; padding: 48px 24px 24px; }
.wa-article__header { text-align: center; margin-bottom: 32px; }
.wa-article__title { margin: 16px 0 14px; font-size: clamp(28px, 4.2vw, 42px); line-height: 1.4; }
.wa-article__cover { margin: 0 0 32px; }
.wa-article__cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }

.wa-content { font-size: 18px; line-height: 1.95; color: var(--text); }
.wa-content > * + * { margin-top: 1.15em; }
.wa-content p { margin: 0 0 1.15em; }
.wa-content h2 { font-size: 27px; margin: 2em 0 .7em; padding-top: .2em; }
.wa-content h3 { font-size: 21px; margin: 1.6em 0 .6em; }
.wa-content h2, .wa-content h3 { scroll-margin-top: calc(var(--header-h) + 24px); }
.admin-bar .wa-content h2, .admin-bar .wa-content h3 { scroll-margin-top: calc(var(--header-h) + 56px); }
.wa-content ul, .wa-content ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
.wa-content li { margin-bottom: .45em; }
.wa-content li::marker { color: var(--primary); font-weight: 600; }
.wa-content a { text-decoration: underline; text-decoration-color: rgba(37, 99, 235, .35); text-underline-offset: 4px; }
.wa-content a:hover { text-decoration-color: currentColor; }
.wa-content strong { color: var(--heading); }
.wa-content blockquote {
  margin: 1.6em 0; padding: 16px 20px; border: 0; border-inline-start: 4px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 12px 12px 0; color: var(--heading); font-style: normal;
}
.wa-content img { border-radius: 12px; }
.wa-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.wa-content th, .wa-content td { border: 1px solid var(--border); padding: 10px 12px; }
.wa-content th { background: var(--toc-bg); color: var(--heading); }

/* stills taken from the video */
.wa-content figure.wa-frame { margin: 1.8em 0; }
.wa-content figure.wa-frame img {
  display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.wa-content figure.wa-frame figcaption {
  margin-top: 10px; text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.7;
}

/* YouTube embed at the top of n8n articles */
.wa-content .wp-block-embed { margin: 0 0 32px; }
.wa-content .wp-block-embed__wrapper { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-hover); }
.wa-content .wp-block-embed iframe { display: block; width: 100%; }

/* table of contents */
.wa-toc { margin: 0 0 36px; background: var(--toc-bg); border: 1px solid var(--border); border-radius: 14px; }
.wa-toc summary {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--heading); font-size: 17px;
}
.wa-toc summary::-webkit-details-marker { display: none; }
/* chevron: points down when open, toward the reading direction (left in RTL) when closed */
.wa-toc summary::after {
  content: ""; margin-inline-start: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
.wa-toc details:not([open]) summary::after { transform: rotate(135deg); }
.wa-toc summary .wa-i { color: var(--primary); }
.wa-toc ol { list-style: none; margin: 0; padding: 0 20px 18px; counter-reset: toc; }
.wa-toc > details > ol > li { counter-increment: toc; }
.wa-toc > details > ol > li > a::before { content: counter(toc) "."; color: var(--primary); font-weight: 600; margin-inline-end: 8px; }
.wa-toc ol ol { padding: 2px 0 2px; margin-inline-start: 22px; border-inline-start: 2px solid var(--border); padding-inline-start: 12px; }
.wa-toc li { margin: 0; line-height: 1.6; }
.wa-toc a { display: block; padding: 5px 0; color: var(--text); text-decoration: none; font-size: 15.5px; }
.wa-toc ol ol a { font-size: 14.5px; color: var(--muted); }
.wa-toc a:hover { color: var(--primary); }

/* code */
.wa-content code, .wa-content kbd {
  font-family: var(--mono); font-size: .86em; direction: ltr; unicode-bidi: isolate;
  background: var(--inline-code-bg); color: var(--inline-code-text); padding: .15em .45em; border-radius: 6px;
}
.wa-code { position: relative; margin: 1.5em 0; direction: ltr; }
.wa-content pre {
  position: relative; direction: ltr; text-align: left; margin: 1.5em 0; padding: 44px 18px 18px; overflow-x: auto;
  background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-border); border-radius: 12px;
  font-family: var(--mono); font-size: 14.5px; line-height: 1.75; tab-size: 2; white-space: pre;
}
.wa-code pre { margin: 0; }
.wa-content pre::before {
  content: ""; position: absolute; top: 16px; left: 18px; width: 10px; height: 10px; border-radius: 50%;
  background: #FF5F57; box-shadow: 16px 0 0 #FEBC2E, 32px 0 0 #28C840; opacity: .85;
}
.wa-content pre code { background: none; color: inherit; padding: 0; font-size: inherit; border-radius: 0; white-space: inherit; }
.wa-code__copy {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: #C9D1D9;
  font-family: var(--font); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.wa-code__copy:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.wa-code__copy.is-done { color: #7EE787; border-color: rgba(126, 231, 135, .4); }
.wa-code__copy .wa-i { width: 14px; height: 14px; }

.wa-article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.wa-tag { padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.wa-tag:hover { border-color: var(--primary); color: var(--primary); }

.wa-related { border-top: 1px solid var(--border); margin-top: 40px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wa-container { padding-inline: 16px; }
  .wa-article { padding: 32px 16px 16px; }
  .wa-content { font-size: 17px; }
  .wa-content h2 { font-size: 23px; }
  .wa-content h3 { font-size: 19px; }
  .wa-content pre { font-size: 13px; padding: 42px 14px 14px; }
  .wa-hero__inner { padding-block: 64px 72px; }
  .wa-section { padding-block: 40px; }
  .wa-brand__tag { display: none; }
}

/* ================================================================ footer (always dark) */
.wa-footer { background: #0B1120; color: #94A3B8; border-top: 1px solid #1E293B; margin-top: 0; }
html[data-theme="dark"] .wa-footer { background: #070C18; }
.wa-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.wa-footer__about p { margin: 16px 0 0; max-width: 380px; line-height: 1.9; font-size: 15px; }
.wa-brand--footer, .wa-brand--footer:hover { color: #F8FAFC; }
.wa-footer__title { margin: 0 0 14px; color: #F1F5F9; font-size: 16px; }
.wa-footer__links { list-style: none; margin: 0; padding: 0; }
.wa-footer__links li { margin-bottom: 8px; }
.wa-footer__links a { color: #94A3B8; font-size: 15px; }
.wa-footer__links a:hover { color: #fff; }
.wa-social { display: flex; gap: 10px; }
.wa-social__link {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: #111A2E; border: 1px solid #1E293B; color: #CBD5E1; transition: background .15s, color .15s, border-color .15s;
}
.wa-social__link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.wa-social__link .wa-i { width: 20px; height: 20px; }
.wa-footer__bottom { border-top: 1px solid #1E293B; padding-block: 18px; font-size: 14px; text-align: center; }
@media (max-width: 900px) { .wa-footer__grid { grid-template-columns: 1fr 1fr; } .wa-footer__about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .wa-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* GeneratePress leftovers */
.generate-back-to-top { border-radius: 12px; background: var(--primary) !important; }
.screen-reader-text:focus { background: var(--card); color: var(--heading); }
