/*
AI THEME CONTRACT v3 LOCAL CSS
No external frameworks. No remote fonts. No @import rules.
*/

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f0f4fb;
  --surface-muted: #e7eef9;
  --text: #10203a;
  --muted: #5f6f86;
  --line: #d6e1f0;
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --accent: #0f172a;
  --accent-soft: #dde7f7;
  --success: #0f766e;
  --shadow-sm: 0 10px 30px rgba(37, 99, 235, 0.08);
  --shadow-md: 0 24px 60px rgba(15, 23, 42, 0.10);
  --radius-xs: 10px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 34px;
  --container: 1180px;
  --body-font: 'Inter', Arial, sans-serif;
  --heading-font: 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 26%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.04), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.7;
}
body.menu-open { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
.container { width: min(calc(100% - 32px), var(--container)); margin: 0 auto; }
.section { padding: 76px 0; }
.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(214, 225, 240, 0.95);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.button,
.btn,
.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.button:hover,
.btn:hover,
.button-primary:hover,
.button-secondary:hover { transform: translateY(-1px); }
.button,
.btn,
.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
}
.button-secondary {
  background: rgba(255,255,255,0.8);
  color: var(--accent);
  border-color: var(--line);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
}
.text-link::after {
  content: '→';
  color: var(--primary);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: var(--heading-font);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
p, ul, ol, blockquote, table, figure, pre { margin: 0 0 18px; }

.eyebrow-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--primary-deep);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-heading {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
}
.split-heading {
  grid-template-columns: 1.15fr .85fr;
  align-items: end;
}
.compact-heading { max-width: 760px; }
.section-heading h2 { font-size: clamp(2rem, 3vw, 3.3rem); }
.section-lead,
.category-lead,
.page-lead,
.post-lead,
.home-summary { color: var(--muted); font-size: 1.06rem; max-width: 64ch; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0 0;
}
.site-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  border: 1px solid rgba(214, 225, 240, 0.85);
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-weight: 800;
  min-width: 0;
}
.site-brand-mark,
.footer-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.10);
}
.site-brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav-list {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav-list > li { position: relative; }
.main-nav-list > li > a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
}
.main-nav-list > li > a:hover,
.dropdown-toggle:hover,
.has-dropdown:hover > .dropdown-toggle {
  background: rgba(15, 23, 42, 0.05);
}
.dropdown-toggle::after {
  content: '▾';
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 320px;
  padding: 16px;
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s ease;
}
.has-dropdown:hover > .dropdown-panel,
.has-dropdown:focus-within > .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-list,
.dropdown-sublist,
.mobile-tree,
.mobile-tree ul,
.footer-links-block ul { list-style: none; margin: 0; padding: 0; }
.dropdown-list { display: grid; gap: 14px; }
.dropdown-item > a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--accent);
  font-weight: 800;
  background: var(--surface-soft);
}
.dropdown-sublist {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-left: 12px;
}
.dropdown-sublist a {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid var(--accent-soft);
  color: var(--muted);
}
.nav-empty {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
}
.mobile-menu-toggle,
.mobile-menu-close {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.mobile-menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.mobile-menu-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all .2s ease;
  z-index: 70;
}
.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(86vw, 380px);
  height: 100vh;
  background: rgba(255,255,255,0.98);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 80;
  display: flex;
  flex-direction: column;
}
body.menu-open .mobile-menu-overlay {
  opacity: 1;
  visibility: visible;
}
body.menu-open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-title { font-weight: 800; color: var(--accent); }
.mobile-menu-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1;
}
.mobile-menu-body {
  padding: 18px;
  overflow: auto;
}
.mobile-main-link {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 18px;
}
.mobile-group + .mobile-group { margin-top: 22px; }
.mobile-group-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 12px;
}
.mobile-tree { display: grid; gap: 12px; }
.mobile-tree > li > a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700;
}
.mobile-tree ul {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-left: 14px;
}
.mobile-tree ul a {
  display: block;
  padding: 10px 12px;
  border-left: 2px solid var(--primary);
  color: var(--muted);
  background: rgba(37, 99, 235, 0.04);
}

.home-intro { padding-top: 40px; }
.home-intro-grid,
.category-hero-grid,
.page-hero-grid,
.post-hero-grid,
.page-links-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: center;
}
.home-title {
  font-size: clamp(2.8rem, 6vw, 5.9rem);
  max-width: 11ch;
}
.home-title span,
.home-title strong { display: block; }
.home-title strong { color: var(--primary-deep); }
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.home-contact-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.contact-note-label {
  color: var(--muted);
  font-weight: 700;
}
.home-intro-art {
  position: relative;
  min-height: 460px;
}
.art-panel {
  position: absolute;
  border-radius: 32px;
  background: linear-gradient(145deg, #fff, #edf3ff);
  border: 1px solid rgba(214, 225, 240, 0.9);
}
.art-panel-main {
  inset: 30px 70px 80px 20px;
  box-shadow: var(--shadow-md);
}
.art-panel-small {
  width: 180px;
  height: 140px;
  right: 10px;
  top: 20px;
  background: linear-gradient(145deg, rgba(37,99,235,0.12), rgba(15,23,42,0.04));
}
.art-dot-grid {
  position: absolute;
  width: 180px;
  height: 180px;
  left: 0;
  bottom: 20px;
  background-image: radial-gradient(var(--primary) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.25;
}
.art-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  right: 46px;
  bottom: 10px;
  border-radius: 50%;
  border: 26px solid rgba(15, 23, 42, 0.06);
}
.art-caption {
  position: absolute;
  left: 54px;
  bottom: 42px;
  padding: 20px 22px;
  max-width: 260px;
}
.art-caption span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.art-caption strong {
  display: block;
  font-size: 1.15rem;
  color: var(--accent);
}

.category-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.category-showcase-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-showcase-card.is-featured {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(235,243,255,0.96));
}
.category-showcase-mark {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
}
.category-showcase-index {
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.category-showcase-card h3 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}
.category-showcase-card h3 a { color: var(--accent); }
.category-showcase-card p { color: var(--muted); }

.page-links-section { padding-top: 24px; }
.page-links-copy h2 { font-size: clamp(2rem, 3vw, 3rem); }
.page-links-note {
  margin-top: 18px;
  color: var(--primary-deep);
  font-weight: 700;
}
.page-links-visual {
  padding: 28px;
}
.mini-structure { display: grid; gap: 16px; }
.mini-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 800;
}
.mini-node-main {
  justify-self: start;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06));
}
.mini-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.mini-branch {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.03);
}
.mini-node-child { background: #fff; border: 1px solid var(--line); }

.home-image-band-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 28px;
  align-items: center;
}
.home-image-frame { overflow: hidden; padding: 12px; }
.home-support-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
}

.category-hero h1,
.page-hero h1,
.post-hero h1 { font-size: clamp(2.4rem, 4vw, 4.4rem); }
.category-hero-media,
.page-media,
.post-media {
  padding: 12px;
  overflow: hidden;
}
.category-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
}
.page-image {
  width: 100%;
  max-width: 720px;
  height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
}
.post-image {
  width: 100%;
  max-width: 760px;
  height: 430px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
}
.breadcrumbs a { color: var(--primary-deep); font-weight: 700; }

.subcategory-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.subcategory-card,
.post-card {
  overflow: hidden;
}
.subcategory-card-body,
.post-card-body,
.post-card-footer { padding: 20px 20px 0; }
.post-card-footer { padding-bottom: 20px; }
.subcategory-card h3,
.post-card h3 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}
.subcategory-card p,
.post-card p { color: var(--muted); }
.post-card-media,
.subcategory-image-link { display: block; padding: 12px 12px 0; }
.post-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
}
.post-card-excerpt {
  color: var(--muted);
}
.post-card-excerpt > *:last-child { margin-bottom: 0; }
.post-card-excerpt .article-toc {
  margin: 10px 0 0;
  padding: 14px;
  background: var(--surface-soft);
  box-shadow: none;
}
.post-card-excerpt .article-toc-title { font-size: 0.85rem; }
.post-card-excerpt .article-toc a {
  padding: 8px 10px;
  font-size: 0.94rem;
}

.pagination-wrap { margin-top: 36px; }
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  font-weight: 700;
}
.pagination .is-disabled {
  opacity: 0.55;
}
.pagination-indicator {
  background: rgba(37,99,235,0.08) !important;
  color: var(--primary-deep) !important;
}

.article-section { padding-top: 32px; }
.article-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.article-sidebar { position: relative; }
.sticky-card {
  position: sticky;
  top: 110px;
  padding: 22px;
}
.article-side-card h3 { font-size: 1.5rem; }
.article-side-card p { color: var(--muted); }
.article-side-button { width: 100%; margin-top: 12px; }
.article-shell,
.page-content-card { padding: 28px; }
.article-content {
  font-size: 1.04rem;
  color: var(--text);
}
.article-content h2 {
  font-size: clamp(1.95rem, 2.5vw, 2.7rem);
  margin-top: 52px;
  margin-bottom: 18px;
  padding-top: 10px;
}
.article-content h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  margin-top: 34px;
  margin-bottom: 14px;
}
.article-content h4 {
  font-size: 1.15rem;
  margin-top: 26px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.article-content p,
.article-content li,
.article-content td,
.article-content th {
  color: #25344d;
}
.article-content p { margin-bottom: 18px; }
.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.article-content ul ul,
.article-content ul ol,
.article-content ol ul,
.article-content ol ol {
  margin-top: 10px;
  margin-bottom: 10px;
}
.article-content li { margin-bottom: 8px; }
.article-content a {
  color: var(--primary-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 600;
}
.article-content a:hover { color: var(--accent); }
.article-content blockquote {
  padding: 22px 24px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, rgba(37,99,235,0.06), rgba(15,23,42,0.03));
  border-radius: 0 18px 18px 0;
  color: var(--muted);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.article-content th,
.article-content td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.article-content th {
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 800;
}
.article-content figure {
  margin: 28px 0;
}
.article-content figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}
.article-content code,
.article-content pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article-content code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.95em;
}
.article-content pre {
  padding: 18px;
  overflow: auto;
  border-radius: 18px;
  background: #0c1426;
  color: #e8eefb;
}
.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}
.article-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}
.article-toc {
  padding: 20px;
  margin: 24px 0 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(240,244,251,0.95), rgba(255,255,255,0.96));
  box-shadow: var(--shadow-sm);
}
.article-toc-title {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.article-toc li { margin: 0; }
.article-toc li ul {
  margin-top: 10px;
  padding-left: 14px;
}
.article-toc a {
  display: block;
  padding: 11px 13px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.article-toc a:hover {
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.22);
}

.empty-state,
.not-found-card {
  padding: 30px;
  text-align: center;
}
.empty-state h3,
.not-found-card h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.empty-state p,
.not-found-card p { color: var(--muted); }
.not-found-code {
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
  font-weight: 900;
  color: rgba(37, 99, 235, 0.18);
  margin-bottom: 10px;
}
.not-found-actions { margin-top: 20px; }

.site-footer {
  padding: 26px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr 1fr;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow-sm);
}
.footer-brand-block h2,
.footer-links-block h3,
.footer-help-block h3 {
  margin-bottom: 10px;
}
.footer-brand-block p,
.footer-help-block p,
.footer-links-block a,
.footer-copy,
.kp-credit { color: var(--muted); }
.footer-links-block ul { display: grid; gap: 8px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 16px;
}
.kp-credit a { color: var(--accent); font-weight: 700; }

.faq-block,
.cta-block,
.ratings-widget,
.testimonial-card,
.review-form,
.contact-form,
.related-posts,
.author-box,
.service-card,
.pricing-card,
.comparison-table,
.timeline,
.alert-box,
.info-box,
.warning-box,
.success-box,
.filters,
.search-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1100px) {
  .split-heading,
  .home-intro-grid,
  .category-hero-grid,
  .page-hero-grid,
  .post-hero-grid,
  .page-links-grid,
  .home-image-band-grid,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .article-sidebar { order: 2; }
  .sticky-card { position: static; }
  .category-showcase,
  .subcategory-grid,
  .post-grid,
  .mini-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: inline-flex; }
  .site-header-bar { padding: 12px 14px; }
  .home-intro-art { min-height: 320px; }
  .art-panel-main { inset: 18px 36px 54px 10px; }
  .art-panel-small { width: 140px; height: 110px; }
  .art-ring { width: 160px; height: 160px; border-width: 18px; right: 28px; }
  .art-caption { left: 22px; bottom: 22px; max-width: 220px; }
}

@media (max-width: 640px) {
  .section { padding: 54px 0; }
  .container { width: min(calc(100% - 24px), var(--container)); }
  .category-showcase,
  .subcategory-grid,
  .post-grid,
  .mini-branches { grid-template-columns: 1fr; }
  .home-title { max-width: 100%; }
  .page-image,
  .post-image,
  .category-image,
  .post-card-image {
    width: 100%;
  }
  .page-image {
    max-width: 328px;
    height: 220px;
  }
  .post-image {
    max-width: 328px;
    height: 220px;
  }
  .category-image { height: 220px; }
  .post-card-image { height: 210px; }
  .article-shell,
  .page-content-card,
  .empty-state,
  .not-found-card,
  .page-links-visual,
  .footer-grid { padding: 20px; }
  .home-actions { flex-direction: column; align-items: stretch; }
  .button,
  .btn,
  .button-primary,
  .button-secondary { width: 100%; }
}
