:root {
  --al-bg: #ffffff;
  --al-soft: #f7f8fa;
  --al-fg: #0a0a0a;
  --al-muted: #52525b;
  --al-subtle: #71717a;
  --al-border: #e4e4e7;
  --al-blue: #1d6ee8;
  --al-blue-dark: #1558bf;
  --al-radius-sm: 10px;
  --al-radius-md: 16px;
  --al-radius-lg: 22px;
  --al-shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --al-shadow-md: 0 18px 44px rgba(15, 23, 42, 0.1);
  --al-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--al-fg);
  background: var(--al-bg);
  font-family: var(--al-font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--al-blue-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--al-fg);
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  width: min(100% - 64px, 1100px);
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
  position: fixed !important;
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  margin: 0;
  overflow: visible;
  clip: auto;
  color: #fff;
  background: var(--al-fg);
  border-radius: 8px;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--al-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-brand,
.footer-brand {
  color: var(--al-fg);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.primary-menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.cookie-notice {
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: 20px;
  display: flex;
  width: min(520px, calc(100% - 40px));
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  color: #fff;
  background: #111319;
  border: 1px solid #343842;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-notice p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-notice a {
  color: #fff;
}

.cookie-notice button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  color: #fff;
  background: var(--al-blue);
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.cookie-notice button:hover {
  background: var(--al-blue-dark);
}

@media (max-width: 560px) {
  .cookie-notice {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
}

.primary-menu a {
  display: block;
  padding: 7px 13px;
  color: var(--al-muted);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  color: var(--al-fg);
  background: var(--al-soft);
}

.primary-menu > li:last-child > a,
.primary-menu .menu-cta > a {
  padding-inline: 18px;
  color: #fff;
  background: var(--al-blue);
  box-shadow: 0 2px 8px rgba(29, 110, 232, 0.24);
}

.primary-menu > li:last-child > a:hover,
.primary-menu .menu-cta > a:hover {
  color: #fff;
  background: var(--al-blue-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.menu-toggle span[aria-hidden] {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  background: var(--al-fg);
  transition: transform 0.18s ease;
}

.archive-hero {
  padding: 80px 0 54px;
  background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
  border-bottom: 1px solid var(--al-border);
}

.compact-hero {
  padding-block: 58px 44px;
}

.archive-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  align-items: end;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--al-blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
}

.archive-hero h1,
.page-header h1,
.not-found h1 {
  max-width: 760px;
  margin: 0;
  color: var(--al-fg);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 780;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.archive-hero p:not(.eyebrow),
.archive-description {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--al-muted);
  font-size: 1.05rem;
}

.search-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.search-form label {
  flex: 1;
}

.search-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--al-fg);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.search-form input:focus {
  outline: 3px solid rgba(29, 110, 232, 0.18);
  border-color: var(--al-blue);
}

.search-form button,
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  color: #fff;
  background: var(--al-blue);
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.search-form button:hover,
.button-primary:hover {
  color: #fff;
  background: var(--al-blue-dark);
}

.archive-content {
  padding: 54px 0 84px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  box-shadow: var(--al-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: #c7d9f9;
  box-shadow: var(--al-shadow-md);
}

.post-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin: 10px 10px 0;
  background: #eef2f7;
  border-radius: 14px;
}

.post-card-image img,
.post-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.025);
}

.post-card-placeholder {
  background:
    radial-gradient(circle at 25% 20%, rgba(29, 110, 232, 0.28), transparent 28%),
    linear-gradient(135deg, #eef3ff, #f6f7f9);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.post-card-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  color: var(--al-subtle);
  font-size: 12px;
  font-weight: 600;
}

.post-card-meta span {
  color: var(--al-blue-dark);
}

.post-card h2 {
  margin: 11px 0 10px;
  font-size: 1.24rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.post-card h2 a {
  color: var(--al-fg);
  text-decoration: none;
}

.post-card-body > p {
  margin: 0 0 20px;
  color: var(--al-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: auto;
  color: var(--al-blue-dark);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.pagination {
  margin-top: 48px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: var(--al-muted);
  background: #fff;
  border: 1px solid var(--al-border);
  border-radius: 9px;
  text-decoration: none;
}

.pagination .current,
.pagination a:hover {
  color: #fff;
  background: var(--al-blue);
  border-color: var(--al-blue);
}

.single-main {
  padding: 70px 0 84px;
}

.article-shell {
  max-width: 760px;
}

.article-header {
  text-align: left;
}

.article-category {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--al-blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.article-header h1 {
  max-width: 850px;
  margin: 0 0 20px;
  font-size: clamp(2.35rem, 5.5vw, 4.5rem);
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.article-hero {
  max-width: 1100px;
  margin-top: 46px;
}

.article-hero img {
  display: block;
  width: 100%;
  max-height: 660px;
  object-fit: cover;
  border-radius: var(--al-radius-lg);
}

.article-content {
  margin-top: 46px;
  color: #27272a;
  font-size: 1.05rem;
  line-height: 1.82;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--al-fg);
  line-height: 1.18;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.article-content h2 {
  margin: 2.4em 0 0.75em;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.article-content h3 {
  margin: 2em 0 0.7em;
  font-size: 1.45rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content figure,
.article-content table {
  margin-block: 1.25em;
}

.article-content ul,
.article-content ol {
  padding-left: 1.3em;
}

.article-content li + li {
  margin-top: 0.45em;
}

.article-content a {
  font-weight: 650;
}

.article-content blockquote {
  padding: 18px 22px;
  margin-inline: 0;
  color: var(--al-fg);
  background: #f5f8ff;
  border-left: 4px solid var(--al-blue);
  border-radius: 0 12px 12px 0;
}

.article-content .legacy-testimonial footer {
  display: flex;
  gap: 5px 12px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 14px;
  color: var(--al-muted);
  font-size: 0.9rem;
}

.article-content .legacy-testimonial footer span {
  color: var(--al-subtle);
}

.article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  min-width: 130px;
  padding: 11px 13px;
  text-align: left;
  border: 1px solid var(--al-border);
}

.article-content th {
  color: var(--al-fg);
  background: var(--al-soft);
}

.article-content pre {
  overflow-x: auto;
  padding: 18px;
  color: #f8fafc;
  background: #111827;
  border-radius: 12px;
}

.article-content iframe {
  width: 100%;
  border: 0;
}

.article-footer {
  padding-top: 42px;
  margin-top: 50px;
  border-top: 1px solid var(--al-border);
}

.author-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 20px;
  align-items: start;
  padding: 24px;
  background: var(--al-soft);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
}

.author-card img {
  border-radius: 50%;
}

.author-label {
  color: var(--al-blue-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.author-card h2 {
  margin: 2px 0 5px;
  font-size: 1.2rem;
}

.author-card p {
  margin: 0;
  color: var(--al-muted);
  font-size: 0.9rem;
}

.post-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.post-navigation > div:last-child {
  text-align: right;
}

.post-navigation a {
  display: block;
  padding: 18px;
  color: var(--al-fg);
  border: 1px solid var(--al-border);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.post-navigation a span {
  display: block;
  margin-bottom: 5px;
  color: var(--al-subtle);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-main {
  min-height: 60vh;
  padding: 72px 0 84px;
}

.page-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--al-border);
}

.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.page-article .article-content {
  margin-top: 36px;
}

.search-results {
  max-width: 800px;
}

.search-result {
  padding: 26px 0;
  border-bottom: 1px solid var(--al-border);
}

.search-result time {
  color: var(--al-subtle);
  font-size: 12px;
}

.search-result h2 {
  margin: 6px 0 8px;
  font-size: 1.45rem;
}

.search-result h2 a {
  color: var(--al-fg);
  text-decoration: none;
}

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

.empty-state {
  padding: 54px;
  text-align: center;
  background: var(--al-soft);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
}

.empty-state h2 {
  margin: 0 0 6px;
}

.not-found {
  display: flex;
  min-height: 70vh;
  flex-direction: column;
  justify-content: center;
  padding-block: 80px;
}

.not-found > p:not(.eyebrow) {
  max-width: 580px;
  color: var(--al-muted);
  font-size: 1.05rem;
}

.not-found-actions {
  display: flex;
  max-width: 650px;
  gap: 12px;
  margin-top: 20px;
}

.site-footer {
  padding: 46px 0 24px;
  background: #111319;
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 1fr);
  gap: 48px;
  align-items: start;
}

.footer-brand {
  color: #fff;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.footer-menu {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px 20px;
}

.footer-menu a {
  color: #d4d4d8;
  font-size: 13px;
  text-decoration: none;
}

.footer-menu a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 22px;
  margin-top: 34px;
  color: #a1a1aa;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .archive-hero-inner .search-form {
    max-width: 520px;
  }
}

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

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 40px, 1100px);
  }

  .site-header {
    height: 60px;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle[aria-expanded="true"] span[aria-hidden]:first-of-type {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span[aria-hidden]:last-of-type {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .primary-navigation {
    position: fixed;
    z-index: 999;
    top: 60px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 60px);
    padding: 14px 20px 22px;
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--al-border);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
  }

  .admin-bar .primary-navigation {
    top: 106px;
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-menu {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .primary-menu a {
    padding: 12px 14px;
  }

  .primary-menu > li:last-child > a,
  .primary-menu .menu-cta > a {
    margin-top: 7px;
    text-align: center;
  }

  .archive-hero,
  .compact-hero {
    padding: 52px 0 38px;
  }

  .archive-hero h1,
  .page-header h1,
  .not-found h1 {
    font-size: clamp(2.25rem, 12vw, 3.3rem);
  }

  .archive-content {
    padding: 38px 0 60px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .single-main,
  .page-main {
    padding: 48px 0 64px;
  }

  .article-header h1 {
    font-size: clamp(2.2rem, 11vw, 3.35rem);
  }

  .article-hero {
    width: 100%;
    margin-top: 32px;
  }

  .article-hero img {
    border-radius: 0;
  }

  .article-content {
    margin-top: 34px;
    font-size: 1rem;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-navigation > div:last-child {
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-menu {
    justify-content: flex-start;
  }

  .not-found-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .empty-state {
    padding: 38px 20px;
  }
}

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

  .author-card {
    grid-template-columns: 58px 1fr;
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
