:root {
  --ink: #173c30;
  --muted: #56695f;
  --paper: #f6f7f0;
  --line: #d9dfd3;
  --lime: #d6f08a;
  --green: #5a771e;
  --header-bg: #cae4a6;
  --tint: #d8e8c2;
}

body[data-service="bioacoustic"] { --tint: #c3ded3; }
body[data-service="diy-lulc"]    { --tint: #e3dbc3; }

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 Arial, Helvetica, sans-serif;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

body.modal-open {
  overflow: hidden;
}

.wrap {
  width: min(89%, 1400px);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- 3. Header ---------- */
.site-header {
  position: relative;
  z-index: 5;
  background: var(--header-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 90px;
  padding-block: 5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-logo {
  width: auto;
  height: 76px;
}

.brand small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-weight: 700;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  transform: scale(1.06);
}

.nav-doc {
  padding: 11px 20px;
  border-radius: 8px;
  background: #4d6e27;
  color: #ffffff;
  font-weight: 600;
}

.header-branch-border {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 28px;
  margin-top: -1px;
  pointer-events: none;
}

/* ---------- 4. Back link + hero ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 16px;
  padding: 10px 22px;
  border-radius: 30px;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(23, 60, 48, 0.15);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}

.back:hover {
  background: #285641;
  transform: translateX(-4px);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.service-hero,
.service-layout > * {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.service-layout > :nth-child(2) {
  animation-delay: 0.15s;
}

.service-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: center;
  padding: 28px 36px;
  border: 1px solid #5daa11;
  border-radius: 16px;
  background-color: #d1d1ca;
  background-image:
    linear-gradient(rgba(31, 65, 49, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 65, 49, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 15% 20%, var(--tint) 0, transparent 55%),
    radial-gradient(circle at 85% 30%, #cde2c4 0, transparent 45%),
    radial-gradient(circle at 70% 90%, #e1edd8 0, transparent 50%);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%, 100% 100%;
}

.service-name {
  margin: 0 0 10px;
  font: 400 clamp(36px, 4vw, 56px) / 1.05 Georgia, serif;
  letter-spacing: -1px;
}

.lead {
  max-width: 560px;
  margin: 0 0 18px;
  color: #3f564b;
  font-size: 16px;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.try-button,
.method-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 22px;
  border-radius: 10px;
  font: 600 15px Arial, sans-serif;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.try-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: 0 6px 18px rgba(23, 60, 48, 0.2);
  color: #ffffff;
}

.try-button span {
  color: var(--lime);
}

.try-button:hover {
  background: #285641;
  transform: translateY(-2px);
}

.method-button {
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
}

.method-button:hover {
  border-color: var(--green);
  background: #edf3e7;
  transform: translateY(-2px);
}

.access {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-art {
  position: relative;
  overflow: hidden;
  border: 4px solid #ffffff;
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(23, 60, 48, 0.22);
  transform: rotate(1.5deg);
  animation: float 6s ease-in-out infinite alternate;
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--tint);
  object-fit: cover;
}

@keyframes float {
  to { transform: rotate(-0.5deg) translateY(-8px); }
}

/* ---------- 5. Content ---------- */
.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: start;
  padding: 36px 0 80px;
}

.about-card,
.usage-guide {
  margin-bottom: 22px;
  padding: 26px 28px;
  border: 1px solid #c8d5be;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(23, 60, 48, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover,
.usage-guide:hover {
  border-color: #739450;
  box-shadow: 0 16px 36px rgba(23, 60, 48, 0.12);
}

/* "How to use it" heading with a Walk Through button beside it */
.usage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.usage-head h3 {
  margin: 0;
}

.walkthrough-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font: 600 14px Arial, sans-serif;
  transition: background 0.3s ease, transform 0.3s ease;
}

button.walkthrough-button {
  cursor: pointer;
}

.walkthrough-button span {
  color: var(--lime);
}

.walkthrough-button:hover {
  background: #285641;
  transform: translateY(-2px);
}

.about-card h2,
.usage-guide h3 {
  margin: 0 0 12px;
  font: 400 24px / 1.2 Georgia, serif;
}

.about-copy {
  margin: 0 0 10px;
  color: var(--muted);
}

.resource-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.resource-link:hover {
  border-color: #4a6318;
  background: #4a6318;
  transform: translateY(-2px);
}

/* <button> version of .resource-link (opens the repo popup) */
button.resource-link {
  width: 100%;
  color: #ffffff;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}

/* Repository chooser popup (same look as the Methodology popup, just narrower) */
.repo-modal {
  max-width: 520px;
}

/* Walk Through popup: same size as Methodology, the PDF fills the whole popup body */
.slides-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 36px; /* keep clear of the close (×) button */
}

.modal-container .slides-head h2 {
  margin: 0;
}

.slides-open {
  flex: none;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
}

.slides-stage {
  display: block;
  width: 100%;
  height: calc(100dvh - 230px);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f1f4ec;
  color: var(--muted);
  font-size: 14px;
}

.slides-stage.is-pages {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #e6eadf;
}

.slides-pages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.slides-pages canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.slides-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.slides-loading {
  margin: 0;
  padding: 24px;
  text-align: center;
}

.modal-container .slides-help {
  margin: 10px 0 0;
  color: #9a3b2a;
  font-size: 14px;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-step {
  position: relative;
  display: flex;
  gap: 16px;
}

.timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: -18px;
  left: 15px;
  width: 2px;
  background: #c3d6ae;
}

.step-num {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 4px 10px rgba(90, 119, 30, 0.25);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.step-text {
  padding-top: 4px;
  color: #2c4236;
  font-size: 14.5px;
}

/* ---------- 6. Video ---------- */
/* Right column: video card with the GitHub and Walk Through buttons under it */
.video-column {
  display: grid;
  gap: 18px;
}

.walkthrough-github-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(90, 119, 30, 0.35);
  border-radius: 20px;
  background: var(--tint); /* same soft colour as the hero, changes per service */
  box-shadow: 0 20px 50px rgba(23, 60, 48, 0.12);
}

.walkthrough-github-card .resource-link,
.walkthrough-github-card .walkthrough-button {
  justify-content: center;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
}

.video-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(23, 60, 48, 0.09);
}

.video-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f5;
}

.video-heading h2 {
  margin: 0;
  font: 700 17px Arial, sans-serif;
}

.video-tag {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--lime);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.video-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #112820;
}

.video-stage iframe,
.video-stage video {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
  object-fit: contain;
}

.video-empty {
  padding: 20px;
  color: #c8d3cb;
  text-align: center;
}

.video-symbol {
  display: block;
  color: var(--lime);
  font-size: 46px;
}

.video-empty p {
  margin: 4px 0 0;
  font-size: 14px;
}

.video-caption {
  padding: 22px 28px;
}

.video-caption h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.video-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.video-caption .video-help {
  margin-top: 8px;
  color: #9a3b2a;
}

/* ---------- 7. Methodology popup ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 30, 23, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(15, 45, 33, 0.3);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-open .modal-container {
  transform: none;
}

.modal-close-btn {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  width: 44px;
  height: 44px;
  margin: -24px -24px -20px auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--ink);
}

.modal-container h2 {
  margin: 0 0 14px;
  font: 400 clamp(24px, 4vw, 30px) Georgia, serif;
}

.modal-container p {
  margin: 0 0 16px;
  color: #4a5c52;
}

.modal-container .eyebrow {
  margin-bottom: 8px;
  color: var(--green);
}

.modal-diagram-img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.modal-footer {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  text-align: center;
}

.modal-btn + .modal-btn {
  background: var(--green);
}

/* A lone footer button (Methodology popup): centred, half width */
.modal-footer .modal-btn:only-child {
  flex: 0 0 50%;
}

.modal-footer:has(> .modal-btn:only-child) {
  justify-content: center;
}

/* <button> version of .modal-btn (opens the repo popup on top of Methodology) */
button.modal-btn {
  border: 0;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* Methodology content (Drone and DIY LULC) */
.method-sub {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.method-flow {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin: 0 0 22px;
}

.flow-step {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 14px 10px 12px;
  border: 1px solid #c8d5be;
  border-radius: 12px;
  background: #f1f7ea;
  text-align: center;
}

.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -13px;
  z-index: 1;
  color: var(--green);
  font-size: 16px;
  font-weight: 700;
  transform: translateY(-50%);
}

.flow-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.flow-title {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.flow-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* DIY LULC uses raised flow cards with the number sitting on the top edge */
body[data-service="diy-lulc"] .method-flow {
  gap: 16px;
  margin: 4px 0 26px;
}

body[data-service="diy-lulc"] .flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px 14px;
  border-top: 4px solid var(--green);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(23, 60, 48, 0.07);
}

body[data-service="diy-lulc"] .flow-step:not(:last-child)::after {
  right: -15px;
  font-size: 18px;
}

body[data-service="diy-lulc"] .flow-num {
  width: 32px;
  height: 32px;
  margin: -34px auto 10px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(90, 119, 30, 0.3);
  font-size: 14px;
}

body[data-service="diy-lulc"] .flow-title {
  font-size: 13.5px;
  line-height: 1.25;
}

body[data-service="diy-lulc"] .flow-sub {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.4;
}

.method-section {
  margin: 0 0 22px;
}

.method-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.method-section p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
}

.method-list {
  margin: 0;
  padding-left: 20px;
  color: #4a5c52;
}

.method-list li {
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.6;
}

.method-list strong,
.method-table strong {
  color: var(--ink);
}

.method-list code,
.method-table code {
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef4e4;
  color: var(--ink);
  font-size: 13px;
}

.method-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 14px;
}

.method-table th,
.method-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: #4a5c52;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.method-table th {
  background: #eef4e4;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.4px;
}

.method-table td:first-child {
  white-space: nowrap;
}

.method-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: #f1f7ea;
  color: #2c4236;
  font-size: 14px;
  line-height: 1.55;
}

.method-diagram {
  margin-top: 12px;
}

/* Methodology extras (used by Bioacoustic): stage tags, formulas, stat and metric cards */
.stage-tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.formula {
  margin: 10px 0;
  padding: 10px 14px;
  overflow-x: auto;
  border: 1px solid #c8d5be;
  border-radius: 10px;
  background: #f1f7ea;
  color: var(--ink);
  font: 15px/1.7 "Cambria Math", Georgia, serif;
  white-space: nowrap;
}

.formula sub,
.formula sup,
.formula-key sub {
  font-size: 0.75em;
}

.formula-key {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.stat-row,
.metric-grid {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
}

.stat-row {
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  padding: 14px 12px;
  border: 1px solid #c8d5be;
  border-top: 4px solid var(--green);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(23, 60, 48, 0.06);
  text-align: center;
}

.stat-value {
  display: block;
  color: var(--green);
  font: 400 26px/1.15 Georgia, serif;
}

.stat-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.metric-grid {
  grid-template-columns: repeat(2, 1fr);
}

.metric-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.metric-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #c8d5be;
  border-radius: 12px;
  background: #f1f7ea;
}

.metric-name {
  display: block;
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.metric-full {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.metric-card .formula {
  margin: 6px 0 8px;
  padding: 6px 10px;
  background: #ffffff;
  font-size: 13.5px;
}

.metric-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.method-label {
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.method-credit {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- 8. Footer ---------- */
.site-footer {
  padding: 30px 0;
  background: var(--ink);
  color: #c8d3cb;
  font-size: 13px;
}

.site-footer a {
  color: #c5db9e;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 48px);
  }

  .brand-logo {
    height: 56px;
  }

  nav {
    gap: 16px;
  }

  .service-hero,
  .service-layout {
    grid-template-columns: 1fr;
  }

  .service-hero {
    padding: 28px 24px;
  }

  .hero-art {
    max-width: 520px;
  }

}

@media (max-width: 700px) {
  /* Methodology flow turns vertical */
  .method-flow,
  body[data-service="diy-lulc"] .method-flow {
    flex-direction: column;
    gap: 26px;
  }

  .flow-step:not(:last-child)::after,
  body[data-service="diy-lulc"] .flow-step:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: auto;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
  }

  .method-table {
    display: block;
    overflow-x: auto;
  }

  .stat-row,
  .metric-grid,
  .metric-grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .wrap {
    width: calc(100% - 36px);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px 18px;
    padding-block: 14px;
  }

  .brand {
    font-size: 19px;
  }

  nav {
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .nav-doc {
    padding: 8px 14px;
  }

  .service-hero {
    padding: 22px 18px;
  }

  .service-actions {
    flex-direction: column;
  }

  .try-button,
  .method-button {
    width: 100%;
  }

  .service-layout {
    gap: 28px;
    padding: 28px 0 56px;
  }

  .about-card,
  .usage-guide {
    padding: 22px 20px;
  }

  .video-heading,
  .video-caption {
    padding: 16px 18px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-container {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 28px 20px 20px;
    border-radius: 16px;
  }

  .modal-close-btn {
    margin: -16px -12px -24px auto;
  }

  .slides-head {
    padding-right: 44px;
  }

  .slides-stage {
    height: calc(100dvh - 200px);
  }

  .walkthrough-github-card {
    grid-template-columns: 1fr;
    border-radius: 0px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }

  /* on phones the lone button goes back to full width */
  .modal-footer .modal-btn:only-child {
    flex: none;
  }

  .site-footer .wrap {
    flex-direction: column;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}