@font-face {
  font-family: "Anybody";
  src: url("/fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #e8ecf2;
  --card: #fafbfd;
  --ink: #141a2e;
  --ink-soft: #4a5270;
  --line: #c9d0de;
  --blue: #2433b8;
  --amber: #9a5a0b;
  --red: #c8342a;
  --band: #2433b8;
  --on-band: #f4f6ff;
  --focus: #2433b8;
  --eye-white: #fafbfd;
  --eye-dark: #101528;
  --display: "Anybody", "Arial Narrow", Impact, sans-serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1424;
    --card: #172038;
    --ink: #eceff8;
    --ink-soft: #a3acc9;
    --line: #2b3556;
    --blue: #8d9bff;
    --amber: #e8a54b;
    --red: #ff7a6d;
    --focus: #8d9bff;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

[hidden] {
  display: none !important;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 10;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* ---------- top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.mark {
  font: 750 1.2rem/1 var(--display);
  font-stretch: 100%;
  text-decoration: none;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.mark span {
  font-weight: 400;
  opacity: 0.6;
}
.bar nav {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  font-weight: 500;
  font-size: 0.98rem;
}
.bar nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 4px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat;
  transition: background-size 0.25s ease, color 0.2s ease;
}
.bar nav a:hover,
.bar nav a[aria-current="page"] {
  color: var(--ink);
  background-size: 100% 2px;
}
@media (max-width: 520px) {
  .bar nav {
    gap: 12px;
    font-size: 0.9rem;
  }
}

/* ---------- buttons and tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 1rem/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #0f1424;
  }
}
.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.92rem;
  border-width: 1.5px;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-phish {
  border-color: var(--red);
  color: var(--red);
}
.btn-phish:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-legit {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-legit:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn-phish:hover,
  .btn-legit:hover {
    color: #0f1424;
  }
}
.btn-phish[disabled]:hover,
.btn-legit[disabled]:hover {
  background: transparent;
}
.btn-phish[disabled]:hover {
  color: var(--red);
}
.btn-legit[disabled]:hover {
  color: var(--blue);
}

.tag {
  display: inline-block;
  padding: 0.22em 0.65em 0.18em;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 66%;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-1.5deg);
  white-space: nowrap;
}

/* ---------- lobby (home) ---------- */
.lobby {
  display: grid;
  justify-items: center;
  text-align: center;
  padding-block: clamp(8px, 3vw, 36px) clamp(40px, 6vw, 72px);
}
.stage {
  width: min(760px, 100%);
}
.eyes {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.sclera {
  fill: var(--eye-white);
}
.sclera-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 8;
}
.brow {
  fill: none;
  stroke: var(--ink);
  stroke-width: 13;
  stroke-linecap: round;
}
.iris-base {
  fill: var(--blue);
}
.iris-ring {
  fill: none;
  stroke: var(--eye-white);
  stroke-width: 1.5;
  opacity: 0.34;
}
.pupil {
  fill: var(--eye-dark);
}
.glint {
  fill: #fff;
  opacity: 0.95;
}
.lid {
  fill: var(--eye-dark);
  transform-box: fill-box;
  transform-origin: 50% 0;
  transform: scaleY(0.2);
  transition: transform 0.09s ease-out;
  animation: wake 0.7s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.eye.closed .lid {
  transform: scaleY(1.05);
}
@keyframes wake {
  from {
    transform: scaleY(1.05);
  }
  to {
    transform: scaleY(0.2);
  }
}

.hello {
  max-width: 28ch;
  margin-top: clamp(20px, 3vw, 36px);
  font: 700 clamp(1.55rem, 3.6vw, 2.5rem)/1.14 var(--display);
  font-stretch: 90%;
  text-wrap: balance;
}
.intro {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.doors {
  border-top: 2px solid var(--ink);
}
.door {
  display: grid;
  gap: 6px 32px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  background: linear-gradient(var(--band), var(--band)) no-repeat left center / 0% 100%;
  transition: background-size 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s ease, padding 0.3s ease;
}
.door-name {
  font: 750 clamp(2.2rem, 6vw, 4.6rem)/1 var(--display);
  font-stretch: 100%;
  letter-spacing: -0.01em;
}
.door-text {
  color: var(--ink-soft);
  transition: color 0.25s ease;
}
.door .tag {
  justify-self: start;
}
@media (min-width: 760px) {
  .door {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 9rem;
    align-items: center;
  }
  .door .tag {
    justify-self: end;
  }
}
.door:hover,
.door:focus-visible {
  background-size: 100% 100%;
  color: var(--on-band);
  padding-inline: 24px;
}
.door:hover .door-text,
.door:focus-visible .door-text,
.door:hover .tag,
.door:focus-visible .tag {
  color: var(--on-band);
}
.door:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -3px;
  border-radius: 0;
}

/* ---------- page heads and blocks ---------- */
.page-head {
  padding-block: clamp(24px, 5vw, 64px) clamp(28px, 4vw, 48px);
}
.page-title {
  font: 800 clamp(2.8rem, 9vw, 7rem)/0.95 var(--display);
  font-stretch: 112%;
  letter-spacing: -0.012em;
}
.page-lede {
  max-width: 46ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.block {
  display: grid;
  gap: 28px;
  padding-block: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .block {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 48px;
  }
}
.section-title {
  font: 600 1.05rem/1.4 var(--text);
  color: var(--ink-soft);
}
.block > .section-title {
  padding-top: 0.5rem;
}

.ledger {
  min-width: 0;
}
.row {
  display: grid;
  gap: 12px 32px;
  padding-block: 30px;
  border-top: 1px solid var(--line);
}
.row:first-child {
  border-top: 0;
  padding-top: 0;
}
@media (min-width: 760px) {
  .row {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas: "head text" "head meta";
    align-items: start;
  }
  .row-head {
    grid-area: head;
  }
  .row-text {
    grid-area: text;
  }
  .row-meta {
    grid-area: meta;
  }
}
.row-name {
  font: 750 clamp(1.8rem, 4.2vw, 3rem)/1.02 var(--display);
  font-stretch: 100%;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.row-role {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.row-text {
  max-width: 48ch;
  color: var(--ink-soft);
}
.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.stack {
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.tools {
  display: grid;
  gap: 18px;
}
.tools div {
  display: grid;
  gap: 4px 24px;
}
@media (min-width: 700px) {
  .tools div {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}
.tools dt {
  font-weight: 650;
}
.tools dd {
  color: var(--ink-soft);
}

.about-body {
  display: grid;
  gap: 22px;
  max-width: 62ch;
}
.about-body .big {
  font: 650 clamp(1.5rem, 3.2vw, 2.3rem)/1.22 var(--display);
  font-stretch: 92%;
  text-wrap: balance;
}
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* ---------- inspection certificate ---------- */
.cert {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px -36px rgba(20, 26, 46, 0.45);
}
.cert-band {
  height: 84px;
  border-bottom: 1px solid var(--line);
  background:
    repeating-radial-gradient(circle at 16% 150%, transparent 0 6px, color-mix(in srgb, var(--blue) 26%, transparent) 6px 7px),
    repeating-radial-gradient(circle at 84% -50%, transparent 0 8px, color-mix(in srgb, var(--blue) 20%, transparent) 8px 9px),
    repeating-radial-gradient(circle at 50% 220%, transparent 0 11px, color-mix(in srgb, var(--blue) 14%, transparent) 11px 12px);
}
.cert-head {
  padding: 22px 24px 8px;
}
.cert-head h2 {
  font: 700 1.55rem/1.1 var(--display);
  font-stretch: 92%;
}
.cert-head p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.5;
  max-width: 56ch;
}
.checks {
  margin-top: 12px;
}
.check {
  --rot: -4deg;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
@media (max-width: 480px) {
  .check {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .check .stamp {
    justify-self: start;
  }
}
.check:nth-child(2) { --rot: 3deg; }
.check:nth-child(3) { --rot: -2.5deg; }
.check:nth-child(4) { --rot: 4.5deg; }
.check:nth-child(5) { --rot: -3.5deg; }
.check:nth-child(6) { --rot: 2.5deg; }
.check h3 {
  font: 650 1.02rem/1.3 var(--text);
}
.check-detail {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.45;
}

.stamp {
  display: inline-block;
  min-width: 7.4rem;
  text-align: center;
  padding: 0.3em 0.7em 0.24em;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 66%;
  font-size: 1.12rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  border: 3px solid currentColor;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3px currentColor;
  transform: rotate(var(--rot));
  filter: url(#ink);
  white-space: nowrap;
}
.check[data-state="watch"] .stamp,
.stamp[data-state="watch"] { color: var(--amber); }
.check[data-state="fail"] .stamp,
.stamp[data-state="fail"] { color: var(--red); }
.check[data-state="unknown"] .stamp { color: var(--ink-soft); }

.check[data-state="pending"] .stamp,
.check[data-state="idle"] .stamp {
  color: var(--ink-soft);
  border-style: dashed;
  box-shadow: none;
  filter: none;
  transform: none;
  opacity: 0.7;
}
.check[data-state="pending"] .stamp {
  animation: wait 1.2s ease-in-out infinite;
}
.check:not([data-state="pending"]):not([data-state="idle"]) .stamp {
  animation: thump 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes thump {
  0% {
    transform: scale(2) rotate(calc(var(--rot) - 9deg));
    opacity: 0;
  }
  55% {
    transform: scale(0.93) rotate(var(--rot));
    opacity: 1;
  }
  78% {
    transform: scale(1.03) rotate(var(--rot));
  }
  100% {
    transform: scale(1) rotate(var(--rot));
    opacity: 1;
  }
}
@keyframes wait {
  50% {
    opacity: 0.35;
  }
}

.verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px 22px;
  border-top: 2px solid var(--ink);
}
.tally {
  font: 700 1.5rem/1.1 var(--display);
  font-stretch: 84%;
}
.tally small {
  display: block;
  margin-top: 4px;
  font: 500 0.88rem/1.3 var(--text);
  color: var(--ink-soft);
}

.harden {
  display: grid;
  gap: 0;
}
.harden li {
  display: grid;
  gap: 6px 32px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.harden li:first-child {
  border-top: 0;
  padding-top: 0;
}
@media (min-width: 760px) {
  .harden li {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}
.harden h3 {
  font: 650 1.05rem/1.35 var(--text);
}
.harden p {
  color: var(--ink-soft);
  max-width: 56ch;
}
.note {
  margin-top: 24px;
  max-width: 62ch;
  padding: 16px 20px;
  border-left: 4px solid var(--amber);
  background: var(--card);
  color: var(--ink-soft);
}

/* ---------- game ---------- */
.game {
  max-width: 760px;
  padding-bottom: clamp(48px, 7vw, 96px);
}
.game-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
}
.game-score {
  color: var(--ink-soft);
}
.game-context {
  margin-top: 14px;
  color: var(--ink-soft);
  min-height: 3.3em;
}
.mail {
  position: relative;
  margin-top: 10px;
  padding: 22px 24px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 60px -40px rgba(20, 26, 46, 0.45);
}
.mail-meta {
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-right: 8.5rem;
}
.mail-meta div {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 12px;
}
.mail-meta dt {
  color: var(--ink-soft);
}
.mail-meta dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.mail-body {
  display: grid;
  gap: 12px;
  padding-top: 18px;
}
.mail-link {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px dashed var(--ink-soft);
  border-radius: 6px;
  font-size: 0.95rem;
}
.mail-link-label {
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.mail-link-url {
  overflow-wrap: anywhere;
}
.hl {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.mail[data-truth="phish"] .hl { color: var(--red); }
.mail[data-truth="legit"] .hl { color: var(--blue); }
.verdict-stamp {
  --rot: -6deg;
  position: absolute;
  top: 18px;
  right: 20px;
  min-width: 0;
}
.verdict-stamp:not([hidden]) {
  animation: thump 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@media (max-width: 560px) {
  .mail-meta {
    padding-right: 0;
  }
  .mail-meta div {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .verdict-stamp {
    position: static;
    margin-top: 16px;
    justify-self: start;
  }
  .mail:has(.verdict-stamp:not([hidden])) {
    display: grid;
  }
}
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.game-actions .btn {
  min-width: 8.5rem;
}
.game-result {
  margin-top: 22px;
  padding: 18px 22px;
  border-left: 4px solid var(--blue);
  background: var(--card);
}
.game-result[data-ok="no"] {
  border-left-color: var(--red);
}
.result-head {
  font: 700 1.35rem/1.2 var(--display);
  font-stretch: 88%;
}
.result-text {
  margin-top: 8px;
  max-width: 60ch;
  color: var(--ink-soft);
}
.game-result .btn {
  margin-top: 16px;
}
.game-end {
  margin-top: 8px;
}
.end-score {
  font: 800 clamp(3rem, 10vw, 6rem)/1 var(--display);
  font-stretch: 100%;
}
.end-line {
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 600;
}
.habits {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  max-width: 60ch;
  color: var(--ink-soft);
}
.habits li {
  padding-left: 20px;
  position: relative;
}
.habits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 3px;
  background: var(--blue);
}
.game-end .link-list {
  margin-top: 28px;
}
.mail:focus-visible {
  outline-offset: 4px;
}

/* ---------- 404 ---------- */
.lost {
  text-align: center;
  justify-items: center;
}

/* ---------- footer ---------- */
.foot {
  margin-top: clamp(40px, 6vw, 80px);
  background: var(--band);
  color: var(--on-band);
  padding-block: clamp(48px, 7vw, 96px) 32px;
}
.foot-inner {
  display: grid;
  gap: 22px;
}
.foot .section-title {
  color: color-mix(in srgb, var(--on-band) 78%, transparent);
}
.mail-link-big {
  display: inline-block;
  font-family: var(--display);
  font-weight: 750;
  font-stretch: 100%;
  font-size: min(7vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.012em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: font-stretch 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mail-link-big:hover {
  font-stretch: 130%;
}
@media (max-width: 600px) {
  .mail-link-big:hover {
    font-stretch: 100%;
  }
}
.foot a:focus-visible {
  outline-color: var(--on-band);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn-ghost {
  border-color: var(--on-band);
  color: var(--on-band);
}
.btn-ghost:hover {
  background: var(--on-band);
  color: var(--band);
  border-color: var(--on-band);
}
.fine {
  margin-top: 28px;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--on-band) 72%, transparent);
}

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