/* ------------------------------------------------------------------
   Miracles Today
   A paper-and-ink treatment of MkDocs Material: indigo night, ember,
   and aged paper. Serif for reading, small caps for navigation.
   ------------------------------------------------------------------ */

:root {
  --md-primary-fg-color: #2c3f5e;
  --md-primary-fg-color--light: #3c5578;
  --md-primary-fg-color--dark: #1b2a42;
  --md-primary-bg-color: #faf7f0;
  --md-accent-fg-color: #b2571f;
  --md-typeset-a-color: #2c3f5e;

  --pc-paper: #faf7f0;
  --pc-paper-2: #f3eee1;
  --pc-ink: #20242b;
  --pc-muted: #6b6456;
  --pc-rule: #ddd4c2;
  --pc-indigo: #2c3f5e;
  --pc-indigo-deep: #1b2433;
  --pc-ember: #b2571f;
  --pc-gold: #b8893c;
  --pc-green: #4a6350;
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: #faf7f0;
  --md-default-fg-color: #20242b;
  --md-default-fg-color--light: #4c4a44;
  --md-default-fg-color--lighter: #7b7567;
  --md-code-bg-color: #f0ebdd;
  --md-typeset-color: #20242b;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #18202c;
  --md-accent-fg-color: #e0a35c;
  --md-typeset-a-color: #e0a35c;
  --md-default-bg-color: #14181f;
  --md-code-bg-color: #1e242e;
  --pc-paper: #14181f;
  --pc-paper-2: #1b212b;
  --pc-ink: #e7e2d6;
  --pc-muted: #a49c8c;
  --pc-rule: #333a45;
  --pc-indigo: #9db4d6;
  --pc-ember: #e0a35c;
  --pc-gold: #d6b070;
  --pc-green: #9dbba6;
}

html {
  scroll-behavior: smooth;
}

body,
.md-typeset {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino,
    "Source Serif 4", Charter, Georgia, serif;
}

.md-typeset {
  font-size: 0.8rem;
  line-height: 1.74;
  color: var(--md-typeset-color);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-nav,
.md-header,
.md-footer,
.md-typeset .admonition-title {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.md-typeset h1 {
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--md-default-fg-color);
  margin-bottom: 0.55rem;
}

.md-typeset h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--pc-rule);
  padding-bottom: 0.3rem;
  margin-top: 2.3rem;
}

.md-typeset h3 {
  font-weight: 600;
  color: var(--pc-indigo);
  margin-top: 1.8rem;
}

[data-md-color-scheme="slate"] .md-typeset h3 {
  color: #a9c0dd;
}

.md-typeset h4 {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pc-ember);
  margin-top: 1.6rem;
}

.md-typeset blockquote {
  color: var(--pc-muted);
  border-left: 3px solid var(--pc-ember);
  background: rgba(178, 87, 31, 0.045);
  padding: 0.55rem 0.9rem;
  margin-left: 0;
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  background: rgba(224, 163, 92, 0.07);
}

.md-typeset hr {
  border-color: var(--pc-rule);
}

.md-typeset table:not([class]) {
  border: 1px solid var(--pc-rule);
  box-shadow: none;
  font-size: 0.7rem;
}

.md-typeset table:not([class]) th {
  background: rgba(44, 63, 94, 0.07);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: rgba(157, 180, 214, 0.09);
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  border-color: var(--pc-rule);
  vertical-align: top;
}

/* Header and navigation -------------------------------------------- */

.md-header {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.md-header__title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.md-nav__title,
.md-nav__item--section > .md-nav__link {
  font-weight: 650;
  color: var(--pc-indigo);
}

[data-md-color-scheme="slate"] .md-nav__title,
[data-md-color-scheme="slate"] .md-nav__item--section > .md-nav__link {
  color: #a9c0dd;
}

.md-nav__link--active {
  font-weight: 600;
}

/* Home page --------------------------------------------------------- */

.case-hero {
  border-top: 3px double var(--pc-indigo);
  border-bottom: 1px solid var(--pc-rule);
  padding: 1.35rem 0 1.15rem;
  margin: 0 0 1.5rem;
}

.case-hero .kicker {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--pc-ember);
  margin-bottom: 0.4rem;
}

.case-hero h1 {
  font-size: 2.1rem;
  line-height: 1.1;
  margin: 0 0 0.5rem;
  border: none;
}

.case-hero .lead {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--pc-muted);
  max-width: 40rem;
  margin: 0;
}

.hero-art {
  margin: 0 0 1.5rem;
}

.hero-art svg,
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--pc-rule);
}

.part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr));
  gap: 0.9rem;
  margin: 1.1rem 0 1.5rem;
}

.part-card {
  display: block;
  border: 1px solid var(--pc-rule);
  border-top: 3px solid var(--pc-indigo);
  background: rgba(255, 255, 255, 0.4);
  padding: 0.9rem 1rem 0.85rem;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

[data-md-color-scheme="slate"] .part-card {
  background: rgba(255, 255, 255, 0.03);
}

.part-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(32, 36, 43, 0.1);
}

.part-card .part-label {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-ember);
  font-weight: 700;
}

.part-card h3 {
  margin: 0.28rem 0 0.32rem !important;
  font-size: 0.9rem;
  border: none;
  color: var(--pc-indigo);
}

[data-md-color-scheme="slate"] .part-card h3 {
  color: #a9c0dd;
}

.part-card p {
  margin: 0;
  font-size: 0.71rem;
  line-height: 1.55;
  color: var(--pc-muted);
}

/* Text furniture ---------------------------------------------------- */

.lede {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--pc-muted);
  border-left: 2px solid var(--pc-rule);
  padding-left: 0.9rem;
  margin: 0.6rem 0 1.4rem;
}

.verse-card {
  border: 1px solid var(--pc-rule);
  background: rgba(44, 63, 94, 0.035);
  padding: 0.9rem 1.1rem;
  margin: 1rem 0 1.4rem;
  font-size: 0.79rem;
}

[data-md-color-scheme="slate"] .verse-card {
  background: rgba(157, 180, 214, 0.05);
}

.verse-card .ref {
  display: block;
  margin-top: 0.4rem;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-ember);
  font-weight: 700;
}

.pull-quote {
  border-left: 4px solid var(--pc-ember);
  padding: 0.15rem 0 0.15rem 1rem;
  margin: 1.4rem 0;
  font-size: 0.93rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--pc-ink);
}

.pull-quote .attrib {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-muted);
}

/* Structured argument blocks ---------------------------------------- */

.claim {
  border: 1px solid var(--pc-rule);
  border-left: 4px solid var(--pc-ember);
  background: rgba(178, 87, 31, 0.04);
  padding: 0.75rem 1rem;
  margin: 1.1rem 0;
  font-size: 0.76rem;
}

.claim .claim-label {
  display: block;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--pc-ember);
  margin-bottom: 0.3rem;
}

.claim.reply {
  border-left-color: var(--pc-indigo);
  background: rgba(44, 63, 94, 0.04);
}

.claim.reply .claim-label {
  color: var(--pc-indigo);
}

[data-md-color-scheme="slate"] .claim.reply .claim-label {
  color: #a9c0dd;
}

.claim p:last-child {
  margin-bottom: 0;
}

.argument-strip {
  counter-reset: arg;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.6rem;
}

.argument-strip li {
  position: relative;
  padding: 0.55rem 0 0.55rem 2.6rem;
  border-bottom: 1px solid var(--pc-rule);
  font-size: 0.77rem;
}

.argument-strip li::before {
  counter-increment: arg;
  content: counter(arg, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.62rem;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pc-ember);
}

.argument-strip li:last-child {
  border-bottom: none;
}

/* Deniability ladder and source library ------------------------------ */

.tier-key {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.4rem;
}

.tier-key div {
  border: 1px solid var(--pc-rule);
  padding: 0.55rem 0.7rem;
  font-size: 0.68rem;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.35);
}

[data-md-color-scheme="slate"] .tier-key div {
  background: rgba(255, 255, 255, 0.03);
}

.tier-key strong {
  display: block;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-ember);
  margin-bottom: 0.15rem;
}

.tier {
  display: inline-block;
  min-width: 1.1rem;
  padding: 0.04rem 0.3rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
}

.tier.t1 { color: #1f6b4a; }
.tier.t2 { color: #2c5a83; }
.tier.t3 { color: #6b5b2a; }
.tier.t4 { color: #8a5a2b; }
.tier.t5 { color: #9b3d33; }

.source-table {
  font-size: 0.66rem !important;
}

.source-table th:nth-child(1),
.source-table td:nth-child(1) {
  width: 2.2rem;
  text-align: right;
  color: var(--pc-muted);
}

.source-table td:nth-child(2) {
  min-width: 12rem;
}

.source-table td:nth-child(4) {
  white-space: nowrap;
}

.source-table tr.tier-row td {
  background: rgba(44, 63, 94, 0.06);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--pc-indigo);
  padding-top: 0.55rem;
  padding-bottom: 0.4rem;
}

[data-md-color-scheme="slate"] .source-table tr.tier-row td {
  background: rgba(157, 180, 214, 0.08);
  color: #a9c0dd;
}

/* Timeline ----------------------------------------------------------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  border-left: 2px solid var(--pc-rule);
}

.timeline li {
  position: relative;
  padding: 0 0 1rem 1.2rem;
  font-size: 0.76rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.36rem;
  top: 0.42rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--pc-paper);
  border: 2px solid var(--pc-ember);
}

.timeline .when {
  display: block;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--pc-ember);
  margin-bottom: 0.1rem;
}

/* Figures ------------------------------------------------------------ */

.case-figure {
  margin: 1.2rem 0 1.5rem;
}

.case-figure svg,
.case-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--pc-rule);
}

.case-figure figcaption {
  font-size: 0.64rem;
  color: var(--pc-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Tags and small print ------------------------------------------------ */

.case-tags {
  margin: 0.2rem 0 1.1rem;
}

.case-tags span {
  display: inline-block;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-indigo);
  border: 1px solid var(--pc-rule);
  padding: 0.1rem 0.4rem;
  margin: 0 0.22rem 0.22rem 0;
}

[data-md-color-scheme="slate"] .case-tags span {
  color: #a9c0dd;
}

.small-note {
  font-size: 0.66rem;
  color: var(--pc-muted);
}

/* Admonitions --------------------------------------------------------- */

.md-typeset .admonition,
.md-typeset details {
  font-size: 0.74rem;
  border-width: 1px;
  border-left-width: 4px;
}

.md-typeset .admonition-title {
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

/* Search and footer ---------------------------------------------------- */

.md-search__input {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

.md-footer {
  border-top: 1px solid var(--pc-rule);
}

/* Print ---------------------------------------------------------------- */

@media print {
  .md-header,
  .md-sidebar,
  .md-footer,
  .md-banner {
    display: none;
  }
  .md-content {
    max-width: 100%;
  }
  .md-typeset {
    font-size: 11pt;
  }
  a {
    color: #000;
    text-decoration: none;
  }
}

/* ------------------------------------------------------------------
   Top banner — narrow, editorial, readable on desktop and mobile
   ------------------------------------------------------------------ */

.md-banner {
  color: #f7efe2;
  background-color: #1b2433;
}

.md-banner__inner {
  max-width: none;
  margin: 0;
  padding: 0;
}

.case-banner {
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  color: #f7efe2;
  text-decoration: none;
  isolation: isolate;
}

.md-typeset .case-banner,
.md-typeset .case-banner:hover,
.md-typeset .case-banner:focus {
  color: #f7efe2;
  text-decoration: none;
}

.md-typeset .case-banner__bg,
.case-banner__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: 68% 50%;
  transition: transform 0.9s ease;
}

.case-banner::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(
    90deg,
    rgba(20, 28, 40, 0.94) 0%,
    rgba(20, 28, 40, 0.82) 42%,
    rgba(20, 28, 40, 0.45) 72%,
    rgba(20, 28, 40, 0.25) 100%
  );
}

.case-banner__content {
  display: block;
  max-width: 52rem;
  padding: 1.05rem 1.2rem 1rem;
}

.case-banner__eyebrow {
  display: block;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9a45e;
  margin-bottom: 0.28rem;
}

.case-banner__title {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.16rem;
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.case-banner__sub {
  display: block;
  font-size: 0.68rem;
  line-height: 1.5;
  color: #d8d0c1;
  max-width: 34rem;
}

.case-banner__meta {
  display: block;
  margin-top: 0.5rem;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #b9ae9b;
}

.case-banner__cta {
  color: #e8bf7f;
  font-weight: 700;
  margin-left: 0.6rem;
}

.case-banner__cta-short {
  display: none;
}

@media screen and (max-width: 44.98em) {
  .case-banner {
    height: 132px;
  }
  .md-typeset .case-banner__bg,
  .case-banner__bg {
    height: 132px;
  }
  .case-banner__content {
    padding: 0.85rem 0.9rem;
  }
  .case-banner__title {
    font-size: 0.98rem;
  }
  .case-banner__sub {
    display: none;
  }
  .case-banner__cta-long {
    display: none;
  }
  .case-banner__cta-short {
    display: inline;
  }
}

/* Wide tables scroll inside the content column rather than sliding under
   the table of contents. Material's wrapper does not set overflow itself. */
.md-typeset__table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.md-typeset__table > table {
  margin: 0;
}

.md-typeset__table::-webkit-scrollbar {
  height: 6px;
}

.md-typeset__table::-webkit-scrollbar-thumb {
  background: var(--pc-rule);
  border-radius: 3px;
}

/* Tables with five or more columns get room to breathe and scroll
   horizontally instead of being squeezed into the text column. */
.md-typeset__table:has(> table > thead > tr > th:nth-child(5)) > table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.md-typeset__table:has(> table > thead > tr > th:nth-child(5)) th,
.md-typeset__table:has(> table > thead > tr > th:nth-child(5)) td {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  font-size: 0.62rem;
  line-height: 1.5;
}
