/* PyNRPF site style: the PhD deck palette (navy, orange, slate, grey) and Arial, for the whole site,
   plus the components of the home page (classes prefixed nrpf-). No JavaScript, no theme overrides. */

:root {
  --nrpf-navy: #223041;
  --nrpf-orange: #f39a24;
  --nrpf-slate: #566272;
  --nrpf-grey: #7c858f;
  --nrpf-rule: #e3e1e1;
  --nrpf-panel: #f4f5f6;
  --nrpf-tint: #f6e5d0;

  /* Material's own variables, mapped to the deck */
  --md-primary-fg-color: var(--nrpf-navy);
  --md-primary-fg-color--light: var(--nrpf-slate);
  --md-primary-fg-color--dark: #18222e;
  --md-accent-fg-color: var(--nrpf-orange);
  --md-accent-fg-color--transparent: rgba(243, 154, 36, 0.12);
  --md-typeset-a-color: var(--nrpf-navy);
  --md-text-font: "Arial";
  --md-code-font: "Consolas";
}

body,
.md-typeset {
  font-family: Arial, Helvetica, sans-serif;
}

/* Headings in navy and bold, as on the deck's slides */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--nrpf-navy);
  font-weight: 700;
}

.md-typeset a {
  text-decoration: underline;
  text-decoration-color: rgba(34, 48, 65, 0.35);
  text-underline-offset: 0.15em;
}

.md-typeset a:hover {
  color: var(--nrpf-orange);
  text-decoration-color: var(--nrpf-orange);
}

/* The thin orange rule under the header, echoing the deck's footer rule */
.md-header {
  border-bottom: 3px solid var(--nrpf-orange);
}

/* ------------------------------------------------------------------ documentation pages */

/* The collapsed "Show details" block at the foot of each page (pymdownx.blocks.details, type more):
   a navy frame and a panel-grey bar, with the orange chevron as the only accent */
.md-typeset details.more {
  border: 1px solid var(--nrpf-navy);
  border-radius: 3px;
  box-shadow: none;
  font-size: inherit;
}

.md-typeset details.more > summary {
  padding-left: 0.9rem;
  background-color: var(--nrpf-panel);
  color: var(--nrpf-navy);
  font-weight: 700;
}

.md-typeset details.more > summary::before {
  display: none;
}

.md-typeset details.more > summary::after {
  background-color: var(--nrpf-orange);
}

.md-typeset details.more[open] > summary {
  border-bottom: 1px solid var(--nrpf-rule);
}

/* ------------------------------------------------------------------ home page */

.nrpf-landing {
  color: var(--nrpf-slate);
  font-size: 0.9rem;
  line-height: 1.6;
}

.nrpf-landing a.nrpf-button {
  text-decoration: none;
}

.nrpf-eyebrow {
  margin: 0 0 0.6rem;
  color: var(--nrpf-orange);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nrpf-hero {
  padding: 2.5rem 0 1.5rem;
}

.md-typeset .nrpf-hero h1 {
  max-width: 24ch;
  margin: 0 0 1.2rem;
  color: var(--nrpf-navy);
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.nrpf-lead {
  max-width: 46rem;
  margin: 0 0 1.6rem;
  font-size: 1.08rem;
  line-height: 1.55;
}

.nrpf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.nrpf-button {
  display: inline-block;
  padding: 0.62rem 1.25rem;
  border: 2px solid var(--nrpf-navy);
  border-radius: 3px;
  color: var(--nrpf-navy) !important;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.nrpf-button--primary {
  background: var(--nrpf-navy);
  color: #ffffff !important;
}

.nrpf-button:hover {
  border-color: var(--nrpf-orange);
  background: var(--nrpf-orange);
  color: #ffffff !important;
}

.nrpf-section {
  margin-top: 3.6rem;
}

.md-typeset .nrpf-section h2 {
  margin: 0 0 1rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

.md-typeset .nrpf-section h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.nrpf-section p {
  margin: 0 0 0.9rem;
}

/* Text beside a figure */
.nrpf-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
}

.nrpf-figure {
  margin: 0;
}

.nrpf-figure img {
  display: block;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}

.nrpf-figure figcaption {
  max-width: 34rem;
  margin: 0.6rem auto 0;
  color: var(--nrpf-grey);
  font-size: 0.74rem;
  font-style: normal;
  line-height: 1.45;
  text-align: left;
}

/* Key facts: the one warm block on the page */
.nrpf-facts {
  padding: 1.8rem 1.6rem 1.4rem;
  border-radius: 4px;
  background: var(--nrpf-tint);
}

.nrpf-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.nrpf-stat {
  padding-top: 0.7rem;
  border-top: 3px solid var(--nrpf-navy);
}

.nrpf-stat strong {
  display: block;
  color: var(--nrpf-navy);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
}

.nrpf-stat > span {
  display: block;
  margin-top: 0.45rem;
  color: var(--nrpf-slate);
  font-size: 0.78rem;
  line-height: 1.45;
}

.nrpf-ref {
  color: var(--nrpf-grey);
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
}

.nrpf-note {
  margin-top: 1.1rem !important;
  color: var(--nrpf-grey);
  font-size: 0.74rem;
}

/* Cards */
.nrpf-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.nrpf-cards--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nrpf-card {
  padding: 1.1rem 1.1rem 0.9rem;
  border: 1px solid var(--nrpf-rule);
  border-top: 3px solid var(--nrpf-orange);
  border-radius: 3px;
  background: var(--nrpf-panel);
}

.nrpf-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* How it works: three steps, then three outcomes */
.nrpf-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0;
  counter-reset: nrpf-step;
}

.nrpf-step {
  position: relative;
  padding: 1.1rem 1.1rem 1rem 3.4rem;
  border: 1px solid var(--nrpf-rule);
  border-radius: 3px;
  background: #ffffff;
  counter-increment: nrpf-step;
}

.nrpf-step::before {
  content: counter(nrpf-step);
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--nrpf-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
}

.nrpf-step p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.nrpf-flow-arrow {
  margin: 0.7rem 0;
  color: var(--nrpf-orange);
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
}

.nrpf-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nrpf-outcome {
  padding: 1rem 1.1rem;
  border-radius: 3px;
}

.nrpf-outcome p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.md-typeset .nrpf-outcome h3 {
  margin-bottom: 0.3rem;
}

.nrpf-outcome--correct {
  background: var(--nrpf-navy);
  color: #ffffff;
}

.md-typeset .nrpf-outcome--correct h3 {
  color: #ffffff;
}

.nrpf-outcome--keep {
  border: 1px solid var(--nrpf-rule);
  background: var(--nrpf-panel);
}

.nrpf-outcome--review {
  border: 1px solid #ecd2b0;
  background: var(--nrpf-tint);
}

/* Research, team and references */
.nrpf-team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.nrpf-team p {
  margin: 0;
  font-size: 0.82rem;
}

.nrpf-small {
  color: var(--nrpf-grey);
  font-size: 0.76rem;
  line-height: 1.5;
}

.nrpf-references {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--nrpf-grey);
  font-size: 0.74rem;
  line-height: 1.5;
}

.nrpf-references li {
  margin-bottom: 0.45rem;
}

.nrpf-references a {
  word-break: break-all;
}

/* ------------------------------------------------------------------ narrow screens */

@media screen and (max-width: 1020px) {
  .nrpf-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nrpf-cards--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .nrpf-split,
  .nrpf-cards,
  .nrpf-steps,
  .nrpf-outcomes,
  .nrpf-team {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media screen and (max-width: 560px) {
  .nrpf-cards--four,
  .nrpf-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}
