/* Naalai paper kit (art-ui, 3 Nov 2026). Shared cut-paper UI for every section: grounds, torn and cut section edges,
   paper cards, chips and tabs, sticky notes, paper phone and laptop frames, paper ticks, avatars, speech bubbles and
   the ten product moments (our own simplified paper cards; never copies of the app or the ERP).
   Linked on every page by scripts/build.py. Owned by art-ui; Round 2 readability fixes (pages agent, 3 Nov) are marked
   "Round 2" below and only stop awkward wraps; nothing was renamed or removed.
   Demo and HTML snippets: /lab/kit.html. Notes: docs/ART.md, "UI kit".

   Rules this file keeps:
   - real text, never pictures of text; every sample shows "Sample"; Kuru shows "Coming soon"; Finance "Planned";
     WhatsApp alerts "coming";
   - colour pairs pass WCAG AA (text on paper uses --ink / --ink-2; --ink-3 only on cream, card and lemon);
   - motion: transform and opacity only; UI eases on the critically damped spring (--m-spring from motion.css);
     paper "boil" steps on twos (12 updates a second) and stops under reduced motion;
   - no live filters on large surfaces: paper shadows are box-shadows or baked images.
   Product moments are sized in em: they read at 16 px on their own and scale with the phone or laptop screen. */

:root {
  --pk-spring: var(--m-spring, cubic-bezier(.16, 1, .3, 1));
  --pk-settle: var(--m-settle, cubic-bezier(.16, 1, .3, 1));
  /* hand-cut corners: no two alike */
  --pk-cut: 22px 26px 21px 25px / 25px 21px 26px 22px;
  --pk-cut-sm: 11px 13px 10px 12px / 12px 10px 13px 11px;
  --pk-cut-em: 1.2em 1.4em 1.15em 1.35em / 1.35em 1.15em 1.4em 1.2em;
  /* paper depth (warm and navy) */
  --pk-sh: 0 1px 1.5px rgba(90, 42, 0, .28), 0 10px 22px -12px rgba(90, 42, 0, .36);
  --pk-sh-sm: 0 1px 1px rgba(90, 42, 0, .24), 0 4px 8px -5px rgba(90, 42, 0, .32);
  --pk-sh-lift: 0 2px 3px rgba(90, 42, 0, .22), 0 26px 44px -20px rgba(90, 42, 0, .42);
  --pk-sh-navy: 0 1px 1.5px rgba(11, 26, 85, .34), 0 12px 24px -12px rgba(11, 26, 85, .42);
  --pk-edge-light: inset 0 1px 0 rgba(255, 255, 255, .78), inset 0 -1px 0 rgba(90, 42, 0, .05);
  --pk-tex-paper: url(/assets/art/textures/paper-tile.webp);
  --pk-tex-grain: url(/assets/art/textures/grain-tile.webp);
  --pk-tex-grain-soft: url(/assets/art/textures/grain-soft-tile.webp);
  --pk-tex-kraft: url(/assets/art/textures/kraft-tile.webp);
  --pk-tex-blue: url(/assets/art/textures/blue-paper-tile.webp);
  --pk-tex-night: url(/assets/art/textures/night-paper-tile.webp);
}

/* =====================================================================================================================
   1. Grounds: section backgrounds made of paper. Each sets the paper colour and texture as custom properties, so a
   .pk-edge inside the section picks up the same paper without being told.
   <section class="sec pk-ground pk-ground--sky"> ... </section>
   ===================================================================================================================== */
.pk-ground {
  --pk-c: var(--paper); --pk-tex: var(--pk-tex-paper); --pk-tex-size: 512px 512px; --pk-blend: normal;
  --pk-fg: var(--ink); --pk-fg-2: var(--ink-2); --pk-rim: #FFFFFF;
}
.pk-ground--cream, .pk-edge--cream { --pk-c: var(--paper); --pk-tex: var(--pk-tex-paper); --pk-tex-size: 512px 512px; --pk-blend: normal; --pk-fg: var(--ink); --pk-fg-2: var(--ink-2); --pk-rim: #FFFFFF; }
.pk-ground--sky, .pk-edge--sky { --pk-c: var(--sky); --pk-tex: var(--pk-tex-grain-soft); --pk-tex-size: 256px 256px; --pk-blend: multiply; --pk-fg: var(--ink); --pk-fg-2: var(--ink-2); --pk-rim: #F4F8FF; }
.pk-ground--mint, .pk-edge--mint { --pk-c: var(--mint); --pk-tex: var(--pk-tex-grain-soft); --pk-tex-size: 256px 256px; --pk-blend: multiply; --pk-fg: var(--ink); --pk-fg-2: var(--ink-2); --pk-rim: #F2FBF6; }
.pk-ground--sun, .pk-edge--sun { --pk-c: var(--sun); --pk-tex: var(--pk-tex-grain-soft); --pk-tex-size: 256px 256px; --pk-blend: multiply; --pk-fg: var(--ink); --pk-fg-2: #5A3A06; --pk-rim: #FFF1C2; }
.pk-ground--kraft, .pk-edge--kraft { --pk-c: var(--kraft); --pk-tex: var(--pk-tex-kraft); --pk-tex-size: 512px 512px; --pk-blend: normal; --pk-fg: var(--ink); --pk-fg-2: #57391A; --pk-rim: #F6E6C8; }
.pk-ground--blue, .pk-edge--blue { --pk-c: var(--blue); --pk-tex: var(--pk-tex-blue); --pk-tex-size: 512px 512px; --pk-blend: normal; --pk-fg: #FFFFFF; --pk-fg-2: #E3E9FF; --pk-rim: #9FB2F2; }
.pk-ground--night, .pk-edge--night { --pk-c: var(--night); --pk-tex: var(--pk-tex-night); --pk-tex-size: 512px 512px; --pk-blend: normal; --pk-fg: #FFFFFF; --pk-fg-2: #D3DBF7; --pk-rim: #4A5A96; }
.pk-ground { background: var(--pk-c) var(--pk-tex) 0 0 / var(--pk-tex-size); background-blend-mode: var(--pk-blend); color: var(--pk-fg); }
.pk-ground--blue :is(h1, h2, h3, h4), .pk-ground--night :is(h1, h2, h3, h4) { color: var(--pk-fg); }
.pk-ground--blue p, .pk-ground--night p { color: var(--pk-fg-2); }
.pk-ground--blue a:not([class]), .pk-ground--night a:not([class]) { color: var(--lemon); }
.pk-ground--blue :focus-visible, .pk-ground--night :focus-visible { outline-color: var(--lemon); }

/* =====================================================================================================================
   2. Section edges: the bottom of the upper sheet, cut or torn, with its soft shadow on the section below. Put it as
   the last child of the upper section (base .sec is position: relative). It hangs below the section, covers the
   top of the next one (keep its top padding at least --pk-edge-h) and repeats sideways without a seam.
   <div class="pk-edge" aria-hidden="true"></div>                      cut, in the section's own paper
   <div class="pk-edge pk-edge--torn pk-edge--sky" aria-hidden="true"></div>   torn, sky paper
   <div class="pk-edge pk-edge--top pk-edge--night" aria-hidden="true"></div>  at the TOP of a lower section that
                                                                                 should lie over the one above
   ===================================================================================================================== */
.pk-edge {
  --pk-edge-h: clamp(26px, 3.4vw, 48px);
  --pk-edge-mask: url(/assets/art/textures/edge-cut.svg);
  --pk-edge-shadow: url(/assets/art/textures/edge-cut-shadow.webp);
  position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: var(--pk-edge-h); z-index: 3; pointer-events: none;
  background: var(--pk-edge-shadow) 0 0 / auto 100% repeat-x;
}
.pk-edge::before, .pk-edge::after { content: ""; position: absolute; inset: 0;
  -webkit-mask: var(--pk-edge-mask) 0 0 / auto 100% repeat-x; mask: var(--pk-edge-mask) 0 0 / auto 100% repeat-x; }
.pk-edge::before { display: none; background: var(--pk-rim, #FFFFFF); }
.pk-edge::after { background: var(--pk-c, var(--paper)) var(--pk-tex, var(--pk-tex-paper)) 0 0 / var(--pk-tex-size, 512px 512px);
  background-blend-mode: var(--pk-blend, normal); }
.pk-edge--torn { --pk-edge-mask: url(/assets/art/textures/edge-torn.svg); --pk-edge-shadow: url(/assets/art/textures/edge-torn-shadow.webp); }
.pk-edge--torn::before { display: block; -webkit-mask-image: url(/assets/art/textures/edge-torn-rim.svg); mask-image: url(/assets/art/textures/edge-torn-rim.svg); }
.pk-edge--top { top: auto; bottom: calc(100% - 1px); --pk-edge-shadow: url(/assets/art/textures/edge-cut-shadow-up.webp); }
.pk-edge--top.pk-edge--torn { --pk-edge-shadow: url(/assets/art/textures/edge-torn-shadow-up.webp); }
.pk-edge--top::before, .pk-edge--top::after { transform: scaleY(-1); }
.pk-edge--flip::before, .pk-edge--flip::after { -webkit-mask-position: 37% 0; mask-position: 37% 0; } /* a different stretch of the same edge */
.pk-edge--flip { background-position: 37% 0; }

/* =====================================================================================================================
   3. Paper card. A sheet with grain, light on the cut edge and two shadows. Colour by modifier; tilt with --pk-tilt.
   <article class="pk-card pk-card--sky" style="--pk-tilt:-1deg"> ... </article>
   .pk-card--lift for a card that is a link or button: it rises on hover and presses on pointer-down.
   ===================================================================================================================== */
.pk-card {
  --pk-bg: var(--card); --pk-fg: var(--ink); --pk-fg-2: var(--ink-2); --pk-fg-3: var(--ink-3);
  position: relative; isolation: isolate; display: block; padding: var(--pk-pad, clamp(18px, 2.2vw, 26px));
  background: var(--pk-bg); color: var(--pk-fg); border-radius: var(--pk-cut);
  box-shadow: var(--pk-edge-light), var(--pk-sh); rotate: var(--pk-tilt, 0deg);
}
.pk-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--pk-tex-grain) 0 0 / 256px 256px; mix-blend-mode: multiply; opacity: .5; }
.pk-card--sky { --pk-bg: var(--sky); --pk-fg-3: var(--ink-2); }
.pk-card--mint { --pk-bg: var(--mint); --pk-fg-3: var(--ink-2); }
.pk-card--lemon { --pk-bg: var(--lemon); }
.pk-card--sun { --pk-bg: var(--sun); --pk-fg-2: #5A3A06; --pk-fg-3: #5A3A06; }
.pk-card--pink { --pk-bg: var(--pink); --pk-fg-3: var(--ink-2); }
.pk-card--kraft { --pk-bg: var(--kraft); --pk-fg-2: #57391A; --pk-fg-3: #57391A; }
.pk-card--paper { --pk-bg: var(--paper); }
.pk-card--blue { --pk-bg: var(--blue); --pk-fg: #FFFFFF; --pk-fg-2: #E3E9FF; --pk-fg-3: #D2DBFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--pk-sh-navy); }
.pk-card--night { --pk-bg: var(--night); --pk-fg: #FFFFFF; --pk-fg-2: #D3DBF7; --pk-fg-3: #C2CCF0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--pk-sh-navy); }
.pk-card--blue::after, .pk-card--night::after { mix-blend-mode: soft-light; opacity: .7; }
/* lift: the bigger shadow lives on its own layer and only changes opacity (transform + opacity only) */
.pk-card--lift { cursor: pointer; text-decoration: none; transition: translate var(--m-quick, 200ms) var(--pk-settle); }
.pk-card--lift::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; box-shadow: var(--pk-sh-lift);
  opacity: 0; transition: opacity 400ms var(--pk-settle); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .pk-card--lift:hover { translate: 0 -3px; }
  .pk-card--lift:hover::before { opacity: 1; }
}
.pk-card--lift:active { translate: 0 1px; transition-duration: var(--m-press, 100ms); }

/* text inside kit pieces */
.pk-title { font: 800 1.25em/1.15 var(--font-display); color: var(--pk-fg, var(--ink)); letter-spacing: -.005em; margin: 0; }
.pk-label { font: 800 .8em/1.2 var(--font-body); color: var(--pk-fg-2, var(--ink-2)); letter-spacing: .02em; margin: 0; }
.pk-meta { font: 600 .8em/1.35 var(--font-body); color: var(--pk-fg-3, var(--ink-3)); margin: 0; }
.pk-tag--plus { background: var(--sun); color: var(--ink); }

/* =====================================================================================================================
   4. Chips and tabs.
   <span class="pk-chip pk-chip--maths">Maths</span>
   <div class="pk-tabs" role="tablist" aria-label="..."><button class="pk-tab" role="tab" aria-selected="true"
     aria-controls="p1" id="t1">Diary</button>...</div><div class="pk-tabpanel" role="tabpanel" id="p1"
     aria-labelledby="t1">...</div>
   ===================================================================================================================== */
.pk-chip { --pk-chip-bg: var(--sky); --pk-chip-fg: var(--blue-deep);
  display: inline-flex; align-items: center; gap: .4em; min-height: 1.85em; padding: .2em .72em; vertical-align: middle;
  border-radius: .55em .7em .6em .5em / .62em .5em .7em .56em; background: var(--pk-chip-bg); color: var(--pk-chip-fg);
  font: 800 .8125em/1.1 var(--font-body); letter-spacing: .01em; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 0 rgba(90, 42, 0, .16), 0 .2em .4em -.25em rgba(90, 42, 0, .4); }
.pk-chip--maths { --pk-chip-bg: var(--sun); --pk-chip-fg: var(--ink); }
.pk-chip--english { --pk-chip-bg: var(--sky); --pk-chip-fg: var(--blue-deep); }
.pk-chip--tamil { --pk-chip-bg: var(--pink); --pk-chip-fg: #8A2440; }
.pk-chip--science { --pk-chip-bg: var(--mint); --pk-chip-fg: #1F6B3A; }
.pk-chip--art { --pk-chip-bg: var(--lemon); --pk-chip-fg: #7A4A10; }
.pk-chip--plain { --pk-chip-bg: var(--card); --pk-chip-fg: var(--ink-2); }
.pk-chip--ok { --pk-chip-bg: var(--mint); --pk-chip-fg: #1F6B3A; }
.pk-chip--no { --pk-chip-bg: #FFE0DC; --pk-chip-fg: #9A2B22; }
.pk-chip--late { --pk-chip-bg: var(--lemon); --pk-chip-fg: #7A4A10; }
.pk-chip--blue { --pk-chip-bg: var(--blue); --pk-chip-fg: #FFFFFF; }
.pk-chip > img, .pk-chip > svg { width: 1.3em; height: 1.3em; flex: none; }

.pk-tabs { display: flex; align-items: flex-end; gap: 6px; padding-inline: 14px; overflow-x: auto; scrollbar-width: none; }
.pk-tabs::-webkit-scrollbar { display: none; }
.pk-tab { appearance: none; border: 0; flex: none; position: relative; min-height: 46px; padding: 10px 18px 14px; margin-bottom: -6px;
  border-radius: 14px 17px 0 0 / 14px 16px 0 0; background: var(--paper-deep); color: var(--ink-2);
  font: 800 15.5px/1 var(--font-body); letter-spacing: .005em; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 3px -1px rgba(90, 42, 0, .22);
  translate: 0 6px; transition: translate 800ms var(--pk-spring), color var(--m-quick, 200ms) var(--pk-settle); }
.pk-tab:hover { translate: 0 2px; color: var(--ink); }
.pk-tab:active { translate: 0 5px; transition-duration: var(--m-press, 100ms); }
.pk-tab[aria-selected="true"] { z-index: 2; translate: 0 0; background: var(--card); color: var(--ink); }
.pk-tab:focus-visible { outline-offset: -3px; }
.pk-tab__dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--pk-tab-c, var(--sun)); box-shadow: 0 1px 0 rgba(90, 42, 0, .25); }
.pk-tabpanel { position: relative; z-index: 1; padding: clamp(18px, 2.4vw, 28px); background: var(--card); border-radius: 6px 24px 22px 26px / 6px 22px 26px 24px;
  box-shadow: var(--pk-edge-light), var(--pk-sh); }
.pk-tabpanel[hidden] { display: none; }

/* =====================================================================================================================
   5. Sticky note, tape and pin.
   <div class="pk-note pk-note--pink" style="--pk-tilt:2deg"><p>Bring 3 leaves!</p></div>
   ===================================================================================================================== */
.pk-note { --pk-bg: var(--lemon); position: relative; width: min(var(--pk-note-w, 230px), 100%); min-height: 9em; padding: 1.5em 1.2em 1.25em;
  background: linear-gradient(135deg, transparent 62%, rgba(90, 42, 0, .07)), var(--pk-bg);
  border-radius: 3px 4px 14px 3px / 3px 4px 6px 3px; rotate: var(--pk-tilt, -2deg);
  color: var(--ink); font: 700 1.1em/1.3 var(--font-display);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 1px rgba(90, 42, 0, .2), 6px 14px 16px -12px rgba(90, 42, 0, .45); }
.pk-note--pink { --pk-bg: var(--pink); }
.pk-note--mint { --pk-bg: var(--mint); }
.pk-note--sky { --pk-bg: var(--sky); }
/* washi tape: translucent paper with torn ends */
.pk-note::before, .pk-tape { content: ""; position: absolute; width: 5.4em; height: 1.55em; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%), rgba(250, 244, 230, .7);
  clip-path: polygon(0 9%, 4% 0, 96% 3%, 100% 14%, 97% 32%, 100% 51%, 96.5% 70%, 100% 88%, 95% 100%, 5% 97%, 0 86%, 3% 66%, 0 47%, 3.5% 28%); }
.pk-note::before { top: -.75em; left: 50%; translate: -50% 0; rotate: -3deg; }
.pk-tape { rotate: var(--pk-tilt, -4deg); }
.pk-pin { position: absolute; top: -.55em; left: 50%; width: 1.35em; height: 1.35em; translate: -50% 0; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 36% 32%, #FFD0CB 0 16%, transparent 17%), var(--coral);
  box-shadow: inset 0 -2px 0 rgba(150, 30, 20, .25), 0 1px 1px rgba(90, 42, 0, .35), 2px 5px 6px -2px rgba(90, 42, 0, .35); }

/* =====================================================================================================================
   6. Paper ticks. .pk-mark is a small round paper with a cut symbol (CSS mask), on or off. .pk-ticks is a list with
   paper tick bullets.
   <span class="pk-mark pk-mark--present is-on"><span class="sr-only">Present</span></span>
   ===================================================================================================================== */
.pk-mark { --pk-mark-c: var(--leaf-deep, #3E9A55); --pk-mark-sym: url(/assets/art/icons/mark-tick.svg); --pk-mark-ink: #FFFFFF;
  position: relative; display: inline-grid; place-items: center; flex: none; width: var(--pk-mark-size, 1.75em); height: var(--pk-mark-size, 1.75em);
  border-radius: 50%; background: var(--card); vertical-align: middle;
  box-shadow: inset 0 0 0 1.5px rgba(30, 42, 90, .16), 0 1px 0 rgba(255, 255, 255, .8); }
.pk-mark::after { content: ""; width: 64%; height: 64%; background: rgba(30, 42, 90, .26);
  -webkit-mask: var(--pk-mark-sym) center / contain no-repeat; mask: var(--pk-mark-sym) center / contain no-repeat; }
.pk-mark.is-on { background: var(--pk-mark-c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 1px rgba(90, 42, 0, .3), 0 .25em .4em -.2em rgba(90, 42, 0, .45); }
.pk-mark.is-on::after { background: var(--pk-mark-ink); }
.pk-mark--present { --pk-mark-c: #3E9A55; }
.pk-mark--absent { --pk-mark-c: #E5635A; --pk-mark-sym: url(/assets/art/icons/mark-cross.svg); }
.pk-mark--late { --pk-mark-c: var(--amber); --pk-mark-ink: var(--ink); --pk-mark-sym: url(/assets/art/icons/mark-late.svg); }
.pk-ticks { display: grid; gap: .7em; }
.pk-ticks > li { position: relative; padding-left: 2.1em; }
.pk-ticks > li::before { content: ""; position: absolute; left: 0; top: .02em; width: 1.5em; height: 1.5em; background: url(/assets/art/icons/tick.webp) center / contain no-repeat; }

/* =====================================================================================================================
   7. Icons. Inline SVG or <img src="/assets/art/icons/<name>.svg"> (crisp, tiny contact shadow drawn in) or the WebP
   (soft shadow baked: <img src="....webp" srcset="...@2x.webp 2x" width="64" height="64" alt="">).
   ===================================================================================================================== */
.pk-icon { display: inline-block; width: var(--pk-icon, 48px); height: var(--pk-icon, 48px); flex: none; vertical-align: middle; }
.pk-icon--lift { filter: drop-shadow(0 1px .8px rgba(90, 42, 0, .2)) drop-shadow(0 2.4px 2.6px rgba(90, 42, 0, .13)); } /* few at a time */

/* =====================================================================================================================
   8. People: avatars and speech bubbles.
   ===================================================================================================================== */
.pk-avatar { --pk-av: var(--sun); display: inline-grid; place-items: center; flex: none; width: 2.5em; height: 2.5em; border-radius: 50%;
  background: var(--pk-av); color: var(--ink); font: 800 1em/1 var(--font-display);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 1px rgba(90, 42, 0, .3), 0 .3em .5em -.3em rgba(90, 42, 0, .45); }
.pk-avatar--sky { --pk-av: var(--sky); }
.pk-avatar--mint { --pk-av: var(--mint); }
.pk-avatar--pink { --pk-av: var(--pink); }
.pk-avatar--blue { --pk-av: var(--blue); color: #fff; }
.pk-bubble { --pk-bub: var(--sky); position: relative; max-width: 30em; padding: .7em .95em .65em; background: var(--pk-bub); color: var(--ink);
  border-radius: 1.1em 1.25em 1.15em .3em / 1.2em 1.1em 1.25em .3em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 1px rgba(90, 42, 0, .22), 0 .5em .9em -.6em rgba(90, 42, 0, .45); }
.pk-bubble::after { content: ""; position: absolute; left: -.55em; bottom: 0; width: .85em; height: .9em; background: inherit;
  clip-path: polygon(100% 0, 100% 100%, 0 100%); border-bottom-left-radius: .2em; }
.pk-bubble p { margin: 0; }
.pk-bubble--me { --pk-bub: var(--lemon); border-radius: 1.25em 1.1em .3em 1.15em / 1.1em 1.2em .3em 1.25em; }
.pk-bubble--me::after { left: auto; right: -.55em; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.pk-bubble--kuru { --pk-bub: #E4F1FF; }

/* =====================================================================================================================
   9. Device frames cut from navy card. Content inside is real HTML; product moments scale with the frame.
   <div class="pk-phone" style="--pk-phone-w:300px"><div class="pk-phone__body"><div class="pk-phone__screen">
     <div class="pk-phone__status" aria-hidden="true"><span>8:15</span><i></i></div> ...content... </div></div></div>
   <div class="pk-laptop"><div class="pk-laptop__lid"><div class="pk-laptop__screen"> ... </div></div>
     <div class="pk-laptop__base" aria-hidden="true"></div></div>
   ===================================================================================================================== */
.pk-phone { position: relative; width: min(var(--pk-phone-w, 300px), 100%); aspect-ratio: 9 / 19.2; container-type: inline-size; flex: none; }
.pk-phone__body { position: absolute; inset: 0; padding: 3.4cqi; border-radius: 15cqi;
  background: var(--night) var(--pk-tex-night) 0 0 / 256px 256px;
  box-shadow: inset 0 0 0 .7cqi rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .22), var(--pk-sh-navy), 0 34px 60px -30px rgba(11, 26, 85, .55); }
.pk-phone__body::before, .pk-phone__body::after { content: ""; position: absolute; width: 1.6cqi; border-radius: 2px; background: #22305F; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.pk-phone__body::before { left: -1.2cqi; top: 25%; height: 11%; }
.pk-phone__body::after { right: -1.2cqi; top: 30%; height: 17%; }
.pk-phone__screen { position: relative; height: 100%; overflow: hidden; border-radius: 11.6cqi; container-type: inline-size;
  background: var(--paper) var(--pk-tex-paper) 0 0 / 512px 512px; font-size: 4.6cqi; line-height: 1.4; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(11, 26, 85, .25); }
.pk-phone__screen::before { content: ""; position: absolute; z-index: 5; top: 2.6cqi; left: 50%; width: 27cqi; height: 7.6cqi; translate: -50% 0; border-radius: 99px; background: var(--night); }
.pk-phone__status { display: flex; justify-content: space-between; align-items: center; height: 12.8cqi; padding: 1.2cqi 7.5cqi 0 8.5cqi;
  font: 800 3.9cqi/1 var(--font-body); color: var(--ink); }
.pk-phone__status i { width: 10cqi; height: 3.7cqi; border-radius: 1.2cqi; box-shadow: inset 0 0 0 .55cqi var(--ink); position: relative; }
.pk-phone__status i::after { content: ""; position: absolute; inset: .9cqi 2.4cqi .9cqi .9cqi; border-radius: .5cqi; background: var(--leaf); }
.pk-phone__app { display: flex; align-items: center; gap: .5em; padding: .2em 1.05em .6em; }
.pk-phone__app img { width: 2.1em; height: 2.1em; }
.pk-phone__app b { font: 800 1.05em/1 var(--font-display); }
.pk-phone__app span { margin-left: auto; }
.pk-phone__scroll { padding: 0 .8em 1em; }

.pk-laptop { width: min(var(--pk-laptop-w, 760px), 100%); container-type: inline-size; }
.pk-laptop__lid { position: relative; margin-inline: 6.5cqi; padding: 1.9cqi 1.9cqi 2.6cqi; border-radius: 3.2cqi 3.2cqi 1cqi 1cqi;
  background: var(--night) var(--pk-tex-night) 0 0 / 256px 256px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 .4cqi rgba(255, 255, 255, .05), var(--pk-sh-navy); }
.pk-laptop__lid::before { content: ""; position: absolute; top: .75cqi; left: 50%; width: .9cqi; height: .9cqi; translate: -50% 0; border-radius: 50%; background: #2E3C70; }
.pk-laptop__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: .9cqi; container-type: inline-size;
  background: var(--paper) var(--pk-tex-paper) 0 0 / 512px 512px; color: var(--ink); font-size: clamp(9px, 1.75cqi, 15px); line-height: 1.4; }
.pk-laptop__base { position: relative; height: 2.6cqi; border-radius: .4cqi .4cqi 3cqi 3cqi / .4cqi .4cqi 2.6cqi 2.6cqi;
  background: linear-gradient(#E6EAF3, #C3CCDD 70%, #A9B4CA); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 18px 26px -14px rgba(11, 26, 85, .5); }
.pk-laptop__base::before { content: ""; position: absolute; top: 0; left: 50%; width: 15cqi; height: 1cqi; translate: -50% 0; border-radius: 0 0 1cqi 1cqi; background: #A3AEC6; box-shadow: inset 0 1px 1px rgba(11, 26, 85, .2); }

/* =====================================================================================================================
   10. Product moments (all sample data, all our own drawing). Each is one article; inner sizes are em.
   ===================================================================================================================== */
.pk-moment { font-size: var(--pk-fs, 1rem); line-height: 1.45; color: var(--ink); text-align: left; }
.pk-moment p { margin: 0; }
.pk-moment :is(p, li) { text-wrap: pretty; }
.pk-moment :is(.pk-head b, .pk-alert__title, .pk-post__title, .pk-notice__title) { text-wrap: balance; } /* Round 2: no orphan words in titles */
.pk-moment img { display: inline-block; vertical-align: middle; }
.pk-moment .tag { height: auto; min-height: 1.75em; padding: .25em .7em; font-size: max(11px, .75em); white-space: nowrap; } /* honesty labels stay legible */
.pk-moment.pk-card { --pk-pad: 1.15em 1.2em 1.2em; }
.pk-head { display: flex; align-items: center; gap: .65em; }
.pk-head > div { min-width: 0; flex: 1; }
.pk-head b { display: block; font: 800 1em/1.2 var(--font-display); }
.pk-head .tag { align-self: flex-start; }
.pk-head > img { width: 2.6em; height: 2.6em; flex: none; }
.pk-slip { position: relative; padding: .75em .85em; border-radius: .7em .85em .75em .6em / .78em .6em .85em .7em; background: var(--pk-slip, var(--paper));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 0 rgba(90, 42, 0, .14), 0 .35em .65em -.45em rgba(90, 42, 0, .4); }
.pk-perf { height: 4px; margin-block: .2em; background: radial-gradient(circle, rgba(30, 42, 90, .2) 1.3px, transparent 1.7px) 0 50% / 9px 4px repeat-x; }

/* (a) the Naalai diary: tomorrow */
.pk-diary { display: grid; gap: .65em; padding: 1.05em 1em 1.1em; container-type: inline-size; }
.pk-diary__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .1em .6em; }
.pk-diary__word { font: 800 1.75em/1.05 var(--font-display); color: var(--blue); letter-spacing: -.01em; white-space: nowrap; } /* Round 2: never "Tomorrow ·" alone on a line */
.pk-diary__day { font-size: .62em; color: var(--ink); letter-spacing: 0; white-space: nowrap; }
@container (max-width: 330px) { /* a narrow page (the phone): the day goes under "Tomorrow", never a line that starts with a dot */
  .pk-diary__dot { display: none; }
  .pk-diary__day { display: block; margin-top: .15em; font-size: .6em; }
}
.pk-diary__head .tag { grid-column: 2; grid-row: 1; align-self: start; }
.pk-diary__who { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: .6em; }
.pk-diary__who b { font: 800 1em/1.2 var(--font-display); }
.pk-diary__hw { --pk-slip: var(--card); }
.pk-diary__hw ul { display: grid; gap: .45em; margin-top: .45em; }
.pk-diary__hw li { display: flex; align-items: center; gap: .55em; padding-bottom: .4em; font-weight: 700; line-height: 1.3;
  border-bottom: 1.5px solid rgba(35, 70, 198, .16); } /* the notebook rule sits under the writing */
.pk-diary__hw .pk-chip { flex: none; }
.pk-diary__bring { --pk-slip: #FBEFD9; }
.pk-diary__bring ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; margin-top: .5em; }
.pk-diary__bring li { display: grid; justify-items: center; gap: .2em; text-align: center; font: 700 .82em/1.2 var(--font-body); }
.pk-diary__bring img { width: 2.6em; height: 2.6em; flex: none; }
.pk-diary__item { display: flex; align-items: center; gap: .6em; margin-top: .3em; font-weight: 700; line-height: 1.3; }
.pk-diary__form { --pk-slip: var(--card); }
.pk-diary__form > p:not(.pk-label) { font-weight: 800; margin-top: .25em; }
.pk-sig { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .3em .6em; margin-top: .2em; }
.pk-sig svg { grid-column: 1; width: 7.5em; height: 2.2em; margin-bottom: -.75em; overflow: visible; }
.pk-sig__line { grid-column: 1 / -1; height: 2px; border-radius: 2px; background: rgba(30, 42, 90, .32); }
.pk-sig .pk-mark { grid-column: 2; grid-row: 1; --pk-mark-size: 1.6em; }
.pk-sig .pk-meta { grid-column: 1 / -1; }
.pk-diary__notice { --pk-slip: var(--lemon); display: flex; gap: .65em; align-items: center; rotate: -.6deg; margin-top: .25em; }
.pk-diary__notice img { width: 2.3em; height: 2.3em; flex: none; }
.pk-diary__notice p { font-weight: 700; line-height: 1.3; }
.pk-diary__notice .pk-pin { left: auto; right: 1.2em; top: -.5em; width: 1.1em; height: 1.1em; }

/* (b) a teacher's post */
.pk-post { display: grid; gap: .7em; }
.pk-post__title { font: 800 1.2em/1.2 var(--font-display); }
.pk-post__body { display: flex; align-items: center; gap: .55em; flex-wrap: wrap; font-weight: 700; }
.pk-post__reach { display: flex; align-items: center; gap: .55em; padding-top: .65em; font: 700 .875em/1.35 var(--font-body); color: var(--pk-fg-2); border-top: 1px solid rgba(30, 42, 90, .1); }
.pk-post__reach img { width: 2.2em; height: 2.2em; flex: none; }

/* (c) Nila attendance */
.pk-attend { display: grid; gap: .7em; }
.pk-attend__list { display: grid; gap: .1em; }
.pk-attend__list li { display: flex; align-items: center; gap: .6em; padding: .32em .15em .32em .25em; border-radius: .6em; }
.pk-attend__list li:nth-child(odd) { background: rgba(214, 230, 255, .35); }
.pk-attend__name { flex: 1; font-weight: 700; }
.pk-attend__state { min-width: 3.6em; font: 800 .75em/1 var(--font-body); color: var(--ink-2); text-align: right; }
.pk-marks { display: inline-flex; gap: .35em; }
.pk-attend__foot { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; }
.pk-attend__foot .pk-meta { flex-basis: 100%; margin-top: .2em; }

/* (d) a notice to the whole school */
.pk-notice { --pk-bg: var(--lemon); --pk-tilt: -1deg; display: grid; gap: .5em; padding-top: 1.45em; }
.pk-notice__to { display: flex; justify-content: space-between; align-items: center; gap: .5em; }
.pk-notice__title { font: 800 1.3em/1.15 var(--font-display); }

/* (e) the calendar */
.pk-cal { display: grid; gap: .7em; }
.pk-cal__month { font: 800 1.15em/1.1 var(--font-display); }
.pk-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .28em; text-align: center; font: 700 .8em/1 var(--font-body); }
.pk-cal__grid span { display: grid; place-items: center; aspect-ratio: 1; border-radius: .5em; position: relative; }
.pk-cal__grid .is-wd { aspect-ratio: auto; padding-bottom: .3em; color: var(--ink-3); font-weight: 800; }
.pk-cal__grid .is-off { color: var(--ink-3); }
.pk-cal__grid .is-today { box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue); font-weight: 800; }
.pk-cal__grid .is-sun { background: var(--sun); box-shadow: var(--pk-sh-sm); font-weight: 800; }
.pk-cal__grid .is-star { background: var(--pink); box-shadow: var(--pk-sh-sm); color: #8A2440; font-weight: 800; }
.pk-cal__grid .is-test { background: var(--mint); color: #1F6B3A; font-weight: 800; }
.pk-cal__grid .is-trip { background: var(--sky); color: var(--blue-deep); font-weight: 800; box-shadow: var(--pk-sh-sm); }
.pk-cal__events { display: grid; gap: .35em; font-size: .875em; }
.pk-cal__events li { display: flex; align-items: center; gap: .55em; font-weight: 700; }
.pk-cal__events i { width: .85em; height: .85em; border-radius: 50%; flex: none; box-shadow: 0 1px 1px rgba(90, 42, 0, .3); }
.pk-cal__events b { min-width: 4.7em; font-weight: 800; color: var(--ink-2); }

/* (f) a paper bar chart insight: one series, the one bar that matters is labelled */
.pk-insight { display: grid; gap: .6em; }
.pk-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7em; align-items: end; height: 8.5em; padding: 0 .2em; border-bottom: 2px solid rgba(30, 42, 90, .35); }
.pk-bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pk-bar__fill { width: min(100%, 2.3em); height: calc(var(--v) * 100%); border-radius: 4px 4px 0 0; background: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 1px rgba(11, 26, 85, .3); }
.pk-bar.is-hi .pk-bar__fill { background: var(--sun-deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 1px rgba(90, 42, 0, .3); }
.pk-bar__val { position: absolute; bottom: calc(var(--v) * 100% + .3em); font: 800 .8em/1 var(--font-body); color: var(--ink); }
.pk-bars__days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7em; padding: 0 .2em; text-align: center; font: 700 .75em/1 var(--font-body); color: var(--ink-2); }
.pk-insight__note { display: flex; gap: .6em; align-items: center; font-weight: 700; line-height: 1.35; }
.pk-insight__note img { width: 2.2em; height: 2.2em; flex: none; }

/* (g) a Kuru maths question: ask, wait, hint one step, answer with the reason, then "how did you know?" */
.pk-kq { display: grid; gap: .75em; }
.pk-kq__q { font: 800 1.15em/1.3 var(--font-display); }
.pk-kq__answers { display: flex; gap: .55em; }
.pk-ans { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 2.5em; padding: .45em .6em;
  border-radius: .8em .95em .85em .75em / .9em .75em .95em .8em; background: var(--card); font: 800 1.25em/1 var(--font-display);
  box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .12), 0 1px 0 rgba(255, 255, 255, .8); }
.pk-ans.is-right { background: var(--mint); box-shadow: inset 0 0 0 2px #3E9A55, 0 1px 1px rgba(90, 42, 0, .25), 0 .35em .6em -.35em rgba(90, 42, 0, .4); }
.pk-ans .pk-mark { --pk-mark-size: 1.05em; }
.pk-kq__model { display: flex; align-items: center; flex-wrap: wrap; gap: .7em; margin-top: .6em; }
.pk-kq > .pk-meta { margin-top: -.2em; }
/* a steel tiffin box, opened, with idlis inside (Kuru's "picture it" hint; reusable) */
.pk-tiffin { position: relative; display: inline-grid; grid-template-columns: repeat(2, 1em); gap: .22em; padding: .4em .45em;
  border-radius: .55em .6em .55em .5em; background: linear-gradient(#EDF1F7, #C4CDDD);
  box-shadow: inset 0 0 0 .13em #9EABC2, inset 0 .3em 0 rgba(255, 255, 255, .5), 0 1px 1px rgba(11, 26, 85, .3), 0 .3em .5em -.3em rgba(11, 26, 85, .45); }
.pk-tiffin::before, .pk-tiffin::after { content: ""; position: absolute; top: 38%; width: .22em; height: .55em; border-radius: .1em; background: #8E9BB4; }
.pk-tiffin::before { left: -.16em; }
.pk-tiffin::after { right: -.16em; }
.pk-tiffin i { width: 1em; height: .8em; border-radius: 50%; background: #FFFDF8;
  box-shadow: inset 0 -.12em 0 rgba(160, 135, 100, .22), 0 .07em .1em rgba(90, 42, 0, .3); }
.pk-kq__ask { display: grid; gap: .5em; padding-top: .75em; border-top: 1px solid rgba(30, 42, 90, .1); }
.pk-kq__ask > p { display: flex; align-items: center; gap: .5em; font: 800 1.05em/1.2 var(--font-display); }
.pk-kq__ask > p img { width: 1.9em; height: 1.9em; }
.pk-kq__ask ul { display: flex; flex-wrap: wrap; gap: .4em; }

/* (h) Kuru's weekly card for parents */
.pk-kw { display: grid; gap: .75em; }
.pk-kw__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3em; text-align: center; }
.pk-kw__days li { display: grid; gap: .25em; justify-items: center; font: 800 .75em/1 var(--font-body); color: var(--ink-2); }
.pk-kw__days img { width: 2em; height: 2em; }
.pk-kw__days .is-rest { width: 2em; height: 2em; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .14); display: block; }
.pk-kw__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding-block: .55em; border-block: 1px solid rgba(30, 42, 90, .1); }
.pk-kw__stats div { padding-inline: .4em; text-align: center; }
.pk-kw__stats div + div { border-left: 1px solid rgba(30, 42, 90, .1); }
.pk-kw__stats dt { font: 700 .75em/1.2 var(--font-body); color: var(--ink-2); }
.pk-kw__stats dd { margin: .15em 0 0; font: 800 1.35em/1 var(--font-display); }
.pk-kw__lines { display: grid; gap: .45em; }
.pk-kw__lines p { display: flex; align-items: center; gap: .55em; font-weight: 700; }
.pk-kw__lines .pk-chip { min-width: 6.4em; justify-content: center; }
.pk-kw__note { font: 700 .95em/1.4 var(--font-body); }

/* (i) messages between a teacher and a parent */
.pk-msgs { display: grid; gap: .8em; }
.pk-msg { display: flex; align-items: flex-end; gap: .55em; }
.pk-msg--me { justify-content: flex-end; }
.pk-msg .pk-bubble { max-width: 82%; }
.pk-msg .pk-meta { display: block; margin-top: .3em; font-size: .72em; color: var(--ink-2); }
.pk-msgs__note { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; font: 700 .85em/1.35 var(--font-body); color: var(--ink-2); }

/* (j) an alert */
.pk-alert { display: grid; grid-template-columns: auto 1fr; gap: .2em .8em; align-items: center; }
.pk-alert > img { grid-row: span 2; width: 3em; height: 3em; }
.pk-alert__title { font: 800 1.15em/1.2 var(--font-display); }
.pk-alert__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: .5em; flex-wrap: wrap; margin-top: .55em; padding-top: .6em;
  border-top: 1px solid rgba(30, 42, 90, .1); font: 700 .85em/1.3 var(--font-body); color: var(--ink-2); }

/* Nila's office screen (fits the laptop frame) */
.pk-nila { height: 100%; display: grid; grid-template-rows: auto 1fr; font-size: 1em; }
.pk-nila__bar { display: flex; align-items: center; gap: .7em; padding: .75em 1.1em; background: var(--night) var(--pk-tex-night) 0 0 / 256px 256px; color: #fff; }
.pk-nila__bar img { width: 1.9em; height: 1.9em; }
.pk-nila__bar b { font: 800 1.15em/1 var(--font-display); }
.pk-nila__bar .pk-chip { --pk-chip-bg: rgba(255, 255, 255, .14); --pk-chip-fg: #fff; box-shadow: none; }
.pk-nila__bar span:last-child { margin-left: auto; font-weight: 700; color: #D3DBF7; }
.pk-nila__grid { display: grid; grid-template-columns: 1.05fr 1fr; grid-template-rows: auto 1fr; gap: .9em; padding: 1em 1.1em 1.1em; min-height: 0; }
.pk-nila__grid > section { --pk-pad: .9em 1em; }
.pk-nila__att { grid-row: span 2; display: grid; align-content: start; gap: .55em; }
.pk-nila__big { font: 800 3.1em/1 var(--font-display); letter-spacing: -.01em; }
.pk-nila__big small { font: 700 .3em/1 var(--font-body); color: var(--ink-2); letter-spacing: 0; margin-left: .3em; }
.pk-nila__classes { display: grid; gap: .32em; margin-top: .2em; }
.pk-nila__classes li { display: grid; grid-template-columns: 2.8em 1fr 2.2em; align-items: center; gap: .5em; font: 700 .82em/1 var(--font-body); }
.pk-nila__classes i { height: .65em; border-radius: 99px; background: rgba(30, 42, 90, .08); overflow: hidden; display: block; }
.pk-nila__classes i::after { content: ""; display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--blue); }
.pk-nila__notes ul { display: grid; gap: .45em; margin-top: .5em; }
.pk-nila__notes li { display: grid; font-weight: 700; line-height: 1.25; }
.pk-nila__mods ul { display: flex; flex-wrap: wrap; gap: .35em; margin-top: .5em; }
.pk-nila__mods .pk-chip { font-size: .78em; }
@container (max-width: 520px) {
  .pk-nila__grid { grid-template-columns: 1fr; grid-template-rows: auto; padding: .8em; gap: .6em; }
  .pk-nila__att { grid-row: auto; gap: .45em; }
  .pk-nila__mods, .pk-nila__classes, .pk-nila__notes li + li { display: none; }
  .pk-nila__notes ul { margin-top: .3em; }
  .pk-nila__big { font-size: 2.4em; }
}

/* =====================================================================================================================
   11. Stop-motion boil for small paper decorations: holds for two frames (12 updates a second), never on text.
   ===================================================================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html:not(.rm) .pk-boil { animation: pk-boil 500ms steps(1, end) infinite; }
}
@keyframes pk-boil {
  0% { translate: 0 0; rotate: 0deg; }
  33% { translate: .4px -.3px; rotate: -.6deg; }
  66% { translate: -.3px .3px; rotate: .5deg; }
}

/* =====================================================================================================================
   12. Preferences
   ===================================================================================================================== */
@media (prefers-reduced-motion: reduce) {
  .pk-card--lift, .pk-card--lift::before, .pk-tab { transition: none; }
  .pk-boil { animation: none; }
}
@media (prefers-contrast: more) {
  .pk-card, .pk-slip, .pk-tabpanel, .pk-bubble, .pk-ans { box-shadow: inset 0 0 0 1.5px var(--ink); }
  .pk-card::after { display: none; }
  .pk-meta, .pk-label { color: var(--ink); }
}
@media (forced-colors: active) {
  .pk-card, .pk-slip, .pk-tabpanel, .pk-bubble, .pk-ans, .pk-chip, .pk-note, .pk-avatar, .pk-mark { border: 1px solid CanvasText; }
  .pk-tab[aria-selected="true"] { outline: 2px solid Highlight; }
  .pk-edge, .pk-card::after { display: none; }
  .pk-mark::after { background: CanvasText !important; }
}

/* =====================================================================================================================
   13. Round 3 (pages agent, 3 Nov evening; owner: "make Free a very proper stamp, so that it is visible").
   The rubber stamp: a word pressed onto the paper in ink, never a pill. A double-ruled box, inked capitals, a small
   turn, the ink a little patchy where the rubber missed (a seamless texture as a mask: ui-r3/ink-tile.webp), and
   multiplied into the paper so its grain shows through. Real text, so it reads and copies like any word.
   <span class="pk-rubber"><b class="pk-rubber__big">Free</b><span class="pk-rubber__small">for parents and teachers</span></span>
   Size it with --pk-rubber-fs (the big word); the rest follows in em. Ink: --pk-ink (green, AA on sky, kraft and cream).
   Add .pk-rubber--press to press it on once (on twos, 12 fps) when it gets .b-in or .is-in (or at once under
   html:not(.js)); --pk-rubber-at delays the press. Reduced motion: already pressed.
   ===================================================================================================================== */
.pk-rubber { --pk-ink: #17663A; --pk-rubber-fs: 44px; --pk-rubber-turn: -8deg;
  position: relative; display: inline-grid; justify-items: center; align-content: center; gap: .08em;
  padding: .2em .36em .24em; font-size: var(--pk-rubber-fs); line-height: 1; color: var(--pk-ink); text-align: center;
  border: max(2.5px, .07em) solid currentColor; border-radius: .2em; rotate: var(--pk-rubber-turn);
  mix-blend-mode: multiply; isolation: isolate;
  -webkit-mask: url(/assets/art/ui-r3/ink-tile.webp) 0 0 / 210px 210px; mask: url(/assets/art/ui-r3/ink-tile.webp) 0 0 / 210px 210px; }
.pk-rubber::before { content: ""; position: absolute; inset: max(3px, .07em); border: max(1.5px, .035em) solid currentColor; border-radius: .13em; pointer-events: none; }
.pk-rubber__big { display: flex; align-items: center; gap: .14em; font: 800 1em/.92 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }
.pk-rubber__big::after { margin-left: -.28em; } /* the last letter's tracking */
.pk-rubber__big::before, .pk-rubber__big::after { content: "\2605" / ""; font-size: .36em; letter-spacing: 0; }
.pk-rubber--sm .pk-rubber__big::before, .pk-rubber--sm .pk-rubber__big::after { content: none; }
/* the small line: one line, or two when it is written as two spans */
.pk-rubber__small { display: grid; justify-items: center; font: 900 max(15px, .32em)/1.12 var(--font-body); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
/* a round seal: the same ink in a double ring */
.pk-rubber--round { border-radius: 50%; aspect-ratio: 1; padding: .5em .4em; }
.pk-rubber--round::before { border-radius: 50%; }
/* small, inline in a line of text (a card's price row) */
.pk-rubber--sm { --pk-rubber-fs: 21px; --pk-rubber-turn: -6deg; padding: .2em .42em .16em; border-width: 2px; }
.pk-rubber--sm::before { inset: 2.5px; border-width: 1px; }
.pk-rubber--sm .pk-rubber__big { letter-spacing: .08em; }

@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .pk-rubber--press:not(.b-in):not(.is-in) { opacity: 0; animation: pk-rubber-failsafe 1ms 4s both; }
  html.js:not(.rm) .pk-rubber--press:is(.b-in, .is-in) { animation: pk-rubber-press 500ms steps(1, end) var(--pk-rubber-at, 0ms) both; }
}
@keyframes pk-rubber-press {
  0% { opacity: 0; transform: scale(1.7) rotate(6deg); }
  16.67% { opacity: 1; transform: scale(1.28) rotate(3deg); }
  33.33% { transform: scale(.9) rotate(-1deg); }
  50% { transform: scale(1.05); }
  66.67% { transform: scale(.985); }
  83.33%, 100% { opacity: 1; transform: none; }
}
@keyframes pk-rubber-failsafe { to { opacity: 1; } }
@media (forced-colors: active) { .pk-rubber { -webkit-mask: none; mask: none; mix-blend-mode: normal; } }

/* R5: marks are the clay ticks, crosses and clocks. Off marks stay an empty round paper. */
.pk-mark { --pk-mark-img: url(/assets/art/r5/icons/mark-tick.webp); }
.pk-mark--absent { --pk-mark-img: url(/assets/art/r5/icons/mark-cross.webp); }
.pk-mark--late { --pk-mark-img: url(/assets/art/r5/icons/mark-late.webp); }
.pk-mark.is-on { background: var(--pk-mark-img) center / contain no-repeat; box-shadow: none; }
.pk-mark.is-on::after { display: none; }
