/* Hallmark · shape: long document (policy pages) and app screens (receipt, admin) · genre: editorial · theme: custom · redesign: full · job: attend · idea: "The registration reads like a live departure board: each event you tick lights up and the total counts up in dot-matrix" · vibe: "volt slab, dot-matrix figures, crisp techno grid"
 * paper: oklch(97.5% 0.004 90) · tones: sage, sand, clay, mist · display: Anybody · body: Schibsted Grotesk · accents: Newsreader italic, the programme edition (end of this file) · hero: none, documents and screens open on their content · nav: edge-aligned, the wordmark and one way back · footer: colophon, one line under a hairline · imagery: none · signature: the receipt is the same soft pass the attendee filled, now carrying its number and status in dot-matrix
 * axes: light/grotesk-sans/soft-four-tone · posture: restrained (a paid receipt is tinted sage, every other state stays on paper with a sand edge) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4 · weakest: V, the admin screen is a plain ledger; kept it that way because the organiser reads tables, not a show */
/* Hallmark · waive 78 · Long Document shape, heads inline at the item size · the policy pages are legal prose read top to bottom, so their heads stay at the item title size instead of the section size */
/* Hallmark · waive 77 · Long Document shape, one prose column at 68ch · each policy page is a single legal text whose paragraphs are its mass, and widening them past the measure would hurt reading */
/* Hallmark · waive 23 · posture: committed, the soft sage is --color-field · the receipt is the same soft pass the attendee filled in on the registration page, so the colour is the object, not an accent wash */
/* Hallmark · dismissed 77 · a policy page is one document; splitting the legal text into six sections would invent structure the owner never wrote */
@import url("./tokens.css");
@import url("./base.css");

body { text-rendering: optimizeLegibility; -webkit-tap-highlight-color: var(--color-clear); }
h1, h2, h3 { font-weight: var(--display-weight); }
.fig { font-family: var(--font-outlier); font-weight: var(--figure-weight); letter-spacing: 0; }
a { text-decoration-color: color-mix(in oklab, currentColor 45%, var(--color-clear)); transition: text-decoration-color var(--dur-short) var(--ease-out); }
a:active { color: var(--color-ink-2); }
@media (hover: hover) { a:hover { text-decoration-color: currentColor; } }

.bar__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: 72px; border-bottom: 1px solid var(--color-ink); }
.wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-lg); letter-spacing: -0.02em; text-decoration: none; }
.bar__link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-sm); color: var(--color-ink-2); white-space: nowrap; }
.sheet { max-width: 52rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: 1px solid var(--color-ink); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font: 600 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--quiet { background: var(--color-clear); color: var(--color-ink); border-color: var(--color-muted); }
@media (hover: hover) { .btn:hover { background: var(--color-ink-2); } .btn--quiet:hover { background: var(--color-paper-2); } }

/* Receipt */
.receipt { padding-block: var(--space-2xl) var(--space-3xl); }
.slip { position: relative; overflow: clip; padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-field); color: var(--color-field-ink); box-shadow: var(--shadow-card); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.slip__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-md); }
.slip__label { font-size: var(--text-sm); color: var(--color-field-muted); }
.slip h1 { margin-top: var(--space-xs); font-size: var(--text-figure-s); line-height: 0.95; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-sm); border: 1px solid var(--color-field-ink); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.status--paid { background: var(--color-field-ink); color: var(--color-accent); }
.slip__for { margin-top: var(--space-sm); color: var(--color-field-muted); }
.slip__lines { margin: var(--space-lg) 0 0; padding: 0; list-style: none; border-top: 2px solid var(--color-field-ink); }
.slip__line { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-md); padding-block: var(--space-sm); border-bottom: 1px solid var(--color-field-rule); }
.slip__name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-lg); line-height: 1.2; letter-spacing: -0.015em; overflow-wrap: break-word; min-width: 0; }
.slip__price { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-lg); line-height: 1.2; font-variant-numeric: tabular-nums; }
.slip__when { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-field-muted); }
.slip__total { display: grid; align-content: end; gap: var(--space-xs); }
.slip__total > span { font-size: var(--text-sm); color: var(--color-field-muted); }
.slip__total strong { font-size: var(--text-figure); line-height: 0.9; }
.sep { margin-inline: -0.28em; }
.cur { margin-inline-end: 0.08em; font-family: var(--font-body); font-weight: 600; font-size: 0.5em; vertical-align: 0.7em; line-height: 0; }

/* Only a paid receipt is tinted (sage); every other state keeps the card on paper with a sand edge */
.receipt:not([data-status="paid"]) .slip { border-top: 2px solid var(--color-accent); background: var(--color-paper-2); box-shadow: none; }
/* The stub: a perforation with notches, then the total beside the check-in QR */
.slip__tear { position: relative; height: 0; margin: var(--space-lg) calc(-1 * var(--space-xl)); border-top: 2px dashed var(--color-field-rule); }
.slip__tear::before, .slip__tear::after { content: ""; position: absolute; top: calc(-1 * var(--space-sm) - 1px); width: var(--space-lg); height: var(--space-lg); border-radius: var(--radius-pill); background: var(--color-paper); }
.slip__tear::before { left: calc(-1 * var(--space-sm)); }
.slip__tear::after { right: calc(-1 * var(--space-sm)); }
.slip__stub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-lg); align-items: end; }
.slip__qr { display: grid; justify-items: end; gap: var(--space-xs); margin: 0; }
.slip__qr .qr { width: 148px; height: 148px; padding: var(--space-2xs); border-radius: var(--radius-cell); background: var(--color-paper); color: var(--color-ink); }
.slip__qr figcaption { max-width: 18ch; font-size: var(--text-xs); line-height: 1.35; text-align: right; color: var(--color-field-muted); }
.receipt__state { max-width: 60ch; margin-top: var(--space-xl); font-size: var(--text-lead); line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap-columns); margin: var(--space-xl) 0 0; border-top: 2px solid var(--color-ink); }
.facts div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-md); padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
.facts dt { font-size: var(--text-sm); color: var(--color-muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.issuer { display: grid; gap: var(--space-2xs); margin-top: var(--space-xl); font-size: var(--text-sm); color: var(--color-ink-2); font-style: normal; }
.issuer strong { color: var(--color-ink); }
.receipt__note { max-width: 60ch; margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.receipt__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }

/* Admin */
.admin { padding-block: var(--space-2xl) var(--space-3xl); }
.admin__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-lg); }
.admin h1 { font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.025em; }
.admin__who { margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.admin__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.admin h2 { margin-top: var(--space-2xl); font-size: var(--text-xl); letter-spacing: -0.015em; }
.admin__sum { margin-top: var(--space-xl); font-size: var(--text-figure); line-height: 0.9; }
.admin__sum small { display: block; margin-top: var(--space-xs); font-family: var(--font-body); font-size: var(--text-sm); color: var(--color-muted); }
.scroll { margin-top: var(--space-md); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { padding: var(--space-sm) var(--space-sm) var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--color-ink-2); white-space: nowrap; border-bottom-color: var(--color-ink); }
/* The body face spaces punctuation in its tabular figures, so amounts here keep proportional figures */
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: normal; }
td small { display: block; color: var(--color-muted); }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-xs); border-radius: var(--radius-input); background: var(--color-paper-3); font-size: var(--text-xs); white-space: nowrap; }
.chip--paid { background: var(--color-accent); color: var(--color-accent-ink); }
.chip--review { background: var(--color-ink); color: var(--color-paper); }
.note { color: var(--color-warn); }
.empty { color: var(--color-muted); }

/* Policy documents */
.doc { padding-block: var(--space-2xl) var(--section-gap-s); }
.doc__head, .doc__body { max-width: 68ch; margin-inline: auto; }
.doc__body > :first-child { margin-top: var(--space-xl); }
.doc h1 { font-size: var(--text-display-s); line-height: 1; letter-spacing: var(--tracking-display); }
.doc h2 { margin-top: var(--space-xl); font-size: var(--text-xl); line-height: 1.2; letter-spacing: -0.015em; }
.doc p, .doc li { line-height: 1.7; }
.doc p, .doc ul { margin-top: var(--space-sm); }
.doc ul { padding-left: var(--space-lg); }
.doc .updated { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.doc .template { margin-top: var(--space-lg); padding: var(--space-md) var(--space-lg); border-radius: var(--radius-input); background: var(--color-paper-2); font-size: var(--text-sm); }
.colophon__line { padding-block: var(--space-lg); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }

td.when { white-space: nowrap; }
@media (max-width: 40rem) {
  /* beside the emblem on a phone, the name takes two lines instead of an ellipsis */
  .wordmark { gap: 8px; }
  .wordmark__seal { width: 2rem; height: 2rem; }
  .wordmark > span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; font-size: 0.95rem; line-height: 1.02; }
  .slip { padding: var(--space-lg); }
  .slip__tear { margin-inline: calc(-1 * var(--space-lg)); }
  .slip__stub { grid-template-columns: minmax(0, 1fr); }
  .slip__qr { justify-items: start; }
  .slip__qr figcaption { text-align: left; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  /* Orders restack as blocks on a phone: status and amount first, then who, what and the receipt */
  .orders thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .orders tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-md); padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
  .orders td { padding: 0; border: 0; }
  .orders td:nth-child(2) { order: -2; }
  .orders td.amount { order: -1; text-align: right; }
  .orders td:not(:nth-child(2)):not(.amount) { grid-column: 1 / -1; }
}

@media print {
  body { background: var(--color-paper); }
  .bar, .receipt__actions { display: none; }
  .slip { box-shadow: none; }
  .receipt { padding-block: 0; }
  .slip { box-shadow: none; }
}


/* ===================== Soft colour system (receipts, admin, documents) ===================== */
:root { --sp: var(--sp-other); --sp-deep: var(--sp-other-deep); }
[data-sport="football"] { --sp: var(--sp-football); --sp-deep: var(--sp-football-deep); }
[data-sport="futsal"] { --sp: var(--sp-futsal); --sp-deep: var(--sp-futsal-deep); }
[data-sport="volleyball"] { --sp: var(--sp-volleyball); --sp-deep: var(--sp-volleyball-deep); }
[data-sport="throwball"] { --sp: var(--sp-throwball); --sp-deep: var(--sp-throwball-deep); }
[data-sport="basketball"] { --sp: var(--sp-basketball); --sp-deep: var(--sp-basketball-deep); }
[data-sport="badminton"] { --sp: var(--sp-badminton); --sp-deep: var(--sp-badminton-deep); }
[data-sport="table-tennis"] { --sp: var(--sp-table-tennis); --sp-deep: var(--sp-table-tennis-deep); }
[data-sport="chess"] { --sp: var(--sp-chess); --sp-deep: var(--sp-chess-deep); }
[data-sport="carrom"] { --sp: var(--sp-carrom); --sp-deep: var(--sp-carrom-deep); }
[data-sport="cricket"] { --sp: var(--sp-cricket); --sp-deep: var(--sp-cricket-deep); }
[data-sport="kabaddi"] { --sp: var(--sp-kabaddi); --sp-deep: var(--sp-kabaddi-deep); }
[data-sport="other"] { --sp: var(--sp-other); --sp-deep: var(--sp-other-deep); }
.receipt[data-status="paid"] .slip { background-color: color-mix(in oklab, var(--tone-sage) 70%, var(--color-card)); }
.receipt:not([data-status="paid"]) .slip { border-top-color: var(--tone-sand-deep); }
.status--paid { background: var(--color-ink); color: var(--color-paper); }
.slip__ball { display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; margin-right: var(--space-xs); padding: 0.12em; vertical-align: -0.16em; border-radius: var(--radius-pill); background: var(--color-card); color: var(--sp-deep); }
.slip__ball .ball { width: 100%; height: 100%; }
.chip--paid { background: var(--tone-sage); color: var(--color-ink); }
.chip--review { background: var(--tone-clay); color: var(--color-ink); }
.chip--refunded { background: var(--tone-mist); color: var(--color-ink); }
.chip--expired { background: var(--color-paper-3); color: var(--color-ink-2); }


/* ===================== Programme edition =====================
   The receipt, policy and admin pages share the homepage's paper, inks and type. */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0 0.12  2.4 0 0 0 -1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23g%29'/%3E%3C/svg%3E");
  --speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -4 0 0 0 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23s%29'/%3E%3C/svg%3E");
}
body::after { content: ""; position: fixed; inset: 0; z-index: 9000; background-image: var(--grain); background-size: 240px; opacity: 0.32; pointer-events: none; }
h1, h2, h3 { font-stretch: var(--stretch-display); font-weight: 850; letter-spacing: var(--tracking-display); }
.fig { font-stretch: var(--stretch-figure); font-weight: 800; font-variant-numeric: tabular-nums; }
.sep { margin-inline: 0; }
.cur { font-size: 0.55em; vertical-align: 0.62em; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; font-stretch: 70%; font-size: 1.45rem; letter-spacing: 0.005em; text-transform: uppercase; }
.wordmark > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the host's emblem (MIRS), leading the fest's name */
.wordmark__seal { flex: none; width: 2.2rem; height: 2.2rem; }
.bar__link { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink); }
.btn { border-radius: 6px; font-family: var(--font-display); font-weight: 800; font-stretch: 100%; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.btn--quiet { border: 1.5px solid var(--color-ink); }

/* The receipt is the stub torn from the pass: an ink band, the number in poster type, a rubber stamp for its status */
.slip { padding-top: 0; border-radius: 14px; }
.slip::before { content: "Admit one · Season pass"; display: block; margin: 0 calc(-1 * var(--space-xl)) var(--space-lg); padding: 14px var(--space-xl) 12px; border-bottom: 2px dashed color-mix(in oklab, var(--color-paper) 40%, var(--color-clear)); background: var(--color-ink); color: var(--color-paper); font-family: var(--font-display); font-weight: 800; font-stretch: 110%; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.slip__label { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; }
.slip h1 { font-size: clamp(2.6rem, 3vw + 1.6rem, 4rem); font-weight: 900; font-stretch: 66%; line-height: 0.85; }
.status { min-height: 0; padding: 6px 12px 5px; border: 3px double currentColor; border-radius: 6px; background: none; color: var(--tone-clay-ink); font-family: var(--font-display); font-weight: 900; font-stretch: 100%; font-size: 1.3rem; letter-spacing: 0.14em; text-transform: uppercase; rotate: -8deg; -webkit-mask: var(--speckle) 0 0 / 160px; mask: var(--speckle) 0 0 / 160px; }
.status--paid { background: none; color: var(--tone-sage-deep); }
.status--review, .status--expired { color: var(--tone-clay-deep); }
.status--pending { color: var(--tone-sand-deep); }
.status--refunded { color: var(--tone-mist-deep); }
@media (prefers-reduced-motion: no-preference) { .status { animation: thump 620ms cubic-bezier(0.2, 0.9, 0.3, 1.15) 250ms both; } }
@keyframes thump { 0% { opacity: 0; scale: 1.8; } 55% { opacity: 1; scale: 0.9; } 78% { scale: 1.04; } 100% { opacity: 1; scale: 1; } }
.slip__for { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; }
.slip__name, .slip__price { font-weight: 850; font-stretch: 72%; font-size: 1.4rem; line-height: 1; }
.slip__name { text-transform: uppercase; }
.slip__total > span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.slip__total strong { font-size: clamp(3rem, 2.4vw + 2rem, 4.2rem); }
.slip__qr figcaption { font-family: var(--font-serif); font-style: italic; font-size: 0.9rem; }
.receipt__state { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.25rem, 0.6vw + 1.05rem, 1.6rem); }
.facts { border-top-width: 2px; }
.facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.doc h1 { font-size: clamp(2.8rem, 4vw + 1rem, 5rem); line-height: 0.88; text-transform: uppercase; }
.admin h1 { font-size: clamp(2.2rem, 2vw + 1.4rem, 3.2rem); text-transform: uppercase; }
@media print { body::after { display: none; } .status { animation: none; -webkit-mask: none; mask: none; } }
/* Real equipment beside each line (studio renders) */
.slip__ball { width: 1.35em; height: 1.35em; padding: 0; border-radius: 0; background: none; vertical-align: -0.28em; }
.slip__ball .ball { width: 100%; height: 100%; }
