/* ZEC KITTIES — shared styles
   The page background is the exact art background (#FDC903), so every cat
   sits directly on the page with no frame. UI borders are drawn with the
   same stepped, notched-corner pixel stroke the cats are drawn with. */

@font-face { font-family: "Pixelify"; src: url("fonts/PixelifySans.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("fonts/Rubik.woff") format("woff"); font-weight: 300 900; font-display: swap; }

:root {
  --sun: #FDC903;      /* page + art background */
  --sun-soft: #FFE680; /* hover wash, locked steps */
  --ink: #000000;
  --paper: #FFFFFF;
  --ginger: #F28C38;   /* from the Ginger fur trait */
  --mint: #2E9E5B;     /* done */
  --rose: #D92D20;     /* errors */
  --muted: #5C4A00;    /* secondary text on yellow */
  --muted-paper: #6B6B6B;
  --px: 3px;
  --display: "Pixelify", system-ui, sans-serif;
  --body: "Rubik", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--sun);
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }
/* icons are inline SVG with no intrinsic box — never let them stretch to fill a flex parent */
svg { flex: none; }

/* ---------- pixel stroke ---------- */
.px {
  --b: var(--px);
  --c: var(--ink);
  box-shadow:
    0 calc(-1 * var(--b)) 0 0 var(--c),
    0 var(--b) 0 0 var(--c),
    calc(-1 * var(--b)) 0 0 0 var(--c),
    var(--b) 0 0 0 var(--c);
}
.px-2 { --b: 2px; }

:focus-visible { outline: 3px solid var(--ginger); outline-offset: 6px; }

/* ---------- layout ---------- */
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
main { flex: 1; }

.nav { padding: 20px 0; }
.nav .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand span { font: 700 24px/1 var(--display); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font: 600 18px/1 var(--display);
  text-decoration: none;
  padding: 10px 12px;
  position: relative;
}
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--ink);
}
.nav-links a:hover { background: var(--sun-soft); }
.nav-links .dot-admin { display: inline-block; width: 7px; height: 7px; background: var(--ginger); margin-left: 6px; vertical-align: 3px; }
.nav-x { display: grid; place-items: center; width: 40px; height: 40px; }
.nav-x:hover { background: var(--sun-soft); }
.nav-x svg { width: 20px; height: 20px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.05; }
.display { font-size: clamp(56px, 9vw, 104px); letter-spacing: -0.01em; }
h2 { font-size: 32px; }
h3 { font-size: 22px; }
.lede { font-size: 19px; max-width: 34ch; color: var(--muted); margin: 16px 0 0; }
.small { font-size: 14px; }
.muted { color: var(--muted-paper); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- panel ---------- */
.panel { background: var(--paper); margin: var(--px); padding: 28px; }
.panel + .panel { margin-top: 24px; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--px); --c: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; margin: var(--px);
  border: 0; background: var(--ink); color: var(--sun);
  font: 600 19px/1 var(--display); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow:
    0 calc(-1 * var(--b)) 0 0 var(--c), 0 var(--b) 0 0 var(--c),
    calc(-1 * var(--b)) 0 0 0 var(--c), var(--b) 0 0 0 var(--c);
}
.btn:hover { background: var(--ginger); color: var(--ink); }
.btn:active { transform: translateY(2px); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--sun-soft); color: var(--muted); cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--sun-soft); }
.btn.done { background: var(--mint); color: var(--paper); cursor: default; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 16px; }
.btn.block { width: calc(100% - 2 * var(--px)); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .spin { width: 16px; height: 16px; background: currentColor; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-size: 14px; }

/* ---------- inputs ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted-paper); margin: 0; }
.field .err { font-size: 14px; color: var(--rose); margin: 0; }
.input, select.input, textarea.input {
  --b: 2px; --c: var(--ink);
  width: calc(100% - 4px); margin: 2px; padding: 12px 14px; border: 0; background: var(--paper);
  box-shadow: 0 -2px 0 0 var(--c), 0 2px 0 0 var(--c), -2px 0 0 0 var(--c), 2px 0 0 0 var(--c);
  font-size: 16px; border-radius: 0; appearance: none;
}
.input:focus { outline: none; --c: var(--ginger); box-shadow: 0 -3px 0 0 var(--ginger), 0 3px 0 0 var(--ginger), -3px 0 0 0 var(--ginger), 3px 0 0 0 var(--ginger); }
.input.bad { --c: var(--rose); box-shadow: 0 -2px 0 0 var(--rose), 0 2px 0 0 var(--rose), -2px 0 0 0 var(--rose), 2px 0 0 0 var(--rose); }
.input.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.5; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { width: 44px; height: 24px; background: var(--paper); position: relative; margin: 2px; flex: none;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink); }
.toggle .track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: var(--ink); transition: left .12s steps(3); }
.toggle input:checked + .track { background: var(--mint); }
.toggle input:checked + .track::after { left: 24px; background: var(--paper); }
.toggle input:focus-visible + .track { outline: 3px solid var(--ginger); outline-offset: 4px; }

/* pill */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 2px; background: var(--paper);
  font: 600 15px/1 var(--display);
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink); }
.pill .dot { width: 8px; height: 8px; background: currentColor; }
.pill.live { background: var(--mint); color: var(--paper); }
.pill.live .dot { animation: blink 1s steps(2) infinite; }
.pill.soon { background: var(--sun-soft); }
.pill.off { background: var(--ink); color: var(--sun); }

/* avatar */
.ava { width: 40px; height: 40px; flex: none; background: var(--sun-soft); object-fit: cover; margin: 2px;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink); }
.ava.lg { width: 56px; height: 56px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal .panel { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; position: relative; }
.modal .close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.modal .close:hover { background: var(--sun-soft); }
.modal[open-anim] .panel { animation: pop .18s steps(3); }
@keyframes pop { from { transform: scale(.92); } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--sun);
  padding: 12px 18px; font: 600 16px/1.2 var(--display); max-width: calc(100% - 40px); }
.toast.bad { background: var(--rose); color: var(--paper); }

/* ---------- footer: cats standing on the bottom edge ---------- */
.fence { margin-top: 72px; overflow: hidden; }
.fence .row { display: flex; justify-content: center; gap: 0; }
.fence img { width: 112px; height: 112px; flex: none; margin-bottom: -2px; }
.fence .ground { height: 3px; background: var(--ink); }
.foot { background: var(--ink); color: var(--sun); padding: 18px 0; font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--sun); }

.demo-bar { background: var(--ink); color: var(--sun); text-align: center; font-size: 13px; padding: 6px 12px; }

@media (max-width: 720px) {
  .nav .wrap { flex-wrap: wrap; gap: 8px; }
  .brand span { font-size: 20px; }
  .nav-links { order: 3; width: 100%; }
  .nav-links a { font-size: 17px; padding: 10px 8px; }
  .panel { padding: 20px; }
  .fence img { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
