/* CCD visual-fidelity stylesheet — derived from the approved CCD design language. */
:root {
  --ccd-paper: #f4ecd9;
  --ccd-ink: #222222;
  --ccd-title: #3f3028;
  --ccd-heading: #21313e;
  --ccd-subheading: #5d482f;
  --ccd-gold: #8a6a32;
  --ccd-gm: #6e2222;
}

/* Give the surrounding archive a quieter naval/folio frame without fighting Material navigation. */
[data-md-color-scheme="default"] .md-header,
[data-md-color-scheme="default"] .md-tabs { background-color: #21313e; }
[data-md-color-scheme="default"] .md-header__title,
[data-md-color-scheme="default"] .md-tabs__link { font-family: Georgia, "Times New Roman", serif; }
[data-md-color-scheme="default"] .md-main { background: #d9d4c8; }
[data-md-color-scheme="default"] .md-nav__link--active { color: #76572d; }

.md-typeset .ccd-document {
  position: relative;
  box-sizing: border-box;
  max-width: 980px;
  margin: .75rem auto 2.5rem;
  padding: clamp(1.4rem, 3.8vw, 3.1rem);
  color: var(--ccd-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .97rem;
  line-height: 1.58;
  background-color: var(--ccd-paper);
  background-image: url("../ccd/ccd-parchment.webp");
  background-repeat: repeat;
  border: 26px solid transparent;
  border-image-source: url("../ccd/ccd-border-source.webp");
  border-image-slice: 95 95 95 95;
  border-image-width: 26px;
  border-image-repeat: round;
  box-shadow: 0 .35rem 1.25rem rgba(47, 37, 24, .17);
}

.md-typeset .ccd-document::after {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1.15rem;
  width: 112px;
  height: 99px;
  background: url("../ccd/ccd-crest.webp") center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}

.md-typeset .ccd-document > * { position: relative; z-index: 1; }

.md-typeset .ccd-hero {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(300px, 1.28fr);
  grid-template-areas:
    ". title"
    "facts portrait";
  gap: 1.15rem 2rem;
  align-items: center;
  min-height: 630px;
  padding: 2.15rem .25rem .35rem;
}

.md-typeset .ccd-titleblock { grid-area: title; text-align: center; padding-right: 1.2rem; }
.md-typeset .ccd-titleblock h1 {
  margin: 0;
  color: var(--ccd-title);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3.7vw, 2.45rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.22;
  text-transform: uppercase;
  letter-spacing: .012em;
}
.md-typeset .ccd-titleblock .ccd-role {
  margin: .8rem 0 0;
  color: var(--ccd-title);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.16rem, 2.5vw, 1.65rem);
  font-style: italic;
  line-height: 1.35;
}

.md-typeset .ccd-facts { grid-area: facts; align-self: center; text-align: center; }
.md-typeset .ccd-fact { margin: 0 0 .76rem; }
.md-typeset .ccd-fact-label {
  display: block;
  margin-bottom: .08rem;
  color: var(--ccd-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.md-typeset .ccd-fact-value { display: block; color: var(--ccd-ink); font-size: .98rem; line-height: 1.45; }

.md-typeset .ccd-portrait-wrap {
  grid-area: portrait;
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 5 / 7;
  justify-self: center;
}
.md-typeset .ccd-portrait-wrap .ccd-portrait {
  position: absolute;
  inset: 3.7% 4.4%;
  width: 91.2%;
  height: 92.6%;
  object-fit: cover;
  margin: 0;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
}
.md-typeset .ccd-portrait-wrap .ccd-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  margin: 0;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.md-typeset blockquote.ccd-epigraph {
  margin: .7rem auto 1rem;
  padding: 0;
  border: 0;
  color: var(--ccd-title);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  font-style: italic;
  text-align: center;
}

.md-typeset .ccd-lede p:first-child::first-letter {
  float: left;
  padding: .07em .08em 0 0;
  color: #241f1a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.55rem;
  line-height: .78;
}

.md-typeset .ccd-document p { margin: .42rem 0; }
.md-typeset .ccd-document h2 {
  margin: 1.35rem 0 .42rem;
  color: var(--ccd-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.2;
}
.md-typeset .ccd-document h3 {
  margin: .88rem 0 .24rem;
  color: var(--ccd-subheading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}
.md-typeset .ccd-document .ccd-gm-heading { color: var(--ccd-gm); }
.md-typeset .ccd-document ul { margin-top: .3rem; margin-bottom: .65rem; }
.md-typeset .ccd-document li { margin: .11rem 0; }
.md-typeset .ccd-document blockquote:not(.ccd-epigraph) { color: var(--ccd-subheading); border-left-color: rgba(93,72,47,.55); }

.md-typeset .ccd-inline-figure {
  margin: 1rem auto 1.35rem;
  text-align: center;
}
.md-typeset .ccd-inline-figure img {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(93,72,47,.5);
  box-shadow: 0 .18rem .7rem rgba(58,43,25,.12);
}
.md-typeset .ccd-inline-figure figcaption {
  margin-top: .42rem;
  color: var(--ccd-subheading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .8rem;
}

.md-typeset .ccd-alt-portrait { margin: .8rem auto 1.35rem; }
.md-typeset .ccd-alt-portrait .ccd-portrait-wrap--alt { width: min(100%, 390px); }

.md-typeset details.ccd-provenance {
  margin-top: 2rem;
  padding-top: .2rem;
  border: 0;
  border-top: 1px solid rgba(93,72,47,.38);
  background: transparent;
  box-shadow: none;
  color: #5b5146;
  font-size: .78rem;
}
.md-typeset details.ccd-provenance summary {
  padding: .65rem 0 .3rem;
  color: var(--ccd-subheading);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

@media (max-width: 760px) {
  .md-typeset .ccd-document {
    margin-left: -.4rem;
    margin-right: -.4rem;
    padding: 1rem;
    border-width: 16px;
    border-image-width: 16px;
    font-size: .94rem;
  }
  .md-typeset .ccd-document::after { width: 78px; height: 69px; top: .55rem; right: .6rem; opacity: .5; }
  .md-typeset .ccd-hero {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "portrait" "facts";
    min-height: 0;
    gap: .9rem;
    padding-top: 1rem;
  }
  .md-typeset .ccd-titleblock { padding-right: 0; padding-left: 0; }
  .md-typeset .ccd-titleblock h1 { padding: 0 2.4rem; }
  .md-typeset .ccd-portrait-wrap { width: min(91%, 390px); }
  .md-typeset .ccd-facts { margin-top: .15rem; }
}
