/* Not My Event: the look of "Typing... Still Typing... — Classic Card" (scripts/envelope-typing.mjs; the page is written by scripts/make-envelope-cards.mjs).
   An indigo envelope whose seal is a message bubble with three dots; an off-white card set like a magazine page about a phone: enormous capitals, one bright lime.
   The paper and the envelope are solid colours (never see-through); the envelope's decorations live inside its front and leave with it. */
body.d-typing { --bg: #14102E; --env-back: #1F1950; --env-l: #2F2874; --env-r: #2A2368; --env-b: #372F86; --flap: #3F3698; --flap-in: #1B1640; --edge: rgba(0, 0, 0, .45);
  --paper: #F6F1E7; --ink: #14102E; --ink-soft: #4B4590; --accent: #C6F432; --gold: #C6F432; --gold-l: #E9FBA6; --gold-d: #6F8E0E;
  --display: "Six Caps", Impact, "Arial Narrow", sans-serif; --body: "Familjen Grotesk", system-ui, sans-serif; --script: "Instrument Serif", Georgia, serif; --pixel: "Silkscreen", "Courier New", monospace; --t1: 11; --t2: 9.2; --t3: 7.6; color: #E9FBA6; }
.d-typing .bg { background: radial-gradient(ellipse 80% 60% at 50% 40%, #2A2260 0, #14102E 60%, #0B0920 100%); }
.d-typing .bg i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: radial-gradient(circle, rgba(198, 244, 50, .28), transparent 66%); animation: ty-glow var(--d) ease-in-out infinite; }
@keyframes ty-glow { 50% { opacity: .45; } }
.d-typing .tap-hint, .d-typing .quiet { color: var(--gold-l); font-family: var(--body); }

/* the envelope: the seal is a message bubble with the three dots; the words under it are the only other thing on the front */
.d-typing .seal { width: calc(var(--ew) * .26); height: calc(var(--ew) * .15); margin: calc(var(--ew) * -.075) 0 0 calc(var(--ew) * -.13); border-radius: calc(var(--ew) * .075) calc(var(--ew) * .075) calc(var(--ew) * .075) calc(var(--ew) * .016); background: #E2DCCB; box-shadow: 0 0 0 calc(var(--ew) * .008) #14102E, 0 3px 10px rgba(0, 0, 0, .5); }
.ty-seal-dots, .ty-chip-dots { display: flex; align-items: center; justify-content: center; gap: 16%; width: 100%; height: 100%; }
.ty-seal-dots i { display: block; width: 15%; aspect-ratio: 1; border-radius: 50%; background: #14102E; animation: ty-dot 1.2s ease-in-out infinite; }
.ty-seal-dots i:nth-child(2), .ty-chip-dots i:nth-child(2) { animation-delay: .18s; } .ty-seal-dots i:nth-child(3), .ty-chip-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes ty-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-28%); opacity: 1; } }
.d-typing .ty-coming { position: absolute; z-index: 2; left: 0; right: 0; bottom: 7%; text-align: center; font-family: var(--script); font-style: italic; font-weight: 500; font-size: calc(var(--ew) * .046); color: var(--gold-l); }
.d-typing .go .ty-coming { animation: ty-away .4s ease-in forwards; }
@keyframes ty-away { to { opacity: 0; } }

/* the card: a page from a magazine about a phone. Wide margins, so nothing sits on a fold or at the edge */
.d-typing .card { background: #F6F1E7; color: var(--ink); border-radius: calc(var(--u) * 5) calc(var(--u) * 5) calc(var(--u) * 5) calc(var(--u) * 1.2);
  box-shadow: 0 0 0 calc(var(--u) * .8) #14102E, 0 0 0 calc(var(--u) * 1.5) #C6F432, 0 calc(var(--u) * 10) calc(var(--u) * 20) rgba(0, 0, 0, .5); }
.d-typing .card-in { padding: calc(var(--u) * 5) calc(var(--u) * 8); gap: calc(var(--u) * 1.3); justify-content: flex-start; }
.d-typing .ty-chip { align-self: flex-start; display: flex; align-items: center; gap: calc(var(--u) * 1.6); padding: calc(var(--u) * 1.2) calc(var(--u) * 2.6); border-radius: calc(var(--u) * 4) calc(var(--u) * 4) calc(var(--u) * 4) calc(var(--u) * 1); background: #E2DCCB; font-family: var(--body); font-weight: 700; font-size: calc(var(--u) * 3.2); color: var(--ink-soft); }
.d-typing .ty-chip-dots { width: calc(var(--u) * 6); height: auto; gap: calc(var(--u) * .8); }
.d-typing .ty-chip-dots i { display: block; width: calc(var(--u) * 1.3); height: calc(var(--u) * 1.3); border-radius: 50%; background: var(--ink); animation: ty-dot 1.2s ease-in-out infinite; }
.d-typing .ty-big { align-self: stretch; text-align: left; font-family: var(--display); font-size: calc(var(--u) * 11); line-height: .96; white-space: nowrap; letter-spacing: .005em; text-transform: uppercase; color: var(--ink); }
.d-typing .ty-big em { display: block; font-style: normal; color: var(--ink); background: linear-gradient(transparent 58%, #C6F432 58% 92%, transparent 92%); }
.d-typing .kicker { font-family: var(--script); font-style: italic; font-weight: 500; color: var(--ink-soft); }
.d-typing .ty-act { align-self: stretch; text-align: left; font-size: calc(var(--u) * 4.4); color: var(--ink); margin-top: calc(var(--u) * 1.5); }
.d-typing .title { align-self: stretch; text-align: left; font-family: var(--display); font-size: calc(var(--u) * 8.4); line-height: 1; color: var(--ink); overflow-wrap: anywhere; }
.d-typing .ty-facts { align-self: stretch; display: grid; gap: calc(var(--u) * 1.4); justify-items: end; text-align: right; }
.d-typing .when, .d-typing .where { max-width: 88%; padding: calc(var(--u) * 1.4) calc(var(--u) * 3); font-family: var(--body); font-weight: 700; font-size: calc(var(--u) * 3.6); line-height: 1.25; overflow-wrap: anywhere; }
.d-typing .when { background: #14102E; color: #F6F1E7; border-radius: calc(var(--u) * 4) calc(var(--u) * 4) calc(var(--u) * 1) calc(var(--u) * 4); }
.d-typing .where { background: #C6F432; color: #14102E; border-radius: calc(var(--u) * 4) calc(var(--u) * 1) calc(var(--u) * 4) calc(var(--u) * 4); }
.d-typing .when:empty, .d-typing .where:empty { display: none; }
.d-typing .note { align-self: stretch; text-align: left; font-family: var(--script); font-style: italic; color: var(--ink-soft); font-size: calc(var(--u) * 3.8); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.d-typing .hope { align-self: stretch; text-align: left; font-family: var(--body); font-weight: 900; font-size: calc(var(--u) * 3.2); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); border-top: calc(var(--u) * .5) solid var(--ink); padding-top: calc(var(--u) * 1.6); margin-top: auto; }
.d-typing .by { align-self: stretch; text-align: left; font-size: calc(var(--u) * 3.2); }
/* the reply pills under the card wear the design's colours */
body.d-typing { --rp-bg: #C6F432; --rp-fg: #14102E; --rp-edge: #14102E; }
@media (prefers-reduced-motion: reduce) { .ty-seal-dots i, .ty-chip-dots i, .d-typing .bg i { animation: none; } }
/* the lettering: Six Caps (towering, ultra-condensed), Silkscreen (pixels, for anything a phone would say), Instrument Serif (the calm truth) */
.d-typing .ty-big { font-size: calc(var(--u) * 17); line-height: .92; letter-spacing: .02em; }
.d-typing .ty-chip, .d-typing .hope { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; }
.d-typing .ty-chip { font-size: calc(var(--u) * 2.7); } .d-typing .hope { font-size: calc(var(--u) * 2.9); }
.d-typing .ty-act { font-style: italic; font-weight: 400; font-size: calc(var(--u) * 5.2); }
.d-typing .title { font-family: var(--script); font-weight: 400; font-size: calc(var(--u) * 8.6); letter-spacing: -.01em; }
.d-typing .ty-coming { font-weight: 400; font-size: calc(var(--ew) * .052); }
.d-typing .note { font-weight: 400; } .d-typing .kicker { font-weight: 400; }
