@font-face {
  font-family: "Libre Franklin";
  src: url("/fonts/libre-franklin-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --ink: #14213d;
  --ink-soft: #44526e;
  --blue: #1f3d7a;
  --blue-dark: #162d5c;
  --field: #182f5e;
  --red: #c4262e;
  --paper: #fbfcfe;
  --sheet: #ffffff;
  --rule: #d5dcea;
  --rule-strong: #7f8daa;
  --postmark: #2b3654;
  --focus: var(--blue);
  --tint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='none' stroke-width='1.1'%3E%3Cpath stroke='%23244488' d='M0 6c3-3 9-3 12 0s9 3 12 0M0 18c3-3 9-3 12 0s9 3 12 0'/%3E%3Cpath stroke='%231f3c7b' d='M6 0c-3 3-3 9 0 12s3 9 0 12M18 0c-3 3-3 9 0 12s3 9 0 12'/%3E%3C/g%3E%3C/svg%3E");
  --airmail: repeating-linear-gradient(135deg, var(--red) 0 10px, var(--paper) 10px 16px, var(--blue) 16px 26px, var(--paper) 26px 32px);
  --icon-bad: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9M12.5 3.5l-9 9' stroke='%23c4262e' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.6' fill='none' stroke='%23c4262e' stroke-width='1.8'/%3E%3Cpath d='M8 4.6v4.2' stroke='%23c4262e' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.3' r='1.1' fill='%23c4262e'/%3E%3C/svg%3E");
  --icon-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%231f3d7a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3.2' fill='%231f3d7a'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--field) var(--tint);
  color: var(--ink);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #3a5a9c var(--field);
}

body {
  margin: 0;
  overflow-x: clip;
  font-size: 1.1875rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue); color: #fff; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--sheet); color: var(--ink); padding: 0.6rem 1rem; border-radius: 4px; font-weight: 700;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.wordmark { font-weight: 400; letter-spacing: -0.015em; }
.wordmark b { font-weight: 800; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.75rem 1.4rem;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 8px 18px -8px rgba(22, 45, 92, 0.65);
  transition: background-color 160ms ease-out, transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover { background: var(--blue-dark); }
.button:active { transform: translateY(1px); }
.button:disabled { background: #5d719a; cursor: progress; box-shadow: none; }

/* ---------- the envelope: first screen ---------- */

.envelope {
  position: relative;
  z-index: 2;
  max-width: 96rem;
  margin: clamp(0.6rem, 1.5vh, 1.25rem) auto 0;
  padding: 0 clamp(0.75rem, 2.5vw, 2rem);
}

.envelope__face {
  display: flex;
  flex-direction: column;
  min-height: min(54rem, calc(100svh - 6rem));
  padding: clamp(1.25rem, 4vh, 3.5rem) clamp(1.4rem, 3.5vw, 3.75rem);
  background: var(--paper);
  border: 7px solid transparent;
  border-image: var(--airmail) 7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 30px 60px -20px rgba(2, 10, 32, 0.7);
}

.envelope__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }

.sender { margin: 0; display: grid; gap: 0.1rem; font-size: 1.05rem; line-height: 1.4; color: var(--ink-soft); }
.sender .wordmark { font-size: 1.45rem; color: var(--ink); }

.postmark { flex: none; width: clamp(104px, 10vw, 170px); height: auto; color: var(--postmark); }
.postmark circle, .postmark .cancel { stroke: currentColor; opacity: 0.72; }
.postmark text { fill: currentColor; opacity: 0.8; font-family: var(--font); }
.ring-text { font-size: 10px; font-weight: 650; letter-spacing: 0.05em; }
.hub { font-size: 21px; font-weight: 800; letter-spacing: 0.04em; }
.hub--small { font-size: 8.5px; font-weight: 650; letter-spacing: 0.22em; }

.hero { margin-block: auto; padding-top: clamp(1.25rem, 3vh, 2.5rem); }

.hero h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.5rem, min(1.1rem + 4.4vw, 8vh), 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lede {
  margin: clamp(1rem, 2.5vh, 1.5rem) 0 0;
  max-width: 38ch;
  font-size: clamp(1.15rem, 1rem + 0.45vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.check { display: flex; gap: 0.6rem; max-width: 36rem; margin-top: clamp(1.25rem, 3.5vh, 2.25rem); }
.check input {
  flex: 1;
  min-width: 0;
  min-height: 3.6rem;
  padding: 0 1.1rem;
  font: inherit;
  font-size: 1.15rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--rule-strong);
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(20, 33, 61, 0.07);
  transition: border-color 160ms ease-out;
}
.check input::placeholder { color: #66738f; }
.check input:hover { border-color: #5d6b88; }
.check input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.check .button { min-height: 3.6rem; padding-inline: 1.6rem; }

.aside { margin: 1.4rem 0 0; font-size: 1.05rem; color: var(--ink-soft); }
.aside a { display: inline-block; padding-block: 0.55rem; margin-block: -0.55rem; }

/* ---------- the result, stamped onto the envelope ---------- */

.result {
  position: relative;
  max-width: 36rem;
  margin-top: 3rem;
  padding: 2rem clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(20, 33, 61, 0.08), 0 14px 30px -18px rgba(20, 33, 61, 0.45);
}
.result__domain {
  margin: 0;
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.result--example .result__next { font-size: 1.05rem; }

/* the stamp lands across the slip's top edge, like ink */
.stamp {
  position: absolute;
  top: -1.6rem;
  left: clamp(1rem, 2.5vw, 1.6rem);
  margin: 0;
  padding: 0.35rem 0.8rem;
  line-height: 1.2;
  border: 3px solid currentColor;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-5deg);
}
.stamp--exposed, .stamp--partial { color: var(--red); }
.stamp--protected { color: var(--blue); }

.result__lines { display: grid; gap: 0.7rem; margin: 0.9rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--rule); }
.line { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.1rem 0.75rem; }
.line dd { grid-column: 2; }
.line::before { content: ""; width: 1.05rem; height: 1.05rem; margin-top: 0.32em; background: center / contain no-repeat; }
.line--bad::before { background-image: var(--icon-bad); }
.line--warn::before { background-image: var(--icon-warn); }
.line--ok::before { background-image: var(--icon-ok); }
.line--info::before { background-image: var(--icon-info); }
.line dt { font-weight: 700; }
.line dd { margin: 0; }

.result__next { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.1rem; margin: 1.3rem 0 0; color: var(--ink-soft); }
.result__error { margin: 0; font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: strike 480ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .result__lines, .result__next { animation: settle 420ms 160ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes strike {
    from { opacity: 0; transform: scale(1.8) rotate(-14deg); }
    55% { opacity: 1; }
    to { transform: rotate(-5deg); }
  }
  .result--example .stamp, .result--example .result__lines, .result--example .result__next { animation: none; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(0.5rem); }
  }
}

/* ---------- inside: the letter on the security tint ---------- */

.inside {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: -2rem auto 0;
  padding: 0 clamp(0.75rem, 3vw, 2rem) clamp(3rem, 8vw, 6rem);
  outline: none;
}

.letter {
  max-width: 44rem;
  margin: 0 auto;
  padding: 5.5rem clamp(1.4rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem);
  background: var(--sheet);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 22px 44px -16px rgba(2, 10, 32, 0.65);
}

.letterhead {
  display: grid;
  gap: 0.4rem;
  padding-bottom: 1.1rem;
  margin-bottom: 2.5rem;
  border-bottom: 5px solid transparent;
  border-image: var(--airmail) 0 0 5 0 / 0 0 5px 0;
}
.letterhead .wordmark { font-size: 1.85rem; line-height: 1; }
.letterhead p { margin: 0; font-size: 1.05rem; line-height: 1.45; color: var(--ink-soft); }

.letter > p { margin: 0 0 1rem; }
.salutation { font-weight: 600; }

.letter h2 {
  margin: 3rem 0 0.6rem;
  font-size: 1.4rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--blue);
}

.steps { list-style: none; counter-reset: step; display: grid; gap: 1.6rem; margin: 0.4rem 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; }
.steps li::before,
.findings > li::before {
  position: absolute;
  left: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.steps li::before { content: counter(step); top: 0; }
.steps h3 { margin: 0.1rem 0 0.3rem; font-size: 1.2rem; font-weight: 750; line-height: 1.3; }
.steps p { margin: 0; }

.never { list-style: none; margin: 0.4rem 0 1rem; padding: 0; }
.never li { position: relative; padding-left: 1.75rem; margin-bottom: 0.45rem; }
.never li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.45em;
  width: 0.8em;
  height: 0.8em;
  background: var(--icon-bad) center / contain no-repeat;
}

.reply { margin: 2.5rem 0 0 !important; }
.signoff { margin-top: 2.5rem; }
.signoff p { margin: 0; }
.signature { margin-top: 1.6rem !important; font-weight: 750; font-size: 1.3rem; line-height: 1.2; }
.signature span { display: block; font-size: 1.05rem; font-weight: 400; color: var(--ink-soft); }
.ps { margin-top: 2.5rem !important; }
.enc { margin-top: 1.5rem !important; font-size: 1.05rem; color: var(--ink-soft); }

/* ---------- the enclosure ---------- */

.enclosure {
  position: relative;
  max-width: 42rem;
  margin: -1.25rem auto 0;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.25rem) clamp(2rem, 4vw, 2.75rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 18px 36px -14px rgba(2, 10, 32, 0.6);
}

.clip { position: absolute; top: -1.9rem; left: 2.25rem; stroke: #8a94a8; transform: rotate(-4deg); }

.sample-stamp {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  margin: 0;
  padding: 0.25rem 0.6rem;
  border: 3px solid var(--red);
  border-radius: 3px;
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-6deg);
  opacity: 0.92;
}

.enclosure h2 {
  margin: 0 0 0.35rem;
  max-width: 14ch;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.meta { margin: 0 0 2rem; font-size: 1.05rem; color: var(--ink-soft); }

.findings { list-style: none; counter-reset: finding; margin: 0; padding: 0; }
.findings > li { counter-increment: finding; position: relative; padding: 1.5rem 0 1.5rem 3rem; border-top: 1px solid var(--rule); }
.findings > li::before { content: counter(finding); top: 1.5rem; }
.findings h3 { margin: 0.15rem 0 0.75rem; font-size: 1.15rem; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.findings dl { display: grid; grid-template-columns: 9.75rem minmax(0, 1fr); gap: 0.5rem 1.25rem; margin: 0; }
.findings dt { font-weight: 700; }
.findings dd { margin: 0; }

.note { margin: 1.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 1.05rem; color: var(--ink-soft); }

/* ---------- footer on the tint ---------- */

.footer {
  --focus: #fff;
  padding: 0 1.25rem clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  color: #dbe3f3;
  font-size: 1.05rem;
}
.footer p { margin: 0.35rem 0; }
.footer a { color: #fff; display: inline-block; padding-block: 0.55rem; margin-block: -0.55rem; }

/* ---------- wide screens: the ask on the left, the result slip on the right ---------- */

@media (min-width: 68rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 32rem);
    gap: clamp(3rem, 5vw, 6rem);
    align-items: center;
  }
  .hero h1 { font-size: clamp(2.75rem, min(0.4rem + 4vw, 7.6vh), 5rem); }
  .result { margin-top: 0; transform: rotate(1deg); }
}

@media (min-width: 52.01rem) { .enclosure { transform: rotate(0.6deg); } }

/* ---------- smaller screens ---------- */

@media (max-width: 52rem) {
  .envelope__face { min-height: 0; border-width: 5px; border-image-slice: 5; }
  .findings dl { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .findings dd { margin-bottom: 0.6rem; }
}

@media (max-width: 30rem) {
  .check { flex-direction: column; }
  .check .button { width: 100%; }
  .postmark { width: 100px; }
  .sender .wordmark { font-size: 1.2rem; }
  .findings > li { padding-left: 2.6rem; }
  .sample-stamp { top: -0.9rem; right: 0.75rem; font-size: 0.78rem; }
}
