/* High Cap Dog: one sunny yard. Layout system: container 1240, edge 64 / 20, spacing 8 16 24 32 48 64 96. */
@font-face { font-family: "Bagel Fat One"; src: url("/fonts/bagel-fat-one.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --sky: #7dcdfd; --sky-deep: #7cc6f7; --grass: #5bcb5b; --fur: #e2a15b; --red: #e63946; --red-dark: #c42a37;
  --white: #fff; --ink: #1d1d1f; --cream: #fff6e0; --muted: #3c4a57;
  --display: "Bagel Fat One", "Nunito", system-ui, sans-serif;
  --text: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --edge: 64px; --container: 1240px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --line: 3px solid var(--ink); --radius: 18px; --shadow: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { background: var(--sky); }
body { margin: 0; color: var(--ink); background: var(--sky); font: 400 18px/1.5 var(--text); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
.mono { font-family: var(--mono); font-variant-numeric: normal; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- nav: one row of four words ---------- */
.nav { position: absolute; z-index: 30; top: 28px; left: var(--edge); display: flex; gap: 8px; }
.nav a { font-weight: 800; font-size: 19px; text-decoration: none; padding: 9px 20px; border-radius: 12px; }
.nav a:hover { background: rgba(255,255,255,.55); }
.nav a[aria-current="page"] { background: var(--white); box-shadow: inset 0 0 0 3px var(--ink); }
.nav .home { padding: 4px; margin-right: 6px; }
.nav .home img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 3px var(--ink); }

/* ---------- buttons and the card ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px 1.3em; border: var(--line); border-radius: 16px; background: var(--white); box-shadow: 5px 5px 0 var(--ink); font-weight: 900; font-size: 20px; text-decoration: none; cursor: pointer; transition: transform .12s ease-out, box-shadow .12s ease-out; line-height: 1; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--red); color: var(--white); }
.btn.primary:hover { background: #ee4552; }
.btn[disabled] { cursor: default; color: #6a7380; background: #eef2f5; transform: none; box-shadow: 5px 5px 0 #9aa6b2; border-color: #9aa6b2; }
.card { background: var(--cream); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; }

/* the first screen: see the block at the end of the file */
.dog { position: absolute; z-index: 4; left: var(--dog-x, 63%); bottom: 2.5%; width: var(--dog-w, 340px); transform: translateX(-50%); pointer-events: none; user-select: none; }
.dog img { width: 100%; height: auto; }
.dog img.shake { position: absolute; left: 0; top: 0; visibility: hidden; }
.dog.shaking img.base { visibility: hidden; }
.dog.shaking img.shake { visibility: visible; }
.dog.shaking { animation: shake .16s steps(2) 6; }
@keyframes shake { 0% { transform: translateX(-52%) rotate(-3deg); } 100% { transform: translateX(-48%) rotate(3deg); } }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--white); border: var(--line); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); padding: 10px 16px; font-size: 16px; line-height: 1.35; max-width: 320px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.on { opacity: 1; transform: none; }
.tip b { font-weight: 900; }
.tip .mono { font-size: 14px; }
.error-line { position: absolute; z-index: 12; left: var(--edge); bottom: 16px; font-size: 16px; font-weight: 700; background: var(--white); border-radius: 10px; padding: 6px 12px; display: none; }
.error-line.on { display: block; }
/* ---------- sections ---------- */
.wrap { width: min(var(--container), 100% - 2 * var(--edge)); margin: 0 auto; }
section.block { padding: var(--s7) 0 var(--s6); }
.head { margin-bottom: var(--s5); }
.head h2 { font: 400 48px/1 var(--display); margin: 0; }
.head p { margin: 12px 0 0; font-size: 19px; max-width: 46em; }
.lawn { background: var(--grass); border-top: var(--line); }
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--s5); align-items: start; }
.feed { list-style: none; margin: 0; padding: 8px 12px; }
.feed li { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 12px 16px; border-bottom: 2px solid rgba(29,29,31,.14); min-height: 64px; }
.feed li:last-child { border-bottom: 0; }
.feed canvas, .feed .ico { width: 48px; height: 40px; }
.feed .what { font-weight: 800; }
.feed .what small { display: block; font-weight: 600; font-size: 16px; color: var(--muted); }
.feed .tx { font-size: 16px; text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.feed .tx:hover { background: rgba(255,255,255,.7); }
.feed li.event .what { color: var(--red); }
.feed li.new { animation: rowin .5s ease-out; }
@keyframes rowin { from { background: rgba(255,255,255,.8); } to { background: transparent; } }
.potcard h3 { font: 400 30px/1.1 var(--display); margin: 0 0 8px; }
.potcard .big { font: 400 56px/1 var(--display); margin: 8px 0; }
.potcard img { width: 160px; margin: 0 0 8px; }
.potcard dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 16px 0 0; font-size: 17px; }
.potcard dt { color: var(--muted); font-weight: 700; }
.potcard dd { margin: 0; font-weight: 900; text-align: right; }
.note { font-size: 16px; color: var(--muted); font-weight: 600; margin-top: 16px; }

/* album */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.shot { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.shot .pic { position: relative; height: 300px; background: var(--sky) url("/img/yard-tall.webp") center bottom / cover; border-bottom: var(--line); }
.shot .pic canvas { width: 100%; height: 100%; display: block; }
.shot .body { padding: 22px 28px 26px; }
.shot h3 { font: 400 28px/1.05 var(--display); margin: 0; }
.shot .kind { display: inline-block; margin-top: 10px; font-weight: 900; font-size: 16px; padding: 8px 16px; border-radius: 8px; border: 2px solid var(--ink); background: var(--white); }
.shot .kind.fall { background: #ffd9dc; }
.shot .kind.ceiling { background: #fff1b8; }
.shot dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 14px 0 0; font-size: 16px; }
.shot dt { color: var(--muted); font-weight: 700; }
.shot dd { margin: 0; font-weight: 900; text-align: right; }
.shot .memo { margin-top: 12px; font-size: 16px; overflow-wrap: anywhere; color: var(--muted); }
.shot .open { margin-top: 16px; min-height: 48px; font-size: 17px; width: 100%; }

/* climb: the whole tower, scrolled from the dog up; the sky deepens as it goes up */
body.climbing { background: linear-gradient(to top, var(--sky) 0, var(--sky) 900px, #4aa6ea 100%); background-attachment: scroll; }
.climb { position: relative; }
.climb .stage { position: relative; min-height: 100vh; }
.climb .ground { position: absolute; left: 0; right: 0; bottom: 0; height: max(calc(100vw * .5625 * .36), 300px); background: url("/img/yard-wide-2.webp") center bottom / max(100vw, 533px) auto no-repeat; }
.climb .dog { left: 50%; bottom: 3vh; }
canvas.climbcanvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 5; }
.climbhead { position: fixed; z-index: 20; top: 96px; left: var(--edge); width: 380px; padding: 28px 32px; }
.climbhead h1 { font: 400 40px/1 var(--display); margin: 0; }
.climbhead p { margin: 10px 0 0; font-size: 17px; }
.climbhead .stat { font: 400 30px/1 var(--display); }
.climbhead .note .recorded { margin-right: 8px; }

/* docs */
.doc { max-width: 860px; }
.doc h2 { font: 400 40px/1.05 var(--display); margin: var(--s6) 0 var(--s2); }
.doc p, .doc li { font-size: 18px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 18px; margin: 8px 0 0; }
.doc th, .doc td { text-align: left; padding: 14px 18px; border-bottom: 2px solid rgba(29,29,31,.15); }
.doc th { font-weight: 900; }
.doc code { font-family: var(--mono); font-size: 16px; font-weight: 600; color: #123a5c; overflow-wrap: anywhere; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin-top: var(--s3); }
.step { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.step .pic { height: 260px; border-bottom: var(--line); background: var(--sky) url("/img/yard-tall.webp") center bottom / cover; position: relative; }
.step .pic canvas { width: 100%; height: 100%; display: block; }
.step .body { padding: 24px 32px 28px; }
.step h3 { font: 400 26px/1.05 var(--display); margin: 0 0 8px; }
.step p { margin: 0; font-size: 17px; }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: var(--s3); }
.gallery figure { margin: 0; text-align: center; background: var(--white); border: 2px solid var(--ink); border-radius: 12px; padding: 12px 16px; }
.gallery canvas { width: 100%; height: 56px; }
.gallery figcaption { font-size: 16px; font-weight: 700; line-height: 1.15; min-height: 2.3em; }
.sizes { display: flex; align-items: flex-end; gap: 24px; margin-top: var(--s3); flex-wrap: wrap; }
.sizes figure { margin: 0; text-align: center; }
.sizes canvas { display: block; margin: 0 auto 6px; }
.sizes figcaption { font-weight: 800; font-size: 16px; }
.page { padding-top: 120px; padding-bottom: var(--s7); }
.page h1 { font: 400 72px/.95 var(--display); margin: 0; text-shadow: 4px 4px 0 var(--white), 6px 6px 0 var(--ink); }
.page .sub { font-size: 20px; margin: 18px 0 0; max-width: 40em; }

/* recount */
.result { margin-top: var(--s4); }
.result .row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.result .big { font: 400 44px/1 var(--display); }
.match { font-weight: 900; font-size: 20px; margin-top: 12px; }
.match.ok { color: #1f7a31; }
.match.bad { color: var(--red-dark); }
.progress { height: 18px; border: var(--line); border-radius: 999px; background: var(--white); overflow: hidden; margin-top: 16px; }
.progress i { display: block; height: 100%; width: 0; background: var(--grass); transition: width .2s; }

/* modal (album snapshot) */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(29,29,31,.45); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.on { display: flex; }
.modal .card { width: min(720px, 100%); max-height: calc(100vh - 48px); overflow: auto; position: relative; }
.modal .pic { height: min(62vh, 640px); border: var(--line); border-radius: 14px; background: var(--sky) url("/img/yard-tall.webp") center bottom / cover; overflow: auto; position: relative; }
.modal .close { position: absolute; top: 14px; right: 14px; min-height: 48px; min-width: 48px; padding: 0 16px; }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; background: var(--sky) url("/img/yard-wide-2.webp") center bottom / cover no-repeat; position: relative; display: grid; place-items: start center; padding-top: 12vh; text-align: center; }
.lost h1 { font: 400 clamp(64px, 9vw, 128px)/.9 var(--display); margin: 0; text-shadow: 5px 5px 0 var(--white), 8px 8px 0 var(--ink); }
.lost p { font-size: 20px; font-weight: 700; margin: 16px 0 24px; }
.lost .dog { left: 50%; width: min(300px, 60vw); bottom: 3%; }

@media (max-width: 1100px) {
  :root { --edge: 32px; }
  .copy { width: min(520px, 50vw); }
  .cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  :root { --edge: 20px; }
  body { font-size: 17px; }
  .nav { top: 16px; gap: 2px; left: 12px; }
  .nav a { font-size: 17px; padding: 8px 10px; }
  .nav a[aria-current="page"] { background: none; box-shadow: none; text-decoration: underline 3px; text-underline-offset: 6px; }
  .nav .home img { width: 36px; height: 36px; }
  .head h2 { font-size: 38px; }
  .page h1 { font-size: 52px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .climbhead { top: 72px; left: 12px; right: 12px; width: auto; padding: 14px 18px; }
  .climbhead h1 { font-size: 30px; }
  .climbhead p { font-size: 16px; }
  .feed li { grid-template-columns: 40px 1fr; }
  .feed li .tx { grid-column: 2; justify-self: start; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .dog.shaking { animation: none; } * { transition: none !important; } }
.gallery.colours { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 760px) { .gallery.colours { grid-template-columns: repeat(3, 1fr); } }
/* the 404 copy sits in the calm left sky, the dog on the lawn to its right */
.lost { place-items: start; padding: 18vh var(--edge) 0; text-align: left; }
.lost .dog { left: 64%; }
@media (max-width: 760px) { .lost { place-items: start center; text-align: center; } .lost .dog { left: 50%; } }
@media (max-width: 370px) { .nav .home { display: none; } .nav a { padding: 8px 8px; font-size: 16px; } }

/* ================= the first screen =================
   One container (--hero-l .. --hero-r, set by js/home.js from min(1600px, 100% - 2 x edge)): the name and the
   cream panel on its left edge, the post + board group on its right edge, the dog between them. */
.recorded, .chip { display: inline-block; background: var(--fur); color: var(--ink); font: 900 16px/1 var(--text); padding: 9px 16px 10px; border: var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); letter-spacing: .02em; }
.tip .mono { font-size: 16px; }
.yard { position: relative; height: 100vh; height: 100svh; min-height: 640px; max-height: 1100px; overflow: hidden; background: var(--sky) url("/img/yard-wide-2.webp") center bottom / cover no-repeat; }
.scene { position: absolute; inset: 0; }
.yard canvas.tower { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 120px); mask-image: linear-gradient(to bottom, transparent 0, #000 120px); }
.nav { left: var(--hero-l, var(--edge)); }
.nav a { transition: background .12s, transform .12s; }
.nav a:active { transform: translateY(2px); }
.copy { position: absolute; z-index: 10; left: var(--hero-l, var(--edge)); top: 96px; width: var(--copy-w, 560px); }
.name { font: 400 clamp(56px, 5.4vw, 96px)/1 var(--display); margin: 0; white-space: nowrap; color: var(--ink); -webkit-text-stroke: 10px var(--white); paint-order: stroke fill; filter: drop-shadow(5px 5px 0 var(--ink)); }
.panel { margin-top: 22px; padding: 24px 28px; }
.headline { margin: 0; font: 900 24px/1.25 var(--text); }
.headline em { font-style: normal; color: var(--red); }
.lead { margin: 12px 0 0; font-size: 18px; color: #1d2a36; }
.lead b { font-weight: 900; }
.actions { display: flex; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.contract { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 10px 10px 10px 20px; background: var(--white); border: var(--line); border-radius: 14px; }
.contract .lbl { font-weight: 900; font-size: 16px; }
.contract .addr { flex: 1; min-width: 0; font-size: 16px; overflow-wrap: anywhere; line-height: 1.3; }
.contract .addr.wait { font-family: var(--text); font-weight: 700; color: var(--muted); }
.contract .btn { min-height: 48px; font-size: 17px; box-shadow: 3px 3px 0 var(--ink); }
.contract .btn:active { box-shadow: 0 0 0 var(--ink); transform: translate(3px, 3px); }

/* collar tags: three links on the collar (the CA lives in the panel) */
.tags { position: absolute; z-index: 7; display: flex; gap: 6px; transform: translateX(-50%); }
.tag { position: relative; display: block; width: var(--tag-w, 54px); height: calc(var(--tag-w, 54px) * 1.38); border: 0; padding: 0; background: url("/img/tag.webp") center top / contain no-repeat; cursor: pointer; transform-origin: 50% 6px; transition: transform .16s ease-out, filter .16s; filter: drop-shadow(2px 2px 0 rgba(29,29,31,.45)); }
.tag:nth-child(1) { transform: rotate(-7deg); }
.tag:nth-child(3) { transform: rotate(7deg); }
.tag:hover, .tag:focus-visible { transform: rotate(0) translateY(3px) scale(1.06); filter: drop-shadow(3px 3px 0 var(--ink)); }
.tag:active { transform: translateY(5px) scale(.98); }
.tag:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 50%; }
.tag img { position: absolute; left: 50%; top: 61%; width: 52%; height: 52%; transform: translate(-50%, -50%); object-fit: contain; }
.tag[aria-disabled="true"] { cursor: default; }
.tag .cap { display: none; }
.mtags { display: none; }
.headline.m { display: none; }

/* the right group: the post (pennant 1000, a marker at the tower's height) and the board beside it */
.post { position: absolute; z-index: 6; bottom: 2.5%; height: var(--post-h, 78%); pointer-events: none; }
.post img { height: 100%; width: auto; display: block; }
.post .thousand { position: absolute; left: 61%; top: 9%; transform: translate(-50%, -50%) rotate(-4deg); font: 400 34px/1 var(--display); color: var(--white); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; }
.post .marker { position: absolute; left: 15%; bottom: var(--at, 2%); width: 34px; height: 14px; margin-left: -17px; background: var(--red); border: 3px solid var(--ink); border-radius: 8px; transition: bottom .6s cubic-bezier(.2,.8,.2,1); }
.board { position: absolute; z-index: 8; bottom: 3.5%; width: var(--board-w, 210px); display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.board .chip { align-self: flex-start; }
.board .count { padding: 30px 32px 26px; display: flex; flex-direction: column; gap: 6px; }
.board .count b { font: 400 48px/1 var(--display); }
.board .count span { font-weight: 800; font-size: 16px; white-space: nowrap; }
.board .potc { padding: 14px 20px; display: flex; align-items: center; gap: 12px; }
.board .potc img { width: 52px; height: auto; flex: none; }
.board .potc span { font-size: 16px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.board .potc span b { display: block; font: 400 20px/1.1 var(--display); white-space: nowrap; }

/* phones and portrait tablets: the name, the yard with the dog and its tower, then the panel */
@media (max-width: 900px) {
  .yard { height: auto; max-height: none; min-height: 0; background: var(--sky); display: flex; flex-direction: column; overflow: visible; }
  .copy { display: contents; }
  .name { order: 1; margin: 88px var(--edge) 0; font-size: clamp(44px, 13vw, 72px); white-space: normal; -webkit-text-stroke: 7px var(--white); filter: drop-shadow(4px 4px 0 var(--ink)); }
  .scene { order: 3; position: relative; height: 78svh; min-height: 560px; margin-top: 20px; background: url("/img/yard-tall.webp") center bottom / cover no-repeat; overflow: hidden; }
  .panel { order: 4; margin: 20px var(--edge) 24px; padding: 22px 20px; }
  .headline { font-size: 22px; }
  .headline.d { display: none; }
  .headline.m { display: block; order: 2; margin: 18px var(--edge) 0; }
  .scene::before { content: ""; position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 48px; background: linear-gradient(var(--sky), rgba(125,205,253,0)); pointer-events: none; }
  .lead { font-size: 17px; }
  .actions .btn { flex: 1 1 auto; font-size: 18px; }
  .tags.desk { display: none; }
  .mtags { display: flex; gap: 28px; margin-top: 22px; justify-content: flex-start; }
  .mtags .tag { --tag-w: 60px; transform: none; }
  .mtags .mt { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .mtags .mt > .cap { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; }
  .post { --post-h: 70%; }
  .post .thousand { font-size: 26px; -webkit-text-stroke: 6px var(--ink); }
  .board { --board-w: 150px; gap: 8px; }
  .board .count { padding: 26px 32px 22px; }
  .board .count b { font-size: 36px; }
  .board .potc { padding: 12px 16px; }
  .board .potc img { width: 40px; }
  .board .potc { gap: 8px; }
  .board .potc span { white-space: normal; }
}
@media (max-width: 370px) { .mtags { gap: 14px; } .mtags .tag { --tag-w: 54px; } }
