/* ==========================================================================
   Pinescape: theme variables
   Pulled from the in-game pause menu (panel/button/header greens + mauve)
   and the tree-selection cyan seen in gameplay, centralized here so a hex
   change updates the whole site.
   ========================================================================== */
:root {
  /* Core game palette */
  --forest-dark:   #2f3b26; /* pause-menu panel background */
  --forest-mid:    #5a6f3d; /* pause-menu button rows */
  --forest-mauve:  #8a6a5c; /* pause-menu header bar */
  --accent-cyan:   #3fe0e8; /* tree-selection highlight, the one "special" color */
  --accent-lime:   #d6e24b; /* pause-menu button text */

  /* Supporting neutrals, pulled from the gameplay shot */
  --bark:          #5b4a3d;
  --sand:          #b99b5c;
  --sky:           #aebfc9;

  /* Content surface colors: dark chrome, light reading surface */
  --cream:         #f7f5ee;
  --cream-dim:     #eee9db;
  --ink:           #22281c;
  --ink-soft:      #4b5346;
  --white:         #ffffff;

  --font-display: "Rajdhani", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius: 10px;
  --wrap-width: 1120px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons: styled after the pause-menu rows (moss green + lime text)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(63,224,232,0.22), 0 6px 18px rgba(63,224,232,0.25);
}
.btn--primary {
  background: var(--forest-mid);
  color: var(--accent-lime);
}
.btn--primary:hover { background: #66803f; }
.btn--ghost {
  background: transparent;
  color: var(--forest-dark);
  border: 2px solid var(--forest-dark);
}
.btn--ghost:hover { background: var(--forest-dark); color: var(--cream); }
/* For ghost buttons sitting on the dark hero: plain .btn--ghost (dark
   text/border) nearly disappears against the hero's dark green overlay. */
.btn--ghost-inverse {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--accent-cyan);
}
.btn--ghost-inverse:hover {
  background: var(--accent-cyan);
  color: var(--forest-dark);
  box-shadow: 0 0 26px rgba(63,224,232,0.5);
}
.btn--cyan {
  background: var(--accent-cyan);
  color: var(--forest-dark);
}
.btn--cyan:hover { background: #63e8ee; }

/* Inline text links (e.g. "Stand Generator" mentions inline in copy) */
.text-link {
  color: var(--forest-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--accent-cyan); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  background: var(--forest-dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}
.brand__icon {
  height: 83px;
  width: 83px;
}
.brand__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.site-nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--cream);
  font-weight: 500;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--accent-cyan); }
.badge {
  background: var(--forest-mauve);
  color: var(--white);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 999px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
}

/* Brand + full nav only need ~690px combined at max content width, so the
   hamburger doesn't need to kick in until well below tablet width. */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--forest-dark);
    padding: 12px 24px 20px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 16px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  padding: 72px 0 88px;
  background-image: url('../img/photos/wiregrass-longleaf.jpg');
  background-size: cover;
  background-position: center 60%;
}
.hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Same gradient the hero used before video. Keeps it looking right even
     with no video file yet, and keeps hero text readable over any footage. */
  background: linear-gradient(180deg, rgba(47,59,38,0.88) 0%, rgba(36,48,29,0.92) 100%);
}
@media (max-width: 700px) {
  /* Skip the video on small screens to save mobile data. The plain
     gradient (still shown via .hero__overlay) looks fine on its own. */
  .hero__bg-video { display: none; }
}
.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
}
.hero__inner {
  display: grid;
  gap: 20px;
  max-width: 700px;
}
.hero__logo {
  width: 260px;
  height: auto;
  opacity: 0.9;
  justify-self: end;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__logo { display: none; }
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.2em;
}
.hero p.lede {
  font-size: 1.15rem;
  color: var(--cream-dim);
  max-width: 620px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

/* ==========================================================================
   Sections / cards
   ========================================================================== */
section.section {
  padding-top: 64px;
  padding-bottom: 64px;
}
section.section--alt {
  background: var(--cream-dim);
}
/* Wiregrass photo behind narrative/story sections (not every .section--alt,
   skipped on data-heavy or photo-grid sections like System Requirements
   and The Team), tinted with the section's own cream to keep text readable. */
section.section--photo-bg {
  background-image: linear-gradient(rgba(238,233,219,0.88), rgba(238,233,219,0.88)),
    url('../img/photos/wiregrass-longleaf.jpg');
  background-size: cover;
  background-position: center 60%;
}
.section__heading {
  max-width: 640px;
  margin-bottom: 32px;
}
.section__heading h2 {
  font-size: 2rem;
  color: var(--forest-dark);
}
.section__heading p {
  color: var(--ink-soft);
}

.video-frame {
  position: relative;
}
.video-frame__media {
  position: relative;
  background: var(--forest-dark);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-frame__media video, .video-frame__media iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
/* Covers everything except the native control bar strip at the bottom,
   so a click anywhere on the video toggles play/pause without ever
   fighting the browser's own controls (seek bar, volume, fullscreen).
   Clicks on that strip fall straight through to the video underneath. */
.video-click-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 44px;
  cursor: pointer;
  z-index: 1;
}
.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(34,40,28,0.55);
  border: 4px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.video-play-icon::after {
  content: "";
  border-style: solid;
  border-width: 29px 0 29px 45px;
  border-color: transparent transparent transparent var(--accent-cyan);
  margin-left: 11px;
}
.video-click-overlay:hover .video-play-icon {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(34,40,28,0.75);
}
.video-frame.is-playing .video-play-icon {
  display: none;
}
.video-placeholder {
  color: var(--cream-dim);
  text-align: center;
  padding: 24px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* HUD-style timed caption list, driven by a video-frame's data-captions
   JSON and generated/toggled in main.js. All cues sit on the right as a
   persistent agenda; the active one lights up in cyan, the rest stay
   dimmed, so viewers can see what's coming next as playback moves on. */
.video-caption-list {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(280px, calc(100% - 36px));
  pointer-events: none;
}
.video-caption-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(15, 20, 12, 0.78);
  border: 1px solid rgba(63,224,232,0.22);
  border-radius: 6px;
  padding: 8px 14px 8px 12px;
  opacity: 0.45;
  transform: translateX(6px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, background 0.3s ease;
}
.video-caption-item__mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--accent-cyan);
  opacity: 0.55;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}
.video-caption-item__text {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.76rem;
  color: var(--cream-dim);
  transition: color 0.3s ease;
}
.video-caption-item.is-active {
  opacity: 1;
  transform: translateX(0);
  border-color: var(--accent-cyan);
  background: rgba(15, 20, 12, 0.92);
  box-shadow: 0 0 0 1px rgba(63,224,232,0.2), 0 0 20px rgba(63,224,232,0.4);
}
.video-caption-item.is-active .video-caption-item__mark {
  opacity: 1;
  box-shadow: 0 0 10px rgba(63,224,232,0.95);
  animation: tag-breathe 2s ease-in-out infinite;
}
.video-caption-item.is-active .video-caption-item__text {
  color: var(--cream);
}
/* Below ~760px the overlay list crowds the video, so it drops out of
   the overlay entirely and flows as a plain stack underneath instead. */
@media (max-width: 760px) {
  .video-caption-list {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    max-width: none;
    margin-top: 14px;
  }
  .video-caption-item,
  .video-caption-item.is-active {
    transform: none;
  }
}

.grid {
  display: grid;
  gap: 20px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid #e3ddc9;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 26px rgba(63,224,232,0.2);
}
.card h3 {
  font-size: 1.1rem;
  color: var(--forest-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
/* "Coming soon" cards get a corner ribbon via ::before. */
.card--soon {
  position: relative;
  overflow: hidden;
  background: var(--cream-dim);
  border: 1px solid var(--forest-mauve);
}
.card--soon::before {
  content: "Coming soon";
  position: absolute;
  top: 16px;
  right: -38px;
  width: 150px;
  transform: rotate(45deg);
  background: var(--forest-mauve);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 4px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Feature bullet dots "breathe" (scale + glow) to draw a little life into
   the list, then pop harder on hover as direct feedback. */
.tag-mark {
  display: inline-block;
  color: var(--accent-cyan);
  animation: tag-breathe 2s ease-in-out infinite;
}
@keyframes tag-breathe {
  0%, 100% { transform: scale(1); text-shadow: 0 0 3px rgba(63,224,232,0.3); }
  50% { transform: scale(2); text-shadow: 0 0 20px rgba(63,224,232,1); }
}
.card:hover .tag-mark {
  animation-play-state: paused;
  transform: scale(2.2);
  text-shadow: 0 0 22px rgba(63,224,232,1);
  transition: transform 0.18s ease, text-shadow 0.18s ease;
}
/* Coming-soon cards get no breathing dot, hover pop, glow, or card lift. */
.card--soon .tag-mark {
  color: var(--forest-mauve);
  animation: none;
  transform: none;
  text-shadow: none;
}
.card--soon:hover {
  transform: none;
  border-color: var(--forest-mauve);
  box-shadow: none;
}
.card--soon:hover .tag-mark {
  transform: none;
  text-shadow: none;
}

.heading-icon {
  display: inline-block;
  height: 0.85em;
  width: auto;
  vertical-align: -0.1em;
  margin-right: 0.35em;
}

table.specs {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
table.specs th, table.specs td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e3ddc9;
}
table.specs th {
  width: 220px;
  color: var(--forest-dark);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}
/* Sub-section heading within a details block (e.g. inside Advanced
   Settings) — same bold-caps treatment as the details' own <summary>,
   one notch smaller so the hierarchy (Advanced Settings > sub-section)
   still reads clearly. */
.section-label {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--forest-dark);
}

/* Chain-link toggle: linked (pressed) keeps two fields equal, e.g. Plot
   Width/Height moving together as a square; click to break the link and
   move them independently. */
.link-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
}
.link-toggle[aria-pressed="true"] {
  background: var(--forest-mid);
  border-color: var(--forest-mid);
  color: var(--white);
}

/* Same chain-link visual language as .link-toggle, but sized for a text
   label instead of an icon — used to switch Stand Dimensions between a
   single Area-driven square and independently-set Width/Length. */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  flex: none;
  white-space: nowrap;
}
.mode-toggle[aria-pressed="true"] {
  background: var(--forest-mid);
  border-color: var(--forest-mid);
  color: var(--white);
}

/* ==========================================================================
   Stand Generator preview
   ========================================================================== */
.stand-results {
  display: none;
}
.stand-results.is-visible { display: block; }
.stand-preview {
  position: relative;
  margin-top: 8px;
  background: var(--cream-dim);
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  overflow: hidden;
}
.stand-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}
.stand-preview-tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  z-index: 2;
}
.stand-preview-tooltip.is-visible { display: block; }
.stand-preview-tooltip--dark {
  background: var(--white);
  color: var(--ink);
  border: 1px solid #e3ddc9;
}
.stand-preview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 2px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.stand-preview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-swatch--ring {
  background: rgba(127,194,92,0.85);
  box-shadow: 0 0 0 1.5px rgba(232,151,63,0.9);
}
.legend-swatch--firescar {
  background: rgba(127,194,92,0.85);
  box-shadow: 0 0 0 1.5px rgba(25,22,20,0.95);
}

.callout {
  margin-top: 24px;
  background: var(--cream-dim);
  border: 1px solid #e3ddc9;
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.callout h3 { margin-bottom: 0.4em; }
.callout .btn { margin-top: 4px; }

.stand-histogram {
  margin-top: 24px;
  background: var(--white);
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
}
.stand-histogram h4 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--forest-dark);
}
.stand-histogram canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Getting Started: collapsible guide sections
   ========================================================================== */
.guide-section {
  background: var(--white);
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.guide-section summary {
  cursor: pointer;
  padding: 18px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.05rem;
  color: var(--forest-dark);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.guide-section summary::-webkit-details-marker { display: none; }
.guide-section summary::after {
  content: "+";
  flex: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent-cyan);
  transition: transform 0.15s ease;
}
.guide-section[open] summary { border-bottom: 1px solid #e3ddc9; }
.guide-section[open] summary::after { transform: rotate(45deg); }
.guide-section__body {
  padding: 20px 24px 24px;
}
.guide-section__body h3 {
  font-size: 1rem;
  color: var(--forest-dark);
  margin-top: 1.6em;
}
.guide-section__body h3:first-child { margin-top: 0; }
.guide-section__body ol,
.guide-section__body ul {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
.guide-section__body li { margin-bottom: 0.4em; }
.guide-section__body code {
  background: var(--cream-dim);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
.guide-placeholder {
  background: var(--cream-dim);
  border: 1px dashed #cfc7ab;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 16px 0;
}
.guide-placeholder strong {
  display: block;
  color: var(--forest-dark);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.75rem;
  margin-bottom: 6px;
}
.guide-screenshot {
  margin: 16px 0;
  max-width: 420px;
}
.guide-screenshot img {
  display: block;
  width: 100%;
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
}
.guide-screenshot figcaption {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================================================
   Contact form
   ========================================================================== */
.contact-form {
  max-width: 520px;
  margin-top: 32px;
}
#stand-generator-form {
  background: var(--white);
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  padding: 24px;
}
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--forest-dark);
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  padding: 10px 14px;
}
.form-field textarea { resize: vertical; }
.slider-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.slider-field input[type="range"] {
  flex: 1;
  accent-color: var(--accent-cyan);
}
/* Fully draggable, just visually inert — a "coming soon" slider whose
   value gets reset to 0 in JS regardless of where it's dragged. */
.slider-field input[type="range"].is-inert {
  accent-color: var(--ink-soft);
}
.slider-field input[type="number"] {
  width: 80px;
  flex: none;
}
/* Min/mid/max labels directly under a slider, each with a small tick dash
   above it. Native <input type=range> widgets are drawn by the OS/browser
   as a single opaque unit, so anything positioned over or under the track
   itself gets painted over regardless of z-index — putting the ticks here,
   below the track and attached to the numbers, sidesteps that entirely.
   Right-margin matches the number input's width + the slider-field gap, so
   the row lines up under the range track rather than spanning the number
   field too. */
.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  margin-right: 92px;
  padding-top: 6px;
  padding-left: 2px;
  padding-right: 2px;
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.slider-scale span {
  position: relative;
}
.slider-scale span::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 5px;
  background: rgba(75, 83, 70, 0.45);
}
.form-field input:disabled {
  background: #ece7d6;
  color: var(--ink-soft);
  cursor: not-allowed;
}
.slider-field input[type="range"]:disabled {
  accent-color: var(--ink-soft);
  cursor: not-allowed;
}
.derived-tag {
  text-transform: none;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--forest-mid);
  margin-left: 4px;
}
.derived-tag:not(:empty)::before { content: '\2014\0020'; }

/* The currently-derived Density/QMD/Basal Area field gets a hatched box
   behind its label + slider, as an obvious "this one's calculated for you"
   cue. Absolutely positioned so it doesn't add padding to the field itself
   and never shifts the grid row it sits in. */
.form-field.is-derived {
  position: relative;
  z-index: 0;
}
.form-field.is-derived::before {
  content: '';
  position: absolute;
  inset: -10px -12px;
  z-index: -1;
  background: repeating-linear-gradient(
    45deg,
    #e3ddc9 0, #e3ddc9 6px,
    #f3f0e4 6px, #f3f0e4 12px
  );
  border: 1px solid #d8d0b8;
  border-radius: var(--radius);
}

/* Segmented toggle-button group: real radio inputs, visually hidden, with
   the following <label> styled as a pressed/unpressed button. Keeps native
   radio semantics (keyboard nav, screen readers) with a button/switch look. */
.toggle-group {
  display: inline-flex;
  border: 1px solid #e3ddc9;
  border-radius: var(--radius);
  overflow: hidden;
}
.toggle-group input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.toggle-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0 18px;
  height: 40px;
  min-width: 140px;
  box-sizing: border-box;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--white);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.toggle-group label:not(:last-of-type) { border-right: 1px solid #e3ddc9; }
.toggle-group input[type="radio"]:checked + label {
  background: var(--forest-mid);
  color: var(--white);
}
.toggle-group input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--accent-cyan);
  outline-offset: -2px;
}
.pattern-icon { flex: none; }
.checkbox-field {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
.checkbox-field input[type="checkbox"],
.checkbox-field input[type="radio"] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--accent-cyan);
}

/* ==========================================================================
   Coming-soon page layout
   ========================================================================== */
.page-header {
  padding-top: 56px;
  padding-bottom: 12px;
}
.page-header h1 { color: var(--forest-dark); }
.page-header .lede { color: var(--ink-soft); font-size: 1.1rem; }
.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.jump-links a {
  color: var(--forest-dark);
  background: var(--white);
  border: 1px solid #e3ddc9;
  border-radius: 999px;
  padding: 6px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  text-decoration: none;
}
.jump-links a:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.coming-soon-panel {
  padding-bottom: 56px;
}
.coming-soon-badge {
  display: inline-block;
  background: var(--forest-mauve);
  color: var(--white);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ==========================================================================
   About page: partners + team
   ========================================================================== */
.about-photo {
  margin: 32px 0;
  max-width: 50%;
}
@media (max-width: 760px) {
  .about-photo { max-width: 100%; }
}
.about-photo img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}
.about-photo figcaption {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-style: italic;
}

.partner-card {
  position: relative;
  text-align: center;
  background: var(--forest-dark);
  border-color: var(--forest-dark);
  cursor: pointer;
}
/* Stretches the logo link's hit area to cover the whole card. Later-painted
   siblings (like the inline "Landscape Ecology Lab" link) still sit on top
   in default stacking order, so nested links stay independently clickable. */
.partner-card > a:first-of-type::after {
  content: "";
  position: absolute;
  inset: 0;
}
.partner-card img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 16px;
}
.partner-card h3 { justify-content: center; color: var(--white); }
.partner-card p { color: var(--cream-dim); font-size: 0.92rem; }
.partner-card a.text-link { color: var(--accent-cyan); }

.team-card { text-align: center; }
.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: var(--forest-mid);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card h3 { justify-content: center; margin-bottom: 0.2em; }
.team-card .team-role {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  color: var(--forest-mid);
  margin-bottom: 0.8em;
}
.team-card p { color: var(--ink-soft); font-size: 0.92rem; }

/* ==========================================================================
   Footer / credits
   ========================================================================== */
.site-footer {
  background: var(--forest-dark);
  color: var(--cream-dim);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.credits__label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}
.credits__logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 0;
  margin: 0 0 32px;
}
.credits__logos a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.credit-logo {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.credit-logo--nrcs {
  /* NRCS lockup is a ~10.5:1 wide wordmark, not a square-ish mark like the
     others — the shared height/max-width would clip it down to ~17px tall
     via object-fit: contain, so it gets its own sizing to render proportionally. */
  height: 34px;
  max-width: 360px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}
.footer-links a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--accent-cyan); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--accent-cyan); text-decoration: none; }

/* ==========================================================================
   Under-construction banner
   ========================================================================== */
.construction-banner {
  background: repeating-linear-gradient(
    45deg,
    #f5c518, #f5c518 20px,
    #1a1a1a 20px, #1a1a1a 40px
  );
  padding: 7px 0;
  text-align: center;
}
.construction-banner__label {
  display: inline-block;
  background: #1a1a1a;
  color: #f5c518;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  padding: 4px 18px;
  border-radius: 999px;
}
