/* Tiny Twig Studio: one stylesheet for all pages.
   Idea: everything sits on the disc grid of the logo; light is what matters. Cyan = the studio (Y, links), lamp yellow = "on"
   (current page, status). Follows the device setting until you use the sun/moon button in the header, then remembers that choice.
   Layout rule: every page = header (fixed height) + page head + .block sections + footer. Same spacing everywhere. */
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("fonts/poppins-bold.woff") format("woff"); }
:root {
  --bg: #0b1220; --surface: #111a2c; --line: #1f2b44; --text: #e8eef8; --muted: #9aa8c2;
  --cyan: #4fd1e8; --link: #4fd1e8; --ink: #0b1322; --disc: #1b2740; --disc-ink: #ffffff;
  --lamp: #ffd23d; --ok: #5de08f; --field: #111a2c; --field-lit: #3b5178; --glow: 255, 210, 61;
  --head: "Poppins", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --top: 72px;          /* header height, identical on every page */
  --gap: 72px;          /* space between sections */
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef2f7; --surface: #ffffff; --line: #d4dcea; --text: #0b1220; --muted: #4d5b75;
  --link: #0a7f95; --disc: #0b1220; --field: #e1e7f0; --field-lit: #fbe7a6; --glow: 255, 200, 40; color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--body); min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: clip; transition: background-color 0.35s, color 0.35s; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6.5vw, 3.6rem); letter-spacing: -0.01em; hyphens: manual; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 66ch; text-wrap: pretty; }
.wrap { width: min(1000px, 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 42ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 80; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header: same height and same contents on every page, so nothing moves when you switch pages */
.top { height: var(--top); flex: 0 0 auto; position: relative; z-index: 20; }
.top-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.top nav { display: flex; gap: 2px; }
/* theme button: a disc like the logo; shows the sun in the dark (switch the lights on) and the moon in the light */
.theme { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme:hover { border-color: var(--cyan); }
.theme svg { width: 20px; height: 20px; grid-area: 1 / 1; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s, opacity 0.25s; }
.theme .i-sun circle { fill: var(--lamp); stroke: var(--lamp); }
.theme .i-sun path { stroke: var(--lamp); }
.theme .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="light"] .theme .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="light"] .theme .i-moon { opacity: 1; transform: none; fill: var(--text); stroke: var(--text); }
.top nav a { position: relative; color: var(--muted); text-decoration: none; padding: 8px 12px; font: 700 0.95rem/1 var(--head); border-radius: 999px; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--text); }
.top nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }

/* the logo: four discs, the last one is cyan; under it the line, spread to the width of the discs */
.logo-block { --D: 96px; --g: 14px; display: inline-flex; flex-direction: column; gap: calc(var(--D) * 0.22); width: calc(var(--D) * 4 + var(--g) * 3); max-width: 100%;
  text-decoration: none; color: inherit; border-radius: 8px; }
.logo-discs { display: flex; gap: var(--g); position: relative; }
.d { --lit: 0; width: var(--D); height: var(--D); border-radius: 50%; background: var(--disc); color: var(--disc-ink); display: grid; place-items: center;
  font: 700 calc(var(--D) * 0.5) / 1 var(--head); user-select: none; position: relative; flex: 0 0 auto; }
@supports (background: color-mix(in srgb, red, blue)) {
  .d { background: color-mix(in srgb, var(--field-lit) calc(var(--lit) * 70%), var(--disc)); }
}
.d.y { background: var(--cyan); color: var(--ink); cursor: pointer; box-shadow: 0 0 calc(var(--lit) * 40px) rgba(79, 209, 232, 0.55); }
.logo-line { display: flex; justify-content: space-between; font: 700 calc(var(--D) * 0.3) / 1 var(--head); color: var(--text); width: 100%; user-select: none; }
.logo-line span.sp { flex: 0 0 calc(var(--D) * 0.1); }
.logo-block.mini { --D: 28px; --g: 5px; gap: 4px; }
.logo-block.mini .logo-line { font-size: 9px; }
.logo-block.mini.await { visibility: hidden; opacity: 0; transition: opacity 0.3s, visibility 0s 0.3s; }
.logo-block.mini.await.shown { visibility: visible; opacity: 1; transition: opacity 0.3s; }
.logo-block.hero { --D: min(96px, 19vw); --g: min(14px, 2.8vw); position: relative; z-index: 1; }
.logo-block.hero .d { animation: pop 0.55s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.logo-block.hero .d:nth-child(1) { animation-delay: 0.1s; }
.logo-block.hero .d:nth-child(2) { animation-delay: 0.28s; }
.logo-block.hero .d:nth-child(3) { animation-delay: 0.46s; }
.logo-block.hero .d.y { animation: hop 1.5s 0.9s cubic-bezier(.3, 0, .4, 1) backwards; }
.logo-block.hero .d.y::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--cyan); opacity: 0; animation: ring 0.9s 1.9s ease-out; }
.logo-block.hero .logo-line { animation: fade 0.7s 2.3s ease backwards; }
.d.y.spin { animation: spin 0.6s ease; }
/* the Y is a twig (svg); the hidden µ is the old easter egg, shown while .micro is set */
.d.y > * { grid-area: 1 / 1; }
.d.y .twig { width: 100%; height: 100%; display: block; }
.d.y .mu { display: none; }
.d.y.micro .twig { display: none; }
.d.y.micro .mu { display: block; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes hop {
  0% { transform: translateY(-260%); animation-timing-function: cubic-bezier(.5, 0, 1, .6); }
  40% { transform: translateY(0) scale(1.14, .86); animation-timing-function: ease-out; }
  52% { transform: translateY(-34%) scale(.97, 1.04); animation-timing-function: ease-in; }
  64% { transform: translateY(0) scale(1.07, .93); animation-timing-function: ease-out; }
  74% { transform: translateY(-10%); animation-timing-function: ease-in; }
  82%, 100% { transform: translateY(0); }
}
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* home hero: the logo is four lit discs in a dark disc field; a lamp follows the pointer (site.js) */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.field { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60px, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 60px, #000 70%, transparent); }
/* the apps in the disc field (home): one disc each, a click opens the app's page */
.field-app { position: absolute; z-index: 1; border-radius: 50%; overflow: hidden; display: block;
  box-shadow: 0 0 0 0 rgba(var(--glow), 0); transition: transform 0.25s cubic-bezier(.2, 1.4, .4, 1), box-shadow 0.25s; animation: pop 0.55s 0.2s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.field-app[hidden] { display: none; }
.field-app img { width: 100%; height: 100%; display: block; object-fit: cover; }
.field-app .on-light, :root[data-theme="light"] .field-app .on-dark { display: none; }
:root[data-theme="light"] .field-app .on-light { display: block; }
:root[data-theme="light"] .field-app { box-shadow: 0 0 0 1px var(--line); }
.field-app:hover, .field-app:focus-visible { transform: scale(1.12); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--cyan), 0 0 28px rgba(var(--glow), 0.35); }
.hero-in { position: relative; z-index: 1; display: inline-block; }
.hero-lead { position: relative; z-index: 1; margin: clamp(28px, 5vw, 44px) 0 0; color: var(--text); }

/* page head: identical position and spacing on every subpage */
.phead { padding: clamp(36px, 6vw, 64px) 0 0; display: grid; gap: 24px; align-items: start; }
.phead.has-art { grid-template-columns: 1fr 200px; }
.phead h1 { margin-bottom: 0.3em; }
.phead .lead { margin-bottom: 0; }
.phead .lang-switch { margin: .6rem 0 0; font-size: .95rem; }
.phead .lang-switch a { color: var(--muted); }
.phead-text > * + .status, .phead-text > * + .row { margin-top: 24px; }
.phead-art { align-self: center; justify-self: center; width: 100%; max-width: 200px; }
/* Alex's pixel portrait: a disc like the logo, with a thin cyan ring */
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; background: var(--disc);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--cyan); }

/* sections share one rhythm */
.block { margin-top: var(--gap); }
.block > h2 { margin-bottom: 20px; }
main { padding-bottom: var(--gap); }

.status { display: flex; align-items: baseline; gap: 10px; color: var(--muted); margin: 0; }
.status-lamp { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 10px var(--lamp); transform: translateY(-1px); }
.btn { display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 999px; font: 700 0.98rem/1 var(--head); text-decoration: none;
  background: var(--cyan); color: var(--ink); border: 2px solid var(--cyan); }
.btn:hover { background: transparent; color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--cyan); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* lists with disc markers instead of boxes */
.works { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.work { display: grid; grid-template-columns: 132px 1fr; gap: 28px; align-items: start; }
.work h3 a { color: inherit; text-decoration: none; }
.work h3 a:hover { color: var(--link); }
.work p { color: var(--muted); }
.work .status { margin-top: 4px; }
.work-shot { display: block; width: 132px; aspect-ratio: 480 / 560; border-radius: 22px; overflow: hidden; background: var(--surface); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.work-shot.empty { display: grid; place-items: center; background: transparent; border: 2px dashed var(--line); }
.work-shot.empty .d { --D: 44px; color: var(--muted); }
.noise { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; opacity: .7; }
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px 32px; }
.points li { color: var(--muted); padding-left: 26px; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 14px; height: 14px; border-radius: 50%; background: var(--disc); box-shadow: inset 0 0 0 2px var(--cyan); }
.points b { font-family: var(--head); color: var(--text); display: block; margin-bottom: 4px; font-size: 1.05rem; line-height: 1.3; }
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 24px; }
.sectors li { display: flex; align-items: center; gap: 12px; font: 700 0.98rem/1.3 var(--head); }
.sectors li::before { content: ""; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.shots img { height: 440px; width: auto; border-radius: 22px; scroll-snap-align: start; flex: 0 0 auto; }

/* Pip */
.pip { width: 100%; height: auto; cursor: pointer; animation: bob 3.2s ease-in-out infinite; }
.pip .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.pip.blink .eye { animation: blink-now 0.25s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes blink-now { 50% { transform: scaleY(0.1); } }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* prose (about, legal) */
.prose h2 { margin: 1.8em 0 0.5em; font-size: 1.3rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li::marker { color: var(--cyan); }
.prose { overflow-wrap: anywhere; }
.todo { background: #ffd23d; color: #231a00; padding: 0 6px; border-radius: 4px; font-weight: 700; }

/* footer */
.foot { margin-top: auto; border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: 0.92rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot .tools { display: flex; align-items: center; gap: 16px; }
.led { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); display: inline-block; animation: heartbeat 1s steps(1) infinite; cursor: pointer; border: 0; padding: 0; }
@keyframes heartbeat { 0% { opacity: 1; } 50% { opacity: .15; } }

/* eastereggs */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--surface); border: 1px solid var(--cyan); color: var(--text); padding: 12px 18px; border-radius: 14px; opacity: 0; transition: 0.35s; z-index: 60; max-width: min(92vw, 520px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.rover { position: fixed; bottom: 6px; left: -120px; width: 90px; z-index: 55; pointer-events: none; }
.rover.go { animation: drive 5s linear forwards; }
@keyframes drive { to { left: calc(100vw + 120px); } }
.term { position: fixed; inset: auto 0 0 0; height: min(60vh, 460px); background: #04080f; color: #b8f7c4; font: 14px/1.5 var(--mono); z-index: 70; border-top: 2px solid var(--cyan);
  padding: 12px 16px; display: none; flex-direction: column; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); }
.term.open { display: flex; }
.term .out { flex: 1; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.term .out .cmd { color: #fff; }
.term .out .err { color: #ff8b8b; }
.term form { display: flex; gap: 8px; align-items: center; }
.term input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; outline: none; }
.term .prompt { color: var(--cyan); }
.term .close { position: absolute; right: 12px; top: 8px; background: none; border: 0; color: #7d8ba5; cursor: pointer; font: inherit; }
.dark404 { --mx: 50vw; --my: 40vh; }
.dark404::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; background: radial-gradient(circle 150px at var(--mx) var(--my), transparent 0, rgba(3, 6, 12, .93) 100%); }
:root[data-theme="light"] .dark404::after { display: none; }

/* Sequently: the ring of eight singing dots, and the card for a tune from a friend (sequently.js) */
.seq-ring { width: 100%; height: auto; display: block; overflow: visible; }
.seq-ring .dot { fill: color-mix(in srgb, var(--c) 22%, var(--bg)); stroke: var(--c); stroke-width: 2.5; transition: fill 0.25s, filter 0.25s; }
.seq-ring.art .dot { cursor: pointer; }
.seq-ring .dot.on { fill: var(--c); filter: drop-shadow(0 0 10px var(--c)); transition: fill 0.04s, filter 0.04s; }
.tune-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 36px); }
.tune-from { color: var(--muted); margin: 0 0 6px; font-family: var(--head); font-weight: 700; }
.tune-head h2 { margin-bottom: 6px; }
.tune-body { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; margin: 22px 0; }
.tune-notes { display: flex; flex-wrap: wrap; gap: 8px 6px; font: 700 1.1rem/1 var(--head); }
.tune-notes .n { padding: 8px 10px; border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--c) 14%, transparent); }
.tune-notes .n sub { font-size: 0.65em; color: var(--muted); margin-left: 1px; }
.tune-notes .n.on { background: var(--c); color: #0b1322; }
.tune-notes .n.on sub { color: #0b1322; }
.tune-notes { gap: 10px 0; }
.tune-notes .ph { display: inline-flex; gap: 6px; padding-right: 10px; margin-right: 10px; border-right: 2px solid var(--line); }
.tune-notes .ph:last-child { border-right: 0; padding-right: 0; margin-right: 0; }
.tune-bad { color: #ff8b8b; }
.tune-warn { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--lamp) 12%, transparent); border: 1px solid color-mix(in srgb, var(--lamp) 40%, transparent); font-size: 0.95rem; }
.tune-app { align-items: center; gap: 12px; margin-bottom: 14px; }
.tune-app[hidden] { display: none; }
.tune-side > * + * { margin-top: 12px; }
.tune-side #tuneSecret { margin: 0; }
.tune-notes[hidden], .tune-side [hidden] { display: none; }
/* Sequently composer (/sequently/compose/) */
.comp-card, .comp-out { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(18px, 4vw, 36px); }
.comp-card > * + * { margin-top: 20px; }
.comp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cfield { display: grid; gap: 6px; min-width: 0; }
.cfield span { font: 700 0.9rem/1 var(--head); color: var(--muted); }
.cfield input { width: 100%; min-width: 0; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; }
.cfield input:focus { border-color: var(--cyan); outline: none; }
.comp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.comp-label { font: 700 0.9rem/1 var(--head); color: var(--muted); min-width: 5.5em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 700 0.9rem/1 var(--head); color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.chip:hover { border-color: var(--cyan); }
.chip[aria-checked="true"] { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.comp-main { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 28px; align-items: center; }
.comp-ring .dot { cursor: pointer; }
.comp-ring .lbl { font: 700 11px var(--head); fill: var(--text); text-anchor: middle; pointer-events: none; }
.comp-ring .lbl.on { fill: #0b1322; }
.comp-ring .lbl .oct { font-size: 7px; opacity: 0.7; }
.comp-line { min-width: 0; }
.comp-notes { min-height: 132px; max-height: 260px; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 0; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; cursor: text; }
.comp-notes .empty { color: var(--muted); align-self: center; }
.comp-notes .ph { display: inline-flex; align-items: center; gap: 4px; padding-right: 10px; margin-right: 10px; border-right: 2px solid var(--line); }
.comp-notes .ph:last-child { border-right: 0; }
.comp-notes .n { font: 700 1.05rem/1 var(--head); color: var(--text); padding: 7px 9px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.comp-notes .n sub { font-size: 0.65em; color: var(--muted); margin-left: 1px; }
.comp-notes .n.sel { border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }
.comp-notes .n.on { background: var(--c); color: #0b1322; }
.comp-notes .n.on sub { color: #0b1322; }
.comp-notes .caret { width: 2px; height: 1.6em; background: var(--cyan); border-radius: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.comp-count { margin: 8px 2px 0; }
.comp-status { min-height: 1.5em; margin: 0 2px 8px; font: 700 1.05rem/1.4 var(--head); color: var(--muted); }
.comp-status.turn { color: var(--text); }
.comp-status.good { color: var(--ok); }
.comp-status.bad { color: #ff6b7e; }
.composer:not(.practising) .comp-status:empty { display: none; }
.practising .comp-notes .n { cursor: default; }
.practising .comp-notes .n.dim { opacity: 0.25; }
.practising .comp-notes .n.ok { box-shadow: inset 0 0 0 2px var(--c); }
.practising .comp-notes .caret { display: none; }
.practising .comp-ring .dot { cursor: pointer; }
.comp-tools .btn:disabled, .comp-out .btn:disabled, .comp-out .btn[aria-disabled="true"] { opacity: 0.4; cursor: default; pointer-events: none; }
.comp-out { margin-top: 20px; display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.comp-out.off .comp-qr { opacity: 0.25; }
.comp-qr { background: #fff; border-radius: 18px; padding: 10px; aspect-ratio: 1; display: grid; place-items: center; }
.comp-qr canvas { width: 100%; height: auto; image-rendering: pixelated; }
.comp-send h2 { margin-bottom: 6px; }
.comp-send > * + * { margin-top: 14px; }
.comp-send .cfield input { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.small { font-size: 0.92rem; }
code { font-family: var(--mono); font-size: 0.92em; }
button.btn { cursor: pointer; }

@media (max-width: 720px) {
  .tune-body { grid-template-columns: 1fr; }
  .tune-body .tune-ring { max-width: 200px; margin: 0 auto; }
  .comp-fields, .comp-main, .comp-out { grid-template-columns: 1fr; }
  .comp-main .comp-ring { max-width: 240px; margin: 0 auto; }
  .comp-qr { max-width: 240px; width: 100%; margin: 0 auto; }
  :root { --top: 64px; --gap: 56px; }
  body { font-size: 16px; }
  /* the art sits next to title and lead; status and buttons below get the full width */
  .phead.has-art { display: block; position: relative; }
  .phead.has-art .phead-art { position: absolute; right: 0; top: clamp(36px, 6vw, 64px); width: 96px; }
  .phead.has-art h1, .phead.has-art .lead { padding-right: 108px; }
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .work { grid-template-columns: 88px 1fr; gap: 18px; }
  .work-shot { width: 88px; border-radius: 16px; }
  .shots img { height: 360px; border-radius: 18px; }
  .top nav a { padding: 8px 9px; font-size: 0.9rem; }
  .top-right { gap: 6px; }
  .theme { width: 34px; height: 34px; }
}
@media (max-width: 440px) {
  .nav-long { display: none; }
  .top nav a.nav-home { display: none; }
  .top nav a { padding: 8px 6px; font-size: 0.86rem; }
  .top-right { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
/* lights on: the near-black logo discs stay as they are, only the field reacts */
:root[data-theme="light"] .d:not(.y) { background: var(--disc); }
