/* ============================================================
   ReelMetrics — Shared Stylesheet
   All public-facing pages link to this file.
   Internal page styles are scoped under html.page-internal.
   ============================================================ */

/* ── Section 1: Public site design tokens ── */
:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --panel: rgba(255, 255, 255, 0.78);
  --text: #132225;
  --muted: #506063;
  --accent: #a64b2a;
  --border: rgba(19, 34, 37, 0.12);
  --shadow: 0 2px 12px rgba(19, 34, 37, 0.08), 0 1px 3px rgba(19, 34, 37, 0.06);
}

/* ── Section 2: Global reset ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Section 3: Base (body, html) ── */
body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(166, 75, 42, 0.14), transparent 38%),
    linear-gradient(160deg, #f6f1e8 0%, #ede6d9 100%);
  line-height: 1.6;
}

/* ── Section 4: Layout ── */
.container {
  width: min(900px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.container-narrow {
  width: min(640px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.section-alt {
  background: #fff;
}

.section-alt .container {
  padding: 0;
}

section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ── Section 5: Typography ── */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

p {
  color: var(--muted);
  max-width: 40rem;
}

/* ── Section 6: Navigation ── */
.topnav {
  padding: 1.5rem 0 0;
}

.topnav a {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.topnav a:hover {
  color: var(--text);
}

.topnav a::before {
  content: "←";
  color: var(--accent);
}

/* ── Section 7: Buttons ── */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 0.4rem;
  box-shadow: 0 2px 8px rgba(166, 75, 42, 0.3);
}

.btn-secondary {
  display: inline-block;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.back-link {
  display: inline-block;
  padding: 2rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.back-link:hover {
  color: var(--accent);
}

/* ── Section 8: Hero ── */
.hero {
  padding: 5rem 0 4rem;
}

.hero h1 {
  max-width: 18ch;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 2rem;
}

.trust-item {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-item::before {
  content: "—";
  color: var(--accent);
}

/* ── Section 9: Report grid ── */
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

.report-item {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.report-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.report-item p {
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: none;
}

/* ── Section 10: Steps ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
  counter-reset: steps;
}

.step {
  counter-increment: steps;
}

.step-number {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 0.75rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.95rem;
}

/* ── Section 11: Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.95rem;
  max-width: none;
}

/* ── Section 12: Alpha list ── */
.alpha-list {
  list-style: none;
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.alpha-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  align-items: flex-start;
  max-width: 46rem;
}

.alpha-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ── Section 13: Team cards ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.team-card {
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  text-align: center;
}

.team-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.85rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.member-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.member-role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.team-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: left;
  max-width: none;
}

/* ── Section 14: Early access form ── */
.form-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 2.25rem 2.5rem;
  margin: 2rem 0 3rem;
  backdrop-filter: blur(8px);
}

.field {
  margin-bottom: 1.4rem;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.45rem;
}

label .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23506063' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.btn-submit {
  display: inline-block;
  width: 100%;
  padding: 0.85rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  border: none;
  border-radius: 0.55rem;
  box-shadow: 0 2px 8px rgba(166, 75, 42, 0.3);
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: #8f3e22;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

/* ── Section 15: Team page ── */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.grid-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.member {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.member h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: var(--accent);
}

.role {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.bio {
  line-height: 1.7;
  color: var(--text);
}

.bio p {
  margin: 0.8rem 0;
}

.bio ul {
  margin: 0.8rem 0;
  padding-left: 1.2rem;
}

.bio li {
  margin: 0.4rem 0;
}

.team-footer-contact {
  margin-top: 1rem;
}

/* ── Section 16: FAQ ── */
.faq {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.faq-item {
  max-width: 44rem;
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.faq-item p {
  font-size: 0.95rem;
}

/* ── Section 17: Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.82rem;
  color: var(--muted);
}

footer .inner {
  width: min(900px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}

footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

footer .inner-narrow {
  width: min(640px, calc(100% - 2.5rem));
}

/* ── Section 18: Responsive ── */
@media (max-width: 600px) {
  section {
    padding: 3rem 0;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .form-card {
    padding: 1.5rem 1.25rem;
  }
}

/* ── Section 19: Internal page styles ── */
/* All selectors scoped with html.page-internal to prevent conflicts */

html.page-internal body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--pi-body-font);
  color: var(--pi-text);
  background:
    radial-gradient(circle at top left, rgba(163, 78, 47, 0.22), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(197, 146, 61, 0.2), transparent 20%),
    linear-gradient(135deg, var(--pi-bg) 0%, #eadfce 46%, var(--pi-bg-deep) 100%);
  position: relative;
  overflow-x: hidden;
}

html.page-internal {
  --pi-bg: #f3ecdf;
  --pi-bg-deep: #e2d1bc;
  --pi-panel: rgba(255, 250, 244, 0.8);
  --pi-panel-strong: rgba(255, 252, 248, 0.92);
  --pi-text: #122127;
  --pi-muted: #58666a;
  --pi-accent: #a34e2f;
  --pi-accent-dark: #6d2e17;
  --pi-accent-soft: rgba(163, 78, 47, 0.12);
  --pi-gold: #c5923d;
  --pi-border: rgba(18, 33, 39, 0.12);
  --pi-border-strong: rgba(18, 33, 39, 0.2);
  --pi-shadow: 0 26px 70px rgba(61, 46, 28, 0.12);
  --pi-shadow-soft: 0 16px 36px rgba(61, 46, 28, 0.08);
  --pi-heading-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Baskerville, "Times New Roman", serif;
  --pi-body-font: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  scroll-behavior: smooth;
}

html.page-internal body::before,
html.page-internal body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

html.page-internal body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 86px,
      rgba(18, 33, 39, 0.03) 86px,
      rgba(18, 33, 39, 0.03) 87px
    );
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent 30%);
}

html.page-internal body::after {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.34), transparent 20%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.25), transparent 18%);
  opacity: 0.85;
}

html.page-internal a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

html.page-internal a:hover {
  color: var(--pi-accent-dark);
}

html.page-internal main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 5rem;
  position: relative;
  z-index: 1;
}

html.page-internal .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.54);
  backdrop-filter: blur(10px);
  box-shadow: var(--pi-shadow-soft);
  font-size: 0.95rem;
}

html.page-internal .topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

html.page-internal .topbar a:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

html.page-internal .hero,
html.page-internal .content,
html.page-internal .toc {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.75rem;
  background: var(--pi-panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--pi-shadow);
}

html.page-internal .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.95fr);
  gap: 1.4rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}

html.page-internal .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(197, 146, 61, 0.16), transparent 30%);
  pointer-events: none;
}

html.page-internal .hero-copy,
html.page-internal .hero-panel {
  position: relative;
  z-index: 1;
}

html.page-internal .eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(163, 78, 47, 0.18);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pi-accent);
}

html.page-internal h1 {
  margin: 0 0 1rem;
  max-width: 11ch;
  font-family: var(--pi-heading-font);
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
}

html.page-internal .hero p {
  max-width: 48rem;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--pi-muted);
}

html.page-internal .hero-intro {
  max-width: 44rem;
}

html.page-internal .meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

html.page-internal .meta span {
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--pi-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-size: 0.92rem;
  color: var(--pi-text);
}

html.page-internal .hero-panel {
  align-self: stretch;
  padding: 1.3rem;
  border: 1px solid var(--pi-border);
  border-radius: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(252, 245, 237, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

html.page-internal .hero-panel h2 {
  margin: 0 0 0.9rem;
  font-family: var(--pi-heading-font);
  font-size: 1.45rem;
}

html.page-internal .hero-panel p {
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

html.page-internal .hero-panel ul {
  margin: 0;
}

html.page-internal .hero-panel li {
  color: var(--pi-text);
}

html.page-internal .hero-panel li strong {
  color: var(--pi-accent-dark);
}

html.page-internal .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

html.page-internal .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

html.page-internal .button-link.primary {
  background: linear-gradient(135deg, var(--pi-accent) 0%, var(--pi-accent-dark) 100%);
  color: #fff9f5;
  box-shadow: 0 12px 24px rgba(109, 46, 23, 0.22);
}

html.page-internal .button-link.secondary {
  border: 1px solid var(--pi-border-strong);
  background: rgba(255, 255, 255, 0.68);
}

html.page-internal .button-link:hover {
  transform: translateY(-1px);
}

html.page-internal .layout {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

html.page-internal .toc {
  position: sticky;
  top: 1rem;
  padding: 1.15rem;
}

html.page-internal .toc h2 {
  margin: 0 0 0.4rem;
  font-family: var(--pi-heading-font);
  font-size: 1.35rem;
}

html.page-internal .toc p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

html.page-internal .toc ol {
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

html.page-internal .toc li + li {
  margin-top: 0.45rem;
}

html.page-internal .toc a {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 0.95rem;
  text-decoration: none;
  color: var(--pi-muted);
}

html.page-internal .toc a:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--pi-text);
}

html.page-internal .toc-note {
  padding: 0.9rem;
  border: 1px solid var(--pi-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.58);
}

html.page-internal .toc-note strong {
  display: block;
  margin-bottom: 0.35rem;
}

html.page-internal .content {
  padding: 1rem;
  counter-reset: section-card;
}

html.page-internal .content > section {
  position: relative;
  padding: 1.5rem 1.4rem 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, var(--pi-panel-strong), rgba(251, 246, 239, 0.88));
  box-shadow: var(--pi-shadow-soft);
  overflow: hidden;
  counter-increment: section-card;
  animation: float-up 520ms ease both;
}

html.page-internal .content > section::before {
  content: counter(section-card, decimal-leading-zero);
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-family: var(--pi-heading-font);
  font-size: 3.1rem;
  line-height: 1;
  color: rgba(163, 78, 47, 0.12);
  pointer-events: none;
}

html.page-internal .content > section:nth-of-type(3n + 1) {
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.95), rgba(248, 240, 231, 0.9));
}

html.page-internal .content > section:nth-of-type(3n + 2) {
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.95), rgba(244, 238, 231, 0.9));
}

html.page-internal .content > section:nth-of-type(3n) {
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.96), rgba(246, 241, 234, 0.9));
}

html.page-internal .content > section + section {
  margin-top: 1rem;
}

html.page-internal h2 {
  margin: 0 0 0.9rem;
  max-width: 24ch;
  font-family: var(--pi-heading-font);
  font-size: 2rem;
  line-height: 1.04;
}

html.page-internal h3 {
  margin: 1.25rem 0 0.55rem;
  font-family: var(--pi-heading-font);
  font-size: 1.35rem;
  color: var(--pi-accent-dark);
}

html.page-internal p,
html.page-internal li,
html.page-internal dd {
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--pi-muted);
}

html.page-internal p {
  margin: 0 0 1rem;
}

html.page-internal ul,
html.page-internal ol {
  margin: 0.35rem 0 1rem;
  padding-left: 1.1rem;
}

html.page-internal li + li {
  margin-top: 0.45rem;
}

html.page-internal ul li::marker {
  color: var(--pi-accent);
}

html.page-internal dl {
  margin: 0;
}

html.page-internal dt {
  margin-top: 1rem;
  font-family: var(--pi-heading-font);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--pi-text);
}

html.page-internal dd {
  margin: 0.35rem 0 0;
}

html.page-internal .source-note {
  margin-top: 1.1rem;
  font-size: 0.92rem;
  color: var(--pi-muted);
}

html.page-internal code {
  padding: 0.15rem 0.35rem;
  border-radius: 0.4rem;
  background: rgba(18, 33, 39, 0.06);
  font-size: 0.92em;
}

@keyframes float-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  html.page-internal main {
    width: min(100%, calc(100% - 1rem));
    padding-top: 0.9rem;
  }

  html.page-internal .topbar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 1.25rem;
  }

  html.page-internal .topbar a {
    justify-content: center;
  }

  html.page-internal .hero {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }

  html.page-internal .layout {
    grid-template-columns: 1fr;
  }

  html.page-internal .toc {
    position: static;
  }

  html.page-internal h1 {
    max-width: none;
  }

  html.page-internal .content {
    padding: 0.5rem;
  }

  html.page-internal .content > section {
    padding: 1.25rem 1rem 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.page-internal {
    scroll-behavior: auto;
  }

  html.page-internal *,
  html.page-internal *::before,
  html.page-internal *::after {
    animation: none !important;
    transition: none !important;
  }
}
