/* Hallmark · route: custom (bespoke) on the locked landing-v5 system · page: sets /{username}/sets
 * idea: "each set is a filed divider: a tab with its code and year, a tray on top (its best cards, its logo, or the
 *        logo with the cards fanned behind it), and the set's printed strip underneath"
 * Hallmark · pre-emit critique: P5 H4 E4 S5 R4 V4
 */
:root {
  --foil-1: oklch(84% 0.07 200); --foil-2: oklch(86% 0.07 300); --foil-3: oklch(88% 0.07 20); --foil-4: oklch(90% 0.07 95);
  --text-who: clamp(4.2rem, 1.6rem + 11vw, 11rem);
  --radius-card: 4.762% / 3.409%;
  --tray-h: 216px;
}

/* ---------- base (same as the other pages) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; background-color: var(--color-paper); }
body {
  margin: 0; background-color: var(--color-paper);
  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='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32  0 0 0 0 .28  0 0 0 0 .2  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(120% 1400px at 20% 0%, var(--color-stock), transparent 60%);
  background-repeat: repeat, no-repeat;
  color: var(--color-ink); font: 400 var(--text-md)/1.55 var(--font-body); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: var(--space-md); top: -100px; z-index: 50; background: var(--color-ink); color: var(--color-stock); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); text-decoration: none; }
.skip:focus-visible { top: var(--space-sm); }
.mono { font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* mockup-only switcher */
.mock { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: var(--radius-pill);
  background: var(--color-ink); color: var(--color-stock); box-shadow: 0 10px 30px -8px var(--shadow-contact); font-size: var(--text-xs); white-space: nowrap; }
.mock span { padding: 0 8px 0 10px; opacity: .7; }
.mock button { height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: transparent; color: inherit; font-weight: 600; cursor: pointer; }
.mock button[aria-pressed="true"] { background: var(--color-stock); color: var(--color-ink); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; min-height: var(--bar-h); display: flex; align-items: center; gap: var(--space-xl); padding: 0 var(--gutter); background: var(--color-paper); border-bottom: 1px solid var(--color-rule); }
.mark { font: 800 1.3rem/1 var(--font-display); font-variation-settings: "wdth" 70; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.bar-nav { display: flex; gap: var(--space-lg); margin-right: auto; }
.bar-nav a, .bar-link { font-weight: 600; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; padding: 17px 2px 15px; border-bottom: 2px solid transparent; transition: border-color var(--dur-base) var(--ease-out); }
.bar-nav a { color: var(--color-muted); }
.bar-nav a:hover, .bar-link:hover { border-bottom-color: var(--color-rule-2); color: var(--color-ink); }
.bar-nav a[aria-current="page"] { color: var(--color-ink); border-bottom-color: var(--color-accent); }
.bar-end { display: flex; align-items: center; gap: var(--space-sm); }
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--color-rule-2); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; }
}
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }

/* ---------- head ---------- */
.head { padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 52px); }
.who { font: 820 var(--text-who)/.8 var(--font-display); font-variation-settings: "wdth" 62; letter-spacing: -.02em; }
.js:not(.still) .who { animation: lift-in 700ms var(--ease-settle) both; }
@keyframes lift-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.summary { margin-top: var(--space-md); font-size: var(--text-lg); color: var(--color-ink-2); }
.summary .mono { font-size: .86em; font-weight: 600; color: var(--color-ink); }
.summary .sep { color: var(--color-muted); margin: 0 .35em; }

/* ---------- the shelf of dividers ---------- */
.shelf { list-style: none; margin: 0; padding: 0 var(--gutter) clamp(64px, 8vw, 120px);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(40px, 4vw, 56px) clamp(20px, 2.4vw, 36px); }
.set { min-width: 0; }
.js:not(.still) .set { animation: lift-in 560ms var(--ease-settle) both; animation-delay: calc(var(--i, 0) * 60ms + 150ms); }
.setcard { position: relative; display: block; text-decoration: none; color: inherit; transition: transform var(--dur-base) var(--ease-out); }
.setcard:focus-visible { outline-offset: 6px; }
.stab { position: relative; z-index: 2; display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 16px 7px 14px; border-radius: var(--radius-tab); background: var(--color-stock);
  box-shadow: inset 0 1px 0 var(--color-highlight), 0 -1px 0 var(--color-rule), -1px 0 0 var(--color-rule), 1px 0 0 var(--color-rule);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-2); white-space: nowrap; }
.stab .mono { font-size: var(--text-2xs); color: var(--color-ink); }
.sface { position: relative; display: block; background: var(--color-stock); border-radius: 0 3px 3px 3px; box-shadow: var(--shadow-sheet); padding: 12px 12px 18px; }
.sface::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: var(--shadow-lift); opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
@media (hover: hover) {
  .setcard:hover { transform: translateY(-4px); }
  .setcard:hover .sface::after { opacity: 1; }
}

/* the tray at the top of each divider */
.tray { position: relative; display: block; height: var(--tray-h); overflow: hidden; border-radius: 2px; background: var(--color-binder-page);
  box-shadow: inset 0 1px 3px var(--shadow-ambient), inset 0 0 0 1px var(--color-rule); }

/* A · the best three cards, side by side */
.trio { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; padding: 16px; }
.tc { position: relative; flex: 0 0 auto; height: 100%; aspect-ratio: 245 / 342; max-width: 31%; }
.tc .pic { display: block; width: 100%; height: 100%; border-radius: var(--radius-card); overflow: hidden; background: var(--color-paper-3); box-shadow: var(--shadow-rest); }
.tc .pic img { width: 100%; height: 100%; object-fit: cover; }
.tc .tp { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 2px 6px; border-radius: var(--radius-tag); background: var(--color-stock);
  font: 600 10.5px/1.25 var(--font-mono); font-variation-settings: "wdth" 87.5; letter-spacing: -.02em; white-space: nowrap; box-shadow: 0 1px 2px var(--shadow-contact); }
.trio .tc .ring, .fan .fc .ring { position: absolute; inset: -2px; z-index: -1; border-radius: 5.6% / 4%; background: conic-gradient(from 210deg, var(--foil-1), var(--foil-2), var(--foil-3), var(--foil-4), var(--foil-1)); }
@media (hover: hover) { .setcard:hover .tc:nth-child(2) { transform: translateY(-4px); } .tc { transition: transform var(--dur-base) var(--ease-out); } }

/* B · the logo alone */
.logoband { display: grid; place-items: center; height: 100%; padding: 28px 36px; }
.logoband img { width: auto; height: auto; max-width: 78%; max-height: 120px; object-fit: contain; filter: drop-shadow(0 2px 3px var(--shadow-ambient)); transition: transform var(--dur-slow) var(--ease-settle); }
@media (hover: hover) { .setcard:hover .logoband img { transform: scale(1.05); } }
.code-ph { font: 820 2.6rem/1 var(--font-display); font-variation-settings: "wdth" 62; color: var(--color-muted); text-transform: uppercase; }

/* C · the logo in front, the cards fanned out behind it like a hand */
.fan { position: absolute; inset: 0; }
.fc { position: absolute; left: 50%; top: 12px; height: 88%; aspect-ratio: 245 / 342; transform-origin: 50% 110%;
  transform: translateX(-50%) translateX(var(--x, 0%)) rotate(var(--r, 0deg)); transition: transform var(--dur-slow) var(--ease-settle); }
.fc .pic { display: block; width: 100%; height: 100%; border-radius: var(--radius-card); overflow: hidden; background: var(--color-paper-3); box-shadow: var(--shadow-rest); }
.fc .pic img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) { .setcard:hover .fc { transform: translateX(-50%) translateX(var(--x2, 0%)) rotate(var(--r2, 0deg)) translateY(-6px); } }
.fplate { position: absolute; left: 50%; bottom: 12px; z-index: 3; transform: translateX(-50%); display: grid; place-items: center; width: min(70%, 230px); height: 64px; padding: 8px 16px;
  background: var(--color-stock); border-radius: 3px; box-shadow: 0 1px 1px var(--shadow-contact), 0 12px 22px -10px var(--shadow-contact); }
.fplate img { width: auto; height: auto; max-width: 100%; max-height: 46px; object-fit: contain; }
.fplate .code-ph { font-size: 1.8rem; }

/* below the tray */
.sinfo { display: block; padding: 16px 6px 0; }
.sname { display: flex; align-items: center; gap: 10px; }
.sname b { min-width: 0; font: 780 clamp(1.4rem, 1.1rem + .9vw, 1.9rem)/1.02 var(--font-display); font-variation-settings: "wdth" 70; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sname img { height: 28px; width: auto; max-width: 96px; object-fit: contain; margin-left: auto; flex: none; }
.sser { display: block; margin-top: 4px; font-size: var(--text-sm); color: var(--color-muted); }
.ministrip { display: flex; height: 10px; margin-top: 16px; border-radius: 1px; overflow: hidden; background: var(--color-paper-3); }
.ministrip i { flex: 1 1 0; min-width: 0; }
.ministrip i.on { background: var(--color-ink-2); }
.srow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; font-size: var(--text-xs); color: var(--color-muted); }
.srow b { display: block; margin-top: 2px; font: 600 var(--text-sm)/1.2 var(--font-mono); font-variation-settings: "wdth" 87.5; letter-spacing: -.02em; color: var(--color-ink); }
.srow b small { font-weight: 400; color: var(--color-muted); margin-left: 6px; font-size: var(--text-2xs); }
.srow .r { text-align: right; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: clamp(24px, 5vw, 56px) var(--space-md) clamp(32px, 6vw, 72px); }
.empty p { margin: var(--space-xs) auto 0; max-width: 38ch; color: var(--color-ink-2); }
.empty-t { font: 760 var(--text-h2)/1 var(--font-display); font-variation-settings: "wdth" 70; letter-spacing: -.01em; }
.pockets { display: flex; justify-content: center; gap: clamp(8px, 1.6vw, 18px); margin: 0 auto clamp(24px, 4vw, 40px); }
.pockets i { width: clamp(64px, 9vw, 112px); aspect-ratio: 245 / 342; border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--color-rule-2), inset 0 2px 0 var(--color-highlight-hi);
  background: linear-gradient(115deg, transparent 40%, var(--color-glint-hi) 50%, transparent 60%), var(--color-paper-2); }
.pockets i:nth-child(2) { transform: translateY(-6px); }
.empty--page { margin: 0 var(--gutter) var(--space-2xl); background: var(--color-binder-page); border-radius: 3px; box-shadow: var(--shadow-sheet); }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-lg); border-top: 1px solid var(--color-rule); padding: var(--space-xl) var(--gutter) 96px; font-size: var(--text-sm); color: var(--color-muted); }
.foot > div { max-width: 52ch; }
.foot-r { text-align: right; max-width: 40ch !important; }
.fbrand { display: block; font: 800 var(--text-md)/1.2 var(--font-display); font-variation-settings: "wdth" 70; color: var(--color-ink); margin-bottom: 4px; }
.legal { margin-top: var(--space-xs); }
.foot a { color: var(--color-ink-2); }

@media (max-width: 679px) {
  :root { --tray-h: 196px; }
  .bar { flex-wrap: wrap; gap: 0 var(--space-md); padding-top: 6px; }
  .mark { margin-right: auto; }
  .bar-nav { order: 3; flex-basis: 100%; margin: 0; }
  .bar-nav a { padding: 8px 2px 10px; }
  .bar-link { padding: 10px 2px; }
  .summary { font-size: var(--text-md); }
  .foot-r { text-align: left; }
  .mock span { display: none; }
  .mock button { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}
.still .set, .still .who { animation: none; }
.tc, .fc { isolation: isolate; }
