/* camoflage.me — self-hosted type, no inline style. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-700.woff2") format("woff2");
}

:root {
  --pine: #172112;
  --panel-dark: #161e12;
  --paper: #f3efe3;
  --paper-2: #e7e1d2;
  --slip: #e9e3d4;
  --ink: #172013;
  --ink-soft: #243222;
  --cream: #f4f0e4;
  --cream-dim: #e7e2d4;
  --muted: #d5cdb8;
  --gold: #e4b15a;
  --moss: #23401f;
  --rust: #6d3014;
  --rust-deep: #8d3418;
  --amber: #f0d48a;
  --amber-ink: #1c1408;
  --hi: #ef6c32;
  --khaki: #c6b48a;
  --line: rgba(23, 32, 19, 0.14);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  background: var(--pine);
  color-scheme: dark;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--pine);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--gold);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  z-index: 5;
  transform: translateY(-160%);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
}

.skip:focus,
.skip:focus-visible {
  transform: none;
}

.ground {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--pine);
  background-image: url("/img/camo.svg");
  background-repeat: repeat;
  background-size: 520px 520px;
}

.blend-figure {
  position: fixed;
  z-index: 1;
  top: 26vh;
  right: 0.55rem;
  width: 2.85rem;
  pointer-events: none;
}

.blend-figure__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 64 / 88;
}

.blend-figure__stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* End state is the default: already blended into the pattern. */
.blend-figure__hi {
  fill: var(--hi);
  stroke: var(--cream);
  stroke-width: 1.4px;
  opacity: 0;
}

.blend-figure__camo {
  fill: var(--khaki);
  stroke: #3a3424;
  stroke-width: 0.8px;
  opacity: 0.92;
}

.blend-figure__tag {
  display: block;
  margin: 0.28rem 0 0;
  padding: 0.08rem 0.15rem 0.12rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.35;
  background: var(--khaki);
  color: var(--ink);
}

.page {
  position: relative;
  z-index: 2;
  margin: 0.85rem 5.05rem 3.5rem 0.75rem;
}

.hero-panel,
.panel,
.footer-panel {
  container-type: inline-size;
  container-name: panel;
  padding: 1.15rem 1rem 1.25rem;
}

.hero-panel,
.footer-panel {
  background: var(--panel-dark);
  color: var(--cream);
  border-top: 4px solid var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.panel {
  background: var(--paper);
  color: var(--ink);
  border-top: 4px solid var(--moss);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

main > * + *,
.page > footer {
  margin-top: 1.35rem;
}

.kicker {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
}

.hero-panel .kicker,
.footer-panel .kicker {
  color: var(--gold);
}

h1,
h2,
h3,
.wordmark,
.tagline,
.signoff,
.callout__line,
.headline {
  font-family: var(--serif);
  font-weight: 560;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
}

.wordmark {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  color: var(--cream);
  font-size: 2.3rem;
  line-height: 0.92;
}

.wordmark__tld {
  color: var(--gold);
  white-space: nowrap;
}

.wordmark__name {
  white-space: nowrap;
}

.tagline {
  flex-basis: 100%;
  display: block;
  margin: 0.55rem 0 0;
  color: var(--cream);
  font-size: 1.45rem;
  line-height: 1.15;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.12;
  color: var(--ink);
}

h3 {
  margin: 0 0 0.3rem;
  font-size: 1.18rem;
  line-height: 1.25;
  color: inherit;
}

p {
  margin: 0.7rem 0;
}

.lede,
.points p,
.manual p,
.watch p,
.ip-note p,
.figure-note {
  max-width: 65ch;
}

.lede {
  margin: 0.85rem 0 0.35rem;
  color: var(--cream-dim);
}

.figure-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.panel p,
.points p,
.manual p,
.watch p,
.ip-note p {
  color: var(--ink-soft);
}

a {
  color: var(--rust);
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:visited {
  color: var(--rust);
}

.hero-panel a,
.footer-panel a,
.hero-panel a:visited,
.footer-panel a:visited {
  color: var(--gold);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.95rem;
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
}

.toc a {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.slip {
  margin-top: 1rem;
  background: var(--slip);
  padding: 0.85rem 0.85rem 0.15rem;
  border: 1px solid var(--line);
}

.signal-status {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink);
}

.led {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.28rem;
  border-radius: 50%;
  background: #1f6b38;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  flex: none;
}

.signals {
  margin: 0.35rem 0 0;
}

.signal {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10.5rem) minmax(0, 1fr);
  gap: 0.12rem 0.85rem;
  margin: 0;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.signal dt {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.signal dd {
  margin: 0;
  min-width: 0;
}

.signal__value {
  display: block;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.signal__why {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.signal--wide .signal__value {
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ip-note {
  margin-top: 1.1rem;
  background: var(--paper-2);
  padding: 0.9rem 0.95rem 1rem;
  border-top: 4px solid var(--rust-deep);
}

.ip-note h3 {
  color: var(--ink);
}

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.6rem minmax(0, 1fr) 5.6rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: stretch;
  margin: 1.1rem 0 0.35rem;
}

.flow__node {
  min-width: 0;
  background: var(--paper-2);
  color: var(--ink);
  text-align: center;
  padding: 0.8rem 0.55rem 0.9rem;
  border-top: 4px solid var(--moss);
}

.flow__node p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.flow__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
}

.flow__link-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--moss);
  line-height: 1.3;
}

.track {
  position: relative;
  width: 100%;
  height: 1.7rem;
  overflow: hidden;
}

.track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px dashed rgba(23, 32, 19, 0.45);
}

.track--crowd {
  height: 1.9rem;
}

.packet,
.pip {
  position: absolute;
  top: 50%;
}

.packet {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  background: var(--hi);
  border-radius: 1px;
}

.pip {
  width: 0.9rem;
  height: 1rem;
  margin-top: -0.5rem;
  fill: #3a3124;
}

.packet:nth-child(1),
.pip:nth-child(1) {
  left: 8%;
}

.packet:nth-child(2),
.pip:nth-child(2) {
  left: 36%;
}

.packet:nth-child(3),
.pip:nth-child(3) {
  left: 70%;
}

.track__arrow {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: -0.28rem;
  border-top: 2px solid #23401f;
  border-right: 2px solid #23401f;
  transform: rotate(45deg);
}

.track__lock {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 1.2rem;
  height: 1.2rem;
  transform: translate(-50%, -50%);
  background: var(--paper-2);
  display: grid;
  place-items: center;
}

.lock {
  width: 0.95rem;
  height: 0.95rem;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  width: 2.55rem;
  height: 2.55rem;
  display: block;
  margin: 0 auto 0.4rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .solid {
  fill: currentColor;
  stroke: none;
}

.caption {
  margin: 0.75rem 0 0.2rem;
  max-width: 65ch;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.watch {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.watch div {
  background: var(--paper-2);
  padding: 0.85rem 0.9rem 0.95rem;
  border-top: 4px solid var(--moss);
}

.watch h3 {
  color: var(--ink);
}

.points,
.manual {
  margin: 0.4rem 0 0;
  padding: 0;
}

.points {
  list-style: none;
}

.points li {
  background: var(--paper-2);
  padding: 0.8rem 0.9rem 0.9rem;
  border-top: 4px solid var(--moss);
}

.points li + li,
.manual li + li {
  margin-top: 0.55rem;
}

.points--stop li {
  border-top-color: var(--rust-deep);
}

.points h3,
.manual h3 {
  color: var(--ink);
}

.points p,
.manual p {
  margin: 0.25rem 0 0;
}

.manual {
  list-style: decimal;
  padding-left: 1.35rem;
}

.manual li {
  padding: 0.15rem 0 0.85rem;
  border-bottom: 1px solid var(--line);
}

.manual li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.manual li::marker {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--moss);
}

.callout {
  margin-top: 1.1rem;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 0.95rem 1rem 1.05rem;
  border-top: 4px solid var(--rust-deep);
}

.callout .kicker {
  color: #5c3d12;
}

.callout__line {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  color: var(--amber-ink);
}

.callout p:last-child {
  margin-bottom: 0;
  color: var(--amber-ink);
}

.signoff {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.02;
  color: var(--cream);
}

.footer-panel p {
  color: var(--cream-dim);
  max-width: 62ch;
}

.colophon {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

@container panel (min-width: 340px) {
  .wordmark {
    font-size: 2.7rem;
  }
}

@container panel (min-width: 460px) {
  .wordmark {
    font-size: 3.6rem;
  }

  .tagline {
    font-size: 1.8rem;
  }
}

@container panel (min-width: 620px) {
  .wordmark {
    font-size: 4.8rem;
  }

  .tagline {
    font-size: 2.05rem;
  }
}

@container panel (min-width: 740px) {
  .wordmark {
    font-size: 5.6rem;
  }

  .tagline {
    font-size: 2.2rem;
  }
}

@container panel (max-width: 560px) {
  .signal,
  .signal--wide {
    grid-template-columns: 1fr;
  }
}

@container panel (min-width: 680px) {
  .watch {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
}

@container panel (max-width: 640px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .flow__link {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.15rem 0.15rem 0.15rem 0.35rem;
  }

  .flow__link-name {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  .track,
  .track--crowd {
    grid-column: 1;
    grid-row: 1;
    width: 1.7rem;
    height: 3.5rem;
  }

  .track::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    height: auto;
    border-top: 0;
    border-left: 2px dashed rgba(23, 32, 19, 0.45);
  }

  .packet,
  .pip {
    left: 50%;
    top: auto;
    margin-top: 0;
  }

  .packet {
    margin-left: -0.25rem;
  }

  .pip {
    margin-left: -0.45rem;
  }

  .packet:nth-child(1),
  .pip:nth-child(1) {
    top: 4%;
  }

  .packet:nth-child(2),
  .pip:nth-child(2) {
    top: 36%;
  }

  .packet:nth-child(3),
  .pip:nth-child(3) {
    top: 68%;
  }

  .track__arrow {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0.05rem;
    margin-top: 0;
    margin-left: -0.28rem;
    transform: rotate(135deg);
  }
}

@media (min-width: 720px) {
  .hero-panel,
  .panel,
  .footer-panel {
    padding: 1.65rem 1.5rem 1.75rem;
  }
}

@media (min-width: 1080px) {
  .page {
    width: min(50rem, calc(100% - 2.5rem));
    margin: 1.25rem auto 4.5rem;
  }

  .blend-figure {
    width: 5rem;
    top: 16vh;
    right: max(1.25rem, calc((100vw - 50rem) / 2 - 8.5rem));
  }

  .hero-panel,
  .panel,
  .footer-panel {
    padding: 2rem 2.1rem 2.15rem;
  }
}

@media (max-width: 359px) {
  .page {
    margin-right: 4.2rem;
    margin-left: 0.5rem;
  }

  .blend-figure {
    width: 2.4rem;
    right: 0.28rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .blend-figure__hi {
      animation: hi-out linear 1s both;
      animation-timeline: scroll(root);
      animation-range: 0% 68%;
    }

    .blend-figure__camo {
      animation: camo-in linear 1s both;
      animation-timeline: scroll(root);
      animation-range: 0% 68%;
    }

    .blend-figure__tag {
      animation: tag-blend linear 1s both;
      animation-timeline: scroll(root);
      animation-range: 0% 68%;
    }
  }

  .packet,
  .pip {
    animation: packet-x 1.8s linear infinite;
  }

  .packet:nth-child(2),
  .pip:nth-child(2) {
    animation-delay: -0.6s;
  }

  .packet:nth-child(3),
  .pip:nth-child(3) {
    animation-delay: -1.2s;
  }

  @container panel (max-width: 640px) {
    .packet,
    .pip {
      animation-name: packet-y;
      top: 0;
    }
  }

  html[data-blend-mode="js"] .blend-figure__hi,
  html[data-blend-mode="js"] .blend-figure__camo,
  html[data-blend-mode="js"] .blend-figure__tag {
    transition: opacity 160ms linear, background-color 160ms linear, color 160ms linear;
  }
}

@keyframes hi-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes camo-in {
  from { opacity: 0; }
  to { opacity: 0.92; }
}

@keyframes tag-blend {
  from {
    background-color: #141c10;
    color: #f4f0e4;
  }
  to {
    background-color: #c6b48a;
    color: #172013;
  }
}

@keyframes packet-x {
  0% { left: -2%; opacity: 0; }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { left: 92%; opacity: 0; }
}

@keyframes packet-y {
  0% { top: -4%; opacity: 0; }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { top: 86%; opacity: 0; }
}

html[data-blend="0"] .blend-figure__hi { opacity: 1; }
html[data-blend="0"] .blend-figure__camo { opacity: 0; }
html[data-blend="1"] .blend-figure__hi { opacity: 0.875; }
html[data-blend="1"] .blend-figure__camo { opacity: 0.12; }
html[data-blend="2"] .blend-figure__hi { opacity: 0.75; }
html[data-blend="2"] .blend-figure__camo { opacity: 0.23; }
html[data-blend="3"] .blend-figure__hi { opacity: 0.625; }
html[data-blend="3"] .blend-figure__camo { opacity: 0.35; }
html[data-blend="4"] .blend-figure__hi { opacity: 0.5; }
html[data-blend="4"] .blend-figure__camo { opacity: 0.46; }
html[data-blend="5"] .blend-figure__hi { opacity: 0.375; }
html[data-blend="5"] .blend-figure__camo { opacity: 0.58; }
html[data-blend="6"] .blend-figure__hi { opacity: 0.25; }
html[data-blend="6"] .blend-figure__camo { opacity: 0.7; }
html[data-blend="7"] .blend-figure__hi { opacity: 0.12; }
html[data-blend="7"] .blend-figure__camo { opacity: 0.8; }
html[data-blend="8"] .blend-figure__hi { opacity: 0; }
html[data-blend="8"] .blend-figure__camo { opacity: 0.92; }

html[data-blend="0"] .blend-figure__tag,
html[data-blend="1"] .blend-figure__tag,
html[data-blend="2"] .blend-figure__tag,
html[data-blend="3"] .blend-figure__tag {
  background-color: #141c10;
  color: #f4f0e4;
}

html[data-blend="4"] .blend-figure__tag {
  background-color: #3d3424;
  color: #f4f0e4;
}

html[data-blend="5"] .blend-figure__tag,
html[data-blend="6"] .blend-figure__tag,
html[data-blend="7"] .blend-figure__tag,
html[data-blend="8"] .blend-figure__tag {
  background-color: #c6b48a;
  color: #172013;
}

@media (prefers-reduced-motion: reduce) {
  .packet,
  .pip,
  .blend-figure__hi,
  .blend-figure__camo,
  .blend-figure__tag {
    animation: none;
  }

  html[data-blend] .blend-figure__hi,
  .blend-figure__hi {
    opacity: 0;
  }

  html[data-blend] .blend-figure__camo,
  .blend-figure__camo {
    opacity: 0.92;
  }

  html[data-blend] .blend-figure__tag,
  .blend-figure__tag {
    background-color: #c6b48a;
    color: #172013;
  }
}

.is-lost .blend-figure__hi {
  animation: none;
  opacity: 0;
}

.is-lost .blend-figure__camo {
  animation: none;
  opacity: 0.92;
}

.is-lost .blend-figure__tag {
  animation: none;
  background-color: #c6b48a;
  color: #172013;
}

.headline {
  margin: 0 0 0.7rem;
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  line-height: 1.02;
  color: var(--cream);
}

@media (forced-colors: active) {
  .ground {
    display: none;
  }

  body {
    background: Canvas;
    color: CanvasText;
  }

  .hero-panel,
  .panel,
  .footer-panel,
  .slip,
  .flow__node,
  .points li,
  .watch div,
  .ip-note,
  .callout,
  .blend-figure__tag {
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    border: 1px solid CanvasText;
    forced-color-adjust: none;
  }

  .wordmark,
  .tagline,
  .signoff,
  .headline,
  h2,
  h3,
  .kicker,
  .lede,
  .figure-note,
  .panel p,
  .callout__line,
  .callout p,
  a,
  a:visited {
    color: CanvasText;
  }

  .blend-figure__hi,
  .blend-figure__camo {
    fill: CanvasText;
    stroke: CanvasText;
    opacity: 1;
  }
}

@media print {
  .ground,
  .blend-figure,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #172013;
  }

  .page {
    width: auto;
    margin: 0;
  }

  .hero-panel,
  .footer-panel,
  .panel,
  .slip,
  .flow__node,
  .points li,
  .watch div,
  .callout,
  .ip-note {
    background: #fff;
    color: #172013;
    box-shadow: none;
    border: 1px solid #172013;
  }

  .wordmark,
  .tagline,
  .signoff,
  .headline,
  .wordmark__tld,
  .kicker,
  .lede,
  .figure-note,
  a,
  a:visited,
  h2,
  h3 {
    color: #172013;
  }
}
