/* ===== FONTS ===== */
/* Stratos Medium — served from the site's own Readymag/typetoday font hosting */
@font-face {
  font-family: 'Stratos';
  src: url('https://c-p.rmcdn.net/hosted-fonts/typetoday/StratosLC-Web-Medium.woff2') format('woff2'),
       url('https://c-p.rmcdn.net/hosted-fonts/typetoday/StratosLC-Web-Medium.woff') format('woff');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  color: #222;
  min-height: 100vh;
  overflow-x: hidden;
  zoom: calc(100vw / 1024px);
  /* the live site renders antialiased — default subpixel looks heavier */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

/* cursor language: + (cell) everywhere, disappears over clickables */
body {
  cursor: cell;
}

a,
button {
  cursor: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: #FF0000;
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
}

.nav-link-vertical:hover {
  text-decoration: none;
}

/* hover: single letter for ABOUT/GEAR/SPECS/MEDIA, whole word for ORDER */
.nav-link-vertical span:hover,
.nav-link-order:hover span {
  text-decoration: underline;
  text-decoration-color: #FF0000;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

body.page-about a:hover {
  text-decoration-color: #FF0000;
  text-decoration-thickness: 2px;
}

body.page-specs a:hover,
body.page-media a:hover {
  text-decoration-color: #FF0000;
}

.logo a:hover,
.nav-instagram:hover {
  text-decoration: none;
}

.site-header a.nav-pdf:hover {
  text-decoration: underline;
  text-decoration-color: #000;
  text-decoration-thickness: 1px;
}

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

/* ===== PAGE BACKGROUNDS ===== */
body.page-home {
  background: #ECECEC;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.page-home .main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.page-about { background: #ECECEC; }
body.page-gear { background: #ECECEC; }
body.page-order { background: #ECECEC; color: #000; }
body.page-specs { background: #ECECEC; }
body.page-media { background: #ECECEC; }

/* ===== HEADER / NAV ===== */
.site-header {
  position: static;
  width: 100%;
  z-index: 1000;
}

body.page-home .site-header { background: #ECECEC; }
body.page-about .site-header,
body.page-gear .site-header,
body.page-order .site-header,
body.page-specs .site-header,
body.page-media .site-header { background: #ECECEC; }

.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0;
  position: relative;
  height: 98px;
}

.logo {
  position: absolute;
  left: 21px;
  top: 14px;
}

.nav-links {
  position: absolute;
  left: 268px;
  top: 9px;
  display: flex;
  gap: 0;
  align-items: flex-start;
}

/* live column pitch: ABOUT 268, GEAR 281, SPECS 297, MEDIA 312, insta 338, ORDER 364 */
.nav-link-vertical,
.nav-link-order {
  width: 15px;
}

.nav-pdf {
  position: absolute;
  right: 149px;
  top: 22px;
  letter-spacing: 1px;
}

.logo a {
  display: block;
}

.logo img {
  width: 235px;
  height: 59px;
  display: block;
}

/* ===== VERTICAL STACKED NAV ===== */

.nav-link-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgb(0, 0, 0);
  line-height: 14px;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-link-vertical.active span,
.nav-link-order.active span {
  text-decoration: underline;
  text-decoration-color: #000;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

body.page-order .nav-link-vertical {
  color: #000;
}

.nav-link-vertical span {
  display: block;
  text-align: center;
}

.nav-link-order {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgb(0, 0, 0);
  line-height: 14px;
  text-decoration: none;
  margin-top: 1px;
}

.nav-link-order span {
  display: block;
  text-align: center;
}

body.page-order .nav-link-order {
  color: #000;
}

.nav-instagram {
  display: flex;
  align-items: flex-start;
  margin-top: 14px;
  margin-left: 11px;
  margin-right: 11px;
}

.nav-instagram img {
  width: 15px;
  height: 15px;
}

/* black icon -> #FF0000 on hover */
.nav-instagram:hover img {
  filter: brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(7404%) hue-rotate(4deg) brightness(102%) contrast(118%);
}

.nav-pdf {
  color: #FF0000;
  font-size: 23px;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  line-height: 41px;
}


/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 0 60px;
}

/* ===== HOME PAGE ===== */
body.page-home .main-content {
  max-width: none;
  padding: 0;
}

.home-hero img {
  width: 1024px;
  display: block;
}

/* ===== ABOUT PAGE ===== */
body.page-about .main-content {
  max-width: none;
  padding: 42px 0 60px 80px;
}

.about-section {
  margin-bottom: 21px;
}

.about-section h2 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 24px;
  color: #222;
  margin-bottom: 6px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: normal;
}

.about-section .person {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 20px;
  font-weight: 555;
  color: #000;
  line-height: 26px;
  letter-spacing: 1px;
  padding-top: 4px;
}

.about-section .person .affiliation {
  color: #555;
}

.about-section .person a {
  color: #000;
  text-decoration: none;
}

.about-section .person a:hover {
  text-decoration: underline;
  text-decoration-color: #FF0000;
  text-decoration-thickness: 2px;
}

.redacted {
  background: #000;
  color: #000;
  padding: 2px 4px;
  user-select: none;
}

.about-section .person a:has(.redacted):hover {
  text-decoration: none;
}

/* ===== GEAR PAGE ===== */
body.page-gear .main-content {
  max-width: none;
  padding: 30px 0 60px;
}

.gear-product {
  margin-bottom: 50px;
}

.gs-title {
  align-self: start;
}

.gear-product h2 {
  font-family: 'Inter', sans-serif;
  font-size: 35px;
  font-weight: 700;
  line-height: 50px;
  color: #000;
  margin-bottom: 2px;
  display: block;
}

/* rack size sits inline with the product name, same size */
.gear-product .rack-size {
  font-family: 'Inter', sans-serif;
  font-size: 35px;
  font-weight: 700;
  line-height: 50px;
  color: #000;
  margin-bottom: 0;
}

.gear-specs-row {
  display: grid;
  align-items: start;
  margin-bottom: 0;
  padding: 0 21px 0 39px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 18px;
  color: rgb(40, 40, 40);
}

/* Column geometry measured from the live site at 1024px */
/* MIXER: title IN qty RCA OUT qty XLR qty RCA DETAILS content = 11 cols */
.gear-specs-mixer {
  grid-template-columns: 173px 45px 26px 155px 75px 26px 99px 26px 137px 81px 121px;
}

/* ISOLATOR/POWER: title IN qty RCA OUT qty RCA DETAILS content = 9 cols */
/* live geometry: title 26->273, qty->RCA 334, OUT 501, RCA 558, DETAILS 722, content 821 */
.gear-specs-iso {
  padding-left: 26px;
  grid-template-columns: 247px 36px 25px 167px 30px 27px 164px 99px 200px;
}
.gs-col {
  min-width: 0;
  text-align: left;
}

/* spec columns align with the cap-top of the unit name (title has taller leading) */
.gear-specs-row > .gs-col:not(.gs-title) {
  padding-top: 7px;
}

.gs-qty {
  text-align: right;
  padding-right: 3px;
  font-size: 18px;
}

.gs-paired-col {
  display: flex;
  flex-direction: column;
}

.gs-paired-row {
  display: flex;
  align-items: baseline;
  line-height: 23px;
  font-size: 18px;
}

.gs-paired-header {
  font-weight: 700;
}

.gs-paired-qty {
  width: 34px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 5px;
  font-size: 18px;
  font-weight: 400;
}

.gs-group-start {
  padding-left: 0;
}

.gs-group-start + .gs-col:not(.gs-qty) {
  padding-left: 0;
}


.gs-header {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
}

.gs-header strong {
  font-weight: 700;
}

.gs-header-normal {
  font-weight: 400;
}

.gs-header-line {
  display: flex;
  gap: 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 23px;
  margin-bottom: 0;
}

.gs-header-line strong {
  font-weight: 700;
}

.gs-header-line span {
  font-weight: 700;
}

.gs-header-line .gs-normal {
  font-weight: 400;
}

.gs-span-2 {
  grid-column: span 2;
}

.gs-col p {
  font-size: 18px;
  line-height: 23px;
  color: rgb(40, 40, 40);
}

.gs-col p.small {
  font-size: 12px;
  line-height: 15px;
}

.gear-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  margin-left: -1px;
  margin-right: -1px;
}

.gear-images img {
  width: calc(100% + 2px);
  display: block;
}

.gear-images-side {
  flex-direction: row;
  gap: 0;
}

.gear-images-side img {
  width: calc(50% + 1px);
}

.gear-coming-soon {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 35px;
  font-weight: 700;
  color: #000;
  text-align: center;
  background: rgb(255, 209, 3);
  height: 113px;
  line-height: 113px;
  margin: 21px -1px 0;
}

.gear-coming-soon:first-child,
.gear-specs-row + .gear-coming-soon,
.gear-title + .gear-coming-soon {
  margin-top: 30px;
}

.gs-header-inline {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: rgb(40, 40, 40);
  margin-top: 3px;
}

.gs-body-center {
  text-align: left;
}

/* ===== ORDER PAGE ===== */
/* fits the viewport: header keeps the standard page zoom; js/main.js
   height-fits only the content + footer so the nav matches other pages */
@media (min-width: 641px) {
  body.page-order {
    /* 100vh min-height gets multiplied by zoom and forces a scrollbar */
    min-height: 0;
  }
}

body.page-order .main-content {
  max-width: none;
  padding: 24px 0 24px;
}

.order-content {
  text-align: center;
}

.order-email {
  color: #FF0000;
  font-size: 23px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  letter-spacing: -1.9px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 16px;
}

.order-email:hover {
  text-decoration: underline;
  text-decoration-color: #000;
  text-decoration-thickness: 1px;
}

.order-build-time {
  font-size: 60px;
  font-weight: 500;
  font-family: 'Stratos', 'IBM Plex Sans', sans-serif;
  letter-spacing: -2px;
  margin-bottom: 8px;
  line-height: 64px;
}

.order-rush {
  font-size: 19px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 200;
  letter-spacing: -2px;
  line-height: 22px;
  margin-bottom: 16px;
}

.order-currency {
  font-size: 12px;
  font-family: 'IBM Plex Sans', sans-serif;
  margin-bottom: 8px;
}

.order-prices {
  margin-bottom: 6px;
}

.order-prices {
  display: inline-block;
  text-align: left;
}

.order-price-row {
  font-size: 38px;
  font-weight: 500;
  font-family: 'Stratos', 'IBM Plex Sans', sans-serif;
  line-height: 46px;
  display: flex;
  gap: 40px;
}

.order-price-row .label {
  min-width: 220px;
}

.order-footnote {
  font-size: 12px;
  font-family: 'IBM Plex Sans', sans-serif;
  margin-bottom: 6px;
  color: #000;
}

.order-supply-note {
  font-size: 17px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 200;
  letter-spacing: -2px;
  line-height: 20px;
  margin-bottom: 16px;
}

.order-custom {
  font-size: 32px;
  font-weight: 500;
  font-family: 'Stratos', 'IBM Plex Sans', sans-serif;
  letter-spacing: -2px;
  line-height: 32px;
}

.order-custom a {
  text-decoration: underline;
  text-decoration-color: #FF0000;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.order-custom a:hover {
  text-decoration-color: #000;
  text-decoration-thickness: 1px;
}

/* ===== SPECS PAGE ===== */
/* Original designed at 1440px viewport. Using vw for proportional scaling. */
body.page-specs .main-content {
  max-width: none;
  padding: 42px 0 60px 0;
}

/* Diagram: centered */
.specs-diagram {
  text-align: center;
  margin-bottom: 40px;
}

.specs-diagram img {
  width: 900px;
  margin: 0 auto;
  display: block;
}

.specs-diagram img.diagram-portrait {
  display: none;
}

/* Specs tables */
.specs-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0 80px;
  row-gap: 0;
}

.specs-table-physical {
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 30px;
}

.specs-cell-span4 {
  grid-column: span 4;
  text-align: center;
}

.specs-table-data .specs-cell {
  text-align: center;
}

.specs-cell.specs-note-between {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 1px;
  padding: 10px;
}

.specs-note-between a {
  text-decoration: underline;
  text-decoration-color: #FF0000;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

body.page-specs .specs-note-between a:hover {
  text-decoration-color: #000;
}

.specs-table-physical .specs-cell {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  border: 1px solid #ccc;
  padding: 6px 10px;
}

.specs-cell-phys-header {
  font-weight: 700;
  font-size: 14px;
}

.specs-cell-span2 {
  grid-column: span 2;
  text-align: center;
}

.specs-cell {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 19px;
  color: #000;
  letter-spacing: 1px;
  line-height: 1.8;
  padding: 8px 0;
}

.specs-cell-notes {
  font-size: 11px;
  line-height: 1.8;
  padding-top: 20px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 20px;
}

.specs-cell-notes a {
  text-decoration: underline;
  text-decoration-color: #FF0000;
}

.specs-cell-header {
  padding-top: 8px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
}

.specs-ann {
  font-size: 11px;
  color: rgb(183, 0, 255);
  line-height: 1.3;
  letter-spacing: normal;
  margin-bottom: 0;
}

.specs-cell-ann-row {
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.specs-col-title {
  font-size: 18px;
  letter-spacing: 1px;
  font-weight: 700;
}

.specs-cell-data-label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  padding-top: 5px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.specs-cell-data {
  font-size: 18px;
  padding-top: 5px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.specs-psu-weight {
  font-size: 12px;
}

.specs-psu-dims {
  font-size: 7px;
  letter-spacing: 1px;
}

/* ===== MEDIA PAGE ===== */
body.page-media .main-content {
  max-width: none;
  padding: 42px 0 60px 0;
}

.media-heading {
  font-family: 'Roboto', sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 41px;
  color: rgb(189, 0, 171);
  margin-bottom: 12px;
  line-height: 1.3;
  text-align: center;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.media-subtext {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 400;
  color: #000;
  letter-spacing: -2px;
  line-height: 1.4;
  margin-bottom: 30px;
  text-align: center;
}

.media-subtext a {
  color: #FF0000;
  text-decoration: none;
}

body.page-media .media-subtext a:hover {
  text-decoration: underline;
  text-decoration-color: #000;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.media-gallery {
  column-count: 2;
  column-gap: 20px;
}

.media-gallery img {
  width: 100%;
  margin-bottom: 20px;
  display: block;
  break-inside: avoid;
}

/* Freeform collage matching the live site's media layout (1024px canvas) */
.media-collage {
  position: relative;
  width: 1024px;
  margin: 0 auto;
}

.media-collage img {
  position: absolute;
  display: block;
  max-width: none;
  /* each image is pinned to its live-site box; crop instead of overflowing */
  object-fit: cover;
}


/* ===== HOME MOBILE COLLAGE (hidden on desktop) ===== */
.home-hero-mobile {
  display: none;
}

/* ===== MOBILE — matches the live site's phone layout ===== */
@media (max-width: 640px) {
  body {
    zoom: 1;
  }

  /* header: logo left, nav letters right, PDF link below logo */
  .header-inner {
    height: 148px;
  }
  .logo {
    left: 0;
    top: 11px;
  }
  .logo img {
    width: 234px;
    height: 59px;
  }
  .nav-links {
    left: auto;
    right: 24px;
    top: 9px;
    gap: 0;
  }
  .nav-instagram {
    margin-left: 8px;
    margin-right: 8px;
  }
  .nav-pdf {
    left: 57px;
    right: auto;
    top: 92px;
    font-size: 12px;
    line-height: 23px;
  }

  /* HOME: rotated-panel collage instead of desktop hero */
  body.page-home .main-content {
    display: block;
    width: 100%;
    padding: 0;
  }
  .home-hero {
    display: none;
  }
  .home-hero-mobile {
    display: block;
    position: relative;
    width: 100vw;
    height: 1264vw;
    overflow: hidden;
  }
  .home-hero-mobile img {
    position: absolute;
    display: block;
    max-width: none;
  }
  .home-hero-mobile .hm-rot {
    transform-origin: top left;
    transform: rotate(90deg) translateY(-100%);
  }
  .home-hero-mobile .hm-rot-ccw {
    transform-origin: top left;
    transform: rotate(-90deg) translateX(-100%);
  }
  .home-see-details {
    position: absolute;
    top: 1230vw;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-style: italic;
    font-size: 8.7vw;
    letter-spacing: 0.18em;
    color: #000;
  }

  /* ABOUT */
  body.page-about .main-content {
    padding: 16px 25px 60px;
  }
  .about-section h2 {
    font-size: 30px;
    line-height: 38px;
    text-align: center;
    margin-bottom: 8px;
  }
  .about-section .person {
    font-size: 16px;
    line-height: 22px;
  }

  /* GEAR: stack the spec grid into qty + label pairs */
  .gear-product h2 {
    font-size: 42px;
    line-height: 52px;
  }
  .gear-product .rack-size {
    font-size: 42px;
    line-height: 52px;
  }
  .gear-specs-mixer,
  .gear-specs-iso {
    grid-template-columns: max-content 1fr;
    column-gap: 8px;
    padding: 0 12px;
  }
  /* js/main.js moves each unit's images up under the title on mobile */
  .gear-specs-row .gear-images {
    grid-column: 1 / -1;
    margin: 8px -12px 14px;
  }
  .gs-title {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    /* title hugs the viewport edge (~0.5px off) despite the row's 12px padding */
    margin-left: -11.5px;
  }
  /* IN / OUT / DETAILS section headers span the full row */
  .gs-col:has(> .gs-header-line > strong) {
    grid-column: 1 / -1;
    margin-top: 14px;
  }
  .gs-col:has(> .gs-header-line > strong) .gs-header-line strong {
    font-size: 34px;
    line-height: 44px;
  }
  .gear-specs-row .gs-col:last-child {
    grid-column: 1 / -1;
    margin-top: 8px;
  }
  .gear-specs-row {
    font-size: 17px;
  }
  .gs-col p,
  .gs-qty,
  .gs-header-line,
  .gs-paired-row,
  .gs-paired-qty,
  .gs-header-inline {
    font-size: 17px;
  }
  .gs-col p.small,
  .gs-paired-row .small {
    font-size: 13px;
  }
  .gs-group-start,
  .gs-group-start + .gs-col:not(.gs-qty) {
    padding-left: 0;
  }
  .gs-paired-qty {
    width: 34px;
  }
  .gear-images-side {
    flex-direction: column;
    gap: 20px;
  }
  .gear-images-side img {
    width: calc(100% + 2px);
  }

  /* ORDER */
  body.page-order .main-content {
    /* big cushion so the last line clears iOS toolbar + home indicator */
    padding: 24px 12px calc(110px + env(safe-area-inset-bottom));
  }
  .order-email {
    font-size: 19px;
    letter-spacing: -1.5px;
  }
  .order-build-time {
    font-size: 56px;
    line-height: 60px;
  }
  .order-price-row {
    font-size: 34px;
    line-height: 42px;
    gap: 20px;
  }
  .order-price-row .label {
    min-width: 150px;
  }
  .order-custom {
    font-size: 30px;
    line-height: 34px;
  }

  /* SPECS: diagram rotates to portrait and moves to the bottom */
  body.page-specs .main-content {
    display: flex;
    flex-direction: column;
    padding: 20px 0 40px;
  }
  .specs-table {
    padding: 0 12px;
  }
  .specs-table-physical .specs-cell {
    border: 1px solid #ccc;
    font-size: 10px;
    text-align: center;
    padding: 4px 2px;
  }
  .specs-cell {
    font-size: 14px;
    line-height: 1.5;
  }
  .specs-col-title {
    font-size: 16px;
  }
  .specs-cell-data-label,
  .specs-cell-data {
    font-size: 14px;
  }
  .specs-ann {
    font-size: 9px;
  }
  /* pre-rotated portrait asset flows normally — no transform, no clipping */
  .specs-diagram {
    order: 9;
    margin: 30px 24px 50px;
  }
  .specs-diagram img.diagram-landscape {
    display: none;
  }
  .specs-diagram img.diagram-portrait {
    display: block;
    width: 100%;
    margin: 0;
  }

  /* MEDIA */
  .media-heading {
    font-size: 34px;
    line-height: 42px;
    padding: 0 12px;
  }
  .media-subtext {
    font-size: 15px;
    letter-spacing: -1px;
  }
  .media-gallery {
    column-count: 1;
    margin: 0 16px;
  }
  /* collage falls back to a single stacked column on phones */
  .media-collage {
    width: auto;
    height: auto !important;
    margin: 0 16px;
  }
  .media-collage img {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 16px;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 0 34px;
}

.site-footer .flag {
  width: 21px;
  height: 11px;
  display: block;
}

.site-footer span {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #000;
}

/* ===== CONTROL FEATURE GRID ===== */
.control-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 34px;
  padding: 0 21px 0 26px;
  margin-top: 28px;
  font-family: 'Trebuchet MS', sans-serif;
  color: rgb(40, 40, 40);
}

.cf-intro {
  grid-column: 1 / -1;
  font-size: 13px;
  line-height: 17px;
  font-weight: 700;
}

.control-features h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 23px;
  color: rgb(40, 40, 40);
}

.control-features p {
  font-size: 12px;
  line-height: 16px;
}

.control-features p strong {
  font-weight: 700;
}

@media (max-width: 640px) {
  .control-features {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 12px;
  }
}

/* ===== CONTROL FEATURES MODAL ===== */
.cf-open {
  display: block;
  margin: 2px 0 0;
  padding: 0 0 1px;
  background: none;
  border: none;
  /* border-bottom instead of text-decoration: Safari won't repaint
     text-decoration-color on button hover until a click */
  border-bottom: 1px solid #FF0000;
  border-radius: 0;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: rgb(40, 40, 40);
}

.cf-open:hover {
  border-bottom-color: #000;
}

.cf-modal {
  /* the global reset zeroes the UA's margin:auto centering — restore it */
  margin: auto;
  border: none;
  background: #ECECEC;
  padding: 46px 48px 42px;
  max-width: 920px;
  width: calc(100% - 40px);
  /* dvh tracks iOS Safari's real visible area; vh is the fallback */
  max-height: 85vh;
  max-height: 88dvh;
  overflow: auto;
}

.cf-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.cf-modal .control-features {
  padding: 0;
  margin-top: 0;
}

.cf-close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: none;
  border: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 30px;
  line-height: 1;
  color: #000;
}

.cf-close:hover {
  color: #FF0000;
}

/* showModal() autofocuses the close button — no focus ring or tap flash */
.cf-close:focus,
.cf-close:focus-visible,
.cf-modal:focus,
.cf-modal:focus-visible {
  outline: none;
}

.cf-close,
.cf-open {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 640px) {
  .cf-modal {
    padding: 40px 18px calc(28px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-height: 80vh;
    max-height: calc(100dvh - 70px);
  }
  .cf-open {
    font-size: 17px;
    margin-top: 4px;
  }
}
