@font-face {
  font-family: RedHat;
  src: url('/assets/red-hat-display-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: Cormorant;
  src: url('/assets/cormorant-infant-latin-wght-italic.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #1F1A14;
  --paper: #F8F5F0;
  --muted: #C9C0B0;
  --brand: #574A72;
  --button: #43385A;
  --lavender: #BBAFCA;
  --ochre: #C99238;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: RedHat, Arial, sans-serif;
  display: grid;
  justify-items: center;
}
button, input { font: inherit; }
button, a, input { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 640px);
  height: 480px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1F1C18 30%, #191715 48%, #0E0E0E 65%, #010101 85%, #000 100%);
}
.masthead { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; padding: 9px; flex-shrink: 0; border-radius: 50%; background: var(--paper); }
.logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.publication, .byline { margin: 0; }
.publication { font-size: 20px; font-weight: 750; line-height: 1.15; }
.byline { font-size: 13px; color: var(--muted); margin-top: 3px; }
.free { margin-left: auto; white-space: nowrap; border: 1px solid #c9c0b03b; border-radius: 99px; padding: 8px 12px; color: var(--lavender); font-size: 12px; }
.free i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ochre); margin-right: 6px; }
.screen { margin-top: 34px; }
h1 { margin: 0; font-size: 40px; line-height: 1.05; letter-spacing: -.045em; font-weight: 800; }
h1 em { font-family: Cormorant, Georgia, serif; font-size: 1.13em; letter-spacing: -.035em; font-weight: 500; color: var(--ochre); }
.description { margin: 17px 0 23px; font-size: 16px; line-height: 1.4; color: var(--muted); }
.field-row { display: flex; gap: 8px; padding: 5px; border: 1px solid #c9c0b066; border-radius: 17px; background: #f8f5f00c; box-shadow: none; --control-size: 18px; }
.email-wrap { display: flex; align-items: center; flex: 1; min-width: 0; border: 1px solid #c9c0b055; border-radius: 12px; padding: 0 12px; background: #f8f5f010; }
.field-row:has(input[type=email]:focus), .field-row:active { border-color: #6B5C8A; box-shadow: 0 0 0 2px #574a7266, 0 0 22px #574a7273, 0 0 46px #574a7233; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; flex-shrink: 0; color: var(--muted); }
input[type=email] { width: 100%; min-width: 0; height: 44px; border: 0; background: none; color: var(--paper); padding: 0 10px; font: 600 var(--control-size)/1.25 RedHat, Arial, sans-serif; letter-spacing: 0; outline: none; }
input::placeholder { color: #c9c0b0a6; }
.submit { display: flex; align-items: center; justify-content: center; gap: 18px; flex-shrink: 0; min-height: 46px; padding: 0 20px; border: 1px solid #574A72; border-radius: 12px; background: var(--button); color: var(--paper); font: 600 var(--control-size)/1.25 RedHat, Arial, sans-serif; letter-spacing: 0; box-shadow: none; }
.submit:hover { background: var(--button); }
.submit svg { width: 25px; height: 25px; color: currentColor; stroke-width: 1.8; }
.note { font-size: 12px; line-height: 1.3; color: var(--muted); margin: 10px 5px 0; }
.note a { color: inherit; text-underline-offset: 3px; }
.error { font-size: 12px; line-height: 1.3; color: #ffb9ad; margin: 7px 5px 0; }
.error:empty { display: none; }
.support { margin-top: auto; padding-top: 12px; flex-shrink: 0; opacity: .4; }
.support-line { display: flex; align-items: center; gap: 16px; font-size: 12px; line-height: 1.2; font-weight: 500; }
.support-line::after { content: ''; height: 1px; background: #c9c0b033; flex: 1; order: 1; }
.support-line span:last-child { order: 2; color: var(--muted); font-weight: 400; }
.reactions { display: flex; justify-content: center; gap: 32px; margin-top: 6px; font-weight: 600; font-size: 15px; line-height: 1.1; color: var(--lavender); }
.reactions b { display: inline-block; margin-left: 5px; font-size: 18px; line-height: 1; font-weight: 400; }
.repost { color: var(--ochre); }
.like { color: #BBAFCA; }
.success { margin-top: 42px; }
.success-heading { display: flex; align-items: center; gap: 22px; }
.check { display: grid; place-items: center; flex-shrink: 0; width: 66px; height: 66px; border: 2px solid var(--ochre); border-radius: 50%; color: var(--ochre); }
.check svg { width: 32px; height: 32px; color: inherit; stroke-width: 2; }
.success h1 { font-size: 48px; }
.success .description { margin: 18px 0 18px 88px; font-size: 17px; line-height: 1.5; }
.success .description span { display: block; text-wrap: pretty; }
.email-pill { display: inline-flex; align-items: center; align-self: flex-start; max-width: calc(100% - 88px); gap: 10px; padding: 8px 14px; border: 1px solid #c9c0b044; background: #f8f5f00c; border-radius: 99px; color: var(--muted); margin: 0 0 0 88px; font-size: 15px; }
.email-pill span { overflow-wrap: anywhere; min-width: 0; }
.email-pill button { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; padding: 4px; }
.card:has(.success:not([hidden])) #support-label { color: var(--ochre); }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.confetti-piece { position: absolute; top: 0; left: 0; width: 6px; height: 10px; border-radius: 1px; background: var(--ochre); }
.confetti-piece:nth-child(3n + 1) { background: var(--brand); }
.confetti-piece:nth-child(3n + 2) { background: var(--lavender); width: 5px; height: 8px; }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
.sr-only, .trap { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 4px; }
@media (max-width: 480px) {
  .card { padding: 22px 20px; }
  .masthead { display: grid; grid-template-columns: 40px 1fr; column-gap: 8px; row-gap: 7px; }
  .avatar { grid-row: 1 / span 2; }
  .avatar { width: 40px; height: 40px; padding: 7px; }
  .publication { font-size: 15px; }
  .byline { font-size: 11px; }
  .free { grid-column: 2; justify-self: start; margin-left: 0; padding: 5px 8px; font-size: 10px; }
  .free i { width: 5px; height: 5px; margin-right: 4px; }
  .screen { margin-top: 32px; }
  h1 { font-size: 34px; }
  .description { font-size: 14px; margin: 15px 0 20px; }
  .field-row { gap: 6px; padding: 5px; border-radius: 16px; --control-size: 16px; }
  .email-wrap { padding: 0 9px; border-radius: 11px; }
  .email-wrap svg { width: 18px; }
  input[type=email] { padding: 0 7px; }
  .submit { padding: 0 13px; gap: 8px; border-radius: 11px; }
  .note { font-size: 10px; }
  .support-line { font-size: 11px; gap: 12px; }
  .reactions { font-size: 14px; gap: 28px; }
  .reactions b { font-size: 17px; }
  .success { margin-top: 35px; }
  .success-heading { gap: 16px; }
  .check { width: 50px; height: 50px; }
  .success h1 { font-size: 34px; }
  .success .description { margin: 18px 0; font-size: 15px; text-wrap: pretty; }
  .success .description span { display: inline; }
  .email-pill { margin-left: 0; max-width: 100%; gap: 7px; font-size: 13px; padding: 7px 10px; }
}
@media (max-width: 350px) {
  .card { padding: 18px 16px; }
  h1 { font-size: 30px; }

  .submit { padding: 0 10px; }
  .submit svg { display: none; }
  .success h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: no-preference) {
  .field-row { transition: box-shadow .16s ease, border-color .16s ease; }
}
