/* Print Legion — built from the Figma "final" page. Values in px mirror the design. */

@font-face {
    font-family: "Terminal Grotesque";
    src:
        url("/fonts/terminal-grotesque.woff2") format("woff2"),
        url("/fonts/terminal-grotesque.ttf") format("truetype");
    font-display: swap;
}

:root {
    --dark-100: #693d26;
    --dark-200: #522d1a;
    --light-100: #fff8ef;
    --light-200: #ffeed9;
    --light-300: #f0cfa6;
    --light-400: #dbbc96;
    --orange-100: #ffa600;
    --green-100: #00ea68;
    --cyan-100: #17d4e0;
    --cyan-200: #12c0cc;
    --cyan-300: #0bb3bd;
    --red-100: #ff3c37;
    --yellow-100: #fed230;
    --yellow-200: #e9c02b;

    --display: "Terminal Grotesque", ui-rounded, system-ui, sans-serif;
    --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1143px;
    --gutter: 68px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
/* The design reads best at 120%. Scale up only where the 1143px layout still
   fits with margins (1143 × 1.2 + gutters ≈ 1540px); smaller screens stay 1:1. */
html {
    --zoom: 1;
    zoom: var(--zoom);
}
@media (min-width: 1540px) {
    html {
        --zoom: 1.2;
    }
}
@media (min-width: 1380px) and (max-width: 1539.98px) {
    html {
        --zoom: 1.1;
    }
}
body {
    margin: 0;
    background: var(--light-100);
    color: var(--dark-200);
    font-family: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
img {
    display: block;
    max-width: 100%;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
    margin: 0;
}
[hidden] {
    display: none !important;
}

.c-orange {
    color: var(--orange-100);
}
.c-green {
    color: var(--green-100);
}
.c-cyan {
    color: var(--cyan-100);
}
.c-cyan-dark {
    color: var(--cyan-300);
}
.c-red {
    color: var(--red-100);
}
.c-pink {
    color: #ff6f9c;
}
.u {
    text-decoration: underline;
    text-underline-position: from-font;
}
.i {
    font-style: italic;
}
b {
    font-weight: 600;
}

/* ---------- scrollbars ----------
   Orange thumb with a brown outline on a cream track, like the buttons.
   Chrome/Edge/Safari use the ::-webkit-scrollbar rules; Firefox only
   supports colour + "thin"/"auto", so it gets the colours. */
:root {
    --sb-size: 16px;
    --sb-border: 4px;
}
::-webkit-scrollbar {
    width: var(--sb-size);
    height: var(--sb-size);
}
::-webkit-scrollbar-track {
    background: var(--light-200);
}
::-webkit-scrollbar-thumb {
    background: var(--orange-100);
    border: var(--sb-border) solid var(--light-200);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1.5px var(--dark-200);
}
::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--orange-100), #000 8%);
}
::-webkit-scrollbar-thumb:active {
    background: var(--cyan-100);
}
::-webkit-scrollbar-corner {
    background: var(--light-200);
}
@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-color: var(--orange-100) var(--light-200);
    }
}
/* the country list scrolls inside a small box: a slimmer bar there */
.dropdown-menu {
    --sb-size: 10px;
    --sb-border: 2px;
}
.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}
.dropdown-menu::-webkit-scrollbar-thumb {
    border-color: var(--light-200);
}
@media (max-width: 640px) {
    /* phones: no visible scrollbar at all (scrolling still works) */
    * {
        scrollbar-width: none;
    }
    ::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

/* ---------- page frame ---------- */

.page {
    width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
    margin: 0 auto;
    /* zoom scales vh too, so divide it back out to keep the footer on screen */
    min-height: calc(100vh / var(--zoom));
    min-height: calc(100dvh / var(--zoom));
    display: flex;
    flex-direction: column;
    padding-top: 96px; /* clears the Hack Club banner */
}
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
/* the home sections share any spare height instead of leaving a gap above the footer */
body[data-live="home"] .main {
    justify-content: space-evenly;
}
.footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 60px 0 41px;
    font-size: 12px;
    font-weight: 500;
}
.footer b,
.footer a {
    font-weight: 600;
}
.footer-center {
    justify-self: center;
}
.footer-right {
    justify-self: end;
}
.footer a:hover {
    text-decoration: underline;
}

/* ---------- nav ---------- */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--display);
    font-size: 48px;
    line-height: 1;
}
.logo-cat {
    width: 37px;
    height: 37px;
    transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.logo:hover .logo-cat {
    transform: translateY(-5px);
}
.logo-cat.is-swapping {
    animation: logo-swap 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes logo-swap {
    0% {
        scale: 0.4;
        rotate: -25deg;
    }
    100% {
        scale: 1;
        rotate: 0deg;
    }
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 19px;
}

.sticker {
    position: relative;
    display: block;
    flex: none;
}
.sticker .s {
    position: absolute;
    transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.sticker-label {
    position: absolute;
    z-index: 2;
    font-weight: 700;
    font-style: italic;
    font-size: 20px;
    white-space: nowrap;
}
.sticker:hover .s1 {
    transform: var(--r1) translate(-3px, -3px);
}
.sticker:hover .s2 {
    transform: var(--r2) translate(3px, -2px);
}
.sticker:hover .s3 {
    transform: var(--r3, rotate(0deg)) translateY(-4px);
}
.sticker:focus-visible {
    outline: 2px dashed var(--dark-200);
    outline-offset: 4px;
    border-radius: 8px;
}

.sticker-printers {
    width: 110px;
    height: 68px;
}
.sticker-printers .s1 {
    --r1: rotate(-15deg);
    width: 54.7px;
    height: 54.7px;
    left: 6.15px;
    top: 7.15px;
    transform: var(--r1);
}
.sticker-printers .s2 {
    --r2: rotate(15deg);
    width: 54.7px;
    height: 54.7px;
    left: 49.15px;
    top: 6.15px;
    transform: var(--r2);
}
.sticker-printers .s3 {
    width: 60.13px;
    height: 60.13px;
    left: 24.91px;
    top: 4.44px;
}
.sticker-printers .sticker-label {
    left: 16px;
    top: 23px;
}

.sticker-me {
    width: 74px;
    height: 68px;
}
.sticker-me .s1 {
    width: 60px;
    height: 60px;
    left: 7px;
    top: 4px;
}
.sticker-me .sticker-label {
    left: 50%;
    translate: -50% 0;
    top: 23px;
}
.sticker.sticker-me:hover .s1 {
    transform: translateY(-5px);
}

.sticker-docs {
    width: 84px;
    height: 65px;
}
.sticker-docs .s1 {
    --r1: rotate(-12.92deg);
    width: 52px;
    height: 52px;
    left: 5.15px;
    top: 8.15px;
    transform: var(--r1);
}
.sticker-docs .s2 {
    --r2: rotate(0deg);
    width: 64px;
    height: 64px;
    left: 20px;
    top: 0;
}
.sticker-docs .sticker-label {
    left: 20px;
    top: 23px;
}

.sticker-prints {
    width: 128.2px;
    height: 74.2px;
}
.sticker-prints .s1 {
    --r1: rotate(-21.98deg);
    width: 48px;
    height: 48px;
    left: 7.24px;
    top: 14.24px;
    transform: var(--r1);
}
.sticker-prints .s2 {
    --r2: rotate(10.02deg);
    width: 64px;
    height: 64px;
    left: 59.08px;
    top: 5.08px;
    transform: var(--r2);
}
.sticker-prints .s3 {
    width: 54px;
    height: 54px;
    left: 34px;
    top: 13px;
}
.sticker-prints .sticker-label {
    left: 36px;
    top: 28px;
}

/* ---------- home ---------- */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-top: 85px;
}
.hero-copy {
    width: 452px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}
.hero-text {
    display: flex;
    flex-direction: column;
    gap: 13px;
    font-weight: 600;
}
.hero-lede {
    font-size: 24px;
    text-align: justify;
}
.hero-note {
    font-size: 12px;
}
.hero-ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 40px;
    padding: 0 21px;
}
.hero-ctas .cta {
    width: 100%;
}
.cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px 5px 23px;
    border-radius: 8px;
    font-family: var(--display);
    font-size: 20px;
    line-height: 20px;
    white-space: nowrap;
    background: var(--cta-bg);
    transition: background-color 0.15s ease;
}
.cta:hover {
    background: color-mix(in srgb, var(--cta-bg), #000 5%);
}
.cta-cyan {
    --cta-bg: var(--cyan-100);
}
.cta-orange {
    --cta-bg: var(--orange-100);
    padding-left: 22px;
}
.cta-icon {
    position: absolute;
    width: 41px;
    height: 41px;
    transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.cta:hover .cta-icon {
    transform: scale(1.12);
}
.cta-icon-cube {
    left: -23px;
    top: -6px;
}
.cta-icon-cat {
    left: -21px;
    top: -9px;
}

/* Only a scroller on phones; on bigger screens it doesn't affect layout. */
.steps-scroll {
    display: contents;
}
.steps {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 207px);
    border: 1px solid var(--dark-200);
    border-radius: 8px;
    overflow: hidden;
    flex: none;
}
.step {
    display: flex;
    flex-direction: column;
}
.step-head {
    height: 35px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.step-1 .step-head {
    background: var(--cyan-200);
}
.step-2 .step-head {
    background: var(--dark-100);
    color: var(--light-100);
}
.step-3 .step-head {
    background: var(--yellow-200);
}
.step-1 .step-head::before {
    content: "1. ";
    white-space: pre;
}
.step-2 .step-head::before {
    content: "2. ";
    white-space: pre;
}
.step-3 .step-head::before {
    content: "3. ";
    white-space: pre;
}
.step-img {
    width: 100%;
    aspect-ratio: 1344 / 1024;
    object-fit: cover;
}

.showcase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-top: 81px;
}
.reel {
    width: 856px;
    height: 151px;
    flex: 0 1 856px;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* fade the prints in and out at both ends instead of a hard cut */
    --fade: 72px;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        #000 var(--fade),
        #000 calc(100% - var(--fade)),
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        #000 var(--fade),
        #000 calc(100% - var(--fade)),
        transparent
    );
}
/* The track holds the prints twice; app.js slides it and wraps it around. */
.reel-track {
    display: flex;
    align-items: center;
    width: max-content;
}
.reel-2 {
    display: none;
}
.reel-track {
    will-change: transform;
}
.reel-card {
    --rot: 0deg;
    --ring: var(--orange-100);
    flex: none;
    width: 116.19px;
    height: 130.99px;
    border: 1px solid var(--ring);
    border-radius: 15px;
    background: var(--light-200) center / cover no-repeat;
    transform: rotate(var(--rot));
    margin: 0 12px;
}
.reel-card.is-wide {
    width: 232.38px;
}
.reel-card:nth-child(7n + 1) {
    --rot: 6.54deg;
    --ring: var(--orange-100);
}
.reel-card:nth-child(7n + 2) {
    --rot: -2.11deg;
    --ring: var(--green-100);
}
.reel-card:nth-child(7n + 3) {
    --rot: 3.11deg;
    --ring: var(--cyan-100);
}
.reel-card:nth-child(7n + 4) {
    --rot: -1.29deg;
    --ring: var(--red-100);
}
.reel-card:nth-child(7n + 5) {
    --rot: 3.22deg;
    --ring: var(--yellow-100);
}
.reel-card:nth-child(7n + 6) {
    --rot: -2.7deg;
    --ring: var(--orange-100);
}
.reel-card:nth-child(7n + 7) {
    --rot: 1.98deg;
    --ring: var(--green-100);
    border-width: 2px;
}
.reel-card.is-skeleton {
    animation: pulse 1.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 80ms);
}

.tally {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 184px;
    flex: none;
}
.tally-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--display);
    font-size: 26px;
    line-height: 27px;
    white-space: nowrap;
    transform-origin: right center;
    transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tally-row:hover {
    transform: translateY(-3px) scale(1.08);
}
.tally-icons {
    display: flex;
    gap: 13.5px;
}
.tally-icons img {
    width: 23px;
    height: 23px;
}
.tally-row:nth-child(3) .tally-icons {
    gap: 15.5px;
}

/* ---------- section headers ---------- */

.back {
    align-self: flex-start;
    margin-top: 47px;
    font-size: 16px;
    font-weight: 600;
    color: var(--orange-100);
}
.back:hover {
    text-decoration: underline;
}
.title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 11px;
    min-height: 54px;
}
.page-title {
    font-size: 36px;
    font-weight: 700;
    font-style: italic;
    line-height: 44px;
    padding-bottom: 5px;
}

/* ---------- controls ---------- */

.controls {
    display: flex;
    align-items: flex-end;
    gap: 13px;
}
.control {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 183px;
}
.control-search {
    width: 227px;
}
.control-label {
    font-size: 10px;
    font-weight: 700;
}

.dropdown {
    position: relative;
}
.dropdown-button,
.search {
    width: 100%;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    transition: border-color 0.12s ease;
}
.dropdown-button:hover,
.search:hover {
    border-color: var(--light-400);
}
.dropdown.is-open .dropdown-button,
.dropdown-button:focus-visible,
.search:focus-within {
    border-color: var(--dark-200);
    outline: none;
}
.dropdown-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dropdown.is-open .dropdown-chevron {
    transform: rotate(180deg);
}
[data-dropdown="sort"] .dropdown-button {
    padding-right: 36px;
}
.sort-flip {
    position: absolute;
    right: 6px;
    top: 50%;
    translate: 0 -50%;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    transition:
        transform 0.2s ease,
        background 0.12s ease;
}
.sort-flip:hover {
    background: var(--light-300);
}
.sort-flip[aria-pressed="true"] {
    transform: scaleY(-1);
}
.dropdown-menu {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 3px);
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 5px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
    box-shadow: 0 8px 20px rgb(82 45 26 / 0.08);
}
.dropdown-menu li {
    flex: none;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.dropdown-menu li:hover,
.dropdown-menu li.is-focus {
    background: color-mix(in srgb, var(--light-300) 55%, var(--light-200));
}
.dropdown-menu li[aria-selected="true"] {
    background: var(--light-300);
}

.search {
    justify-content: flex-start;
    cursor: text;
}
.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    color: var(--dark-200);
}
.search input::placeholder {
    color: var(--light-400);
    opacity: 1;
}
.search input::-webkit-search-cancel-button {
    display: none;
}
.search-clear {
    display: grid;
    place-items: center;
}

/* ---------- printer cards ---------- */

.printer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    margin-top: 59px;
}
.printer-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
    min-height: 150px;
}
.printer-card.is-hidden {
    display: none;
}
.printer-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
}
.printer-id {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.avatar {
    width: 31px;
    height: 31px;
    flex: none;
    align-self: center;
    border-radius: 3px;
    object-fit: cover;
    background: var(--light-300);
}
.avatar-blank {
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--dark-100);
}
.printer-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 19px;
    overflow-wrap: anywhere;
}
.medal:not(:empty) {
    margin-left: 0.28em;
}
.printer-country {
    font-size: 10px;
    line-height: 12px;
}
.printer-bio {
    font-size: 14px;
    font-style: italic;
    line-height: 17px;
    text-align: justify;
    overflow-wrap: anywhere;
    white-space: pre-line;
}
.printer-stats {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.stat {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}
.stat img {
    width: 23px;
    height: 23px;
}

.links {
    position: absolute;
    right: -1px;
    top: -9px;
    display: flex;
    gap: 9px;
}
.pill,
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 10px;
    font-style: italic;
    line-height: 12px;
    white-space: nowrap;
}
.pill {
    font-weight: 500;
    transition: transform 0.12s ease;
}
.pill:hover {
    transform: translateY(-1px);
}
.pill-orange {
    background: var(--orange-100);
}
.pill-cyan {
    background: var(--cyan-100);
}
.rank-badge {
    position: absolute;
    left: -1px;
    top: -9px;
    background: var(--green-100);
}

.empty {
    margin-top: 40px;
    text-align: center;
    font-weight: 600;
    font-style: italic;
}

/* ---------- prints ---------- */

.print-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-flow: row dense;
    column-gap: 30px;
    row-gap: 58px;
    margin-top: 59px;
}
.print-card {
    display: flex;
    flex-direction: column;
    background: var(--light-200);
    border-radius: 7px;
    min-width: 0;
}
.print-card.is-wide {
    grid-column: span 2;
}
.print-photo {
    display: block;
    position: relative;
    height: 220px;
    border-radius: 7px;
    overflow: hidden;
    background: var(--light-300);
}
.print-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    opacity: 0;
}
.print-photo img.is-loaded {
    opacity: 1;
}
/* placeholder art is drawn on cream: show it whole on a matching background */
.print-card.is-placeholder .print-photo {
    background: var(--light-100);
    border: 1px solid var(--light-300);
}
.print-card.is-placeholder .print-photo img {
    object-fit: contain;
}
.print-caption {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 10px;
    font-size: 14px;
    min-width: 0;
}
.print-caption > span:first-child {
    white-space: nowrap;
}
/* "3 days ago" tag in the photo's top-right corner */
.print-when {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    padding: 1.5px 5px;
    border-radius: 2px;
    background: var(--light-100);
    color: var(--dark-200);
    font-size: 12px;
    font-weight: 500;
    font-style: italic;
    white-space: nowrap;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding: 1.5px 3px;
    border-radius: 2px;
    background: var(--orange-100);
    font-weight: 500;
    font-style: italic;
}
.chip-cyan {
    background: var(--cyan-100);
}
.print-event {
    padding-top: 0;
}
.chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chip-avatar {
    width: 15px;
    height: 15px;
    flex: none;
    border-radius: 50%;
    background: var(--dark-200);
    object-fit: cover;
}
.print-card.is-skeleton .print-photo {
    animation: pulse 1.2s ease-in-out infinite;
}
.print-card.is-skeleton .chip {
    width: 70px;
    height: 18px;
}
.feed-end {
    height: 1px;
}

/* ---------- docs ---------- */

.docs {
    display: grid;
    grid-template-columns: 274px minmax(0, 771px);
    justify-content: space-between;
    gap: 40px;
    margin-top: 51px;
}
.docs-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    position: sticky;
    top: 24px;
    align-self: start;
}
.docs-tab {
    padding: 4px 10px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: var(--light-200);
    font-size: 20px;
    line-height: 24px;
    white-space: nowrap;
}
.docs-tab:hover {
    border-color: var(--light-300);
}
.docs-tab.is-active {
    background: var(--orange-100);
    border-color: var(--dark-200);
    font-weight: 700;
}
.prose {
    margin-top: -14px;
    color: #000;
    display: flex;
    flex-direction: column;
    gap: 32px;
    font-size: 20px;
    line-height: 1.5;
}
.prose h1 {
    font-size: 40px;
    font-weight: 600;
    line-height: 48px;
}
.prose h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 39px;
}
.prose h3 {
    font-size: 30px;
    font-weight: 600;
    line-height: 36px;
}
.prose-block {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.prose ul {
    padding-left: 30px;
}
.prose a.hl {
    color: var(--orange-100);
    font-weight: 600;
    font-style: italic;
    text-decoration: underline;
    text-underline-position: from-font;
}
.prose a.hl-link {
    color: var(--orange-100);
    font-weight: 500;
    font-style: italic;
    text-decoration: underline;
    text-underline-position: from-font;
    overflow-wrap: anywhere;
}
.prose a.hl-red {
    color: var(--red-100);
    font-weight: 600;
    font-style: italic;
    text-decoration: underline;
    text-underline-position: from-font;
}
.prose .mono-i {
    font-weight: 500;
    font-style: italic;
    text-decoration: underline;
    overflow-wrap: anywhere;
}
.prose a:hover {
    opacity: 0.8;
}
.faq {
    display: flex;
    flex-direction: column;
    padding-left: 30px;
}
.faq dt {
    display: list-item;
    list-style: disc;
    font-weight: 600;
    font-style: italic;
}
.faq dd {
    display: list-item;
    list-style: circle;
    margin-left: 30px;
}

/* ---------- printer dashboard ---------- */

.dash-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dash-tabs .docs-tab {
    font-family: var(--display);
    font-size: 20px;
    line-height: 22px;
    font-weight: 400;
    cursor: pointer;
}
.dash-signout {
    margin: 0;
}
.flash {
    margin-top: 20px;
    padding: 10px 14px;
    border-radius: 7px;
    border: 1px solid var(--dark-200);
    font-weight: 600;
}
.flash-ok {
    background: var(--green-100);
}
.flash-bad {
    background: var(--red-100);
    color: var(--light-100);
}

.dash {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 34px;
    margin-top: 40px;
    align-items: start;
}
.dash-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
}
.dash-heading {
    font-size: 24px;
    font-weight: 700;
    line-height: 29px;
}
.dash-signout-button {
    border-color: var(--red-100) !important;
    color: var(--red-100);
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}
.dash-signout-button:hover {
    background: var(--red-100);
    color: var(--light-100);
}
.dash-grants-page {
    margin-top: 40px;
}
.dash-text {
    font-size: 15px;
    line-height: 1.45;
}
.dash-hint {
    font-size: 12px;
    font-weight: 500;
    color: var(--dark-100);
}
.dash-cta {
    align-self: flex-start;
    margin: 8px 0 0 21px;
}

.dash-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.dash-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dash-avatar {
    width: 84px;
    height: 84px;
    flex: none;
    border-radius: 8px;
    object-fit: cover;
    background: var(--light-300);
    font-size: 32px;
}
.dash-file {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
}
.dash-file .docs-tab {
    font-size: 16px;
    line-height: 20px;
    border-color: var(--light-300);
    background: var(--light-100);
}
.dash-file:hover .docs-tab {
    border-color: var(--light-400);
}
.dash-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.dash-file-input:focus-visible + .docs-tab {
    outline: 2px dashed var(--dark-200);
    outline-offset: 3px;
}
.dash-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.dash-input {
    width: 100%;
    height: 38px;
    padding: 7px 10px;
    background: var(--light-100);
    color: var(--dark-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
}
.dash-input:hover {
    border-color: var(--light-400);
}
.dash-input:focus {
    outline: none;
    border-color: var(--dark-200);
}
.dash-textarea {
    height: auto;
    min-height: 96px;
    resize: vertical;
    line-height: 1.4;
}
.dash-count {
    float: right;
    font-weight: 500;
    color: var(--dark-100);
}
.dash-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.dash-toggle-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.dash-toggle-track {
    position: relative;
    flex: none;
    width: 44px;
    height: 24px;
    margin-top: 1px;
    border-radius: 999px;
    background: var(--light-300);
    border: 1px solid var(--light-400);
    transition: background 0.15s ease;
}
.dash-toggle-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--light-100);
    border: 1px solid var(--dark-200);
    transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.dash-toggle-input:checked + .dash-toggle-track {
    background: var(--green-100);
    border-color: var(--dark-200);
}
.dash-toggle-input:checked + .dash-toggle-track::after {
    transform: translateX(20px);
}
.dash-toggle-input:focus-visible + .dash-toggle-track {
    outline: 2px dashed var(--dark-200);
    outline-offset: 3px;
}
.dash-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 15px;
}
.dash-col {
    display: flex;
    flex-direction: column;
    gap: 34px;
    min-width: 0;
}
.dash-card.is-locked .dash-heading,
.dash-card.is-locked .dash-text {
    opacity: 0.55;
}
.cta.is-disabled {
    background: var(--light-300);
    color: var(--dark-100);
    cursor: not-allowed;
    filter: grayscale(1);
}
.cta.is-disabled:hover {
    background: var(--light-300);
}
.cta.is-disabled .cta-icon {
    transform: none;
}
.dash-toggle.is-locked {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(1);
}
.dash-lock {
    padding: 10px 12px;
    border-radius: 7px;
    border: 1px solid var(--dark-200);
    background: var(--red-100);
    color: var(--light-100);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}
.dash-checks {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}
.dash-check {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dash-check dt {
    font-weight: 700;
    font-size: 15px;
}
.dash-check dd {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}
.dash-badge {
    padding: 2px 9px;
    border-radius: 7px;
    border: 1px solid var(--dark-200);
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
}
.dash-badge.is-blue {
    background: var(--cyan-100);
}
.dash-badge.is-green {
    background: var(--green-100);
}
.dash-badge.is-red {
    background: var(--red-100);
    color: var(--light-100);
}
.dash-badge.is-none {
    background: var(--light-300);
}
.dash-save {
    align-self: flex-start;
    padding: 5px 22px;
    border: 0;
    cursor: pointer;
    color: var(--dark-200);
}
.dash-save:disabled {
    opacity: 0.6;
    cursor: progress;
}

.dash-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.dash-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
}
.dash-num {
    font-family: var(--display);
    font-size: 40px;
    line-height: 1;
    font-weight: 400;
}
.dash-tile:nth-child(1) .dash-num {
    color: var(--orange-100);
}
.dash-tile:nth-child(2) .dash-num {
    color: var(--cyan-300);
}
.dash-tile:nth-child(3) .dash-num {
    color: var(--green-100);
}
.dash-tile:nth-child(4) .dash-num {
    color: var(--red-100);
}

.dash-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 48px;
    scroll-margin-top: 24px;
}
.dash-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-empty {
    font-weight: 600;
    font-style: italic;
}
.dash-prints,
.dash-grants {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dash-print {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 10px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
}
.dash-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--light-300);
}
.dash-thumb.is-placeholder {
    object-fit: contain;
    background: var(--light-100);
}
.dash-print-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dash-print-title {
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-print-meta {
    font-size: 12px;
    font-weight: 500;
    color: var(--dark-100);
}
.dash-recipient {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
}
.dash-recipient-label {
    font-weight: 500;
    color: var(--dark-100);
}
.dash-recipient-avatar {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 4px;
    object-fit: cover;
    background: var(--light-300);
}
.dash-recipient-avatar.is-blank {
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--dark-100);
}
.dash-recipient-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.dash-recipient .dash-mono {
    flex: none;
    color: var(--dark-100);
}
.dash-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--light-300);
}
.dash-controls {
    flex-wrap: wrap;
}
.dash-print-side {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-status {
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    border: 1px solid var(--dark-200);
}
.dash-status.is-ok {
    background: var(--green-100);
}
.dash-status.is-wait {
    background: var(--yellow-100);
}
.dash-status.is-dup {
    background: var(--light-300);
}

.dash-hcb {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.dash-hcb-email {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
    overflow-wrap: anywhere;
}
.dash-hcb-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex: 1 1 320px;
    max-width: 460px;
}
.dash-hcb-form .dash-field {
    flex: 1;
}
.dash-hcb-form .dash-save {
    align-self: auto;
    height: 38px;
}
.dash-grant {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--light-200);
    border: 1px solid var(--light-300);
    border-radius: 7px;
}
.dash-grant-amount {
    font-family: var(--display);
    font-size: 36px;
    line-height: 1;
}
.dash-grant-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.dash-grant-purpose {
    font-weight: 600;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-card {
    align-self: center;
    margin: auto 0;
    max-width: 460px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 40px 28px;
}
.notice-icon {
    width: 72px;
    height: 72px;
}
.notice-title {
    font-size: 30px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
}
.notice-body {
    font-size: 16px;
    line-height: 1.5;
}
.notice-actions {
    margin-top: 10px;
    padding-left: 21px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

@media (max-width: 960px) {
    .dash {
        grid-template-columns: minmax(0, 1fr);
    }
    .dash-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .dash-tabs .docs-tab {
        font-size: 18px;
        line-height: 20px;
    }
    .dash,
    .dash-tiles {
        margin-top: 24px;
    }
    .dash-tiles {
        gap: 12px;
    }
    .dash-num {
        font-size: 32px;
    }
    .dash-print {
        grid-template-columns: 52px minmax(0, 1fr);
        row-gap: 8px;
    }
    .dash-thumb {
        width: 52px;
        height: 52px;
    }
    .dash-print-side {
        grid-column: 2;
    }
    .dash-print-title {
        white-space: normal;
    }
    .dash-hcb-form {
        flex-basis: 100%;
        max-width: none;
    }
    .dash-grant {
        grid-template-columns: 100px minmax(0, 1fr);
        row-gap: 8px;
    }
    .dash-grant-amount {
        font-size: 30px;
    }
    .dash-grant .pill {
        grid-column: 2;
        justify-self: start;
    }
}

/* ---------- Hack Club banner ---------- */

.hc-banner {
    position: absolute;
    top: 12px;
    left: 0;
    z-index: 99; /* above the page, below the loader (100) */
}
.hc-banner img {
    display: block;
    width: 160px;
    border: 0;
}

/* ---------- loading screen ---------- */

.loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: var(--light-100);
    opacity: 1; /* opaque from first paint so the page never shows before it */
    transition:
        opacity 0.3s ease,
        visibility 0.3s;
}
.loader.is-passive {
    opacity: 0;
    visibility: hidden;
}
.loader.is-done {
    opacity: 0 !important;
    visibility: hidden;
}
.loader.is-loading {
    opacity: 1 !important;
    visibility: visible !important;
}
.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 24px;
}
.loader-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--display);
    font-size: 48px;
    line-height: 1;
}
.loader-logo img {
    width: 37px;
    height: 37px;
    animation: wobble 1s ease-in-out infinite;
}
.loader-sprites {
    display: flex;
    gap: 18px;
}
.loader-sprites img {
    width: 48px;
    height: 48px;
    animation: hop 0.9s cubic-bezier(0.3, 0, 0.4, 1) infinite;
}
.loader-sprites img:nth-child(2) {
    animation-delay: 0.12s;
}
.loader-sprites img:nth-child(3) {
    animation-delay: 0.24s;
}
.loader-sprites img:nth-child(4) {
    animation-delay: 0.36s;
}
.loader-text {
    font-size: 14px;
    font-weight: 600;
    font-style: italic;
}

@keyframes hop {
    0%,
    100% {
        transform: translateY(0) rotate(0);
    }
    40% {
        transform: translateY(-18px) rotate(-8deg);
    }
    60% {
        transform: translateY(-18px) rotate(8deg);
    }
}
@keyframes wobble {
    0%,
    100% {
        transform: rotate(-8deg);
    }
    50% {
        transform: rotate(8deg);
    }
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reel {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .reel-2 .reel-track {
        margin-left: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }
}

/* ---------- responsive ---------- */

@media (max-width: 1200px) {
    :root {
        --gutter: 32px;
    }
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 48px;
        margin-top: 56px;
    }
    .hero-copy {
        width: min(452px, 100%);
    }
    .steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: 760px;
    }
    .step-head {
        white-space: normal;
        text-align: center;
        height: auto;
        min-height: 35px;
    }
    .showcase {
        margin-top: 56px;
    }
}

@media (max-width: 960px) {
    .title-row {
        flex-direction: column;
        align-items: stretch;
    }
    .controls {
        flex-wrap: wrap;
    }
    .control,
    .control-search {
        width: auto;
        flex: 1 1 160px;
    }
    .printer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
        margin-top: 40px;
    }
    .print-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 20px;
        row-gap: 32px;
        margin-top: 40px;
    }
    .showcase {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 32px;
    }
    .reel {
        width: 100%;
        flex: none;
    }
    .tally-row {
        transform-origin: left center;
    }
    .tally {
        width: auto;
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-content: space-between;
        column-gap: 32px;
    }
    .tally-row {
        gap: 16px;
        justify-content: flex-start;
    }
    .docs {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        margin-top: 32px;
    }
    .docs-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .prose {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    /* Phone layout from the "iPhone Air" frame: big centred logo, nav pinned to
     the bottom, steps and print strips running off the screen edge. */
    :root {
        --gutter: 18px;
    }
    .page {
        padding-top: 86px; /* clears the Hack Club banner */
        padding-bottom: 110px;
    }

    /* The header's two halves join the page flow: logo on top, nav buttons
     pinned to the bottom of the screen. */
    .nav {
        display: contents;
    }
    .logo {
        align-self: center;
    }
    .main {
        order: 1;
    }
    .footer {
        order: 2;
    }
    .logo {
        font-size: clamp(40px, 15.2vw, 64px);
        gap: 6px;
    }
    .logo-cat {
        width: clamp(33px, 12.6vw, 53px);
        height: clamp(33px, 12.6vw, 53px);
    }
    .nav-links {
        position: fixed;
        bottom: 14px;
        left: 50%;
        translate: -50% 0;
        z-index: 20;
        gap: 10px;
        padding: 6px 10px;
        background: var(--light-100);
        border: 3px solid var(--light-300);
        border-radius: 999px;
    }
    /* four stickers (~452px) don't fit a phone at full size: shrink the whole pill */
    .nav-links {
        scale: 0.78;
        transform-origin: 50% 100%;
    }

    .hero {
        flex-direction: column;
        align-items: stretch;
        gap: 37px;
        margin-top: 25px;
    }
    .hero-copy {
        width: 100%;
        gap: 29px;
    }
    .hero-lede {
        font-size: 24px;
        text-align: justify;
    }
    .hero-ctas {
        grid-template-columns: 1fr 1fr;
        gap: 16px 36px;
        padding: 0 0 0 21px;
    }
    .steps-scroll {
        display: flex;
        order: -1;
        margin-right: calc(-1 * var(--gutter));
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
    }
    .steps-scroll::-webkit-scrollbar {
        display: none;
    }
    .steps {
        grid-template-columns: repeat(3, 291px);
        width: max-content;
        max-width: none;
    }
    .step {
        scroll-snap-align: start;
    }
    .steps-scroll::after {
        content: "";
        flex: none;
        width: var(--gutter);
    }
    .step-head {
        font-size: 12px;
        height: 35px;
        min-height: 0;
        white-space: nowrap;
    }
    .step-img {
        aspect-ratio: 1344 / 1024;
    }

    .showcase {
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
        margin-top: 40px;
    }
    .reel {
        margin: 0 calc(-1 * var(--gutter));
        width: auto;
        --fade: 36px;
    }
    .reel-2 {
        display: flex;
    }
    .tally {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        column-gap: 24px;
        row-gap: 11px;
        width: auto;
    }
    .tally-row {
        justify-content: flex-start;
        gap: 10px;
        font-size: 28px;
        line-height: 29px;
        transform-origin: center;
    }
    .tally-icons img {
        width: 26px;
        height: 26px;
    }
    .tally-extra {
        display: none;
    }

    .back {
        margin-top: 28px;
    }
    .page-title {
        font-size: 32px;
    }
    .control-search {
        flex-basis: 100%;
    }
    .printer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
        margin-top: 32px;
    }
    .printer-card {
        padding: 18px 16px 16px;
    }
    .print-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
        row-gap: 20px;
        margin-top: 32px;
    }
    .print-photo {
        height: 180px;
    }
    .print-caption {
        font-size: 12px;
        padding: 8px;
    }
    .docs-tab {
        font-size: 16px;
        line-height: 20px;
    }
    .prose {
        font-size: 17px;
        gap: 24px;
    }
    .prose h1 {
        font-size: 32px;
        line-height: 38px;
    }
    .prose h2 {
        font-size: 26px;
        line-height: 32px;
    }
    .prose h3 {
        font-size: 24px;
        line-height: 30px;
    }
    .prose-block {
        gap: 20px;
    }
    .prose ul,
    .faq {
        padding-left: 22px;
    }
    .faq dd {
        margin-left: 20px;
    }

    /* footer steps down: left, centre, right */
    .footer {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 40px 0 0;
    }
    .footer-left {
        justify-self: start;
    }
    .footer-center {
        justify-self: center;
    }
    .footer-right {
        justify-self: end;
    }
}

@media (max-width: 499px) {
    .hero-ctas {
        grid-template-columns: 1fr;
        row-gap: 16px;
    }
    .tally {
        column-gap: 14px;
    }
    .tally-row {
        font-size: 24px;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .nav-links {
        scale: 0.68;
    }
}
