/* Public condition guides and the shared header on the refill guide. */
.cg-shell {
  --cg-blue: #185fa6;
  --cg-ink: #153854;
  --cg-body: #304c61;
  --cg-rule: #c9dcea;
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto 52px;
  color: var(--cg-ink);
}
.cg-shell *, .cg-shell *::before { box-sizing: border-box; }
.cg-shell a { text-underline-offset: .2em; }
.cg-shell a:focus-visible { outline: 3px solid #2476b9; outline-offset: 3px; }
#drb-public-main .cg-hero, #drb-refill-page .cg-shell .cg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .92fr);
  grid-template-areas: "title photo" "intro photo" "actions photo" "facts photo";
  gap: 0 clamp(24px, 4vw, 56px);
  align-content: center;
  margin: 8px 0 clamp(22px, 3vw, 38px);
  padding: clamp(24px, 4.2vw, 54px);
  background: linear-gradient(115deg, #f5faff 4%, #e7f1fb 100%);
  border: 1px solid var(--cg-rule);
  border-radius: 24px;
}
.cg-shell #cg-title, #drb-refill-page .cg-shell #cg-title {
  grid-area: title;
  align-self: start;
  margin: 0;
  color: var(--cg-ink);
  font: 500 clamp(2.2rem, 3.8vw, 3.6rem)/1.07 Georgia, 'Times New Roman', serif;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.cg-shell img.cg-hero-photo {
  grid-area: photo;
  align-self: stretch;
  justify-self: center;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #dce9f3;
  object-fit: contain;
  border-radius: 16px;
}
.cg-shell .cg-intro {
  grid-area: intro;
  margin: 20px 0 0;
  max-width: 63ch;
  color: var(--cg-body);
  font-size: clamp(1.04rem, 1.55vw, 1.21rem);
  line-height: 1.58;
}
.cg-shell .cg-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}
.cg-shell .cg-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
#drb-public-main .cg-actions a.cg-primary, #drb-public-main .cg-actions a.cg-primary:visited {
  color: #152f43;
  background: #ffa31b;
  border-color: #ec991e;
}
#drb-public-main .cg-actions a.cg-primary:hover { background: #f3a032; border-color: #b67413; }
#drb-public-main .cg-actions a.cg-secondary, #drb-public-main .cg-actions a.cg-secondary:visited {
  color: var(--cg-blue);
  background: #fff;
  border-color: #789bb5;
}
#drb-public-main .cg-actions a.cg-secondary:hover { background: #eef6fd; }
.cg-shell ul.cg-facts {
  grid-area: facts;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 5px;
  color: var(--cg-body);
  font-size: .95rem;
  line-height: 1.48;
}
.cg-facts li { position: relative; padding-left: 23px; }
.cg-facts li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: .26em;
  width: 7px;
  height: 12px;
  transform: rotate(44deg);
  border: solid var(--cg-blue);
  border-width: 0 2px 2px 0;
}
.cg-shell .cg-prep {
  background: #143651;
  color: #fff;
  border-radius: 20px;
  margin: 0 0 clamp(24px, 4vw, 46px);
  padding: clamp(22px, 3vw, 36px);
}
.cg-shell .cg-prep h2, #drb-refill-page .cg-shell .cg-prep h2 {
  color: #fff;
  font: 500 clamp(1.55rem, 2.5vw, 2.25rem)/1.2 Georgia, 'Times New Roman', serif;
  margin: 0 0 18px;
}
.cg-prep ul { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; gap: 20px; margin: 0; padding: 0; }
.cg-prep li { color: #f2f8fd; border-left: 2px solid #75b6e1; padding-left: 14px; font-size: 1rem; line-height: 1.52; }
.cg-reading { display: grid; grid-template-columns: minmax(170px, .6fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 56px); }
.cg-contents { align-self: start; padding: 18px; background: #f1f7fc; border-radius: 14px; }
.cg-contents p { margin: 0 0 10px; font-weight: 700; }
.cg-contents ol { padding-left: 21px; margin: 0; }
.cg-contents li { margin-top: 8px; line-height: 1.5; }
#drb-public-main .cg-contents a, .cg-related a { color: #16578e; }
.cg-prose { color: var(--cg-body); font-size: 1.05rem; line-height: 1.72; }
.cg-prose section { margin-bottom: 32px; scroll-margin-top: 120px; }
.cg-prose h2, .cg-related h2 { margin: 0 0 12px; color: var(--cg-ink); font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.25; }
.cg-prose p { margin: 0 0 12px; }
.cg-sources { padding-top: 18px; border-top: 1px solid var(--cg-rule); font-size: .9rem; overflow-wrap: anywhere; }
.cg-sources ul { padding-left: 20px; }
.cg-related { padding: 20px 0; margin: 18px 0; border-block: 1px solid var(--cg-rule); }
.cg-related ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.cg-related li a { display: block; padding: 10px 14px; border: 1px solid var(--cg-rule); border-radius: 9px; background: #f3f8fc; }
.cg-support { width: 100%; max-width: none; padding: 0; }
.cg-shell .seo-breadcrumb { margin-block: 12px 10px; }
@media (max-width: 700px) {
  .cg-shell { width: calc(100% - 24px); margin-bottom: 32px; }
  #drb-public-main .cg-hero, #drb-refill-page .cg-shell .cg-hero {
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
    grid-template-areas: "title photo" "intro intro" "actions actions" "facts facts";
    gap: 0 clamp(9px, 2.6vw, 15px);
    padding: clamp(14px, 3.8vw, 22px);
    border-radius: 16px;
  }
  .cg-shell #cg-title, #drb-refill-page .cg-shell #cg-title {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: clamp(1.65rem, 6.35vw, 2.5rem);
    line-height: 1.1;
    text-wrap: initial;
  }
  .cg-shell img.cg-hero-photo { border-radius: 10px; }
  .cg-shell .cg-intro { margin-top: 16px; font-size: 1rem; }
  .cg-shell .cg-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .cg-shell ul.cg-facts { margin-top: 15px; font-size: .9rem; }
  .cg-prep ul { grid-template-columns: 1fr; gap: 12px; }
  .cg-reading { display: block; }
  .cg-contents { margin-bottom: 24px; }
}

/* The legacy mobile shell uses a reduced root font size. Guide copy must remain readable. */
@media (max-width: 700px) {
  .cg-shell #cg-title, #drb-refill-page .cg-shell #cg-title { font-size: clamp(24px, 6.5vw, 34px) !important; text-wrap: balance; hyphens: manual; }
  .cg-shell .cg-intro, .cg-shell .cg-actions a, .cg-prose, .cg-prose p,
  .cg-contents, .cg-related, .cg-shell .cg-prep li { font-size: 16px; }
  .cg-shell ul.cg-facts, .cg-shell .cg-sources, .cg-shell .cg-sources a { font-size: 14px; }
  .cg-shell .cg-prep h2, #drb-refill-page .cg-shell .cg-prep h2,
  .cg-shell .cg-prose h2, .cg-shell .cg-related h2 { font-size: 22px; }
}

@media (min-width: 360px) and (max-width: 700px) {
  .cg-shell .cg-actions { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .cg-shell .cg-actions a { padding-inline: 10px; }
}
