:root {
  --order-blue: #193957;
  --order-red: #681323;
  --order-gold: #c9a54b;
  --order-cream: #fff8e8;
}

/* A restrained heraldic layer shared by the Orders pages. */
.hero {
  isolation: isolate;
  min-height: 235px;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 15% 50%, rgba(201,165,75,.17), transparent 34%),
    linear-gradient(125deg, #fffaf0, #ead9b5);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: var(--hero-art);
  background-repeat: no-repeat;
  background-position: var(--hero-art-position, calc(100% - clamp(18px, 6vw, 90px)) 48%);
  background-size: var(--hero-art-size, auto min(88%, 310px));
  opacity: var(--hero-art-opacity, .13);
  filter: saturate(.72) contrast(1.05);
  pointer-events: none;
}

.hero::after {
  z-index: 0;
}

.hero-inner {
  z-index: 2;
  width: 100%;
  padding-top: 34px;
  padding-bottom: 30px;
}

.hero h1 {
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
}

.kicker {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(104,19,35,.2);
  border-radius: 999px;
  background: rgba(255,250,240,.58);
}

.institution {
  text-wrap: balance;
}

.order-nav {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
  gap: 8px;
}

.order-nav a {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 3px 9px rgba(62,38,22,.08);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.order-nav a:hover,
.order-nav a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 7px 15px rgba(62,38,22,.18);
}

.page-shell {
  max-width: 1180px;
  margin-top: 34px;
}

.legacy-content {
  position: relative;
  padding: clamp(25px, 5vw, 58px);
  background:
    linear-gradient(rgba(255,250,240,.975), rgba(255,250,240,.975)),
    radial-gradient(circle at 100% 0, rgba(201,165,75,.28), transparent 36%);
  border-top-width: 7px;
  box-shadow: 0 18px 46px rgba(42,18,16,.24);
}

.legacy-content::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(183,151,76,.25);
  border-radius: 5px;
  pointer-events: none;
}

.legacy-content > * {
  position: relative;
  z-index: 1;
}

.legacy-content p,
.legacy-content div[align="justify"],
.legacy-content p[align="justify"] {
  max-width: 850px;
}

.legacy-content h1,
.legacy-content h2,
.legacy-content h3 {
  text-wrap: balance;
}

.legacy-content h1:not(:first-child),
.legacy-content h2 {
  width: min(100%, 940px);
  margin: 34px auto 20px !important;
  padding: 12px 18px 11px !important;
  color: var(--order-cream) !important;
  background: linear-gradient(112deg, var(--wine-dark), var(--wine)) !important;
  border: 1px solid #8e3947 !important;
  border-bottom: 4px solid var(--order-gold) !important;
  border-radius: 7px;
  box-shadow: 0 7px 18px rgba(55,7,15,.17);
  font-size: clamp(20px, 2.8vw, 28px) !important;
  text-align: center !important;
}

.legacy-content h1:not(:first-child) a,
.legacy-content h2 a,
.legacy-content h1:not(:first-child) b,
.legacy-content h2 b,
.legacy-content h1:not(:first-child) strong,
.legacy-content h2 strong {
  color: var(--order-cream) !important;
}

.legacy-content h2 small,
.legacy-content h2 span,
.legacy-content h2 font,
.legacy-content h1:not(:first-child) small,
.legacy-content h1:not(:first-child) span,
.legacy-content h1:not(:first-child) font {
  color: inherit !important;
  font-size: inherit !important;
}

.legacy-content h3 {
  width: min(100%, 850px);
  margin: 27px auto 12px;
  padding-bottom: 7px;
  color: var(--order-blue) !important;
  border-bottom: 2px solid rgba(201,165,75,.7);
  text-align: center;
}

/* Legacy pages often expressed subheads and rank summaries as centred bold
   paragraphs. Present those as quiet information plaques without changing text. */
.legacy-content p[align="center"]:has(> b):not(:has(img)),
.legacy-content p[align="center"]:has(> strong):not(:has(img)) {
  width: min(100%, 850px);
  margin: 22px auto !important;
  padding: 12px 17px;
  background: linear-gradient(145deg, rgba(255,253,247,.96), rgba(241,227,199,.72));
  border: 1px solid rgba(190,158,86,.55);
  border-left: 5px solid var(--order-red);
  border-radius: 7px;
  box-shadow: 0 5px 14px rgba(62,38,22,.08);
  text-align: center;
}

.legacy-content p[align="center"]:has(img) {
  width: fit-content;
  max-width: min(100%, 920px);
  margin: 18px auto !important;
  padding: 13px 15px 11px;
  background: rgba(255,253,247,.72);
  border: 1px solid rgba(190,158,86,.35);
  border-radius: 8px;
  box-shadow: 0 6px 17px rgba(62,38,22,.08);
}

.legacy-content hr {
  width: min(86%, 700px);
  height: 7px;
  margin: 31px auto;
  border: 0;
  background:
    radial-gradient(circle, var(--order-gold) 0 3px, transparent 3.5px) center/12px 7px no-repeat,
    linear-gradient(90deg, transparent, #c7b27d 22%, #c7b27d 78%, transparent) center/100% 1px no-repeat;
}

.legacy-content img {
  border-radius: 5px;
  filter: drop-shadow(0 7px 8px rgba(45,25,16,.14));
}

.legacy-content p > img,
.legacy-content center > img,
.legacy-content div[style*="text-align: center"] > img {
  margin: 13px 9px 5px !important;
}

.legacy-content small,
.legacy-content [style*="font-style: italic"] {
  color: #685843 !important;
  line-height: 1.45;
}

.legacy-content a {
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(114,21,40,.45);
  transition: color .16s ease, text-decoration-color .16s ease;
}

.legacy-content a:hover {
  color: #9b1c34;
  text-decoration-color: currentColor;
}

.legacy-content p[align="center"] > a:only-child,
.legacy-content div[style*="text-align: center"] > a:only-child {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin: 6px;
  padding: 9px 17px;
  color: var(--order-blue) !important;
  background: linear-gradient(145deg, #fffdf7, #f1e3c7);
  border: 1px solid #c8af72;
  border-left: 5px solid var(--order-red);
  border-radius: 7px;
  box-shadow: 0 5px 13px rgba(62,38,22,.1);
  font: 700 14px/1.3 Arial, sans-serif;
  text-decoration: none;
}

.legacy-content p[align="center"] > a:only-child:hover,
.legacy-content div[style*="text-align: center"] > a:only-child:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--order-red), var(--wine-dark));
}

/* Give the directory entrance a composed editorial layout. */
.order-index .legacy-content > table > tbody > tr {
  display: grid;
  grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
}

.order-index .legacy-content > table > tbody > tr > td {
  width: auto !important;
}

.order-index .legacy-content > table > tbody > tr > td:first-child img {
  display: block;
  width: min(100%, 390px) !important;
  height: auto !important;
  margin: auto;
}

.order-index .legacy-content > table > tbody > tr > td:last-child {
  padding: clamp(18px, 3vw, 34px) !important;
  background: rgba(245,232,203,.5) !important;
  border: 1px solid rgba(183,151,76,.42);
  border-radius: 9px;
}

.orders-home .orders-directory {
  max-width: 1020px !important;
  margin: 34px auto 0 !important;
  padding: 18px;
  border: 1px solid rgba(183,151,76,.42);
  border-radius: 9px;
  background: rgba(245,232,203,.38);
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 12px;
}

.orders-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 13px 16px;
  color: var(--order-blue) !important;
  background: linear-gradient(145deg, #fffdf7, #eddbb6);
  border: 1px solid #c5a965;
  border-left: 5px solid var(--order-red);
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(62,38,22,.11);
  font: 700 14px/1.35 Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}

.orders-home .orders-grid a {
  min-height: 78px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.orders-home .orders-grid a:hover,
.orders-home .orders-grid a:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(55,7,15,.2);
}

/* Editorial card system for the historic Order pages. */
.order-layout-table,
.order-layout-table > tbody,
.order-layout-table > tbody > tr {
  display: block !important;
  width: 100% !important;
}

.order-legacy-aside {
  display: none !important;
}

.order-main-cell {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 25px);
  width: 100% !important;
  padding: 0 !important;
  text-align: left !important;
}

.order-card-stream {
  display: contents !important;
}

.order-card,
.order-action-row,
.order-section-bar {
  grid-column: 1 / -1;
  margin: 0 !important;
}

.order-card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 32px) !important;
  background: linear-gradient(145deg, rgba(255,254,250,.98), rgba(244,233,208,.78));
  border: 1px solid rgba(183,151,76,.47);
  border-radius: 11px;
  box-shadow: 0 10px 25px rgba(54,29,18,.11);
}

.order-prose-card {
  font-size: 1.02rem;
}

.order-info-card {
  grid-column: span 6;
  display: grid;
  place-items: center;
  min-height: 130px;
  text-align: center !important;
  border-top: 5px solid var(--order-gold);
}

.order-media-card {
  grid-column: span 6;
  text-align: center !important;
}

.order-media-card > img,
.order-media-card p > img,
.order-media-card div > img {
  max-height: 520px;
}

.order-gallery-card,
.order-feature-card {
  grid-column: 1 / -1;
}

.order-gallery-card img {
  width: auto !important;
  max-width: min(46%, 440px) !important;
  height: auto !important;
  vertical-align: middle;
}

.order-feature-card {
  display: flow-root;
}

.order-feature-card img:first-of-type {
  float: left;
  width: min(42%, 390px) !important;
  height: auto !important;
  margin: 0 clamp(20px, 3vw, 34px) 15px 0 !important;
}

.order-section-bar {
  padding: 14px 20px !important;
  color: var(--order-cream) !important;
  background: linear-gradient(112deg, #183653, #681323) !important;
  border: 1px solid #9d6d55;
  border-bottom: 5px solid var(--order-gold);
  border-radius: 9px;
  box-shadow: 0 9px 22px rgba(55,7,15,.19);
  font-size: clamp(20px, 3vw, 29px) !important;
  font-weight: 700;
  line-height: 1.22;
  text-align: center !important;
  text-wrap: balance;
}

.order-section-bar *,
.order-section-bar a,
.order-section-bar font,
.order-section-bar span,
.order-section-bar small {
  color: var(--order-cream) !important;
}

.order-action-row {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px !important;
  text-align: center !important;
}

.order-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  color: var(--order-blue) !important;
  background: linear-gradient(145deg, #fffdf7, #eddbb6);
  border: 1px solid #c5a965;
  border-left: 5px solid var(--order-red);
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(62,38,22,.11);
  font: 700 14px/1.3 Arial, sans-serif;
  text-align: center;
  text-decoration: none !important;
  transition: transform .18s ease, color .18s ease, background .18s ease;
}

.order-button:hover,
.order-button:focus-visible {
  color: #fff !important;
  background: linear-gradient(135deg, var(--order-red), var(--wine-dark));
  transform: translateY(-2px);
}

/* Bespoke entrances for the two Orders landing pages. */
.orders-intro-card,
.orders-landing-card {
  display: grid;
  grid-template-columns: minmax(220px, .78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: clamp(24px, 5vw, 55px);
  background: linear-gradient(145deg, rgba(255,254,250,.98), rgba(240,223,189,.88));
  border: 1px solid rgba(183,151,76,.55);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(54,29,18,.13);
}

.orders-intro-card .intro-art img,
.orders-landing-card .landing-emblem img {
  display: block;
  width: min(100%, 340px) !important;
  height: auto !important;
  margin: auto !important;
}

.orders-intro-card .intro-copy,
.orders-landing-card .landing-copy {
  text-align: center;
}

.orders-intro-card h2,
.orders-landing-card h2 {
  margin: 0 0 9px !important;
  padding: 0 !important;
  color: var(--order-blue) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: clamp(25px, 4vw, 38px) !important;
}

.orders-intro-card .russian-title {
  margin: 19px 0;
  color: var(--order-red);
  font-weight: 700;
}

.portal-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 30px;
}

.portal-links .order-button {
  padding-left: 10px;
  padding-right: 10px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 25px);
  margin-top: 24px;
}

.editorial-grid > * {
  grid-column: span 6;
}

.editorial-grid .wide {
  grid-column: 1 / -1;
}

.landing-photo-card {
  overflow: hidden;
  margin: 0;
  background: #fffdf7;
  border: 1px solid rgba(183,151,76,.48);
  border-radius: 11px;
  box-shadow: 0 10px 25px rgba(54,29,18,.11);
}

.landing-photo-card img {
  display: block;
  width: 100% !important;
  height: clamp(290px, 42vw, 490px) !important;
  margin: 0 !important;
  border-radius: 0;
  object-fit: cover !important;
  object-position: center top;
}

/* This wide documentary scene must retain the complete composition. */
.landing-photo-card > img[src="chivalric_group.jpg"] {
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

.landing-photo-card figcaption {
  padding: 14px 17px 17px;
  color: #685843;
  font-size: .9rem;
  line-height: 1.45;
  text-align: center;
}

.paired-landing-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  background: linear-gradient(145deg, #f5ead3, #fffaf0);
}

.paired-landing-images img {
  height: clamp(330px, 42vw, 500px) !important;
  border-radius: 7px;
}

.principal-orders-card h3 {
  margin-top: 0;
  color: var(--order-blue) !important;
  border: 0;
  text-align: left;
}

.order-name-list {
  display: grid;
  gap: 8px;
  margin: 17px 0 22px;
  padding: 0;
  list-style: none;
}

.order-name-list li {
  padding: 10px 12px 10px 16px;
  background: rgba(255,255,255,.58);
  border-left: 4px solid var(--order-gold);
  border-radius: 5px;
}

.living-orders-statement {
  max-width: 850px !important;
  margin: 24px auto 0 !important;
  padding: 17px 20px;
  color: var(--order-red);
  background: rgba(201,165,75,.14);
  border: 1px solid rgba(183,151,76,.5);
  border-radius: 7px;
  text-align: center;
}

.investiture-card img {
  width: min(100%, 400px) !important;
  height: auto !important;
  margin: 18px auto 0 !important;
  object-fit: contain !important;
  object-position: center;
}

.cape-card {
  width: min(100%, 650px);
  margin: 28px auto 0;
}

.cape-card img {
  height: auto !important;
  max-height: 690px;
  object-fit: contain !important;
  background: #f6edd9;
}

/* A proper gateway treatment for the concise /ordini/ entrance page. */
.order-index .orders-gateway-hero {
  min-height: clamp(290px, 42vw, 470px);
  background: linear-gradient(112deg, #26070d, #681323 60%, #351018);
  border-bottom: 4px solid var(--order-gold);
}

.order-index .orders-gateway-hero::before {
  background-position: center 32%;
  background-size: cover;
  filter: saturate(.78) contrast(1.08);
}

.order-index .orders-gateway-hero::after {
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(90deg, rgba(35,4,10,.78), rgba(55,7,15,.35), rgba(28,5,10,.7));
}

.order-index .orders-gateway-hero .hero-inner {
  padding-top: clamp(54px, 9vw, 105px);
  padding-bottom: clamp(54px, 9vw, 105px);
}

.order-index .orders-gateway-hero h1 {
  color: #fff8e6 !important;
  font-size: clamp(38px, 6vw, 67px);
  text-shadow: 0 3px 18px rgba(0,0,0,.72);
}

.order-index .orders-gateway-hero .kicker,
.order-index .orders-gateway-hero .institution {
  color: #f0d995 !important;
  text-shadow: 0 2px 9px rgba(0,0,0,.8);
}

.gateway-intro-card {
  margin-bottom: clamp(23px, 4vw, 38px);
}

.gateway-summary {
  max-width: 650px !important;
  margin: 17px auto 22px !important;
  color: #594936;
}

.gateway-primary-action {
  min-width: min(100%, 310px);
  min-height: 58px;
  color: #fff8e8 !important;
  background: linear-gradient(135deg, var(--order-red), var(--wine-dark));
  border-color: var(--order-gold);
  border-left-width: 1px;
  font-size: 16px;
  letter-spacing: .025em;
}

.gateway-primary-action:hover,
.gateway-primary-action:focus-visible {
  color: var(--order-blue) !important;
  background: linear-gradient(145deg, #fffdf7, #eddbb6);
}

.gateway-directory {
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(145deg, #fffefb, #efe0c2);
  border: 1px solid rgba(183,151,76,.55);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(54,29,18,.11);
  text-align: center;
}

.gateway-directory h2 {
  margin: 4px auto 8px !important;
  padding: 0 !important;
  color: var(--order-blue) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: clamp(27px, 4vw, 39px) !important;
}

.gateway-directory-intro {
  margin: 0 auto 23px !important;
  color: #685843;
  font-style: italic;
}

.gateway-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gateway-order-grid .order-button {
  min-height: 64px;
}

.gateway-order-grid .order-button:last-child {
  grid-column: 2;
}

@media (max-width: 760px) {
  .gateway-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gateway-order-grid .order-button:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 470px) {
  .gateway-order-grid {
    grid-template-columns: 1fr;
  }

  .gateway-order-grid .order-button:last-child {
    grid-column: auto;
  }
}

/* Narrow-phone containment, including folded dual-screen devices. */
@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-shell,
  .legacy-content,
  .curated-order-page,
  .orders-intro-card,
  .orders-landing-card,
  .gateway-directory,
  .state-orders-intro,
  .state-orders-grid,
  .armorial-grid,
  .editorial-grid,
  .order-main-cell,
  .curated-card-grid,
  .curated-media-grid,
  .officer-grid,
  .grade-grid,
  .feast-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-shell {
    padding-right: 8px;
    padding-left: 8px;
  }

  .legacy-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .editorial-grid,
  .order-main-cell,
  .curated-card-grid,
  .curated-media-grid,
  .gateway-order-grid,
  .state-orders-grid,
  .armorial-grid,
  .officer-grid,
  .grade-grid,
  .feast-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .editorial-grid > *,
  .order-main-cell > *,
  .curated-card-grid > *,
  .curated-media-grid > *,
  .gateway-order-grid > *,
  .state-orders-grid > *,
  .armorial-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: 1 !important;
  }

  .order-button,
  .curated-section-bar,
  .state-order-card h2,
  .armorial-card figcaption {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  .legacy-content img,
  .curated-order-page img {
    max-width: 100% !important;
  }
}

/* Four historic state orders presented as a coherent visual set. */
.state-orders-intro {
  max-width: 850px !important;
  margin: 0 auto clamp(22px, 4vw, 38px) !important;
  padding: clamp(23px, 4vw, 38px);
  background: linear-gradient(145deg, #fffefb, #efe0c2);
  border: 1px solid rgba(183,151,76,.55);
  border-top: 5px solid var(--order-gold);
  border-radius: 11px;
  box-shadow: 0 10px 26px rgba(54,29,18,.1);
  text-align: center;
}

.state-orders-intro h2 {
  margin: 4px auto 12px !important;
  padding: 0 !important;
  color: var(--order-blue) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: clamp(25px, 3.5vw, 37px) !important;
}

.state-orders-intro p {
  margin: .55em auto !important;
}

.state-orders-direction {
  color: #6a5840;
  font-size: .94rem;
  font-style: italic;
}

.state-orders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 25px);
}

.state-order-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: linear-gradient(145deg, #fffefb, #f1e3c7);
  border: 1px solid rgba(183,151,76,.52);
  border-top: 5px solid var(--order-red);
  border-radius: 11px;
  box-shadow: 0 10px 25px rgba(54,29,18,.11);
}

.state-order-card img {
  display: block;
  width: 100% !important;
  height: clamp(330px, 43vw, 510px) !important;
  margin: 0 !important;
  padding: 14px;
  background: linear-gradient(145deg, #f4ead5, #fffdf7);
  border-radius: 0;
  object-fit: contain !important;
  object-position: center top;
}

.state-orders-page .legacy-content .state-order-card h2 {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 17px 19px 20px !important;
  color: #fff8e8 !important;
  background: linear-gradient(115deg, var(--order-blue), var(--order-red)) !important;
  border: 0 !important;
  box-shadow: inset 0 4px var(--order-gold) !important;
  font-size: clamp(18px, 2.3vw, 24px) !important;
  line-height: 1.3;
  text-align: center;
}

/* Responsive heraldic catalogue for the Eagle armorial. */
.armorial-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:clamp(15px,2.2vw,23px)}
.armorial-card{display:flex;flex-direction:column;overflow:hidden;min-width:0;margin:0;background:linear-gradient(145deg,#fffefb,#f0e2c6);border:1px solid rgba(183,151,76,.52);border-top:5px solid var(--order-red);border-radius:10px;box-shadow:0 9px 23px rgba(54,29,18,.1)}
.armorial-card img{display:block;width:100%!important;height:330px!important;margin:0!important;padding:15px;background:linear-gradient(145deg,#fff,#f5ead4);border-radius:0;object-fit:contain!important}
.armorial-card figcaption{flex:1;padding:15px 15px 17px;color:#5a4937;border-top:1px solid rgba(183,151,76,.48);line-height:1.4;text-align:center}
.armorial-card figcaption strong,.armorial-card figcaption span{display:block}.armorial-card figcaption strong{color:var(--order-blue);font-size:1rem}.armorial-card figcaption span{margin-top:5px;font-size:.87rem;font-style:italic}
@media(max-width:470px){.armorial-card img{height:min(112vw,410px)!important}}

.state-orders-note {
  max-width: 900px;
  margin: clamp(23px, 4vw, 38px) auto 0;
  padding: clamp(20px, 3vw, 30px);
  color: #554431;
  background: #fff9ec;
  border: 1px solid rgba(183,151,76,.5);
  border-left: 6px solid var(--order-gold);
  border-radius: 9px;
  box-shadow: 0 8px 21px rgba(54,29,18,.08);
  text-align: center;
}

.state-orders-note h2 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: var(--order-red) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 1.3rem !important;
  font-style: italic;
}

.state-orders-note p {
  margin: .55em auto !important;
}

@media (max-width: 760px) {
  .state-orders-grid {
    grid-template-columns: 1fr;
  }

  .state-order-card img {
    height: min(112vw, 520px) !important;
  }
}

/* Hand-composed Order profiles. */
.curated-order-page {display:grid;gap:clamp(22px,3vw,34px)}
.order-profile-intro{display:grid;grid-template-columns:minmax(180px,.62fr) minmax(0,1.38fr);gap:clamp(24px,5vw,58px);align-items:center;padding:clamp(24px,4vw,44px);background:linear-gradient(145deg,rgba(255,254,250,.98),rgba(239,221,185,.82));border:1px solid rgba(183,151,76,.52);border-radius:12px;box-shadow:0 12px 30px rgba(54,29,18,.13)}
.order-profile-emblem img{display:block;width:auto!important;max-width:min(100%,275px)!important;max-height:310px;margin:auto!important;object-fit:contain}
.order-profile-copy h2{margin:0 0 13px!important;padding:0!important;color:var(--order-blue)!important;background:none!important;border:0!important;box-shadow:none!important;font-size:clamp(25px,3.6vw,38px)!important;text-align:left!important}
.order-profile-copy .profile-lead{margin:0;color:#4f402f;font-size:clamp(17px,2vw,20px);line-height:1.62}
.curated-section-bar{padding:14px 20px;color:var(--order-cream)!important;background:linear-gradient(110deg,var(--order-blue),var(--order-red));border:1px solid #996346;border-bottom:5px solid var(--order-gold);border-radius:9px;box-shadow:0 9px 22px rgba(55,7,15,.19);font-size:clamp(21px,3vw,29px);font-weight:700;line-height:1.22;text-align:center;text-wrap:balance}
.curated-section-bar span{display:block;margin-top:4px;color:#f0d995!important;font:600 12px/1.35 Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.curated-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:clamp(15px,2.3vw,23px)}
.curated-text-card,.curated-fact-card,.curated-note{padding:clamp(20px,3vw,30px);background:linear-gradient(145deg,#fffefb,#f2e5ca);border:1px solid rgba(183,151,76,.46);border-radius:10px;box-shadow:0 8px 21px rgba(54,29,18,.09)}
.curated-text-card h3,.curated-fact-card h3{margin:0 0 10px;padding:0 0 7px;color:var(--order-blue)!important;border:0;border-bottom:2px solid rgba(201,165,75,.72);font-size:1.2rem;text-align:left}
.curated-text-card p:first-child,.curated-fact-card p:first-child{margin-top:0}.curated-text-card p:last-child,.curated-fact-card p:last-child{margin-bottom:0}.curated-fact-card{border-top:5px solid var(--order-gold)}
.curated-feature{display:grid;grid-template-columns:minmax(210px,.75fr) minmax(0,1.25fr);gap:clamp(22px,4vw,42px);align-items:center;overflow:hidden;padding:clamp(20px,3vw,32px);background:linear-gradient(145deg,#fffefb,#f1e1c0);border:1px solid rgba(183,151,76,.48);border-radius:11px;box-shadow:0 10px 25px rgba(54,29,18,.11)}
.curated-feature.reverse .curated-feature-image{order:2}.curated-feature-image img{display:block;width:100%!important;max-height:390px;margin:0!important;object-fit:contain!important}.curated-feature-copy h3{margin:0 0 10px;color:var(--order-blue)!important;font-size:clamp(21px,2.7vw,28px)}

/* These two half-width patron cards work best with the image above the prose. */
.order-sgo .curated-feature:has(img[src="111_stg.jpg"]),
.order-sgo .curated-feature:has(img[src="111_olga.jpg"]) {
  grid-template-columns: 1fr;
  align-content: start;
  text-align: center;
}
.order-sgo .curated-feature:has(img[src="111_stg.jpg"]) .curated-feature-image img,
.order-sgo .curated-feature:has(img[src="111_olga.jpg"]) .curated-feature-image img {
  width: auto !important;
  max-width: 100% !important;
  height: 245px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
}
.order-sgo .curated-feature:has(img[src="111_stg.jpg"]) .curated-feature-copy h3,
.order-sgo .curated-feature:has(img[src="111_olga.jpg"]) .curated-feature-copy h3 {
  text-align: center;
}
.curated-media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:clamp(14px,2vw,20px)}
.curated-media-card{display:flex;flex-direction:column;overflow:hidden;margin:0;background:#fffdf8;border:1px solid rgba(183,151,76,.46);border-radius:9px;box-shadow:0 7px 18px rgba(54,29,18,.09)}
.curated-media-card img{display:block;width:100%!important;height:245px!important;margin:0!important;padding:10px;background:linear-gradient(145deg,#fff,#f4ead5);border-radius:0;object-fit:contain!important}.curated-media-card.portrait img{object-fit:cover!important;object-position:center top}.curated-media-card figcaption{flex:1;padding:12px 14px 15px;color:#665641;font-size:.88rem;line-height:1.42;text-align:center}
.officer-grid,.grade-grid,.feast-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:11px}.officer-tile,.grade-tile,.feast-tile{padding:13px 14px;background:rgba(255,253,248,.86);border:1px solid rgba(183,151,76,.44);border-left:5px solid var(--order-red);border-radius:7px;box-shadow:0 5px 13px rgba(54,29,18,.07);line-height:1.4;text-align:center}.officer-tile strong,.grade-tile strong{display:block;color:var(--order-blue)}
.curated-note{color:#554431;border-left:6px solid var(--order-gold);font-size:.94rem}.curated-quote{margin:0;padding:clamp(22px,4vw,38px);color:#fff8e8;background:linear-gradient(120deg,#203e63,#3b1724);border:1px solid #b9974c;border-radius:11px;box-shadow:0 10px 26px rgba(32,15,20,.18);font-size:clamp(18px,2.2vw,22px);font-style:italic;line-height:1.62;text-align:center}
.lineage-list{display:grid;gap:0;max-width:690px;margin:auto;padding:0;list-style:none}.lineage-list li{position:relative;padding:13px 18px;background:#fffdf8;border:1px solid rgba(183,151,76,.42);text-align:center}.lineage-list li+li::before{content:"↓";position:absolute;top:-15px;left:50%;z-index:2;width:25px;transform:translateX(-50%);color:var(--order-red);background:#fffaf0;font-weight:700}
@media(max-width:760px){.order-profile-intro,.curated-feature{grid-template-columns:1fr}.curated-feature.reverse .curated-feature-image{order:0}.order-profile-copy h2{text-align:center!important}.order-profile-copy .profile-lead{text-align:center}.curated-media-card img{height:min(80vw,330px)!important}}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  .hero::before {
    background-position: 50% 42%;
    background-size: auto 76%;
    opacity: .075;
  }

  .order-index .legacy-content > table > tbody > tr {
    grid-template-columns: 1fr;
  }

  .order-index .legacy-content > table > tbody > tr > td:last-child {
    padding: 17px 12px !important;
  }

  .legacy-content p:has(> img:nth-of-type(2)) img,
  .legacy-content div:has(> img:nth-of-type(2)) > img {
    width: min(100%, 430px) !important;
    height: auto !important;
  }

  .order-info-card,
  .order-media-card {
    grid-column: 1 / -1;
  }

  .order-feature-card img:first-of-type {
    float: none;
    width: min(100%, 440px) !important;
    margin: 0 auto 17px !important;
  }

  .orders-intro-card,
  .orders-landing-card {
    grid-template-columns: 1fr;
  }

  .portal-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paired-landing-images {
    grid-template-columns: 1fr;
  }

  .paired-landing-images img {
    height: min(112vw, 520px) !important;
  }

  .editorial-grid > * {
    grid-column: 1 / -1;
  }
}

@media (max-width: 470px) {
  .hero-inner {
    padding-top: 24px;
    padding-bottom: 21px;
  }

  .legacy-content {
    padding: 22px 13px;
  }

  .legacy-content::before {
    inset: 7px;
  }

  .legacy-content h1:not(:first-child),
  .legacy-content h2 {
    padding: 10px 11px 9px !important;
  }

  .portal-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-nav a,
  .orders-grid a {
    transition: none;
  }
}

@media print {
  .legacy-content::before {
    display: none;
  }
}

/* Keep this last so later component declarations cannot restore wide columns. */
@media (max-width: 560px) {
  body .editorial-grid,
  body .order-main-cell,
  body .curated-card-grid,
  body .curated-media-grid,
  body .gateway-order-grid,
  body .state-orders-grid,
  body .armorial-grid,
  body .officer-grid,
  body .grade-grid,
  body .feast-grid,
  body .order-profile-intro,
  body .curated-feature {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .editorial-grid > *,
  body .order-main-cell > *,
  body .curated-card-grid > *,
  body .curated-media-grid > *,
  body .gateway-order-grid > *,
  body .state-orders-grid > *,
  body .armorial-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: 1 !important;
  }
}
