/* Shared header: logo band, sister sites, social links and main menu.
   Used on every page of MineralPrices.com. */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: #000080; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 12px; }

/* logo band: faint gold pinstripes at both edges, echoing the striped map */
.brand-head { position: relative; background: #fff; overflow: hidden; }
.brand-head::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(228, 179, 56, .62) 0 2px, transparent 2px 5px);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 10%, transparent 30%, transparent 70%, #000 90%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 10%, transparent 30%, transparent 70%, #000 90%, #000 100%); }
.brand-head .wrap { position: relative; display: grid; grid-template-columns: 1fr minmax(0, 400px) 1fr; align-items: center; column-gap: 56px; padding-top: 24px; padding-bottom: 20px; }
.brand-head .logo { display: block; grid-column: 2; }
.brand-head .logo img { display: block; width: 100%; height: auto; }
.sister { grid-column: 3; justify-self: start; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: "Times New Roman", Tinos, Times, serif; font-size: 19px; }
.sister a { color: #0645ad; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sister a:hover { color: #000080; }
.social { display: flex; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.social a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #000080; color: #fff; text-decoration: none; transition: background-color .15s, color .15s; }
.social a:hover, .social a:focus-visible { background: #e4b338; color: #000080; }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* main menu */
.mainnav { position: sticky; top: 0; z-index: 40; background: #000080; border-bottom: 3px solid #e4b338; box-shadow: 0 2px 12px rgba(0, 0, 60, .12); }
.mainnav .wrap { display: flex; align-items: center; justify-content: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-list > li > a { display: block; padding: 13px 11px 12px; font-family: "Times New Roman", Tinos, Times, serif; font-size: 16.5px; color: #fff; text-decoration: none; white-space: nowrap; position: relative; }
.nav-list > li > a:hover { color: #f2cf6b; }
.nav-list > li > a[aria-current="page"] { color: #f2cf6b; }
.nav-list > li > a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 7px; height: 2px; background: #e4b338; }
.has-sub > a { padding-right: 3px !important; }
.has-sub > a[aria-current="page"]::after { right: 3px !important; }
.sub-toggle { background: none; border: 0; color: #fff; padding: 13px 8px 12px 3px; cursor: pointer; display: grid; place-items: center; }
.sub-toggle svg { width: 12px; height: 12px; transition: transform .15s; }
.has-sub.open .sub-toggle svg, .has-sub:hover .sub-toggle svg { transform: rotate(180deg); }
.sub { display: none; position: absolute; top: calc(100% + 3px); left: 0; min-width: 240px; list-style: none; margin: 0; padding: 6px 0; background: #fff; border-radius: 0 0 8px 8px; box-shadow: 0 14px 32px rgba(0, 0, 64, .18); }
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px; }
.has-sub:hover .sub, .has-sub.open .sub { display: block; }
.sub a { display: block; padding: 9px 18px; color: #000080; text-decoration: none; font-size: 15px; font-family: "Times New Roman", Tinos, Times, serif; }
.sub a:hover, .sub a:focus-visible { background: #f1f3fa; }
/* third level: each group's lists fly out to the right */
.sub { min-width: 200px; }
.sub > li.has-fly { position: static; } /* flyouts line up with the top of the menu */
.has-fly > a { display: flex !important; align-items: center; justify-content: space-between; gap: 16px; font-family: "Times New Roman", Tinos, Times, serif !important; font-size: 18px !important; padding: 10px 16px 10px 20px !important; }
.fly-caret { width: 12px; height: 12px; color: #9a7413; flex: none; }
.has-fly:hover > a, .has-fly:focus-within > a { background: #f1f3fa; }
.fly { display: none; position: absolute; left: 100%; top: 0; min-height: 100%; z-index: 2; min-width: 300px; padding: 8px; background: #fff; border-left: 3px solid #e4b338; border-radius: 0 8px 8px 8px; box-shadow: 0 16px 36px rgba(0, 0, 64, .2); }
.fly.cols-2 { display: none; width: 620px; }
.has-fly:hover > .fly.cols-2, .has-fly:focus-within > .fly.cols-2 { display: flex; gap: 10px; }
.fly-col { flex: 1; min-width: 0; }
.fly.cols-2 .fly-col + .fly-col { border-left: 1px solid #eceef2; padding-left: 10px; }
.has-fly:hover > .fly, .has-fly:focus-within > .fly { display: block; }
.fly-sub { list-style: none; margin: 0; padding: 0 0 6px; }
.fly-sub + .fly-sub { border-top: 1px solid #eceef2; padding-top: 6px; }
.fly a { display: flex !important; align-items: center; gap: 11px; padding: 7px 12px !important; border-radius: 6px; color: #000080; white-space: nowrap; font-family: "Times New Roman", Tinos, Times, serif !important; font-size: 17px !important; }
.fly a:hover, .fly a:focus-visible { background: #f1f3fa; }
.mflag { width: 24px; height: 16px; flex: none; border-radius: 2px; background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.mbadge { display: grid; place-items: center; background: #000080; color: #fff; font: 700 7px/1 Arial, sans-serif; letter-spacing: .02em; }
.mbadge.green { background: #2f7d32; } .mbadge.ca { background: #d52b1e; }
.nav-toggle { display: none; }
@media (prefers-reduced-motion: reduce) { .sub-toggle svg, .social a { transition: none; } }

@media (max-width: 1220px) {
  .mainnav .wrap { flex-direction: column; align-items: stretch; }
  .nav-toggle { display: flex; align-items: center; gap: 10px; align-self: flex-start; background: none; border: 0; color: #fff; padding: 12px 0; font-family: "Times New Roman", Tinos, Times, serif; font-size: 18px; cursor: pointer; }
  .nav-toggle svg { width: 20px; height: 20px; }
  .nav-list { display: none; flex-direction: column; padding: 0 0 12px; }
  .mainnav.open .nav-list { display: flex; }
  .nav-list > li { flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .14); }
  .nav-list > li > a { padding: 11px 0; }
  .nav-list > li > a[aria-current="page"]::after { display: none; }
  .sub-toggle { display: none; }
  .sub { display: block; position: static; flex-basis: 100%; min-width: 0; background: none; box-shadow: none; padding: 0 0 8px 16px; }
  .sub::before { display: none; }
  .sub a { color: rgba(255, 255, 255, .82); padding: 6px 0; }
  .sub a:hover { background: none; color: #f2cf6b; }
  .fly, .fly-caret { display: none !important; }
  .has-fly > a { font-size: 16px !important; padding: 6px 0 !important; font-family: "Times New Roman", Tinos, Times, serif !important; }
  .has-fly:hover > a, .has-fly:focus-within > a { background: none; }
}
@media (max-width: 860px) {
  .brand-head::before { display: none; }
  .brand-head .wrap { grid-template-columns: 1fr; justify-items: center; row-gap: 12px; padding-top: 16px; }
  .brand-head .logo { grid-column: 1; width: min(100%, 360px); }
  .sister { grid-column: 1; justify-self: center; margin-top: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 17px; }
  .social { margin: 0; flex-basis: 100%; justify-content: center; }
}

html { scroll-padding-top: 64px; }

/* footer: navy, with the gold rule and pinstripes from the header */
footer.site-foot { margin-top: 72px; padding: 0; border-top: 3px solid #e4b338; background: #000080; color: rgba(255, 255, 255, .86); font-size: 15px; position: relative; overflow: hidden; }
footer.site-foot::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(228, 179, 56, .16) 0 1px, transparent 1px 7px);
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 22%, transparent 78%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, transparent 22%, transparent 78%, #000 100%); }
footer.site-foot p { max-width: none; }
.foot-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 28px; padding-top: 34px; padding-bottom: 34px; }
.foot-col { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.foot-brand { font-family: "Times New Roman", Tinos, Times, serif; font-size: 24px; color: #f2cf6b; text-decoration: none; }
.foot-label { font-family: "Times New Roman", Tinos, Times, serif; font-size: 18px; color: #f2cf6b; }
.foot-link { font-family: "Times New Roman", Tinos, Times, serif; font-size: 18px; color: #f2cf6b; text-decoration: underline; text-decoration-color: rgba(228, 179, 56, .7); text-underline-offset: 4px; }
.foot-brand:hover, .foot-link:hover { color: #fff; }
footer.site-foot .tracker { margin: 0; min-height: 36px; opacity: 1; display: grid; place-items: center; }
footer.site-foot .tracker img { display: block; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.foot-social { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.foot-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #e4b338; color: #000080; transition: background-color .15s, transform .15s; }
.foot-social a:hover, .foot-social a:focus-visible { background: #fff; transform: translateY(-2px); }
.foot-social svg { width: 18px; height: 18px; fill: currentColor; }
.foot-base { position: relative; background: #00005e; border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0 22px; text-align: center; }
.foot-copy { margin: 0 0 6px !important; font-family: "Times New Roman", Tinos, Times, serif; font-size: 17px; color: #fff; }
.foot-note { margin: 0 auto !important; max-width: 90ch !important; font-size: 13px; color: rgba(255, 255, 255, .62); line-height: 1.5; }
footer.site-foot :focus-visible { outline-color: #f2cf6b; }
@media (prefers-reduced-motion: reduce) { .foot-social a { transition: none; } .foot-social a:hover { transform: none; } }
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  footer.site-foot::before { display: none; }
}

/* Boxed layout: the whole site sits in a 1280px column, with a soft grey
   background either side on wide screens. */
html { background: #e9ecf1; }
body { max-width: 1280px; margin: 0 auto !important; background: #fff !important; min-height: 100vh; box-shadow: 0 0 0 1px #dde2ea, 0 12px 48px rgba(0, 0, 60, .07); }
@media (min-width: 900px) { .wrap { padding-left: 40px !important; padding-right: 40px !important; } }
