:root { color-scheme: only light; }   /* stop phone browsers (auto dark mode) from darkening the cards */
/* Hand-drawn style, game.terrymota.com */
:root { --ink: #000; --paper: #ececea; --card: #f5f5f3; --hi: #fff; --shadow: var(--ink); --muted: #555; --focus: #2b4bd8; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink);
  font: 500 13px/1.6 "Google Sans Code", ui-monospace, Menlo, monospace; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; overflow: visible; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hd-skip { position: absolute; left: 16px; top: -60px; z-index: 40; padding: 8px 12px; background: var(--ink); color: var(--paper); }
.hd-skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.hd-muted { color: var(--muted); }

/* ---------- layout ---------- */
.hd-shell { display: grid; grid-template-columns: 365px minmax(0, 1fr); min-height: 100vh; }
.hd-side { position: sticky; top: 0; z-index: 20; height: 100vh; overflow: visible; padding: 28px 28px 28px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 22px; scrollbar-width: none; }
.hd-divider { position: absolute; top: 28px; right: 0; width: 5px; height: calc(100% - 56px); }
.hd-main { padding: 32px 32px 96px 40px; min-width: 0; container-type: inline-size; }
.hd-section { scroll-margin-top: 24px; }
.hd-section + .hd-section { margin-top: 96px; }

/* ---------- sidebar ---------- */
.hd-logo { display: block; border-radius: 4px; }
.hd-logo__art { width: 325px; height: auto; }
.hd-bubble { position: relative; width: 325px; }
.hd-bubble__art { display: block; width: 100%; height: 345px; }
.hd-bubble p { position: absolute; left: 62px; right: 20px; top: 40px; margin: 0; font-size: 15px; line-height: 1.5; }
.hd-nav { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.hd-nav__link { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px 8px; text-decoration: none; border-radius: 4px; }
.hd-nav__word { height: 42px; width: auto; transition: transform .25s ease; }
.hd-nav__under { width: 100%; height: 4px; opacity: 0; transform: scaleX(.3); transition: opacity .2s, transform .25s ease; }
.hd-nav__link:hover .hd-nav__word, .hd-nav__link:focus-visible .hd-nav__word { transform: rotate(-2deg) scale(1.04); }
.hd-nav__link:hover .hd-nav__under { opacity: .45; transform: scaleX(1); }
.hd-nav__link[aria-current="true"] .hd-nav__under { opacity: 0; }
@media (max-height: 820px) { .is-home .hd-bubble p { font-size: 13px; } .is-home .hd-bubble__art { height: 300px; } .hd-nav { gap: 18px; } .hd-nav__word { height: 36px; } }

/* ---------- titles ---------- */
.hd-title { margin: 0 0 8px; display: flex; justify-content: center; }
.hd-title__art { height: auto; max-width: 100%; }

/* ---------- drawn media (cards, shots, videos) ---------- */
.hd-media { position: relative; display: block; aspect-ratio: 322 / 263; }
.hd-media__clip, .hd-media__shadow { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.hd-media.is-rect .hd-media__clip, .hd-media.is-rect .hd-media__shadow { -webkit-mask-image: url(../images/hand/mask-rect.svg); mask-image: url(../images/hand/mask-rect.svg); }
.hd-media.is-cloud .hd-media__clip, .hd-media.is-cloud .hd-media__shadow { -webkit-mask-image: url(../images/hand/mask-cloud.svg); mask-image: url(../images/hand/mask-cloud.svg); }
.hd-media__shadow { background: var(--shadow); transform: translate(3px, 3px); filter: url(#boil); }
.hd-media__clip { overflow: hidden; background: #ddd; }
.hd-media__clip img, .hd-media__clip video { width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(var(--gray)) contrast(calc(1 + .05 * var(--gray))); transition: filter .35s ease, transform .5s ease; }
.hd-media__line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- home cards ---------- */
.hd-cards { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 28px 24px; max-width: 1560px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container (min-width: 880px) { .hd-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hd-card { min-width: 0; }
.hd-card__link { position: relative; height: 100%; display: flex; flex-direction: column; gap: 14px;
  padding: 16px 16px 20px; text-decoration: none; color: var(--ink); border-radius: 18px; }
.hd-card__frame { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-style: solid; border-width: 70px 87px 84px 75px; border-image: url(../images/hand/card-frame.svg) 70 87 84 75 fill stretch;
  filter: url(#boil); }
.hd-card__link > :not(.hd-card__frame) { position: relative; z-index: 1; }
a.hd-card__link { transition: transform .3s cubic-bezier(.2,.9,.2,1.2); }
a.hd-card__link:hover, a.hd-card__link:focus-visible { transform: translateY(-5px) rotate(-.5deg); }
.hd-card__link:hover .hd-media__clip img, .hd-card__link:hover .hd-media__clip video,
.hd-card__link:focus-visible .hd-media__clip img, .hd-card__link:focus-visible .hd-media__clip video { filter: none; transform: scale(1.03); }
.hd-card__text { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.hd-card__meta { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; line-height: 1.4; color: var(--muted); }
.hd-card__title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.hd-card__go { margin-top: auto; padding: 0 4px; }
.hd-open { width: 76px; height: auto; transition: transform .25s ease; }
.hd-card__link:hover .hd-open, .hd-card__link:focus-visible .hd-open { transform: translateX(8px); }
.hd-card__soon { margin-top: auto; padding: 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* ---------- experience ---------- */
.hd-title--exp { margin-bottom: -70px; position: relative; z-index: 2; }
.hd-exp { position: relative; max-width: 1463px; margin: 0 auto; padding: 195px 13% 112px 16%; }
.hd-exp__outer { position: absolute; z-index: 0; left: 8.5%; top: 62px; width: 88.5%; height: calc(100% - 62px); }
.hd-exp__inner { position: absolute; z-index: 0; left: 9.3%; top: 88px; width: 86.1%; height: calc(100% - 126px); }
.hd-exp__spark-a { position: absolute; right: 0; top: 0; width: 88px; height: auto; }
.hd-exp__spark-b { position: absolute; right: 0; top: 124px; width: 58px; height: auto; }
.hd-exp__dino { position: absolute; left: calc(8.5% - 116px); bottom: -6px; width: 140px; height: auto; }
.hd-exp__list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; }
.hd-exp__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 0 40px;
  padding: 0 0 16px; text-transform: uppercase; line-height: 24px; }
.hd-line { width: 100%; height: 3px; margin: 0 0 16px; }

/* ---------- about ---------- */
.hd-about { position: relative; max-width: 1064px; margin: 0 auto; padding: 56px 140px 64px; }
.hd-about__cloud { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hd-about__body { position: relative; z-index: 1; display: flex; gap: 32px; align-items: center; }
.hd-about__text { flex: 1; max-width: 568px; }
.hd-about__text p { margin: 0 0 16px; }
.hd-about__text p:last-child { margin: 0; }
.hd-photo { position: relative; flex: none; width: 180px; height: 190px; }
.hd-photo svg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hd-photo img { position: absolute; left: 4px; top: 25px; width: 171px; height: 159px; object-fit: cover;
  filter: grayscale(var(--gray)); transition: filter .35s ease; }
.hd-photo:hover img { filter: none; }

/* ---------- contact ---------- */
.hd-ribbon { width: min(349px, 100%); height: auto; }
.hd-links { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, max-content);
  justify-content: center; gap: 20px 56px; }
.hd-links a, .hd-cta { display: inline-block; padding: 4px 2px; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px; text-transform: uppercase; }
.hd-links a:hover, .hd-cta:hover { text-underline-offset: 6px; }

/* ---------- project pages ---------- */
.hd-project { max-width: 1400px; margin: 0 auto; }
.hd-back { display: inline-block; margin-bottom: 28px; text-transform: uppercase; text-underline-offset: 4px; }
.hd-project__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr); gap: 48px; align-items: start; margin-bottom: 48px; }
.hd-badge { position: relative; display: inline-flex; align-items: center; min-width: 96px; height: 30px; margin: 0 0 14px;
  padding: 0 20px; font-size: 11px; line-height: 1; text-transform: uppercase; letter-spacing: .06em; }
/* hand-drawn pill from Figma: caps keep their shape, the middle stretches with the text */
.hd-badge__frame { position: absolute; inset: 0; pointer-events: none; border-style: solid;
  border-width: 15px 40px 15px 35px; border-image: url(../images/hand/pill.svg) 28 85 29 73 fill stretch; filter: url(#boil); }
.hd-badge__text { position: relative; }
.hd-project h1 { margin: 0; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.hd-project__desc { margin: 16px 0 0; max-width: 60ch; font-size: 15px; line-height: 1.65; }
.hd-factbox { position: relative; padding: 12px 0 0; }
.hd-factbox > :not(.hd-card__frame) { position: relative; z-index: 1; }
.hd-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.hd-facts dt { text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: var(--muted); padding-top: 2px; }
.hd-facts dd { margin: 0; }
.hd-sub-head { margin: 56px 0 20px; }
.hd-sub-head h2 { margin: 0; line-height: 0; }
.hd-h2art { display: block; max-width: 100%; height: auto; }
.hd-sub-head p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.hd-grid { display: grid; gap: 28px; align-items: start; }
.hd-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hd-grid.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hd-shot { all: unset; box-sizing: border-box; display: block; width: 100%; justify-self: center; cursor: zoom-in; border-radius: 8px; }
.hd-shot:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.hd-shot.is-wide { grid-column: 1 / -1; }
.hd-shot:hover .hd-media__clip img, .hd-shot:focus-visible .hd-media__clip img,
.hd-vfacade:hover .hd-media__clip img, .hd-vfacade:focus-visible .hd-media__clip img { filter: none; transform: scale(1.02); }
.hd-video { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hd-video figcaption { display: flex; justify-content: space-between; gap: 12px; }
.hd-videos .hd-video:first-child { grid-column: 1 / -1; }
.hd-vfacade { all: unset; position: relative; display: block; cursor: pointer; border-radius: 8px; }
.hd-vfacade:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.hd-vplay { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--shadow); z-index: 2; transition: transform .2s ease; }
.hd-vplay::after { content: ""; position: absolute; left: 24px; top: 18px; border-style: solid; border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent var(--ink); }
.hd-vfacade:hover .hd-vplay { transform: scale(1.08) rotate(-4deg); }
.hd-vframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--shadow); }
.hd-ctas { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 32px 0 0; }
.hd-project > .hd-line { margin: 64px 0 20px; }
.hd-pn { display: flex; justify-content: space-between; gap: 24px; }
.hd-pn a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.hd-pn a { gap: 8px; }
.hd-pnart { display: block; height: auto; max-width: 100%; transition: transform .25s ease; }
.hd-pn .is-next .hd-pnart { margin-left: auto; }
.hd-pn a:hover .hd-pnart, .hd-pn a:focus-visible .hd-pnart { transform: translateX(-6px) rotate(-1deg); }
.hd-pn .is-next:hover .hd-pnart, .hd-pn .is-next:focus-visible .hd-pnart { transform: translateX(6px) rotate(1deg); }
.hd-pn .is-next { text-align: right; margin-left: auto; }

/* ---------- lightbox ---------- */
.hd-lightbox { max-width: 92vw; max-height: 92vh; padding: 0; border: 1px solid var(--ink); border-radius: 8px; background: var(--paper);
  box-shadow: 6px 6px 0 var(--shadow); overflow: visible; }
.hd-lightbox::backdrop { background: rgba(255,255,255,.88); }
.hd-lightbox img { display: block; max-width: 90vw; max-height: 86vh; width: auto; height: auto; }
.hd-lightbox__close { position: absolute; top: -44px; right: 0; padding: 6px 12px; background: var(--paper); border: 1px solid var(--ink);
  border-radius: 999px; cursor: pointer; text-transform: uppercase; font-size: 12px; }
.hd-lightbox__close:hover { background: var(--ink); color: var(--paper); }

/* ---------- tuning panel (?tune) ---------- */
.hd-tune { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: grid; gap: 8px; padding: 14px 16px; background: var(--paper);
  border: 1px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 var(--shadow); font-size: 12px; }
.hd-tune label { display: grid; grid-template-columns: 9em 140px 3em; align-items: center; gap: 8px; }

/* ---------- the old "open on a computer" note is no longer shown (the site now has a phone layout) ---------- */
.hd-desktop-only { display: none !important; }

/* handwritten page titles */
.hd-h1art { max-width: 100%; height: auto; margin: 4px 0 2px; }
.hd-grid.is-1 { grid-template-columns: minmax(0, 1fr); }
.hd-grid.is-1 .hd-media, .hd-grid.is-1 .hd-vframe { aspect-ratio: 16 / 9; }

/* respect real image sizes: never upscale, never crop */
.hd-shot .hd-media__clip img { object-fit: contain; }
.hd-videos .hd-video:first-child { width: 100%; justify-self: center; }
.hd-grid.is-1 .hd-video { width: 100%; justify-self: center; }

/* ---------- case study blocks (Serpentime) ---------- */
.hd-fig { margin: 0; width: 100%; justify-self: center; display: flex; flex-direction: column; gap: 10px; }
.hd-fig figcaption, .hd-flows figcaption { color: var(--muted); font-size: 12px; }
.hd-prose { max-width: 70ch; margin: 0 0 28px; font-size: 14px; line-height: 1.7; }
.hd-prose p { margin: 0 0 16px; }
.hd-bullets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 36px; margin: 0 0 40px; max-width: 1100px; }
.hd-bullets dt { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; margin-bottom: 4px; }
.hd-bullets dd { margin: 0; color: #333; }
.hd-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
.hd-split__media { display: flex; gap: 28px; align-items: flex-start; }
.hd-split__media .hd-fig { width: 100%; }
.hd-split__media { width: 360px; flex-wrap: wrap; }
.hd-flows { margin: 8px 0 36px; display: flex; flex-direction: column; gap: 18px; }
.hd-flow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hd-flow__lab { margin: 0; width: 70px; font-weight: 700; text-transform: uppercase; font-size: 12px; }
.hd-flow ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.hd-step { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 22px; font-size: 12px; }
.hd-step + .hd-step::before { content: "\2192"; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); }
.hd-step.is-dead { color: var(--muted); text-decoration: line-through; }
.hd-flow.is-now .hd-step { font-weight: 700; }
.hd-play { all: unset; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 2px;
  text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
.hd-play:hover { text-underline-offset: 6px; }
.hd-play:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.hd-play__ic { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--ink); }

/* motion slide (Serpentime "See the idea") in the hand-drawn look */
body .cm-modal { --surface: var(--paper); --surface-2: var(--card); --line: var(--ink); --fg: var(--ink); --muted: var(--muted); --accent: var(--ink);
  --accent-soft: rgba(127,127,127,.12); --hl: var(--ink); --bg: var(--paper);
  --serif: "Google Sans Code", ui-monospace, Menlo, monospace; --mono: "Google Sans Code", ui-monospace, Menlo, monospace; }
body .cm-modal .cm-sheet { border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--shadow); }
body .cm-modal .cm-nh { font-weight: 700; }

/* dragon: 2-frame loop, like a flip book */
.hd-dragon__f1 { animation: hd-flip-a 1s steps(1, end) infinite; }
.hd-dragon__f2 { animation: hd-flip-b 1s steps(1, end) infinite; }
@keyframes hd-flip-a { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes hd-flip-b { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hd-dragon__f1, .hd-dragon__f2 { animation: none; } .hd-dragon__f1 { opacity: 0; } }

/* project pages: no sidebar, content uses the full width */
.is-sub .hd-shell { grid-template-columns: minmax(0, 1fr); }
.is-sub .hd-main { padding: 40px 56px 96px; }

/* peeking dragon behind the 2nd card (inside its link, so it moves with the card) */
.hd-card.has-peek .hd-card__link { z-index: 1; isolation: isolate; }
.hd-card.has-peek .hd-card__link > .hd-peek { position: absolute; z-index: -1; right: 14%; top: 1px; width: 44px; height: auto;
  pointer-events: none; transform: translateY(0); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.hd-card.has-peek .hd-card__link > .hd-peek.is-up { transform: translateY(-96%); }
.hd-card.has-peek .hd-card__link > .hd-peek.is-down { transition: transform .35s cubic-bezier(.5, 0, .75, .3); }
.hd-peek__blink { opacity: 0; }
.hd-peek.is-blink .hd-peek__open { opacity: 0; }
.hd-peek.is-blink .hd-peek__blink { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hd-card.has-peek .hd-card__link > .hd-peek { transition: none !important; } }

/* pencil drop in the sidebar */
.hd-bubble { z-index: 3; }
.hd-nav { position: relative; z-index: 1; }
.hd-pencil { position: absolute; left: 0; top: 0; z-index: 2; width: 92px; height: auto; pointer-events: none; visibility: hidden; }
.hd-pencil.is-on { visibility: visible; }
.hd-pencil__f2, .hd-pencil__f3 { opacity: 0; }
.hd-pencil.is-f2 .hd-pencil__f1, .hd-pencil.is-f3 .hd-pencil__f1 { opacity: 0; }
.hd-pencil.is-f2 .hd-pencil__f2 { opacity: 1; }
.hd-pencil.is-f3 .hd-pencil__f3 { opacity: 1; }

/* every drawn line is 1px on screen, whatever the size of the drawing */
.hd-shell svg *, .hd-desktop-only svg *, .hd-loader svg * { vector-effect: non-scaling-stroke; stroke-width: 1px; }
.hd-text-dec, .hd-back, .hd-links a, .hd-cta, .hd-play { text-decoration-thickness: 1px; }
.hd-video { width: 100%; justify-self: center; }
/* galleries: pack images (each capped for sharpness) and center them as a group */
.hd-grid.is-2, .hd-grid.is-3, .hd-grid.is-4 { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.hd-grid.is-2 > * { flex: 0 1 calc((100% - 28px) / 2); }
.hd-grid.is-3 > * { flex: 0 1 calc((100% - 56px) / 3); }
.hd-grid.is-4 > * { flex: 0 1 calc((100% - 84px) / 4); }
.hd-grid > .is-wide, .hd-videos > .hd-video:first-child { flex-basis: 100%; }

/* contact: hand-drawn icons, second drawing on hover */
.hd-icons { list-style: none; margin: 0 auto 24px; padding: 0; display: flex; justify-content: center; gap: 28px; }
.hd-ic { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; border-radius: 8px; padding: 2px 4px 6px; }
.hd-ic svg { width: 72px; height: 72px; transition: transform .2s ease; }
.hd-ic__b { opacity: 0; }
.hd-ic:hover .hd-ic__a, .hd-ic:focus-visible .hd-ic__a { opacity: 0; }
.hd-ic:hover .hd-ic__b, .hd-ic:focus-visible .hd-ic__b { opacity: 1; }
.hd-ic:hover svg, .hd-ic:focus-visible svg { transform: rotate(-4deg); }
.hd-ic__label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.hd-links { grid-template-columns: repeat(3, max-content); }
@media (max-width: 1023px) { .hd-icons { gap: 6px; flex-wrap: wrap; } }
.hd-side .hd-bubble { margin-top: -20px; }   /* tail points at the logo face, like the Figma (2px gap) */

/* about: bathroom-scale photo, needle jumps and photo gets colour on hover */
.hd-photo.hd-scale { width: 230px; height: auto; }
.hd-scale svg { position: static; display: block; width: 100%; height: auto; }
.hd-scale__f2 { opacity: 0; }
.hd-scale__color { opacity: calc(1 - var(--gray)); transition: opacity .35s ease; }
.hd-scale:hover .hd-scale__f1 { opacity: 0; }
.hd-scale:hover .hd-scale__f2 { opacity: 1; }
.hd-scale:hover .hd-scale__color { opacity: 1; }

/* sidebar hover: a hand-drawn cloud pops up around the word (Figma 27:5821) */
.hd-nav__cloud { position: absolute; left: 50%; top: 50%; z-index: -1; height: auto; pointer-events: none;
  opacity: 0; transform: translate(-50%, -54%) scale(.8); transition: opacity .18s ease, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.hd-nav__link { isolation: isolate; }
.hd-nav__link:hover .hd-nav__cloud, .hd-nav__link:focus-visible .hd-nav__cloud, .hd-nav__link[aria-current="true"] .hd-nav__cloud { opacity: 1; transform: translate(-50%, -54%) scale(1); }
.hd-nav__link:hover .hd-nav__under { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hd-nav__cloud { transition: opacity .18s ease; } }

/* logo hover: letters fill with a lilac to orange gradient (top to bottom) */
.hd-logo:hover .hd-logo__art path[fill="white"], .hd-logo:focus-visible .hd-logo__art path[fill="white"] { fill: url(#logo-grad); }
/* logo hover: small springy lift, scale and tilt, same easing as the cards */
.hd-logo__art { display: block; transform-origin: 14% 60%; transition: transform .3s cubic-bezier(.2,.9,.2,1.2); }
.hd-logo:hover .hd-logo__art, .hd-logo:focus-visible .hd-logo__art { transform: translateY(-2px) scale(1.04) rotate(-1.5deg); }
@media (prefers-reduced-motion: reduce) { .hd-logo__art { transition: none; } .hd-logo:hover .hd-logo__art, .hd-logo:focus-visible .hd-logo__art { transform: none; } }
/* nav clouds get a white fill so the word sits on a solid cloud */
.hd-nav__cloud .hd-nav__fill { fill: var(--hi); stroke: none; }


/* ---------- theme: every drawn colour follows 4 tokens (ink, paper, card, hi) ---------- */
svg [stroke="black"], svg [stroke="#111"] { stroke: var(--ink); }
svg [fill="black"] { fill: var(--shadow); }
svg [fill="black"][stroke="black"] { stroke: var(--shadow); }   /* black fills are drop shadows; their own outline stays shadow-coloured */
svg [fill="white"], svg [fill="#fff"] { fill: var(--hi); }
svg [fill="#F9F9FA"], svg [fill="#f9f9fa"] { fill: var(--card); }
.hd-card__frame { border-image-source: var(--frame-img, url(../images/hand/card-frame.svg)); }
.hd-badge__frame { border-image-source: var(--pill-img, url(../images/hand/pill.svg)); }
/* light-grey preset, kept for ?grey links */
.is-grey { --paper: #ececea; --card: #f5f5f3; }

/* theme test panel (?theme): pick colours live, saved in this browser only */
.hd-theme { position: fixed; right: 16px; top: 82px; z-index: 30; width: 250px; padding: 14px 16px 16px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--shadow); font-size: 12px; }
.hd-theme h2 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.hd-theme__presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hd-theme button { font: inherit; font-size: 12px; color: var(--ink); background: var(--card); border: 1px solid var(--ink); border-radius: 6px; padding: 5px 8px; cursor: pointer; }
.hd-theme button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hd-theme label { display: grid; grid-template-columns: 1fr 44px 66px; align-items: center; gap: 8px; margin: 6px 0; }
.hd-theme input[type="color"] { width: 44px; height: 26px; padding: 0; border: 1px solid var(--ink); border-radius: 4px; background: none; cursor: pointer; }
.hd-theme output { font-family: inherit; color: var(--muted); }
.hd-theme__foot { display: flex; justify-content: space-between; margin-top: 12px; }
.hd-theme__x { position: absolute; top: 8px; right: 8px; padding: 2px 7px !important; }

/* side menu fills the space left under the bubble, items spread evenly */
.hd-side > nav { flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; min-height: max-content; }
.hd-side .hd-nav { flex: 1 1 auto; justify-content: space-evenly; gap: 14px; margin-top: 0; padding-bottom: 8px; }

/* dragon pupils and tongue follow the line colour (see inkfills in the build) */
svg path.hd-ink-fill[fill] { fill: var(--ink); }
svg path.hd-ink-fill[stroke] { stroke: var(--ink); }   /* only paths drawn with an outline get one */

/* gear in the top-right corner opens the theme settings (Figma 27:6527: frame 2 on hover) */
.hd-gear { position: fixed; top: 18px; right: 12px; z-index: 31; width: 56px; height: 56px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.hd-gear svg { width: 100%; height: 100%; display: block; transition: transform .4s cubic-bezier(.2,.9,.2,1.2); }
.hd-gear__f2 { opacity: 0; }
.hd-gear:hover .hd-gear__f1, .hd-gear:focus-visible .hd-gear__f1, .hd-gear.is-open .hd-gear__f1 { opacity: 0; }
.hd-gear:hover .hd-gear__f2, .hd-gear:focus-visible .hd-gear__f2, .hd-gear.is-open .hd-gear__f2 { opacity: 1; }
.hd-gear:hover svg, .hd-gear.is-open svg { transform: rotate(30deg); }
.hd-gear:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hd-theme[hidden] { display: none; }
.hd-theme__tag { margin-left: 4px; padding: 1px 6px; border: 1px solid var(--ink); border-radius: 999px; font-size: 10px; font-weight: 400; text-transform: lowercase; }
@media (prefers-reduced-motion: reduce) { .hd-gear svg { transition: none; } .hd-gear:hover svg, .hd-gear.is-open svg { transform: none; } }

/* settings dropdown uses the hand-drawn card frame, like the work cards */
.hd-theme { background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; width: 270px; padding: 22px 24px 24px !important; }
.hd-theme > :not(.hd-card__frame) { position: relative; z-index: 1; }
.hd-theme .hd-theme__x { position: absolute; top: 16px; right: 18px; }

/* home cards: no drop shadow behind the image (other images keep theirs) */
.hd-card .hd-media__shadow { display: none; }

/* speech bubble typewriter (hand.js) */
.hd-type__c { visibility: hidden; }
.hd-type__c.is-on { visibility: visible; }
.hd-type__caret { display: inline-block; position: relative; width: 0; height: 1em; vertical-align: -0.12em; }
.hd-type__caret::after { content: ''; position: absolute; left: 1px; top: 0; width: .5em; height: 100%; background: var(--ink); animation: hd-caret .8s steps(1, end) infinite; }
@keyframes hd-caret { 50% { opacity: 0; } }

/* top row: logo, first title and settings gear share one centre line (y = 63px) */
.is-home .hd-main { padding-top: 28px; }

/* photo tint: a colour laid over every photo with "screen" blending (Blueprint uses blue). It fades out on hover with the grey. */
:root { --tint: transparent; --gray: 0; }   /* --gray: 1 = photos grey until hover, 0 = always in colour */
.hd-media__clip::after { content: ''; position: absolute; inset: 0; background: var(--tint); mix-blend-mode: screen; pointer-events: none; transition: opacity .35s ease; }
.hd-card__link:hover .hd-media__clip::after, .hd-card__link:focus-visible .hd-media__clip::after,
.hd-shot:hover .hd-media__clip::after, .hd-shot:focus-visible .hd-media__clip::after,
.hd-vfacade:hover .hd-media__clip::after, .hd-vfacade:focus-visible .hd-media__clip::after { opacity: 0; }
.hd-scale__tint { fill: var(--tint); mix-blend-mode: screen; pointer-events: none; transition: opacity .35s ease; }
.hd-scale:hover .hd-scale__tint { opacity: 0; }

/* home cards: small hand-placed offsets and tilts so the grid feels loose, like the drawings */
.hd-cards > .hd-card { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rot, 0deg)); }
.hd-cards > .hd-card:nth-child(1) { --dx: 0px;  --dy: 4px;  --rot: -1.3deg; }
.hd-cards > .hd-card:nth-child(2) { --dx: 3px;  --dy: -3px; --rot: 0.5deg; }
.hd-cards > .hd-card:nth-child(3) { --dx: -2px; --dy: 6px;  --rot: 1.4deg; }
.hd-cards > .hd-card:nth-child(4) { --dx: 2px;  --dy: 0px;  --rot: -1.9deg; }
.hd-cards > .hd-card:nth-child(5) { --dx: -3px; --dy: -2px; --rot: 0.6deg; }
.hd-cards > .hd-card:nth-child(6) { --dx: 0px;  --dy: 5px;  --rot: -1.7deg; }
.hd-cards > .hd-card:nth-child(7) { --dx: 4px;  --dy: -4px; --rot: 2deg; }
.hd-cards > .hd-card:nth-child(8) { --dx: -2px; --dy: 3px;  --rot: -0.5deg; }
@media (prefers-reduced-motion: reduce) { .hd-cards > .hd-card { transform: none; } }

/* home cards cut out by hand: each one has its own width and height (on top of the small tilts above) */
.hd-cards { align-items: stretch; }
.hd-cards > .hd-card { width: var(--w, 100%); justify-self: var(--js, stretch); }
/* heights differ through the outer margins; inside, OPEN always sits at the bottom of the card */
.hd-cards > .hd-card { margin: var(--pt, 0px) 0 var(--pb, 0px); }
.hd-cards .hd-card__link { height: 100%; }
.hd-cards .hd-open { margin-top: auto; }
.hd-cards > .hd-card:nth-child(1) { --w: 100%; --js: start;  --pb: 6px; }
.hd-cards > .hd-card:nth-child(2) { --w: 91%;  --js: end;    --pb: 30px; --pt: 6px; }
.hd-cards > .hd-card:nth-child(3) { --w: 96%;  --js: center; --pb: 0px; }
.hd-cards > .hd-card:nth-child(4) { --w: 87%;  --js: start;  --pb: 18px; --pt: 10px; }
.hd-cards > .hd-card:nth-child(5) { --w: 93%;  --js: end;    --pb: 12px; }
.hd-cards > .hd-card:nth-child(6) { --w: 100%; --js: start;  --pb: 34px; --pt: 4px; }
.hd-cards > .hd-card:nth-child(7) { --w: 89%;  --js: center; --pb: 2px; --pt: 12px; }
.hd-cards > .hd-card:nth-child(8) { --w: 97%;  --js: end;    --pb: 22px; }

/* overlapping cards: no gaps, cards slightly wider than their column so they lie on top of each other
   like cut-outs on a table; the hovered (or focused) card comes to the front */
.hd-cards { column-gap: 0; row-gap: 0; }
.hd-cards > .hd-card { position: relative; z-index: 1; width: calc(var(--w, 100%) + 12%); margin: calc(var(--pt, 0px) + var(--row, 0px)) -6% var(--pb, 0px); transition: z-index 0s; }
.hd-cards > .hd-card:nth-child(n+5) { --row: -10px; }
.hd-cards > .hd-card:hover, .hd-cards > .hd-card:focus-within { z-index: 10; }

/* hover: the card lights up (paper gets brighter, photo a touch brighter) */
.hd-card__frame { transition: filter .25s ease; }
.hd-card__link:hover .hd-card__frame, .hd-card__link:focus-visible .hd-card__frame { filter: url(#boil) brightness(var(--lit, 1.06)); }
.hd-card__link:hover .hd-media__clip img, .hd-card__link:focus-visible .hd-media__clip img { filter: grayscale(0) brightness(1.06); }

/* ~30% mess: wider page margins, narrower cards, bigger offsets and tilts, and a stacking order that
   does not follow reading order, so the cards look dropped on a table instead of placed on a grid */
.is-home .hd-main { padding-left: 72px; padding-right: 72px; }
.hd-cards > .hd-card { width: calc(var(--w, 100%) + 2%); margin-left: -1%; margin-right: -1%; z-index: var(--z, 1); }
.hd-cards > .hd-card:nth-child(1) { --dx: -6px;  --dy: 10px;  --rot: -2.4deg; --z: 2; }
.hd-cards > .hd-card:nth-child(2) { --dx: 14px;  --dy: -8px;  --rot: 1.2deg;  --z: 4; }
.hd-cards > .hd-card:nth-child(3) { --dx: -4px;  --dy: 6px;   --rot: 2.8deg;  --z: 3; }
.hd-cards > .hd-card:nth-child(4) { --dx: -22px; --dy: 2px;   --rot: -1.6deg; --z: 3; }
.hd-cards > .hd-card:nth-child(5) { --dx: 18px;  --dy: 2px;   --rot: 1.8deg;  --z: 5; }
.hd-cards > .hd-card:nth-child(6) { --dx: -4px;  --dy: 4px;   --rot: -3deg;   --z: 2; }
.hd-cards > .hd-card:nth-child(7) { --dx: -16px; --dy: 8px;   --rot: 0.6deg;  --z: 6; }
.hd-cards > .hd-card:nth-child(8) { --dx: 8px;   --dy: 12px;  --rot: -1deg;   --z: 1; }
.hd-cards > .hd-card:hover, .hd-cards > .hd-card:focus-within { z-index: 10; }


/* =========================================================================================
   PHONE LAYOUT (up to 900px wide)
   - the four menu words become a fixed bar at the top, the settings gear sits at its right end
   - logo and speech bubble scroll with the page, cards stack one per row (still loose and tilted)
   ========================================================================================= */
@media (max-width: 900px) {
  html { scroll-padding-top: 64px; }
  .hd-shell { display: block; min-height: 0; }
  .hd-side { position: static; height: auto; overflow: visible; padding: 72px 16px 8px; gap: 14px; align-items: flex-start; }
  .hd-logo { width: 100%; }
  .hd-logo__art { width: 100%; max-width: 520px; }
  .hd-bubble { width: min(325px, 100%); }
  .is-home .hd-bubble__art, .hd-bubble__art { height: 262px; }
  .hd-bubble p { font-size: 14px; left: 18%; right: 6%; top: 34px; }
  .hd-side .hd-bubble { margin-top: -14px; }

  /* fixed top bar with the menu */
  .hd-side > nav { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 56px; width: auto; min-height: 0; flex: none;
    display: block; background: var(--paper); border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
  .hd-side .hd-nav { flex-direction: row; justify-content: flex-start; align-items: center; gap: 4px; height: 56px; margin: 0;
    padding: 0 58px 0 6px; overflow-x: auto; scrollbar-width: none; }
  .hd-side .hd-nav::-webkit-scrollbar { display: none; }
  .hd-nav__link { padding: 4px 7px; gap: 3px; flex: none; }
  .hd-nav__word { height: 21px; }
  .hd-nav__cloud { display: none; }   /* phone: active item uses the drawn line, not the cloud */
  .hd-nav__under { display: block; height: 3px; opacity: 0; }
  .hd-nav__link[aria-current="true"] .hd-nav__under { opacity: 1; transform: scaleX(1); }
  .hd-pencil { display: none; }
  .hd-gear { top: 6px; right: 4px; width: 44px; height: 44px; }
  .hd-side > nav::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 56px; background: var(--paper); }
  .hd-theme { top: 62px; right: 8px; max-height: calc(100vh - 76px); overflow-y: auto; }

  .hd-main, .is-home .hd-main { padding: 24px 16px 72px; container-type: normal; }
  .hd-section + .hd-section { margin-top: 72px; }
  .hd-title__art { max-width: 92%; height: auto; }

  /* cards: one per row, narrower and centred, a little overlap between them */
  .hd-cards { grid-template-columns: minmax(0, 1fr) !important; max-width: 420px; margin: 0 auto; }
  .hd-cards > .hd-card { width: var(--w, 100%); margin: 0 auto; justify-self: var(--js, center); }
  .hd-cards > .hd-card + .hd-card { margin-top: -6px; }
  .hd-cards > .hd-card:nth-child(n) { --dy: 0px; --dx: 0px; --pt: 0px; --pb: 0px; }
  .hd-cards > .hd-card:nth-child(n+5) { --row: 0px; }

  /* experience: rows stack, the fire frame stretches around them */
  .hd-title--exp { margin-bottom: 8px; }
  .hd-exp { padding: 8px 0 72px !important; }
  .hd-exp__outer, .hd-exp__inner, .hd-exp__spark-a, .hd-exp__spark-b { display: none; }   /* no fire frame on phones */
  .hd-exp__dino { left: auto; right: 4px; bottom: 0; width: 96px; }
  .hd-exp__row { grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 13px; line-height: 20px; }
  .hd-exp__row span:first-child { font-weight: 700; }

  /* about: photo above the text */
  .hd-about { padding: 8px 0 24px; }
  .hd-about__cloud { display: none; }   /* no cloud on phones */
  .hd-about__body { flex-direction: column; align-items: center; gap: 20px; }
  .hd-photo.hd-scale { width: 200px; }

  /* contact */
  .hd-links, .hd-icons { display: grid; grid-template-columns: repeat(2, max-content); gap: 20px 48px; justify-content: center; }
  .hd-split > * { min-width: 0; max-width: 100%; }
  .hd-split__media, .hd-split__media * { max-width: 100%; }

  /* project pages */
  .hd-project__head { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 32px; }
  .hd-grid.is-2, .hd-grid.is-3, .hd-grid.is-4 { grid-template-columns: minmax(0, 1fr); }
  .hd-grid { display: grid; }
  .hd-bullets { grid-template-columns: minmax(0, 1fr); }
  .hd-split { grid-template-columns: minmax(0, 1fr); }
  .hd-pn { flex-direction: column; gap: 24px; }
  .hd-pn svg { max-width: 100%; height: auto; }
  .hd-h1art { width: 100%; }
  .hd-h2art { max-width: 100%; }
  .is-sub .hd-main { padding-top: 72px; }
}

/* 40 Years in the Desert: loose game assets in a simple grid (transparent PNGs, no photo frame) */
.hd-assets { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.hd-assets li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 10px; background: var(--card); border-radius: 14px; }
.hd-assets img { width: 100%; max-width: 140px; aspect-ratio: 1; object-fit: contain; }
.hd-assets span { font-size: 11px; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 900px) { .hd-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 40 Years UI: icons keep their own shape, shown at 2x game size on a shared baseline; wide plates and faces take two columns */
.hd-assets.is-ui { grid-auto-flow: dense; }
.hd-assets.is-ui li { justify-content: flex-end; min-height: 150px; }
.hd-assets.is-ui img { aspect-ratio: auto; height: auto; max-width: 100%; margin: auto 0; }
.hd-assets.is-ui li.is-wide { grid-column: span 2; }
.hd-assets.is-ui li.is-blender { min-height: 200px; }
.hd-assets.is-ui.is-row5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hd-assets.is-ui.is-row5 li.is-wide { grid-column: auto; min-height: 0; }
@media (max-width: 900px) {
  .hd-assets.is-ui { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .hd-assets.is-ui li { min-height: 0; padding: 12px 6px 8px; }
  .hd-assets.is-ui li:not(.is-wide) img { width: 100% !important; height: 64px; object-fit: contain; }
  .hd-assets.is-ui li.is-blender img { height: 88px; }
  .hd-assets.is-ui span { font-size: 10px; }
  .hd-assets.is-ui li.is-wide { grid-column: 1 / -1; }
  .hd-assets.is-ui.is-row5 { grid-template-columns: 1fr; } }

/* loading screen (Figma 44:8247): a hand-drawn wave writes itself above LOADING, then climbs and fades as the next one starts */
.hd-loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--paper);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.is-loading .hd-loader { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.hd-loader svg { width: 240px; height: auto; overflow: visible; }
.hd-loader svg [stroke="black"], .hd-loader svg path { stroke: var(--ink); }
.hd-loader__wave { transition: transform .45s ease, opacity .45s ease; }
.hd-loader__dot { opacity: 0; }
.hd-loader[data-dots="1"] .d1, .hd-loader[data-dots="2"] .d1, .hd-loader[data-dots="2"] .d2,
.hd-loader[data-dots="3"] .d1, .hd-loader[data-dots="3"] .d2, .hd-loader[data-dots="3"] .d3 { opacity: 1; }
/* the drawing-on effect needs real path lengths, so the waves skip the non-scaling 1px rule and use a stroke that equals 1px at this size */
.hd-loader svg .hd-loader__wave path { vector-effect: none; stroke-width: calc(172px / 240 * 1); stroke-width: 0.717px; }

/* page intro: hide the moving parts until hand.js starts their animations (head script adds .hd-intro; safety timeout removes it) */
.hd-intro .hd-side .hd-logo, .hd-intro .hd-side .hd-device, .hd-intro .hd-side .hd-nav > li, .hd-intro .hd-side .hd-bubble,
.hd-intro .hd-cards > .hd-card, .hd-intro .hd-title, .hd-intro .hd-project__head, .hd-intro .hd-sub-head, .hd-pre { opacity: 0; }

/* Serpentime: app screen and motion loop side by side */
.hd-motion { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: center; }
.hd-motion .hd-fig { flex: 0 1 auto; }

/* Serpentime onboarding recording: one phone, centred */
.hd-onb, .hd-gplay { display: flex; justify-content: center; }
.hd-gplay .hd-fig { width: 100%; }
.hd-gplay video { width: 100%; height: 100%; object-fit: cover; display: block; filter: none !important; }
.hd-onb video { width: 100%; height: 100%; object-fit: cover; display: block; filter: none !important; }


/* ---------- 3D pocket pet in the sidebar (replaces the logo and the speech bubble) ---------- */
/* the canvas is wider and taller than the box so the pet can swing without being cut; the sidebar does not clip it either */
.hd-device { --hd-unit-h: 460px; --hd-ring-top: 28px; --hd-links: 7; position: relative; width: 325px; height: 310px; margin-top: -28px; flex: none; }
.hd-device__btn { all: unset; position: absolute; inset: 0; cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.hd-device__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 28px; }
.hd-device__fallback, .hd-device canvas { position: absolute; left: -70px; top: 0; width: calc(100% + 140px); height: calc(100% + 40px); display: block; pointer-events: none; }
.hd-device__fallback { object-fit: contain; object-position: 50% 0; transition: opacity .35s ease; }
.hd-device canvas { opacity: 0; transition: opacity .35s ease; }
.hd-device.is-3d canvas { opacity: 1; }
.hd-device.is-3d .hd-device__fallback { opacity: 0; }
@media (min-width: 901px) and (max-height: 820px) { .hd-device { --hd-unit-h: 400px; height: 276px; } }
@media (min-width: 901px) and (max-height: 700px) { .hd-device { --hd-unit-h: 340px; height: 240px; } }
@media (min-width: 901px) and (max-height: 600px) { .hd-side { overflow-y: auto; } }
@media (max-width: 900px) { .hd-device { --hd-unit-h: 420px; --hd-ring-top: 56px; --hd-links: 8; width: min(325px, 100%); height: 312px; margin-top: 0; }
  .hd-device__fallback, .hd-device canvas { left: 0; width: 100%; height: 100%; } }
