/* Zealyen Infotech - pencil sketch theme. No external fonts or trackers. */
:root {
  --paper: #fbf8f1;
  --paper-2: #f3eee1;
  --ink: #2b2b2b;
  --graphite: #4a4a4a;
  --pencil: #8d8a82;
  --line: #d9d3c2;
  --green: #7ed9b4;
  --green-ink: #137a58;
  --yellow: #ffe58a;
  --blue: #bcd9f5;
  --pink: #f9c5c5;
  --hand: "Segoe Print", "Bradley Hand", "Chilanka", "Comic Neue", "Comic Sans MS", "Marker Felt", cursive;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wobble: 255px 14px 225px 14px / 14px 225px 14px 255px;
  --wobble-2: 14px 225px 14px 255px / 255px 14px 225px 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 17px/1.65 var(--body);
  background-color: var(--paper);
  /* faint notebook lines */
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(120, 150, 190, .13) 31px 32px);
}
/* paper grain / pencil noise */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg { max-width: 100%; }
a { color: var(--green-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { background: var(--yellow); }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }

h1, h2, h3, .hand { font-family: var(--hand); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }

/* marker highlight + hand underline */
.hl { background: linear-gradient(transparent 58%, var(--yellow) 58% 92%, transparent 92%); padding: 0 .15em; }
.hl-green { background: linear-gradient(transparent 58%, var(--green) 58% 92%, transparent 92%); padding: 0 .15em; }
.scribble { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'><path d='M1 5 C 15 1, 25 8, 40 4 S 70 1, 99 5' fill='none' stroke='%232b2b2b' stroke-width='2.2' stroke-linecap='round'/></svg>") bottom / 100% 8px no-repeat; padding-bottom: 8px; }

/* ---------- header / footer ---------- */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--hand); font-weight: 700; font-size: 1.5rem; }
.brand:hover { background: none; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: var(--wobble); border: 2px solid transparent; font-family: var(--hand); font-weight: 700; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--ink); background: transparent; }
.nav a[aria-current="page"] { background: var(--yellow); }

.site-footer { margin-top: 70px; padding: 28px 0 40px; border-top: 3px dashed var(--pencil); background: var(--paper-2); }
.site-footer .wrap { display: grid; gap: 16px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { font-family: var(--hand); margin: 0 0 8px; font-size: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.site-footer small { color: var(--graphite); display: block; margin-top: 8px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- sketch boxes, buttons ---------- */
.card {
  position: relative; background: #fffdf7; border: 2.5px solid var(--ink); border-radius: var(--wobble);
  padding: 22px 24px; box-shadow: 6px 7px 0 -2px var(--line);
}
.card.alt { border-radius: var(--wobble-2); }
.tilt-l { transform: rotate(-.7deg); } .tilt-r { transform: rotate(.7deg); }
.tape::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 92px; height: 26px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 229, 138, .8); border: 1.5px dashed rgba(0, 0, 0, .25);
}
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; color: var(--ink); background: var(--green);
  border: 2.5px solid var(--ink); border-radius: var(--wobble); text-decoration: none; cursor: pointer;
  font: 700 1.1rem var(--hand); box-shadow: 4px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { background: var(--green); transform: translate(2px, 2px); box-shadow: 2px 3px 0 var(--ink); }
.btn.plain { background: #fffdf7; }
.btn.danger { background: var(--pink); }
.btn svg { width: 22px; height: 22px; }

.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } .tilt-l, .tilt-r { transform: none; } }

.chip { display: inline-block; margin: 4px 6px 4px 0; padding: 4px 14px; font: 700 .95rem var(--hand); border: 2px solid var(--ink); border-radius: var(--wobble); background: #fffdf7; }
.chip:nth-child(3n+1) { background: var(--blue); } .chip:nth-child(3n+2) { background: var(--green); } .chip:nth-child(3n) { background: var(--pink); }

/* ---------- landing ---------- */
.hero { padding: 30px 0 20px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero p.lead { font-size: 1.2rem; color: var(--graphite); max-width: 34em; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.badge-note { font-size: .9rem; color: var(--graphite); margin-top: 14px; }
.section { padding: 54px 0 0; }
.section > .wrap > h2, .section > .narrow > h2 { text-align: center; }
.sub { text-align: center; color: var(--graphite); max-width: 36em; margin: -6px auto 28px; }
.icon-box { width: 56px; height: 56px; margin-bottom: 8px; }
.steps { counter-reset: step; }
.steps .card::after {
  counter-increment: step; content: counter(step); position: absolute; top: -18px; left: -14px; width: 42px; height: 42px;
  display: grid; place-items: center; font: 700 1.4rem var(--hand); background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%;
}
code, kbd { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { background: #fffdf7; border: 2px dashed var(--pencil); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1em; }
pre code { background: none; border: 0; padding: 0; }
details { border: 2px solid var(--ink); border-radius: var(--wobble); background: #fffdf7; padding: 12px 18px; margin-bottom: 12px; }
summary { cursor: pointer; font: 700 1.1rem var(--hand); }
details[open] summary { margin-bottom: 8px; }

/* ---------- legal / document pages ---------- */
.doc-head { padding: 24px 0 8px; text-align: center; }
.doc-head p { color: var(--graphite); }
.doc { padding: 30px clamp(18px, 4vw, 44px) 36px; }
.doc h2 { font-size: 1.55rem; margin-top: 1.8em; padding-bottom: .15em; border-bottom: 2px dashed var(--pencil); }
.doc h2:first-of-type { margin-top: .4em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin: .3em 0; }
.toc { background: var(--paper-2); border: 2px dashed var(--pencil); border-radius: 12px; padding: 14px 20px; margin: 0 0 8px; }
.toc ol { columns: 2; column-gap: 28px; margin: 6px 0 0; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.toc a { text-decoration: none; }
.note { background: var(--yellow); border: 2px solid var(--ink); border-radius: var(--wobble); padding: 12px 18px; margin: 0 0 1.2em; }
.note.green { background: #d9f5e8; } .note.blue { background: #e3effb; } .note.pink { background: #fde3e3; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fffdf7; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border: 1.5px solid var(--pencil); }
th { background: var(--paper-2); font-family: var(--hand); }
.updated { font: 700 .95rem var(--hand); color: var(--graphite); }
.allcaps { text-transform: uppercase; font-size: .9em; letter-spacing: .01em; }

/* checklist (deletion page) */
.checks { list-style: none; padding: 0 !important; }
.checks li { position: relative; padding-left: 38px; margin: .7em 0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 24px; height: 24px; border: 2.5px solid var(--ink); border-radius: 6px 3px 7px 3px;
  background: #fffdf7 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 13 L10 19 L21 5' fill='none' stroke='%23137a58' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 80% no-repeat;
}
.checks.cross li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 5 L19 19 M19 5 L5 19' fill='none' stroke='%23b03030' stroke-width='3.4' stroke-linecap='round'/></svg>");
}

@media print {
  body::before, .site-header, .site-footer { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }


/* =====================================================================
   Additions for the Zealyen PHP website (forms, alerts, dialogs, tabs,
   gallery, certificate result). Same pencil-sketch language as above.
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden], .is-hidden { display: none !important; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.brand img { width: 40px; height: 40px; }
.site-footer .cert-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.site-footer .cert-row img { height: 58px; width: auto; background: #fffdf7; border: 2px solid var(--ink); border-radius: 10px; padding: 4px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: block; }
.field > .field-label, .reg-label { display: block; margin-bottom: 6px; font: 700 1.02rem var(--hand); }
.field input, .field select, .field textarea, .reg-control {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--ink); background: #fffdf7;
  border: 2.5px solid var(--ink); border-radius: 14px 10px 16px 9px / 10px 14px 9px 16px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .reg-control:focus { outline: 3px dashed var(--ink); outline-offset: 2px; background: #fff; }
.field input.is-invalid { background: #fde3e3; }
.invalid-msg { margin-top: 6px; color: #b03030; font-weight: 700; }
.hint { font-size: .9rem; color: var(--graphite); }
.check-row { display: flex; gap: 12px; align-items: flex-start; }
.check-row input { width: 22px; height: 22px; margin-top: 4px; flex: 0 0 auto; accent-color: var(--green-ink); }

/* alerts (also the class names the registration script writes) */
.alert-success-box, .alert-error-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border: 2.5px solid var(--ink); border-radius: var(--wobble); font-weight: 600; }
.alert-success-box { background: #d9f5e8; }
.alert-error-box { background: #fde3e3; }

/* ---------- registration ---------- */
.step-heading { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; font: 700 1.35rem var(--hand); }
.step-badge { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; font: 700 1.1rem var(--hand); }
.duration-fee-chip { display: none; margin-left: 8px; padding: 0 10px; align-items: center; background: var(--green); border: 2px solid var(--ink); border-radius: var(--wobble); font: 700 .9rem var(--hand); }
.fee-display-box { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 16px 20px; background: #e3effb; border: 2.5px solid var(--ink); border-radius: var(--wobble-2); }
.fee-display-left { display: flex; align-items: center; gap: 14px; }
.fee-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; font: 700 1.3rem var(--hand); }
.fee-amount { font: 700 2rem var(--hand); line-height: 1.1; }
.fee-label, .fee-hint { color: var(--graphite); font-size: .95rem; }
.pay-btn { width: 100%; justify-content: center; padding: 16px 24px; font-size: 1.25rem; }
.pay-btn:disabled { opacity: .6; cursor: not-allowed; }
.pay-secure-note { margin: 14px 0 8px; text-align: center; font-size: .9rem; color: var(--graphite); }
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pay-method-chip { padding: 3px 12px; background: #fffdf7; border: 2px solid var(--ink); border-radius: var(--wobble); font: 700 .9rem var(--hand); }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-ink); font: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { background: var(--yellow); }

/* ---------- dialog ---------- */
dialog { max-width: min(620px, 92vw); padding: 26px 28px; color: var(--ink); background: #fffdf7; border: 2.5px solid var(--ink); border-radius: var(--wobble); box-shadow: 8px 9px 0 -2px var(--line); }
dialog::backdrop { background: rgba(43, 43, 43, .45); }
dialog h3 { margin-top: 0; }

/* ---------- filter tabs (events, career) ---------- */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 28px; padding: 0; list-style: none; }
.tab-btn { padding: 6px 18px; color: var(--ink); background: #fffdf7; border: 2.5px solid var(--ink); border-radius: var(--wobble); font: 700 1rem var(--hand); cursor: pointer; }
.tab-btn.is-active { background: var(--yellow); }

/* ---------- content blocks ---------- */
.stat { text-align: center; }
.stat .num { margin: 0; font: 700 2.4rem var(--hand); line-height: 1.1; }
.stat p:last-child { margin: 6px 0 0; }
.quote .stars { margin: 0 0 6px; font: 700 1.1rem var(--hand); letter-spacing: 3px; }
.quote p { font-size: 1rem; }
.who { margin: 0; font-weight: 700; }
.who small { display: block; font-weight: 400; color: var(--graphite); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 3px dashed var(--pencil); }
.timeline li { position: relative; margin: 0 0 26px; }
.timeline li::before { content: ""; position: absolute; left: -36px; top: .35em; width: 18px; height: 18px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; }
.timeline .year { font: 700 1.3rem var(--hand); }
.event-card img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 10px; }
.event-card .meta { margin: 10px 0 0; }
.event-card h3 { margin: 4px 0; }
.big-404 { font-size: clamp(4rem, 16vw, 8rem); margin: 0; line-height: 1; }

/* ---------- certificate verification ---------- */
.result-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 14px; }
.result-list dt { font: 700 1rem var(--hand); }
.result-list dd { margin: 0; word-break: break-word; }
.status-badge { display: inline-block; padding: 1px 12px; border: 2px solid var(--ink); border-radius: var(--wobble); font: 700 .95rem var(--hand); }
.status-completed { background: #d9f5e8; }
.status-working { background: #e3effb; }
.status-not-available { background: #fde3e3; }
.verify-steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 14px; padding: 0; list-style: none; }
.verify-steps li { padding: 2px 14px; background: #fffdf7; border: 2px solid var(--ink); border-radius: var(--wobble); font: 700 .95rem var(--hand); }
.verify-steps li.is-active { background: var(--yellow); }
.verify-steps li.is-done { background: var(--green); }
@media (max-width: 520px) { .result-list { grid-template-columns: 1fr; gap: 2px; } .result-list dd { margin-bottom: 8px; } }


/* 4-up grid (stats): 4 -> 2 -> 1 columns */
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid.cols-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- company logo (real artwork, transparent background) ---------- */
.brand img { width: auto; height: 46px; max-width: 100%; }
.site-footer .brand img { height: 40px; }
.brand:hover img { transform: rotate(-1deg); }

/* ---------- home hero ---------- */
.code-note {
  display: inline-block; margin: 4px 0 6px; padding: 12px 20px; transform: rotate(-1deg);
  font: 600 .98rem/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--ink);
  background: #fffdf7; border: 2.5px solid var(--ink); border-radius: var(--wobble-2); box-shadow: 5px 6px 0 -2px var(--line);
}
.code-note .kw { color: var(--green-ink); font-weight: 700; }
.code-note .cm { color: var(--pencil); font-weight: 400; }
.code-note small { display: block; margin-top: 6px; font: 700 .9rem var(--hand); color: var(--graphite); }
.mini-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.mini-stats > div { min-width: 104px; padding: 8px 16px; text-align: center; background: #fffdf7; border: 2.5px solid var(--ink); border-radius: var(--wobble); box-shadow: 4px 5px 0 -2px var(--line); }
.mini-stats > div:nth-child(1) { transform: rotate(-1.5deg); background: #d9f5e8; }
.mini-stats > div:nth-child(2) { transform: rotate(1deg); background: #e3effb; }
.mini-stats > div:nth-child(3) { transform: rotate(-.8deg); background: #fff3c4; }
.mini-stats strong { display: block; font: 700 1.6rem var(--hand); line-height: 1.1; }
.mini-stats span { font-size: .85rem; color: var(--graphite); }
@media (max-width: 600px) { .mini-stats > div, .code-note { transform: none; } }

/* =====================================================================
   MOTION - hand-drawn feel. Everything lives inside no-preference, so visitors who ask their
   system for reduced motion get the plain static page. Content never depends on JS to be visible:
   the "reveal" hidden state is only ever added by js/pencil.js itself.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* ----- keyframes ----- */
  @keyframes rise   { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
  @keyframes drop   { from { opacity: 0; translate: 0 -16px; } to { opacity: 1; translate: 0 0; } }
  @keyframes popin  { 0% { opacity: 0; scale: .9; } 65% { opacity: 1; scale: 1.03; } 100% { opacity: 1; scale: 1; } }
  @keyframes show   { to { opacity: 1; } }
  @keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
  @keyframes bob    { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
  @keyframes spin   { to { rotate: 360deg; } }
  @keyframes march  { to { stroke-dashoffset: var(--m, -14); } }
  @keyframes wave   { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
  @keyframes flick  { 0%, 86%, 100% { opacity: 1; scale: 1; } 90% { opacity: .35; scale: .92; } 94% { opacity: 1; scale: 1.08; } }
  @keyframes blink  { 50% { opacity: 0; } }
  @keyframes stampin { 0% { opacity: 0; scale: 1.9; rotate: -18deg; } 70% { opacity: 1; scale: .94; rotate: 3deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; } }
  @keyframes draw   { to { stroke-dashoffset: 0; } }
  @keyframes fillin { to { fill-opacity: 1; } }
  @keyframes type   { from { width: 0; } }
  @keyframes sweep  { from { background-size: 0 100%; } to { background-size: 100% 100%; } }
  @keyframes sweepS { from { background-size: 0 8px; } to { background-size: 100% 8px; } }
  @keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -9deg; } 55% { rotate: 7deg; } 80% { rotate: -3deg; } }
  @keyframes nudge  { 0%, 90%, 100% { rotate: 0deg; } 93% { rotate: -2.2deg; } 96% { rotate: 2deg; } 98% { rotate: -1deg; } }
  @keyframes bump   { 0% { scale: 1; } 40% { scale: 1.035; } 100% { scale: 1; } }

  /* ----- page load ----- */
  .site-header { animation: drop .6s cubic-bezier(.2, .8, .2, 1) both; }
  .hero > .wrap:first-child > div:first-child > * { animation: rise .75s cubic-bezier(.2, .8, .2, 1) both; }
  .hero > .wrap:first-child > div:first-child > :nth-child(1) { animation-delay: .10s; }
  .hero > .wrap:first-child > div:first-child > :nth-child(2) { animation-delay: .22s; }
  .hero > .wrap:first-child > div:first-child > :nth-child(3) { animation-delay: .34s; }
  .hero > .wrap:first-child > div:first-child > :nth-child(4) { animation-delay: .46s; }
  .hero > .wrap:first-child > div:first-child > :nth-child(5) { animation-delay: .58s; }
  .hero > .wrap:first-child > div:first-child > :nth-child(6) { animation-delay: .70s; }
  .hero > .wrap:first-child > div:first-child > :nth-child(7) { animation-delay: .82s; }
  .hero > .wrap:first-child > .card { animation: popin .8s cubic-bezier(.2, .8, .2, 1) .25s both, floaty 7s ease-in-out 1.4s infinite; }

  /* marker highlight and scribble underline get drawn on */
  .hero .hl, .hero .hl-green { background-repeat: no-repeat; animation: sweep .9s ease .75s both; }
  .hero .scribble { animation: sweepS .8s ease 1.2s both; }
  .hero .btn:not(.plain) { animation: nudge 7s ease-in-out 3s infinite; }

  /* ----- scroll reveal (classes are added by js/pencil.js only) ----- */
  .reveal { opacity: 0; translate: 0 26px; scale: .97; }
  .reveal.in {
    opacity: 1; translate: 0 0; scale: 1;
    transition: opacity .7s ease var(--dl, 0s), translate .8s cubic-bezier(.2, .8, .2, 1) var(--dl, 0s), scale .8s cubic-bezier(.2, .8, .2, 1) var(--dl, 0s);
  }
  .timeline li.reveal { translate: -26px 0; }
  .reveal .hl, .reveal .hl-green { background-repeat: no-repeat; background-size: 0 100%; }
  .reveal.in .hl, .reveal.in .hl-green { background-size: 100% 100%; transition: background-size .9s ease calc(var(--dl, 0s) + .35s); }
  .reveal .scribble { background-size: 0 8px; }
  .reveal.in .scribble { background-size: 100% 8px; transition: background-size .8s ease calc(var(--dl, 0s) + .35s); }
  .steps .card.reveal::after { scale: 0; }
  .steps .card.reveal.in::after { scale: 1; transition: scale .5s cubic-bezier(.2, 1.8, .4, 1) calc(var(--dl, 0s) + .4s); }

  /* ----- hover: cards lift off the page, icons wiggle, chips pop ----- */
  .grid > .card { transition: translate .25s ease, box-shadow .25s ease; }
  .grid > .card:hover { translate: 0 -7px; box-shadow: 9px 12px 0 -2px var(--line); }
  .card:hover > .icon-box { animation: wiggle .7s ease; }
  .chip { transition: rotate .2s ease, scale .2s ease; }
  .chip:hover { rotate: -3deg; scale: 1.07; }
  .nav a { transition: rotate .15s ease; }
  .nav a:hover { rotate: -1.5deg; }
  .brand img { transition: transform .2s ease; }
  .mini-stats > div { transition: translate .2s ease; }
  .mini-stats > div:hover { translate: 0 -4px; }

  /* ----- hero drawing: it sketches itself, then comes alive ----- */
  .js .sketch:not(.ready) { opacity: 0; animation: show .01s 1.6s forwards; }   /* safety net if JS never runs */
  .sketch .draw {
    stroke-dasharray: 1 2; stroke-dashoffset: 1.02; stroke-linecap: butt; fill-opacity: 0;
    animation: draw 1s cubic-bezier(.4, 0, .2, 1) var(--d, 0s) forwards, fillin .6s ease-out calc(var(--d, 0s) + .55s) forwards;
  }
  .sketch text { opacity: 0; animation: show .5s ease 1.5s forwards; }
  .sketch text.cl { animation: show .3s ease var(--t, 2s) forwards; }
  .sketch .flow { opacity: 0; animation: show .5s ease 1.7s forwards, march 1.4s linear 1.7s infinite; }
  .sketch .bob { animation: bob 4.5s ease-in-out infinite; }
  .sketch .bob.b2 { animation-duration: 5.5s; animation-delay: -1.5s; }
  .sketch .spin { transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite; }
  .sketch .wave { opacity: .15; animation: wave 2.4s ease-in-out infinite; }
  .sketch .wave.w2 { animation-delay: .35s; }
  .sketch .wave.w3 { animation-delay: .7s; }
  .sketch .flick { transform-box: fill-box; transform-origin: center; animation: flick 4s ease-in-out infinite; }
  .sketch .stampin { transform-box: fill-box; transform-origin: center; opacity: 0; animation: stampin .6s cubic-bezier(.2, 1.4, .4, 1) 2.1s forwards; }
  .sketch .cursor { opacity: 0; animation: show .2s ease 3.4s forwards; }

  /* ----- motto types itself out ----- */
  .code-note .tl { display: block; overflow: hidden; white-space: pre; width: calc(var(--n, 10) * 1ch + 2px); animation: type var(--dur, .6s) steps(var(--n, 10), end) var(--dl, 0s) both; }
  .code-note .caret { display: inline-block; width: .6ch; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; background: var(--green-ink); animation: blink 1s steps(1) infinite; }

  /* ----- results, tabs, filters, fee box ----- */
  .event-card.pop { animation: popin .4s ease both; }
  #verifyResult:not([hidden]) { animation: popin .45s ease both; }
  #successState:not([hidden]) .status-badge { animation: stampin .5s cubic-bezier(.2, 1.4, .4, 1) .25s both; }
  .fee-display-box.bump { animation: bump .5s ease; }
  .verify-steps li { transition: background-color .3s ease, scale .3s ease; }
  .verify-steps li.is-active { scale: 1.06; }
}


/* motto lines stack as separate lines everywhere (the typing effect itself lives in the motion block) */
.code-note .tl { display: block; white-space: pre; }
.code-note .caret { display: inline-block; width: .6ch; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; background: var(--green-ink); }


/* ---------- breadcrumbs ---------- */
.crumbs { padding-top: 2px; font-size: .92rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "\203A"; margin: 0 8px; color: var(--pencil); font-weight: 700; }
.crumbs a { color: var(--graphite); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- footer: four columns on wide screens ---------- */
.site-footer .wrap { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer address small { margin-top: 6px; }

/* ---------- home hero: balanced columns ---------- */
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.16; }
.hero > .wrap:first-child { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 860px) { .hero > .wrap:first-child { grid-template-columns: 1fr; } }
.hero .wrap.hero-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 44px; margin-top: 40px; }
.hero-strip .code-note { margin: 0; }
.hero-strip .mini-stats { margin-top: 0; }
@media (max-width: 860px) { .hero .wrap.hero-strip { justify-content: flex-start; margin-top: 28px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-strip { animation: rise .8s cubic-bezier(.2, .8, .2, 1) .8s both; }
}
/* ---------- apps & games ---------- */
.app-card { display: flex; flex-direction: column; }
.app-card .btn { align-self: flex-start; margin-top: auto; }
.app-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.app-head h3 { margin: 0 0 4px; font-size: 1.3rem; }
.app-head .chip { margin-top: 2px; }
.app-icon { width: 88px; height: 88px; flex: 0 0 auto; border: 2.5px solid var(--ink); border-radius: 20px; background: #fffdf7; box-shadow: 3px 4px 0 -1px var(--line); }
.app-pkg { margin: 12px 0 0; font: .8rem ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--graphite); word-break: break-all; }
.app-card .checks { margin-bottom: 18px; }
/* home-page strip */
.app-strip { grid-template-columns: repeat(5, 1fr); gap: 18px; }
.app-strip a.card { display: block; padding: 18px 12px 16px; text-align: center; text-decoration: none; color: var(--ink); }
.app-strip a.card:hover { background: #fffdf7; }
.app-strip img { display: block; width: 76px; height: 76px; margin: 0 auto 10px; border: 2.5px solid var(--ink); border-radius: 18px; }
.app-strip strong { display: block; font: 700 1.02rem/1.25 var(--hand); }
.app-strip small { display: block; margin-top: 4px; color: var(--graphite); }
@media (max-width: 900px) { .app-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .app-strip { grid-template-columns: repeat(2, 1fr); } }
/* ---------- hero, round 3: numbers on the first screen ---------- */
.hero .wrap.hero-strip { justify-content: center; }
.hero > .wrap:first-child .mini-stats { margin-top: 22px; }
@media (min-width: 861px) and (max-height: 760px) {
  .hero { padding-top: 6px; }
  .hero > .wrap:first-child h1 { margin-bottom: .3em; }
  .hero p.lead { margin-bottom: .6em; }
  .hero .cta-row { margin-top: 14px; }
  .hero > .wrap:first-child .mini-stats { margin-top: 16px; }
  .hero .mini-stats > div { padding: 5px 14px; }
}
/* very short windows (small laptops, 125% display scaling): keep the numbers on the first screen */
@media (min-width: 861px) and (max-height: 640px) {
  .hero > .wrap:first-child h1 { font-size: clamp(1.8rem, 3.2vw, 2.35rem); }
  .hero p.lead { font-size: 1.05rem; line-height: 1.5; }
  .hero > .wrap:first-child > div:first-child > p:first-child { margin-bottom: .5em; }
  .hero .cta-row .btn { padding: 9px 20px; font-size: 1rem; }
  .hero .mini-stats strong { font-size: 1.35rem; }
  .hero > .wrap:first-child .mini-stats { margin-top: 12px; }
}