/* ===================================================================
   CATEGORY PAGES (e.g. high-nickel-alloys-plates.html)
   Loaded after style.css; reuses its tokens and components.
   =================================================================== */
.cat-hero {
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/high-nickel-alloys-plate.jpg');
  background-size: cover;
  background-position: center;
}
.cat-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -40% 20%;
  height: 80%;
  background: radial-gradient(ellipse 50% 55% at 50% 100%, rgba(217, 84, 30, 0.25), transparent 70%);
  pointer-events: none;
}
.cat-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #94a3b8;
}
.cat-crumbs li + li::before {
  content: '/';
  margin-right: 0.4rem;
  color: #556070;
}
.cat-crumbs a:hover {
  color: #fff;
}
.cat-crumbs [aria-current] {
  color: #e2e8f0;
}
.cat-hero .ticket-row a {
  transition: color 0.2s ease;
}

/* Original banner image */
.cat-banner {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.cat-banner img {
  display: block;
  width: 100%;
  height: auto;
}
/* Long, product-specific button labels may wrap on phones */
.cat-hero .btn,
.cat-content .btn,
#rfq .btn {
  white-space: normal;
  text-align: center;
}
.btn-whatsapp {
  background: #1fa855;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #178f47;
}

/* Long-form copy */
.cat-section {
  margin-top: 4rem;
  scroll-margin-top: 96px;
}
.cat-section h2,
.cat-card h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.cat-section > h2 + * {
  margin-top: 1.25rem;
}
.cat-prose p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}
.cat-prose p + p {
  margin-top: 1rem;
}
.cat-prose a,
.cat-link,
.cat-table a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(217, 84, 30, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.cat-prose a:hover,
.cat-link:hover,
.cat-table a:hover {
  text-decoration-color: currentColor;
}
.cat-note {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: #eef4fb;
  border: 1px solid #d5e3f3;
  color: #24364c;
  font-size: 0.95rem;
  line-height: 1.65;
}
.cat-note > i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 1.25rem;
  color: #2f6db5;
}
.cat-note.is-warn {
  background: #fff6ec;
  border-color: #f6dcbc;
  color: #5b3b12;
}
.cat-note.is-warn > i {
  color: #c2620a;
}

/* Data tables: scroll sideways on small screens */
.cat-table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.cat-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.cat-table th,
.cat-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.cat-table thead th {
  background: var(--ink);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cat-table tbody th {
  font-weight: 600;
  color: var(--ink);
}
.cat-table tbody th a {
  white-space: nowrap;
}
.cat-table tbody tr + tr > * {
  border-top: 1px solid var(--line);
}
.cat-table tbody tr:nth-child(even) {
  background: #f8fafb;
}
.cat-table tbody tr:hover {
  background: var(--accent-soft);
}
.cat-table.is-compact {
  min-width: 860px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.cat-table.is-compact th,
.cat-table.is-compact td {
  padding: 0.65rem 0.75rem;
  white-space: nowrap;
}

/* Range cards (child pages) */
.range-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.range-card:hover {
  border-color: #c9d1db;
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -28px rgba(14, 22, 33, 0.45);
}
.range-media {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--ink);
}
.range-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.range-card:hover .range-media img {
  transform: scale(1.06);
}
.range-uns {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  background: rgba(14, 22, 33, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.range-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
}
.range-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.range-card:hover h3 {
  color: var(--accent);
}
.range-card p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
/* Full-width card: photo beside the text from tablet width up */
@media (min-width: 640px) {
  .range-wide {
    flex-direction: row;
  }
  .range-wide .range-media {
    flex: 0 0 48%;
    aspect-ratio: auto;
    min-height: 200px;
  }
  .range-wide .range-body {
    justify-content: center;
  }
}
.range-link {
  margin-top: auto;
  padding-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.range-link i {
  transition: transform 0.2s ease;
}
.range-card:hover .range-link i {
  transform: translateX(4px);
}

.select-factors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.select-factors li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 500;
}
.select-factors i {
  color: var(--accent);
  font-size: 1.05rem;
}

/* Original bullet lists */
.orig-list {
  display: grid;
  gap: 0.55rem;
}
.orig-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #334155;
}
.orig-list li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.size-box {
  margin-top: 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

/* Thickness range bars, drawn on a 0–80 mm scale */
.size-bars {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.size-bars li {
  display: grid;
  grid-template-columns: 11rem 1fr 7rem;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}
.size-name a {
  color: var(--ink);
  font-weight: 500;
}
.size-name a:hover {
  color: var(--accent);
}
.size-track {
  position: relative;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--paper);
}
.size-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--from) / 80 * 100%);
  width: max(calc((var(--to) - var(--from)) / 80 * 100%), 0.6rem);
  border-radius: 999px;
  background: linear-gradient(90deg, #e8763f, var(--accent));
}
.size-val {
  text-align: right;
  font-weight: 600;
}
@media (max-width: 639px) {
  .size-bars li {
    grid-template-columns: 1fr auto;
    gap: 0.4rem 1rem;
  }
  .size-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Feature panel and small cards */
.cat-panel {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #f3d3c3;
}
.cat-panel-icon,
.cat-card-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  font-size: 1.5rem;
  color: #fff;
  background: var(--accent);
}
.cat-panel .cat-prose {
  margin-top: 0.85rem;
}
@media (max-width: 639px) {
  .cat-panel {
    flex-direction: column;
  }
}
.cat-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.cat-card h2 {
  margin-top: 1.1rem;
  font-size: 1.25rem;
}
.cat-card p {
  margin-top: 0.75rem;
  color: #334155;
  line-height: 1.75;
}

/* Original enquiry strip */
.enquiry-strip {
  margin-top: 4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}
.enquiry-strip-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.enquiry-strip-phone {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fdba74;
}
.enquiry-strip-phone:hover {
  color: #fff;
}

/* Original geographical text */
.geo {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}
.geo-block {
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted);
}
.geo-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.geo-title i {
  color: var(--accent);
  font-size: 1.15rem;
}
.geo-block a {
  color: var(--accent);
  font-weight: 500;
}
.geo-block a:hover {
  text-decoration: underline;
}

/* FAQ headings inside summaries keep the summary's type */
.faq summary h3 {
  font: inherit;
}

/* Sidebar */
.side-range,
.side-toc {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.side-range-head {
  display: block;
  padding: 0.9rem 1.15rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.side-range-current {
  display: block;
  padding: 0.85rem 1.15rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.side-range ul {
  padding: 0.4rem;
}
.side-range ul a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.side-range ul a:hover {
  background: var(--paper);
  color: var(--accent);
}
.side-range ul i {
  color: var(--accent);
}
.side-toc {
  padding: 1rem 1.15rem;
}
.side-toc-head {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.side-toc ul {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.1rem;
  border-left: 2px solid var(--line);
}
.side-toc a {
  display: block;
  margin-left: -2px;
  padding: 0.35rem 0.85rem;
  border-left: 2px solid transparent;
  font-size: 0.9rem;
  color: #475569;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.side-toc a:hover,
.side-toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.side-contact {
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--ink);
}
.side-contact-line {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.side-contact-line:hover {
  color: #fff;
}
.side-contact-line i {
  color: #fdba74;
  font-size: 1.15rem;
}
@media (max-width: 1023px) {
  .side-toc {
    display: none;
  }
}

/* RFQ */
.rfq-check {
  display: grid;
  gap: 0.6rem;
}
.rfq-check li {
  position: relative;
  padding-left: 1.75rem;
  color: #cbd5e1;
  line-height: 1.5;
}
.rfq-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  border: 1.5px solid #fdba74;
}
.rfq-check li::after {
  content: '';
  position: absolute;
  left: 0.38rem;
  top: 0.32em;
  width: 0.35rem;
  height: 0.6rem;
  border: solid #fdba74;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.file-field {
  padding: 0.55rem;
  font-size: 0.9rem;
}
.file-field::file-selector-button {
  margin-right: 0.85rem;
  padding: 0.45rem 0.9rem;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Related links */
.related-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-weight: 500;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.related-link i {
  font-size: 1.25rem;
  color: var(--accent);
}
.related-link:hover {
  border-color: #c9d1db;
  background: var(--paper);
  color: var(--accent);
}

/* ---------- Alloy Steel Plates page ---------- */
.cat-hero-alloy {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/chrome-moly-plates-photo.jpg');
}

/* Long original lists in two or three columns */
.orig-list-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
}
@media (min-width: 768px) {
  .orig-list-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Grade × class links */
.grade-matrix td a {
  display: inline-block;
  margin: 0.15rem 0.35rem 0.15rem 0;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.grade-matrix td a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Size range tiles */
.size-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.size-stats li {
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}
.size-stat-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}
.size-stat-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 639px) {
  .size-stats {
    grid-template-columns: 1fr;
  }
}

/* Nested sidebar tree (long ranges scroll inside the sticky sidebar) */
.side-range-tree li.lvl-2 a { padding-left: 1.5rem; }
.side-range-tree li.lvl-3 a { padding-left: 2.25rem; }
.side-range-tree li.lvl-4 a {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  padding-left: 3rem;
  font-size: 0.85rem;
  color: #475569;
}
@media (min-width: 1024px) {
  .side-range-tree {
    max-height: 22rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Row labels that must not wrap (standard names) */
.cat-table.th-nowrap tbody th {
  white-space: nowrap;
}

/* ---------- Abrasion Resistant Plates page ---------- */
.cat-hero-ar {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/ar-plates-photo.jpg');
}

/* Original product / brand keyword list */
.orig-keywords {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ---------- High Tensile Plates page ---------- */
.cat-hero-ht {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/supralsim-690-plates-photo.jpg');
}

/* Numbered original list */
.orig-list-num {
  counter-reset: orig;
}
.orig-list-num li {
  counter-increment: orig;
  padding-left: 2rem;
}
.orig-list-num li::before {
  content: counter(orig) '.';
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  transform: none;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Manganese Steel Plates page ---------- */
.cat-hero-mn {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/x120mn12-grade-manganese-plates-photo.jpg');
}

/* ---------- Corrosion Resistant Plates page ---------- */
.cat-hero-cr {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/corten-plates-photo.jpg');
}

/* ---------- Ballistic, Aluminium, C45, EN19, Ship Building and Steel Plates pages ---------- */
.cat-hero-ballistic,
.cat-hero-aluminium,
.cat-hero-c45,
.cat-hero-en19,
.cat-hero-ship,
.cat-hero-steel {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    var(--hero-photo);
}
.cat-hero-ballistic { --hero-photo: url('../img/mil-a12560-plates-photo.jpg'); }
.cat-hero-aluminium { --hero-photo: url('../img/6061-t6-aluminium-plates-photo.jpg'); }
.cat-hero-c45 { --hero-photo: url('../img/c45-plate-photo.jpg'); }
.cat-hero-en19 { --hero-photo: url('../img/en19-plate-42crmo4-grade-plate-photo.jpg'); }
.cat-hero-ship { --hero-photo: url('../img/steel-plate-for-shipbuilding-oil-platform-photo.jpg'); }
.cat-hero-steel { --hero-photo: url('../img/steel-plates1-photo.jpg'); }

/* Original tables copied from the live pages */
.orig-table th,
.orig-table td {
  vertical-align: top;
}
.cat-section .cat-table-wrap + .cat-table-wrap {
  margin-top: 1.25rem;
}

/* EN19 heat-treatment steps */
.ht-steps {
  display: grid;
  gap: 0.75rem;
}
.ht-steps > div {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.ht-steps dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}
.ht-steps dt i {
  color: var(--accent);
  font-size: 1.15rem;
}
.ht-steps dd {
  margin-top: 0.35rem;
  color: #334155;
  line-height: 1.65;
}

/* The open FAQ's rotated icon must not widen the page on phones */
.cat-content .faq-list {
  overflow-x: clip;
}

/* ---------- Product pages (Alloy 330 Plates) ---------- */
.cat-hero-a330 {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/alloy-330-plates-photo.jpg');
}
.side-range-tree a.is-current {
  color: var(--accent);
  font-weight: 600;
}
.app-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.15rem 1.25rem;
}
.app-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.orig-caption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-weight: 500;
}
.orig-caption-lg {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.orig-spec-list {
  display: grid;
  gap: 0.35rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--paper, #f3f5f7);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.app-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.app-group-title .ph {
  color: var(--accent);
  font-size: 1.15rem;
}
/* Original Wingdings tick (U+F0FC) kept in the markup; the icon beside it is shown instead */
.orig-glyph {
  position: absolute;
  font-size: 0;
}
.app-group-title strong {
  white-space: normal;
}

/* Specification reference cards (original "ASTM....B 536" lines) */
.spec-cards {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .spec-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.spec-card {
  position: relative;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.25rem 1.25rem 1.35rem;
}
.spec-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  white-space: nowrap;
}
.spec-org {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}
/* the original dots stay in the text; they are drawn as a dotted leader */
.spec-dots {
  flex: 1;
  min-width: 1rem;
  overflow: hidden;
  font-size: 0;
  border-bottom: 2px dotted var(--line);
  align-self: center;
}
.spec-code {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.spec-tag {
  margin-top: 0.85rem;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.spec-use {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}
.spec-points {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.spec-points li {
  position: relative;
  padding-left: 1.4rem;
}
.spec-points li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.6em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--accent);
}
.spec-example {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--paper);
  border: 1px dashed var(--line);
  overflow-wrap: anywhere;
}

/* Application group photos (illustrative industry images) */
.app-group {
  overflow: hidden;
}
.app-group-media {
  margin: -1.15rem -1.25rem 1rem;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  overflow: hidden;
}
.app-group-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.app-group:hover .app-group-media img {
  transform: scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
  .app-group-media img { transition: none; }
  .app-group:hover .app-group-media img { transform: none; }
}

/* Industry photo strip above application tables */
.app-photos {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .app-photos.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.app-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background: var(--paper);
}
.app-photos.is-1 .app-photo {
  aspect-ratio: 21 / 8;
}
.app-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 1rem 0.75rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(to top, rgba(10, 16, 24, 0.85), rgba(10, 16, 24, 0));
}
@media (max-width: 639px) {
  .app-photos.is-1 .app-photo { aspect-ratio: 16 / 9; }
}

/* ---------- Alloy 20 Plates ---------- */
.cat-hero-a20 {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/alloy-20-plates-photo.jpg');
}
/* Original specification list shown as chips */
.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.spec-chips li {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
/* Original physical-property lines shown as fact tiles */
.phys-facts {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .phys-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.phys-facts p {
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.phys-facts strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* Wide original tables that should fit the content column on desktop */
.cat-table.is-compact.is-fit {
  min-width: 640px;
}
.cat-table.is-compact.is-fit th,
.cat-table.is-compact.is-fit td {
  padding: 0.6rem 0.55rem;
}
.cat-table.is-compact.is-fit tbody td:first-child {
  white-space: normal;
}

/* ---------- Alloy 400, 625 and 825 Plates ---------- */
.cat-hero-a400,
.cat-hero-a625,
.cat-hero-a825 {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    var(--hero-photo);
}
.cat-hero-a400 { --hero-photo: url("../img/alloy-400-plates-photo.jpg"); }
.cat-hero-a625 { --hero-photo: url("../img/alloy-625-plates-photo.jpg"); }
.cat-hero-a825 { --hero-photo: url("../img/alloy-825-plates-photo.jpg"); }

/* Three-photo strip */
@media (min-width: 640px) {
  .app-photos.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.app-photos.is-3 .app-photo figcaption { font-size: 0.85rem; }

/* Spec cards in 2 or 4 columns */
@media (min-width: 640px) {
  .spec-cards.is-2,
  .spec-cards.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.phys-facts.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 639px) {
  .phys-facts.is-2 { grid-template-columns: 1fr; }
}

/* Original application list with a bold industry lead-in */
.app-list li strong { color: var(--ink); font-weight: 600; }

/* Original nested application list (industry > equipment > part) */
.app-tree {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .app-tree { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.app-branch {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem 1.15rem;
}
.app-branch-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}
.app-branch ul {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.app-branch ul li {
  position: relative;
  padding-left: 1rem;
}
.app-branch ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
}
.app-branch ul.app-sub {
  margin-top: 0.3rem;
}
.app-branch ul.app-sub li::before {
  border-radius: 1px;
  background: var(--muted);
}

/* Shaded sub-heading rows inside original tables */
.orig-table tbody tr.orig-subhead td {
  background: var(--ink);
  color: #fff;
  font-size: 0.8125rem;
}
.orig-table tbody tr.orig-subhead td strong { font-weight: 600; }

/* Caption on reference tables added beside an original table */
.cat-table .ref-caption {
  caption-side: top;
  text-align: left;
  padding: 0.75rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--accent-soft);
}

/* ---------- Chrome Moly Plates ---------- */
.cat-hero-cm {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    url('../img/chrome-moly-plates-photo.jpg');
}

/* Sub-category cards that list their own child pages */
.range-group:hover {
  transform: none;
}
.range-group h3 a {
  transition: color 0.2s ease;
}
.range-group h3 a:hover {
  color: var(--accent);
}
.range-group .range-media:hover img {
  transform: scale(1.06);
}
.range-group-label {
  margin-top: 1.1rem !important;
  font-size: 0.75rem !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.range-children {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.4rem;
}
.range-children a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.range-children a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.range-children a i {
  color: var(--accent);
}
.range-children .mono {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.range-group .range-media {
  display: block;
}

/* ---------- SA 387 and EN 10028-2 Chrome Moly Steels ---------- */
.cat-hero-sa387,
.cat-hero-en10028 {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    var(--hero-photo);
}
.cat-hero-sa387 { --hero-photo: url('../img/sa-387-chrome-moly-steels-photo.jpg'); }
.cat-hero-en10028 { --hero-photo: url('../img/en-10028-2-chrome-moly-steels-photo.jpg'); }

/* Full-width group rows inside original tables (e.g. "Carbon, max:") */
.orig-table tbody td[colspan] {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
/* Original footnotes printed under a table */
.orig-footnotes {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.15rem;
  font-size: 0.875rem;
  color: var(--muted);
}
/* Ten-column chemistry tables: tighter cells so they fit the column on desktop */
#chemistry .cat-table.is-compact.is-fit th,
#chemistry .cat-table.is-compact.is-fit td {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

/* ---------- ASME SA387 and ASTM A387 Plates ---------- */
.cat-hero-asme387,
.cat-hero-astm387 {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    var(--hero-photo);
}
.cat-hero-asme387 { --hero-photo: url('../img/asme-sa387-steel-plates-photo.jpg'); }
.cat-hero-astm387 { --hero-photo: url('../img/sa-387-chrome-moly-steels-photo.jpg'); }

/* Grade tiles with Class 1 / Class 2 page links */
.grade-tiles {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .grade-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.grade-tile {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem 1.1rem 1.1rem;
}
.grade-tile-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}
.grade-tile-nom {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.grade-tile-links {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.grade-tile-links a {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.grade-tile-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.grade-tile-note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}
#chemistry .cat-table.is-compact.is-fit {
  font-size: 0.8125rem;
}

/* ---------- 16Mo3, 13CrMo4-5 and 10CrMo9-10 Plates ---------- */
.cat-hero-m16,
.cat-hero-m1345,
.cat-hero-m910 {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    var(--hero-photo);
}
.cat-hero-m16 { --hero-photo: url('../img/16mo3-plates-photo.jpg'); }
.cat-hero-m1345 { --hero-photo: url('../img/13crmo45-plates-photo.jpg'); }
.cat-hero-m910 { --hero-photo: url('../img/10crmo910-plates-photo.jpg'); }

/* Grade product cards with Class 1 / Class 2 page buttons */
.grade-card h3 {
  font-size: 1.1rem;
}
.class-links {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}
.class-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.class-links a i {
  color: var(--accent);
  transition: transform 0.2s ease;
}
.class-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.class-links a:hover i {
  transform: translateX(3px);
}

/* ASME SA 387 grade/class product pages: photo set per page via --hero-photo */
.cat-hero-sa387g {
  background-image:
    linear-gradient(90deg, rgba(10, 16, 24, 0.95) 0%, rgba(10, 16, 24, 0.82) 55%, rgba(10, 16, 24, 0.6) 100%),
    var(--hero-photo);
}

/* Bulleted lists of original guidance (bending rules, drilling measures) */
.cat-list {
  display: grid;
  gap: 0.6rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2, #334155);
}
.cat-list li {
  position: relative;
  padding-left: 1.4rem;
}
.cat-list li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.68em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--accent);
}

/* AR grade comparison cards */
.ar-grades {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .ar-grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ar-grade {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.15rem 1.25rem 1.25rem;
}
.ar-grade h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.ar-rows {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
}
.ar-rows li {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}
.ar-rows li .mono {
  margin-top: 0.1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}
.ar-use {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}
.ar-group-text {
  grid-column: 1 / -1;
  font-size: 1rem;
  line-height: 1.7;
  padding: 0.25rem 0.25rem 0.75rem;
}
.ar-group-text p + p { margin-top: 0.75rem; }
.ar-warn {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 500;
}
.ar-warn i { color: var(--accent); font-size: 1.2rem; margin-top: 0.15rem; }
.ar-grade-wide { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .ar-grade-wide .ar-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Long original lists in two columns; current class row in comparison tables */
@media (min-width: 640px) {
  .cat-list.is-cols { display: block; columns: 2; column-gap: 1.75rem; }
  .cat-list.is-cols li { break-inside: avoid; margin-bottom: 0.5rem; }
}
.cat-list.is-facts li { font-variant-numeric: tabular-nums; }
.cat-table tr.is-current-row th,
.cat-table tr.is-current-row td { background: var(--accent-soft, #fff4ec); }

/* Buttons in two columns inside a full-width range card */
@media (min-width: 640px) {
  .class-links.is-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* product and service cards that use a 700 x 600 photo */
.range-media.is-photo { aspect-ratio: 4 / 3; }

/* cutting service pages: image beside the introduction, text wraps under it */
.cs-intro { margin-top: 2.5rem; display: flow-root; }
.cs-intro-media {
  position: relative;
  margin: 0 0 1.25rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 18px 40px -22px rgba(14, 22, 33, 0.55);
}
.cs-intro-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cs-intro-media figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(to top, rgba(10, 16, 24, 0.78), transparent);
}
.cs-intro-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (min-width: 768px) {
  .cs-intro-media { float: left; width: 47%; margin: 0.25rem 1.75rem 1rem 0; }
}
.size-stats.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .size-stats.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* weight calculator page */
.wc-shapes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wc-shape {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.9rem; border-radius: 10px; border: 1px solid #cdd4dc;
  background: #fff; font-size: 0.9rem; font-weight: 500; color: var(--ink);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.wc-shape i { font-size: 1.1rem; color: var(--muted); }
.wc-shape:hover { border-color: #9aa5b3; }
.wc-shape[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.wc-shape[aria-pressed='true'] i { color: var(--accent); }
.wc-result { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.wc-result .plate-viz { max-width: 360px; }
.wc-value { padding: 1.1rem 1.25rem; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.wc-value.is-empty #wcValue { color: #94a3b8; }
#wcBoard .wc-up { color: #b45309; font-weight: 600; }
#wcBoard .wc-down { color: #15803d; font-weight: 600; }

/* Country pages: collapsible original product description */
.cat-more { border: 1px solid var(--line, #e2e6ec); border-radius: 14px; background: #fff; padding: 0 1.25rem 1.25rem; }
.cat-more-sum { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 600; font-size: 0.95rem; color: var(--ink, #0e1621); }
.cat-more-sum::-webkit-details-marker { display: none; }
.cat-more-sum::after { content: '+'; font-size: 1.4rem; line-height: 1; color: #d9531e; }
.cat-more[open] > .cat-more-sum::after { content: '\2212'; }
.cat-more[open] > .cat-more-sum { border-bottom: 1px solid var(--line, #e2e6ec); margin-bottom: 0.5rem; }
