/* =========================================================================
   Hostek Blog – main stylesheet
   -------------------------------------------------------------------------
    1. Tokens (dark default + light reading mode)
    2. Base
    3. Layout
    4. Components: buttons, pills, chips, icon buttons, search form
    5. Header + mobile nav
    6. Home hero, featured, topics
    7. Post cards + grid
    8. Page heads (archive / search / 404)
    9. Article: head, layout, TOC, progress bar
   10. Article content typography (blocks)
   11. Promotions + countdown
   12. Plan cards
   13. Share, tags, author box, related
   14. Comments
   15. CTA band, pagination
   16. Footer
   17. Background effects (dark mode)
   18. Responsive
   ========================================================================= */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --c-bg:          #050b1f;
  --c-surface:     rgba(14, 30, 76, .62);
  --c-surface-2:   rgba(7, 15, 40, .78);
  --c-solid:       #0a1638;
  --c-border:      #1f4fb3;
  --c-border-soft: rgba(70, 130, 255, .22);
  --c-blue:        #2f7dff;
  --c-blue-strong: #1653e8;
  --c-link:        #6aa6ff;
  --c-heading:     #ffffff;
  --c-text:        #dbe3f4;
  --c-muted:       #9fb0d2;
  --c-red:         #e3262b;
  --c-red-strong:  #c8161c;
  --c-code-bg:     rgba(3, 8, 24, .7);
  --c-glow-1:      rgba(40, 100, 255, .22);
  --c-glow-2:      rgba(30, 70, 190, .30);

  --f-display: "Space Grotesk", Arial, sans-serif;
  --f-body:    Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1200px;
  --narrow:    760px;
  --gutter:    24px;
  --radius:    14px;
  --radius-sm: 8px;
  --header-h:  72px;

  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .04);

  color-scheme: dark;
}

/* Light reading mode – toggled from the header, remembered per visitor. */
:root[data-theme="light"] {
  --c-bg:          #f5f7fc;
  --c-surface:     #ffffff;
  --c-surface-2:   #ffffff;
  --c-solid:       #ffffff;
  --c-border:      #c9d6f2;
  --c-border-soft: #e1e8f6;
  --c-link:        #1653e8;
  --c-heading:     #0a1638;
  --c-text:        #26324d;
  --c-muted:       #5d6b88;
  --c-code-bg:     #eef2fa;
  --c-glow-1:      rgba(47, 125, 255, .10);
  --c-glow-2:      rgba(47, 125, 255, .06);
  --shadow: 0 18px 40px -24px rgba(10, 22, 56, .25);
  color-scheme: light;
}

/* 2. Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 80% 0%, var(--c-glow-1), transparent 70%),
    radial-gradient(ellipse 50% 35% at 5% 0%,  var(--c-glow-2), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--c-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-display); color: var(--c-heading); line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p, ul, ol, figure, blockquote { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(47, 125, 255, .35); }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto; clip-path: none; width: auto; height: auto; z-index: 100;
  top: 12px; left: 12px; padding: 10px 16px; background: var(--c-blue); color: #fff; border-radius: var(--radius-sm);
}
.icon { flex: none; display: inline-block; vertical-align: middle; }

/* 3. Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }
.site-main { position: relative; z-index: 1; min-height: 60vh; }
.section { margin-top: 56px; }
.section__title { font-size: 26px; margin-bottom: 24px; }
.eyebrow {
  display: inline-block; font-family: var(--f-display); font-size: 13px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--c-link); margin-bottom: 14px;
}
.empty-state { text-align: center; padding: 64px 0; color: var(--c-muted); display: grid; gap: 20px; justify-items: center; }

/* 4. Components --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600; font-size: 15px; letter-spacing: .01em; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  color: #fff; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.08); }
.btn--blue { background: linear-gradient(180deg, #3577ff, var(--c-blue-strong)); box-shadow: 0 10px 24px -12px rgba(47, 125, 255, .8); }
.btn--red  { background: linear-gradient(180deg, #ef3237, var(--c-red-strong)); box-shadow: 0 10px 24px -12px rgba(227, 38, 43, .8); }
.btn--lg   { padding: 15px 26px; font-size: 16px; }

.pill {
  display: inline-flex; align-items: center; font-family: var(--f-display); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  color: var(--c-link); background: rgba(47, 125, 255, .12); border: 1px solid rgba(47, 125, 255, .3);
}
a.pill:hover { text-decoration: none; background: rgba(47, 125, 255, .2); }
.pill--ghost { color: var(--c-muted); background: transparent; border-color: var(--c-border-soft); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--c-text);
  background: var(--c-surface); border: 1px solid var(--c-border-soft);
  transition: border-color .15s ease, color .15s ease;
}
.chip span { font-size: 12px; color: var(--c-muted); }
.chip:hover { text-decoration: none; border-color: var(--c-blue); color: var(--c-heading); }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--c-border-soft); color: var(--c-text);
  transition: border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover { border-color: var(--c-blue); background: rgba(47, 125, 255, .1); }

/* Reading-mode toggle shows the icon for the mode you'd switch TO. */
.mode-toggle__sun { display: inline-flex; }
.mode-toggle__moon { display: none; }
:root[data-theme="light"] .mode-toggle__sun { display: none; }
:root[data-theme="light"] .mode-toggle__moon { display: inline-flex; }

.search-form {
  display: flex; align-items: center; gap: 10px; max-width: 520px;
  padding: 6px 6px 6px 16px; border-radius: 12px;
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
}
.search-form .icon { color: var(--c-muted); }
.search-form__input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; outline: none; font-size: 16px; }
.search-form__input::placeholder { color: var(--c-muted); }
.search-form__input::-webkit-search-cancel-button { filter: grayscale(1); }

/* 5. Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--c-border-soft);
}
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.site-header__brand { display: flex; align-items: center; gap: 12px; flex: none; }
.site-header__brand img, .site-header__brand .custom-logo { width: 168px; height: auto; }
.site-header__label {
  font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-muted); padding-left: 12px; border-left: 1px solid var(--c-border-soft);
}
:root[data-theme="light"] .site-logo img,
:root[data-theme="light"] .custom-logo { filter: drop-shadow(0 0 0 transparent); }

.site-nav { flex: 1; }
.site-nav__list { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.site-nav__list a {
  display: block; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--c-text);
}
.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current-cat > a { text-decoration: none; color: var(--c-heading); background: rgba(47, 125, 255, .1); }
.site-nav__cta-mobile { display: none; }

.site-header__actions { display: flex; align-items: center; gap: 8px; }
.site-header__cta { margin-left: 6px; }
.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: inline-flex; }

.header-search { border-top: 1px solid var(--c-border-soft); padding: 16px 0; }
.header-search .search-form { max-width: 640px; margin: 0 auto; box-shadow: none; }

/* 6. Home --------------------------------------------------------------- */
.home-hero { padding: 64px 0 24px; overflow: hidden; }
.home-hero__grid { display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: 40px; }
.home-hero__title { font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; max-width: 760px; }
.home-hero__text { font-size: 19px; color: var(--c-muted); margin: 20px 0 30px; max-width: 600px; }
.home-hero__art { position: relative; display: grid; place-items: center; }
.home-hero__art img { position: relative; width: 100%; max-width: 280px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); animation: hover-float 6s ease-in-out infinite; }
.home-hero__glow { position: absolute; width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle closest-side, rgba(47, 125, 255, .35), transparent); }
@keyframes hover-float { 50% { transform: translateY(-10px); } }

.featured { margin-top: 32px; }
.topics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; }
.topics__label { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); margin-right: 6px; }

/* 7. Cards -------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: linear-gradient(180deg, var(--c-surface), var(--c-surface-2));
  border: 1px solid var(--c-border-soft); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--c-blue); }
.card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-solid); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(47, 125, 255, .45), transparent 55%), linear-gradient(135deg, #0d2a7a, #050b1f);
}
.card__placeholder img { width: 72px; height: auto; opacity: .9; transform: none !important; object-fit: contain; }
.card__body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 24px; flex: 1; }
.card__top { display: flex; gap: 8px; flex-wrap: wrap; }
.card__title { font-size: 21px; line-height: 1.25; }
.card__title a { color: var(--c-heading); }
.card__title a:hover { text-decoration: none; color: var(--c-link); }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* Whole card clickable */
.card__excerpt { color: var(--c-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .post-meta { margin-top: auto; padding-top: 8px; position: relative; z-index: 1; }
.card .pill { position: relative; z-index: 1; }

.card--featured { display: grid; grid-template-columns: 1.15fr 1fr; }
.card--featured .card__media { aspect-ratio: auto; min-height: 380px; }
.card--featured .card__body { padding: 40px; justify-content: center; gap: 16px; }
.card--featured .card__title { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; }
.card--featured .card__excerpt { font-size: 17px; -webkit-line-clamp: 4; }
.card--featured .post-meta { margin-top: 8px; }

.post-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.post-meta .avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--c-border-soft); }
.post-meta__text { display: flex; flex-direction: column; line-height: 1.35; }
.post-meta__author { font-weight: 700; color: var(--c-heading); }
.post-meta__details { color: var(--c-muted); }
.post-meta__dot { margin: 0 6px; }

/* 8. Page heads --------------------------------------------------------- */
.page-head { padding: 64px 0 40px; }
.page-head__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.03em; }
.page-head__text { color: var(--c-muted); font-size: 18px; margin-top: 12px; max-width: 680px; }
.page-head__count { color: var(--c-muted); font-size: 14px; margin-top: 14px; font-weight: 600; }
.page-head__search { margin-top: 24px; }
.page-head__author { display: flex; align-items: center; gap: 24px; }
.page-head__author .avatar { width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--c-border); }

.not-found { padding: 72px 0 40px; }
.not-found__inner { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center; max-width: 960px; }
.not-found__owl { width: 100%; animation: hover-float 6s ease-in-out infinite; }
.not-found .search-form { margin: 28px 0 20px; }

/* 9. Article ------------------------------------------------------------ */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.admin-bar .reading-progress { top: 32px; }
.reading-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #2f7dff, #7fb2ff); box-shadow: 0 0 12px rgba(47, 125, 255, .7); }

.article-head { padding: 56px 0 32px; text-align: center; }
.article-head__top { display: flex; justify-content: center; margin-bottom: 18px; }
.article-head__title { font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }
.article-head__dek { font-size: 20px; color: var(--c-muted); margin: 18px auto 0; max-width: 680px; line-height: 1.5; }
.article-head .post-meta { justify-content: center; margin-top: 28px; text-align: left; }
.article-head .post-meta .avatar { width: 44px; height: 44px; }
.article--page .article-head { text-align: left; }

.article-hero { margin-bottom: 48px; }
.article-hero img { width: 100%; border-radius: var(--radius); border: 1px solid var(--c-border-soft); box-shadow: var(--shadow); }
.article-hero figcaption { text-align: center; font-size: 14px; color: var(--c-muted); margin-top: 10px; }

.article-layout { display: grid; grid-template-columns: minmax(0, var(--narrow)); justify-content: center; gap: 56px; }
.article-layout.has-aside { grid-template-columns: 260px minmax(0, var(--narrow)); justify-content: center; }
.article-aside__sticky { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 24px; }

.toc { padding: 20px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-border-soft); }
.toc__title { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 12px; }
.toc__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.toc__item a { display: block; padding: 6px 10px; border-left: 2px solid var(--c-border-soft); color: var(--c-muted); font-size: 14px; line-height: 1.4; }
.toc__item--h3 a { padding-left: 22px; font-size: 13px; }
.toc__item a:hover { text-decoration: none; color: var(--c-heading); }
.toc__item a.is-active { color: var(--c-heading); border-left-color: var(--c-blue); background: rgba(47, 125, 255, .08); }

/* 10. Article content ---------------------------------------------------- */
.entry-content { font-size: 18.5px; line-height: 1.78; color: var(--c-text); overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1.35em; }
.entry-content h2 { font-size: 32px; margin-top: 2em; line-height: 1.2; }
.entry-content h3 { font-size: 24px; margin-top: 1.8em; line-height: 1.25; }
.entry-content h4 { font-size: 20px; margin-top: 1.6em; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: .7em; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(106, 166, 255, .45); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content strong { color: var(--c-heading); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .5em; }
.entry-content li::marker { color: var(--c-blue); font-weight: 700; }
.entry-content hr, .entry-content .wp-block-separator { border: 0; height: 1px; background: var(--c-border-soft); margin: 2.5em 0; }

.entry-content blockquote, .entry-content .wp-block-quote {
  padding: 4px 0 4px 24px; border-left: 3px solid var(--c-blue);
  font-family: var(--f-display); font-size: 1.2em; line-height: 1.5; color: var(--c-heading);
}
.entry-content blockquote cite { display: block; margin-top: 10px; font-family: var(--f-body); font-size: 15px; font-style: normal; color: var(--c-muted); }
.entry-content .wp-block-pullquote { border: 0; padding: 32px; border-radius: var(--radius); background: var(--c-surface); text-align: center; }

.entry-content code { font-family: var(--f-mono); font-size: .86em; padding: .15em .4em; border-radius: 6px; background: var(--c-code-bg); border: 1px solid var(--c-border-soft); }
.entry-content pre, .entry-content .wp-block-code {
  font-family: var(--f-mono); font-size: 15px; line-height: 1.65; padding: 20px 22px; border-radius: var(--radius-sm);
  background: #030816; color: #d8e4ff; border: 1px solid var(--c-border-soft); overflow-x: auto;
}
.entry-content pre code { padding: 0; background: none; border: 0; font-size: inherit; color: inherit; }

.entry-content figure img { border-radius: var(--radius-sm); }
.entry-content figcaption, .entry-content .wp-element-caption { font-size: 14px; color: var(--c-muted); text-align: center; margin-top: 10px; }
.entry-content .alignwide { width: min(1100px, calc(100vw - var(--gutter) * 2)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.has-aside .entry-content .alignwide, .has-aside .entry-content .alignfull { width: 100%; margin-left: 0; transform: none; }

.entry-content table, .entry-content .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content .wp-block-table { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--c-border-soft); }
.entry-content th, .entry-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border-soft); }
.entry-content th { font-family: var(--f-display); color: var(--c-heading); background: var(--c-surface); }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content .wp-block-table td, .entry-content .wp-block-table th { border: 0; border-bottom: 1px solid var(--c-border-soft); }
.entry-content .wp-block-table thead { border-bottom: 0; }
.entry-content .wp-block-table td + td, .entry-content .wp-block-table th + th { border-left: 1px solid var(--c-border-soft); }
.entry-content .wp-block-table figcaption { padding: 8px; }

.entry-content .wp-block-button__link { font-family: var(--f-display); font-weight: 600; border-radius: var(--radius-sm); background: var(--c-blue-strong); color: #fff; text-decoration: none; padding: 12px 22px; }
.entry-content .wp-block-embed iframe { border-radius: var(--radius-sm); }

/* Callouts: Group block → Styles → Callout: Tip / Warning / Note */
.entry-content .is-style-hostek-tip,
.entry-content .is-style-hostek-warning,
.entry-content .is-style-hostek-note {
  padding: 20px 22px 20px 56px; border-radius: var(--radius-sm); position: relative; font-size: 17px;
  border: 1px solid; background: var(--callout-bg); border-color: var(--callout-border);
}
.entry-content .is-style-hostek-tip > * + *,
.entry-content .is-style-hostek-warning > * + *,
.entry-content .is-style-hostek-note > * + * { margin-top: .6em; }
.entry-content .is-style-hostek-tip::before,
.entry-content .is-style-hostek-warning::before,
.entry-content .is-style-hostek-note::before {
  position: absolute; left: 18px; top: 19px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--callout-dot);
}
.entry-content .is-style-hostek-tip     { --callout-bg: rgba(47, 125, 255, .1);  --callout-border: rgba(47, 125, 255, .4); --callout-dot: #2f7dff; }
.entry-content .is-style-hostek-tip::before     { content: "i"; }
.entry-content .is-style-hostek-warning { --callout-bg: rgba(245, 166, 35, .1);  --callout-border: rgba(245, 166, 35, .45); --callout-dot: #e09412; }
.entry-content .is-style-hostek-warning::before { content: "!"; }
.entry-content .is-style-hostek-note    { --callout-bg: rgba(46, 204, 138, .08); --callout-border: rgba(46, 204, 138, .4); --callout-dot: #1fa874; }
.entry-content .is-style-hostek-note::before    { content: "✓"; }


/* WordPress core classes (classic content, captions, galleries) ----------- */
.alignleft   { float: left;  margin: .4em 1.5em 1em 0; }
.alignright  { float: right; margin: .4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.wp-caption { max-width: 100%; }
.wp-caption img { border-radius: var(--radius-sm); }
.wp-caption-text, .gallery-caption { font-size: 14px; color: var(--c-muted); text-align: center; margin-top: 8px; }
.sticky { /* Sticky posts are shown as the large featured card on the home page. */ }
@media (max-width: 640px) { .alignleft, .alignright { float: none; margin: 1em 0; } }

/* 11. Promotions --------------------------------------------------------- */
.promo {
  display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap;
  padding: 24px 26px; border-radius: var(--radius); position: relative; overflow: hidden;
  border: 1px solid var(--promo-border); color: #fff;
  background: linear-gradient(115deg, var(--promo-a), var(--promo-b));
  box-shadow: 0 20px 40px -24px var(--promo-shadow);
  font-size: 16px; line-height: 1.5;
}
.promo--blue { --promo-a: #1a4fd6; --promo-b: #0a1e5c; --promo-border: rgba(110, 160, 255, .5); --promo-shadow: rgba(47, 125, 255, .8); }
.promo--red  { --promo-a: #d91f25; --promo-b: #6a0d16; --promo-border: rgba(255, 120, 120, .5); --promo-shadow: rgba(227, 38, 43, .8); }
.promo::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); pointer-events: none; }
.promo__copy { flex: 1 1 260px; }
.promo__eyebrow { display: inline-block; font-family: var(--f-display); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; background: #fff; color: var(--promo-a); padding: 3px 8px; border-radius: 4px; margin-bottom: 8px; }
.promo__title { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; color: #fff; }
.promo__text { color: rgba(255, 255, 255, .85); margin-top: 6px; font-size: 15px; }
.promo .btn { background: #fff; color: var(--promo-a); box-shadow: none; }
.entry-content .promo { margin-top: 2em; margin-bottom: 2em; }
.entry-content .promo a { text-decoration: none; }
.article-main > .promo { margin-top: 40px; }
.container--narrow > .promo { margin-bottom: 40px; }
.promo--home { margin-top: 28px; padding: 28px 32px; }
.promo--home .promo__title { font-size: 26px; }
.promo--sidebar { flex-direction: column; align-items: stretch; padding: 20px; }
.promo--sidebar .promo__copy { flex: none; }
.promo--sidebar .promo__title { font-size: 18px; }
.promo--sidebar .btn { width: 100%; }

.countdown { display: flex; gap: 6px; font-variant-numeric: tabular-nums; }
.countdown__unit { display: grid; place-items: center; min-width: 52px; padding: 8px 6px; border-radius: 8px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .15); }
.countdown__unit b { font-family: var(--f-display); font-size: 20px; line-height: 1; }
.countdown__unit small { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin-top: 4px; }
.countdown__ended { display: none; font-weight: 700; }
.countdown.is-ended .countdown__unit { display: none; }
.countdown.is-ended .countdown__ended { display: inline; }
.promo--sidebar .countdown { justify-content: space-between; }
.promo--sidebar .countdown__unit { min-width: 0; flex: 1; }

/* 12. Plan cards --------------------------------------------------------- */
.plan-card {
  display: grid; gap: 20px; padding: 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--c-surface), var(--c-surface-2));
  border: 1px solid var(--c-border); box-shadow: var(--shadow);
  font-size: 15px; line-height: 1.5;
}
.entry-content .plan-card, .entry-content .plan-grid { margin-top: 2em; margin-bottom: 2em; }
.entry-content .plan-card a { text-decoration: none; }
.plan-card--row { grid-template-columns: 1fr auto; grid-template-areas: "head buy" "specs buy"; align-items: center; column-gap: 32px; }
.plan-card--row .plan-card__head { grid-area: head; }
.plan-card--row .plan-card__specs { grid-area: specs; }
.plan-card--row .plan-card__buy { grid-area: buy; padding-left: 32px; border-left: 1px solid var(--c-border-soft); }
.plan-card__head { display: flex; align-items: center; gap: 16px; }
.plan-card__logo { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: rgba(3, 8, 24, .55); border: 1px solid var(--c-border-soft); }
.plan-card__logo img { max-width: 36px; max-height: 36px; width: auto; height: auto; border-radius: 0 !important; }
.plan-card--cpanel .plan-card__logo img { max-width: 46px; }
:root[data-theme="light"] .plan-card__logo { background: #0a1638; }
.plan-card__name { font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--c-heading); line-height: 1.2; }
.plan-card__tagline { color: var(--c-muted); font-size: 14px; margin-top: 2px; }
.plan-card__specs { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.plan-card__specs li { display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(47, 125, 255, .1); border: 1px solid var(--c-border-soft); color: var(--c-text); }
.plan-card__specs .icon { color: var(--c-link); }
.plan-card__buy { text-align: center; display: grid; gap: 2px; justify-items: center; }
.plan-card__price { font-family: var(--f-display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -.03em; color: var(--c-heading); }
.plan-card__price small { font-size: 17px; font-weight: 600; letter-spacing: 0; color: var(--c-muted); }
.plan-card__term { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-link); margin-top: 4px; }
.plan-card__renew { font-size: 13px; color: var(--c-muted); }
.plan-card__buy .btn { margin-top: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card--stack { padding: 20px; align-content: start; }
.plan-card--stack .plan-card__head { flex-direction: column; align-items: flex-start; gap: 12px; }
.plan-card--stack .plan-card__name { font-size: 18px; }
.plan-card--stack .plan-card__specs { display: grid; gap: 6px; }
.plan-card--stack .plan-card__specs li { border: 0; background: none; padding: 0; font-weight: 500; }
.plan-card--stack .plan-card__buy { padding-top: 16px; border-top: 1px solid var(--c-border-soft); }
.plan-card--stack .plan-card__price { font-size: 32px; }
.plan-card--stack .btn { width: 100%; font-size: 14px; padding: 11px 12px; white-space: normal; }

/* 13. Share, tags, author, related -------------------------------------- */
.article-foot { margin-top: 56px; display: grid; gap: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; color: var(--c-muted); border: 1px solid var(--c-border-soft); }
.tags a::before { content: "#"; opacity: .6; }
.tags a:hover { text-decoration: none; color: var(--c-heading); border-color: var(--c-blue); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 18px 0; border-top: 1px solid var(--c-border-soft); border-bottom: 1px solid var(--c-border-soft); }
.share__label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); margin-right: 8px; }
.share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border-soft); }
.share__btn:hover { text-decoration: none; border-color: var(--c-blue); color: var(--c-heading); }

.author-box { display: flex; gap: 22px; align-items: flex-start; padding: 26px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-border-soft); }
.author-box__avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--c-border); flex: none; }
.author-box__label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.author-box__name { font-family: var(--f-display); font-size: 22px; font-weight: 700; margin-top: 2px; }
.author-box__name a { color: var(--c-heading); }
.author-box__bio { color: var(--c-muted); margin-top: 8px; font-size: 15px; }
.author-box__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; font-size: 14px; }

.related { margin-top: 80px; }

/* 14. Comments ----------------------------------------------------------- */
.comments { margin-top: 72px; }
.comments__title { display: flex; align-items: center; gap: 10px; font-size: 26px; margin-bottom: 24px; }
.comments__title .icon { color: var(--c-link); }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: 28px; padding-left: 20px; border-left: 2px solid var(--c-border-soft); }
.comment__body { padding: 20px; border-radius: var(--radius-sm); background: var(--c-surface); border: 1px solid var(--c-border-soft); margin-bottom: 14px; }
.bypostauthor > .comment__body { border-color: var(--c-border); }
.comment__head { display: flex; align-items: center; gap: 12px; }
.comment__avatar { width: 44px; height: 44px; border-radius: 50%; }
.comment__author { font-weight: 700; color: var(--c-heading); }
.comment__author a { color: inherit; }
.comment__badge { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(47, 125, 255, .15); color: var(--c-link); margin-left: 6px; }
.comment__date { display: block; font-size: 13px; color: var(--c-muted); }
.comment__pending { margin-top: 12px; padding: 8px 12px; border-radius: 6px; font-size: 14px; background: rgba(245, 166, 35, .12); color: #f5b84a; }
.comment__text { margin-top: 12px; }
.comment__text p + p { margin-top: .8em; }
.comment__actions { display: flex; gap: 16px; margin-top: 12px; font-size: 14px; font-weight: 700; }

.comment-respond { margin-top: 32px; padding: 28px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-border-soft); }
.comment-respond .comments__title { font-size: 22px; margin-bottom: 8px; }
.comment-respond #cancel-comment-reply-link { font-size: 14px; margin-left: 12px; font-family: var(--f-body); }
.comment-notes, .logged-in-as { color: var(--c-muted); font-size: 14px; margin-bottom: 18px; }
.comment-form { display: grid; gap: 16px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--c-heading); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--c-surface-2);
  border: 1px solid var(--c-border-soft); outline: none; transition: border-color .15s ease;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--c-blue); }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--c-muted); }
.comment-form-cookies-consent label { font-weight: 400; color: var(--c-muted); margin: 0; }
.comment-form .form-submit { margin: 0; }

/* 15. CTA band + pagination ---------------------------------------------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: 88px 0 0; padding: 40px 44px; border-radius: 20px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 90% 10%, rgba(127, 178, 255, .35), transparent 45%), linear-gradient(115deg, #1653e8, #0b2780 60%, #081a55);
  border: 1px solid rgba(110, 160, 255, .45); color: #fff;
  box-shadow: 0 30px 60px -30px rgba(22, 83, 232, .7);
}
.cta-band__title { font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; line-height: 1.15; color: #fff; }
.cta-band__text { color: rgba(255, 255, 255, .82); margin-top: 8px; max-width: 560px; }
.cta-band .btn { background: #fff; color: #1653e8; box-shadow: none; }

.pagination { margin-top: 48px; }
.pagination ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; font-weight: 700; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border-soft); }
.pagination a.page-numbers:hover { text-decoration: none; border-color: var(--c-blue); }
.pagination .current { background: var(--c-blue-strong); border-color: var(--c-blue-strong); color: #fff; }
.pagination .dots { background: none; border: 0; }

/* 16. Footer ------------------------------------------------------------- */
.site-footer { position: relative; z-index: 1; margin-top: 96px; border-top: 1px solid var(--c-border-soft); background: color-mix(in srgb, var(--c-bg) 70%, #000 30%); }
:root[data-theme="light"] .site-footer { background: #0a1638; --c-text: #dbe3f4; --c-muted: #9fb0d2; --c-heading: #fff; --c-link: #6aa6ff; --c-border-soft: rgba(70, 130, 255, .22); color: var(--c-text); }
.site-footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 36px; }
.site-footer__brand { max-width: 420px; }
.site-footer__brand img, .site-footer__brand .custom-logo { width: 160px; height: auto; margin-bottom: 14px; }
.site-footer__brand p { color: var(--c-muted); font-size: 15px; }
.site-footer__nav ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(140px, auto)); gap: 10px 40px; }
.site-footer__nav a { color: var(--c-text); font-weight: 600; font-size: 15px; }
.site-footer__bottom { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; padding-top: 24px; padding-bottom: 32px; }
.site-footer__bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--c-border-soft); }
.site-footer__family { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--c-text); }
.site-footer__family a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; }
.site-footer__family img { height: 22px; width: auto; }
.site-footer__note, .site-footer__copy { font-size: 13px; color: var(--c-muted); }

/* 17. Background effects (dark mode only) -------------------------------- */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before {
  background-image:
    radial-gradient(2px 2px     at 24px 36px,   rgba(255, 255, 255, .9),  transparent 70%),
    radial-gradient(1.5px 1.5px at 150px 92px,  rgba(190, 215, 255, .8),  transparent 70%),
    radial-gradient(1.5px 1.5px at 86px 170px,  rgba(255, 255, 255, .7),  transparent 70%),
    radial-gradient(2.5px 2.5px at 120px 130px, rgba(110, 170, 255, .85), transparent 70%);
  background-size: 180px 190px, 230px 210px, 290px 250px, 410px 370px;
  opacity: .5; animation: bg-twinkle 7s ease-in-out infinite alternate;
}
body::after {
  background-image: linear-gradient(rgba(70, 130, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(70, 130, 255, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000, transparent 80%);
}
@keyframes bg-twinkle { from { opacity: .35; } to { opacity: .7; } }
:root[data-theme="light"] body::before { display: none; }
:root[data-theme="light"] body::after { opacity: .6; }
.site-header { z-index: 50; }

/* 18. Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .article-layout.has-aside { grid-template-columns: minmax(0, var(--narrow)); }
  .article-aside { order: 2; }
  .article-aside__sticky { position: static; }
  .toc { display: none; } /* TOC hidden on tablets/phones to keep reading focused */
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .site-header__cta { display: none; }
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; padding: 16px var(--gutter) 24px;
    background: var(--c-solid); border-bottom: 1px solid var(--c-border-soft); box-shadow: var(--shadow);
    display: none;
  }
  .admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
  .nav-open .site-nav { display: block; }
  .site-nav__list { flex-direction: column; }
  .site-nav__list a { padding: 12px; font-size: 17px; }
  .site-nav__cta-mobile { display: flex; margin-top: 12px; }
  .site-header__actions { margin-left: auto; }
  .home-hero__grid { grid-template-columns: 1fr; }
  .home-hero__art { display: none; }
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card__media { min-height: 0; aspect-ratio: 16 / 9; }
  .card--featured .card__body { padding: 26px; }
  .plan-card--row { grid-template-columns: 1fr; grid-template-areas: "head" "specs" "buy"; }
  .plan-card--row .plan-card__buy { padding-left: 0; border-left: 0; padding-top: 20px; border-top: 1px solid var(--c-border-soft); }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .reading-progress { top: 46px; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; --header-h: 64px; }
  .site-header__inner { gap: 12px; }
  .site-header__brand img, .site-header__brand .custom-logo { width: 128px; }
  .site-header__label { display: none; }
  .icon-btn { width: 40px; height: 40px; }
  .home-hero { padding-top: 40px; }
  .home-hero__text { font-size: 17px; }
  .card-grid { grid-template-columns: 1fr; gap: 20px; }
  .article-head { padding-top: 36px; }
  .article-head__dek { font-size: 18px; }
  .article-hero { margin-bottom: 32px; padding-inline: 0; }
  .article-hero img { border-radius: 0; border-inline: 0; }
  .entry-content { font-size: 17.5px; line-height: 1.75; }
  .entry-content h2 { font-size: 26px; }
  .entry-content h3 { font-size: 21px; }
  .promo { padding: 20px; }
  .countdown__unit { min-width: 0; flex: 1; }
  .countdown { width: 100%; }
  .promo .btn { width: 100%; }
  .author-box { flex-direction: column; }
  .cta-band { padding: 28px 24px; margin-top: 64px; }
  .cta-band__title { font-size: 24px; }
  .cta-band .btn { width: 100%; }
  .not-found__inner { grid-template-columns: 1fr; gap: 24px; }
  .not-found__owl { max-width: 160px; }
  .page-head__author { flex-direction: column; align-items: flex-start; }
  .comment-list .children { margin-left: 8px; padding-left: 12px; }
  .comment-respond { padding: 20px; }
  .search-form__btn { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .reading-progress, .article-aside, .share, .cta-band, .related, .comments, .promo { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
}
