/*
Theme Name: BFS-Magazin
Theme URI: https://www.3dpanorama.at/
Author: Roman | Flamegate
Author URI: https://flamegate.de/
Description: A responsive WordPress magazine theme inspired by Austrian regional news portals. Built for featured stories, category blocks, sidebars, local directories, and editorial publishing.
Version: 1.0.47
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: austria-portal-magazine
Tags: blog, news, custom-logo, custom-menu, featured-images, right-sidebar, threaded-comments, translation-ready
*/

:root {
  --apm-bg: #ffffff;
  --apm-surface: #ffffff;
  --apm-paper: #ffffff;
  --apm-ink: #232323;
  --apm-muted: #848484;
  --apm-line: #e5e5e5;
  --apm-soft: #f6f6f6;
  --apm-accent: #c8102e;
  --apm-accent-dark: #980b22;
  --apm-forest: #2f5d50;
  --apm-sky: #f3f5f7;
  --apm-radius: 4px;
  --apm-shadow: none;
  --apm-font: "Noto Sans", "DM Sans", "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--apm-bg);
  color: var(--apm-ink);
  font-family: var(--apm-font);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--apm-accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.apm-fallback-image {
  width: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #f1f1f1;
  color: #8a8a8a;
  text-align: center;
}

.apm-fallback-image span {
  max-width: 80%;
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

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

.apm-container {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
}

.apm-primary-nav ul,
.apm-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.apm-header {
  background: var(--apm-surface);
  border-bottom: 0;
}

.apm-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 20px;
  padding: 14px 0 13px;
}

.apm-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.apm-logo-link,
.custom-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  line-height: 1;
}

.apm-logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--apm-accent);
  color: #fffaf2;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.custom-logo {
  display: block;
  width: auto;
  max-width: 190px;
  max-height: 46px;
}

.apm-brand-text {
  display: block;
  min-width: 0;
}

.apm-site-title {
  display: block;
  font-size: clamp(1.16rem, 2vw, 1.62rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.apm-site-tagline {
  display: block;
  margin-top: 4px;
  color: var(--apm-muted);
  font-size: 0.86rem;
}

.apm-header-search {
  width: min(380px, 100%);
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 0;
}

.apm-header-search__field {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--apm-line);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: #fff;
  color: var(--apm-ink);
  padding: 8px 11px;
  font: inherit;
  font-size: 0.8125rem;
  outline: none;
}

.apm-header-search__field:focus {
  border-color: #bdbdbd;
  box-shadow: inset 0 0 0 1px #bdbdbd;
}

.apm-header-search__submit {
  min-height: 38px;
  border: 1px solid var(--apm-accent);
  border-radius: 0 3px 3px 0;
  background: var(--apm-accent);
  color: #fff;
  padding: 0 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.apm-header-search__submit:hover {
  border-color: var(--apm-accent-dark);
  background: var(--apm-accent-dark);
}

.apm-nav-wrap {
  border-top: 1px solid var(--apm-line);
  border-bottom: 1px solid #1f1f1f;
  background: #fff;
}

.apm-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
}

.apm-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--apm-line);
  border-radius: 6px;
  background: var(--apm-paper);
  color: var(--apm-ink);
  cursor: pointer;
}

.apm-menu-toggle span,
.apm-menu-toggle::before,
.apm-menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.apm-primary-nav {
  flex: 1;
}

.apm-primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.apm-primary-nav li {
  position: relative;
}

.apm-primary-nav a {
  display: block;
  padding: 11px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.apm-primary-nav a:hover,
.apm-primary-nav .current-menu-item > a,
.apm-primary-nav .current-menu-ancestor > a {
  background: #f4f4f4;
  color: var(--apm-accent-dark);
}

.apm-primary-nav .menu-item-has-children > a {
  padding-right: 26px;
}

.apm-primary-nav .menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-66%) rotate(45deg);
}

.apm-primary-nav .sub-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 1px);
  z-index: 20;
  display: grid;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--apm-line);
  border-radius: 0;
  background: var(--apm-paper);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.apm-primary-nav li:hover > .sub-menu,
.apm-primary-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.apm-primary-nav .sub-menu a {
  padding: 9px 11px;
  border-radius: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  white-space: nowrap;
}

.apm-primary-nav .sub-menu .sub-menu {
  left: calc(100% + 8px);
  top: -8px;
  border-radius: var(--apm-radius);
}

.apm-topic-strip {
  border-bottom: 1px solid var(--apm-line);
  background: #fafafa;
}

.apm-topic-strip__inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.apm-topic-strip strong {
  color: var(--apm-accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.apm-topic-strip a {
  color: #4b4b4b;
  font-size: 0.8125rem;
}

.apm-topic-strip a:hover {
  color: var(--apm-accent);
}

.apm-main {
  padding: 20px 0 46px;
}

.apm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(320px, 0.72fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--apm-line);
}

.apm-hero--clean {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: 28px;
  margin: 4px 0 34px;
  padding: 0;
  border-bottom: 0;
}

.apm-featured {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #fff;
}

.apm-hero--clean .apm-featured {
  min-height: 500px;
  display: grid;
  align-items: stretch;
  border: 0;
  border-radius: 6px;
  background: var(--apm-ink);
  box-shadow: 0 28px 70px rgba(18, 30, 42, 0.22), 0 10px 26px rgba(30, 30, 30, 0.12);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.apm-hero--clean .apm-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 82px rgba(18, 30, 42, 0.25), 0 14px 32px rgba(30, 30, 30, 0.14);
}

.apm-hero--clean .apm-featured > a {
  position: relative;
  display: grid;
  min-height: inherit;
  align-items: end;
  color: #fff;
}

.apm-featured img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.apm-featured .apm-fallback-image {
  min-height: inherit;
}

.apm-hero--clean .apm-featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  filter: saturate(1.02);
  transition: transform 420ms ease, filter 420ms ease;
}

.apm-hero--clean .apm-featured .apm-fallback-image {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
  background: #eeeeee;
}

.apm-hero--clean .apm-featured:hover img {
  transform: scale(1.015);
  filter: saturate(1.06);
}

.apm-hero--clean .apm-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.72) 0%, rgba(23, 23, 23, 0.32) 48%, rgba(23, 23, 23, 0.06) 100%),
    linear-gradient(180deg, rgba(23, 23, 23, 0.02) 0%, rgba(23, 23, 23, 0.66) 100%);
}

.apm-featured__content {
  position: static;
  width: min(820px, 100%);
  padding: 13px 0 0;
  color: var(--apm-ink);
}

.apm-hero--clean .apm-featured__content {
  position: relative;
  z-index: 1;
  width: min(100%, 700px);
  padding: clamp(30px, 4.5vw, 50px);
  padding-right: clamp(30px, 5vw, 120px);
  color: #fff;
}

.apm-kicker,
.apm-card__cat,
.apm-section-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--apm-accent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.apm-card__cat {
  color: var(--apm-accent);
}

.apm-card__meta-row .apm-card__cat {
  max-width: 58%;
  overflow: hidden;
  color: var(--apm-accent);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.apm-card__meta-row .apm-card__cat::before {
  display: none;
}

.apm-card__meta-row .apm-meta {
  color: #8a8a8a;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.apm-kicker::before,
.apm-section-label::before {
  content: "";
  width: 14px;
  height: 2px;
  background: currentColor;
}

.apm-hero--clean .apm-kicker {
  min-height: 24px;
  padding: 3px 9px;
  background: var(--apm-accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.apm-hero--clean .apm-kicker::before {
  display: none;
}

.apm-featured h1,
.apm-page-title {
  margin: 6px 0 8px;
  font-size: clamp(1.75rem, 2.55vw, 2rem);
  line-height: 1.28;
  letter-spacing: 0;
}

.apm-hero--clean .apm-featured h1 {
  margin: 16px 0;
  font-size: clamp(1.95rem, 3.35vw, 3rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.apm-featured p {
  max-width: 62ch;
  margin: 0 0 12px;
  color: #555;
  font-size: 0.875rem;
  line-height: 1.55;
}

.apm-hero--clean .apm-featured p {
  max-width: 58ch;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.58;
}

.apm-button,
.comment-reply-link,
.form-submit .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--apm-accent);
  border-radius: 0;
  background: var(--apm-accent);
  color: #fffaf2;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.apm-button:hover,
.comment-reply-link:hover,
.form-submit .submit:hover {
  background: var(--apm-accent-dark);
  color: #fffaf2;
}

.apm-button:active,
.comment-reply-link:active,
.form-submit .submit:active {
  transform: translateY(1px);
}

.apm-hero--clean .apm-button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--apm-ink);
  font-weight: 800;
}

.apm-hero--clean .apm-button:hover {
  background: var(--apm-accent);
  color: #fff;
}

.apm-rail {
  display: grid;
  gap: 20px;
  align-content: start;
}

.apm-hero--clean .apm-rail {
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(229, 229, 229, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(18, 30, 42, 0.11), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.apm-rail-card,
.apm-sidebar .widget,
.apm-directory,
.apm-post-card,
.apm-content-box {
  border: 0;
  border-radius: 0;
  background: var(--apm-paper);
}

.apm-rail-card {
  padding: 0;
  border-top: 1px solid #1f1f1f;
}

.apm-rail-card h2,
.apm-sidebar .widget-title,
.apm-directory h2,
.apm-section-title {
  margin: 0 0 12px;
  padding-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.42;
}

.apm-weather {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.apm-weather__temp {
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
  color: var(--apm-forest);
}

.apm-weather__meta {
  color: var(--apm-muted);
  font-size: 0.75rem;
}

.apm-mini-list {
  display: grid;
  gap: 0;
}

.apm-mini-post {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--apm-line);
}

.apm-hero--clean .apm-mini-post {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--apm-line);
  transition: transform 180ms ease, border-color 180ms ease;
}

.apm-hero--clean .apm-mini-post:hover {
  transform: translateX(2px);
  border-bottom-color: rgba(200, 16, 46, 0.42);
}

.apm-hero--clean .apm-mini-post:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.apm-mini-post img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 0;
}

.apm-hero--clean .apm-mini-post img {
  width: 132px;
  height: 96px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(18, 30, 42, 0.11);
  transition: transform 260ms ease, filter 260ms ease, box-shadow 260ms ease;
}

.apm-hero--clean .apm-mini-post:hover img {
  transform: scale(1.02);
  filter: saturate(1.04);
  box-shadow: 0 12px 24px rgba(18, 30, 42, 0.14);
}

.apm-mini-post h3 {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 700;
}

.apm-hero--clean .apm-mini-post h3 {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.17;
  text-wrap: balance;
}

.apm-meta {
  color: var(--apm-muted);
  font-size: 0.75rem;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
}

.apm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.apm-home-sections {
  display: grid;
  gap: 34px;
}

.apm-home-widget-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--apm-line);
}

.apm-home-widget {
  min-width: 0;
  padding: 18px 0;
  border-top: 3px solid var(--apm-accent);
}

.apm-home-widget-title {
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--apm-line);
  color: var(--apm-ink);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.apm-home-widget p,
.apm-home-widget li {
  color: #5f5f5f;
}

.apm-home-widget ul,
.apm-home-widget ol {
  margin: 0;
  padding-left: 18px;
}

.apm-home-widget a {
  color: var(--apm-ink);
  font-weight: 700;
}

.apm-home-widget a:hover {
  color: var(--apm-accent);
}

.apm-home-section {
  min-width: 0;
}

.apm-home-section .apm-section-head {
  margin-top: 0;
}

.apm-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  margin: 18px 0 16px;
  border-bottom: 1px solid var(--apm-ink);
}

.apm-section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.75rem);
  line-height: 1.286;
  letter-spacing: -0.04em;
}

.apm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 20px;
  border-top: 0;
}

.apm-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.apm-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid #e7e7e7;
  border-radius: 6px;
  background: #fff;
  padding: 0;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.apm-post-card:nth-child(3n) {
  border-right: 1px solid #e7e7e7;
}

.apm-post-card:hover {
  transform: translateY(-2px);
  border-color: #d7d7d7;
  box-shadow: 0 16px 36px rgba(20, 24, 30, 0.08);
}

.apm-post-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--apm-sky);
}

.apm-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease, filter 280ms ease;
}

.apm-post-card__media .apm-fallback-image {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.apm-post-card:hover .apm-post-card__media img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.apm-post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.apm-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ededed;
}

.apm-post-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

.apm-post-card h3 a:hover {
  color: var(--apm-accent);
}

.apm-post-card p {
  margin: 0 0 14px;
  color: #676767;
  font-size: 0.875rem;
  line-height: 1.55;
}

.apm-card__read {
  width: fit-content;
  margin-top: auto;
  color: var(--apm-accent);
  font-size: 0.8125rem;
  font-weight: 800;
}

.apm-card__read:hover {
  color: var(--apm-accent-dark);
}

.apm-directory {
  margin-top: 24px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--apm-line);
}

.apm-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apm-tag-cloud a,
.tag-cloud-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--apm-line);
  border-radius: 0;
  background: #fff;
  color: var(--apm-ink);
  font-size: 0.8125rem !important;
}

.apm-sidebar {
  display: grid;
  gap: 18px;
}

.apm-sidebar .widget {
  padding: 15px 16px 16px;
  border: 1px solid #e4e4e4;
  border-top: 3px solid #1f1f1f;
  border-radius: 4px;
  background: #fff;
}

.apm-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.apm-sidebar li {
  padding: 10px 0;
  border-bottom: 1px solid #ededed;
  color: #777;
  font-size: 0.875rem;
  line-height: 1.35;
}

.apm-sidebar li:last-child {
  border-bottom: 0;
}

.apm-sidebar .widget-title {
  margin: 0 0 10px;
  padding: 0 0 9px;
  border-bottom: 1px solid #ededed;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
}

.apm-sidebar a {
  color: var(--apm-ink);
  font-weight: 700;
}

.apm-sidebar a:hover {
  color: var(--apm-accent);
}

.apm-sidebar-latest a {
  display: block;
}

.apm-sidebar time {
  display: block;
  margin-top: 4px;
  color: #8a8a8a;
  font-size: 0.75rem;
  font-weight: 500;
}

.apm-sidebar .search-form {
  gap: 0;
}

.apm-sidebar .search-field {
  min-height: 38px;
  border-radius: 3px 0 0 3px;
  border-right: 0;
  font-size: 0.8125rem;
}

.apm-sidebar .search-submit {
  min-height: 38px;
  border-radius: 0 3px 3px 0;
  font-size: 0.8125rem;
}

.apm-content-box {
  padding: clamp(20px, 3vw, 34px) 0;
}

.apm-entry-header {
  margin-bottom: 24px;
}

.apm-entry-title {
  margin: 10px 0 14px;
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  line-height: 1.313;
  letter-spacing: 0;
}

.apm-entry-content {
  color: #332b23;
}

.apm-entry-content p,
.apm-entry-content ul,
.apm-entry-content ol {
  max-width: 75ch;
}

.apm-entry-content a {
  color: var(--apm-accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.apm-entry-content blockquote {
  max-width: 760px;
  margin: 28px 0;
  padding: 6px 0 6px 22px;
  border-left: 4px solid var(--apm-accent);
  color: var(--apm-muted);
  font-size: 1.2rem;
}

.apm-entry-media {
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: var(--apm-radius);
}

.apm-pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
}

.page-numbers,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--apm-line);
  border-radius: 6px;
  background: var(--apm-paper);
}

.page-numbers.current {
  background: var(--apm-accent);
  color: #fffaf2;
}

.apm-footer {
  margin-top: 34px;
  padding: 0 0 22px;
  background: #f6f6f6;
  color: var(--apm-ink);
  border-top: 3px solid var(--apm-accent);
}

.apm-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding: 24px 0 26px;
}

.apm-footer-column h3 {
  margin: 0 0 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid #dcdcdc;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.apm-footer-column .widget + .widget {
  margin-top: 22px;
}

.apm-footer p,
.apm-footer a,
.apm-footer li {
  color: #5f5f5f;
}

.apm-footer a:hover {
  color: var(--apm-accent);
}

.apm-footer li {
  margin-bottom: 9px;
}

.apm-footer-category-list,
.apm-footer-post-list,
.apm-footer-menu,
.apm-footer-column ul {
  display: grid;
  gap: 0;
}

.apm-footer-category-list li,
.apm-footer-post-list li,
.apm-footer-menu li,
.apm-footer-column li {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #e4e4e4;
}

.apm-footer-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 700;
}

.apm-footer-category-list span {
  color: #8a8a8a;
  font-size: 0.75rem;
  font-weight: 700;
}

.apm-footer-post-list a {
  display: block;
  color: var(--apm-ink);
  font-weight: 700;
  line-height: 1.35;
}

.apm-footer-column a {
  color: var(--apm-ink);
  font-weight: 700;
}

.apm-footer-column a:hover {
  color: var(--apm-accent);
}

.apm-footer-post-list time {
  display: block;
  margin-top: 4px;
  color: #8a8a8a;
  font-size: 0.75rem;
}

.apm-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-top: 18px;
  border-top: 1px solid #dcdcdc;
  color: #777;
  font-size: 0.8125rem;
}

.apm-footer-bottom a {
  color: #777;
  font-weight: 700;
}

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

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--apm-line);
  border-radius: 6px;
  background: #fff;
  color: var(--apm-ink);
  padding: 10px 12px;
  font: inherit;
}

.search-submit,
button {
  min-height: 42px;
  border: 1px solid var(--apm-accent-dark);
  border-radius: 6px;
  background: var(--apm-accent);
  color: #fffaf2;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.comments-area {
  margin-top: 28px;
}

.comment-list {
  padding-left: 0;
  list-style: none;
}

.comment-body {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--apm-line);
  border-radius: var(--apm-radius);
  background: var(--apm-paper);
}

.apm-single-main {
  padding-top: 24px;
}

.apm-single-shell {
  display: grid;
  grid-template-columns: minmax(0, 69.9%) 30%;
  gap: 0;
  align-items: start;
}

.apm-single-article {
  min-width: 0;
}

.apm-single-content {
  padding-right: 34px;
}

.apm-single-sidebar {
  min-width: 0;
  padding-left: 34px;
  border-left: 1px solid var(--apm-line);
}

.apm-single-sidebar > .apm-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.apm-single-header {
  max-width: 840px;
  margin-bottom: 26px;
}

.apm-single-header .apm-card__cat {
  margin-bottom: 8px;
  color: var(--apm-accent);
  font-size: 1rem !important;
  font-weight: 500;
  line-height: 1.2;
}

.apm-single-title {
  max-width: 880px;
  margin: 0 0 18px;
  color: var(--apm-ink);
  font-size: clamp(2rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.313;
  letter-spacing: 0;
  text-wrap: balance;
}

.apm-single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--apm-muted);
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  font-size: 0.75rem;
  line-height: 1.45;
}

.apm-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.apm-single-meta__text {
  display: grid;
  gap: 2px;
}

.apm-updated {
  color: var(--apm-muted);
}

.apm-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.apm-byline a {
  color: var(--apm-ink);
  font-weight: 600;
}

.apm-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8b8b8;
}

.apm-single-media {
  margin: 0 0 28px;
  overflow: hidden;
}

.apm-single-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.apm-single-media .apm-fallback-image {
  border-radius: 4px;
}

.apm-single-media figcaption {
  margin-top: 7px;
  color: #8a8a8a;
  font-size: 0.75rem;
  line-height: 1.45;
}

.apm-image-title {
  font-weight: 700;
}

.apm-image-separator {
  display: inline-block;
  margin: 0 6px;
  color: #b0b0b0;
}

.apm-image-caption {
  font-weight: 500;
}

.apm-single-body-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 760px);
  gap: 22px;
  align-items: start;
}

.apm-share-rail {
  position: sticky;
  top: 92px;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--apm-muted);
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  font-size: 0.6875rem;
  text-transform: uppercase;
}

.apm-share-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.08em;
}

.apm-share-rail a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--apm-line);
  border-radius: 50%;
  color: var(--apm-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.apm-share-rail a:hover {
  border-color: var(--apm-accent);
  color: var(--apm-accent);
}

.apm-single-entry {
  max-width: 760px;
}

.apm-single-entry p,
.apm-single-entry ul,
.apm-single-entry ol {
  max-width: 760px;
  margin-top: 0;
  margin-bottom: 1.35rem;
  color: #232323;
  font-size: 1rem;
  line-height: 1.78;
}

.apm-single-entry > p:first-child {
  margin-top: 0;
}

.apm-single-entry h2 {
  max-width: 760px;
  margin: 2rem 0 1rem;
  color: var(--apm-ink);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.286;
  letter-spacing: -0.042em;
}

.apm-single-entry h3 {
  max-width: 760px;
  margin: 1.8rem 0 0.9rem;
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.apm-single-entry blockquote {
  max-width: 760px;
  margin: 1.6rem 0;
  padding: 18px 20px;
  border: 1px solid var(--apm-line);
  border-left: 3px solid var(--apm-accent);
  background: #fafafa;
  color: #555;
}

.apm-single-entry blockquote p {
  margin: 0;
}

.apm-single-entry a {
  color: var(--apm-accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.apm-single-entry .ruby-table-contents,
.apm-single-entry .rbtoc {
  max-width: 760px;
  margin: 1.05rem 0 1.75rem;
  overflow: hidden;
  border: 1px solid #dedede;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 24, 30, 0.05);
}

.apm-single-entry .toc-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #e1e1e1;
  border-radius: 0;
  background: #fafafa;
  color: var(--apm-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.apm-single-entry .toc-header:hover {
  background: #f5f5f5;
}

.apm-single-entry .toc-header .toc-toggle {
  margin-left: auto;
}

.apm-toc-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  color: var(--apm-accent);
  position: relative;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.apm-toc-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 6px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.apm-toc-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.apm-single-entry .toc-header .h3,
.apm-single-entry .toc-header span {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.025em;
}

.apm-single-entry .toc-toggle,
.apm-single-entry .toc-toggle.no-link {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: #777;
  transition: transform 160ms ease;
}

.apm-single-entry .toc-toggle::before,
.apm-single-entry .toc-toggle.no-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}

.apm-single-entry .apm-toc.is-collapsed .toc-toggle {
  transform: rotate(180deg);
}

.apm-single-entry .toc-content {
  margin: 0;
  padding: 7px 16px 10px;
  list-style: none;
}

.apm-single-entry .apm-toc.is-collapsed .toc-content {
  display: none;
}

.apm-single-entry .apm-toc.is-collapsed .toc-header {
  border-bottom: 0;
}

.apm-single-entry .toc-content li {
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #e7e7e7;
  font-size: 0.92rem;
  line-height: 1.42;
}

.apm-single-entry .toc-content .toc-level-3 {
  padding-left: 18px;
  font-size: 0.875rem;
}

.apm-single-entry .toc-content a {
  color: #232323;
  text-decoration: none;
}

.apm-single-entry .toc-content a:hover {
  color: var(--apm-accent);
}

.apm-single-entry .apm-toc {
  position: relative;
}

.apm-single-entry .apm-toc::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 3px;
  background: var(--apm-accent);
}

.apm-single-entry .toc-content li:last-child {
  border-bottom: 0;
}

.apm-single-entry .related-sec {
  max-width: 360px;
  float: right;
  clear: right;
  margin: 0.35rem 0 1rem 1.4rem;
  border: 1px solid var(--apm-line);
  background: #fafafa;
}

.apm-single-entry .related-sec .inner,
.apm-single-entry .related-sec .block-inner {
  padding: 10px 14px;
}

.apm-single-entry .related-sec .p-wrap {
  padding: 9px 0;
  border-bottom: 1px solid var(--apm-line);
}

.apm-single-entry .related-sec .p-wrap:last-child {
  border-bottom: 0;
}

.apm-single-entry .related-sec .entry-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.44;
  letter-spacing: -0.02em;
}

.apm-entry-share {
  max-width: 760px;
  margin: 32px 0 0 94px;
  padding-top: 20px;
  border-top: 1px solid var(--apm-line);
}

.apm-entry-share h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  line-height: 1.444;
  letter-spacing: -0.025em;
}

.apm-entry-share div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.apm-entry-share a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--apm-line);
  color: var(--apm-ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

.apm-entry-share a:hover {
  border-color: var(--apm-accent);
  color: var(--apm-accent);
}

.apm-single-nav {
  max-width: 760px;
  margin: 24px 0 0 94px;
  border-top: 1px solid var(--apm-line);
}

.apm-single-nav .nav-links {
  margin-top: 0;
}

.apm-single-nav .nav-previous,
.apm-single-nav .nav-next {
  flex: 1 1 260px;
}

.apm-single-nav a {
  display: block;
  padding: 18px 0;
  color: var(--apm-ink);
  font-weight: 700;
}

@media (max-width: 980px) {
  .apm-brand-row,
  .apm-hero,
  .apm-layout,
  .apm-footer-grid {
    grid-template-columns: 1fr;
  }

  .apm-header-search {
    justify-self: stretch;
    width: 100%;
  }

  .apm-featured,
  .apm-featured img {
    min-height: 0;
  }

  .apm-hero--clean .apm-featured {
    min-height: 430px;
  }

  .apm-hero--clean .apm-featured img {
    min-height: 100%;
  }

  .apm-hero--clean .apm-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .apm-hero--clean .apm-mini-post {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }

  .apm-hero--clean .apm-mini-post img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .apm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apm-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apm-single-shell {
    grid-template-columns: 1fr;
  }

  .apm-single-content {
    padding-right: 0;
  }

  .apm-single-sidebar {
    margin-top: 34px;
    padding-left: 0;
    border-left: 0;
  }

  .apm-single-sidebar > .apm-sidebar {
    position: static;
  }

  .apm-single-body-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .apm-share-rail {
    position: static;
    display: flex;
    justify-content: flex-start;
  }

  .apm-share-rail span {
    writing-mode: initial;
    transform: none;
  }

  .apm-entry-share,
  .apm-single-nav {
    margin-left: 0;
  }

  .apm-post-card:nth-child(3n) {
    border-right: 1px solid #e7e7e7;
  }

  .apm-post-card:nth-child(2n) {
    border-right: 1px solid #e7e7e7;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .apm-container {
    width: min(100% - 24px, 1180px);
  }

  .apm-brand-row {
    padding: 13px 0;
  }

  .apm-footer {
    margin-top: 28px;
  }

  .apm-footer-grid {
    gap: 22px;
    padding: 22px 0;
  }

  .apm-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .custom-logo {
    max-width: 170px;
    max-height: 44px;
  }

  .apm-menu-toggle {
    display: block;
  }

  .apm-primary-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: auto;
    z-index: 3;
    margin-top: 54px;
    border: 1px solid var(--apm-line);
    border-radius: var(--apm-radius);
    background: var(--apm-paper);
    box-shadow: var(--apm-shadow);
  }

  body.apm-menu-open .apm-primary-nav {
    display: block;
  }

  .apm-primary-nav ul {
    display: block;
  }

  .apm-primary-nav a {
    padding: 13px 16px;
    border-bottom: 1px solid var(--apm-line);
  }

  .apm-primary-nav .menu-item-has-children > a {
    padding-right: 34px;
  }

  .apm-primary-nav .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f6f6f6;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .apm-primary-nav .sub-menu a {
    padding-left: 30px;
    border-radius: 0;
    white-space: normal;
  }

  .apm-primary-nav .sub-menu .sub-menu {
    margin-left: 0;
  }

  .apm-grid {
    grid-template-columns: 1fr;
  }

  .apm-grid--four {
    grid-template-columns: 1fr;
  }

  .apm-post-card,
  .apm-post-card:nth-child(2n),
  .apm-post-card:nth-child(3n) {
    border-right: 1px solid #e7e7e7;
    padding: 0;
  }

  .apm-featured__content {
    padding: 12px 0 0;
  }

  .apm-hero--clean .apm-featured {
    min-height: 390px;
  }

  .apm-hero--clean .apm-featured__content {
    padding: 24px;
  }

  .apm-featured h1,
  .apm-page-title {
    font-size: 1.6875rem;
    line-height: 1.313;
  }

  .apm-hero--clean .apm-featured h1 {
    font-size: clamp(1.8rem, 10vw, 2.35rem);
    line-height: 1.08;
  }

  .apm-hero--clean .apm-featured p {
    font-size: 0.9375rem;
  }

  .apm-section-head h2 {
    font-size: 1.5rem;
  }

  .apm-single-title {
    font-size: 1.6875rem;
    line-height: 1.313;
  }

  .apm-single-header .apm-card__cat {
    font-size: 0.875rem !important;
  }

  .apm-single-entry h2 {
    font-size: 1.5rem;
  }

  .apm-post-card h3 {
    font-size: 1.0625rem;
    line-height: 1.28;
  }

  .apm-featured,
  .apm-featured img {
    min-height: 0;
  }

  .apm-mini-post {
    grid-template-columns: 82px 1fr;
  }

  .apm-hero--clean .apm-rail {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .apm-hero--clean .apm-mini-post {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--apm-line);
  }

  .apm-hero--clean .apm-mini-post:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .apm-mini-post img {
    width: 82px;
    height: 62px;
  }

  .apm-hero--clean .apm-mini-post img {
    width: 104px;
    height: 76px;
    aspect-ratio: auto;
  }

  .apm-hero--clean .apm-mini-post h3 {
    font-size: 0.9375rem;
  }
}

/* V22 polish pass */
.apm-header {
  border-bottom: 1px solid #ededed;
}

.apm-brand-row {
  padding: 18px 0 16px;
}

.custom-logo {
  max-width: 176px;
  max-height: 42px;
}

.apm-header-search {
  width: min(420px, 100%);
}

.apm-header-search__field,
.apm-header-search__submit {
  min-height: 40px;
}

.apm-nav-wrap {
  border-top-color: #ededed;
  border-bottom-color: #242424;
}

.apm-primary-nav a {
  padding: 12px 13px;
}

.apm-topic-strip {
  background: #fff;
}

.apm-topic-strip__inner {
  min-height: 40px;
}

.apm-home-sections {
  gap: 42px;
}

.apm-home-section {
  padding-top: 2px;
}

.apm-section-head {
  align-items: center;
  margin: 20px 0 18px;
  padding-bottom: 11px;
}

.apm-section-head h1,
.apm-section-head h2,
.apm-section-title {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.apm-section-link {
  flex: 0 0 auto;
  color: var(--apm-accent);
  font-size: 0.8125rem;
  font-weight: 800;
}

.apm-section-link:hover {
  color: var(--apm-accent-dark);
}

.apm-post-card {
  box-shadow: 0 1px 0 rgba(20, 24, 30, 0.02);
}

.apm-card__meta-row {
  min-height: 32px;
}

.apm-single-main {
  padding-top: 30px;
}

.apm-single-header {
  margin-bottom: 30px;
}

.apm-single-title {
  max-width: 920px;
  font-size: clamp(2rem, 3.4vw, 2.55rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.apm-single-meta {
  padding-top: 2px;
}

.apm-single-media {
  margin-bottom: 32px;
}

.apm-single-media img {
  border-radius: 4px;
}

.apm-share-rail a {
  width: 44px;
  height: 32px;
  border-radius: 999px;
  font-size: 0.625rem;
  letter-spacing: 0;
}

.apm-single-entry .ruby-table-contents,
.apm-single-entry .rbtoc {
  margin: 1.2rem 0 2rem;
}

.apm-single-entry p,
.apm-single-entry ul,
.apm-single-entry ol {
  font-size: 1.035rem;
  line-height: 1.82;
}

.apm-single-entry h2 {
  margin-top: 2.25rem;
  letter-spacing: -0.025em;
}

.apm-single-sidebar {
  padding-left: 30px;
}

.apm-sidebar .widget {
  border-top-color: var(--apm-accent);
}

.apm-archive-head {
  display: block;
  margin-top: 0;
  padding: 18px 0 16px;
  border-top: 3px solid var(--apm-accent);
  border-bottom-color: #d8d8d8;
}

.apm-archive-description {
  max-width: 70ch;
  margin-top: 8px;
  color: #666;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.apm-footer {
  margin-top: 44px;
}

.apm-footer-grid {
  gap: 32px;
}

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

@media (max-width: 980px) {
  .apm-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .apm-home-widget-area {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 34px;
  }
}

@media (max-width: 980px) {
  .apm-section-head {
    align-items: flex-start;
  }

  .apm-single-title {
    font-size: clamp(1.9rem, 6vw, 2.35rem);
  }
}

@media (max-width: 760px) {
  .apm-brand-row {
    padding: 13px 0;
  }

  .custom-logo {
    max-width: 164px;
    max-height: 40px;
  }

  .apm-section-head {
    gap: 10px;
  }

  .apm-section-link {
    width: 100%;
  }

  .apm-single-main {
    padding-top: 18px;
  }

  .apm-share-rail a {
    width: auto;
    min-width: 44px;
    padding: 0 10px;
  }
}

/* V23 header refinement */
.apm-header {
  background: #fff;
  border-bottom: 0;
}

.apm-brand-row {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: clamp(18px, 3vw, 36px);
  padding: 16px 0 15px;
}

.apm-brand {
  min-width: 0;
  gap: 14px;
}

.custom-logo {
  max-width: 168px;
  max-height: 40px;
}

.apm-site-title {
  font-size: clamp(1.05rem, 1.6vw, 1.34rem);
  letter-spacing: 0;
}

.apm-site-tagline {
  margin-top: 5px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.apm-header-search {
  width: 100%;
  max-width: 440px;
  border: 1px solid #dedede;
  border-radius: 4px;
  background: #fafafa;
  overflow: hidden;
}

.apm-header-search__field {
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 9px 13px;
  font-size: 0.875rem;
}

.apm-header-search__field:focus {
  box-shadow: inset 0 0 0 2px rgba(200, 16, 46, 0.14);
}

.apm-header-search__submit {
  min-height: 42px;
  border: 0;
  border-left: 1px solid #dedede;
  border-radius: 0;
  background: #fff;
  color: var(--apm-accent-dark);
  padding: 0 16px;
  font-size: 0.8125rem;
  font-weight: 800;
}

.apm-header-search__submit:hover {
  border-left-color: var(--apm-accent);
  background: var(--apm-accent);
  color: #fff;
}

.apm-nav-wrap {
  border-top: 1px solid #ededed;
  border-bottom: 1px solid #242424;
  background: #fff;
}

.apm-nav-inner {
  min-height: 45px;
}

.apm-primary-nav ul {
  gap: 0;
}

.apm-primary-nav a {
  position: relative;
  padding: 13px 13px 12px;
  color: #222;
  font-size: 0.875rem;
  font-weight: 700;
}

.apm-primary-nav a::before {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -1px;
  height: 2px;
  background: var(--apm-accent);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.apm-primary-nav a:hover,
.apm-primary-nav .current-menu-item > a,
.apm-primary-nav .current-menu-ancestor > a {
  background: transparent;
  color: var(--apm-accent-dark);
}

.apm-primary-nav a:focus-visible,
.apm-header-search__field:focus-visible,
.apm-header-search__submit:focus-visible {
  outline: 2px solid rgba(200, 16, 46, 0.45);
  outline-offset: 2px;
}

.apm-primary-nav a:hover::before,
.apm-primary-nav .current-menu-item > a::before,
.apm-primary-nav .current-menu-ancestor > a::before {
  opacity: 1;
  transform: scaleX(1);
}

.apm-primary-nav .sub-menu {
  top: 100%;
  min-width: 250px;
  padding: 8px;
  border-color: #dedede;
  border-top: 2px solid var(--apm-accent);
  background: #fff;
  box-shadow: 0 18px 44px rgba(20, 24, 30, 0.12);
}

.apm-primary-nav .sub-menu a {
  padding: 10px 11px;
}

.apm-primary-nav .sub-menu a::before {
  display: none;
}

.apm-primary-nav .sub-menu a:hover {
  background: #f7f7f7;
}

.apm-topic-strip {
  border-bottom: 1px solid #ededed;
  background: #fafafa;
}

.apm-topic-strip__inner {
  min-height: 38px;
  gap: 0;
}

.apm-topic-strip strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 14px;
  padding: 0 8px;
  background: var(--apm-accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.apm-topic-strip a {
  position: relative;
  color: #4f4f4f;
  font-size: 0.8125rem;
  font-weight: 600;
}

.apm-topic-strip a + a {
  margin-left: 18px;
}

.apm-topic-strip a + a::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c8c8c8;
}

@media (max-width: 980px) {
  .apm-brand-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .apm-header-search {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .apm-brand-row {
    padding: 12px 0;
  }

  .custom-logo {
    max-width: 158px;
    max-height: 38px;
  }

  .apm-nav-inner {
    min-height: 48px;
  }

  .apm-menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }

  .apm-header-search__submit {
    padding: 0 12px;
  }

  .apm-primary-nav {
    margin-top: 50px;
  }

  .apm-primary-nav a::before {
    display: none;
  }

  .apm-topic-strip__inner {
    min-height: 36px;
  }
}

/* V24 related posts */
.apm-related-posts {
  max-width: 854px;
  margin: 34px 0 0;
  padding-top: 24px;
  border-top: 1px solid #dedede;
}

.apm-related-posts .apm-section-head {
  margin: 0 0 18px;
}

.apm-related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.apm-related-posts .apm-post-card__body {
  padding: 12px 13px 14px;
}

.apm-related-posts .apm-card__meta-row {
  gap: 6px;
  min-height: 0;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.apm-related-posts .apm-card__meta-row .apm-card__cat {
  max-width: 100%;
}

.apm-related-posts .apm-card__meta-row .apm-meta {
  display: none;
}

.apm-related-posts .apm-post-card h3 {
  font-size: 1rem;
  line-height: 1.26;
}

.apm-related-posts .apm-post-card p {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.apm-related-posts .apm-card__read {
  font-size: 0.75rem;
}

@media (max-width: 980px) {
  .apm-related-posts {
    max-width: 100%;
  }

  .apm-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .apm-related-posts {
    margin-top: 28px;
    padding-top: 20px;
  }

  .apm-related-grid {
    grid-template-columns: 1fr;
  }
}

/* V25 single post navigation cards */
.apm-single-nav {
  max-width: 854px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid #dedede;
}

.apm-single-nav .apm-single-nav-card {
  position: relative;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
  background: #fff;
  color: var(--apm-ink);
  text-decoration: none;
  font-weight: inherit;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.apm-single-nav .apm-single-nav-card:hover {
  transform: translateY(-2px);
  border-color: #d4d4d4;
  box-shadow: 0 16px 36px rgba(20, 24, 30, 0.08);
  color: var(--apm-ink);
}

.apm-single-nav-label {
  color: var(--apm-accent);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.apm-single-nav .apm-single-nav-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.28;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.apm-single-nav .apm-single-nav-card::before {
  position: absolute;
  top: 18px;
  color: #b8b8b8;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.apm-single-nav .apm-single-nav-card--previous {
  padding-left: 44px;
}

.apm-single-nav .apm-single-nav-card--previous::before {
  content: "<";
  left: 18px;
}

.apm-single-nav .apm-single-nav-card--next {
  align-items: flex-end;
  padding-right: 44px;
  text-align: right;
}

.apm-single-nav .apm-single-nav-card--next::before {
  content: ">";
  right: 18px;
}

.apm-single-nav .apm-single-nav-card:only-child {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .apm-single-nav {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
  }

  .apm-single-nav .apm-single-nav-card {
    min-height: 108px;
  }
}

/* V26 single sidebar refinement */
.apm-single-sidebar {
  padding-left: 28px;
}

.apm-single-sidebar > .apm-sidebar {
  gap: 16px;
}

.apm-single-sidebar .widget {
  padding: 16px 17px 17px;
  border-color: #e1e1e1;
  border-top: 0;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(20, 24, 30, 0.03);
}

.apm-single-sidebar .widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--apm-ink);
}

.apm-single-sidebar .widget-title::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--apm-accent);
}

.apm-sidebar-ranked {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sidebar-rank;
}

.apm-sidebar-ranked li {
  position: relative;
  min-height: 48px;
  padding: 11px 0 11px 38px;
  counter-increment: sidebar-rank;
}

.apm-sidebar-ranked li::before {
  content: counter(sidebar-rank, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--apm-accent);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
}

.apm-sidebar-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.apm-sidebar-category-list span {
  color: #8a8a8a;
  font-size: 0.75rem;
  font-weight: 800;
}

.apm-sidebar-featured a,
.apm-sidebar-latest a {
  line-height: 1.32;
}

.apm-sidebar-search {
  background: #fafafa;
}

@media (max-width: 980px) {
  .apm-single-sidebar {
    padding-left: 0;
  }
}

/* V28/V29 mobile header layout */
@media (max-width: 760px) {
  .apm-brand-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "brand menu"
      "search search";
    gap: 10px 12px;
    align-items: center;
    padding: 12px 0 10px;
  }

  .apm-brand {
    grid-area: brand;
    min-width: 0;
  }

  .apm-brand-text {
    min-width: 0;
  }

  .custom-logo {
    max-width: 154px;
    max-height: 38px;
  }

  .apm-menu-toggle {
    grid-area: menu;
    justify-self: end;
    align-self: center;
    display: block;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 4px;
  }

  .apm-header-search {
    grid-area: search;
    width: 100%;
    max-width: none;
  }

  .apm-header-search__field,
  .apm-header-search__submit {
    min-height: 40px;
  }

  .apm-nav-wrap {
    border-top: 1px solid #ededed;
  }

  .apm-nav-inner {
    min-height: 0;
  }

  .apm-primary-nav {
    left: 12px;
    right: 12px;
    margin-top: 8px;
  }
}

/* WooCommerce */
.apm-woocommerce-main {
  padding-top: 28px;
}

.apm-woocommerce-content {
  max-width: 1180px;
  margin: 0 auto;
}

.woocommerce .woocommerce-breadcrumb {
  margin: 0 0 18px;
  color: var(--apm-muted);
  font-size: 0.8125rem;
}

.woocommerce .woocommerce-breadcrumb a {
  color: var(--apm-ink);
  font-weight: 700;
}

.woocommerce .woocommerce-products-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--apm-line);
}

.woocommerce .woocommerce-products-header__title,
.woocommerce div.product .product_title,
.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title,
.woocommerce-account .entry-title {
  margin: 0 0 12px;
  color: var(--apm-ink);
  font-size: clamp(2rem, 3.4vw, 2.55rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.woocommerce .woocommerce-result-count {
  margin: 0 0 18px;
  color: var(--apm-muted);
  font-size: 0.875rem;
}

.woocommerce .woocommerce-ordering {
  margin: 0 0 18px;
}

.woocommerce .woocommerce-ordering select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .quantity .qty {
  min-height: 42px;
  border: 1px solid var(--apm-line);
  border-radius: 4px;
  background: #fff;
  color: var(--apm-ink);
  padding: 8px 11px;
  font: inherit;
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
  margin: 0 0 32px;
  padding: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--apm-line);
}

.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 0 12px;
  background: var(--apm-soft);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: 0 0 8px;
  padding: 0;
  color: var(--apm-ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--apm-accent);
  font-size: 1rem;
  font-weight: 800;
}

.woocommerce span.onsale {
  min-width: auto;
  min-height: auto;
  padding: 5px 8px;
  border-radius: 3px;
  background: var(--apm-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .cart .button,
.woocommerce .cart input.button,
.woocommerce a.added_to_cart {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--apm-accent);
  border-radius: 4px;
  background: var(--apm-accent);
  color: #fff;
  padding: 9px 14px;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .cart .button:hover,
.woocommerce .cart input.button:hover,
.woocommerce a.added_to_cart:hover {
  border-color: var(--apm-accent-dark);
  background: var(--apm-accent-dark);
  color: #fff;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 36px;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  float: none;
  width: auto;
}

.woocommerce div.product div.images img {
  border-radius: 4px;
  background: var(--apm-soft);
}

.woocommerce div.product div.summary {
  margin-bottom: 0;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  color: #444;
  line-height: 1.72;
}

.woocommerce div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 22px 0;
}

.woocommerce div.product form.cart div.quantity {
  float: none;
  margin: 0;
}

.woocommerce div.product .product_meta {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--apm-line);
  color: var(--apm-muted);
  font-size: 0.8125rem;
}

.woocommerce div.product .woocommerce-tabs {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--apm-line);
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--apm-line);
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
  display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0 18px 0 0;
  padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  padding: 0 0 10px;
  color: var(--apm-ink);
  font-weight: 800;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--apm-accent);
}

.woocommerce table.shop_table {
  border: 1px solid var(--apm-line);
  border-radius: 4px;
  border-collapse: collapse;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: var(--apm-line);
  padding: 12px;
}

.woocommerce .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-checkout #customer_details,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation {
  padding: 18px;
  border: 1px solid var(--apm-line);
  border-radius: 4px;
  background: #fff;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--apm-accent);
  background: #fafafa;
  color: var(--apm-ink);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--apm-accent);
}

@media (max-width: 1020px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .woocommerce div.product {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
  }

  .woocommerce .woocommerce-products-header__title,
  .woocommerce div.product .product_title {
    font-size: clamp(1.75rem, 8vw, 2.15rem);
  }
}

@media (max-width: 480px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

/* V43 WooCommerce polish */
.apm-woocommerce-content {
  max-width: 1240px;
}

.woocommerce .woocommerce-products-header {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  padding: 0 0 20px;
  border-bottom: 1px solid #d8d8d8;
}

.woocommerce .woocommerce-products-header::before {
  content: "";
  width: 48px;
  height: 3px;
  background: var(--apm-accent);
}

.woocommerce .woocommerce-products-header__title {
  max-width: 860px;
  margin: 0;
  text-wrap: balance;
}

.woocommerce .term-description {
  max-width: 70ch;
  color: #555;
  font-size: 0.9675rem;
  line-height: 1.72;
}

.woocommerce .woocommerce-notices-wrapper {
  margin-bottom: 18px;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  float: none;
}

.woocommerce .woocommerce-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0 18px 20px 0;
  color: #686868;
}

.woocommerce .woocommerce-ordering {
  display: inline-flex;
  justify-content: flex-end;
  margin: 0 0 20px;
}

.woocommerce .woocommerce-ordering select {
  min-width: 230px;
  border-color: #d9d9d9;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.woocommerce ul.products {
  align-items: stretch;
  gap: 30px 24px;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 0 18px;
  border-bottom: 1px solid #dedede;
  transition: transform 180ms ease, border-color 180ms ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  border-bottom-color: var(--apm-accent);
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
}

.woocommerce ul.products li.product a img {
  overflow: hidden;
  border-radius: 4px;
  transition: transform 240ms ease, filter 240ms ease;
}

.woocommerce ul.products li.product:hover a img {
  transform: scale(1.018);
  filter: saturate(1.04);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  min-height: 2.6em;
  margin-bottom: 7px;
  font-size: 1.035rem;
  text-wrap: pretty;
}

.woocommerce ul.products li.product .star-rating {
  margin: 0 0 8px;
  color: var(--apm-accent);
  font-size: 0.8125rem;
}

.woocommerce ul.products li.product .price {
  margin-top: auto;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
  align-self: flex-start;
  margin-top: 0;
}

.woocommerce ul.products li.product .onsale {
  top: 10px;
  right: 10px;
  left: auto;
}

.woocommerce div.product {
  align-items: start;
  gap: clamp(28px, 4vw, 54px);
}

.woocommerce div.product div.images {
  position: sticky;
  top: 92px;
  margin-bottom: 0;
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.woocommerce div.product div.images img {
  border: 1px solid var(--apm-line);
  box-shadow: 0 18px 46px rgba(20, 24, 30, 0.07);
}

.woocommerce div.product div.images .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.woocommerce div.product div.images .flex-control-thumbs li {
  width: auto;
  float: none;
}

.woocommerce div.product div.images .flex-control-thumbs img {
  border-radius: 3px;
  box-shadow: none;
  opacity: 0.72;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.woocommerce div.product div.images .flex-control-thumbs img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs img:hover {
  border-color: var(--apm-accent);
  opacity: 1;
}

.woocommerce div.product div.summary {
  padding: 22px 0 0;
}

.woocommerce div.product .product_title {
  max-width: 680px;
  margin-bottom: 16px;
  text-wrap: balance;
}

.woocommerce div.product .summary .price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 0 13px;
  border-top: 1px solid var(--apm-line);
  border-bottom: 1px solid var(--apm-line);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-variant-numeric: tabular-nums;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  max-width: 62ch;
  margin-bottom: 20px;
  color: #3f3f3f;
  font-size: 1rem;
}

.woocommerce div.product form.cart {
  width: 100%;
  max-width: 520px;
  padding: 16px;
  border: 1px solid var(--apm-line);
  border-left: 3px solid var(--apm-accent);
  border-radius: 4px;
  background: #fafafa;
}

.woocommerce div.product form.cart .button {
  min-height: 46px;
  padding-inline: 20px;
}

.woocommerce .quantity .qty {
  width: 76px;
  min-height: 46px;
  font-weight: 800;
  text-align: center;
}

.woocommerce div.product .product_meta {
  max-width: 520px;
  color: #717171;
}

.woocommerce div.product .product_meta a {
  color: var(--apm-ink);
  font-weight: 700;
}

.woocommerce div.product .woocommerce-tabs {
  margin-top: 34px;
}

.woocommerce div.product .woocommerce-tabs .panel {
  max-width: 820px;
}

.woocommerce div.product .woocommerce-tabs .panel h2 {
  margin: 0 0 14px;
  color: var(--apm-ink);
  font-size: 1.35rem;
  line-height: 1.3;
}

.woocommerce div.product .woocommerce-tabs .panel p,
.woocommerce div.product .woocommerce-tabs .panel li {
  color: #444;
  font-size: 1rem;
  line-height: 1.76;
}

.woocommerce .related.products,
.woocommerce .upsells.products {
  grid-column: 1 / -1;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--apm-line);
}

.woocommerce .related.products > h2,
.woocommerce .upsells.products > h2 {
  margin: 0 0 18px;
  color: var(--apm-ink);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
}

.woocommerce a.button:focus-visible,
.woocommerce button.button:focus-visible,
.woocommerce input.button:focus-visible,
.woocommerce .quantity .qty:focus-visible,
.woocommerce .woocommerce-ordering select:focus-visible,
.woocommerce form .form-row input.input-text:focus-visible,
.woocommerce form .form-row textarea:focus-visible,
.woocommerce form .form-row select:focus-visible {
  outline: 2px solid rgba(200, 16, 46, 0.45);
  outline-offset: 2px;
}

@media (max-width: 1020px) {
  .woocommerce div.product div.images {
    position: static;
  }
}

@media (max-width: 760px) {
  .woocommerce .woocommerce-result-count,
  .woocommerce .woocommerce-ordering {
    width: 100%;
    justify-content: stretch;
  }

  .woocommerce .woocommerce-ordering select {
    width: 100%;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 0;
  }

  .woocommerce div.product div.summary {
    padding-top: 0;
  }

  .woocommerce div.product form.cart {
    max-width: none;
  }
}

/* V44 WooCommerce archive filter sidebar */
.apm-woocommerce-layout {
  display: block;
}

.apm-woocommerce-layout.has-shop-sidebar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(26px, 3.5vw, 44px);
  align-items: start;
}

.apm-shop-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.apm-shop-filter-widget {
  padding: 16px 17px 17px;
  border: 1px solid var(--apm-line);
  border-top: 3px solid var(--apm-accent);
  border-radius: 4px;
  background: #fff;
}

.apm-shop-filter-title {
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--apm-line);
  color: var(--apm-ink);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.apm-shop-filter-widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apm-shop-filter-widget li {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #ededed;
  color: #666;
  font-size: 0.875rem;
  line-height: 1.35;
}

.apm-shop-filter-widget li:last-child {
  border-bottom: 0;
}

.apm-shop-filter-widget a {
  color: var(--apm-ink);
  font-weight: 700;
}

.apm-shop-filter-widget a:hover,
.apm-shop-filter-widget .current-cat > a,
.apm-shop-filter-widget .chosen a {
  color: var(--apm-accent);
}

.apm-shop-filter-widget .count {
  color: #8a8a8a;
  font-size: 0.75rem;
  font-weight: 700;
}

.apm-shop-filter-widget .price_slider_wrapper {
  padding-top: 4px;
}

.apm-shop-filter-widget .ui-slider {
  margin: 0 4px 18px;
}

.woocommerce .apm-shop-filter-widget .widget_price_filter .price_slider_wrapper .ui-widget-content {
  background: #e5e5e5;
}

.woocommerce .apm-shop-filter-widget .widget_price_filter .ui-slider .ui-slider-range,
.woocommerce .apm-shop-filter-widget .widget_price_filter .ui-slider .ui-slider-handle {
  background: var(--apm-accent);
}

.woocommerce .apm-shop-filter-widget .widget_price_filter .price_slider_amount {
  display: grid;
  gap: 10px;
  color: #666;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.woocommerce .apm-shop-filter-widget .widget_price_filter .price_slider_amount .button {
  justify-self: start;
  min-height: 36px;
  padding: 7px 12px;
}

.apm-shop-filter-widget select,
.apm-shop-filter-widget input[type="search"],
.apm-shop-filter-widget input[type="text"],
.apm-shop-filter-widget input[type="number"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--apm-line);
  border-radius: 4px;
  background: #fff;
  color: var(--apm-ink);
  padding: 8px 10px;
  font: inherit;
}

@media (max-width: 1020px) {
  .apm-woocommerce-layout.has-shop-sidebar {
    grid-template-columns: 1fr;
  }

  .apm-shop-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .apm-shop-sidebar {
    grid-template-columns: 1fr;
  }
}
