/* ITOLDYOUIDONTWRITEWITHAI — one stylesheet, no build step */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  padding: 24px 12px 32px;
  font: 15px/1.5 Verdana, Geneva, Tahoma, sans-serif;
  color: #000;
  background-color: #e4e4e4;
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .04) 0 6px, transparent 6px 12px);
}

a { color: #0000ee; }
a:visited { color: #551a8b; }
a:hover { color: #ff0000; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 2px;
}

/* ---------- the page ---------- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 5vw, 44px);
  background: #fff;
  border: 1px solid #808080;
  box-shadow: 4px 4px 0 #808080;
}

section { text-align: center; }

hr {
  border: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: clamp(32px, 6vw, 56px) 0;
}

/* ---------- hero ---------- */

h1 {
  margin: 0 0 .4em;
  font-family: Impact, "Arial Black", "Arial Narrow Bold", sans-serif;
  font-weight: normal;
  font-size: clamp(1.7rem, 5.5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: .01em;
  color: #000080;
  text-shadow: 2px 2px 0 #c0c0c0;
  text-wrap: balance;
}

.sub {
  margin: 0 0 1.4em;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 12px 28px;
  font: bold 15px/1.2 Verdana, Geneva, sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #000;
  text-decoration: none;
  background: linear-gradient(#ffffff, #d4d4d4);
  border: 2px outset #e8e8e8;
  cursor: pointer;
}

.btn:visited { color: #000; }
.btn:hover { color: #000; background: linear-gradient(#ffffff, #ececec); }
.btn:active { border-style: inset; background: linear-gradient(#d4d4d4, #ffffff); }

.btn-big {
  padding: 16px 40px;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
}

/* ---------- certificate stamp ---------- */

.cert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
}

.seal {
  flex: 0 0 auto;
  width: clamp(200px, 60vw, 260px);
  filter: drop-shadow(3px 4px 3px rgba(0, 0, 0, .35));
}

.seal svg {
  display: block;
  width: 100%;
  height: auto;
}

.cert p {
  flex: 1 1 240px;
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.35;
}

/* ---------- the form ---------- */

.cta form {
  display: grid;
  gap: 6px;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.cta label { font-weight: bold; }

.cta input[type="email"],
.cta input[type="text"] {
  width: 100%;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 10px;
  font: inherit;
  background: #fff;
  border: 2px inset #a8a8a8;
}

.cta fieldset {
  margin: 0 0 18px;
  padding: 8px 14px 6px;
  border: 1px solid #808080;
}

.cta legend {
  padding: 0 6px;
  font-weight: bold;
}

.radios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0 12px;
}

.radios label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: normal;
  cursor: pointer;
}

.radios input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #000080;
  cursor: pointer;
}

.cta .btn { justify-self: center; }

/* ---------- the substack embed ---------- */

.embed-frame,
.promo-frame {
  display: block;
  width: 100%;
  max-width: 480px;
  height: 150px;
  margin: 0 auto;
  border: 0;
  background: transparent;
}

/* ---------- footer ---------- */

.foot {
  max-width: 760px;
  margin: 20px auto 0;
  font-size: 10px;
  line-height: 1.8;
  color: #444;
  text-align: center;
  overflow-wrap: anywhere;
}

.foot a { color: inherit; }

/* ---------- the fake permission toast ---------- */

.toast {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  width: min(340px, calc(100vw - 24px));
  display: grid;
}

.toast > * { grid-area: 1 / 1; }

.toast-card {
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: start;
  padding: 14px 16px;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #202124;
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition: transform .35s ease-out, opacity .35s ease-out;
}

.toast.is-in .toast-card {
  transform: none;
  opacity: 1;
}

.toast .toast-card.is-popped {
  transform: scale(1.4);
  opacity: 0;
  transition: transform .18s ease-in, opacity .18s ease-in;
}

.toast .toast-card.is-fading {
  opacity: 0;
  transition: opacity 2.5s ease;
}

.toast-icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.toast-text { margin: 0; }

.toast-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast-actions button {
  min-height: 36px;
  padding: 8px 18px;
  font: 600 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  border-radius: 4px;
  cursor: pointer;
}

.toast-allow {
  color: #fff;
  background: #1a73e8;
  border: 1px solid #1a73e8;
}

.toast-allow:hover { background: #1967d2; }

.toast-deny {
  color: #1a73e8;
  background: #fff;
  border: 1px solid #dadce0;
}

.toast-deny:hover { background: #f1f3f4; }

.toast-actions button:active { transform: translateY(1px); }

.toast-secret {
  z-index: 1;
  align-self: center;
  justify-self: center;
  margin: 0;
  padding: 12px;
  font: bold clamp(1.1rem, 4vw, 1.4rem)/1.2 Verdana, Geneva, sans-serif;
  color: #c00;
  text-align: center;
  transition: opacity 1s ease;
}

.toast-secret.is-fading { opacity: 0; }

.toast-frown {
  z-index: 1;
  justify-self: end;
  align-self: start;
  width: 64px;
  height: 64px;
  margin: 4px 8px 0 0;
  border-radius: 50%;
}

.toast-frown svg {
  display: block;
  width: 100%;
  height: 100%;
}

.toast-frown:hover { transform: rotate(-8deg); }

/* ---------- the confirmation box ---------- */

.msgbox {
  width: min(420px, calc(100vw - 24px));
  padding: 0;
  font: 13px/1.45 Tahoma, Verdana, Geneva, sans-serif;
  color: #000;
  background: #d4d0c8;
  border: 2px outset #e0dcd4;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .3);
}

.msgbox::backdrop { background: rgba(0, 0, 0, .35); }

.msgbox-title {
  padding: 5px 8px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, #0a246a, #a6caf0);
}

.msgbox-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px 8px;
}

.msgbox-icon {
  flex: none;
  width: 32px;
  height: 32px;
  font: bold 22px/28px "Times New Roman", Times, serif;
  color: #000080;
  text-align: center;
  background: #fff;
  border: 2px solid #000080;
  border-radius: 50%;
}

.msgbox-body p { margin: 0; }

.msgbox-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 16px;
}

.msgbox-actions button {
  min-width: 88px;
  min-height: 36px;
  font: inherit;
  color: #000;
  background: #d4d0c8;
  border: 2px outset #f0f0f0;
  cursor: pointer;
}

.msgbox-actions button:hover { background: #e2ded6; }
.msgbox-actions button:active { border-style: inset; }

/* ---------- the promo screen ---------- */

.promo-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: #000 url("img/watching.jpeg") center / cover no-repeat;
}

.promo-screen[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.promo-panel {
  width: 100%;
  max-height: 100%;
  padding: clamp(40px, 10vh, 96px) clamp(16px, 5vw, 48px) clamp(24px, 6vh, 56px);
  overflow-y: auto;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, .88) 60%, rgba(0, 0, 0, 0));
}

.promo-panel p {
  max-width: 28ch;
  margin: 0 auto 20px;
  font: bold clamp(1.2rem, 4vw, 1.8rem)/1.3 Verdana, Geneva, sans-serif;
  text-shadow: 0 2px 8px #000;
}

.promo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  font: bold 24px/1 Verdana, Geneva, sans-serif;
  color: #000;
  background: rgba(255, 255, 255, .92);
  border: 2px outset #e8e8e8;
  cursor: pointer;
}

.promo-close:active { border-style: inset; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .toast-card,
  .toast .toast-card.is-popped,
  .toast .toast-card.is-fading,
  .toast-secret {
    transition: none;
  }
}
