.site-article {
  min-height: 70vh;
}

.content-header {
  border-bottom: 1px solid var(--rule);
  background: #f1ebe2;
}

.content-top {
  padding-block: clamp(16px, 2.1vw, 29px) clamp(32px, 5vw, 70px);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .8rem;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-inline-end: 8px;
  color: currentColor;
  opacity: .55;
}

.breadcrumbs a {
  color: inherit;
  text-underline-offset: 3px;
}

.breadcrumbs a:hover { color: var(--orange-dark); }

.content-hero {
  max-width: 64rem;
  margin-top: clamp(23px, 3.9vw, 56px);
}

.content-hero.with-image {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 78px);
  max-width: none;
}

.content-heading { min-width: 0; }

.content-category {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: .875rem;
  font-weight: 760;
}

.content-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.7vw, 74px);
  font-weight: 780;
  letter-spacing: -.058em;
  line-height: 1.03;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

[lang="zh-CN"] .content-hero h1 { letter-spacing: -.042em; line-height: 1.12; }
[dir="rtl"] .content-hero h1, [dir="rtl"] .page-body h2 { letter-spacing: normal; line-height: 1.18; }
[dir="rtl"] .site-article :is(.arrow, .topic-arrow) { transform: scaleX(-1); }

.content-intro {
  max-width: 62ch;
  margin: clamp(13px, 2vw, 24px) 0 20px;
  color: #51453b;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.58;
}

.content-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.52;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #ebe4da;
}

.content-image[src$="home-limit-switch.webp"] {
  object-fit: contain;
  background: #e9e7e8;
}

.page-content { padding-block: clamp(28px, 4.4vw, 64px) clamp(46px, 6vw, 92px); }
.page-body { min-width: 0; }

.page-body > * + * { margin-top: clamp(32px, 5.2vw, 72px); }

.page-body h2 {
  margin: 0 0 13px;
  font-size: clamp(23px, 2.65vw, 38px);
  font-weight: 750;
  letter-spacing: -.039em;
  line-height: 1.14;
  overflow-wrap: anywhere;
  scroll-margin-block-start: 8px;
  text-wrap: pretty;
}

.topic-section > h2 { margin-bottom: clamp(15px, 2.15vw, 28px); }
.guide-section + .guide-section { margin-top: clamp(28px, 4vw, 49px); }

.guide-section p, .guide-section li, .guide-questions dd {
  max-width: 70ch;
  margin: 0 0 10px;
  color: #4e4339;
  line-height: 1.65;
}

.guide-section p:last-child, .guide-section li:last-child { margin-bottom: 0; }
.guide-section ul { margin: 13px 0 0; padding-inline-start: 22px; }
.guide-section li::marker { color: var(--orange-dark); }

.guide-questions {
  padding: clamp(16px, 2.9vw, 36px);
  border: 1px solid var(--rule);
  border-inline-start: 3px solid #d28053;
  border-radius: 7px;
  background: #f0e8de;
}

.guide-questions h2 { font-size: clamp(21px, 2vw, 28px); }
.guide-questions dl { margin: 0; }
.guide-questions dt { margin-top: 12px; font-weight: 760; }
.guide-questions dd { margin: 3px 0 0; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-grid > li { display: flex; min-width: 0; }

.topic-grid a {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fdf9f2;
  text-decoration: none;
}

.topic-grid a:hover { border-color: #bc885f; background: #fff1e4; }

.topic-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.85;
  object-fit: cover;
  border-start-start-radius: 7px;
  border-start-end-radius: 7px;
  background: #e9e4dc;
}

.topic-copy {
  position: relative;
  display: grid;
  gap: 7px;
  align-content: start;
  flex: 1;
  min-width: 0;
  padding: clamp(15px, 2.05vw, 27px);
}

.topic-copy strong {
  padding-inline-end: 1.5rem;
  color: var(--ink);
  font-size: clamp(17px, 1.6vw, 24px);
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.topic-description {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.46;
}

.topic-arrow {
  position: absolute;
  inset-block-start: clamp(14px, 2.05vw, 27px);
  inset-inline-end: clamp(14px, 2.05vw, 27px);
  color: var(--orange-dark);
  line-height: 1.2;
}

.related-section {
  padding-top: clamp(22px, 4vw, 48px);
  border-top: 1px solid var(--rule);
}

.related-section > h2 { font-size: clamp(21px, 2.3vw, 30px); }
.related-section .topic-copy strong { font-size: 1rem; }
.related-section .topic-grid { gap: 10px; }

.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(205px, 24%);
  align-items: start;
  gap: clamp(22px, 5vw, 71px);
}

.has-sidebar .page-body { grid-column: 1; grid-row: 1; }

.page-sidebar {
  position: sticky;
  top: calc(var(--header-offset) + 19px);
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #f1ebe2;
}

.page-sidebar h2 { margin: 0; padding: 5px 0 10px; font-size: .875rem; }
.page-sidebar ul { margin: 0; padding: 0; list-style: none; }
.page-sidebar li + li { border-top: 1px solid var(--rule); }

.page-sidebar a {
  display: block;
  padding-block: 8px;
  color: #4f4237;
  font-size: .875rem;
  line-height: 1.38;
  text-decoration: none;
}

.page-sidebar a:hover { color: var(--orange-dark); text-decoration: underline; }

[data-layout="parts-index"] .content-header { background: #ede5da; }
[data-layout="parts-index"] .content-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }

[data-layout="parts-index"] .content-image {
  object-fit: contain;
  min-height: 0;
  background: #f5f1ec;
}

[data-layout="parts-index"] .page-body > .topic-section:first-child .topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-layout="parts-index"] .content-sections,
[data-layout="modernization-index"] .content-sections,
[data-layout="directory-index"] .content-sections,
[data-layout="brand-detail"] .content-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 38px);
}

[data-layout="parts-index"] .content-sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }

:is([data-layout="parts-index"], [data-layout="modernization-index"], [data-layout="directory-index"], [data-layout="brand-detail"])
.content-sections > .guide-section {
  margin: 0;
  padding-block: clamp(17px, 2.65vw, 32px);
  border-top: 2px solid #b88968;
}

:is([data-layout="parts-index"], [data-layout="modernization-index"], [data-layout="directory-index"], [data-layout="brand-detail"])
.content-sections h2 { font-size: clamp(21px, 2.15vw, 31px); }

:is([data-layout="modernization-index"], [data-layout="brand-detail"]) .content-header {
  background:
    repeating-linear-gradient(90deg, transparent 0 89px, rgb(255 255 255 / .055) 89px 90px),
    linear-gradient(115deg, #211d1a, #3a3028);
  color: #fff6ea;
  border-bottom-color: #49392c;
}

:is([data-layout="modernization-index"], [data-layout="brand-detail"]) .content-header :is(.breadcrumbs ol, .content-intro) {
  color: #eee0d2;
}

:is([data-layout="modernization-index"], [data-layout="brand-detail"]) .content-header :is(.content-category, .breadcrumbs a:hover) {
  color: #ffc29a;
}

:is([data-layout="modernization-index"], [data-layout="brand-detail"]) .content-header :focus-visible {
  outline-color: #ffaf81;
}

[data-layout="modernization-index"] .content-image { border-color: #746254; object-fit: contain; background: #282928; }

[data-layout="modernization-index"] .page-body > .topic-section:first-child .topic-grid a {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

[data-layout="modernization-index"] .page-body > .topic-section:first-child .topic-image {
  height: 100%;
  min-height: 144px;
  aspect-ratio: auto;
  border-start-end-radius: 0;
  border-end-start-radius: 7px;
}

[data-layout="modernization-index"] .content-sections { grid-template-columns: minmax(0, 1fr); gap: 0; }

[data-layout="modernization-index"] .content-sections > .guide-section {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  column-gap: clamp(22px, 5vw, 72px);
  border-top-width: 1px;
}

[data-layout="modernization-index"] .content-sections h2 { grid-row: span 3; }
[data-layout="modernization-index"] .content-sections :is(p, ul) { grid-column: 2; }

[data-layout="service-detail"] .content-header { background: #ede7de; }
[data-layout="service-detail"] .content-hero h1 { font-size: clamp(32px, 4.25vw, 65px); }

[data-layout="service-detail"] .guide-checklist {
  padding: clamp(18px, 3vw, 34px);
  border-radius: 8px;
  background: #eee3d7;
}

[data-layout="service-detail"] .guide-checklist li { padding-inline-start: 4px; }

[data-layout="directory-index"] .content-header { background: #eee2d4; }

[data-layout="directory-index"] .page-body > .topic-section:first-child .topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

[data-layout="directory-index"] .page-body > .topic-section:first-child .topic-grid a {
  border-top: 3px solid #b17e59;
}

[data-layout="directory-index"] .page-body > .topic-section:first-child .topic-copy strong {
  font-size: clamp(18px, 2.2vw, 34px);
}

.brand-navigation { padding-block: 11px; border-bottom: 1px solid var(--rule); background: #efe8dd; }

.brand-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.brand-navigation a {
  display: block;
  padding: 7px 12px;
  border: 1px solid #d7cabc;
  border-radius: 4px;
  color: #51453b;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.brand-navigation a:hover, .brand-navigation a[aria-current="page"] {
  border-color: #c18155;
  background: #ffdfc5;
  color: #793410;
}

@media (min-width: 941px) {
  [data-layout="brand-detail"] .content-hero { max-width: none; }

  [data-layout="brand-detail"] .content-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr);
    grid-template-areas: "category category" "title intro" "title action";
    align-items: start;
    gap: 16px clamp(30px, 5.5vw, 80px);
  }

  [data-layout="brand-detail"] .content-category { grid-area: category; margin: 0; }
  [data-layout="brand-detail"] h1 { grid-area: title; }
  [data-layout="brand-detail"] .content-intro { grid-area: intro; margin: 0; }
  [data-layout="brand-detail"] .content-heading .button { grid-area: action; justify-self: start; }
}

@media (max-width: 940px) {
  [data-layout="directory-index"] .page-body > .topic-section:first-child .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-layout="parts-index"] .page-body > .topic-section:first-child .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 790px) {
  .content-hero.with-image, [data-layout="parts-index"] .content-hero, .has-sidebar { grid-template-columns: minmax(0, 1fr); }
  .content-image { max-height: 380px; }
  .page-sidebar, .has-sidebar .page-body { grid-column: auto; grid-row: auto; }
  .page-sidebar { position: static; }
  [data-layout="parts-index"] .content-sections { grid-template-columns: minmax(0, 1fr); }
  [data-layout="modernization-index"] .page-body > .topic-section:first-child .topic-grid a { display: flex; }

  [data-layout="modernization-index"] .page-body > .topic-section:first-child .topic-image {
    height: auto;
    min-height: 0;
    aspect-ratio: 1.85;
    border-start-end-radius: 7px;
    border-end-start-radius: 0;
  }
}

@media (max-width: 510px) {
  .topic-grid, [data-layout="parts-index"] .page-body > .topic-section:first-child .topic-grid,
  :is([data-layout="directory-index"], [data-layout="brand-detail"]) .content-sections,
  [data-layout="modernization-index"] .content-sections > .guide-section {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-layout="modernization-index"] .content-sections :is(p, ul) { grid-column: auto; }
  [data-layout="modernization-index"] .content-sections h2 { grid-row: auto; }
  [data-layout="directory-index"] .topic-description { font-size: .83rem; }
}
