/* Bespoke Stencil (Indian Type Foundry, ITF Free Font License; self-hosted,
   file unmodified as the licence requires). The site's only typeface. */
@font-face {
  font-family: 'Bespoke Stencil';
  src: url('/fonts/BespokeStencil-Variable.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #000;
  --muted: #595959;
  --rule: #dededb;
  --spark: #f5dc61;
  --soft-ink: color-mix(in srgb, var(--ink) 86%, var(--paper));
  --display: 'Bespoke Stencil', 'Helvetica Neue', Arial, sans-serif;
  font-family: var(--display);
  font-weight: 500; /* stencil cuts thin out small text; 500 keeps it crisp */
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17150f;
  --ink: #f3efe4;
  --muted: #aaa497;
  --rule: #35322a;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--paper); color: var(--ink); transition: background-color .3s ease, color .3s ease; }
main { min-height: 50vh; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--ink); outline-offset: 7px; }
svg { display: block; }
::selection { background: var(--spark); color: #111; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 20px; top: -80px; padding: 14px; background: var(--paper); z-index: 10; }
.skip-link:focus { top: 15px; }

/* ---------- header ---------- */
.site-header {
  position: relative; z-index: 4;
  max-width: 1440px; margin: auto; padding: 19px 5%;
  display: flex; align-items: center; justify-content: space-between; gap: 25px;
}
.brand { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 30px; }
.brand-mark { display: block; height: 30px; width: auto; aspect-ratio: 650 / 730; overflow: visible; }
.brand-word { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1; letter-spacing: -.01em; padding-top: 2px; }
.site-header nav { display: flex; align-items: center; gap: 36px; margin-left: auto; }
.site-header nav a { font-family: var(--display); font-size: 13px; font-weight: 700; padding: 12px 0; letter-spacing: .07em; }
.site-header nav a:hover, .site-header nav a[aria-current=page] { text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; }


/* ---------- loader ---------- */
.page-loader { display: none; }
html[data-loading] .page-loader {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: var(--paper); pointer-events: none;
  animation: loader-out .2s 1s forwards;
}
.page-loader svg { width: 160px; height: 90px; }
.page-loader > span { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.loader-line { stroke-dasharray: 1; animation: loader-draw .9s ease both; }
.loader-owl { transform-origin: 80px 69px; animation: loader-step .22s ease-in-out infinite alternate; }
@keyframes loader-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes loader-step { from { translate: 0 0; rotate: -3deg; } to { translate: 0 -3px; rotate: 3deg; } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 674px; padding-top: 49px; }
.hero-heading { width: max-content; max-width: 100%; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.hero h1 { margin: 0; font-family: var(--display); font-size: clamp(66px, 8.6vw, 109px); font-weight: 500; letter-spacing: -.02em; word-spacing: .04em; line-height: 1.1; }
.second-line { display: inline-block; padding-right: .12em; }
.hero-copy { margin: 28px 0 0; font-size: 12px; line-height: 2.1; letter-spacing: .12em; color: var(--muted); }

.town-stage { position: absolute; width: 100%; overflow: hidden; bottom: 64px; height: 275px; }
.town-playground { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.town-playground:focus-visible { outline-offset: -8px; }
.town-playground:disabled { cursor: default; }
.town { display: block; width: 100%; height: 100%; overflow: hidden; }
.eye-capsules { opacity: 0; transition: opacity .6s ease; }
.eye-capsules.is-on { opacity: 1; }

.hero-bottom { position: absolute; bottom: 22px; left: 5%; width: 90%; display: flex; align-items: center; justify-content: space-between; }
.scroll-note { display: flex; gap: 13px; align-items: center; font-size: 11px; letter-spacing: .06em; }
.scroll-stroke { display: block; position: relative; width: 12px; height: 33px; border-left: 1.5px solid var(--ink); transform: rotate(-8deg); }
.scroll-stroke::after { content: ''; position: absolute; left: -4px; bottom: 0; width: 8px; height: 8px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }
.motion-controls { display: flex; align-items: center; gap: 16px; }
.motion-controls button { background: transparent; border: 0; min-height: 44px; padding: 7px 0; font-size: 11px; }
.jump-hint { font-size: 10px; color: var(--muted); margin-right: 13px; letter-spacing: .04em; }
#replay { display: flex; gap: 7px; align-items: center; }
#replay > span { font-size: 23px; line-height: 1; }
#replay:hover { text-decoration: underline; text-underline-offset: 5px; }
#pause { width: 44px; display: grid; place-items: center; }
#pause svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
#pause .icon-play, #pause[aria-pressed=true] .icon-pause { display: none; }
#pause[aria-pressed=true] .icon-play { display: block; }

/* ---------- shared section ---------- */
.section-wrap { max-width: 1120px; width: 82%; margin: 0 auto; }
.outline-title {
  margin: 0; font-family: var(--display); font-size: clamp(44px, 5vw, 64px); font-weight: 700; line-height: 1.2; letter-spacing: .045em;
  color: var(--paper);
  text-shadow: 1.25px 0 var(--ink), -1.25px 0 var(--ink), 0 1.25px var(--ink), 0 -1.25px var(--ink), .9px .9px var(--ink), -.9px .9px var(--ink), .9px -.9px var(--ink), -.9px -.9px var(--ink);
}
.section-subtitle, .section-heading p { font-size: 14px; letter-spacing: .06em; margin: 22px 0 0; line-height: 1.8; }
.drawing-ink { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.spark-fill { fill: var(--spark); stroke: none; }

/* ---------- works ---------- */
.works { padding: 133px 0 80px; }
.section-heading { text-align: center; margin-bottom: 75px; }
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 12%; align-items: start; }
.work { display: block; min-width: 0; }
.work:nth-child(2n) { margin-top: 115px; }
.work-visual { position: relative; aspect-ratio: 1200 / 630; }
.work-link { position: absolute; inset: 0; display: block; border: 2px solid transparent; border-radius: 18px; overflow: hidden; isolation: isolate; background: var(--paper); transition: border-color .3s ease; }
.work-card {
  --accent: var(--spark);
  position: absolute; inset: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px;
  padding: 7% 8%; color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.4px) 0 0 / 14px 14px,
    color-mix(in srgb, var(--accent) var(--wash, 7%), var(--paper));
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1);
}
.work-card-kicker { grid-column: 1 / -1; align-self: start; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.work-card-kicker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--ink); }
.work-card-name { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 4.2vw, 58px); line-height: 1; letter-spacing: -.02em; margin: 0 0 12px; }
.work-card-name span { position: relative; z-index: 0; display: inline-block; padding: 0 .08em; }
/* marker stroke: slightly tilted, sits low like a highlighter pass */
.work-card-name span::before { content: ''; position: absolute; z-index: -1; left: -.04em; right: -.1em; bottom: .02em; height: .42em; background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: .3em .12em .35em .1em; transform: rotate(-1.6deg) scaleX(0); transform-origin: left center; transition: transform .5s .12s cubic-bezier(.2, .7, .2, 1); }
.work-card-line { font-size: clamp(12px, 1.15vw, 15px); line-height: 1.6; margin: 0; max-width: 28ch; font-weight: 500; color: var(--soft-ink); }
.work-card-url { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 7px 13px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink); white-space: nowrap; }
.work-card-url b { font-weight: 450; font-size: 15px; line-height: 1; }
/* product mark as a tilted sticker with an ink outline and hard shadow */
/* transparent marks drawn for light backgrounds keep a white sticker in both themes */
.work-card .card-icon--plain { background: #fff; padding: 2.5%; }
.work-card .card-icon, .work-card svg.card-mark { position: absolute; top: 10%; right: 8%; width: 15%; height: auto; aspect-ratio: 1; border-radius: 24%; border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.work-card svg.card-mark { padding: 3%; background: var(--accent); fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.work-link:hover .work-card-name span::before, .work-link:focus-visible .work-card-name span::before { transform: rotate(-1.6deg) scaleX(1); }
.work-link:hover .card-icon, .work-link:hover .card-mark, .work-link:focus-visible .card-icon, .work-link:focus-visible .card-mark { transform: rotate(3deg); }
.work-drawing { position: absolute; inset: 0; background: var(--paper); opacity: 1; transition: opacity .3s ease; pointer-events: none; }
.work-drawing svg { width: 100%; height: 100%; }
.work-link:focus-visible { border-color: var(--ink); }
.work-link:focus-visible .work-drawing { opacity: 0; }
.work-link:focus-visible .work-card { opacity: 1; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .work-link:hover { border-color: var(--ink); }
  .work-link:hover .work-drawing { opacity: 0; }
  .work-link:hover .work-card { opacity: 1; transform: translateY(0); }
}
.work-caption { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 5px 0; }
.work-caption h3 { font-family: var(--display); font-size: clamp(27px, 2.6vw, 39px); line-height: 1.1; font-weight: 600; letter-spacing: -.02em; margin: 0 0 15px; }
.work-dot { font-size: 1.15em; }
.work-caption p { margin: 0 0 8px; font-size: 13px; line-height: 1.8; }
.work-kind { font-size: 11px; color: var(--muted); line-height: 1.8; }
.drawn-arrow { font-size: 35px; font-weight: 450; align-self: flex-start; line-height: 1; padding: 4px; flex: 0 0 auto; }
.work-caption > div { min-width: 0; }
.work-caption h3 { overflow-wrap: anywhere; }
.work:hover h3, .work:focus-within h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* per-product hover life inside the doodles */
.bob { transform-box: fill-box; transform-origin: 50% 100%; }
.work:hover .bob, .work:focus-within .bob { animation: bob 1.4s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-10px) rotate(3deg); } }
.pulse { transform-box: fill-box; transform-origin: 50% 50%; }
.work:hover .pulse, .work:focus-within .pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.82); } }
.sway { transform-box: fill-box; transform-origin: 50% 0; }
.work:hover .sway, .work:focus-within .sway { animation: sway 2.1s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.thread { stroke-dasharray: 5 9; }
.work:hover .thread, .work:focus-within .thread { animation: thread 1s linear infinite; }
@keyframes thread { to { stroke-dashoffset: -28; } }

/* ---------- about ---------- */
.about { padding: 160px 0 145px; text-align: center; }
.about-doodle { width: 140px; margin: 0 auto 22px; transform: rotate(-4deg); }
.about h2 { overflow-wrap: anywhere; font-family: var(--display); font-size: clamp(28px, 3vw, 41px); font-weight: 500; letter-spacing: .02em; line-height: 1.6; margin: 0 0 37px; }
.about p { font-size: 13px; line-height: 2.5; letter-spacing: .06em; margin: 0 0 22px; }
.about-signature { display: inline-block; margin-top: 23px; font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.mobile-break { display: none; }

/* ---------- notes ---------- */
.journal { max-width: 920px; padding: 48px 0 95px; }
.journal-heading { display: grid; text-align: center; gap: 36px; margin-bottom: 24px; }
.journal-heading > a { font-size: 11px; justify-self: end; }
.journal-heading > a span { margin-left: 9px; font-size: 18px; }
.journal-entry { display: grid; grid-template-columns: 112px 1fr 22px; align-items: center; gap: 25px; border-top: 1px solid var(--rule); min-height: 92px; padding: 22px 0; }
.journal-entry:last-child { border-bottom: 1px solid var(--rule); }
.journal-entry time { font-size: 12px; font-weight: 600; color: var(--muted); }
.journal-entry h3 { font-size: 13px; font-weight: 600; line-height: 1.9; margin: 0; }
.journal-entry > span { font-size: 24px; }
.journal a:hover h3, .journal-heading > a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- contact ---------- */
.contact { padding: 115px 0 145px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 35px; }
.contact-heading { grid-column: 1 / -1; margin-bottom: 22px; text-align: center; }
.contact-copy p { font-size: 13px; line-height: 2.3; margin: 0 0 24px; }
.email-link { display: inline-block; font-size: 24px; letter-spacing: -.035em; font-weight: 500; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.email-link span { font-size: 27px; margin-left: 20px; }
.contact-drawing { width: 100%; max-width: 340px; }
.plane { transform-box: fill-box; transform-origin: 50% 50%; }
.contact:hover .plane { animation: glide 2.4s ease-in-out infinite alternate; }
@keyframes glide { from { transform: translate(0, 0) rotate(0); } to { transform: translate(8px, -8px) rotate(-6deg); } }

/* ---------- footer ---------- */
.site-footer { width: 90%; margin: auto; padding: 30px 0; border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 30px; }
.footer-brand { flex: 0 0 auto; height: 35px; }
.footer-brand .brand-word { font-size: 22px; }
.footer-brand .brand-mark { height: 35px; }

.site-footer > span, .site-footer > a:not(.footer-brand) { font-size: 10px; color: var(--muted); }
.site-footer .legal-link { margin-left: auto; }
.site-footer > a:not(.footer-brand):hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- inner pages ---------- */
.page { padding: 90px 0 130px; }
.page .section-heading { margin-bottom: 68px; }
.note-entry { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 30px; border-top: 1px solid var(--rule); padding: 35px 0; scroll-margin-top: 30px; }
.note-entry:last-child { border-bottom: 1px solid var(--rule); }
.note-entry time { color: var(--muted); font-size: 12px; padding-top: 6px; }
.note-entry h2 { margin: 0 0 15px; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.8; font-weight: 600; }
.note-entry p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 2; }
.legal-header { text-align: center; margin-bottom: 65px; }
.legal-title { margin: 24px 0; font-size: 20px; font-weight: 500; line-height: 1.8; }
.legal-lead { font-size: 13px; line-height: 2; color: var(--muted); max-width: 650px; margin: auto; }
.legal-list { margin: 0; }
.legal-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 35px; padding: 25px 0; border-top: 1px solid var(--rule); font-size: 14px; line-height: 2; }
.legal-row:last-child { border-bottom: 1px solid var(--rule); }
.legal-row dt { font-weight: 600; }
.legal-row dd { margin: 0; }
.legal-row a { text-decoration: underline; text-underline-offset: 4px; }
.legal-note { font-size: 12px; color: var(--muted); line-height: 2; margin-top: 28px; }
.back-home { text-align: center; margin-top: 60px; font-size: 12px; }
.back-home a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- breakpoints ---------- */
@media (min-width: 1600px) {
  .hero { min-height: 755px; padding-top: 65px; }
  .town-stage { height: 330px; }
}
@media (max-width: 1050px) {
  .hero { min-height: 654px; padding-top: 68px; }
  .works-grid { gap: 55px 7%; }
  .contact { padding-left: 2%; padding-right: 2%; }
}
@media (max-width: 700px) {
  :root { scroll-padding-top: 22px; }
  .site-header { padding: 23px 6%; gap: 12px; min-height: 90px; }
  .site-header .brand { height: auto; }
  .brand-word { font-size: 15px; }
  .brand-mark { height: 24px; }
  .site-header nav { gap: 13px; }
  .site-header nav a { font-size: 10px; }
  .hero { padding-top: 79px; min-height: 665px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 74px); }
  .hero-copy { font-size: 12px; line-height: 2.2; margin-top: 27px; letter-spacing: .07em; }
  .town-stage { bottom: 85px; height: 230px; }
  .jump-hint { display: none; }
  .hero-bottom { width: 88%; left: 6%; bottom: 30px; }
  .scroll-note { font-size: 10px; gap: 8px; }
  .motion-controls { gap: 6px; }
  .motion-controls button { font-size: 10px; }
  #pause { width: 32px; }
  .section-wrap { width: 86%; }
  .works { padding: 84px 0 30px; }
  .section-heading { margin-bottom: 57px; }
  .outline-title { font-size: clamp(36px, 10vw, 48px); letter-spacing: .04em; }
  .section-subtitle { font-size: 12px; margin-top: 14px; }
  .section-heading p { font-size: 12px; margin-top: 18px; }
  .works-grid { display: block; }
  .work { max-width: 450px; margin: 0 auto 76px; }
  .work:nth-child(2n) { margin-top: 0; }
  .work-caption { padding: 15px 12px 0; }
  .work-caption h3 { font-size: 32px; }
  .work-caption p { font-size: 12px; }
  .work-kind { font-size: 10px; }
  .about { padding: 40px 0 95px; }
  .about h2 { font-size: 27px; letter-spacing: .06em; margin-bottom: 25px; }
  .about p { font-size: 12px; line-height: 2.4; letter-spacing: .01em; }
  .mobile-break { display: initial; }
  .about-signature { font-size: 19px; }
  .journal { padding: 35px 0 75px; }
  .journal-heading > a { font-size: 10px; }
  .journal-entry { grid-template-columns: 1fr 20px; gap: 7px 14px; padding: 22px 0; }
  .journal-entry time { grid-column: 1; font-size: 10px; }
  .journal-entry h3 { grid-column: 1; font-size: 12px; }
  .journal-entry > span { grid-column: 2; grid-row: 1 / 3; }
  .contact { padding: 60px 0 80px; display: block; position: relative; }
  .contact-heading { margin-bottom: 40px; }
  .contact-copy { position: relative; z-index: 1; }
  .email-link { font-size: clamp(19px, 5.8vw, 24px); display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
  .email-link span { margin-left: 0; }
  .contact-drawing { width: 155px; margin: 36px 0 0 auto; }
  .site-footer { flex-wrap: wrap; gap: 12px 22px; padding: 23px 0 26px; }
  .site-footer > a:not(.footer-brand) { margin-left: 0; }
  .page { padding: 60px 0 85px; }
  .note-entry { display: block; padding: 28px 0; }
  .note-entry time { display: block; margin-bottom: 15px; }
  .note-entry h2 { font-size: 17px; }
  .legal-title { font-size: 18px; }
  .legal-row { grid-template-columns: 1fr; gap: 7px; padding: 23px 0; font-size: 13px; }
}
@media (max-width: 440px) {
  .work-card { padding: 6% 7%; gap: 8px; }
  .work-card-kicker { font-size: 9px; }
  .work-card-name { font-size: 30px; margin-bottom: 6px; }
  .work-card-line { font-size: 11px; line-height: 1.5; }
  .work-card-url { display: none; }
}
@media (max-width: 370px) {
  .work-caption { gap: 10px; }
  .work-caption h3 { font-size: 27px; }
  .drawn-arrow { font-size: 29px; }
  .site-header { gap: 6px; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: 9px; }
  .brand-word { font-size: 14px; }
  .brand-mark { height: 21px; }
  .hero { min-height: 630px; }
  .motion-controls { gap: 0; }
  .contact-drawing { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  html[data-loading] .page-loader { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- theme: every drawing is authored in black/white ink and paper;
   these map those attributes onto the live tokens so each cartoon redraws
   itself in both themes. (The reveal mask pins its own white inline.) */
svg [stroke="#000"] { stroke: var(--ink); }
svg [fill="#000"] { fill: var(--ink); }
svg [stroke="#fff"] { stroke: var(--paper); }
svg [fill="#fff"] { fill: var(--paper); }
:root[data-theme="dark"] { --wash: 14%; }
:root[data-theme="dark"] .town-sky { opacity: .5; }

/* ---------- theme switch: keycap toggle after Voxybuns' "horrible-shrimp-47"
   (uiverse.io, MIT). Same geometry and motion: 2em x 1em track, 1em cap raised
   .2em on a hard shadow, lifts to .3em on hover, slides on check, .15s. */
.theme-switch { --sw: 2em; --sh: 1em; font-size: 19px; position: relative; display: inline-block; width: var(--sw); height: var(--sh); flex: 0 0 auto; margin-left: 4px; cursor: pointer; }
.theme-switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.theme-track { box-sizing: border-box; position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: var(--sh); background: var(--paper); transition: .15s; }
.theme-track::before, .theme-track::after { content: ''; position: absolute; width: 2px; height: 2px; border-radius: 50%; background: var(--paper); opacity: 0; transition: opacity .15s; }
.theme-track::before { left: .28em; top: .2em; }
.theme-track::after { left: .5em; top: .45em; }
.theme-cap { box-sizing: border-box; position: absolute; width: var(--sh); height: var(--sh); left: -2px; bottom: -2px; border: 2px solid var(--ink); border-radius: 100%; background: var(--paper); transform: translateY(-.2em); box-shadow: 0 .2em 0 var(--ink); transition: .15s; display: grid; place-items: center; }
.theme-cap svg { width: .62em; height: .62em; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease, opacity .15s; grid-area: 1 / 1; }
.theme-cap .icon-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
.theme-switch:hover .theme-cap { transform: translateY(-.3em); box-shadow: 0 .3em 0 var(--ink); }
.theme-switch input:checked + .theme-track { background: color-mix(in srgb, var(--ink) 45%, var(--paper)); }
.theme-switch input:checked + .theme-track::before, .theme-switch input:checked + .theme-track::after { opacity: .9; }
.theme-switch input:checked + .theme-track .theme-cap { transform: translateX(calc(var(--sw) - var(--sh))) translateY(-.2em); }
.theme-switch:hover input:checked + .theme-track .theme-cap { transform: translateX(calc(var(--sw) - var(--sh))) translateY(-.3em); box-shadow: 0 .3em 0 var(--ink); }
.theme-switch input:checked + .theme-track .icon-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
.theme-switch input:checked + .theme-track .icon-moon { opacity: 1; transform: none; }
.theme-switch input:focus-visible + .theme-track { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 45%, var(--paper)); outline: 2px dashed var(--ink); outline-offset: 6px; }
@media (max-width: 700px) { .theme-switch { font-size: 16px; margin-left: 0; } }
@media (max-width: 370px) { .theme-switch { font-size: 14px; } }

/* ---------- 404 ---------- */
.lost { text-align: center; }
.lost-doodle { width: min(300px, 70%); margin: 0 auto 10px; }
.lost-copy { font-size: 14px; line-height: 2.2; letter-spacing: .04em; margin: 26px 0 0; }
