  /* Self-hosted fonts (no external font CDN). Same weights/styles as
     h44s-share/h44s-qr's @fontsource imports, vendored as static files here
     since this site has no build step to pull them in as a package. */
  @font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/quicksand-latin-300-normal.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/quicksand-latin-400-normal.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/quicksand-latin-500-normal.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Bitter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/bitter-latin-300-normal.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Bitter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/bitter-latin-700-normal.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Bitter';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/bitter-latin-300-italic.woff2') format('woff2');
  }

  :root {
    --ink: #151318;
    --paper: #F5F2F7;
    --accent: #9B3BFF;
    --bg-dark: #0A090C;

    --bg: var(--paper);
    --text: var(--ink);
    --muted: rgba(21, 19, 24, 0.62);
    --line-neutral: rgba(21, 19, 24, 0.18);
    --star: rgba(155, 59, 255, 0.4);
    --nebula: rgba(155, 59, 255, 0.09);
    --card-bg: rgba(21, 19, 24, 0.04);
    --card-bg-disabled: rgba(0, 0, 0, 0.09);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: var(--bg-dark);
      --text: var(--paper);
      --muted: rgba(245, 242, 247, 0.64);
      --line-neutral: rgba(245, 242, 247, 0.2);
      --star: rgba(245, 242, 247, 0.55);
      --nebula: rgba(155, 59, 255, 0.15);
      --card-bg: rgba(245, 242, 247, 0.06);
      --card-bg-disabled: rgba(0, 0, 0, 0.06);
    }
  }

  :root[data-theme="dark"] {
    --bg: var(--bg-dark);
    --text: var(--paper);
    --muted: rgba(245, 242, 247, 0.64);
    --line-neutral: rgba(245, 242, 247, 0.2);
    --star: rgba(245, 242, 247, 0.55);
    --nebula: rgba(155, 59, 255, 0.15);
    --card-bg: rgba(245, 242, 247, 0.06);
    --card-bg-disabled: rgba(0, 0, 0, 0.06);
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; margin: 0; }
  img { max-width: 100%; }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    :root, body, .card, .toggle, .cta {
      transition: background-color 0.38s ease, color 0.38s ease, border-color 0.38s ease;
    }
    .mark {
      transition: opacity 0.38s ease;
    }
  }

  .starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .nebula {
    position: absolute;
    inset: -20%;
    background:
      radial-gradient(circle at 28% 24%, var(--nebula), transparent 58%),
      radial-gradient(circle at 76% 68%, var(--nebula), transparent 52%);
    filter: blur(46px);
    animation: nebula-drift 70s ease-in-out infinite alternate;
  }

  .stars {
    position: absolute;
    inset: -10%;
    background-repeat: repeat;
  }

  .stars-a {
    background-image:
      radial-gradient(1px 1px at 12% 22%, var(--star), transparent 100%),
      radial-gradient(1px 1px at 42% 58%, var(--star), transparent 100%),
      radial-gradient(1px 1px at 68% 14%, var(--star), transparent 100%),
      radial-gradient(1px 1px at 86% 78%, var(--star), transparent 100%),
      radial-gradient(1px 1px at 54% 88%, var(--star), transparent 100%),
      radial-gradient(1px 1px at 24% 74%, var(--star), transparent 100%);
    background-size: 220px 220px;
    animation: stars-drift-a 110s linear infinite, star-breathe 8s ease-in-out infinite alternate;
  }

  .stars-b {
    background-image:
      radial-gradient(1.4px 1.4px at 16% 46%, var(--star), transparent 100%),
      radial-gradient(1.4px 1.4px at 50% 18%, var(--star), transparent 100%),
      radial-gradient(1.4px 1.4px at 80% 54%, var(--star), transparent 100%),
      radial-gradient(1.4px 1.4px at 30% 86%, var(--star), transparent 100%);
    background-size: 340px 340px;
    opacity: 0.7;
    animation: stars-drift-b 150s linear infinite reverse, star-breathe 11s ease-in-out infinite alternate-reverse;
  }

  @keyframes nebula-drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(3%, -2%) scale(1.06); }
  }
  @keyframes stars-drift-a {
    from { background-position: 0 0; }
    to { background-position: 220px 220px; }
  }
  @keyframes stars-drift-b {
    from { background-position: 0 0; }
    to { background-position: -340px 340px; }
  }
  @keyframes star-breathe {
    from { opacity: 0.5; }
    to { opacity: 1; }
  }

  @media (prefers-reduced-motion: reduce) {
    .nebula, .stars-a, .stars-b { animation: none; }
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Quicksand', ui-sans-serif, sans-serif;
    font-weight: 400;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-inline: max(20px, calc((100vw - 720px) / 2));
  }

  .page {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-block: 28px 48px;
    gap: 56px;
  }

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .wordmark {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
  }
  .wordmark .d { color: var(--text); }
  .wordmark .h { color: var(--accent); }

  /* The header's own app mark: "h44s" (only the "44" in the accent violet,
     same treatment as the "h" above) followed by ".universe" in the body
     face - unlike .wordmark above (Daniel's personal "dh" signature, kept
     as-is in the footer), this one names the site itself. */
  .app-mark {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    color: var(--text);
  }
  .app-mark .accent { color: var(--accent); }
  .app-mark .suffix {
    font-family: 'Quicksand', ui-sans-serif, sans-serif;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--muted);
  }

  .logo-trigger {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    color: inherit;
    cursor: pointer;
  }
  .logo-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }

  .easter-egg {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 5;
    font-size: 2.75rem;
    line-height: 1;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 120%);
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
  }
  .easter-egg.visible {
    transform: translate(-50%, 0%);
  }
  @media (prefers-reduced-motion: reduce) {
    .easter-egg { transition: none; }
  }

  .toggle {
    flex: none;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 0;
    background: var(--accent);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
  }
  .toggle:hover { filter: brightness(1.38); }
  .toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

  main {
    display: flex;
    flex-direction: column;
    gap: 44px;
  }

  .hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  h1 { margin: 0; }

  /* The h44s word-/picture-mark: two full-color SVGs (not a single
     recolorable asset - the bunny-ear artwork differs between them, not
     just the fill), stacked and crossfaded via opacity instead of a
     color swap. h1 keeps an aria-label / visually-hidden text for
     SEO/screen readers since the mark itself carries no accessible text. */
  .mark-stack {
    display: block;
    position: relative;
    width: clamp(150px, 34vw, 220px);
    aspect-ratio: 404 / 460;
    margin: 0 auto;
    container-type: inline-size;
    overflow: hidden;
  }
  .mark {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .mark-dark { opacity: 0; }
  :root[data-theme="dark"] .mark-light { opacity: 0; }
  :root[data-theme="dark"] .mark-dark { opacity: 1; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mark-light { opacity: 0; }
    :root:not([data-theme="light"]) .mark-dark { opacity: 1; }
  }

  /* "h44s" as real text (Bitter Regular, not the bold display weight used
     elsewhere) instead of the outlined letterforms the SVGs originally
     shipped with - positioned to match exactly where those letters used
     to sit (measured via getBBox() on the removed paths: x 20.35-368.33,
     y 272.41-392.09 of the 404x460 viewBox, converted to percentages). */
  .mark-text {
    position: absolute;
    left: 0;
    top: 59.2196%;
    width: 100%;
    height: 26.017%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 0.5cqw;
    font-family: 'Bitter', serif;
    font-weight: 400;
    font-size: 36cqw;
    line-height: 1;
    color: var(--text);
  }
  /* "44" pinned to the middle column so it lands exactly on the mark's
     horizontal center (the 44-wide viewBox is 404 units, so center =
     grid column 2's own center) - "h"/"s" flank it, right/left-aligned
     against it, rather than the whole string being centered as a block. */
  .mark-text .mt-h { grid-column: 1; justify-self: end; }
  .mark-text .mt-num { grid-column: 2; justify-self: center; color: var(--accent); }
  .mark-text .mt-s { grid-column: 3; justify-self: start; }

  .tagline {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 34ch;
    margin-inline: auto;
    line-height: 1.6;
  }

  .tagline.mono {
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 0.95rem;
  }

  hr {
    border: none;
    border-top: 1px solid var(--accent);
    margin: 0;
    width: 100%;
  }

  .tools {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .card {
    border: 1px solid var(--accent);
    border-radius: 0;
    padding: 22px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
  }

  /* The app's own icon (left of the title), same lucide glyph the app
     uses for itself in the other apps' sidebar menus - QrCode for
     h44s.qr, FolderOpen for h44s.share. */
  .card-icon {
    flex: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
  }

  .card-text { flex: 1; min-width: 0; }

  .card-text h2 {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0 0 6px;
  }

  /* Two-tone app title, same treatment as the header's .app-mark:
     "44" in accent violet, the ".share"/".qr" suffix muted and in the
     body face. */
  .card-title { letter-spacing: 0.02em; }
  .card-title .accent { color: var(--accent); }
  .card-title .suffix {
    font-family: 'Quicksand', ui-sans-serif, sans-serif;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--muted);
  }

  .card-text p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .cta {
    flex: none;
    width: 46px;
    height: 46px;
    background: var(--accent);
    color: var(--paper);
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  a.card:hover .cta { filter: brightness(1.38); }
  a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

  .card.disabled {
    background: var(--card-bg-disabled);
    border-color: var(--line-neutral);
    cursor: default;
  }
  .card.disabled .cta {
    background: transparent;
    border: 1px solid var(--line-neutral);
    color: var(--muted);
  }

  footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-block: 20px 4px;
    color: var(--muted);
    font-size: 0.8rem;
  }

  footer .wordmark { font-size: 0.85rem; }

  @media (max-width: 480px) {
    .card { flex-direction: row; padding: 18px; }
    .card-text h2 { font-size: 1.15rem; }
  }
