/* keepmypick: paper-and-tickets design language.
   Source of truth: the approved layout mock. Pages link the three Google fonts
   (Bowlby One, Courier Prime, Special Elite) in their <head>. */

:root {
  --paper: #d9d2c3;
  --ticket: #fbf8f0;
  --ticket-late: #efe9dc;
  --ink: #2a2622;
  --ink-2: #4a443c;      /* secondary text on paper (AA on --paper) */
  --mute: #6b6358;       /* secondary text on tickets */
  --rule: #9a9184;
  --win: #1d6b43;
  --loss: #a8321f;
  --void: #bdb5a3;
  --display: 'Bowlby One', 'Arial Black', Impact, sans-serif;
  --body: 'Courier Prime', 'Courier New', Courier, monospace;
  --stamp: 'Special Elite', 'Courier New', Courier, monospace;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .165 0 0 0 0 .149 0 0 0 0 .133 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g { color: var(--win); }
.r { color: var(--loss); }
.b { font-weight: 700; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 var(--gutter); }
main { padding-bottom: 8px; }

/* ---- nav ---- */
.nav {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px 20px; flex-wrap: wrap;
  padding: 26px 0 10px; border-bottom: 2px solid var(--ink);
  font-size: 12px; letter-spacing: .08em;
}
.brand {
  font: 400 22px/1 var(--display); letter-spacing: .5px; text-decoration: none;
}
.links { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.links a { color: inherit; text-decoration: none; padding: 8px 0 3px; border-bottom: 2px solid transparent; }
.links a:hover { border-bottom-color: var(--rule); }
.links a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---- headings and labels ---- */
.k { font: 400 11px/1.4 var(--body); letter-spacing: .14em; margin: 0 0 6px; text-transform: none; }
.h3 {
  font: 400 19px/1 var(--display); margin: 34px 0 12px; display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: baseline; gap: 6px 16px;
}
.h3 small { font: 400 11px/1.3 var(--body); letter-spacing: .06em; color: var(--ink-2); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px 44px; margin-top: 26px; align-items: start; }
.hero.solo { grid-template-columns: 1fr; }
.hero > section { min-width: 0; }
.big { font: 400 clamp(52px, 10vw, 76px)/1 var(--display); color: var(--ink); margin-top: 4px; letter-spacing: -.5px; }
.big.g { color: var(--win); }
.big.r { color: var(--loss); }
.sub { font-size: 13px; line-height: 1.55; margin: 10px 0 0; color: var(--ink); }
.sub.small { font-size: 12px; color: var(--ink-2); margin-top: 12px; }
.chips { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; padding: 0; }
.chips li { border: 1.5px solid var(--ink); padding: 3px 7px 1px; font-size: 11px; letter-spacing: .05em; }
.unavail { font: 400 19px/1.3 var(--display); margin: 14px 0 0; }
.empty { border: 1.5px dashed var(--rule); padding: 18px 14px; margin: 0; font-size: 13px; color: var(--ink-2); list-style: none; }

/* ---- bankroll curve ---- */
.curve { margin: 20px 0 0; }
.curve-box { position: relative; height: 112px; margin: 0 7px; }
.curve-box svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.curve .base { stroke: var(--rule); stroke-width: 1.5px; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.curve .ln { fill: none; stroke: var(--curve); stroke-width: 3px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.curve .pt {
  position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--curve);
}
.curve .pt.now { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; background: var(--curve); border-color: var(--paper); box-shadow: 0 0 0 2px var(--curve); }
.curve-key { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 11px; letter-spacing: .08em; color: var(--ink); }
.curve-key span { display: inline-flex; align-items: center; gap: 7px; }
.curve-key .sw-base { width: 20px; border-top: 1.5px dashed var(--ink-2); }
.curve-key .sw-now { width: 10px; height: 10px; border-radius: 50%; background: var(--curve); }

/* ---- tickets ---- */
.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tk { filter: drop-shadow(0 2px 0 rgba(42, 38, 34, .16)); min-width: 0; }
.sl {
  position: relative; background: var(--ticket); padding: 17px 14px 11px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px;
  -webkit-mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) -7px 0 / 14px 100%;
          mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) -7px 0 / 14px 100%;
}
.sl.late { background: var(--ticket-late); }
.sl > .rw, .sl > .ds, .sl > .seal { grid-column: 1 / -1; }
.rw { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; font-size: 11.5px; }
.rw .g, .rw .r { font-weight: 700; }
.ttl { grid-column: 1; min-width: 0; align-self: center; padding: 4px 0; }
.pk { font: 700 16px/1.3 var(--body); margin: 4px 0 2px; overflow-wrap: anywhere; }
.sub2 { margin: 0; font-size: 12px; line-height: 1.4; color: var(--mute); overflow-wrap: anywhere; }
/* The stamp has its own grid column and its own row space, so it never sits on text. */
.stc { grid-column: 2; align-self: center; display: flex; padding: 9px 7px 9px 4px; }
.st {
  display: block; font: 400 22px/1 var(--stamp); color: var(--win); border: 3px solid var(--win);
  padding: 5px 8px 2px; transform: rotate(-10deg); opacity: .86; border-radius: 4px; white-space: nowrap;
}
.st.l { color: var(--loss); border-color: var(--loss); }
.st.o { color: var(--mute); border-color: var(--mute); transform: none; font-size: 15px; padding: 4px 7px 2px; opacity: 1; }
.ds { border-top: 1px dashed var(--rule); margin: 8px 0; }
.facts { font-size: 11.5px; }
.fin { margin-top: 3px; }
.seal { font-size: 11px; color: var(--mute); margin-top: 5px; }
.seal b { color: var(--ink); }

/* one staggered reveal of the board's tickets */
@media (prefers-reduced-motion: no-preference) {
  .board .tk { animation: deal .6s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms + 140ms); }
  @keyframes deal { from { opacity: 0; transform: translateY(16px) rotate(-.7deg); } to { opacity: 1; transform: none; } }
}

/* ---- slates ---- */
.slates { list-style: none; margin: 0; padding: 0; }
.slates > li { margin-bottom: 5px; }
.dayd > summary { list-style: none; cursor: pointer; }
.dayd > summary::-webkit-details-marker { display: none; }
.day {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 84px 108px 22px; gap: 8px 12px; align-items: center;
  background: var(--ticket); padding: 11px 12px; font-size: 13px;
}
.day:hover { background: #fff; }
.day .d { font-weight: 700; white-space: nowrap; }
.dots { display: flex; flex-wrap: wrap; gap: 4px 3px; }
.dots i { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--win); }
.dots i.l { background: var(--loss); }
.dots i.v { background: var(--void); }
.day .rec { text-align: right; }
.day .pl { text-align: right; font-weight: 700; }
.day .chev { text-align: center; font-size: 18px; line-height: 1; transition: transform .15s; }
.dayd[open] .chev { transform: rotate(90deg); }
.day-body { padding: 14px 0 10px; }
.day-tickets { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.day-empty { margin: 0; padding: 4px 2px 6px; font-size: 13px; color: var(--ink-2); }

/* ---- boxes ---- */
.bot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.bx { border: 1.5px solid var(--ink); padding: 14px; font-size: 12.5px; line-height: 1.6; min-width: 0; }
.bx h2 { font: 400 15px/1.3 var(--display); margin: 0 0 6px; }
.bx p { margin: 0; }
.bx p + p { margin-top: 9px; }
.bx a { font-weight: 700; }

footer { margin-top: 44px; border-top: 2px solid var(--ink); padding: 18px 0 48px; font-size: 11.5px; line-height: 1.7; color: var(--ink-2); }
footer p { margin: 0 0 8px; }
footer b { color: var(--ink); }

/* ---- real money ---- */
.note { border: 1.5px solid var(--ink); padding: 13px 14px; font-size: 12.5px; line-height: 1.6; margin: 22px 0 0; }
.note b { font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.stat { background: var(--ticket); padding: 14px; min-width: 0; }
.stat .v { font: 400 28px/1.1 var(--display); margin: 6px 0 4px; overflow-wrap: anywhere; }
.stat .v.sm { font-size: 20px; padding-top: 5px; }
.stat .s { font-size: 12px; color: var(--mute); }
.pk-link { display: inline-block; margin-top: 14px; font-weight: 700; }
.tbl-wrap { background: var(--ticket); overflow-x: auto; max-width: 100%; }
.led { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.led th { text-align: left; font-weight: 400; font-size: 11px; letter-spacing: .1em; padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.led td { padding: 9px 12px; border-bottom: 1px dashed var(--rule); white-space: nowrap; }
.led td.wrap-cell { white-space: normal; min-width: 180px; }
.led .num { text-align: right; }
.led tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font: 400 12px/1 var(--stamp); border: 1.5px solid var(--ink); padding: 3px 6px 1px; border-radius: 3px; letter-spacing: .04em; }
.tag.w { color: var(--win); border-color: var(--win); }
.tag.l { color: var(--loss); border-color: var(--loss); }
.pk-sub { margin: 30px 0 10px; }
.pk-warn { margin-top: 6px; font-size: 11.5px; color: var(--ink-2); }

/* ---- small screens ---- */
@media (max-width: 820px) {
  .hero, .bot { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .nav { padding-top: 20px; }
  .day {
    grid-template-columns: auto minmax(0, 1fr) auto 20px;
    grid-template-areas: "d d p c" "k r r c";
    padding: 11px 12px;
  }
  .day .d { grid-area: d; }
  .day .pl { grid-area: p; }
  .day .chev { grid-area: c; align-self: center; }
  .day .dots { grid-area: k; }
  .day .rec { grid-area: r; text-align: left; }
}
