/*////////////////////////////////////////////////////////////////////////////////////////////////////
//  Gear type pages (gear-types/*.php), starting with spur.php
//  Same look as the part search page (tech-tools/part-search/customContent.css): a navy header bar with a
//  red underline and pill links to the related tools, then the article in a white card on a light gray panel.
//  The article text comes from the database ($elements->mainContent: <p>s and the odd link), so everything is
//  styled through #gearTypePage #mainContent. A page opts in by wrapping its content in #gearTypePage.
////////////////////////////////////////////////////////////////////////////////////////////////////*/
#gearTypePage {
    --gt-navy: #1a304d;
    --gt-navy-2: #243f63;
    --gt-red: #cc0033;
    --gt-red-dark: #a3002a;
    --gt-bg: #eef2f6;
    --gt-text: #1d2733;
    --gt-muted: #5b6776;
    --gt-border: #cfd8e3;
    --gt-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    box-sizing: border-box;
    width: auto;
    max-width: min(820px, calc(100% - 32px));
    margin: 12px auto 24px;
    padding: 0 0 16px;
    background: var(--gt-bg);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(26, 48, 77, .18);
    color: var(--gt-text);
    font: 16px/1.6 var(--gt-font);
    text-align: left;
}

#gearTypePage *,
#gearTypePage *::before,
#gearTypePage *::after {
    box-sizing: border-box;
}

/*---------- header bar ----------*/
#gearTypePage #gtHeader {
    padding: 16px 18px 14px;
    background: var(--gt-navy);
    border-bottom: 3px solid var(--gt-red);
    border-radius: 14px 14px 0 0;
    color: #fff;
}

#gearTypePage #gtTitle {
    margin: 0;
    padding: 0;
    color: #fff;
    font: 700 22px/1.2 var(--gt-font);
    letter-spacing: .02em;
    text-align: left;
    text-shadow: none;
}

#gearTypePage #gtSubtitle {
    margin: 4px 0 0;
    color: #c9d6e6;
    font-size: 15px;
    line-height: 1.4;
}

/* pills, like the builder's nav links; the quote link is the primary one */
#gearTypePage #gtActions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

#gearTypePage .gtAction,
#gearTypePage .gtAction:visited {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--gt-navy-2);
    color: #fff;
    font: 600 14px var(--gt-font);
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}

#gearTypePage .gtAction:hover,
#gearTypePage .gtAction:focus-visible {
    background: #34557f;
    color: #fff;
}

#gearTypePage .gtAction.gtPrimary {
    background: var(--gt-red);
}

#gearTypePage .gtAction.gtPrimary:hover,
#gearTypePage .gtAction.gtPrimary:focus-visible {
    background: var(--gt-red-dark);
}

/*---------- the article (database content) ----------*/
#gearTypePage #mainContent {
    position: static;
    margin: 14px 16px 0;
    padding: 20px 24px 22px;
    background: #fff;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    color: var(--gt-text);
    font: 16px/1.65 var(--gt-font);
    text-align: left;
}

#gearTypePage #mainContent p {
    max-width: 72ch; /* comfortable line length */
    margin: 0 0 14px;
    color: var(--gt-text);
    font: inherit;
    text-align: left;
}

#gearTypePage #mainContent p:last-child {
    margin-bottom: 0;
}

/* the opening paragraph is a lead-in (first-of-type: sprocket.php starts with a diagram, not a paragraph) */
#gearTypePage #mainContent > p:first-of-type {
    color: var(--gt-navy);
    font-size: 17px;
    font-weight: 400;
}

#gearTypePage #mainContent a,
#gearTypePage #mainContent a:visited {
    color: var(--gt-navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#gearTypePage #mainContent a:hover {
    color: var(--gt-red);
}

/* images in the article scale down to the card */
#gearTypePage #mainContent img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    vertical-align: middle;
}

/* an image on its own in a div (worm.php, spiral-bevel.php, sprocket.php): centered block */
#gearTypePage #mainContent div:has(> img) {
    margin: 4px 0 18px;
    text-align: center;
}

#gearTypePage #mainContent div:has(> img) > img {
    display: block;
    margin: 0 auto;
}

/* images inside a paragraph (the flanged / unflanged pair on timing-pulley.php): side by side, wrapping on phones */
#gearTypePage #mainContent p:has(> img) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 16px 24px;
    max-width: none;
    font-size: 0; /* the &nbsp;s between the images */
}

#gearTypePage #mainContent p:has(> img) > img {
    min-width: 0;
    flex: 0 1 auto;
}

/* the spacer <br/>s between sections */
#gearTypePage #mainContent > br {
    display: none;
}

/* a short centered line on its own ("Flanged Pulleys VS Unflanged Pulleys" on timing-pulley.php): a subheading */
#gearTypePage #mainContent p.pulleysCentered:not(:has(img)) {
    max-width: none;
    margin: 22px 0 8px;
    padding-top: 16px;
    border-top: 1px solid #e3e9f0;
    color: var(--gt-navy);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

/* tables in the article (the pitch table on timing-pulley.php) */
#gearTypePage #mainContent table {
    width: 100%;
    max-width: 640px;
    margin: 18px auto;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font: 15px/1.4 var(--gt-font);
    font-variant-numeric: tabular-nums;
}

#gearTypePage #mainContent th {
    padding: 10px 12px;
    background: var(--gt-navy);
    border: 0;
    color: #fff;
    text-align: center;
}

#gearTypePage #mainContent th label {
    color: #fff;
    font: 700 16px var(--gt-font);
}

#gearTypePage #mainContent td {
    padding: 8px 12px;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    color: var(--gt-text);
    text-align: center;
}

#gearTypePage #mainContent td + td {
    border-left: 1px solid #edf1f5;
}

#gearTypePage #mainContent tr:last-child td {
    border-bottom: 0;
}

/* column headings row */
#gearTypePage #mainContent td.pulleyTitle {
    background: #dfe6ee;
    border-bottom-color: var(--gt-border);
    color: #34414f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/*---------- standards & tolerances (tech-tools/standards-and-tolerances.php): section headings, data tables, note ----------*/
#gearTypePage #mainContent h2.gtSection {
    max-width: none;
    margin: 26px 0 10px;
    padding-top: 16px;
    border-top: 1px solid #e3e9f0;
    color: var(--gt-navy);
    font: 700 18px/1.3 var(--gt-font);
    text-align: left;
    text-shadow: none;
}

/* wide tables scroll sideways inside the card instead of widening the page */
/* a section heading at the very top of the card (pricing.php): no divider above it */
#gearTypePage #mainContent h2.gtSection.gtFirstSection {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

#gearTypePage .gtTableScroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#gearTypePage #mainContent table.gtDataTable {
    max-width: 700px;
    margin: 10px auto 18px;
}

#gearTypePage #mainContent table.gtDataTable th {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
}

/* the diametral pitch column reads as the row label */
#gearTypePage #mainContent table.gtDataTable td:first-child {
    color: var(--gt-navy);
    font-weight: 700;
}

#gearTypePage #mainContent table.gtDataTable tbody tr:nth-child(even) td {
    background: #f6f8fb;
}

#gearTypePage #mainContent table.gtBoreTable {
    max-width: 440px;
}

#gearTypePage #mainContent table.gtBoreTable td {
    text-align: left;
}

#gearTypePage #mainContent .gtNote {
    max-width: none;
    margin: 18px 0 0;
    padding: 10px 14px;
    border: 1px solid #f0c36d;
    border-left: 4px solid #e0a100;
    border-radius: 8px;
    background: #fff7e0;
    color: #4d3b00;
    font-size: 14px;
    font-weight: 600;
}

/*---------- gear terminology (tech-tools/gear-terminology.php): the database glossary as a two-column list ----------
   The database content is one <p> holding label.medyellow (term) + label.medwhite (definition) pairs, each followed by an
   &nbsp; and two <br />s. As a wrapping flex row, each term takes the left column and its definition the rest of the
   line; the <br />s are hidden and font-size:0 on the <p> makes the &nbsp; text runs zero-width. */
#gearTypePage.gtGlossary #mainContent > p {
    display: flex;
    flex-wrap: wrap;
    max-width: none;
    margin: 0;
    font-size: 0;
}

#gearTypePage.gtGlossary #mainContent > p > br {
    display: none;
}

#gearTypePage.gtGlossary #mainContent label.medyellow,
#gearTypePage.gtGlossary #mainContent label.medwhite {
    padding: 11px 0;
    border-bottom: 1px solid #edf1f5;
    font: 16px/1.5 var(--gt-font);
}

#gearTypePage.gtGlossary #mainContent label.medyellow {
    flex: 0 0 220px;
    padding-right: 16px;
    color: var(--gt-navy);
    font-weight: 700;
}

#gearTypePage.gtGlossary #mainContent label.medwhite {
    flex: 1 1 calc(100% - 220px);
    min-width: 0;
    color: var(--gt-text);
}

#gearTypePage.gtGlossary #mainContent sup {
    font-size: 11px;
    line-height: 0;
}

/*---------- company history (about-us/company-history.php): database paragraphs ----------
   The company name is wrapped in plain <label>s (one has .medyellow); the closing slogan is label.largeText.bold. */
#gearTypePage.gtHistory #mainContent > p > br:first-child {
    display: none;
}

#gearTypePage.gtHistory #mainContent p label {
    color: var(--gt-navy);
    font: inherit;
    font-weight: 700;
}

/* "Fast Customer Service!" */
#gearTypePage.gtHistory #mainContent label.largeText {
    display: block;
    margin: 4px 0 0;
    padding: 14px 16px;
    border-left: 4px solid var(--gt-red);
    border-radius: 8px;
    background: #f1f5fa;
    color: var(--gt-navy);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

/* the <br/>s before the slogan */
#gearTypePage.gtHistory #mainContent p:has(label.largeText) br {
    display: none;
}

/*---------- FAQ (about-us/frequently-asked-questions.php): the database <ol> as numbered cards ----------
   The database content is a "Top 10 Questions:" label, then an <ol> whose <li>s each hold a Q label, <br />, an A label,
   then &nbsp;s and <br />s. font-size:0 hides the loose &nbsp; text; the labels set their own size. */
#gearTypePage.gtFaq #mainContent {
    font-size: 0;
}

#gearTypePage.gtFaq #mainContent br {
    display: none;
}

/* "Top 10 Questions:" */
#gearTypePage.gtFaq #mainContent > label {
    display: block;
    margin: 0 0 12px;
    color: var(--gt-muted);
    font: 700 13px/1.3 var(--gt-font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

#gearTypePage.gtFaq #mainContent ol {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: faq;
}

#gearTypePage.gtFaq #mainContent li {
    position: relative;
    margin: 0;
    padding: 14px 16px 14px 56px;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    background: #fff;
    counter-increment: faq;
}

/* the question number: a red circle, like the RFQ step numbers */
#gearTypePage.gtFaq #mainContent li::before {
    content: counter(faq);
    position: absolute;
    top: 13px;
    left: 16px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gt-red);
    color: #fff;
    font: 700 13px/1 var(--gt-font);
}

#gearTypePage.gtFaq #mainContent li label {
    display: block;
    color: var(--gt-text);
    font: 15px/1.55 var(--gt-font);
}

/* the question */
#gearTypePage.gtFaq #mainContent li label:first-of-type {
    margin-bottom: 4px;
    color: var(--gt-navy);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

#gearTypePage.gtFaq #mainContent li a,
#gearTypePage.gtFaq #mainContent li a:visited {
    color: var(--gt-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#gearTypePage.gtFaq #mainContent li a:hover {
    color: var(--gt-red);
}

/*---------- applications & industries (about-us/applications-and-industries.php) ----------
   The database content is ul.two-column-list (one li per industry; a few hold an a.infoLink with a data-id) followed by
   .infoListItem details panels. init() in the page shows the panel for the clicked link (display:inline-block) and hides
   it on any click; style-main.css pins the panels to the bottom of the window. */
#gearTypePage .gtHint {
    margin: 12px 16px 0;
    color: var(--gt-muted);
    font-size: 13px;
}

#gearTypePage.gtIndustries .two-column-container {
    max-width: none;
    margin: 0;
}

#gearTypePage.gtIndustries ul.two-column-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#gearTypePage.gtIndustries ul.two-column-list li {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: none;
    color: var(--gt-text);
    font: 15px/1.35 var(--gt-font);
}

/* the industries with a details panel */
#gearTypePage.gtIndustries ul.two-column-list li:has(a.infoLink) {
    padding: 0;
    border-color: var(--gt-navy);
    background: #e7eef6;
}

#gearTypePage.gtIndustries #mainContent a.infoLink,
#gearTypePage.gtIndustries #mainContent a.infoLink:visited {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    align-self: stretch;
    padding: 8px 12px;
    color: var(--gt-navy);
    font-weight: 700;
    text-decoration: none;
}

#gearTypePage.gtIndustries #mainContent a.infoLink::after {
    content: "i";
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gt-navy);
    color: #fff;
    font: italic 700 13px/1 Georgia, "Times New Roman", serif;
    pointer-events: none; /* the click belongs to the link (init() reads its data-id) */
}

#gearTypePage.gtIndustries #mainContent a.infoLink:hover {
    color: var(--gt-red);
}

/* the details panels: a card along the bottom of the window instead of a full-width band */
#gearTypePage.gtIndustries .infoListItem {
    left: 50%;
    bottom: 12px;
    width: min(760px, calc(100vw - 24px));
    max-height: 60vh;
    overflow-y: auto;
    padding: 16px 18px 12px;
    border: 0;
    border-top: 4px solid var(--gt-red);
    border-radius: 12px;
    background: var(--gt-navy);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
    color: #fff;
    font: 15px/1.55 var(--gt-font);
    transform: translateX(-50%);
}

#gearTypePage.gtIndustries .infoListItem p {
    max-width: none;
    margin: 0;
    color: #fff;
    font: inherit;
}

#gearTypePage.gtIndustries .infoListItem::after {
    content: "Tap to close";
    display: block;
    margin-top: 10px;
    color: #c9d6e6;
    font-size: 12px;
    text-align: right;
}

/*---------- product list (about-us/product-list.php): the database table as cards and chip grids ----------
   The database content is one <table>: row 1 has two cells holding the Gear Types / Gear Materials and
   Gear Categories / Other Toothed Products lists (a label + a <ul> each); every later row holds material lists
   ("All Materials:" first, then many "More Materials:"). Row 1 becomes two cards; the later rows flatten into one
   "All Materials" chip grid with the repeated labels hidden. font-size:0 hides the loose &nbsp; text. */
#gearTypePage.gtProducts #mainContent table,
#gearTypePage.gtProducts #mainContent tbody {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

#gearTypePage.gtProducts #mainContent tr:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

#gearTypePage.gtProducts #mainContent tr:first-child td {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    background: #fff;
    font-size: 0;
    text-align: left; /* the article table rules above center cells */
}

/* the table body is one grid: row 1 spans it, and every material chip below flows into it as its own item
   (the later rows, their cells and their lists are display:contents), so the 18 separate lists read as one list */
#gearTypePage.gtProducts #mainContent tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px;
    text-align: left;
}

#gearTypePage.gtProducts #mainContent tr:first-child {
    grid-column: 1 / -1;
}

#gearTypePage.gtProducts #mainContent tr:not(:first-child),
#gearTypePage.gtProducts #mainContent tr:not(:first-child) td,
#gearTypePage.gtProducts #mainContent tr:not(:first-child) ul {
    display: contents;
}

#gearTypePage.gtProducts #mainContent tr:not(:first-child) td {
    font-size: 0;
}

#gearTypePage.gtProducts #mainContent td label {
    display: block;
    margin: 0 0 8px;
    color: var(--gt-muted);
    font: 700 12px/1.3 var(--gt-font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

#gearTypePage.gtProducts #mainContent tr:first-child ul + label {
    margin-top: 16px;
}

#gearTypePage.gtProducts #mainContent ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#gearTypePage.gtProducts #mainContent li {
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #e3e9f0;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--gt-text);
    font: 14px/1.3 var(--gt-font);
}

/* the materials: "All Materials" heading, then every list as one grid */
#gearTypePage.gtProducts #mainContent label#allmaterials {
    grid-column: 1 / -1;
    margin: 12px 0 4px;
    text-align: left;
    padding-top: 16px;
    border-top: 1px solid #e3e9f0;
    color: var(--gt-navy);
    font-size: 18px;
    letter-spacing: 0;
    text-transform: none;
}

#gearTypePage.gtProducts #mainContent tr:not(:first-child) label:not(#allmaterials) {
    display: none;
}

#gearTypePage.gtProducts #mainContent tr:not(:first-child) li {
    text-align: left;
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: .02em;
}

/*---------- customer list (about-us/customer-list.php): the database names flowed into columns ----------
   The database content is a one-row table whose two cells each hold a <p> of names, one per line (<br />), with a
   blank line between letters. The table is unwrapped and each <p> is laid out as newspaper columns. */
#gearTypePage.gtCustomers #mainContent table,
#gearTypePage.gtCustomers #mainContent tbody,
#gearTypePage.gtCustomers #mainContent tr {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

#gearTypePage.gtCustomers #mainContent td {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
}

#gearTypePage.gtCustomers #mainContent td + td {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e3e9f0;
}

#gearTypePage.gtCustomers #mainContent td p {
    max-width: none;
    margin: 0;
    column-width: 210px;
    column-gap: 28px;
    column-rule: 1px solid #edf1f5;
    color: var(--gt-text);
    font: 15px/1.75 var(--gt-font);
}

/*---------- privacy policy (about-us/privacy-policy.php): one database paragraph with a lock icon ----------*/
/* the whole policy is one paragraph, so no enlarged lead-in; and it is text with an icon, not an image row
   (undoes the p:has(> img) image-row rule above, which would set its font-size to 0) */
#gearTypePage.gtPolicy #mainContent > p:first-of-type,
#gearTypePage.gtPolicy #mainContent > p:has(> img) {
    display: block;
    max-width: 72ch;
    color: var(--gt-text);
    font-size: 16px;
}

#gearTypePage.gtPolicy #mainContent > p > img:first-child {
    float: left;
    display: block;
    margin: 4px 16px 8px 0;
    border-radius: 0;
}

#gearTypePage.gtPolicy #mainContent a,
#gearTypePage.gtPolicy #mainContent a:visited {
    color: var(--gt-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#gearTypePage.gtPolicy #mainContent a:hover {
    color: var(--gt-red);
}

/*---------- terms and conditions (about-us/terms-and-conditions.php) ----------
   Each numbered section is a <p> whose first line ("1. DEFINITIONS") is its title, followed by <br>s and text; some
   sections also hold bold subheadings and <ul>/<ol> lists (which close the <p>, leaving the rest of the section as
   loose text in #mainContent). */
#gearTypePage.gtTerms #mainContent {
    font-size: 15px;
    line-height: 1.65;
}

#gearTypePage.gtTerms #mainContent > p {
    max-width: none;
    margin: 0 0 14px;
    color: var(--gt-text);
    font-size: 15px;
}

/* the section title on each section's first line */
#gearTypePage.gtTerms #mainContent > p::first-line {
    color: var(--gt-navy);
    font-weight: 700;
}

/* the text after a section's lists sits directly in #mainContent, so its <br>s are real line breaks (the spacer
   rule above hides direct-child <br>s on the other pages) */
#gearTypePage.gtTerms #mainContent > br {
    display: inline;
}

/* the stray </p> after a section's lists becomes an empty <p>; it would add a second divider */
#gearTypePage.gtTerms #mainContent > p:empty {
    display: none;
}

/* a divider before each numbered section (every <p> after the "Terms and Conditions" title) */
#gearTypePage.gtTerms #mainContent > p:not(:first-of-type) {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e3e9f0;
}

/* "Terms and Conditions" */
#gearTypePage.gtTerms #mainContent > p:first-of-type {
    margin: 0 0 4px;
    color: var(--gt-navy);
    font-size: 20px;
    font-weight: 700;
}

#gearTypePage.gtTerms #mainContent b {
    color: var(--gt-navy);
}

#gearTypePage.gtTerms #mainContent ul,
#gearTypePage.gtTerms #mainContent ol {
    margin: 8px 0 12px;
    padding-left: 26px;
}

#gearTypePage.gtTerms #mainContent li {
    margin: 2px 0;
}

#gearTypePage.gtTerms #mainContent > p.gtRevised {
    color: var(--gt-muted);
    font-size: 13px;
    font-style: italic;
}

#gearTypePage.gtTerms #mainContent > p.gtRevised::first-line {
    color: var(--gt-muted);
    font-weight: 400;
}

/* "View as a PDF" */
#gearTypePage.gtTerms #mainContent a.gtPdfLink,
#gearTypePage.gtTerms #mainContent a.gtPdfLink:visited {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 6px 16px 6px 8px;
    border: 1px solid var(--gt-border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--gt-navy);
    font: 700 14px var(--gt-font);
    text-decoration: none;
}

#gearTypePage.gtTerms #mainContent a.gtPdfLink:hover {
    border-color: var(--gt-red);
    color: var(--gt-red);
}

#gearTypePage.gtTerms #mainContent a.gtPdfLink img {
    width: 28px;
    height: auto;
    margin: 0;
    border-radius: 0;
}

/*---------- machine shop services (about-us/machine-shop-services.php): the database table as one grid ----------
   The database content is a one-row table with a <ul> in each of its two cells. The row is the grid; the cells and
   lists are display:contents so every service flows into it in order. */
#gearTypePage.gtServices #mainContent table,
#gearTypePage.gtServices #mainContent tbody {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

#gearTypePage.gtServices #mainContent tr {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
}

#gearTypePage.gtServices #mainContent td,
#gearTypePage.gtServices #mainContent ul {
    display: contents;
}

#gearTypePage.gtServices #mainContent li {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--gt-text);
    font: 15px/1.35 var(--gt-font);
    list-style: none;
    text-align: left;
}

/*---------- option card pages (services/emergency-service.php, services/replacement-parts.php) ----------
   #mainContentWide holds an intro (.center) and three .horizontalPageBlock blocks (samples / CAD files / spec sheets),
   each with a title, an image column and a column of clickable .replacementPartsListDiv rows (upload / email / ship,
   handled by class in /scripts/mainFuncs2.js), then a .needAllInfo tip. style-main.css gives the blocks gradients,
   white text and 48% inline-block columns; here each block is a white card with its old color as an accent bar. */
#gearTypePage.gtOptionPage #mainContentWide {
    position: static;
    margin: 14px 16px 0;
    padding: 20px 22px 22px;
    background: #fff;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    color: var(--gt-text);
    font: 16px/1.55 var(--gt-font);
    text-align: left;
}

#gearTypePage.gtOptionPage #mainContentWide > .center {
    margin: 0 0 18px;
    text-align: left;
}

#gearTypePage.gtOptionPage #mainContentWide > .center p {
    margin: 0 0 4px;
    color: var(--gt-text);
}

/* "Let's get started." (its own <p> on the emergency page, the first line of the intro <p> on replacement parts) */
#gearTypePage.gtOptionPage #mainContentWide > .center p:first-child::first-line {
    color: var(--gt-navy);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
}

#gearTypePage.gtOptionPage #replacementPartsDiv {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: auto;
    text-align: left;
}

/* each option block: a card, title across the top, image | options below */
#gearTypePage.gtOptionPage .horizontalPageBlock.pageblockStyle {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-areas:
        "title   title"
        "image   options"
        "tip     tip";
    gap: 14px 22px;
    align-items: center;
    width: auto;
    padding: 18px 20px 16px;
    overflow: visible;
    resize: none;
    background: #f8fafc;
    border: 1px solid var(--gt-border);
    border-top: 5px solid var(--gt-navy);
    border-radius: 10px;
    color: var(--gt-text);
    text-align: left;
}

#gearTypePage.gtOptionPage #customerSamplesDiv {
    border-top-color: var(--gt-red);
}

#gearTypePage.gtOptionPage #customerModelsDiv {
    border-top-color: #707070;
}

#gearTypePage.gtOptionPage .horizontalPageBlock > div {
    display: block;
    width: auto;
    margin: 0;
    font: inherit;
}

#gearTypePage.gtOptionPage .horizontalPageBlock > .pageBlockTitle {
    grid-area: title;
    margin: 0;
    color: var(--gt-navy);
    font: 700 19px/1.3 var(--gt-font);
}

#gearTypePage.gtOptionPage .pageblockImageContainerDiv {
    grid-area: image;
    max-width: 340px;
    margin: 0;
}

#gearTypePage.gtOptionPage .pageblockImageContainerDiv img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

#gearTypePage.gtOptionPage .pageblockImageContainerDiv br {
    display: none;
}

#gearTypePage.gtOptionPage #cadModelsImageDiv img + img {
    margin-top: 8px;
}

#gearTypePage.gtOptionPage .rightColumnMiddleAlignDiv {
    grid-area: options;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

#gearTypePage.gtOptionPage .rightColumnMiddleAlignDiv > .pageBlockTitle {
    margin: 0 0 2px;
    color: var(--gt-muted);
    font: 700 12px/1.3 var(--gt-font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

#gearTypePage.gtOptionPage .clearLeft {
    display: none;
}

/* upload / email / ship: clickable rows */
#gearTypePage.gtOptionPage .replacementPartsListDiv {
    position: static;
    top: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    height: auto;
    margin: 0;
    padding: 10px 14px 10px 10px;
    border: 2px solid var(--gt-border);
    border-radius: 10px;
    background: #fff;
    color: var(--gt-text);
    font: 15px/1.45 var(--gt-font);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

#gearTypePage.gtOptionPage .replacementPartsListDiv:hover {
    border-color: var(--gt-red);
    background: #fff;
    box-shadow: 0 4px 12px rgba(204, 0, 51, .18);
    transform: translateY(-2px);
}

/* the icons are white, so they sit on a navy circle */
#gearTypePage.gtOptionPage .replacmentPartsSolutionsImages {
    float: none;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    max-width: none;
    padding: 0;
    border-radius: 50%;
    background: var(--gt-navy);
}

#gearTypePage.gtOptionPage .siteWideUploadDiv .replacmentPartsSolutionsImages {
    background: var(--gt-red);
}

#gearTypePage.gtOptionPage .replacmentPartsSolutionsImages img {
    display: block;
    width: 28px;
    height: auto;
}

#gearTypePage.gtOptionPage .replacmentPartsSolutionsText {
    margin: 0;
    padding: 0;
}

#gearTypePage.gtOptionPage .needAllInfo {
    grid-area: tip;
    margin: 0;
    padding: 8px 12px;
    border-left: 4px solid #e0a100;
    border-radius: 8px;
    background: #fff7e0;
    color: #4d3b00;
    font: 600 14px/1.45 var(--gt-font);
}

@media (max-width: 760px) {
    #gearTypePage.gtOptionPage #mainContentWide {
        margin: 12px 10px 0;
        padding: 16px;
    }

    #gearTypePage.gtOptionPage .horizontalPageBlock.pageblockStyle {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "title"
            "image"
            "options"
            "tip";
        padding: 16px 14px 14px;
    }

    #gearTypePage.gtOptionPage .pageblockImageContainerDiv {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* the Ship option's label printout: style-main.css hides .mainContentDiv when printing; hide the header too */
@media print {
    #gearTypePage.gtOptionPage #gtHeader {
        display: none !important;
    }
}

/*---------- reverse engineering (services/reverse-engineering.php): intro, option card, "How it works" steps ----------
   The option card itself uses the option card rules above (the page also has .gtOptionPage). */
#gearTypePage.gtReverse #reverseEngineerIntroDiv {
    margin: 0 0 18px;
}

#gearTypePage.gtReverse .reIntro,
#gearTypePage.gtReverse .reChoose {
    max-width: 72ch;
    margin: 0 0 12px;
    color: var(--gt-text);
}

#gearTypePage.gtReverse .reIntro {
    color: var(--gt-navy);
    font-size: 17px;
}

#gearTypePage.gtReverse .reFormats {
    display: grid;
    gap: 6px;
    max-width: 640px;
    margin: 0 0 14px;
}

#gearTypePage.gtReverse .reFormats > div {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--gt-border);
    border-radius: 8px;
    background: #f8fafc;
}

#gearTypePage.gtReverse .reFormats dt {
    display: grid;
    place-items: center;
    height: 26px;
    border-radius: 6px;
    background: var(--gt-navy);
    color: #fff;
    font: 700 13px var(--gt-font);
}

#gearTypePage.gtReverse .reFormats dd {
    margin: 0;
    font-size: 15px;
}

#gearTypePage.gtReverse #mainContentWide a,
#gearTypePage.gtReverse #mainContentWide a:visited {
    color: var(--gt-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#gearTypePage.gtReverse #mainContentWide a:hover {
    color: var(--gt-red);
}

#gearTypePage.gtReverse .reSection {
    margin: 26px 0 12px;
    padding-top: 18px;
    border-top: 1px solid #e3e9f0;
    color: var(--gt-navy);
    font: 700 20px/1.3 var(--gt-font);
    text-align: left;
    text-shadow: none;
}

/* numbered steps: 1-3 side by side on desktop, step 4 (2D drawing + 3D model) across the full width */
#gearTypePage.gtReverse .reSteps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: reStep;
}

#gearTypePage.gtReverse .reStep {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 16px 16px 16px 58px;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    background: #f8fafc;
    counter-increment: reStep;
}

#gearTypePage.gtReverse .reStep:nth-child(4) {
    grid-column: 1 / -1;
}

#gearTypePage.gtReverse .reStep > a {
    margin-top: auto;
}

#gearTypePage.gtReverse .reStep::before {
    content: counter(reStep);
    position: absolute;
    top: 14px;
    left: 16px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gt-red);
    color: #fff;
    font: 700 14px/1 var(--gt-font);
}

#gearTypePage.gtReverse .reStepText {
    margin: 0;
    color: var(--gt-text);
    font-size: 15px;
    line-height: 1.5;
}

#gearTypePage.gtReverse .reStep img,
#gearTypePage.gtReverse .rePhoto img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: auto auto 0;
    border-radius: 8px;
}

#gearTypePage.gtReverse .reFigures {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 14px 24px;
    margin-top: auto;
}

#gearTypePage.gtReverse .reFigures figure,
#gearTypePage.gtReverse .rePhoto {
    margin: 0;
    text-align: center;
}

#gearTypePage.gtReverse figcaption {
    margin-top: 6px;
    color: var(--gt-muted);
    font: 600 13px/1.45 var(--gt-font);
}

#gearTypePage.gtReverse .reNote {
    max-width: none;
    margin: 18px 0;
    padding: 10px 14px;
    border-left: 4px solid #e0a100;
    border-radius: 8px;
    background: #fff7e0;
    color: #4d3b00;
    font-size: 15px;
}

#gearTypePage.gtReverse .rePhoto {
    max-width: 560px;
    margin: 0 auto;
}

#gearTypePage.gtReverse .reQuote {
    margin: 18px 0 0;
    text-align: center;
    font-size: 16px;
}

@media (max-width: 760px) {
    #gearTypePage.gtReverse .reSteps {
        grid-template-columns: minmax(0, 1fr);
    }

    #gearTypePage.gtReverse .reStep:nth-child(4) {
        grid-column: auto;
    }

    #gearTypePage.gtReverse .reStep {
        padding: 14px 14px 14px 52px;
    }

    #gearTypePage.gtReverse .reStep::before {
        left: 14px;
    }
}

/*---------- prototypes (services/prototypes.php): scenario, discount table, rebate calculation ----------*/
#gearTypePage.gtProto #mainContent a.protoCall,
#gearTypePage.gtProto #mainContent a.protoCall:visited {
    color: var(--gt-red);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

#gearTypePage.gtProto .protoStory {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 12px;
}

#gearTypePage.gtProto .protoStep {
    padding: 14px 16px;
    border: 1px solid var(--gt-border);
    border-top: 4px solid var(--gt-navy);
    border-radius: 10px;
    background: #f8fafc;
}

#gearTypePage.gtProto .protoStep:nth-child(2) {
    border-top-color: var(--gt-red);
}

#gearTypePage.gtProto #mainContent .protoStep p {
    max-width: none;
    margin: 0;
    color: var(--gt-text);
    font-size: 15px;
    line-height: 1.55;
}

#gearTypePage.gtProto #mainContent h2.protoLabel {
    margin: 0 0 6px;
    color: var(--gt-navy);
    font: 700 13px/1.3 var(--gt-font);
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    text-shadow: none;
}

#gearTypePage.gtProto #mainContent .protoDisclaimer {
    max-width: none;
    color: var(--gt-red);
    font-size: 14px;
    font-weight: 600;
}

#gearTypePage.gtProto #mainContent table.protoQtyTable {
    max-width: 620px;
}

/* the 1000 piece row the example uses */
#gearTypePage.gtProto #mainContent table.protoQtyTable tr.protoHighlight td {
    background: #fde7ec;
    color: var(--gt-navy);
    font-weight: 700;
}

/* the rebate calculation: two cards side by side, amounts right-aligned like a worked sum */
#gearTypePage.gtProto .protoCalcs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 14px 0 18px;
}

#gearTypePage.gtProto .protoCalc {
    padding: 14px 16px;
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    background: #fff;
    font-variant-numeric: tabular-nums;
}

#gearTypePage.gtProto #mainContent h3.protoCalcTitle {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3e9f0;
    color: var(--gt-navy);
    font: 700 15px/1.3 var(--gt-font);
    text-align: left;
}

#gearTypePage.gtProto .protoRow {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    color: var(--gt-text);
    font-size: 15px;
}

#gearTypePage.gtProto .protoRow span:last-child {
    text-align: right;
    white-space: nowrap;
}

/* the line drawn under a number before its result */
#gearTypePage.gtProto .protoRow.protoRule span:last-child {
    min-width: 45%;
    padding-bottom: 4px;
    border-bottom: 2px solid #b9c5d3;
}

#gearTypePage.gtProto .protoRow.protoTotal {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f1f5fa;
    color: var(--gt-navy);
    font-weight: 700;
}

#gearTypePage.gtProto #mainContent .protoResult {
    max-width: none;
    margin: 18px 0 0;
    padding: 14px 16px;
    border-left: 4px solid var(--gt-red);
    border-radius: 8px;
    background: #f1f5fa;
    color: var(--gt-navy);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
}

@media (max-width: 760px) {
    #gearTypePage.gtProto .protoStory,
    #gearTypePage.gtProto .protoCalcs {
        grid-template-columns: minmax(0, 1fr);
    }

    #gearTypePage.gtProto #mainContent .protoResult {
        font-size: 16px;
    }
}

/*---------- production time options (services/production-time-options.php) ----------
   The database content is .centerMixedContent holding: a "*Your Production Time Options:" label, ul.noBullets (one li per
   option: "Make & ship in ..." text + a label.productionTimeLabel with .standard/.quick/.critical/.urgent/.crisis), a
   footnote <p>, a <p> with the RFQ link, a "Special services" label and a <ul> of services. The colour classes are shared
   with the site-wide banner (text colours in style-main.css), so the pill colours are scoped to this page. */
/* font-size:0 hides the loose &nbsp;s between the blocks; every block below sets its own size */
#gearTypePage.gtTimes .centerMixedContent {
    max-width: none;
    min-width: 0;
    margin: 0;
    font-size: 0;
    text-align: left;
}

#gearTypePage.gtTimes .centerMixedContent > br {
    display: none;
}

#gearTypePage.gtTimes .centerMixedContent > label {
    display: block;
    margin: 0 0 10px;
    color: var(--gt-navy);
    font: 700 18px/1.3 var(--gt-font);
}

#gearTypePage.gtTimes .centerMixedContent > label.medyellow {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e3e9f0;
}

/* the options: one row each, time on the left, coloured pill on the right */
#gearTypePage.gtTimes ul.noBullets {
    display: grid;
    gap: 8px;
    max-width: 560px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

#gearTypePage.gtTimes ul.noBullets li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 4px; /* the text already starts with three &nbsp;s */
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--gt-text);
    font: 600 16px/1.35 var(--gt-font);
}

#gearTypePage.gtTimes label.productionTimeLabel {
    flex: 0 0 auto;
    min-width: 92px;
    margin: 0;
    padding: 4px 12px;
    border-radius: 999px;
    color: #fff;
    font: 700 14px/1.3 var(--gt-font);
    text-align: center;
}

#gearTypePage.gtTimes label.productionTimeLabel.standard { background: #001839; }
#gearTypePage.gtTimes label.productionTimeLabel.quick    { background: #3e9a14; }
#gearTypePage.gtTimes label.productionTimeLabel.critical { background: #d97a00; }
#gearTypePage.gtTimes label.productionTimeLabel.urgent   { background: #e0266a; }
#gearTypePage.gtTimes label.productionTimeLabel.crisis   { background: #cc0033; }

/* footnote and the quote link */
#gearTypePage.gtTimes #mainContent .centerMixedContent > p {
    max-width: 72ch;
    margin: 0 0 14px;
    color: var(--gt-muted);
    font-size: 14px;
    font-weight: 400;
}


#gearTypePage.gtTimes #mainContent .centerMixedContent a.text90,
#gearTypePage.gtTimes #mainContent .centerMixedContent a.text90:visited {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px 8px 10px;
    border: 2px solid var(--gt-border);
    border-left: 4px solid var(--gt-red);
    border-radius: 10px;
    background: #fff;
    color: var(--gt-navy);
    font: 700 15px/1.35 var(--gt-font);
    text-decoration: none;
}

#gearTypePage.gtTimes #mainContent .centerMixedContent a.text90:hover {
    border-color: var(--gt-red);
    color: var(--gt-red);
}

#gearTypePage.gtTimes #mainContent .centerMixedContent a.text90 img {
    flex: 0 0 auto;
    width: 40px;
    height: auto;
    margin: 0;
    border-radius: 0;
}

/* special services: a grid of rows */
#gearTypePage.gtTimes .centerMixedContent > ul:not(.noBullets) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#gearTypePage.gtTimes .centerMixedContent > ul:not(.noBullets) li {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--gt-text);
    font: 15px/1.35 var(--gt-font);
}

#gearTypePage.gtTimes .centerMixedContent > ul:not(.noBullets) li a,
#gearTypePage.gtTimes .centerMixedContent > ul:not(.noBullets) li a:visited {
    color: var(--gt-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    #gearTypePage.gtTimes ul.noBullets li {
        gap: 6px;
        padding-right: 8px;
        font-size: 14px;
    }

    #gearTypePage.gtTimes label.productionTimeLabel {
        min-width: 0;
        padding: 3px 10px;
        font-size: 13px;
    }

    #gearTypePage.gtTimes .centerMixedContent > ul:not(.noBullets) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/*---------- link cards (about-us/index.php): title + one line of description, the whole card is the link ----------*/
#gearTypePage .gtLinkGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#gearTypePage .gtLinkGrid li {
    margin: 0;
    padding: 0;
}

#gearTypePage #mainContent a.gtLinkCard,
#gearTypePage #mainContent a.gtLinkCard:visited {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gt-border);
    border-left: 4px solid var(--gt-navy);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

#gearTypePage #mainContent a.gtLinkCard:hover,
#gearTypePage #mainContent a.gtLinkCard:focus-visible {
    border-color: var(--gt-red);
    box-shadow: 0 4px 12px rgba(204, 0, 51, .18);
    transform: translateY(-2px);
}

#gearTypePage .gtLinkTitle {
    color: var(--gt-navy);
    font: 700 16px/1.3 var(--gt-font);
}

#gearTypePage .gtLinkText {
    color: var(--gt-muted);
    font: 14px/1.45 var(--gt-font);
}

/*---------- gear types index (index.php): a grid of gear type cards, like the builder's gear type picker ----------*/
#gearTypePage.gtIndex {
    max-width: min(1000px, calc(100% - 32px));
}

#gearTypePage .gtGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#gearTypePage .gtGrid li {
    margin: 0;
    padding: 0;
}

#gearTypePage #mainContent a.gtTile,
#gearTypePage #mainContent a.gtTile:visited {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    min-height: 140px;
    padding: 16px 10px 14px;
    border: 2px solid var(--gt-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--gt-navy);
    font: 700 15px/1.25 var(--gt-font);
    text-align: center;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

#gearTypePage #mainContent a.gtTile:hover,
#gearTypePage #mainContent a.gtTile:focus-visible {
    border-color: var(--gt-red);
    box-shadow: 0 4px 12px rgba(204, 0, 51, .18);
    color: var(--gt-navy);
    transform: translateY(-2px);
}

#gearTypePage #mainContent a.gtTile img {
    display: block;
    width: auto;
    height: 72px;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: contain;
}

/* shown at its own size (the 72x37 spline shaft image): centered in the same 72px band as the other images */
#gearTypePage #mainContent a.gtTile img.gtNaturalSize {
    height: auto;
    margin: 17px 0 18px;
}

/* the types the custom gear builder can make: a small tag under the name */
#gearTypePage .gtTileTag {
    margin-top: -2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fde7ec;
    color: var(--gt-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

/*---------- design tools index (tech-tools/index.php) and services index (services/index.php): database tiles as cards ----------
   Each tile from the database is .techToolImages (or .servicesImages) > .gearImagesNtext holding an image link, a <br />
   and a text link, inside .descriptions (or #descriptions on the services page). The text link is stretched over the
   whole card so the card is one click target. The 50x50 icons keep their size. */
#gearTypePage.gtTools .descriptions,
#gearTypePage.gtTools #descriptions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* six tools: two even rows */
    gap: 12px;
    width: auto;
    margin: 0;
    text-align: center;
}

#gearTypePage.gtTools .descriptions > br,
#gearTypePage.gtTools .gearImagesNtext > br {
    display: none;
}

/* services: five tiles in one row on wide screens */
#gearTypePage.gtTools.gtServicesIndex #descriptions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 980px) {
    #gearTypePage.gtTools.gtServicesIndex #descriptions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

#gearTypePage.gtTools .techToolImages,
#gearTypePage.gtTools .servicesImages {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
}

#gearTypePage.gtTools .gearImagesNtext {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    min-height: 130px;
    margin: 0;
    padding: 18px 12px 16px;
    border: 2px solid var(--gt-border);
    border-radius: 10px;
    background: #fff; /* white: some icons (rfqImg.png) have a solid white background */
    text-align: center;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

#gearTypePage.gtTools .gearImagesNtext:hover,
#gearTypePage.gtTools .gearImagesNtext:focus-within {
    border-color: var(--gt-red);
    box-shadow: 0 4px 12px rgba(204, 0, 51, .18);
    transform: translateY(-2px);
}

#gearTypePage.gtTools #mainContent .gearImagesNtext img {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
}

#gearTypePage.gtTools #mainContent .gearImagesNtext a,
#gearTypePage.gtTools #mainContent .gearImagesNtext a:visited {
    color: var(--gt-navy);
    font: 700 15px/1.25 var(--gt-font);
    text-decoration: none;
}

/* the text link covers the whole card */
#gearTypePage.gtTools #mainContent .gearImagesNtext a:last-of-type::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
}

#gearTypePage.gtTools #mainContent .gearImagesNtext a:focus-visible {
    outline: none;
}

/*---------- phones ----------*/
@media (max-width: 760px) {
    #gearTypePage {
        max-width: calc(100% - 16px);
        margin-top: 8px;
    }

    #gearTypePage #gtHeader {
        padding: 12px 14px;
    }

    #gearTypePage #gtTitle {
        font-size: 19px;
    }

    #gearTypePage #gtActions .gtAction {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 44px;
    }

    #gearTypePage #mainContent {
        margin: 12px 10px 0;
        padding: 16px;
    }

    #gearTypePage #mainContent table {
        font-size: 14px;
    }

    /* two cards per row */
    #gearTypePage .gtGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #gearTypePage #mainContent a.gtTile {
        min-height: 128px;
        font-size: 14px;
    }

    #gearTypePage #mainContent a.gtTile img {
        height: 60px;
    }

    #gearTypePage #mainContent a.gtTile img.gtNaturalSize {
        height: auto;
        margin: 11px 0 12px;
    }

    #gearTypePage.gtTools .descriptions,
    #gearTypePage.gtTools #descriptions,
    #gearTypePage.gtTools.gtServicesIndex #descriptions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #gearTypePage.gtTools .gearImagesNtext {
        min-height: 120px;
    }

    #gearTypePage.gtTools #mainContent .gearImagesNtext a {
        font-size: 14px;
    }

    #gearTypePage #mainContent th,
    #gearTypePage #mainContent td {
        padding: 8px 6px;
    }

    #gearTypePage #mainContent td.pulleyTitle {
        font-size: 11px;
        letter-spacing: .02em;
    }

    #gearTypePage #mainContent table.gtDataTable th {
        font-size: 12px;
        letter-spacing: 0;
    }

    /* one line per cell; the table scrolls sideways in .gtTableScroll with the first column pinned */
    #gearTypePage #mainContent table.gtDataTable {
        width: max-content;
        min-width: 100%;
        margin: 10px 0 18px;
        overflow: visible;
    }

    #gearTypePage #mainContent table.gtDataTable th,
    #gearTypePage #mainContent table.gtDataTable td {
        padding: 8px 10px;
        white-space: nowrap;
    }

    #gearTypePage #mainContent table.gtDataTable th:first-child,
    #gearTypePage #mainContent table.gtDataTable td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        box-shadow: 2px 0 4px rgba(26, 48, 77, .12);
    }

    #gearTypePage #mainContent table.gtBoreTable th:first-child,
    #gearTypePage #mainContent table.gtBoreTable td:first-child {
        position: static;
        box-shadow: none;
    }

    #gearTypePage #mainContent table.gtBoreTable th,
    #gearTypePage #mainContent table.gtBoreTable td {
        white-space: normal;
    }

    #gearTypePage #mainContent h2.gtSection {
        font-size: 17px;
    }

    /* FAQ cards: a little less room for the number */
    #gearTypePage.gtFaq #mainContent li {
        padding: 12px 14px 12px 50px;
    }

    #gearTypePage.gtFaq #mainContent li::before {
        top: 12px;
        left: 14px;
    }

    /* product list: the two top cards stack; materials two per row */
    #gearTypePage.gtProducts #mainContent tr:first-child {
        grid-template-columns: minmax(0, 1fr);
    }

    #gearTypePage.gtProducts #mainContent tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* customer list: two columns */
    #gearTypePage.gtCustomers #mainContent td p {
        column-width: 130px;
        column-gap: 18px;
        font-size: 14px;
    }

    /* services: two per row */
    #gearTypePage.gtServices #mainContent tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #gearTypePage.gtServices #mainContent li {
        font-size: 14px;
    }

    /* industries: two per row */
    #gearTypePage.gtIndustries ul.two-column-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #gearTypePage.gtIndustries ul.two-column-list li {
        font-size: 14px;
    }

    #gearTypePage .gtHint {
        margin: 12px 12px 0;
    }

    /* link cards: one column */
    #gearTypePage .gtLinkGrid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    /* glossary: each term above its definition */
    #gearTypePage.gtGlossary #mainContent label.medyellow {
        flex-basis: 100%;
        padding: 12px 0 2px;
        border-bottom: 0;
    }

    #gearTypePage.gtGlossary #mainContent label.medwhite {
        flex-basis: 100%;
        padding: 0 0 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #gearTypePage * {
        transition: none !important;
    }
}
