/* stay. — the stay kennel club house style
   paper: manila record cards. ink: typewriter. red: the trainer's pen.
   buttons are dog tags. nothing is round except the dog. */

:root {
  --paper: #efe5cc;
  --paper-2: #e5d7b4;
  --card: #f7f0dd;
  --ink: #1b1915;
  --ink-2: #4a443a;
  --red: #c5302a;
  --blue: #1d4b8f;
  --brass: #d1a33a;
  --grass: #4d6a2e;
  --rule: rgba(27, 25, 21, .14);
  --rule-blue: rgba(29, 75, 143, .16);
  --slab: 'Alfa Slab One', 'Rockwell', Georgia, serif;
  --type: 'Courier Prime', 'Courier New', monospace;
  --pen: 'Reenie Beanie', 'Bradley Hand', cursive;
  --gut: 16px;
  --max: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--type);
  overflow-x: hidden;
}
/* faint paper grain so it never reads as flat screen beige */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--brass); color: var(--ink); }
:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
@media (min-width: 760px) { :root { --gut: 32px; } }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
h1, h2, h3, .slab { font-family: var(--slab); font-weight: 400; letter-spacing: -.01em; line-height: .95; margin: 0; }
h1 { font-size: clamp(64px, 14vw, 188px); }
h2 { font-size: clamp(40px, 7vw, 84px); }
h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.05; }
p { margin: 0 0 1em; }
.kicker { font: 700 13px/1.2 var(--type); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }
.kicker b { color: var(--red); }
.pen { font-family: var(--pen); color: var(--red); font-size: 1.7em; line-height: .9; font-weight: 400; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.lower { text-transform: lowercase; }

/* ---------- dog tags (buttons) ---------- */
.tag {
  --tag-bg: var(--ink); --tag-fg: var(--paper);
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 20px 10px 34px;
  background: var(--tag-bg); color: var(--tag-fg);
  font: 700 15px/1 var(--type); text-transform: lowercase; letter-spacing: .02em; text-decoration: none;
  border: 0; cursor: pointer;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  transition: transform .15s ease, background .15s ease;
}
/* the punched hole the ring goes through */
.tag::before {
  content: ''; position: absolute; left: 13px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  background: var(--paper); border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
}
.tag:hover { transform: translateY(-2px) rotate(-1.2deg); }
.tag:active { transform: translateY(0) rotate(0); }
.tag.brass { --tag-bg: var(--brass); --tag-fg: var(--ink); }
.tag.red { --tag-bg: var(--red); --tag-fg: #fff6e8; }
.tag.blue { --tag-bg: var(--blue); --tag-fg: #f5efe0; }
.tag.paper { --tag-bg: var(--card); --tag-fg: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.tag.paper::before { background: var(--paper-2); }
.tag[aria-disabled="true"] { --tag-bg: var(--paper-2); --tag-fg: var(--ink-2); cursor: not-allowed; }
.tag[aria-disabled="true"]:hover { transform: none; }
.tag .arr { font-family: var(--slab); font-weight: 400; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }

/* the "next →" links: typed, with red pen underline */
.go { font: 700 15px var(--type); text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.go:hover { color: var(--red); border-color: var(--red); }

/* ---------- header ---------- */
.top { border-bottom: 3px solid var(--ink); background: var(--paper); }
.top .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 10px; }
.logo { font: 400 38px/1 var(--slab); text-decoration: none; display: inline-flex; align-items: baseline; }
.logo i { font-style: normal; color: var(--red); }
.top .right { display: flex; align-items: center; gap: 10px; }
.ticker { --tag-bg: var(--red); text-transform: none; min-height: 40px; padding: 8px 14px 8px 28px; font-size: 14px; }
.ticker::before { left: 10px; width: 7px; height: 7px; margin-top: -3.5px; }

/* nav = the class schedule. today's lesson is circled in red pen */
.nav { display: flex; flex-wrap: wrap; gap: 4px 2px; padding-top: 4px; padding-bottom: 10px; margin: 0; list-style: none; }
.nav a {
  position: relative; display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 12px; text-decoration: none; font: 700 15px/1 var(--type); text-transform: lowercase;
}
.nav a small { font-size: 11px; color: var(--ink-2); font-weight: 400; }
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"]::after {
  content: ''; position: absolute; inset: -2px -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44' preserveAspectRatio='none'%3E%3Cpath d='M14 8 C 44 1, 98 2, 112 14 C 122 26, 96 40, 58 41 C 22 42, 3 34, 6 21 C 8 12, 26 5, 44 4' fill='none' stroke='%23c5302a' stroke-width='2.4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
@media (max-width: 640px) {
  .logo { font-size: 32px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); padding-top: 6px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav li { flex: none; }
  .nav a { padding: 9px 10px; font-size: 14px; white-space: nowrap; }
  .phead .record { display: none; }
  .nav a small { display: none; }
}

/* ---------- sections ---------- */
.sec { padding: 60px 0; border-bottom: 3px solid var(--ink); }
@media (max-width: 640px) { .sec { padding: 44px 0; } }
.sec.tight { padding: 48px 0; }
.sec.ink { background: var(--ink); color: var(--paper); }
.sec.ink .kicker { color: #b9ad94; }
.sec.card { background: var(--card); }
.sec-head { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 40px; }
.sec-head .num { font: 700 13px var(--type); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
@media (min-width: 900px) { .sec-head { grid-template-columns: 1fr 1fr; align-items: end; } }

/* lined record card */
.record {
  background: var(--card) repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule-blue) 31px 32px);
  border: 2px solid var(--ink); position: relative; padding: 28px 22px 22px 56px;
  box-shadow: 6px 6px 0 var(--ink);
}
.record::before { content: ''; position: absolute; left: 38px; top: 0; bottom: 0; width: 2px; background: rgba(197, 48, 42, .55); }
@media (max-width: 520px) { .record { padding-left: 36px; } .record::before { left: 22px; } }

/* ---------- hero ---------- */
.hero { border-bottom: 3px solid var(--ink); overflow: hidden; }
.hero .grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding-top: 40px; padding-bottom: 36px; }
@media (min-width: 960px) { .hero .grid { grid-template-columns: 1.05fr 1fr; align-items: center; min-height: min(calc(100vh - 140px), 780px); } }
.hero h1 { margin: 10px 0 18px; display: flex; align-items: flex-start; }
.hero h1 .dot { color: var(--red); }
.hero .lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; margin-bottom: 26px; }
.hero .lede b { font-family: var(--slab); font-weight: 400; font-size: 1.25em; }

.ca {
  display: flex; align-items: stretch; max-width: 560px; margin-bottom: 18px;
  border: 2px solid var(--ink); background: var(--card);
}
.ca .lbl { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 10px var(--type); letter-spacing: .14em; text-transform: uppercase; padding: 8px 6px; border-left: 2px solid var(--ink); background: var(--paper-2); }
.ca code { flex: 1; min-width: 0; padding: 14px 14px; font: 700 14px/1.3 var(--type); overflow-wrap: anywhere; }
.ca button { border: 0; border-left: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 14px var(--type); padding: 0 18px; cursor: pointer; text-transform: lowercase; }
.ca button:hover { background: var(--red); }
.hero .after { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }

.stage { position: relative; min-height: 440px; overflow: hidden; padding-bottom: 6px; display: flex; flex-direction: column; justify-content: flex-end; }
.stage .dog { width: min(320px, 56%); margin: 0 auto; position: relative; z-index: 2; }
.stage .ground { position: absolute; left: -10%; right: -10%; bottom: 14px; height: 3px; background: var(--ink); z-index: 1; }
.stage .grass { position: absolute; left: 0; right: 0; bottom: 14px; height: 18px; z-index: 3; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='18'%3E%3Cpath d='M2 18 L5 8 L8 18 M14 18 L18 4 L20 18 M30 18 L33 9 L35 18 M44 18 L48 6 L50 18 M54 18 L56 11 L58 18' fill='none' stroke='%234d6a2e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x bottom; }
.cmd {
  position: absolute; z-index: 4; white-space: nowrap;
  font: 400 clamp(17px, 1.9vw, 24px)/1 var(--slab); text-transform: uppercase;
  padding: 7px 10px 6px; background: var(--card); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.cmd.red { background: var(--red); color: #fff4e6; }
.cmd.blue { background: var(--blue); color: #f5efe0; }
.note { position: absolute; z-index: 5; font-family: var(--pen); color: var(--red); font-size: 30px; line-height: .9; transform: rotate(-6deg); }
.note svg { display: inline; vertical-align: middle; }
.fig { font: italic 400 13px var(--type); color: var(--ink-2); text-align: right; margin-top: 6px; }

/* marquee of things he ignored */
.ignored { border-bottom: 3px solid var(--ink); background: var(--ink); color: var(--paper); overflow: hidden; }
.ignored .row { display: flex; gap: 32px; padding: 14px 0; width: max-content; animation: slide 40s linear infinite; font: 400 22px/1 var(--slab); text-transform: lowercase; }
.ignored .row span::after { content: '✕'; margin-left: 32px; color: var(--brass); font-family: var(--type); font-size: 18px; }
.ignored .row em { font-style: normal; color: var(--brass); }
@keyframes slide { to { transform: translateX(-50%); } }

/* report card */
.report { width: 100%; border-collapse: collapse; font-size: 16px; }
.report th { text-align: left; font: 700 12px var(--type); letter-spacing: .12em; text-transform: uppercase; padding: 0 10px 10px; border-bottom: 2px solid var(--ink); }
.report td { padding: 0 10px; height: 48px; border-bottom: 1px dashed var(--rule); vertical-align: middle; }
.report td:first-child { font-weight: 700; }
.report td.grade { font-family: var(--pen); color: var(--red); font-size: 34px; line-height: 1; width: 72px; text-align: center; }
@media (max-width: 560px) { .report .hide-s { display: none; } .report td, .report th { padding: 0 6px; } }

.two { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; gap: 56px; } }
.big-say { font: 400 clamp(56px, 10vw, 120px)/.9 var(--slab); margin: 18px 0; }
.big-say .dot { color: var(--red); }

/* roll call */
.roll { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 900px) { .roll { grid-template-columns: 1.1fr .9fr; } }
.clock { font: 400 clamp(56px, 11vw, 132px)/1 var(--slab); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.clock span { color: var(--brass); }
.roll-sheet { background: var(--card); color: var(--ink); border: 2px solid var(--paper); padding: 22px; transform: rotate(1.2deg); box-shadow: 8px 8px 0 var(--red); }
.roll-sheet ol { margin: 0; padding: 0; list-style: none; }
.roll-sheet li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--rule); }
.roll-sheet li b { width: 78px; flex: none; }

/* index cards (directory) */
.cards { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.icard {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 230px;
  padding: 44px 22px 22px; background: var(--card); border: 2px solid var(--ink); text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease;
}
.icard:nth-child(3n+2) { transform: rotate(.6deg); }
.icard:nth-child(3n) { transform: rotate(-.5deg); }
.icard:hover { transform: translate(-2px, -3px) rotate(-.8deg); box-shadow: 8px 9px 0 var(--red); }
.icard .tab { position: absolute; top: -2px; left: 18px; padding: 6px 12px; background: var(--ink); color: var(--paper); font: 700 11px var(--type); letter-spacing: .14em; text-transform: uppercase; }
.icard h3 { font-size: 30px; }
.icard p { margin: 0; font-size: 15px; }
.icard .more { margin-top: auto; font-weight: 700; border-top: 1px dashed var(--rule); padding-top: 12px; display: flex; justify-content: space-between; }
.icard .more span { color: var(--red); }

/* steps (numbered like a training drill) */
.drill { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: d; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.drill > li { list-style: none; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 22px 0; border-bottom: 2px solid var(--ink); }
.drill > li::before { counter-increment: d; content: counter(d, decimal-leading-zero); font: 400 44px/1 var(--slab); color: var(--red); }
.drill h3 { margin-bottom: 6px; }
.drill p { margin: 0; }
@media (min-width: 900px) { .drill.cols { grid-template-columns: repeat(5, 1fr); border-top: 0; gap: 0; } .drill.cols > li { grid-template-columns: 1fr; border: 2px solid var(--ink); border-right-width: 0; padding: 22px 18px; } .drill.cols > li:last-child { border-right-width: 2px; } }
.sec.ink .drill, .sec.ink .drill > li { border-color: var(--paper); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border: 2px solid var(--ink); background: var(--card); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 18px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.stat:nth-child(2n) { border-right: 0; }
@media (min-width: 800px) { .stat { border-bottom: 0; } .stat:nth-child(2n) { border-right: 2px solid var(--ink); } .stat:last-child { border-right: 0; } }
.stat .k { font: 700 11px var(--type); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.stat .v { font: 400 clamp(24px, 3vw, 34px)/1.1 var(--slab); margin-top: 6px; overflow-wrap: anywhere; }

/* tables (receipts) */
.table-wrap { overflow-x: auto; border: 2px solid var(--ink); background: var(--card); }
.receipts { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.receipts th, .receipts td { text-align: left; padding: 11px 14px; border-bottom: 1px dashed var(--rule); white-space: nowrap; }
.receipts th { font: 700 11px var(--type); letter-spacing: .12em; text-transform: uppercase; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.receipts a { color: var(--blue); font-weight: 700; }
.receipts .empty td { white-space: normal; text-align: center; padding: 34px 16px; }

/* stamp */
.stamp {
  display: inline-block; font: 400 22px/1 var(--slab); text-transform: uppercase; color: var(--red);
  border: 3px solid var(--red); padding: 8px 12px 6px; transform: rotate(-7deg); letter-spacing: .04em;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.6'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.6'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp.blue { color: var(--blue); border-color: var(--blue); }

/* forms (the tools) */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .lbl { font: 700 12px var(--type); letter-spacing: .12em; text-transform: uppercase; }
.field input[type=text], .field input[type=number], .field input[type=date], .field select, .field textarea {
  width: 100%; font: 700 16px var(--type); color: var(--ink); background: var(--card);
  border: 0; border-bottom: 2px solid var(--ink); padding: 10px 2px; border-radius: 0; appearance: none;
}
.field textarea { border: 2px solid var(--ink); padding: 10px; min-height: 84px; resize: vertical; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.field .hint { font-size: 13px; color: var(--ink-2); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices button {
  font: 700 14px var(--type); text-transform: lowercase; padding: 9px 12px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 2px solid var(--ink);
}
.choices button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--red); }
.swatch { width: 40px; height: 40px; padding: 0 !important; }

.tool { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
@media (min-width: 960px) { .tool { grid-template-columns: 380px 1fr; } }
.tool .preview { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); background: var(--card); }
.tool .preview canvas { width: 100%; height: auto; }
.tool .status { font-size: 14px; color: var(--ink-2); margin-top: 12px; }

/* manual (docs) */
.manual { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 980px) { .manual { grid-template-columns: 250px 1fr; } }
.toc { position: sticky; top: 16px; align-self: start; border: 2px solid var(--ink); background: var(--card); padding: 18px; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; }
.toc a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 7px 0; text-decoration: none; border-bottom: 1px dashed var(--rule); font-weight: 700; font-size: 15px; }
.toc a span { color: var(--red); }
.toc a:hover { color: var(--red); }
@media (max-width: 979px) { .toc { position: static; } .toc ol { columns: 2; column-gap: 18px; } .toc a { break-inside: avoid; } }
.chapter { padding: 8px 0 52px; margin-bottom: 52px; border-bottom: 3px double var(--ink); scroll-margin-top: 20px; }
.chapter:last-child { border-bottom: 0; }
.chapter .ch { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.chapter .ch .n { font: 400 clamp(84px, 12vw, 140px)/.8 var(--slab); color: var(--red); }
.chapter .ch h2 { font-size: clamp(34px, 5vw, 56px); padding-bottom: 6px; }
.chapter .ch .pg { margin-left: auto; font: 700 12px var(--type); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; }
.prose { max-width: 68ch; }
.prose p, .prose li { font-size: 17px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code { font-weight: 700; background: var(--paper-2); padding: 1px 5px; overflow-wrap: anywhere; }
.margin { font-family: var(--pen); color: var(--red); font-size: 30px; line-height: .95; margin: 18px 0; transform: rotate(-1.5deg); }
.spec { width: 100%; max-width: 560px; border-collapse: collapse; margin: 18px 0; border: 2px solid var(--ink); background: var(--card); }
.spec th, .spec td { text-align: left; padding: 10px 14px; border-bottom: 1px dashed var(--rule); font-size: 15px; vertical-align: top; }
.spec th { width: 38%; font: 700 12px var(--type); letter-spacing: .1em; text-transform: uppercase; }
.warn { border: 3px solid var(--red); padding: 16px 18px; background: #f6e2d0; font-weight: 700; max-width: 68ch; }
.warn::before { content: 'warning — '; color: var(--red); font-family: var(--slab); font-weight: 400; }
details.q { border-bottom: 1px dashed var(--rule); max-width: 68ch; }
details.q summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; display: flex; gap: 12px; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::before { content: 'Q.'; color: var(--red); font-family: var(--slab); font-weight: 400; }
details.q[open] summary::before { content: 'A.'; }
details.q p { padding: 0 0 14px 34px; margin: 0; }

/* lines you tap to copy */
.lines { display: flex; flex-wrap: wrap; gap: 8px; }
.lines button { font: 400 20px/1 var(--slab); text-transform: lowercase; background: var(--card); border: 2px solid var(--ink); padding: 10px 14px 9px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.lines button:hover { background: var(--brass); }
.lines button.copied { background: var(--ink); color: var(--paper); }

/* creed */
.creed { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.creed li { counter-increment: c; font: 400 clamp(26px, 4vw, 46px)/1.1 var(--slab); padding: 12px 0; border-bottom: 1px dashed rgba(239,229,204,.25); display: flex; gap: 18px; }
.creed li::before { content: counter(c) '.'; font: 700 16px var(--type); color: var(--brass); padding-top: .6em; min-width: 28px; }

/* footer */
.foot { background: var(--ink); color: var(--paper); padding: 48px 0 28px; }
.foot .cols { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 820px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot .logo { font-size: 64px; color: var(--paper); }
.foot h4 { margin: 0 0 10px; font: 700 12px var(--type); letter-spacing: .14em; text-transform: uppercase; color: #b9ad94; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li a { display: inline-block; padding: 5px 0; text-decoration: none; font-weight: 700; }
.foot li a:hover { color: var(--brass); }
.foot .fine { margin-top: 36px; padding-top: 18px; border-top: 1px dashed rgba(239,229,204,.25); font-size: 13px; color: #b9ad94; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* page heads for inner pages */
.phead { padding: 48px 0 40px; border-bottom: 3px solid var(--ink); }
.phead .grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: end; }
@media (min-width: 900px) { .phead .grid { grid-template-columns: 1.3fr .7fr; } }
.phead h1 { font-size: clamp(56px, 10vw, 128px); margin: 10px 0 16px; }
.phead p.lede { font-size: clamp(18px, 2vw, 21px); max-width: 52ch; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); font: 700 15px var(--type); padding: 12px 18px; border: 2px solid var(--brass); z-index: 100; transition: transform .25s ease; }
.toast.on { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.pfp-grid { grid-template-columns: 1fr 1fr; }
@media (min-width: 1000px) { .pfp-grid { grid-template-columns: repeat(4, 1fr); } }
.pfp-grid .icard { padding: 40px 14px 14px; gap: 12px; }
.pfp-grid .tag { font-size: 13px; padding-right: 12px; }
@media (max-width: 520px) { .pfp-grid .tag { font-size: 12px; padding: 8px 8px 8px 28px; } .pfp-grid .tag::before { left: 10px; } }

/* ---------- the noticeboard (cork, pinned panels) ---------- */
.board {
  display: grid; grid-template-columns: 1fr; gap: 30px 26px; padding: 34px 22px;
  background-color: #b8864f;
  background-image: radial-gradient(rgba(60, 30, 5, .22) 1px, transparent 1.6px), radial-gradient(rgba(255, 240, 210, .18) 1px, transparent 1.6px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
  border: 12px solid #6b4423; box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--ink), inset 0 6px 18px rgba(0,0,0,.3);
}
@media (min-width: 560px) { .board { grid-template-columns: 1fr 1fr; padding: 40px 30px; } }
@media (min-width: 1000px) { .board { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 560px) { .board .pin.big { grid-column: span 2; grid-row: span 2; } }
.pin { position: relative; margin: 0; background: var(--card); padding: 10px 10px 12px; box-shadow: 4px 6px 0 rgba(27, 25, 21, .45); transform: rotate(-.8deg); align-self: start; }
.pin:nth-child(3n+2) { transform: rotate(.9deg); }
.pin:nth-child(4n) { transform: rotate(-.3deg); }
.pin::before { content: ''; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f08a80 0 3px, var(--red) 4px); border: 2px solid var(--ink); z-index: 2; }
.pin:nth-child(3n)::before { background: radial-gradient(circle at 35% 35%, #9bb7e6 0 3px, var(--blue) 4px); }
.pin:nth-child(5n+1)::before { background: radial-gradient(circle at 35% 35%, #f3dc9a 0 3px, var(--brass) 4px); }
.pin .frame { position: relative; border: 2px solid var(--ink); overflow: hidden; }
.pin .frame svg { width: 100%; height: auto; display: block; }
.pin figcaption { font: 700 14px/1.4 var(--type); margin-top: 10px; }
.pin.big figcaption { font-size: 17px; }
.pin .kind { display: inline-block; background: var(--ink); color: var(--paper); font: 700 10px/1 var(--type); letter-spacing: .12em; text-transform: uppercase; padding: 4px 6px 3px; margin-right: 8px; vertical-align: 2px; }
.pin[data-kind="clip"] .kind { background: var(--red); }
.pin[data-kind="gif"] .kind { background: var(--blue); }
.pin figcaption { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-start; justify-content: space-between; }
.pin figcaption > span { flex: 1 1 150px; }
.pctl {
  flex: none; cursor: pointer; margin-top: -2px;
  font: 700 13px/1 var(--type); text-transform: lowercase; color: var(--ink); background: var(--card);
  border: 0; padding: 9px 12px; box-shadow: inset 0 0 0 2px var(--ink);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.pctl.play { background: var(--brass); box-shadow: none; padding: 10px 14px; }
.pin.big .pctl.play { font-size: 17px; padding: 13px 20px; }
.pctl:hover { background: var(--ink); color: var(--paper); }
.board-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* panel animations. they only run while a panel is .running */
.a-fetch { transform: translate(150px, 337px); }
.a-roll, .a-bell, .a-pop, .a-burst, .a-bub, .dog-tail, .dog-head, .dog-ear-r { transform-box: fill-box; }
.a-roll, .a-pop, .a-burst { transform-origin: center; }
.a-bub { transform-origin: 50% 100%; }
.a-bell { transform-origin: 50% 0; }
.dog-tail { transform-origin: 0% 85%; }
.dog-ear-r { transform-origin: 20% 5%; }
.running .a-fetch { animation: fetch 3.4s cubic-bezier(.4, 0, .6, 1) infinite; }
.running .a-roll { animation: spin .7s linear infinite; }
.running .a-pat { animation: pat .55s ease-in-out infinite; }
.running.p-goodboy .dog-head { animation: dip .55s ease-in-out infinite; }
.running .a-bell { animation: ring .22s ease-in-out infinite alternate; }
.running .a-pop { animation: pop 1.6s ease-out infinite; }
.running.p-doorbell .dog-ear-r { animation: twitch 1.6s ease-in-out infinite; }
.running.p-tail .dog-tail { animation: wag .32s ease-in-out infinite alternate; }
.running .a-burst { animation: burst 2.1s ease-out infinite both; }
.running .a-rain { animation: rain 2.6s linear infinite; }
.running .a-bub { animation: bub 3.6s ease-out infinite both; }
@keyframes fetch {
  0% { transform: translate(-60px, 80px); }
  26% { transform: translate(110px, 337px); }
  38% { transform: translate(160px, 262px); }
  52% { transform: translate(212px, 337px); }
  62% { transform: translate(250px, 310px); }
  72% { transform: translate(286px, 337px); }
  100% { transform: translate(470px, 337px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pat { 50% { transform: translateY(14px); } }
@keyframes dip { 50% { transform: translateY(5px) scaleY(.98); } }
@keyframes ring { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 18% { transform: scale(1.08); opacity: 1; } 30% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes twitch { 0%, 20%, 34%, 100% { transform: rotate(0); } 26% { transform: rotate(-9deg); } }
@keyframes wag { from { transform: rotate(-18deg); } to { transform: rotate(10deg); } }
@keyframes burst { 0% { transform: scale(0); opacity: 0; } 14% { transform: scale(1.1); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes rain { to { transform: translateY(400px); } }
@keyframes bub { 0% { transform: scale(0); } 9% { transform: scale(1.12); } 14% { transform: scale(1); } 86% { transform: scale(1); } 100% { transform: scale(0); } }

/* ---------- the pack ---------- */
.pack-dogs { width: 100%; height: auto; display: block; margin-top: 30px; }
.pack-dogs > svg { cursor: pointer; }
.pack-dogs > svg:hover .dog-tail, .pack-dogs > svg.wag .dog-tail { animation: wag .28s ease-in-out infinite alternate; }
/* tapped: the whole dog gets excited. hop, head tilt, ears flap, tongue out. */
.dog-all, .dog-ear-l, .dog-tongue { transform-box: fill-box; }
.dog-all { transform-origin: 50% 100%; }
.dog-head { transform-origin: 50% 92%; }
.dog-ear-l { transform-origin: 80% 5%; }
.dog-tongue { transform-origin: 50% 0; }
.wag .dog-all { animation: hop .62s cubic-bezier(.3, .7, .4, 1) 2; }
.wag .dog-head { animation: tilt 1.3s ease-in-out; }
.wag .dog-ear-l { animation: flap-l .2s ease-in-out 6 alternate; }
.wag .dog-ear-r { animation: flap-r .2s ease-in-out 6 alternate; }
.wag .dog-tongue { animation: tongue 1.3s ease-out both; }
@keyframes hop {
  0%, 100% { transform: none; }
  16% { transform: scale(1.07, .9); }
  46% { transform: translateY(-38px) scale(.95, 1.06); }
  74% { transform: translateY(0) scale(1.08, .9); }
}
@keyframes tilt { 0%, 100% { transform: none; } 18% { transform: rotate(-11deg); } 48% { transform: rotate(10deg); } 76% { transform: rotate(-4deg); } }
@keyframes flap-l { from { transform: rotate(0); } to { transform: rotate(16deg); } }
@keyframes flap-r { from { transform: rotate(0); } to { transform: rotate(-16deg); } }
@keyframes tongue { 0% { opacity: 1; transform: scaleY(0); } 16%, 82% { opacity: 1; transform: scaleY(1); } 100% { opacity: 1; transform: scaleY(0); } }
.pack-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.pack-lede { max-width: 58ch; margin: 18px auto 0; text-align: center; }

/* ---------- rooms (illustrated directory) ---------- */
.rooms { display: grid; grid-template-columns: 1fr; border: 3px solid var(--ink); background: var(--ink); gap: 3px; }
@media (min-width: 640px) { .rooms { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .rooms { grid-template-columns: repeat(3, 1fr); } }
.room { display: flex; flex-direction: column; padding: 16px 20px 18px; background: var(--paper); text-decoration: none; position: relative; transition: background .15s ease; }
.room:nth-child(even) { background: var(--card); }
.room:nth-child(4n+3) { background: #ead9ae; }
.room:hover { background: #f3e6c4; }
.room .no { font: 700 12px var(--type); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.room .art { display: grid; place-items: center; padding: 8px 0 10px; }
.room .art svg { width: 100%; max-width: 220px; height: auto; }
.room h3 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 6px; }
.room p { margin: 0 0 12px; font-size: 14px; max-width: 38ch; flex: 1; }
.room .go { align-self: flex-start; }
.room:hover .go { color: var(--red); border-color: var(--red); }
.room:hover .dog-tail { animation: wag .3s ease-in-out infinite alternate; }

/* sideways strips: the wall on home, and the rooms on phones */
.strip-wrap { position: relative; }
.board.strip { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 26px 26px; scrollbar-width: thin; scrollbar-color: var(--ink) #8a5f33; }
.board.strip .pin { flex: 0 0 min(280px, 74vw); scroll-snap-align: start; }
.board.strip .pin.big { flex-basis: min(400px, 82vw); }
.board.strip::-webkit-scrollbar { height: 10px; }
.board.strip::-webkit-scrollbar-track { background: #8a5f33; }
.board.strip::-webkit-scrollbar-thumb { background: var(--ink); }
.strip-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@media (max-width: 639px) {
  .rooms { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 3px; }
  .room { flex: 0 0 78vw; scroll-snap-align: start; }
}

/* pack + roll call, one section */
.together { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.roll-card { background: var(--ink); color: var(--paper); padding: 22px 24px; box-shadow: 8px 8px 0 var(--red); transform: rotate(1deg); }
.roll-card .kicker { color: #b9ad94; }
.roll-card .clock { font-size: clamp(48px, 6vw, 76px); margin-top: 8px; }
.pack-dogs { margin-top: 22px; }

/* tabs (kennel club) */
.tabbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 3px solid var(--ink); }
.tabbar .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 12px; scrollbar-width: none; }
.tabbar .wrap::-webkit-scrollbar { display: none; }
.tabbar button {
  flex: none; cursor: pointer; font: 700 15px/1 var(--type); text-transform: lowercase; color: var(--ink);
  background: var(--paper-2); border: 2px solid var(--ink); border-bottom: 0; padding: 12px 16px 11px; margin-bottom: -3px;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px);
}
.tabbar button small { color: var(--red); margin-right: 6px; font-size: 11px; }
.tabbar button[aria-selected="true"] { background: var(--card); padding-bottom: 14px; border-bottom: 3px solid var(--card); }
.tabpanel[hidden] { display: none; }

/* until the address is in config: no empty address boxes anywhere */
[data-noca] .ca, [data-noca] .needs-ca { display: none; }
[hidden] { display: none !important; }
