/* Tether interim design system (DIR project)
   Working brand. Rename later without changing structure.
   Direction: cool mist + deep forest. Trust first, no wellness cliché. */

:root {
  color-scheme: light;
  --bg: #eef2f0;
  --bg-deep: #dfe8e3;
  --surface: #f8faf8;
  --ink: #12201c;
  --ink-soft: #3d524b;
  --line: rgba(18, 32, 28, 0.12);
  --accent: #1f6b57;
  --accent-deep: #134739;
  --accent-soft: #c7e4da;
  --warn: #7a4b16;
  --warn-soft: #f3e4cf;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(18, 32, 28, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(31, 107, 87, 0.14), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(196, 180, 140, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  min-height: 100vh;
  /* Long emails / URLs in profile copy should wrap, not blow the grid */
  overflow-wrap: break-word;
  /* Notched phones: keep chrome off the home-indicator / side insets */
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

img {
  max-width: 100%;
  display: block;
}

/* START RESPONSIVE PICTURE WRAPPERS
   Keep <picture> layout identical to the bare <img> it replaced. */
picture {
  display: block;
  max-width: 100%;
}

.brand picture {
  display: block;
  line-height: 0;
}

.img-slot picture,
.footer-art picture {
  width: 100%;
}
/* END RESPONSIVE PICTURE WRAPPERS */

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  /* Match tight JPEG corner sage (file ≈#EAEFEB; JP target #EAEFEC) so plate disappears */
  background: #eaefeb;
  border-bottom: 1px solid var(--line);
  /* Keep sticky chrome clear of the iOS status/notch area */
  padding-top: env(safe-area-inset-top, 0px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem 0.2rem 0;
  color: inherit;
  text-decoration: none;
}

/* Knot + wordmark lockup — opaque mark on sage #EAEFEC (responsive AVIF/WebP/JPEG; no knockout/halo/plate) */
.site-logo {
  display: block;
  height: 5.75rem;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-sub {
  display: none;
}

.nav > nav {
  flex: 0 0 auto;
  min-width: 0;
}

@media (max-width: 860px) {
  .site-logo {
    height: 4.6rem;
  }
}

@media (max-width: 640px) {
  .nav {
    gap: 0.75rem;
    padding: 0.65rem 0;
    flex-wrap: wrap;
  }

  .site-logo {
    height: 3.6rem;
    max-width: min(12.5rem, 52vw);
  }

  /* Let the link row shrink/wrap instead of pushing past the viewport */
  .nav > nav {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .nav-links {
    gap: 0.55rem 0.75rem;
    justify-content: flex-end;
  }

  .nav-links a:not(.btn) {
    font-size: 0.9rem;
  }

  /* Prefer wrapping chips over horizontal scroll on narrow phones */
  .chip-row {
    gap: 0.4rem;
  }

  .chip {
    padding: 0.45rem 0.75rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 380px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .site-logo {
    height: 3.1rem;
    max-width: min(10.5rem, 48vw);
  }

  .nav > nav {
    width: 100%;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-links a.btn-small {
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
  }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Text-link colours only — exclude .btn so primary CTA text is not forced to ink-soft */
.nav-links a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn)[aria-current="page"] {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* START KEYBOARD FOCUS RINGS
   Visible :focus-visible on all interactive controls (links, buttons, fields).
   Mouse clicks keep UA :focus without forcing a persistent ring. */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

a.btn-primary:focus-visible,
button.btn-primary:focus-visible,
.btn-primary:focus-visible {
  outline-color: var(--accent-deep);
}
/* END KEYBOARD FOCUS RINGS */

/* START SKIP LINK
   First Tab stop jumps past sticky header into main content.
   Clip-hidden (not display:none / off-document) so it stays in tab order. */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 100;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.skip-link:focus,
.skip-link:focus-visible {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.55rem 0.9rem;
  clip: auto;
  overflow: visible;
  border-radius: 999px;
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}
/* END SKIP LINK */

/* High-contrast label on green pill (header Apply + all twin .btn-primary CTAs) */
a.btn-primary,
button.btn-primary,
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

a.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:hover {
  background: var(--accent-deep);
  color: #ffffff;
}

/* Belt-and-braces: nav Apply must stay white even if link rules tighten later */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary[aria-current="page"] {
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-small {
  padding: 0.55rem 0.95rem;
  font-size: 0.92rem;
}

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

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: stretch;
  /* Mobile: copy first, DIR-01 placeholder stacked clearly below */
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    /* Align art to top of text column; stretch so art matches copy height */
    align-items: stretch;
  }
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin: 0.35rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.hero-lead {
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* DIR-01 right column (desktop) / below copy (mobile). No green panel. */
.hero-art {
  margin: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  /* Tall top-aligned hero art matching text column; caption sits below media */
  .hero-art .img-slot--hero {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: visible;
    /* Round 2 direction: open edge-to-edge feel, not a heavy framed box */
    border-radius: 0;
  }

  .hero-art .img-slot--hero .img-slot-media {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 22rem;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
  }

  .hero-art .img-slot--hero .img-slot-caption {
    flex: 0 0 auto;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
}

.section {
  padding: 2.5rem 0;
}

.section-tight {
  padding-top: 1rem;
}

/* Page title + section titles share display scale (h1 is the page landmark). */
.section h1,
.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 58ch;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.card h2,
.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  font-family: inherit;
  letter-spacing: normal;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.chip-accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-deep);
}

.notice {
  background: var(--warn-soft);
  border: 1px solid rgba(122, 75, 22, 0.2);
  color: var(--warn);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.filters select,
.filters input[type="search"] {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  color: var(--ink);
  min-width: 11rem;
}

.filters input[type="search"] {
  flex: 1 1 16rem;
}

.profile-card {
  display: grid;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 107, 87, 0.35);
}

.profile-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, #1f6b57, #0f3d33);
  color: #f4fbf8;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex: 0 0 auto;
}

.profile-meta h2,
.profile-meta h3 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-family: inherit;
  letter-spacing: normal;
  font-weight: 700;
}

.profile-meta p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.tag {
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  background: rgba(18, 32, 28, 0.06);
  color: var(--ink-soft);
}

.tag-founding {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.profile-page {
  padding: 2.5rem 0 4rem;
}

.profile-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 880px) {
  .profile-layout {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: start;
  }
}

.profile-main h1 {
  margin: 0.3rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.sidebar-card {
  position: sticky;
  top: 5.5rem;
}

.stack > * + * {
  margin-top: 1rem;
}

.form {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

/* Apply form section titles: semantic h2 under page h1, keep compact weight. */
.field-group > h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: normal;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field .hint {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.8rem 0.95rem;
  font: inherit;
  color: var(--ink);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field-group {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4);
}

.checkbox {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.checkbox input {
  margin-top: 0.25rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

.footer-grid strong {
  color: var(--ink);
}

/* START FOOTER ART — thought-tangle unwinding
   Transparent PNG (2026-11-08): left-cropped plate removed.
   ~20% smaller via width:80%; left-aligned; no extra left indent.
   Scale within wrap; never crop/stretch (no object-fit: cover). */
.footer-art-wrap {
  margin-top: 0.8rem; /* PNG already cropped tight on top */
}

.footer-art {
  margin: 0;
  width: 100%;
  max-width: 100%;
  text-align: left;
  overflow: visible;
}

.footer-art-media {
  display: block;
  margin: 0; /* left-pinned block; never margin:auto center */
  width: 80%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left bottom;
}
/* END FOOTER ART */

/* Prose keeps typography helpers only — width matches homepage .wrap (var(--max)). */
.prose {
  max-width: none;
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.prose h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.2rem;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
}

/* START DIR IMAGE SLOTS
   Placeholders until Gemini exports land; live images use .img-slot-media.
   END DIR IMAGE SLOTS (styles below) */
.img-slot {
  margin: 0;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
}

.img-slot-media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  vertical-align: middle;
}

/* Subtle review labels so JP can match live art to DIR-XX IDs */
.img-slot-caption {
  margin: 0.4rem 0 0;
  padding: 0 0.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  opacity: 0.85;
}

.img-slot--hero {
  border-radius: calc(var(--radius) + 4px);
}

.img-slot--hero .img-slot-media {
  aspect-ratio: 4 / 3;
  min-height: 280px;
}

.img-slot--square .img-slot-media {
  aspect-ratio: 1 / 1;
}

.img-slot--banner .img-slot-media {
  aspect-ratio: 3 / 1;
  min-height: 7rem;
}

.img-slot--wide .img-slot-media {
  aspect-ratio: 16 / 9;
  min-height: 10rem;
}

.img-slot--og .img-slot-media {
  aspect-ratio: 1.91 / 1;
  min-height: 8rem;
  max-width: 36rem;
}

.img-slot--empty .img-slot-media {
  aspect-ratio: 4 / 3;
  min-height: 12rem;
  max-width: 28rem;
  margin-inline: auto;
}

.img-slot-ph {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-height: 10rem;
  padding: 1.1rem 1.25rem;
  border: 1.5px dashed rgba(18, 32, 28, 0.35);
  border-radius: calc(var(--radius) - 4px);
  background:
    linear-gradient(180deg, #f7f6f1 0%, #ecece8 100%);
  color: var(--ink);
  box-sizing: border-box;
}

.img-slot-ph::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.25rem;
  border: 1.5px solid #1a1a1a;
  border-radius: 50% 40% 55% 45%;
  background:
    radial-gradient(circle at 30% 40%, rgba(216, 140, 117, 0.55), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(168, 185, 160, 0.5), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(227, 184, 120, 0.45), transparent 45%);
  opacity: 0.9;
}

.img-slot-id {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.img-slot-file {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
  word-break: break-all;
}

.img-slot-label {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.img-slot-path {
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.img-slot--hero .img-slot-ph {
  min-height: 280px;
  aspect-ratio: 4 / 3;
  border: 2px dashed #1a1a1a;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at 22% 35%, rgba(216, 140, 117, 0.28), transparent 42%),
    radial-gradient(circle at 78% 55%, rgba(168, 185, 160, 0.32), transparent 45%),
    radial-gradient(circle at 48% 78%, rgba(227, 184, 120, 0.26), transparent 40%),
    linear-gradient(180deg, #f7f6f1 0%, #ecece8 100%);
  box-shadow: none;
  justify-content: center;
  gap: 0.45rem;
}

.img-slot--hero .img-slot-id {
  font-size: 1.6rem;
  font-weight: 650;
  color: #1a1a1a;
}

.img-slot--hero .img-slot-file {
  font-size: 0.9rem;
  color: #1a1a1a;
}

.img-slot--hero .img-slot-label {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}

.img-slot-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.img-slot--square .img-slot-ph {
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 0.9rem;
}

.img-slot--banner .img-slot-ph {
  min-height: 7rem;
  aspect-ratio: 3 / 1;
}

.img-slot--wide .img-slot-ph {
  min-height: 10rem;
  aspect-ratio: 16 / 9;
}

.img-slot--og .img-slot-ph {
  min-height: 8rem;
  aspect-ratio: 1.91 / 1;
  max-width: 36rem;
}

.img-slot--empty .img-slot-ph {
  min-height: 12rem;
  aspect-ratio: 4 / 3;
  max-width: 28rem;
  margin-inline: auto;
}

.how-card-slot {
  margin-bottom: 0.85rem;
}

/* Hide review filename captions under image slots (launch prep; leave img tags untouched) */
.img-slot-caption {
  display: none;
}

.how-card-slot .img-slot-caption {
  display: none;
}

.page-art-slot {
  margin: 0 0 1.5rem;
}

.og-slot-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.og-slot-wrap > p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hidden {
  display: none !important;
}

@media (max-width: 700px) {
  .nav-links .hide-mobile {
    display: none;
  }

  .hero {
    padding-top: 2.5rem;
  }
}

/* START REDUCED MOTION
   Honor OS/browser “reduce motion” — no smooth scroll or hover transforms. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .btn:hover,
  .profile-card:hover {
    transform: none;
  }
}
/* END REDUCED MOTION */

/* START REDUCED TRANSPARENCY
   OS “reduce transparency” / similar: drop sticky header blur + soft
   translucent chips so chrome stays opaque and readable. */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    backdrop-filter: none;
    background: #eaefeb;
  }

  .chip,
  .directory-filter-secondary,
  .card,
  .profile-card {
    backdrop-filter: none;
    background: var(--surface);
  }
}
/* END REDUCED TRANSPARENCY */

/* START PRINT STYLES
   Profiles / apply / directory should print as readable ink on paper —
   drop sticky chrome, decorative art, and keep contact URLs visible. */
@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
    line-height: 1.4;
    padding: 0;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .hero-art,
  .footer-art,
  .page-art-slot,
  .img-slot-caption,
  .chip-row,
  .directory-filters,
  .directory-active-chips,
  .directory-empty-art,
  .og-slot-wrap {
    display: none !important;
  }

  .wrap {
    width: 100%;
    max-width: none;
  }

  .sidebar-card {
    position: static;
    box-shadow: none;
    break-inside: avoid;
  }

  .profile-layout,
  .card,
  .profile-card {
    break-inside: avoid;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-weight: 400;
    color: #333333;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }
}
/* END PRINT STYLES */

/* START STICKY HEADER SCROLL PAD
   Sticky .site-header would otherwise cover in-page #main / #hash targets
   (skip-link, footer anchors). Pad root scroll + give #main a scroll-margin. */
html {
  scroll-padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}

#main {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
/* END STICKY HEADER SCROLL PAD */

/* START FORCED COLORS
   Windows High Contrast / forced-colors: drop decorative gradients/blur,
   keep borders and focus rings visible with system CanvasText. */
@media (forced-colors: active) {
  body {
    background: Canvas;
    color: CanvasText;
  }

  .site-header {
    background: Canvas;
    backdrop-filter: none;
    border-bottom: 1px solid CanvasText;
  }

  .card,
  .profile-card,
  .sidebar-card,
  .how-card {
    border: 1px solid CanvasText;
    box-shadow: none;
    background: Canvas;
  }

  :focus-visible,
  a.btn-primary:focus-visible,
  button.btn-primary:focus-visible,
  .btn-primary:focus-visible,
  .skip-link:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 3px;
  }

  a.btn-primary,
  button.btn-primary,
  .btn-primary {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    border: 1px solid CanvasText;
  }
}
/* END FORCED COLORS */

/* START TEXT SIZE + CONTRAST + TOUCH
   Mobile: stop aggressive UA text inflation. prefers-contrast:more hardens
   borders/focus. Primary buttons keep a 44px min hit target. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.btn {
  min-height: 44px;
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(18, 32, 28, 0.45);
    --ink-soft: #243832;
  }

  :focus-visible,
  a.btn-primary:focus-visible,
  button.btn-primary:focus-visible,
  .btn-primary:focus-visible {
    outline-width: 3px;
    outline-offset: 3px;
  }

  .card,
  .profile-card,
  .sidebar-card,
  .notice {
    border-width: 2px;
  }

  .site-header {
    border-bottom-width: 2px;
  }
}
/* END TEXT SIZE + CONTRAST + TOUCH */
