:root {
  color-scheme: light;
  --ink: #261C15;
  --paper: #F7F7F2;
  --accent: #E4E6C3;
  --muted: rgba(38, 28, 21, .68);
  --line: rgba(38, 28, 21, .15);
  --shadow: 8px 8px 0 rgba(38, 28, 21, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; line-height: 1.6; }
a { color: inherit; }
h1, h2, h3, .footer-brand { margin: 0; font-family: 'Archivo', sans-serif; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-150%); background: var(--paper); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.topbar { position: relative; z-index: 5; padding: 9px 0; background: var(--ink); color: rgba(247, 247, 242, .82); font-size: 14px; }
.topbar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.topbar a { text-decoration: none; }
.site-nav { position: relative; z-index: 50; background: var(--accent); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; width: auto; height: 56px; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.nl { display: inline-block; padding: 9px 12px; border-radius: 6px; text-decoration: none; font-weight: 500; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.nl:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .58); box-shadow: 0 3px 10px rgba(38, 28, 21, .12); }
.nl[aria-current="page"] { background: rgba(255, 255, 255, .35); box-shadow: inset 0 -3px 0 var(--ink); }
.nl[aria-current="page"]:hover { background: rgba(255, 255, 255, .58); }
.nav-products { position: relative; display: flex; align-items: center; }
.nav-products > .products-label { display: inline-flex; align-items: center; }
.products-arrow { margin-left: -9px; padding: 10px 10px 10px 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 14px; line-height: 1; transition: rotate .2s, background-color .2s, box-shadow .2s; }
.products-arrow:hover { background: rgba(255, 255, 255, .58); box-shadow: 0 2px 8px rgba(38, 28, 21, .1); }
.nav-products:hover .products-arrow, .nav-products.open .products-arrow { rotate: 180deg; }
.products-menu { position: absolute; z-index: 1000; top: 100%; left: 0; display: none; min-width: 220px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); box-shadow: 0 12px 28px rgba(38, 28, 21, .18); }
.nav-products:hover > .products-menu, .nav-products:focus-within > .products-menu, .nav-products.open > .products-menu { display: block; }
.products-menu, .product-submenu { animation: menuIn .18s ease-out; }
@keyframes menuIn { from { opacity: 0; translate: 0 -6px; } }
.product-category { position: relative; border-radius: 5px; }
.product-category-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 12px; border-radius: 5px; font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background-color .15s, box-shadow .15s; }
.product-category-link:hover, .product-category:focus-within > div > .product-category-link, .product-category:hover > div > .product-category-link { background: rgba(255, 255, 255, .68); box-shadow: 0 2px 8px rgba(38, 28, 21, .1); }
.submenu-toggle { flex: 0 0 auto; border-radius: 4px; transition: transform .2s, background-color .15s, box-shadow .15s; }
.submenu-toggle:hover, .submenu-toggle:focus-visible { background: rgba(255, 255, 255, .68) !important; box-shadow: 0 2px 8px rgba(38, 28, 21, .1); }
.submenu-arrow { color: var(--muted); font-size: 20px; line-height: 1; }
.product-submenu { position: absolute; z-index: 1001; top: -7px; right: calc(100% - 1px); display: none; width: 320px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 9px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 12px 28px rgba(38, 28, 21, .18); }
.product-category:hover > .product-submenu, .product-category:focus-within > .product-submenu { display: block; }
.product-submenu-title { position: sticky; top: -9px; margin-bottom: 4px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); background: var(--paper); font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 800; }
.product-submenu-title span { margin-left: 5px; color: var(--muted); font: 500 11px 'IBM Plex Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.product-grade-list { display: flex; flex-direction: column; gap: 2px; }
.product-grade-link { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; font-size: 13px; line-height: 1.3; text-decoration: none; }
.product-grade-link { transition: background-color .15s, padding-left .15s; }
.product-grade-link:hover { padding-left: 13px; background: rgba(228, 230, 195, .65); }
.grade-name { font-weight: 600; }
.grade-equivalent { color: var(--muted); font-size: 11px; }
.page-hero { padding: clamp(38px, 6vw, 72px) 0; background: var(--ink); color: var(--paper); }
.page-hero .eyebrow { color: var(--accent); }
.page-hero h1 { max-width: 15ch; font-size: clamp(38px, 6vw, 68px); }
.page-hero p { max-width: 58ch; margin: 16px 0 0; color: rgba(247, 247, 242, .78); font-size: clamp(16px, 2vw, 19px); }
@keyframes blogFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body[data-page="list"] .page-hero .container > * { animation: blogFadeIn .8s cubic-bezier(.2, .7, .2, 1) both; }
body[data-page="list"] .page-hero h1 { animation-delay: .08s; }
body[data-page="list"] .page-hero p { animation-delay: .16s; }
.page-section { padding-block: clamp(36px, 6vw, 72px); }
.eyebrow { margin-bottom: 8px; color: rgba(38, 28, 21, .62); font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.section-title { margin-bottom: 12px; font-size: clamp(26px, 3.4vw, 38px); }
.section-intro { max-width: 66ch; margin: 0 0 28px; color: var(--muted); }
.blog-layout, .post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: clamp(28px, 5vw, 60px); }
body[data-page="list"] .blog-layout > * { animation: blogFadeIn .8s cubic-bezier(.2, .7, .2, 1) .18s both; }
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.post-card-image, .post-cover { position: relative; display: block; overflow: hidden; margin: 0; aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(228, 230, 195, .7), rgba(38, 28, 21, .12)); }
.post-card-image img, .post-cover img, .body-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card-image img[hidden], .post-cover img[hidden], .body-image img[hidden] { display: none; }
.post-card-image img { transition: transform .35s ease; }
.post-card:hover .post-card-image img { transform: scale(1.035); }
.image-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; color: rgba(38, 28, 21, .68); font-size: 14px; text-align: center; }
.image-fallback[hidden] { display: none; }
.post-card-content { padding: 20px; }
.post-card-meta, .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; color: var(--muted); font-size: 14px; }
.post-card-title { margin: 8px 0 10px; font-size: clamp(20px, 2.2vw, 25px); }
.post-card-title a, .recent-list a { text-decoration: none; }
.post-card-title a:hover, .recent-list a:hover, .back-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-card-content p { margin: 0 0 14px; color: var(--muted); }
.read-link, .back-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.read-link::after { content: " →"; }
.sidebar { display: grid; gap: 24px; }
.sidebar-panel { padding: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 5px 5px 0 rgba(38, 28, 21, .08); }
.sidebar-title { margin-bottom: 14px; font-size: 23px; }
.recent-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.recent-list li { padding: 11px 0; border-top: 1px solid var(--line); }
.recent-list li:first-child { padding-top: 0; border-top: 0; }
.recent-list a { font-family: 'Archivo', sans-serif; font-weight: 700; line-height: 1.35; }
.recent-list time { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.sidebar-contact { background: var(--accent); }
.sidebar-contact p { margin: 0 0 17px; color: rgba(38, 28, 21, .78); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--ink); font-weight: 600; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(38, 28, 21, .22); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-light { background: var(--accent); color: var(--ink); }
.status-message { margin: 0 0 16px; }
.status-message:empty { display: none; }
.status-message[role="alert"] { padding: 16px; background: #fff; border-left: 4px solid #8a321f; color: #682312; }
.empty-state { grid-column: 1 / -1; padding: 28px; background: #fff; border: 1px solid var(--line); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; }
.pagination a { display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.pagination a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.pagination a:hover { background: var(--accent); color: var(--ink); }
.pagination[hidden] { display: none; }
.post-column { min-width: 0; }
.post-header { margin-top: 18px; }
.post-title { max-width: 22ch; margin-bottom: 14px; font-size: clamp(34px, 5vw, 58px); }
.post-meta { gap: 8px 18px; }
.post-cover { margin-top: 28px; box-shadow: var(--shadow); }
.post-cover[hidden] { display: none; }
.post-body { margin-top: 30px; font-size: 18px; line-height: 1.8; }
.post-body p { margin: 0 0 1.35em; }
.post-body h2 { margin: 1.8em 0 .65em; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; }
.post-body h2:first-child { margin-top: 0; }
.post-body ul { margin: 0 0 1.5em; padding-left: 1.4em; }
.post-body li { margin: .35em 0; padding-left: .25em; }
.body-image { position: relative; overflow: hidden; margin: 30px 0; aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(228, 230, 195, .7), rgba(38, 28, 21, .12)); }
.body-image figcaption { margin-top: 9px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.body-image { overflow: visible; }
.body-image img { position: absolute; inset: 0; }
.body-image .image-fallback { background: linear-gradient(135deg, rgba(228, 230, 195, .7), rgba(38, 28, 21, .12)); }
.inline-cta { display: inline-flex; padding: 10px 15px; background: var(--accent); border: 1px solid var(--line); font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.inline-cta:hover { background: #d7d9ad; }
.post-cta { margin-top: 42px; padding: clamp(22px, 4vw, 36px); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.post-cta .eyebrow { color: var(--accent); }
.post-cta h2 { max-width: 26ch; margin-bottom: 20px; font-size: clamp(24px, 3vw, 34px); }
.post-back { margin-top: 22px; }
.post-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.post-navigation a { min-height: 100%; padding: 18px; border: 1px solid var(--line); background: #fff; text-decoration: none; box-shadow: 4px 4px 0 rgba(38, 28, 21, .08); }
.post-navigation a:hover { background: var(--accent); }
.post-navigation span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; }
.post-navigation strong { font-family: 'Archivo', sans-serif; line-height: 1.35; }
.site-footer { padding: 42px 0 16px; background: var(--ink); color: rgba(247, 247, 242, .76); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 40px; margin-bottom: 28px; }
.footer-brand { color: var(--paper); font-size: 24px; }
.footer-top p { margin: 6px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { padding-top: 15px; border-top: 1px solid rgba(247, 247, 242, .18); font-size: 14px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 5px var(--accent); }
.site-footer :focus-visible, .page-hero :focus-visible, .post-cta :focus-visible { outline-color: var(--paper); box-shadow: 0 0 0 5px rgba(228, 230, 195, .5); }

@media (max-width: 850px) {
  .blog-layout, .post-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
  .posts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 32px, 1200px); }
  .topbar-inner { display: grid; }
  .nav-inner { align-items: flex-start; }
  .logo img { height: 48px; }
  .nav-links { gap: 0; }
  .nl { padding: 8px 9px; font-size: 14px; }
  .products-menu { min-width: 210px; max-width: calc(100vw - 32px); }
  .product-submenu { position: static; width: auto; max-height: 260px; margin: 0 0 6px 9px; border: 0; border-left: 2px solid var(--accent); box-shadow: none; padding: 4px 4px 4px 8px; }
  .product-category-link { white-space: normal; }
  .submenu-arrow { rotate: 0deg; }
  .blog-layout, .post-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .post-body { font-size: 17px; }
}
@media (max-width: 430px) {
  .post-navigation { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body[data-page="list"] .page-hero .container > *, body[data-page="list"] .blog-layout > * { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
