/* responsive.css — mobile & tablet layout for the Altamira site.
   The chrome + repeated content patterns are class-based (site.css); the
   remaining one-off inline styles are overridden here via attribute
   selectors + !important.
   NOTE on [style*=…] matching: an element's style attribute stays in its
   AUTHORED form ("font-size:40px", no space) until some JS touches el.style,
   which re-serializes it to the BROWSER form ("font-size: 40px", colors as
   rgb()). Since the site went static (2026-07-01), only motion-touched
   elements carry the browser form — so every value-keyed selector must list
   BOTH forms (done 2026-07-02; keep new selectors dual-form).
   Loaded from every page's <head> after site.css; pairs with responsive.js. */

/* ============ INTERACTIVE CTA BUTTONS (site-wide, always on) ================
   Premium micro-interactions for the solid call-to-action buttons. Opt-in via
   class: .am-btn carries the shared mechanics (lift, soft shadow, glint sweep,
   tactile press, focus ring); a variant tints it (-fill blue / -light white /
   -ghost translucent). The exported runtime does NOT process the style-hover=""
   attributes, so before this the CTAs had no hover at all — these classes ARE
   the hover behaviour (and reinstate the intended hover colour).

   Buttons hold bare text nodes (no wrapper to z-index above an overlay), so the
   glint sweeps over the label — kept faint + fast so the text stays legible.
   Inline styles set `background`, so the hover-colour override needs !important;
   transform / box-shadow / position have no inline counterpart and don't. */
.am-btn {
  position: relative;
  overflow: hidden;                /* clip the skewed glint to the button box */
  transition: transform .28s cubic-bezier(.22,.61,.36,1),
              box-shadow .28s cubic-bezier(.22,.61,.36,1),
              background-color .2s ease, color .2s ease, border-color .2s ease;
}
.am-btn::before {                  /* the glint */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -75%;
  width: 60%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.38) 50%, transparent 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  opacity: 0;
}
.am-btn:hover::before  { animation: amBtnSheen .7s cubic-bezier(.22,.61,.36,1); }
@keyframes amBtnSheen {
  0%   { left: -75%; opacity: 0; }
  12%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}
.am-btn:hover  { transform: translateY(-2px); }
.am-btn:active { transform: translateY(0) scale(.985); transition-duration: .06s; }
.am-btn:focus-visible { outline: 2px solid #7AA0D4; outline-offset: 3px; }

/* Primary — blue solid */
.am-btn-fill:hover {
  background-color: #4d7cc0 !important;
  box-shadow: 0 10px 24px -8px rgba(58,107,176,.6), 0 3px 8px -3px rgba(11,18,30,.32);
}
.am-btn-fill:active { box-shadow: 0 4px 10px -6px rgba(58,107,176,.55); }

/* Light — white solid on a dark hero. White can't shift fill like the blue does,
   so the hover cue is: label adopts the brand blue + a higher lift + a stronger
   shadow + a wider, more visible dark glint — livelier, still premium. */
.am-btn-light::before { background: linear-gradient(100deg, transparent 0%, rgba(20,24,31,.16) 50%, transparent 100%); width: 72%; }
.am-btn-light:hover {
  background-color: #fff !important;
  color: #3A6BB0 !important;                 /* label + arrow take the brand blue */
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -10px rgba(0,0,0,.5), 0 4px 10px -4px rgba(0,0,0,.32);
}
.am-btn-light:active { transform: translateY(-1px) scale(.985); box-shadow: 0 6px 14px -8px rgba(0,0,0,.45); }

/* Ghost — translucent on a dark hero. Resting fill/border bumped up from the
   inline .08/.18 so the button shape holds against a busy photo; hover brightens
   further. Stays a secondary outline, subordinate to the solid blue primary. */
.am-btn-ghost {
  background-color: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.30) !important;
}
.am-btn-ghost:hover {
  background-color: rgba(255,255,255,.18) !important;
  border-color: rgba(255,255,255,.5) !important;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
}

/* Download arrow — nudges DOWN on hover for FLAT text download links (news-release
   "PDF ↓", the reserves file rows): nothing else moves there, so the nudge is the
   affordance. Vertical counterpart to .am-ar's rightward nudge for → links. The bare
   &darr; is wrapped in <span class="am-dl"> so only the arrow moves. */
.am-dl { display: inline-block; transition: transform .2s cubic-bezier(.22,.61,.36,1); }
a:hover .am-dl { transform: translateY(3px); }
/* On solid/ghost CTA buttons the whole button already lifts on hover, so the arrow
   rides the lift as one unit instead of sliding down against it (avoids the
   up-vs-down motion conflict). */
.am-btn:hover .am-dl { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .am-btn, .am-btn:hover, .am-btn:active { transform: none; }
  .am-btn::before { display: none; }
  a:hover .am-dl { transform: none; }
}

/* ============ SEGMENTED TOGGLE / FILTER BUTTONS (site-wide) =================
   Filing filters (ALL/ANNUAL/QUARTERLY), chart ranges (1M/3M/1Y), metric tabs
   (Revenue/EBITDA), and map view toggles (Dark/Satellite). The runtime sets each
   option's active/inactive bg+fg inline, so the INACTIVE options had no hover
   feedback. Scope the hover to the inactive options by EXCLUDING the active
   background from the (browser-normalized) inline style:
     .am-seg  = light controls on white  → active is dark  rgb(20, 24, 31) (#14181F)
     .am-segd = map toggles on imagery   → active is blue  rgb(58, 107, 176) (#3A6BB0)
   The active option is excluded, so only the inactive ones light up on hover. */
.am-seg, .am-segd { transition: background-color .15s ease, color .15s ease; }
.am-seg:not([style*="rgb(20, 24, 31)"]):hover   { background-color: #EEF2F8 !important; color: #14181F !important; }
.am-segd:not([style*="rgb(58, 107, 176)"]):hover { background-color: rgba(255,255,255,.10) !important; color: #fff !important; }

/* Grey utility links — top utility-bar ("Investor alerts", "Search") and the hero
   breadcrumb ("Home / Investors / …"): grey → white on hover (the intent the inert
   style-hover="color:#fff" never delivered). Smooth via the global `a { transition:
   color }`. !important beats the inline grey. */
.am-toplink:hover { color: #fff !important; }

/* ============ DESKTOP (≥1025px): cap the content column at 1680px ============
   Sections stay full-width so their backgrounds bleed edge-to-edge; only the
   horizontal page gutter grows on wide screens, so the content inside never
   exceeds 1680px. Below 1824px the gutter stays at the original 72px, so this
   is a no-op for typical laptops and only engages on very wide displays.

   The whole site uses a 72px horizontal page gutter, applied as the left/right
   value of a `padding` shorthand. Matching [style*="padding"][style*=" 72px"]
   selects exactly those guttered CONTENT blocks (section bands) while skipping
   the gap:72px / font-size:72px elements (no `padding`) and the absolute hero
   blocks (insets, not padding — handled below by class). The chrome (topbar,
   header, mega-menus, footer) is class-based and gets the same treatment via
   the --am-gutter custom property in site.css — keep the two in sync. Scoped
   to a min-width query so it never collides with the 20px mobile gutter set
   at ≤720px. */
@media (min-width: 1025px) {
  [style*="padding"][style*=" 72px"] {
    padding-left:  max(72px, calc((100% - 1680px) / 2)) !important;
    padding-right: max(72px, calc((100% - 1680px) / 2)) !important;
  }

  /* Home hero blocks are absolutely positioned (left/right insets, no padding),
     so align them to the same 1680px column by hand. */
  .am-home-copy  { left:  max(72px, calc((100% - 1680px) / 2)) !important; }
  .am-home-shelf {
    left:  max(72px, calc((100% - 1680px) / 2)) !important;
    right: max(72px, calc((100% - 1680px) / 2)) !important;
  }
  /* Hero top-right "[ replace · … ]" caption (home + sub-pages). */
  [style*="top: 108px"][style*="right: 72px"], [style*="top:108px"][style*="right:72px"] {
    right: max(72px, calc((100% - 1680px) / 2)) !important;
  }
}

/* ============ TABLET & PHONE (≤1024px): no horizontal overflow + nav swap ===========
   The desktop layout is designed for 1440px; below ~1024px the horizontal nav
   stops fitting and some fixed-width blocks (e.g. the 430px production chart)
   would overflow. We swap in the hamburger and keep everything within the
   viewport, but leave multi-column grids intact (they just get narrower). */
@media (max-width: 1024px) {
  html { overflow-x: hidden; }

  /* cap any fixed-width element to the viewport (only shrinks oversized ones) */
  [style*="width:"] { max-width: 100% !important; }

  /* let horizontal flex rows wrap instead of overflowing */
  [style*="display: flex"], [style*="display:flex"] { flex-wrap: wrap; }

  /* swap the horizontal nav for the hamburger (injected by responsive.js) */
  header nav { display: none !important; }

  /* Hide the sub-page side nav (the sticky <aside>) once the hamburger takes
     over: every side-nav destination is already in the hamburger's collapsible
     sections (responsive.js NAV), so the aside is pure duplication here — and at
     ≤720px it would otherwise stack as a tall block of links above the content.
     <aside> is used ONLY for this side nav (one per side-nav page), so the bare
     tag is safe. Collapse its grid — the unique `236px 1fr` two-column layout —
     to one track so the content fills the row instead of leaving an empty 236px
     gutter where the aside used to sit. */
  aside { display: none !important; }
  [style*="grid-template-columns: 236px 1fr"], [style*="grid-template-columns:236px 1fr"] { grid-template-columns: 1fr !important; }

  /* Home hero scrim. The desktop scrim is left-weighted (a 90deg gradient) because
     the copy sits in the left half over the open pit while the crew photo's bright
     sky/hi-vis fills the right. Once the nav collapses the copy spans nearly full
     width, so its right half + the subhead cross the bright crew and wash out. Drop
     the horizontal scrim and recast the full-height one as a vertical scrim across
     the whole hero, darkest through the headline/subhead band (which sits in the
     lower-middle here, above the shelf card). ≤720px refines the stops and restores
     the photo for the stacked layout (see below).
     NB: browsers normalise the inline style and drop the default "180deg" from the
     gradient, so match the full-height scrim on `inset` (the 90deg one is already
     hidden) rather than the angle. */
  .am-home-hero > div[style*="90deg"] { display: none !important; }
  .am-home-hero > div[style*="inset"]:not([style*="90deg"]) {
    background: linear-gradient(180deg, rgba(20,24,31,.72) 0%, rgba(20,24,31,.5) 20%, rgba(20,24,31,.64) 40%, rgba(20,24,31,.74) 54%, rgba(20,24,31,.7) 66%, rgba(20,24,31,.55) 100%) !important;
  }

  /* Sub-page heroes (corporate-overview, operations-overview, cobre-verde,
     sustainability, investors-overview, leadership) share the home hero's scrim
     structure — a full-bleed photo layer + a vertical (180deg) scrim + usually a
     left-weighted (90deg) one — and hit the same washout once the nav collapses
     and the copy widens: the subhead/eyebrow cross bright parts of the photo. Their
     vertical scrim is light through the text band (~.1–.2 in the upper-middle), and
     the 90deg one only darkens the left third. Apply the same fix: drop the 90deg
     scrim and darken the vertical one into a moderate full-height scrim that keeps
     the photo readable but holds the smaller copy.
       The hero is the only <section> with an <h1> (one per page), so target that and
     exclude the home hero (it has its own tuned stops above). The photo layer uses
     `background:url(...)` (no "gradient"), so it's untouched; the 90deg/inset scrim
     layers are matched on their serialized tokens (the default "180deg" is dropped
     by the browser, so we match the vertical scrim on inset+gradient, not the angle). */
  section:has(h1):not(.am-home-hero) > div[style*="90deg"] { display: none !important; }
  section:has(h1):not(.am-home-hero) > div[style*="inset"][style*="gradient"]:not([style*="90deg"]) {
    background: linear-gradient(180deg, rgba(20,24,31,.66) 0%, rgba(20,24,31,.5) 26%, rgba(20,24,31,.52) 50%, rgba(20,24,31,.6) 75%, rgba(20,24,31,.72) 100%) !important;
  }

  /* Investors hero share-price card. On desktop it's a glass panel (3% white fill)
     sitting over the dark right side of the hero, so it reads fine. Once the hero
     collapses it goes full-width over the bright photo and the near-transparent fill
     stops containing it — the price, stats and (especially) the dim mono labels float
     illegibly on the photo. Make it a real solid card, drop the decorative sparkline
     (it wraps to its own line and adds height without info here), and lift the two
     dimmest mono lines — the "Delayed …" timestamp and the "OTCQX …" footer, both
     coloured for a dark backdrop — to the standard readable grey. (Stats are kept
     2-up in the ≤720px block, which otherwise collapses every grid to one column.) */
  .am-quote-card { background: #161B22 !important; }
  .am-quote-card svg { display: none !important; }                              /* sparkline */
  .am-quote-card > div:first-child > span { color: #9aa2ac !important; }        /* "Delayed · Mar 5" */
  .am-quote-card > div:last-child > div:last-child > span { color: #9aa2ac !important; }  /* "OTCQX: ALMMF …" */

  /* Stock-info hero quote. The markup is: a flex row holding the TSX block (label +
     price + change) and the OTCQX block, plus a full-width "Delayed …" timestamp
     that wraps to its own line at the bottom (flex-basis:100%). On desktop that's
     two symbols side-by-side with the disclaimer beneath. Once the nav collapses,
     stack the row so the two symbols and the timestamp each sit on their own line —
     TSX block, then OTCQX, then the timestamp last. The price+change stay inline
     (baseline-aligned), wrapping only if very narrow. */
  .am-quote-row { flex-direction: column !important; align-items: flex-start !important; gap: 22px !important; }
  .am-quote-line { flex-wrap: wrap !important; align-items: baseline !important; column-gap: 16px !important; row-gap: 6px !important; }
  .am-quote-delayed { flex-basis: auto !important; align-self: stretch !important; }   /* own row from the column stack; stretch so its divider rule spans full width */
}

/* Hide the redundant "Investors" CTA once the bar gets tight — it's reachable
   via the "Investors" nav item anyway. (Logo is an <a> with an <svg>, excluded.) */
@media (max-width: 1200px) {
  header > a:not(:has(svg)) { display: none !important; }
}

/* ============ PHONE (≤720px): full single-column stack ============ */
@media (max-width: 720px) {
  /* stack every multi-column grid into one column */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* …except numeric stat bands (number + short label), which read far better
     as a compact 2-up grid than as one tall column of widely-spaced figures.
     Higher specificity (attr + class) so it wins over the catch-all above
     regardless of source order; a uniform gap keeps the rhythm even. */
  [style*="grid-template-columns"].am-stat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 30px 20px !important;
  }
  /* The cells carry desktop spacing baked into asymmetric padding (a wide
     right gutter and a deep bottom pad sized for a single edge-to-edge row).
     Wrapped to a 2×N grid that padding becomes lopsided inter-cell space, so
     neutralise the right/bottom and let the uniform gap do the spacing. The
     top pad stays — it sets the figure below each band's border rule. */
  [style*="grid-template-columns"].am-stat-grid > * {
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }
  /* Sustainability "Four areas of impact" pillar cards (metric + theme + blurb).
     As one tall column they read sparse — each full-width card's content fills only
     its left side. A 2-up grid is far more scannable. Unlike .am-stat-grid (borderless
     bands whose padding is zeroed), these are bordered cards, so KEEP padding — just
     trim it to give the now-narrower text room. Attr+class beats the 1fr catch-all. */
  [style*="grid-template-columns"].am-pillargrid {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }
  .am-pillargrid > div { padding: 24px 18px 26px !important; }

  /* contact.html "Who to contact" directory blocks (label / name / email / phone).
     Stacked single-column each block's content hugs the left and reads sparse. A
     2-up grid is wrong here (3 blocks → orphan, cramped emails), so instead lay each
     block out as a row: label+name on the left, email+phone right-aligned on the
     right — fills the width and halves the block height. Children flow into a shared
     2-row track so the name row lines up with the phone row. */
  .am-contactrow { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: start; }
  .am-contactrow > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .am-contactrow > :nth-child(2) { grid-column: 1; grid-row: 2; margin-bottom: 0 !important; }
  .am-contactrow > :nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .am-contactrow > :nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }

  /* contact.html "Send us a message" form: inputs are font-size:15px, which makes
     iOS Safari auto-zoom the page on focus. Bump form fields to 16px on mobile to
     stop the zoom (no viewport zoom-lock by design — accessibility). Inline 15px
     needs !important. Scoped to the form card so nothing else is touched. */
  .am-cform input, .am-cform select, .am-cform textarea { font-size: 16px !important; }
  /* Agree-checkbox row (email-alerts subscribe form): a flex row of a 20px checkbox +
     long consent text. The global [display:flex]{flex-wrap:wrap} above wraps the text
     onto its own line BELOW the checkbox. Keep it on one line so the text sits to the
     RIGHT of the box (the checkbox is flex-shrink:0; the text shrinks + wraps inside). */
  .am-checkrow { flex-wrap: nowrap !important; }
  /* The form card keeps its desktop padding:36px 38px on mobile, so ON TOP of the
     20px section gutter the fields sit ~59px in from each edge — far more inset than
     the contact rows / other sections (20px). Trim the card's own padding so the
     fields read in line with the rest of the page. */
  .am-cform { padding: 28px 20px !important; }
  /* Same fix for the "Our offices" cards below — they keep desktop padding:28px 30px,
     so their content sits ~51px in vs the form card's 41px. Trim horizontal to 20px
     so both card sections line up on mobile. */
  .am-officecard { padding: 28px 20px !important; }
  /* news.html featured-article card: image + text are a 2-col grid that stacks on
     mobile (image full-bleed on top, text below). The text column keeps its desktop
     padding:36px 40px, so the headline/body sit ~61px in while the image is at ~21px.
     Trim horizontal to 20px → text at ~41px, in line with the image edge and the
     other mobile cards. */
  .am-featbody { padding: 28px 20px !important; }
  /* news.html list items (.am-news-list): each row is a desktop 3-col grid
     date | title+body | actions, where the actions cell is a right-aligned vertical
     stack (Read / PDF). Stacked on mobile that block floats to the right, detached
     from the left-aligned date/title/body. Make it a left-aligned horizontal row so
     Read → / PDF ↓ sit together under the body like a footer, and tighten the row's
     stacked gap from the desktop 32px. */
  .am-news-list > div { gap: 16px !important; }
  .am-news-actions { flex-direction: row !important; align-items: center !important; gap: 22px !important; padding-top: 0 !important; }
  /* news.html "Never miss an announcement" CTA band: padding:64px 72px keeps its
     desktop 64px top/bottom on mobile (not in the 84–96px section reducer below), so
     the accent band reads airy. Tighten the vertical padding + the wrapped text→button
     gap. Class, not a [style*="64px 72px"] substring rule (that would also catch the
     governance/leadership "64px 72px 92px" blocks). */
  .am-newscta { padding-top: 44px !important; padding-bottom: 44px !important; }
  .am-newscta > div:last-child { gap: 28px !important; }
  /* "Go further" CTA cards (.am-cta — site-wide: corporate-overview / operations /
     leadership / cobre-verde). Sized for a 4-across desktop row: min-height ~188px +
     padding:34px 30px. Stacked 1-col on mobile the min-height forces each short card
     tall, and the arrow's margin-top:auto then leaves a big empty gap below the blurb;
     the 30px padding also over-insets the text. Drop the min-height and trim padding
     so each card hugs its content (text lands ~40px in, like the other cards). */
  .am-cta { min-height: 0 !important; padding: 24px 20px !important; }
  /* operations-overview "Development pipeline" stages (.am-phasestep, 4-col grid that
     stacks). Each description <p> has min-height:58px to line up the project cards
     ACROSS the desktop columns — stacked 1-col on mobile that's just ~38px of dead
     space between each short blurb and its card. Drop it, and trim the step's padding
     (was 30px 28px 32px → content was 49px in) so each stage condenses + aligns. */
  .am-phasestep { padding: 26px 20px 28px !important; }
  .am-phasestep p { min-height: 0 !important; }
  /* corporate-overview "From orebody to global market" value-chain steps (.am-chainstep,
     5-col grid that stacks). Each cell carries desktop padding:22px 26px 0 0 — the 26px
     right is a column gutter (no neighbour once stacked, so it just insets the copy from
     the right) and the 0 bottom means the next cell's border-top rule hugs the previous
     description instead of evenly heading the next step. Drop the right gutter and give a
     bottom so each blue rule sits evenly between steps. */
  .am-chainstep { padding: 22px 0 26px !important; }
  /* corporate-overview "Our history" timeline rows (.am-milestone, year|event 2-col grid
     that stacks). The 36px gap is a column gutter on desktop — once stacked it becomes a
     36px VERTICAL gap that orphans each year from its own event and bloats the 7-row
     timeline. Collapse it so the year reads as a tight label above its event (text already
     gets full width and wraps to 1-2 lines, so readability is unaffected). */
  .am-milestone { gap: 6px !important; }
  /* leadership.html featured CEO + Chair cards (image|text 2-col grids that stack). The
     desktop column gap is a horizontal gutter — once stacked it becomes a fat vertical
     gap between the photo and the role pill (CEO 56px; Chair 44px gap + the text block's
     own 40px top padding = ~84px). Tighten the image→text spacing. The Chair text also
     keeps desktop padding (40px top, 44px right, 0 left → lopsided under a full-bleed
     image), so give it symmetric padding instead. */
  .am-ceocard { gap: 28px !important; }
  .am-chaircard { gap: 0 !important; }
  .am-chaircard > div:last-child { padding: 28px 28px 32px !important; }
  /* leadership.html "Board of Directors" section (.am-boardsec) is itself a bordered grey
     card with padding:40px. That 40px isn't a 72px gutter, so the mobile gutter rule skips
     it — leaving its content inset ~60px (20px page gutter + 40px) while the cards above
     sit at ~43px. Trim to the card-section rhythm so its outer gutter lines up. */
  .am-boardsec { padding: 28px 20px !important; }
  /* leadership.html "Board committees" cards (.am-cmtcard, 3-up grid that stacks). Desktop
     padding:34px 32px leaves the card text inset ~53px on mobile (more than the page's
     ~41px) and reads loose. Trim to the card rhythm so content lines up + condenses. The
     section heading also keeps a desktop 50px bottom margin — tighten it on mobile. */
  .am-cmtcard { padding: 24px 20px !important; }
  .am-cmt-head { margin-bottom: 28px !important; }
  /* Committee CHAIR/MEMBERS rows are inline display:flex, so the global flex-wrap:wrap
     (line 52) catches them — a long members list (e.g. Audit's 3 names) wraps to its own
     line flush-left under the label, misaligned vs the shorter cards. Opt out of the wrap
     and let the value shrink (min-width:0) so it wraps WITHIN its column beside the label,
     matching desktop + the other committees. (Same pattern as .am-checkrow.) */
  .am-cmtrow { flex-wrap: nowrap !important; }
  .am-cmtrow > span:last-child { min-width: 0 !important; }
  /* leadership.html bio modal (.am-biomodal): a 320px|1fr grid. The global grid rule stacks
     it to one column on mobile, so the two columns become rows — but the rows aren't height-
     constrained, so the content row grows past the box's max-height:84vh and overflow:hidden
     CLIPS the bio (the content div's own overflow-y:auto can't fire because its row is sized
     to its content, not the box). Pin the image row to a shorter height and give the content
     row 1fr + min-height:0 so it scrolls within the modal. Trim the desktop 46px 48px content
     padding and the overlay's 40px inset for a phone. */
  .am-biomodal { grid-template-rows: auto 1fr !important; max-height: 88vh !important; }
  .am-biomodal > div:first-child { min-height: 220px !important; }
  .am-biomodal > div:last-child { min-height: 0 !important; padding: 28px 22px !important; }
  .am-biooverlay { padding: 16px !important; }
  /* Fixed-width sidebar cards (inline width:NNNpx; flex-shrink:0) sitting in a flex
     row next to intro text. When that row wraps on mobile the card keeps its fixed
     width and leaves dead space to its right at viewports wider than that width.
     Make them fill the column. Used on: operations-overview "2025 production" (430px)
     and reserves-and-resources "Basis of estimate" (404px). */
  .am-prodcard { width: 100% !important; flex-shrink: 1 !important; }
  /* operations-overview flagship asset card (.am-flagcard, 2-col info|stats that
     stacks). Condense on mobile: trim both halves' padding (was 34px 38px → content
     49px in + a fat gap where they meet), and keep the 3 stats as a single 3-up row
     (each asset has exactly 3) instead of the .am-stat-grid 2-up that orphans the 3rd. */
  .am-flagcard > div { padding: 24px 20px !important; }
  [style*="grid-template-columns"].am-stat3up { grid-template-columns: 1fr 1fr 1fr !important; gap: 0 10px !important; }
  /* shrink the stat value 24px→20px so the longest one ("40,000 m", Altar Norte) fits
     a 3-up column at 375px (24px needs ~106px, the column is ~90px). */
  .am-stat3up > div > div:first-child { font-size: 20px !important; }
  /* operations-overview flagship FEATURE card (light, .am-featbody): its 3 stats are a
     display:flex; gap:40px row that the global flex-wrap drops to 2+1 on a narrow phone.
     Switch to a 3-up grid to match the dark flagship card above. Values here are always
     Cobre Verde's (short), so no font shrink needed; column-gap keeps them readable. */
  .am-featstats { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0 12px !important; }
  /* reserves-and-resources "More than copper." commodity cells: padding:34px 32px is
     airy stacked on mobile and over-insets the content (~53px in). Trim to condense
     + bring content to ~41px. On the now-wide stacked card also put the metal name
     to the LEFT of the value (was label-stacked-over-value): grid row1 = name | value
     (value right), row2 = note spanning full width. */
  .am-commcell { padding: 22px 20px !important; display: grid !important; grid-template-columns: 1fr auto !important; align-items: center !important; column-gap: 16px !important; }
  .am-commcell > :first-child { margin-bottom: 0 !important; }                 /* metal name */
  .am-commcell > :nth-child(2) { justify-self: end !important; }               /* value, right */
  .am-commcell > :last-child { grid-column: 1 / -1 !important; }               /* note, full width */
  /* Investors quote card: its 6-metric grid is the same "number + short label"
     shape, so keep it 2-up too instead of letting the catch-all stack it into a
     long single column. (Scoped to the card; higher specificity wins.) */
  .am-quote-card div[style*="grid-template-columns"] { grid-template-columns: 1fr 1fr !important; }

  /* shrink the 72px side gutters → 20px (padding serializes as "<v>px 72px").
     Require [style*="padding"] like the desktop gutter rule above, so this
     matches real guttered blocks only and skips gap:72px / font-size:72px
     elements — otherwise a flex/grid row with gap:72px wrongly gets 20px of
     side padding and its children sit indented from the page gutter. */
  [style*="padding"][style*=" 72px"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* Reduce oversized section padding on mobile. The gutter rule above only
     swaps the horizontal 72px → 20px; the vertical padding (84–96px sections)
     is sized for desktop and leaves big empty gaps on a phone. Pull the large
     ones down to the design's own compact rhythm (56px). Matches the serialized
     "padding: <top>px 72px" shorthand, so it only hits full-width guttered
     sections, not cards. Left/right stays owned by the gutter rule; these own
     top/bottom (no conflict).
     NB: the 150px sub-page hero copy blocks are deliberately NOT touched — that
     top pad is clearance for the absolute header + "[ replace … ]" caption, so
     trimming it pulls the breadcrumb/eyebrow up underneath the caption. */
  [style*="padding: 84px 72px"], [style*="padding: 88px 72px"],
  [style*="padding: 90px 72px"], [style*="padding: 92px 72px"],
  [style*="padding: 96px 72px"],
  [style*="padding:84px 72px"], [style*="padding:88px 72px"], [style*="padding:90px 72px"], [style*="padding:92px 72px"], [style*="padding:96px 72px"] {
    padding-top: 56px !important; padding-bottom: 56px !important;
  }
  /* Those hero blocks keep their 150px top (clearance) but their desktop-sized
     bottom pad (84–92px) is too airy on a phone and stacks with the next
     section's own top padding. Trim ONLY the bottom to the 56px rhythm; the
     0-bottom heroes (a stat strip butts them) aren't matched, so untouched. */
  [style*="padding: 150px 72px 84px"], [style*="padding: 150px 72px 92px"],
  [style*="padding:150px 72px 84px"], [style*="padding:150px 72px 92px"] {
    padding-bottom: 56px !important;
  }
  /* Sidebar-layout content wrapper (leadership.html + governance.html): padding:64px 72px
     92px. The gutter rule swaps L/R 72px→20px, but the 3-value shorthand misses the
     vertical reducer above, so its 64px top + 92px bottom survive on mobile. The 92px
     bottom stacks with the last section's own padding (leadership: +56px = ~148px of dead
     white before the CTA band). Trim top/bottom to the mobile rhythm. */
  [style*="padding: 64px 72px 92px"], [style*="padding:64px 72px 92px"] {
    padding-top: 40px !important; padding-bottom: 32px !important;
  }
  /* IR sub-page content wrappers (news, analyst-coverage, email-alerts, stock-information,
     reports-and-filings, events-and-presentations): padding:56px 72px 88px. Same trap —
     the 88px bottom survives on mobile and leaves a ~88px dead band before the dark CTA
     band. Top 56px already matches the rhythm; just trim the bottom. */
  [style*="padding: 56px 72px 88px"], [style*="padding:56px 72px 88px"] { padding-bottom: 48px !important; }
  /* index.html "Operations" section: padding:24px 72px 96px. The vertical reducer keys on
     a leading "<v>px 72px" of 84-96, but this one leads with 24px, so the 96px bottom
     escapes — ~152px of dead white (96 + next band's 56 top) before "Performance, by the
     numbers". Bring the bottom to the 56px section rhythm. */
  [style*="padding: 24px 72px 96px"], [style*="padding:24px 72px 96px"] { padding-bottom: 56px !important; }
  /* IR sub-page hero content blocks (analyst-coverage, email-alerts, reports-and-filings,
     events-and-presentations): padding:56px 72px 64px. Bottom is only ~8px over the 56px
     rhythm — nudge it down so the hero copy sits on the same rhythm as everything else. */
  [style*="padding: 56px 72px 64px"], [style*="padding:56px 72px 64px"] { padding-bottom: 56px !important; }

  /* Restore bottom breathing room under the dark hero stat bands. Their cells'
     bottom padding (which doubled as the band's bottom space on desktop) is
     zeroed for even 2-up row rhythm, and their wrapper adds none — so the band
     would otherwise sit flush against the section's bottom edge. The .16 white
     top-rule is unique to these four hero bands; the other stat grids live in
     sections that already provide their own bottom padding. */
  [style*="grid-template-columns"].am-stat-grid[style*="rgba(255, 255, 255, 0.16)"] {
    padding-bottom: 44px !important;
  }

  /* Data tables (reserves-by-asset etc.): multi-column fr grids that the
     catch-all 1fr above collapses into a label-less vertical stack of numbers.
     Re-cast each row as a card: hide the shared header row and pair every value
     with its column name (carried on the cell as data-label, drawn with
     ::before). Used on operations-overview, reserves-and-resources, cobre-verde. */
  .am-dhead { display: none !important; }
  .am-drow {
    display: block !important;          /* row → stacked card (beats the inline grid) */
    padding: 18px 20px !important;
  }
  .am-drow > span { display: block; }   /* name + stage stack instead of sitting inline */
  .am-drow > span.am-row11 { display: flex; }   /* …except the name+stage-chip flex row, which kept its inline flex before the class conversion */
  .am-drow > span:first-child { font-size: 17px !important; }   /* asset / category = card title */
  .am-drow > span[data-label] {         /* numeric cell → "LABEL …… value" line */
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid #EDF0F3;
    text-align: left !important;
  }
  .am-drow > span[data-label]::before {
    content: attr(data-label);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    font-weight: 400; color: #8a929c; white-space: nowrap;
  }
  /* gap between the name/stage identity block and the first value row */
  .am-drow > span:not([data-label]) + span[data-label] { margin-top: 14px; }

  /* Tighten the hero intro → stat-strip gap on mobile. The four dark hero
     strips carry a 54–64px top margin (sized for desktop) that becomes the
     airiest gap in the hero on a phone; pull them to a tidier 40px. Those
     exact values (54/56px appear once each; 64px twice) belong only to these
     hero strips site-wide, so matching the values hits exactly them. */
  [style*="margin-top: 54px"], [style*="margin-top: 56px"],
  [style*="margin-top: 64px"],
  [style*="margin-top:54px"], [style*="margin-top:56px"], [style*="margin-top:64px"] { margin-top: 40px !important; }

  /* Top utility bar: a fixed 42px-tall flex row of two stock quotes + links.
     On phones it wraps and gets clipped by its own fixed height. Collapse it
     to one tidy line — keep the primary TSX quote (with its live pulse dot),
     drop the secondary OTCQX quote and the divider, and hide the links (both
     reachable from the menu). Height goes auto so nothing clips. The bar is
     class-based chrome now (.am-topbar, site.css). */
  .am-topbar,
  .am-topbar * { flex-wrap: nowrap !important; }
  .am-topbar {
    height: auto !important; padding-top: 11px !important; padding-bottom: 11px !important;
  }
  .am-topbar > div:last-child { display: none !important; }            /* Investor alerts / Search */
  .am-topbar > div:first-child > span:nth-child(n+2) { display: none !important; }  /* divider + OTCQX quote */

  /* scale down oversized headings (browser form: "font-size: NNpx") */
  [style*="font-size: 78px"], [style*="font-size: 72px"], [style*="font-size: 62px"],
  [style*="font-size: 60px"], [style*="font-size: 58px"], [style*="font-size: 56px"],
  [style*="font-size: 52px"],
  [style*="font-size:78px"], [style*="font-size:72px"], [style*="font-size:62px"], [style*="font-size:60px"], [style*="font-size:58px"], [style*="font-size:56px"], [style*="font-size:52px"] { font-size: 33px !important; line-height: 1.08 !important; }
  [style*="font-size: 46px"], [style*="font-size: 42px"], [style*="font-size: 40px"],
  [style*="font-size: 38px"],
  [style*="font-size:46px"], [style*="font-size:42px"], [style*="font-size:40px"], [style*="font-size:38px"] { font-size: 28px !important; line-height: 1.12 !important; }
  [style*="font-size: 36px"], [style*="font-size: 34px"], [style*="font-size: 32px"],
  [style*="font-size: 30px"],
  [style*="font-size:36px"], [style*="font-size:34px"], [style*="font-size:32px"], [style*="font-size:30px"] { font-size: 23px !important; line-height: 1.2 !important; }

  /* The hamburger is position:fixed in the top-right, so it floats over the
     page and any heading scrolled through its band (top:50px, ~46px wide at
     right:18px) would read as clipped text. Reserve a right gutter on the big
     section headings so their text always stops short of the button's column.
     ~48px = button width + a small gap, measured in from the page edge; this
     is constant for every ≤720px width because the button is right-anchored. */
  h1, h2 { padding-right: 48px !important; }

  /* Operations dual asset-map (Sonora | divider | Atacama). On desktop it's a
     fixed-height flex row of both maps; on a phone the two panes would squish to
     unusable slivers, so we show ONE map at a time — the region of the selected
     asset. The map row carries .am-zone-s / .am-zone-a (bound from activeOp), so
     we hide the inactive pane and the "~7,400 km" divider, and give the visible
     pane the full width. Switching asset reveals the other map (the component
     calls invalidateSize + recenters on the change). */
  .am-maprow { flex-direction: column !important; height: auto !important; }
  .am-mappane {
    flex: none !important; width: 100% !important; height: 360px !important;
    border-right: none !important;
  }
  .am-mapdiv { display: none !important; }                 /* no divider in single-map mode */
  .am-zone-s .am-pane-a, .am-zone-a .am-pane-s { display: none !important; }
  .am-mapswitch-hint { display: flex !important; }         /* the mobile "switch projects" cue */

  /* Mobile: lift the asset selector to the TOP of the map module (pick a project,
     then see its map + details below), and condense it to a compact 2-up grid —
     smaller name, the region line dropped (region shows on the map + detail). The
     module becomes a flex column purely so `order` can float the strip up top. */
  .am-mapmodule { display: flex !important; flex-direction: column; }
  .am-assetstrip { order: -1 !important; border-top: none !important; }
  .am-maprow { border-top: 1px solid rgba(255,255,255,.14); }   /* divider under the moved selector */
  [style*="grid-template-columns"].am-assetstrip { grid-template-columns: 1fr 1fr !important; }
  .am-asset-tab { padding: 13px 16px !important; border-left: 1px solid rgba(255,255,255,.1) !important; }
  .am-asset-tab:nth-child(2n+1) { border-left: none !important; }              /* left column */
  .am-asset-tab:nth-child(n+3)  { border-top: 1px solid rgba(255,255,255,.1); } /* second row */
  .am-asset-status { margin-bottom: 5px !important; }
  .am-asset-name   { font-size: 15px !important; }
  .am-asset-region { display: none !important; }

  /* Homepage "Latest news": a 4-up grid where the first card is flush-left and
     the rest carry a vertical border-left + left padding (column dividers). The
     catch-all stacks them to one column, so those dividers/indents leave the
     cards misaligned (first flush, the rest indented with a stray rule), and the
     238px min-height forces big empty gaps. Realign every card to the gutter,
     drop the min-height, and turn the column dividers into horizontal rules. */
  .am-newscard {
    min-height: 0 !important;
    padding: 28px 0 !important;
    border-left: none !important;
  }
  .am-newscard:not(:first-child) { border-top: 1px solid #DDE2E7; }

  /* Footer: the four link columns (16 links) stack into one very long list on a
     phone — and every destination is already reachable from the hamburger menu.
     Drop them, leaving just the brand block (the first cell of the footer's link
     grid), the newsletter signup above it and the legal bar below. */
  footer .am-footgrid > :not(:first-child) { display: none !important; }

  /* Footer newsletter block ("Stay close to the story") — it's the first child of
     every <footer>. Desktop padding 54–56px 0 + a 40px wrap-gap leave it airy on a
     phone, and the email input keeps a fixed width:280px so it doesn't fill the
     column. Tighten the padding/gap and let the input + its wrapper go full-width
     (the Subscribe button wraps below at its own width). */
  footer > div:first-child { padding-top: 36px !important; padding-bottom: 36px !important; gap: 24px !important; }
  footer > div:first-child > div:last-child { width: 100% !important; }
  footer > div:first-child input { width: 100% !important; }

  /* home hero: let its absolutely-positioned blocks flow instead of overlapping */
  .am-home-hero { height: auto !important; }
  .am-home-copy, .am-home-shelf {
    position: relative !important;   /* in-flow, but keeps z-index above the hero gradients */
    left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
    max-width: none !important;
  }
  .am-home-copy { padding: 128px 20px 8px !important; }
  .am-home-shelf { margin: 26px 20px 0 !important; }
  .am-home-cap { display: none !important; }

  /* The shelf is a 3-column card: the first item has a full-height blue LEFT
     accent bar, items 2–3 are split by border-left, and the CTAs are pushed to
     the bottom (margin-top:auto) to align across equal columns. Stacked on a
     phone that becomes a lone vertical bar, invisible dividers and airy boxes.
     Re-cast as clean stacked rows — horizontal dividers, the featured accent
     moved to a top bar, CTAs back in normal flow, tighter padding. */
  .am-home-shelf > a { border-left: none !important; padding: 16px 24px !important; }
  .am-home-shelf > a:last-child { padding-bottom: 10px !important; }   /* card ends closer to the last CTA */
  .am-home-shelf > a:not(:first-child) { border-top: 1px solid #E4E8EC; }
  .am-home-shelf > a > div:nth-of-type(2) { display: none !important; }   /* drop the description line — compact */
  .am-home-shelf > a > div:last-child { margin-top: 10px !important; }   /* CTA: stop bottom-aligning */
  .am-home-shelf > a:first-child > span[style*="position: absolute"], .am-home-shelf > a:first-child > span[style*="position:absolute"] {   /* featured accent → top bar */
    top: 0 !important; right: 0 !important; bottom: auto !important;
    width: auto !important; height: 3px !important;
  }

  /* Home hero — phone refinements on top of the shared ≤1024px scrim treatment.
     The ≤720px "emerge onto white" trick used to wipe the photo entirely
     (background:transparent is a shorthand, so it killed the inline image too),
     leaving washed-out text on a grey gradient blob. Instead give the stacked
     layout its own self-contained dark photographic hero: restore the image with
     a crop that keeps the crew in frame, and re-tune the vertical scrim — here the
     copy stacks from the TOP (not the lower-middle), so it needs a darker top and
     a different ramp than the tablet stops set above. The white shelf card then
     overlaps the bottom of the dark hero — cleaner than straddling the white fold.
     (The 90deg horizontal scrim is already hidden by the ≤1024px block.) */
  .am-home-hero {
    background-color: #14181F !important;
    background-image: url('images/home-hero-copper.avif') !important;
    background-size: cover !important;
    background-position: 68% center !important;
  }
  .am-home-hero > div[style*="inset"]:not([style*="90deg"]) {
    background: linear-gradient(180deg, rgba(20,24,31,.84) 0%, rgba(20,24,31,.64) 24%, rgba(20,24,31,.62) 46%, rgba(20,24,31,.66) 64%, rgba(20,24,31,.55) 100%) !important;
  }
  .am-home-hero + section { padding-top: 32px !important; }           /* card → "Who we are" */

  /* Corporate pillars: the big number stacks ABOVE the title on desktop; on a
     phone it reads better with the number to the LEFT (description wrapping
     under the title). 2-col grid: number | title / description. */
  .am-pillar { display: grid !important; grid-template-columns: auto 1fr; column-gap: 16px; align-items: baseline; }
  .am-pillar > div { grid-area: 1 / 1; }                            /* the number */
  .am-pillar > h3  { grid-area: 1 / 2; margin: 0 0 8px !important; }
  .am-pillar > p   { grid-area: 2 / 2; }
}
