/* Wren — signing in (public/auth/index.html at /sign-in and /sign-up).
 *
 * The page is a sky over a hedgerow, with Wren's nest box (nestbox.js) on
 * the left, where the replies come home, and the sign-in as an airmail
 * letter on the right. On phones the box stands above the letter.
 *
 * This page loads before you're signed in, so it doesn't get the app's
 * stylesheets: the Hedgerow tokens below mirror public/css/wren.css. Change
 * them together.
 */

@font-face { font-family: "Fraunces"; src: url(/site/fonts/fraunces-latin-full-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/site/fonts/fraunces-latin-full-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/site/fonts/caveat-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f3ee, #0d110f);
  --surface: light-dark(#fffffb, #141a17);
  --surface-2: light-dark(#eeeee6, #1a221e);
  --border: light-dark(#e2e3d8, #222b27);
  --border-strong: light-dark(#d0d3c5, #313c36);
  --text: light-dark(#18211c, #e7ede9);
  --text-2: light-dark(#56615a, #a8b3ad);
  --text-3: light-dark(#5e6962, #8f9a94);
  --accent: light-dark(#22675a, #7fcbb8);
  --accent-2: light-dark(#1b5a4e, #9ad8c8);
  --accent-soft: light-dark(#e2efea, #13261f);
  --accent-ink: light-dark(#1a5046, #a6dfd0);
  --on-accent: light-dark(#ffffff, #0f1512);
  --warm: light-dark(#e6a23c, #f0b451);
  --warm-soft: light-dark(#fbf0db, #2a2112);
  --warm-ink: light-dark(#8a5a0e, #f3c67a);
  --ok: light-dark(#3a741c, #8fd16a);
  --danger: light-dark(#b93627, #ff8173);
  --danger-soft: light-dark(#fbe7e4, #361916);
  --mark-bg: #1f3a31;
  --mark-bird: #f2b84b;
  --air-a: light-dark(#c2413a, #e0736b);
  --air-b: light-dark(#2f5d9c, #7fa6dc);
  /* The app's design system (wren.css), the parts these pages use: corners, controls, labels and airmail */
  --r-1: 6px; --r-2: 10px; --r-3: 16px; --r-4: 22px;
  --h-sm: 30px; --h-md: 36px; --h-lg: 44px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --t-display: 600 34px/1.08 var(--serif);
  --t-label: 700 10.5px/1.2 var(--font);
  --ls-label: 0.12em;
  --airmail-red: light-dark(#b8665c, #d98b83);
  --airmail-blue: light-dark(#3f63a8, #8fa9dc);
  --airmail: repeating-linear-gradient(135deg, var(--airmail-red) 0 8px, transparent 8px 12px, var(--airmail-blue) 12px 20px, transparent 20px 24px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "New York", ui-serif, "Iowan Old Style", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  /* The sky's top, by the clock (auth.js sets the class on <html>) */
  --sky-top: light-dark(#e9f0ef, #101719);
}
:root.is-dawn { --sky-top: light-dark(#f8e5d6, #2a1d17); }
:root.is-dusk { --sky-top: light-dark(#f6ddc9, #2b1b14); }
:root.is-night { --sky-top: light-dark(#e3e6ee, #0c1019); }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body.au {
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--bg) 62%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  font-variation-settings: "SOFT" 50, "WONK" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 75%, transparent); outline-offset: 2px; }
a { color: var(--accent-ink); }
.au-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ the stage */

.au-stage { position: relative; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.au-sky { position: absolute; inset: 0 0 auto; height: 72%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.au-sky.in { opacity: 1; }
.au-clouds { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.au-cloud { position: absolute; left: 0; width: var(--w, 110px); opacity: 0.85; translate: 40vw 0; }
@media (prefers-reduced-motion: no-preference) {
  .au-cloud { animation: au-drift var(--dur, 180s) linear infinite; }
}
@keyframes au-drift { from { translate: -18vw 0; } to { translate: 118vw 0; } }
.au-cloud .dk { width: 100%; }
/* A distant flock: five small V's, each flapping on its own */
.au-flock { position: absolute; top: 13%; left: 0; display: flex; align-items: flex-end; gap: 12px; opacity: 0.5; translate: -20vw 0; pointer-events: none; }
.au-flock svg { width: 17px; height: 8px; overflow: visible; }
.au-flock svg:nth-child(2) { margin-bottom: 9px; }
.au-flock svg:nth-child(3) { margin-bottom: 3px; width: 14px; }
.au-flock svg:nth-child(4) { margin-bottom: 12px; width: 13px; }
.au-flock svg:nth-child(5) { margin-bottom: 5px; width: 15px; }
.au-flock path { fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .au-flock { animation: au-flock 38s linear infinite; animation-delay: -9s; }
  .au-flock svg { animation: au-flap 0.95s ease-in-out infinite; }
  .au-flock svg:nth-child(2n) { animation-delay: -0.35s; }
  .au-flock svg:nth-child(3n) { animation-delay: -0.6s; }
}
@media (prefers-reduced-motion: reduce) { .au-flock { display: none; } }
@keyframes au-flock { 0% { translate: -14vw 3vh; } 70%, 100% { translate: 114vw -4vh; } }
@keyframes au-flap { 50% { transform: scaleY(0.4); } }
.au-cloud .dk .dk-ink { stroke-width: 1.5; opacity: 0.75; }

.au-top { position: relative; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 44px); }
.au-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.au-brand b { font: 600 18px/1 var(--serif); letter-spacing: -0.01em; }
.au-mark { width: 32px; height: 32px; border-radius: var(--r-2); display: grid; place-items: center; background: var(--mark-bg); color: var(--mark-bird); --eye: var(--mark-bg); }
.au-mark svg { width: 21px; height: 21px; }
.au-toplink { font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r-2); }
.au-toplink:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }

.au-main { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, 452px); gap: clamp(16px, 3vw, 48px); padding: 0 clamp(20px, 6vw, 96px) 0 0; }
.au-scene { position: relative; min-height: 520px; }
.au-hedge { position: absolute; left: 0; bottom: 0; width: 100vw; pointer-events: none; }
.au-hedge.far { height: min(33vh, 270px); z-index: 1; }
.au-hedge.near { height: min(21vh, 176px); z-index: 3; }
.au-box { position: absolute; z-index: 2; left: 50%; bottom: -2vh; width: min(96%, 72vh, 700px); translate: -50% 0; }
.au-side { position: relative; z-index: 5; display: grid; align-content: center; padding: 8px 0 max(17vh, 150px); }

/* Handwritten notes beside the box */
.au-scrawl { position: absolute; z-index: 4; left: 64%; top: 30%; margin: 0; width: max-content; max-width: 240px; font: 600 25px/1.1 var(--hand); color: var(--accent-ink); pointer-events: none; }
.au-scrawl .nt { display: inline-block; text-wrap: balance; }
/* auth.js placeNote: too little sky between the box and the letter (a narrow laptop): the note steps aside */
.au-scrawl.no-room { display: none; }
.au-scrawl svg { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.au-scrawl svg path { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .au-scrawl .nt { clip-path: inset(-30% 100% -30% -5%); animation: au-write 1.2s 0.15s cubic-bezier(0.45, 0.05, 0.35, 1) forwards; }
  .au-scrawl svg path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: au-draw 0.7s 1.2s ease forwards; }
  .au-scrawl svg path.head { animation-delay: 1.8s; animation-duration: 0.3s; }
  .au-scrawl.out { animation: au-fade-out 0.35s ease forwards; }
}
@keyframes au-write { to { clip-path: inset(-30% -5% -30% -5%); } }
@keyframes au-draw { to { stroke-dashoffset: 0; } }
@keyframes au-fade-out { to { opacity: 0; transform: translateY(-4px); } }

/* ------------------------------------------------------------------ the letter */

.au-card {
  position: relative;
  padding: 34px clamp(22px, 3vw, 36px) 24px;
  border: 5px solid transparent;
  border-radius: var(--r-3);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--airmail) border-box var(--surface);
  box-shadow: 0 34px 60px -34px light-dark(rgba(28, 27, 25, 0.5), rgba(0, 0, 0, 0.95)), 0 2px 5px light-dark(rgba(28, 27, 25, 0.06), rgba(0, 0, 0, 0.4));
}
@media (prefers-reduced-motion: no-preference) {
  .au-card.arrive { animation: au-card-in 0.9s 0.15s var(--ease) both; }
}
@keyframes au-card-in { from { opacity: 0; transform: translateY(18px) rotate(1.2deg); } }

/* A stamp in the corner, cancelled by a postmark with today's date */
.au-stamp { position: absolute; top: 18px; right: 20px; width: 50px; height: 58px; display: grid; place-items: center; padding: 5px; background: var(--accent-soft); rotate: 4deg;
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle at 3px 3px, #0000 1.8px, #000 1.9px) -3px -3px / 6px 6px round;
  mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle at 3px 3px, #0000 1.8px, #000 1.9px) -3px -3px / 6px 6px round; }
.au-stamp span { width: 100%; height: 100%; display: grid; place-items: center; background: var(--mark-bg); color: var(--mark-bird); --eye: var(--mark-bg); }
.au-stamp svg { width: 26px; height: 26px; }
.au-postmark { position: absolute; top: 12px; right: 46px; width: 96px; height: 72px; color: var(--accent-ink); opacity: 0.78; pointer-events: none; }
.au-postmark svg { width: 100%; height: 100%; overflow: visible; }
.au-postmark .ring { fill: none; stroke: currentColor; stroke-width: 1.6; }
.au-postmark text { fill: currentColor; font: 700 6.4px/1 var(--font); letter-spacing: 0.2em; }
.au-postmark .town { font-size: 6px; letter-spacing: 0.04em; }
.au-postmark .day { font: 700 10.5px/1 var(--font); letter-spacing: 0.05em; }
.au-postmark .wave { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }

/* Clear of the postmark in the corner (it reaches ~142px in from the card's edge): a long eyebrow wraps under itself instead */
.au-eyebrow { margin: 0 124px var(--s-2) 0; font: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--accent-ink); text-wrap: balance; }
.au-title { margin: 0 96px var(--s-3) 0; font: var(--t-display); font-weight: 500; letter-spacing: -0.02em; font-variation-settings: "SOFT" 70, "WONK" 1; }
.au-title em { font-style: italic; color: var(--accent-ink); }
.au-sub { margin: 0 0 22px; max-width: 34ch; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.au-body { display: grid; gap: 14px; }
.au-body > * { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .au-body.swap > * { animation: au-rise 0.5s var(--ease) both; }
  .au-body.swap > *:nth-child(2) { animation-delay: 0.06s; }
  .au-body.swap > *:nth-child(3) { animation-delay: 0.12s; }
  .au-body.swap > *:nth-child(4) { animation-delay: 0.18s; }
  .au-head.swap { animation: au-rise 0.45s var(--ease) both; }
}
@keyframes au-rise { from { opacity: 0; transform: translateY(8px); } }

/* Buttons */
.au-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: var(--h-lg); padding: 0 18px; border: 1px solid var(--border-strong); border-radius: var(--r-2); background: var(--surface); color: var(--text); font: 500 15px/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s; }
.au-btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong)); }
.au-btn:active { transform: translateY(1px); }
.au-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.au-btn.au-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.au-btn.au-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.au-btn.au-primary .plane { transition: transform 0.25s var(--ease); }
.au-btn.au-primary:hover .plane { transform: translate(3px, -2px) rotate(-6deg); }
.au-btn[disabled], .au-btn.busy { cursor: progress; }
.au-btn.busy > :not(.au-pix) { opacity: 0; }
.au-btn .au-pix { display: none; }
.au-btn.busy .au-pix { display: grid; position: absolute; inset: 0; margin: auto; }
.au-oauth { display: grid; gap: 10px; }
.au-oauth.row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* The "Wren is working" signal: a 3×3 grid of dots that sweeps (same idea as the app's .ai-pix) */
.au-pix { grid-template-columns: repeat(3, 4px); gap: 2.5px; width: max-content; height: max-content; }
.au-pix i { width: 4px; height: 4px; border-radius: 1px; background: currentColor; opacity: 0.25; }
@media (prefers-reduced-motion: no-preference) {
  .au-pix i { animation: au-pix 1s ease-in-out infinite; }
  .au-pix i:nth-child(3n + 2) { animation-delay: 0.12s; }
  .au-pix i:nth-child(3n) { animation-delay: 0.24s; }
  .au-pix i:nth-child(n + 4) { animation-delay: 0.18s; }
  .au-pix i:nth-child(n + 7) { animation-delay: 0.36s; }
}
@keyframes au-pix { 40% { opacity: 1; } }

.au-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

/* Fields */
.au-form { display: grid; gap: 10px; }
.au-label { font: 600 13px/1.2 var(--font); color: var(--text); }
.au-input { width: 100%; min-height: var(--h-lg); padding: 0 14px; border: 1.5px solid var(--border-strong); border-radius: var(--r-2); background: var(--bg); color: var(--text); font: 16px/1.2 var(--font); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.au-input::placeholder { color: color-mix(in srgb, var(--text-3) 80%, transparent); }
.au-input:hover { border-color: color-mix(in srgb, var(--text) 26%, var(--border-strong)); }
.au-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.au-input[aria-invalid="true"] { border-color: var(--danger); }
.au-fine { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
/* Under the form when making an account: what Wren counts, and where to turn it off */
.au-usage { margin: 4px 0 0; line-height: 1.45; }
@media (prefers-reduced-motion: no-preference) {
  .au-body.swap > .au-usage { animation-delay: 0.24s; }
}
.au-error { margin: 0; padding: 9px 12px; border-radius: var(--r-2); background: var(--danger-soft); color: var(--danger); font-size: 13px; line-height: 1.4; }
.au-error[hidden] { display: none; }
.au-note { margin: 0; padding: 10px 12px; border-radius: var(--r-2); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; line-height: 1.45; }
.au-to { margin: 0; color: var(--text-2); font-size: 15px; }
.au-to b { color: var(--text); font-weight: 600; word-break: break-all; }

/* The code: six stamps, one real input laid over them */
.au-code { position: relative; }
.au-code input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text; }
.au-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(5px, 1.4vw, 9px); pointer-events: none; }
.au-slot { position: relative; aspect-ratio: 5 / 6; display: grid; place-items: center; padding: 4px; background: var(--border-strong);
  -webkit-mask: radial-gradient(circle at 3px 3px, #0000 1.7px, #000 1.8px) -3px -3px / 6px 6px round;
  mask: radial-gradient(circle at 3px 3px, #0000 1.7px, #000 1.8px) -3px -3px / 6px 6px round; }
.au-slot span { position: relative; width: 100%; height: 100%; display: grid; place-items: center; background: var(--surface); font: 600 clamp(22px, 2.4vw, 27px)/1 var(--font); color: var(--text); font-variant-numeric: tabular-nums; }
.au-code.focus .au-slot.cur { background: var(--accent); }
.au-code.focus .au-slot.cur:not(.on) span::after { content: ""; position: absolute; left: 50%; top: 29%; width: 2px; height: 42%; margin-left: -1px; background: var(--accent); }
.au-slot.on { background: color-mix(in srgb, var(--accent) 55%, var(--border-strong)); }
.au-code.bad .au-slot { background: var(--danger); }
@media (prefers-reduced-motion: no-preference) {
  .au-slot.on span { animation: au-thunk 0.34s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
  .au-code.bad .au-slots { animation: au-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
  .au-code.focus .au-slot.cur span::after { animation: au-caret 1s steps(1) infinite; }
}
@keyframes au-thunk { 0% { transform: scale(1.5) rotate(8deg); opacity: 0; } 60% { transform: scale(0.94); opacity: 1; } }
@keyframes au-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes au-caret { 50% { opacity: 0; } }

.au-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; }
.au-link { padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.au-link:hover { color: var(--text); }
.au-link[disabled] { color: var(--text-3); cursor: default; text-decoration: none; }

.au-foot { margin: 20px 0 0; padding-top: 14px; border-top: 1px dashed var(--border-strong); color: var(--text-2); font-size: 14px; }
.au-foot a { font-weight: 600; }

/* Signed in: a big green postmark lands on the letter */
.au-done-mark { position: absolute; right: 26px; bottom: 30px; width: 150px; color: var(--ok); pointer-events: none; rotate: -12deg; }
.au-done-mark svg { width: 100%; height: auto; overflow: visible; }
.au-done-mark .ring { fill: none; stroke: currentColor; stroke-width: 3; }
.au-done-mark text { fill: currentColor; font: 700 9.5px/1 var(--font); letter-spacing: 0.14em; }
.au-done-mark .big { font: 700 17px/1 var(--font); letter-spacing: 0.12em; }
@media (prefers-reduced-motion: no-preference) {
  .au-done-mark { animation: au-stamp 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
}
@keyframes au-stamp { 0% { opacity: 0; transform: scale(1.6) rotate(14deg); } 60% { opacity: 1; transform: scale(0.95); } 100% { opacity: 0.9; transform: none; } }

/* Clerk's own form, when a sign-in needs a step this page doesn't draw */
.au-clerk { min-height: 120px; }
.au-clerk .cl-rootBox, .au-clerk .cl-cardBox { width: 100%; max-width: none; }

/* Design preview (this computer, no sign-in service): says so plainly */
.au-preview { margin: -6px 0 16px; padding: 7px 11px; border: 1.5px dashed var(--warm); border-radius: var(--r-2); background: var(--warm-soft); color: var(--warm-ink); font-size: 13px; line-height: 1.45; }
.au-preview b { font-weight: 700; }

/* Who's signed in (the "belongs to someone else" letter) */
.au-who { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-2); background: var(--bg); }
.au-who img, .au-who .av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent-ink); }
.au-who div { min-width: 0; display: grid; }
.au-who small { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ a workspace that won't open (unavailable.html)
 * The gateway writes the reason on <html data-code>. One letter shows: the one for that code, or
 * .un-wait for any code without its own (it's the one that offers to try again). */

.un-main { position: relative; flex: 1; display: grid; place-items: center; padding: 12px 16px max(12vh, 48px); }
.un-card { width: min(100%, 480px); }
.un-card .au-sub { max-width: 42ch; }
.un-said { margin: 0 0 6px; color: var(--text); font-size: 15px; line-height: 1.5; }
html:not([data-code]) .un-said { display: none; }
.un { display: none; }
html:not([data-code="identity_unavailable"], [data-code="workspace_capacity"], [data-code$="_attention"], [data-code^="provider_key"], [data-code="workspace_changed"], [data-code="signed_out"], [data-code="identity_not_verified"]) .un-wait,
html[data-code="identity_unavailable"] .un-signin,
html[data-code="workspace_capacity"] .un-full,
html:is([data-code$="_attention"], [data-code^="provider_key"]) .un-help,
html[data-code="workspace_changed"] .un-changed,
html:is([data-code="signed_out"], [data-code="identity_not_verified"]) .un-out { display: block; }

/* ------------------------------------------------------------------ an address that isn't here (404.html)
 * The letter came back: a "No such address" cancellation across its corner, and the wren flying off with it. */

.nf-main { z-index: 5; padding-bottom: max(18vh, 110px); }
.nf-card { padding-top: 22px; }
.nf-card .au-title, .nf-card .au-eyebrow { margin-right: 0; }
.nf-bird { width: 172px; margin: -70px 0 2px -18px; }
.nf-bird svg.dk { display: block; width: 100%; height: auto; }
.nf-mark { position: absolute; top: 34px; right: 54px; display: grid; justify-items: center; gap: 3px; margin: 0; padding: 8px 13px 7px; border: 2px solid currentColor; border-radius: 50% / 42%; outline: 1px solid currentColor; outline-offset: 3px; rotate: -10deg; color: var(--danger); background: color-mix(in srgb, var(--surface) 55%, transparent); font: 700 11px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.nf-mark span { font: 700 9px/1 var(--font); letter-spacing: 0.1em; }
.nf-path { padding: 1px 6px; border-radius: var(--r-1); background: var(--surface-2); color: var(--text); font: 600 0.9em/1.3 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; }
.nf-hedge { z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .nf-mark { animation: au-stamp 0.55s 0.75s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
}

/* ------------------------------------------------------------------ narrow screens: the box above the letter */

@media (max-width: 900px) {
  .au-main { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px 28px; }
  .au-scene { min-height: 0; height: clamp(250px, 40vh, 360px); margin: -8px -16px 0; }
  .au-hedge.far { height: 130px; }
  .au-hedge.near { height: 84px; }
  .au-box { width: min(300px, 64vw); bottom: -34px; }
  .au-side { padding: 0; margin-top: -26px; }
  .au-scrawl { display: none; }
  .au-cloud { width: calc(var(--w, 110px) * 0.55); }
  .au-cloud:nth-child(n + 2) { display: none; }
  .au-sky { height: 44%; }
}
@media (max-width: 420px) {
  .au-card { padding: 28px 18px 20px; }
  .au-title { margin-right: 74px; }
  .au-eyebrow { margin-right: 96px; }
  .au-stamp { width: 42px; height: 49px; top: 14px; right: 14px; }
  .au-stamp svg { width: 22px; height: 22px; }
  .au-postmark { width: 76px; height: 58px; right: 32px; top: 10px; }
  .au-done-mark { width: 124px; right: 14px; }
  .nf-bird { width: 140px; margin: -56px 0 0 -10px; }
  .nf-mark { top: 26px; right: 44px; padding: 6px 10px 5px; font-size: 10px; }
  .nf-mark span { font-size: 9px; }
}
