:root {
  --pks-ink: #0a2540;
  --pks-muted: #5f7184;
  --pks-teal: #079c9c;
  --pks-teal-dark: #056f6f;
  --pks-orange: #ff6b35;
  --pks-border: #dbe5ea;
  --pks-surface: #ffffff;
  --pks-soft: #f5f8f9;
  --pks-shadow: 0 18px 45px rgba(10, 37, 64, .1);
  --pks-container: 1280px;
  --pks-reading: 920px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--pks-surface);
  color: var(--pks-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--pks-teal-dark); }
button, input, textarea, select { font: inherit; }
.site { min-height: 100vh; }
.site-main { display: block; }
.site-container { width: min(100% - 48px, var(--pks-container)); 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: 12px; left: 12px;
  width: auto; height: auto; padding: 12px 16px; margin: 0;
  overflow: visible; clip: auto; white-space: normal;
  border-radius: 8px; background: #fff; color: var(--pks-ink); box-shadow: var(--pks-shadow);
}
:focus-visible { outline: 3px solid rgba(255, 107, 53, .55); outline-offset: 3px; }

/* Native navigation fallback. The existing migration nav remains visually unchanged. */
.pks-theme-header {
  position: sticky; z-index: 9999; top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  background: rgba(5, 111, 111, .96); color: #fff;
  backdrop-filter: blur(18px);
}
.pks-theme-header__inner { display: flex; min-height: 76px; align-items: center; gap: 28px; }
.pks-theme-brand, .pks-theme-brand a { display: inline-flex; align-items: center; color: #fff; font-size: 22px; font-weight: 850; text-decoration: none; }
.pks-theme-brand .custom-logo { width: auto; max-height: 42px; }
.pks-theme-navigation { margin-left: auto; }
.pks-theme-menu, .pks-theme-footer__menu { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pks-theme-menu a { display: block; padding: 11px 13px; border-radius: 8px; color: #fff; font-size: 15px; font-weight: 650; text-decoration: none; }
.pks-theme-menu a:hover { background: rgba(255, 255, 255, .12); }
.pks-theme-header__cta, .pks-button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 999px; background: var(--pks-orange); color: #fff;
  font-weight: 800; text-decoration: none; box-shadow: 0 8px 22px rgba(255, 107, 53, .28);
}
.pks-theme-menu-toggle { display: none; width: 46px; height: 46px; padding: 10px; border: 0; border-radius: 9px; background: transparent; }
.pks-theme-menu-toggle > span[aria-hidden] { display: block; width: 25px; height: 2px; margin: 5px 0; background: #fff; transition: transform .2s ease, opacity .2s ease; }

/* Keep the fixed production navigation below WordPress's logged-in toolbar. */
body.admin-bar .pks-nav,
body.admin-bar .pks-theme-header { top: 32px; }

/* These data-heavy routes do not own an internal hero offset. */
body.page-id-121 .content-area { padding-top: 76px; }
body.page-id-160 .content-area { padding-top: 105px; }
body.single-pks_products .content-area { padding-top: 88px; }

/* Generic content frame. Rich marketing blocks keep their own full-bleed layout. */
.pks-fullwidth-container { width: 100%; max-width: none; padding: 0; }
.pks-fullwidth-container > .site-main,
.pks-fullwidth-container > .site-main > .content-wrap,
.pks-fullwidth-container .single-entry,
.pks-fullwidth-container .entry-content-wrap { width: 100%; max-width: none; margin: 0; padding: 0; }
.pks-generic-page-container { padding-block: 132px 88px; }
.pks-generic-page-container .entry-header { max-width: var(--pks-reading); margin: 0 auto 36px; }
.pks-generic-page-container .entry-title { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.05; letter-spacing: -.04em; }
.pks-generic-page-container .single-content { font-size: 17px; line-height: 1.75; }
.entry-content::after { display: table; clear: both; content: ""; }
.entry-content > :where(p, ul, ol, blockquote):not(.alignwide):not(.alignfull) { max-width: var(--pks-reading); }
.entry-content .alignwide { width: min(100%, 1160px); max-width: 1160px; }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }

/* Editorial layouts: fill the structural roles expected by the Blog design module. */
.content-wrap, .single-entry, .entry-content-wrap { width: 100%; max-width: none; }
.post-archive { align-items: stretch; }
.post-thumbnail { position: relative; display: block; }
:is(body.blog, body.category, body.tag, body.search) .loop-entry .post-thumbnail img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.entry-related { width: 100vw; margin-inline: calc(50% - 50vw); }
.pks-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.entry-related > .site-container { width: min(100% - 56px, 1280px); }
.pks-pagination { margin-top: 48px; }
.pks-pagination .page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pks-pagination a, .pks-pagination span {
  display: inline-grid; min-width: 42px; height: 42px; place-items: center; padding: 0 10px;
  border: 1px solid var(--pks-border); border-radius: 999px; background: #fff; color: var(--pks-ink); text-decoration: none;
}
.pks-pagination .current { border-color: var(--pks-teal-dark); background: var(--pks-teal-dark); color: #fff; }
.pks-no-results { margin: 0; padding: 48px 0 80px; color: var(--pks-muted); font-size: 18px; text-align: center; }

/* Fallback footer and 404. */
.pks-theme-footer { padding: 64px 0 30px; background: #071b2d; color: #c7d4df; }
.pks-theme-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 34px 60px; }
.pks-theme-footer__brand { color: #fff; font-size: 24px; font-weight: 850; text-decoration: none; }
.pks-theme-footer p { max-width: 620px; line-height: 1.7; }
.pks-theme-footer__menu { flex-wrap: wrap; justify-content: flex-end; }
.pks-theme-footer__menu a { padding: 8px 10px; color: #dbe7ee; text-decoration: none; }
.pks-theme-footer__legal { grid-column: 1 / -1; margin: 0; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.pks-error-page { display: grid; min-height: 72vh; place-items: center; padding: 120px 0 80px; background: linear-gradient(135deg, #f1f9f9, #fff8f3); }
.pks-error-page__inner { max-width: 760px; text-align: center; }
.pks-error-page__code { margin: 0; color: var(--pks-teal); font-size: clamp(68px, 14vw, 148px); font-weight: 900; line-height: .8; }
.pks-error-page h1 { margin: 30px 0 16px; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -.04em; }
.pks-error-page p { color: var(--pks-muted); font-size: 18px; line-height: 1.7; }
.pks-error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.pks-button--secondary { border: 1px solid var(--pks-teal-dark); background: #fff; color: var(--pks-teal-dark); box-shadow: none; }

@media (max-width: 980px) {
  .site-container { width: min(100% - 40px, var(--pks-container)); }
  .pks-theme-header__inner { min-height: 68px; }
  .pks-theme-menu-toggle { display: block; margin-left: auto; }
  .pks-theme-navigation {
    position: absolute; top: calc(100% + 10px); right: 20px; left: 20px;
    display: none; max-height: calc(100dvh - 96px); overflow-y: auto;
    padding: 10px; border: 1px solid var(--pks-border); border-radius: 15px; background: #fff; box-shadow: var(--pks-shadow);
  }
  .pks-theme-header.is-menu-open .pks-theme-navigation { display: block; }
  .pks-theme-header.is-menu-open .pks-theme-menu-toggle > span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
  .pks-theme-header.is-menu-open .pks-theme-menu-toggle > span:nth-of-type(3) { opacity: 0; }
  .pks-theme-header.is-menu-open .pks-theme-menu-toggle > span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
  .pks-theme-menu { flex-direction: column; align-items: stretch; }
  .pks-theme-menu a { color: var(--pks-ink); }
  .pks-theme-menu a:hover { background: #eaf8f6; color: var(--pks-teal-dark); }
  .pks-theme-header__cta { display: none; }
  .pks-menu-lock { overflow: hidden; }
  .pks-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  body.page-id-121 .content-area { padding-top: 68px; }
  body.page-id-160 .content-area { padding-top: 92px; }
  body.single-pks_products .content-area { padding-top: 80px; }

  body.wp-theme-pickoship.single-post .entry-header.post-title {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(7, auto);
  }
  body.wp-theme-pickoship.single-post .entry-header.post-title .entry-taxonomies { grid-column: 1; grid-row: 1; }
  body.wp-theme-pickoship.single-post .entry-header.post-title .entry-title { grid-column: 1; grid-row: 2; max-width: 760px; }
  body.wp-theme-pickoship.single-post .pks-article-deck { grid-column: 1; grid-row: 3; max-width: 760px; }
  body.wp-theme-pickoship.single-post .pks-article-freshness { grid-column: 1; grid-row: 4; }
  body.wp-theme-pickoship.single-post .entry-header.post-title .entry-meta { grid-column: 1; grid-row: 5; }
  body.wp-theme-pickoship.single-post .pks-article-share { grid-column: 1; grid-row: 6; }
  body.wp-theme-pickoship.single-post .pks-article-hero-media {
    grid-column: 1;
    grid-row: 7;
    min-height: 0;
    margin-top: 34px;
  }
  body.wp-theme-pickoship.single-post .pks-article-hero-image { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 782px) {
  body.admin-bar .pks-nav,
  body.admin-bar .pks-theme-header { top: 46px; }
}

@media (max-width: 430px) {
  body.wp-theme-pickoship .pks-nav.pks-mobile-open .pks-menu { left: 12px; right: 12px; }
}

@media (max-width: 720px) {
  .site-container { width: min(100% - 32px, var(--pks-container)); }
  .pks-generic-page-container { padding-block: 106px 64px; }
  .pks-related-grid { grid-template-columns: 1fr; }
  .entry-related > .site-container { width: min(100% - 36px, 1280px); }
  .pks-theme-footer__inner { grid-template-columns: 1fr; }
  .pks-theme-footer__menu { justify-content: flex-start; }
}

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