/* ==========================================================================
   CHENFAN ELECTRIC — multi-page site chrome
   Extends css/styles.css. Uses the existing tokens only; adds no new palette.
   Covers: mega menu, mobile accordion, breadcrumb, page hero, section grid,
   spec tables, cards, process steps, FAQ, RFQ form, footer columns, 404.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HEADER — mega menu (desktop)
   -------------------------------------------------------------------------- */
.nav-desktop {
  align-items: center;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-desktop > a,
.nav-mega-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--d-2);
  padding: 8px 0;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-mega-toggle::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--e1);
}

.nav-mega-toggle:hover,
.nav-item[data-open="true"] .nav-mega-toggle {
  color: var(--d-1);
}

.nav-mega-toggle:hover::after,
.nav-item[data-open="true"] .nav-mega-toggle::after {
  transform: scaleX(1);
}

.nav-caret {
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s var(--e1);
}

.nav-item[data-open="true"] .nav-caret {
  transform: translateY(1px) rotate(-135deg);
}

.nav-desktop a[aria-current="page"] {
  color: var(--d-1);
}

.nav-desktop a[aria-current="page"]::after {
  transform: scaleX(1);
}

.mega {
  position: fixed;
  inset: auto 0 auto 0;
  top: var(--masthead-h, 70px);
  z-index: 190;
  background: var(--ink-2);
  border-top: 1px solid var(--rule-d);
  border-bottom: 1px solid var(--rule-d);
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.9);
}

.mega[hidden] {
  display: none;
}

.mega-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(26px, 2.6vw, 38px) var(--pad) clamp(20px, 2vw, 28px);
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 360px));
  justify-content: start;
  gap: clamp(26px, 4vw, 90px);
  align-items: stretch;
}

.mega-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mega-col + .mega-col {
  border-left: 1px solid var(--rule-d);
  padding-left: clamp(20px, 2.4vw, 40px);
}

.mega-col-note {
  margin-top: auto;
  padding-top: 22px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--d-3);
}

.mega-col-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule-d);
}

.nav-desktop .mega a {
  display: block;
  padding: 9px 0;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
  line-height: 1.35;
  color: var(--d-2);
  transition: color 0.25s, padding-left 0.3s var(--e1);
}

.nav-desktop .mega a::after {
  display: none;
}

.nav-desktop .mega a:hover,
.nav-desktop .mega a:focus-visible {
  color: var(--d-1);
  padding-left: 6px;
}

.nav-desktop .mega a[aria-current="page"] {
  color: var(--d-1);
}

.nav-desktop .mega a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 1px;
  background: var(--acc);
  vertical-align: middle;
  margin-right: 8px;
}

.mega-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-d);
}

.nav-desktop .mega a.mega-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 7px;
  margin-right: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--d-1);
  border-bottom: 1px solid var(--rule-d);
  transition: border-color 0.3s, gap 0.3s var(--e1);
}

.nav-desktop .mega a.mega-all:hover {
  padding-left: 0;
  gap: 16px;
  border-bottom-color: var(--d-1);
}

/* --------------------------------------------------------------------------
   2. HEADER — mobile accordion
   -------------------------------------------------------------------------- */
.m-acc {
  border-bottom: 1px solid var(--rule-d);
}

.m-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 0;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--d-1);
  text-align: left;
}

.m-acc-btn .nav-caret {
  color: var(--d-3);
}

.m-acc-btn[aria-expanded="true"] .nav-caret {
  transform: translateY(1px) rotate(-135deg);
  color: var(--acc);
}

.m-acc-panel {
  padding: 2px 0 16px;
}

.m-acc-panel[hidden] {
  display: none;
}

.m-acc-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 14px 0 2px;
}

.nav-mobile .m-acc-panel a {
  padding: 10px 0 10px 14px;
  font-size: 15px;
  color: var(--d-2);
  border-bottom: 0;
  border-left: 1px solid var(--rule-d);
}

.nav-mobile .m-acc-panel a:hover {
  color: var(--d-1);
}

.nav-mobile a[aria-current="page"] {
  color: var(--acc);
}

.m-acc-all {
  margin-top: 12px;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px !important;
}

/* --------------------------------------------------------------------------
   3. PAGE SHELL — subpages start below the fixed masthead
   -------------------------------------------------------------------------- */
body.page {
  background: var(--ink);
}

.page-main {
  padding-top: var(--masthead-h, 70px);
}

.breadcrumb {
  border-bottom: 1px solid var(--rule-d);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 14px var(--pad);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--d-3);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--rule-d);
}

.breadcrumb a {
  color: var(--d-3);
  transition: color 0.25s;
}

.breadcrumb a:hover {
  color: var(--d-1);
}

.breadcrumb [aria-current="page"] {
  color: var(--d-2);
}

/* --------------------------------------------------------------------------
   4. PAGE HERO
   -------------------------------------------------------------------------- */
.page-hero {
  border-bottom: 1px solid var(--rule-d);
  padding-block: clamp(44px, 7vh, 96px) clamp(40px, 6vh, 84px);
}

.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}

.page-hero h1 {
  margin-top: 22px;
  font-size: clamp(2rem, 4.4vw, 4rem);
  letter-spacing: -0.038em;
  line-height: 1.02;
  max-width: 17ch;
}

.page-hero .page-lead {
  margin-top: 26px;
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.6;
  color: var(--d-2);
  max-width: 52ch;
}

.page-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.page-hero-figure {
  position: relative;
  border: 1px solid var(--rule-d);
  background: var(--ink-2);
  overflow: hidden;
}

.page-hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.page-hero-figure figcaption,
.figure-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--rule-d);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--d-3);
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.page-hero-meta li {
  padding: 7px 13px;
  border: 1px solid var(--rule-d);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--d-2);
}

/* --------------------------------------------------------------------------
   5. CONTENT SECTIONS
   -------------------------------------------------------------------------- */
.sec {
  padding-block: clamp(44px, 6.5vh, 92px);
  border-bottom: 1px solid var(--rule-d);
}

.sec:last-of-type {
  border-bottom: 0;
}

.sec-light {
  background: var(--paper);
  color: var(--l-1);
}

.sec-light .eyebrow {
  color: var(--l-3);
}

.sec-light .prose p,
.sec-light .prose li {
  color: var(--l-2);
}

.sec-light .note {
  color: var(--l-3);
}

.sec-alt {
  background: var(--ink-2);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 56px);
  align-items: end;
  margin-bottom: clamp(26px, 3.4vw, 46px);
}

.sec h2 {
  margin-top: 18px;
  font-size: clamp(1.55rem, 2.9vw, 2.6rem);
  letter-spacing: -0.032em;
  line-height: 1.05;
  max-width: 20ch;
}

.sec h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.32rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sec-head p {
  font-size: clamp(0.97rem, 1.1vw, 1.08rem);
  line-height: 1.6;
  color: var(--d-2);
  max-width: 52ch;
}

.sec-light .sec-head p {
  color: var(--l-2);
}

/* body prose */
.prose {
  display: grid;
  gap: 20px;
  max-width: 78ch;
}

.prose p {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--d-2);
}

.prose ul {
  display: grid;
  gap: 10px;
}

.prose li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--d-2);
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 9px;
  height: 1px;
  background: var(--acc);
}

.prose h3 {
  margin-top: 12px;
}

.prose-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 56px);
  align-items: start;
  max-width: none;
}

/* --------------------------------------------------------------------------
   6. SPEC TABLES
   -------------------------------------------------------------------------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rule-d);
  font-size: 14px;
}

.spec-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table caption {
  text-align: left;
  padding-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--d-3);
}

.spec-table th,
.spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--rule-d);
  line-height: 1.55;
}

.spec-table th {
  width: 38%;
  min-width: 190px;
  font-weight: 600;
  color: var(--d-1);
  letter-spacing: -0.005em;
}

.spec-table td {
  color: var(--d-2);
}

.spec-table td.tbc {
  color: var(--d-3);
  font-style: italic;
}

.sec-light .spec-table {
  border-top-color: var(--rule-l);
}

.sec-light .spec-table th,
.sec-light .spec-table td {
  border-bottom-color: var(--rule-l);
}

.sec-light .spec-table th {
  color: var(--l-1);
}

.sec-light .spec-table td {
  color: var(--l-2);
}

.sec-light .spec-table caption,
.sec-light .spec-table td.tbc {
  color: var(--l-3);
}

/* key figures */
.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-d);
  border: 1px solid var(--rule-d);
}

/* Column counts are chosen to divide the item count exactly, so a figures
   block never renders a row of empty bordered cells. */
@media (min-width: 560px) {
  .figures--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figures--n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures--n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figures--n8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .figures--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .figures--n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.figures > div {
  background: var(--ink);
  padding: clamp(18px, 2.2vw, 28px);
}

.sec-alt .figures > div {
  background: var(--ink-2);
}

.sec-light .figures {
  background: var(--rule-l);
  border-color: var(--rule-l);
}

.sec-light .figures > div {
  background: var(--paper);
}

.figures b {
  display: block;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--d-1);
}

.sec-light .figures b {
  color: var(--l-1);
}

.figures span {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--d-3);
}

.sec-light .figures span {
  color: var(--l-3);
}

.figures em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--d-2);
}

.sec-light .figures em {
  color: var(--l-2);
}

/* --------------------------------------------------------------------------
   7. CARDS
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.card-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-d);
  background: var(--ink-2);
  transition: border-color 0.35s, transform 0.35s var(--e1);
  min-width: 0;
}

.sec-alt .card {
  background: var(--ink-3);
}

a.card:hover {
  border-color: var(--d-3);
  transform: translateY(-3px);
}

.card-media {
  position: relative;
  border-bottom: 1px solid var(--rule-d);
  background: var(--ink-3);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--e2);
}

a.card:hover .card-media img {
  transform: scale(1.035);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(18px, 2vw, 26px);
  gap: 12px;
}

.card-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
}

.card h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--d-1);
}

.card p {
  font-size: 13.8px;
  line-height: 1.6;
  color: var(--d-2);
}

.card ul {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.card ul li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--d-3);
  padding-left: 14px;
  position: relative;
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 1px;
  background: var(--rule-d);
}

.card-go {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--d-1);
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

a.card:hover .card-go {
  color: #fff;
}

/* compact link list cards */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule-d);
  border: 1px solid var(--rule-d);
}

.link-list a {
  background: var(--ink);
  padding: 18px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  color: var(--d-2);
  transition: background 0.3s, color 0.3s;
  min-width: 0;
}

.sec-alt .link-list a {
  background: var(--ink-2);
}

.link-list a:hover {
  background: var(--ink-4);
  color: var(--d-1);
}

.link-list a span {
  flex: none;
  color: var(--d-3);
}

/* --------------------------------------------------------------------------
   8. PROCESS STEPS
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 1px;
  background: var(--rule-d);
  border-block: 1px solid var(--rule-d);
}

.steps li {
  background: var(--ink);
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(12px, 2vw, 34px);
  padding: clamp(18px, 2.2vw, 28px) 0;
  align-items: start;
}

.sec-alt .steps li {
  background: var(--ink-2);
}

.sec-light .steps {
  background: var(--rule-l);
  border-block-color: var(--rule-l);
}

.sec-light .steps li {
  background: var(--paper);
}

.steps i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--acc);
  padding-top: 3px;
}

.steps b {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.25;
  color: var(--d-1);
}

.sec-light .steps b {
  color: var(--l-1);
}

.steps em {
  font-style: normal;
  font-size: 14px;
  line-height: 1.62;
  color: var(--d-2);
}

.sec-light .steps em {
  color: var(--l-2);
}

.steps small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--d-3);
}

.sec-light .steps small {
  color: var(--l-3);
}

/* --------------------------------------------------------------------------
   9. IMAGE PLACEHOLDERS
   -------------------------------------------------------------------------- */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  aspect-ratio: 4 / 3;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--rule-d);
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 9px,
    rgba(242, 244, 244, 0.035) 9px,
    rgba(242, 244, 244, 0.035) 18px
  );
}

.img-placeholder b {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acc);
}

.img-placeholder span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--d-3);
  max-width: 34ch;
}

.sec-light .img-placeholder {
  border-color: var(--rule-l);
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 9px,
    rgba(13, 16, 17, 0.045) 9px,
    rgba(13, 16, 17, 0.045) 18px
  );
}

.sec-light .img-placeholder span {
  color: var(--l-3);
}

.media-figure {
  border: 1px solid var(--rule-d);
  background: var(--ink-2);
  overflow: hidden;
}

.media-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-figure img.portrait {
  aspect-ratio: 3 / 4;
}

.sec-light .media-figure {
  border-color: var(--rule-l);
  background: var(--paper-2);
}

.sec-light .figure-caption {
  border-top-color: var(--rule-l);
  color: var(--l-3);
}

.media-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

/* --------------------------------------------------------------------------
   10. FAQ (native details/summary — works without JS)
   -------------------------------------------------------------------------- */
.faq-list {
  --faq-text: var(--d-1);
  --faq-answer: var(--d-2);
  border-top: 1px solid var(--rule-d);
}

.phase-faq, .sec-light .faq-list {
  --faq-text: var(--l-1);
  --faq-answer: var(--l-2);
}

.faq-item .disclosure-sign { display: none; }

.faq-item {
  border-bottom: 1px solid var(--rule-d);
}

.faq-item > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: var(--faq-text, var(--d-1));
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.3;
  color: var(--acc);
  transition: transform 0.3s var(--e1);
}

.faq-item[open] > summary::after {
  content: "–";
}

.faq-answer {
  padding: 0 0 20px;
  max-width: 76ch;
}

.faq-answer p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--faq-answer, var(--d-2));
}

.faq-answer p + p {
  margin-top: 12px;
}

.sec-light .faq-list,
.sec-light .faq-item {
  border-color: var(--rule-l);
}

.sec-light .faq-item > summary {
  color: var(--l-1);
}

.sec-light .faq-answer p {
  color: var(--l-2);
}

.faq-group-title {
  margin: clamp(28px, 3vw, 44px) 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
}

.faq-group-title:first-child {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   11. CTA BAND
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--ink-2);
  border-top: 1px solid var(--rule-d);
  padding-block: clamp(44px, 6vh, 86px);
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 3.4vw, 60px);
  align-items: center;
}

.cta-inner h2 {
  margin-top: 16px;
  font-size: clamp(1.7rem, 3.2vw, 2.9rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 15ch;
}

.cta-inner p {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--d-2);
  max-width: 50ch;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: center;
}

.cta-checklist {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}

.cta-checklist li {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--d-3);
  padding-left: 18px;
  position: relative;
}

.cta-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 1px;
  background: var(--acc);
}

/* --------------------------------------------------------------------------
   12. GLOBAL FOOTER — column layout
   -------------------------------------------------------------------------- */
.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 46px);
  padding-top: clamp(30px, 4vw, 52px);
  margin-top: clamp(30px, 4vw, 52px);
  border-top: 1px solid var(--rule-d);
}

.foot-col h3 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--d-1);
  margin-bottom: 14px;
}

.foot-col a,
.foot-col button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--d-2);
  transition: color 0.3s, padding-left 0.3s var(--e1);
}

.foot-col a:hover,
.foot-col button:hover {
  color: var(--d-1);
  padding-left: 5px;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.foot-cta .btn {
  height: 44px;
  padding: 0 18px;
  font-size: 11.5px;
}

.foot-cta .btn-solid {
  background: var(--paper);
  color: var(--ink);
}

.foot-cta .btn-solid:hover {
  background: #d8d5cc;
}

.foot-cta .btn-line {
  border-color: var(--rule-d);
  color: var(--d-1);
}

.foot-cta .btn-line:hover {
  border-color: var(--d-1);
  background: rgba(13, 16, 17, 0.05);
}

.foot-address {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--d-2);
}

.foot-address a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   13. CONTACT / RFQ PAGE FORM
   -------------------------------------------------------------------------- */
.rfq-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(26px, 3.4vw, 60px);
  align-items: start;
}

.rfq-page-form {
  display: grid;
  gap: clamp(20px, 2.4vw, 32px);
}

.rfq-page-form fieldset {
  border: 0;
  border-top: 1px solid var(--rule-d);
  padding: 22px 0 0;
  margin: 0;
}

.rfq-page-form legend {
  padding: 0 14px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.field-grid .full {
  grid-column: 1 / -1;
}

.rfq-page-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--d-3);
  min-width: 0;
}

.rfq-page-form input,
.rfq-page-form select,
.rfq-page-form textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--d-1);
  background: var(--ink-2);
  border: 1px solid var(--rule-d);
  border-radius: 2px;
  padding: 12px 14px;
  transition: border-color 0.25s, background 0.25s;
}

.rfq-page-form textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.55;
}

.rfq-page-form input:focus,
.rfq-page-form select:focus,
.rfq-page-form textarea:focus {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
  border-color: var(--acc);
}

.rfq-page-form input::placeholder,
.rfq-page-form textarea::placeholder {
  color: var(--d-3);
}

.upload-placeholder {
  border: 1px dashed var(--rule-d);
  border-radius: 2px;
  padding: 20px;
  display: grid;
  gap: 8px;
}

.upload-placeholder b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--d-2);
}

.upload-placeholder p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--d-3);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.form-status {
  font-size: 13px;
  line-height: 1.6;
  color: var(--d-2);
  border-left: 2px solid var(--acc);
  padding-left: 14px;
}

.form-status[hidden] {
  display: none;
}

.rfq-aside {
  display: grid;
  gap: 20px;
  border: 1px solid var(--rule-d);
  background: var(--ink-2);
  padding: clamp(20px, 2.4vw, 30px);
}

.rfq-aside h2,
.rfq-aside h3 {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.rfq-aside p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--d-2);
}

.rfq-aside .contact-person {
  border-top: 1px solid var(--rule-d);
  padding-top: 16px;
}

/* --------------------------------------------------------------------------
   14. 404
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-block: clamp(50px, 9vh, 120px);
}

.error-code {
  font-family: var(--mono);
  font-size: clamp(3.4rem, 11vw, 8rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--d-3);
}

/* --------------------------------------------------------------------------
   15. MISC
   -------------------------------------------------------------------------- */
.disclaimer {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 2px solid var(--rule-d);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--d-3);
  max-width: 78ch;
}

.sec-light .disclaimer {
  border-left-color: var(--rule-l);
  color: var(--l-3);
}

.inline-link {
  color: var(--d-1);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-d);
  transition: text-decoration-color 0.3s;
}

.inline-link:hover {
  text-decoration-color: var(--acc);
}

.sec-light .inline-link {
  color: var(--l-1);
  text-decoration-color: var(--rule-l);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row li,
.tag-row a {
  padding: 6px 12px;
  border: 1px solid var(--rule-d);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--d-2);
}

.tag-row a:hover {
  border-color: var(--d-2);
  color: var(--d-1);
}

.sec-light .tag-row li,
.sec-light .tag-row a {
  border-color: var(--rule-l);
  color: var(--l-2);
}

/* project cards */
.project-card .card-body dl {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.project-card dl > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.project-card dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--d-3);
  padding-top: 2px;
}

.project-card dd {
  font-size: 13.3px;
  line-height: 1.55;
  color: var(--d-2);
}

.project-figure b {
  display: block;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--d-1);
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .mega-inner {
    gap: 26px 40px;
  }
}

/* the existing system switches to the burger at 980px */
@media (max-width: 980px) {
  .nav-desktop {
    display: none;
  }

  .mega {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .page .page-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .page .page-hero-figure img {
    aspect-ratio: 16 / 10;
  }

  .page-hero h1 {
    max-width: none;
  }

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

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .spec-table th {
    min-width: 150px;
    width: 42%;
  }

  .spec-table th,
  .spec-table td {
    padding: 12px 12px 12px 0;
    font-size: 13.5px;
  }

  .breadcrumb ol {
    font-size: 10.5px;
  }

  .card-grid,
  .card-grid-2,
  .media-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .link-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .page .link-list a {
    flex-wrap: wrap;
  }

  .page .link-list a span {
    flex: 0 1 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .project-card dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

@media (max-width: 460px) {
  .figures,
  .figures--n3,
  .figures--n4,
  .figures--n6,
  .figures--n8 {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero-cta .btn,
  .cta-actions .btn,
  .form-actions .btn {
    width: 100%;
  }

  .steps li {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card-media img,
  .nav-caret,
  .nav-desktop .mega a {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   17. LATE ADDITIONS
   -------------------------------------------------------------------------- */
.page-hero-solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 78ch;
}

.foot-cta-block {
  align-self: start;
}

.foot-col-lead {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--d-1);
}

.foot-cta-block .foot-address {
  max-width: 46ch;
}

.section-page-link {
  margin-top: clamp(22px, 2.6vw, 36px);
}

.section-page-link .link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--d-1);
  border-bottom: 1px solid var(--rule-d);
  padding-bottom: 6px;
  transition: border-color 0.3s, gap 0.3s var(--e1);
}

.section-page-link .link:hover {
  border-color: var(--d-1);
  gap: 16px;
}

.sequence .section-page-link .link,
.quality .section-page-link .link,
.position .section-page-link .link {
  color: var(--l-1);
  border-bottom-color: var(--rule-l);
}

.sequence .section-page-link .link:hover,
.quality .section-page-link .link:hover,
.position .section-page-link .link:hover {
  border-bottom-color: var(--l-1);
}

/* technical library grid reused on the library page */
.sec .technical-grid {
  margin-top: 0;
}

/* the page RFQ summary block */
#page-rfq-summary {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 720px) {
  .foot-cta .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   18. UTILITY CLASSES (no inline styles — the CSP forbids style attributes)
   -------------------------------------------------------------------------- */
.block-spacer {
  height: clamp(20px, 2.6vw, 38px);
}

.upload-placeholder--spaced {
  margin-top: 16px;
}

.rfq-summary-box {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   19. HEADER FIT — eight top-level items need more room than the old five
   The floating "Quick contact" button keeps that action available at every
   width, so the duplicate header button is the first thing to drop.
   -------------------------------------------------------------------------- */
@media (max-width: 1560px) {
  .masthead .header-contact {
    display: none;
  }
}

@media (max-width: 1360px) {
  .masthead-inner {
    gap: 15px;
  }

  .nav-desktop {
    gap: 13px;
  }

  .nav-desktop > a,
  .nav-mega-toggle {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .masthead .nav-cta {
    padding: 0 13px;
    font-size: 10.5px;
    letter-spacing: 0.09em;
  }

  .language-control select {
    max-width: 78px;
    padding-right: 14px;
  }
}

@media (max-width: 1180px) {
  .masthead-inner {
    --pad: 26px;
    gap: 12px;
  }

  .nav-desktop {
    gap: 11px;
  }

  .nav-desktop > a,
  .nav-mega-toggle {
    font-size: 10.5px;
    letter-spacing: 0.07em;
  }

  .masthead .nav-cta span {
    display: none;
  }

  .masthead .nav-cta {
    padding: 0 11px;
  }
}

/* --------------------------------------------------------------------------
   20. HOMEPAGE — capability row now carries four figures
   -------------------------------------------------------------------------- */
.position .minor-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .position .minor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
  }
}

@media (max-width: 460px) {
  .position .minor-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   21. LONG COMPOUND WORDS — German and Vietnamese headings at phone widths
   -------------------------------------------------------------------------- */
.page-hero h1,
.sec h2,
.sec h3,
.cta-inner h2,
.card h3,
.faq-item > summary {
  overflow-wrap: break-word;
}

html:not([lang="en"]) .page-hero h1,
html:not([lang="en"]) .sec h2,
html:not([lang="en"]) .cta-inner h2 {
  hyphens: auto;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .page-hero h1 {
    font-size: clamp(1.7rem, 8.4vw, 2.3rem);
  }

  .sec h2,
  .cta-inner h2 {
    font-size: clamp(1.35rem, 6.6vw, 1.9rem);
  }

  .spec-table th,
  .spec-table td,
  .prose p,
  .prose li,
  .card p,
  .steps em {
    overflow-wrap: break-word;
  }
}

/* --------------------------------------------------------------------------
   22. CONTACT PAGE — the contact directory sits in a narrow aside here
   The shared directory is a 2-column grid inside a 2-column method grid, which
   is right in the footer and the drawer but collapses to one character per line
   in a ~300px sidebar. Force a single column at every level inside .rfq-aside,
   independently of the viewport width.
   -------------------------------------------------------------------------- */
.rfq-page-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.rfq-aside .contact-directory {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
  row-gap: 22px;
  margin-top: 4px;
}

.rfq-aside .contact-directory .contact-methods {
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
  margin-top: 12px;
}

.rfq-aside .contact-person {
  border-top: 1px solid var(--rule-d);
  padding-top: 18px;
}

.rfq-aside .contact-person h3 {
  font-size: 22px;
}

.rfq-aside .contact-role {
  font-size: 11px;
}

.rfq-aside .contact-method-row {
  min-height: 56px;
}

.rfq-aside .contact-method-row .contact-method {
  min-height: 54px;
  gap: 10px;
}

.rfq-aside .contact-method-value {
  overflow-wrap: break-word;
  word-break: normal;
  font-size: 12.5px;
}

.rfq-aside .contact-method-row--whatsapp .contact-method-value,
.rfq-aside .contact-method-row--zalo .contact-method-value,
.rfq-aside .contact-method-row--line .contact-method-value {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .rfq-page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rfq-aside .contact-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }
}

@media (max-width: 640px) {
  .rfq-aside .contact-directory {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}
