/* Patrol Box public site. Hand-written, no build step.
   Fonts are self-hosted: a page whose argument is that it does not track
   people cannot fetch a stylesheet from a third party. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #18324A;
  --green: #2F5D50;
  --yellow: #F2BE3E;
  --aluminum: #D8E0E5;
  --paper: #F8FAF9;
  --rust: #A44732;

  --display: "Barlow Condensed", ui-sans-serif, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;

  --measure: 34rem;
  --page: 62rem;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-top: 3rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; }

p, li { max-width: var(--measure); }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }

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

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

.site-head, .site-foot {
  border-bottom: 1px solid var(--aluminum);
  padding: 1rem 0;
}
.site-foot { border-bottom: 0; border-top: 1px solid var(--aluminum); margin-top: 4rem; padding: 2rem 0 3rem; }
.site-head nav a { margin-right: 1.25rem; }
.brand { font-family: var(--display); font-size: 1.25rem; text-decoration: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--navy); color: var(--paper); padding: 0.5rem 1rem; }

/* Signal yellow is a fill under navy text, never navy-on-white text in yellow. */
.flag { background: var(--yellow); color: var(--navy); padding: 0.15em 0.4em; }

.example {
  font-family: var(--display);
  font-size: 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 6px solid var(--aluminum);
  background: #fff;
}
.example-ok { border-left-color: var(--green); }
.example-no { border-left-color: var(--rust); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.lede { font-size: 1.25rem; }

.cta {
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  margin-right: 1rem;
}
.cta:hover { background: var(--green); color: var(--paper); }

.equation {
  border: 1px solid var(--aluminum);
  border-left: 6px solid var(--yellow);
  padding: 1.5rem;
  margin: 3rem 0;
  background: #fff;
}
.equation .sum,
.equation .total { font-family: var(--display); margin: 0 0 0.25rem; line-height: 1.1; }
.equation .sum { font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--navy); }
.equation .total { font-size: clamp(2rem, 6vw, 3rem); color: var(--green); }
.equation .fineprint { font-size: 0.875rem; line-height: 1.5; margin: 1rem 0 0; }

/* The trail. A single connector runs the length of the five steps, so the
   sequence reads as movement rather than as five equal boxes. */
.trail { list-style: none; padding: 0; margin: 2rem 0; position: relative; }
.trail::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.5rem;
  bottom: 2rem;
  width: 2px;
  background: var(--aluminum);
}
.trail > li { position: relative; padding: 0 0 2.5rem 3.5rem; max-width: none; }
.trail > li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--display);
  display: grid;
  place-items: center;
}
.trail { counter-reset: step; }
.trail > li:last-child::before { background: var(--green); }
.trail h3 { margin-top: 0; }
.trail p { max-width: var(--measure); }

.faq h3 { margin-bottom: 0.25rem; }
.faq p { margin-top: 0; }

.scan { max-width: var(--measure); }
.scan p { margin: 0 0 1.25rem; max-width: none; }
.scan label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.scan .opt { font-weight: 400; color: #5a6b7a; }
.scan input, .scan textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--aluminum);
  background: #fff;
  color: var(--navy);
}
.scan input:focus, .scan textarea:focus { border-color: var(--green); }
.scan button { border: 0; font: inherit; cursor: pointer; }

/* Off-screen rather than display:none, because some bots skip hidden inputs. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fineprint { font-size: 0.875rem; line-height: 1.5; }

.handback {
  background: #fff;
  border: 1px solid var(--aluminum);
  border-left: 6px solid var(--rust);
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 0.9375rem;
}
