:root {
  --bg: #f4f0e8;
  --surface: #faf7f1;
  --ink: #1f1d1a;
  --body: #4a4640;
  --muted: #8a847a;
  --line: #e2dccf;
  --accent: #3d6b55;   /* card-table green, used sparingly */
  --red: #b5473a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--body); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.red, .suits b { color: var(--red); font-weight: inherit; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 500 21px var(--serif); color: var(--ink); white-space: nowrap; }
.tabs { display: flex; gap: 32px; }
.tabs a { text-decoration: none; color: var(--body); font-size: 16px; padding: 4px 0; border-bottom: 1.5px solid transparent; transition: color .15s; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }

/* mini hole cards in the logo */
.mini-cards { display: inline-flex; perspective: 400px; }
.mc { width: 18px; height: 25px; display: inline-block; }
.mc + .mc { margin-left: -5px; transform: rotate(8deg); }
.mc:first-child { transform: rotate(-6deg); }
.mc-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.brand:hover .mc-in { transform: rotateY(180deg); }
.brand:hover .mc + .mc .mc-in { transition-delay: .07s; }
.mc-back, .mc-front { position: absolute; inset: 0; border-radius: 3px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.mc-back { background: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 1px, transparent 1px 4px), var(--accent); border: 1.5px solid #fff; }
.mc-front { background: #fff; color: var(--ink); transform: rotateY(180deg); font: 600 10px/1 var(--sans); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.mc-front i { font-style: normal; font-size: 9px; }
.mc-front.red { color: var(--red); }

/* ---------- shared ---------- */
main.wrap { padding-top: 48px; padding-bottom: 40px; min-height: 60vh; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eyebrow { font: 500 13px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.eyebrow .s { margin-right: 8px; }
.page-title { font: 400 clamp(48px, 7vw, 76px)/1 var(--serif); color: var(--ink); margin: 0 0 12px; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 18px; margin: 0 0 56px; }
h3 { font: 500 26px/1.2 var(--serif); color: var(--ink); margin: 0 0 6px; }
h4 { font: 600 16px/1.4 var(--sans); color: var(--ink); margin: 0; }
.meta { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 36px 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--body); background: transparent; cursor: pointer; font-family: var(--sans); transition: border-color .15s, color .15s; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pill.solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- home: the table ---------- */
.table { position: relative; display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: center; padding: 64px 64px 64px 72px; border-radius: 28px;
  background: radial-gradient(120% 140% at 80% 20%, rgba(233,241,234,.8) 0%, rgba(221,233,224,.8) 55%, rgba(211,226,215,.83) 100%); border: 1px solid #cfdcd2; backdrop-filter: blur(1.5px); overflow: hidden; }
.table::after { content: ""; position: absolute; inset: 12px; border-radius: 20px; border: 1px dashed rgba(61,107,85,.22); pointer-events: none; }
.hello { font: italic 400 22px var(--serif); color: var(--accent); margin: 0; }
.table h1 { font: 500 clamp(44px, 6vw, 72px)/1.02 var(--serif); color: var(--ink); margin: 2px 0 10px; letter-spacing: -0.02em; }
.sub { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 28px; font-weight: 500; }
.intro { font-size: 18px; line-height: 1.75; margin: 0 0 14px; max-width: 54ch; }
.intro b { color: var(--ink); font-weight: 600; }
.table .pill { background: rgba(255,255,255,.55); border-color: rgba(61,107,85,.25); }
.table .pill.solid { background: var(--ink); color: #fff; border-color: var(--ink); }

/* the hand: photo as a playing card */
.hand { position: relative; width: 320px; height: 448px; justify-self: center; }
.pc { position: absolute; inset: 0; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px rgba(30,50,40,.18), 0 2px 6px rgba(0,0,0,.06); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.pc-photo { padding: 40px 30px; }
.pc-photo img, .photo-ph { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.photo-ph { display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, #eef2ee, #dfe7e1); color: var(--muted); font-size: 15px; }
.photo-ph small { font-size: 12px; opacity: .8; }
.pc .ix { position: absolute; top: 12px; left: 13px; font: 600 17px/1.05 var(--serif); text-align: center; color: var(--ink); }
.pc .ix.red { color: var(--red); }
.pc .ix.flip { top: auto; left: auto; bottom: 12px; right: 13px; transform: rotate(180deg); }
.below { margin-top: 32px; }
.card .now-list, .card .exp-list { list-style: none; padding: 0; margin: 20px 0 0; }
.now-list li, .exp-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.now-list li:first-child, .exp-list li:first-child { border-top: 0; padding-top: 0; }
.exp-list li { display: flex; justify-content: space-between; gap: 16px; }
.exp-list .role { color: var(--muted); font-size: 15px; }
.exp-list .when { color: var(--muted); font-size: 14px; white-space: nowrap; }
.more { display: inline-block; margin-top: 20px; color: var(--accent); text-decoration: none; font-weight: 500; font-size: 15px; }
.more:hover { text-decoration: underline; }

/* page headers with a suit */
.page-head { display: flex; align-items: flex-start; gap: 22px; margin-bottom: 8px; }
.page-suit { font-size: 44px; line-height: 1; margin-top: 8px; color: var(--ink); }
.tabs .s { margin-right: 6px; font-size: 13px; }

/* ---------- work ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline > li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { color: var(--muted); font-size: 14px; }
.timeline .role { margin: 2px 0 0; color: var(--body); }
.timeline ul, .card ul { padding-left: 18px; margin: 12px 0 0; }
.timeline ul li, .card ul li { margin: 6px 0; }
.award { padding: 14px 0; border-top: 1px solid var(--line); }
.award:first-of-type { border-top: 0; padding-top: 0; }
.award p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- play ---------- */
.rides { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ride { padding: 36px; }
.ride-num { font: 400 88px/1 var(--serif); color: var(--ink); letter-spacing: -0.03em; margin-bottom: 14px; }
.ride-num small { font: 500 16px var(--sans); color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.elev { width: 100%; height: 64px; margin: 20px 0 8px; display: block; }
.elev-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.elev-fill { fill: rgba(61,107,85,.08); }
.tile { border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); isolation: isolate; transform: translateZ(0); transition: box-shadow .25s ease, border-color .25s ease; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.ph { display: flex; align-items: flex-end; padding: 14px; background: linear-gradient(160deg, #ece6da, #e1d9c9); }
.tile.ph span { font-size: 13px; color: var(--muted); }
.tiles { display: grid; gap: 14px; }
.ride-photos { display: grid; gap: 12px; margin-top: 24px; grid-template-columns: 1fr 1fr; }
.ride-photos .tile:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.tiles.travel { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.hobbies { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.hobby .tile { aspect-ratio: 4 / 5; }
.tiles.screens { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.tiles.screens .tile { aspect-ratio: 3 / 4; }
.tiles.screens .tile img { object-position: top; }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 15px; color: var(--ink); }
figcaption span { color: var(--muted); margin-left: 6px; }
.hobby .tile { margin-bottom: 20px; }

/* ---------- eats ---------- */
.beli { list-style: none; padding: 0; margin: 0; }
.beli li { display: grid; grid-template-columns: 48px 1fr auto; gap: 20px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); }
.beli li:last-child { border-bottom: 1px solid var(--line); }
.rank { font: 400 26px var(--serif); color: var(--muted); }
.order { margin: 4px 0 0; font-size: 15px; }
.score { position: relative; width: 56px; height: 56px; display: grid; place-items: center; font-weight: 600; font-size: 16px; }
.score.hi { color: #2f7d55; border-color: #2f7d55; }
.score.mid { color: #b08a2e; border-color: #b08a2e; }
.score.lo { color: var(--red); border-color: var(--red); }

/* ---------- quotes / reads ---------- */
.deal-area { display: flex; align-items: center; gap: 48px; margin-bottom: 48px; flex-wrap: wrap; }
.deal-stage { display: flex; align-items: center; gap: 56px; }
/* the blackjack shoe */
.shoe { position: relative; width: 210px; height: 140px; flex: none; }
.deal-stage { --from-x: -229px; --from-y: 30px; }   /* card starts at the shoe's front slot */
.shoe svg { width: 100%; height: 100%; display: block; overflow: visible; }
.qcard { width: 300px; height: 200px; perspective: 1000px; cursor: pointer; flex: none; opacity: 0; }
.qcard.dealing { animation: deal 1.1s cubic-bezier(.2,.8,.25,1) forwards; }
.qcard.toss { opacity: 1; animation: toss .36s ease-in forwards; }
@keyframes deal {
  0%   { opacity: 0; transform: translate(var(--from-x, -205px), var(--from-y, 24px)) rotate(-10deg) scale(.42); }
  12%  { opacity: 1; }
  65%  { opacity: 1; transform: translate(0, -22px) rotate(3deg) scale(1.07); }
  100% { opacity: 1; transform: none; }
}
@keyframes toss { to { opacity: 0; transform: translate(60px, -30px) rotate(12deg) scale(.9); } }
.qcard-inner { position: relative; width: 100%; height: 100%; transition: transform .8s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.qcard.flipped .qcard-inner { transform: rotateY(180deg); }
.qcard-back, .qcard-front { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 8px 24px rgba(40,30,10,.14); }
.qcard-back { background: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 2px, transparent 2px 9px), repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 2px, transparent 2px 9px), var(--accent); border: 6px solid #fff; }
.qcard-front { background: #fff; transform: rotateY(180deg); padding: 28px 28px 22px; display: flex; flex-direction: column; justify-content: center; }
.qcard-front blockquote { margin: 0; font: italic 400 19px/1.35 var(--serif); color: var(--ink); }
.qcard-front cite { margin-top: 10px; font: normal 13px var(--sans); color: var(--muted); }
.ix { position: absolute; top: 9px; left: 11px; font: 600 13px/1.05 var(--sans); text-align: center; color: var(--ink); }
.ix.red { color: var(--red); }
.deal-copy p { margin: 0 0 16px; color: var(--muted); max-width: 36ch; }
.quotes { list-style: none; padding: 0; margin: 0; }
.quote { padding: 30px 0; border-top: 1px solid var(--line); }
.quote:first-child { border-top: 0; padding-top: 0; }
.quote blockquote { margin: 0; font: italic 400 clamp(26px, 3.2vw, 38px)/1.3 var(--serif); color: var(--ink); max-width: 30ch; }
.quote figcaption { color: var(--muted); font-size: 16px; margin-top: 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--body); border-radius: 999px; padding: 6px 14px; font: 14px var(--sans); cursor: pointer; }
.chip.on, .chip:hover { color: var(--accent); border-color: var(--accent); }
.reads { list-style: none; padding: 0; margin: 0; }
.reads li { display: grid; grid-template-columns: 80px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); }
.reads li p:last-child { margin: 8px 0 0; }
.reads a { text-decoration: none; border-bottom: 1px solid var(--line); }
.reads a:hover { color: var(--accent); border-color: var(--accent); }
.rtype { font-size: 12px; letter-spacing: .14em; color: var(--accent); padding-top: 3px; }

.foot { display: flex; justify-content: space-between; padding-top: 28px; padding-bottom: 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .nav-inner { height: auto; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 14px; padding-bottom: 10px; }
  .tabs { gap: 22px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  main.wrap { padding-top: 36px; }
  .table { grid-template-columns: 1fr; padding: 40px 24px 48px; gap: 40px; }
  .hand { order: -1; width: 250px; height: 350px; margin-right: 30px; }
  .page-suit { font-size: 32px; margin-top: 6px; }
  .grid-2, .rides { grid-template-columns: 1fr; }
  .card { padding: 26px 22px; }
  .ride { padding: 26px 22px; }
  .ride-num { font-size: 68px; }
  .timeline > li { grid-template-columns: 1fr; gap: 6px; }
  .exp-list li { flex-direction: column; gap: 2px; }
  .tiles.screens { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .tiles.screens .tile { scroll-snap-align: start; }
  .reads li { grid-template-columns: 1fr; gap: 4px; }
  .deal-stage { gap: 18px; }
  .shoe { width: 84px; height: 56px; }
  .deal-stage { --from-x: -143px; --from-y: 12px; }
      .qcard { width: 240px; height: 180px; }
  .qcard-front { padding: 24px 20px 16px; }
  .qcard-front blockquote { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .qcard { opacity: 1 !important; } }

/* clickable photos + lightbox */
.tile img { cursor: zoom-in; transition: transform .45s ease; border-radius: inherit; }
.tile:has(img):hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tile:hover img { transform: scale(1.035); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(24,22,18,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade .2s ease; }
.lightbox img { max-width: min(1200px, 100%); max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox p { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #eee; font-size: 14px; margin: 0; }
@keyframes fade { from { opacity: 0; } }

/* faint ridge line behind the footer (cycling / skiing nod) */
.ridge { display: block; width: 100%; height: 90px; margin-top: 8px; color: var(--accent); opacity: .06; }
.page-suit.red { color: var(--red); }
.ride-photos .tile:nth-child(2):last-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.ride-photos .tile:only-child { aspect-ratio: 4 / 3; }
.ride-photos .tile:only-child img { object-position: center; }

/* photo galleries: fixed columns, each photo keeps its real shape and its space is reserved */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.gallery.bikes { margin-top: 24px; }
.gcol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.gallery figure { margin: 0; }
.tile.nat img { height: 100%; }
@media (max-width: 820px) { .gallery { grid-template-columns: 1fr; } }
.lead-line { max-width: 62ch; margin: -4px 0 28px; font-size: 18px; }
/* route maps keep their full shape */
.ride-photos .tile:only-child { aspect-ratio: auto; }
.ride-photos .tile:only-child img { height: auto; }

/* section headers (bigger than the old eyebrow labels) */
.sec-title { font: 500 30px/1.15 var(--serif); color: var(--ink); margin: 0 0 18px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; letter-spacing: -0.01em; }
.sec-title .s { font-size: 22px; margin-right: -2px; }
.sec-title span:not(.s) { font: 500 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.lead-line { margin: -6px 0 22px; }
.page-sub { margin-bottom: 40px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery figure.reveal { -webkit-column-break-inside: avoid; }
.reveal.in-view { opacity: 1; transform: none; }
@media (max-width: 820px) { .sec-title { font-size: 26px; } }
.pc-photo img { object-position: 50% 30%; }
.qnote { margin: 12px 0 0; max-width: 60ch; color: var(--body); font-size: 16px; padding-left: 14px; border-left: 2px solid var(--accent); }
.page-sub { max-width: 72ch; }
.deal-btn { font-size: 18px; padding: 16px 34px; min-width: 210px; justify-content: center; font-weight: 600; }
.aside { font: italic 400 20px/1.4 var(--serif); color: var(--accent); margin: -28px 0 32px; max-width: 60ch; }

/* score rings fill up to the score when the row scrolls in */
.score svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.score .trk { fill: none; stroke: var(--line); stroke-width: 3; }
.score .arc { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1) .15s; }
.beli li.in-view .score .arc, .beli li:not(.reveal) .score .arc { stroke-dashoffset: calc(150.8 * (1 - var(--p))); }
.score b { position: relative; font-weight: 600; }

/* sushi rain */
.sushi-rain { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.sushi-rain span { position: absolute; top: -60px; animation-name: sushi-fall; animation-timing-function: cubic-bezier(.35,.1,.6,1); animation-fill-mode: both; filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); }
@keyframes sushi-fall {
  0%   { transform: translate(0, 0) rotate(0); opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate(var(--drift), 110vh) rotate(var(--spin)); opacity: 0; }
}

/* company logos */
.logo { position: relative; flex: none; width: 44px; height: 44px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.logo::before { content: attr(data-i); font: 600 14px var(--sans); color: var(--accent); letter-spacing: .02em; }
.logo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; background: #fff; }
.logo.sm { width: 34px; height: 34px; border-radius: 8px; }
.logo.sm::before { font-size: 12px; }
.logo.sm img { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
.co { display: flex; align-items: center; gap: 14px; }
.co .role { margin-top: 0; }
.exp-list li { align-items: center; gap: 14px; }
.exp-main { flex: 1; min-width: 0; }
@media (max-width: 820px) {
  .exp-list li { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .exp-list .when { width: 100%; padding-left: 46px; }
}

/* home: EV-convergence lines behind the intro */
.hero-wrap { position: relative; }
.hero-wrap > .table { z-index: 1; }
.table > *:not(.ev-key) { position: relative; z-index: 1; }
/* full-bleed: runs edge to edge of the screen, behind the green panel */
.ev-bg { position: absolute; top: -40px; bottom: -40px; left: 50%; width: 100vw; height: calc(100% + 80px); transform: translateX(-50%); z-index: 0; pointer-events: none; }
.ev-bg path { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: .4; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: ev-draw 3.2s cubic-bezier(.3,.6,.3,1) forwards; }
.ev-bg path.hot { stroke: var(--red); opacity: .55; }
.ev-line { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 6; opacity: .55; vector-effect: non-scaling-stroke; }
.ev-label { font: italic 500 15px var(--serif); fill: var(--accent); opacity: .55; }
@keyframes ev-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ev-bg path { animation: none; stroke-dashoffset: 0; } }
.table > .ev-key { position: absolute; right: 30px; bottom: 22px; z-index: 1; display: flex; align-items: center; gap: 8px; font: italic 400 13px var(--serif); color: var(--accent); opacity: .7; }
.ev-key i { font-weight: 600; }
.ev-dash { width: 26px; border-top: 1.5px dashed var(--accent); opacity: .7; }
@media (max-width: 820px) { .table > .ev-key { right: 22px; bottom: 16px; font-size: 12px; } }

/* hover the margins beside the green panel: lines come into focus + caption appears */
.ev-bg path, .ev-line { transition: opacity .12s ease-out, stroke-width .12s ease-out; }
.hero-wrap.ev-focus .ev-bg path, .hero-wrap.ev-focus .ev-line { transition-duration: .3s; }
.hero-wrap.ev-focus .ev-bg path { opacity: .8; stroke-width: 1.8; }
.hero-wrap.ev-focus .ev-bg path.hot { opacity: .95; }
.hero-wrap.ev-focus .ev-line { opacity: .9; }
.hero-wrap.ev-focus .table { opacity: .94; }
.table { transition: opacity .12s ease-out; }
/* caption chip: sits just above where the EV line meets the screen edge, in a contrasting color */
.ev-tip { position: absolute; z-index: 2; pointer-events: none; display: flex; align-items: center; gap: 7px; white-space: nowrap;
  top: calc(-40px + var(--yr) * (100% + 80px) - 40px); right: calc((100% - 100vw) / 2 + 16px);
  font: italic 600 15px var(--serif); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  box-shadow: 0 4px 14px rgba(30,40,30,.10); opacity: 0; transform: translateY(4px); transition: opacity .1s ease-out, transform .1s ease-out; }
.hero-wrap.ev-focus .ev-tip { transition-duration: .25s; }
.ev-tip i { font-weight: 600; color: var(--red); }
.ev-tip .ev-dash { width: 20px; border-top: 1.5px dashed var(--accent); }
.hero-wrap[data-side="left"] .ev-tip { right: auto; left: calc((100% - 100vw) / 2 + 16px); top: calc(-40px + var(--yl) * (100% + 80px) - 40px); }
.hero-wrap.ev-focus .ev-tip { opacity: 1; transform: none; }
.beli.worst .rank { color: var(--red); opacity: .7; }
.beli.top li.extra { display: none; }
.beli.top.open li.extra { display: grid; }
.see-more { margin-top: 20px; }
.rule.rule-lg { margin: 20px 0 22px; }
/* compact page header on Eats */
.page-head .aside { margin: -30px 0 0; }
.head-pills { margin-top: 14px; gap: 10px; }
.pill.sm { padding: 7px 15px; font-size: 14px; }
.page-head:has(.head-pills) { margin-bottom: 28px; }
.page-head:has(.head-pills) .page-sub { margin-bottom: 36px; }
.beli li { padding: 15px 0; }

/* footer sign-off: queen slides over, king topples, "checkmate" */
.foot { align-items: center; }
.foot-right { display: flex; align-items: center; gap: 18px; }
.mate { display: inline-flex; align-items: flex-end; gap: 10px; height: 38px; }
.mate em { font: italic 400 16px var(--serif); color: var(--muted); opacity: 0; transform: translateY(3px); transition: opacity .5s ease 1.7s, transform .5s ease 1.7s; }
.mate .board { position: relative; width: 94px; height: 32px; border-bottom: 1px solid var(--line); }
.mate svg { position: absolute; bottom: 1px; width: 21px; height: 29px; }
.mate .q { left: 0; fill: var(--ink); opacity: 0; transform: translateX(-12px); }
.mate .k { left: 39px; fill: var(--red); transform-origin: 85% 100%; }
.mate.go .q { animation: mate-queen 1s cubic-bezier(.2,.8,.2,1) forwards; }
.mate.go .k { animation: mate-king .8s cubic-bezier(.3,.1,.4,1) .92s forwards; }
.mate.go em { opacity: 1; transform: none; }
@keyframes mate-queen {
  0%   { opacity: 0; transform: translateX(-12px); }
  70%  { opacity: 1; transform: translateX(21px); }   /* tap the king */
  100% { opacity: 1; transform: translateX(14px); }
}
@keyframes mate-king {
  0%   { transform: rotate(0); }
  15%  { transform: rotate(-6deg); }                  /* wobble */
  80%  { transform: translateX(4px) rotate(96deg); }
  100% { transform: translateX(4px) rotate(90deg); }  /* down */
}
@media (prefers-reduced-motion: reduce) {
  .mate .q { opacity: 1; transform: translateX(14px); }
  .mate .k { transform: translateX(4px) rotate(90deg); }
  .mate em { opacity: 1; transform: none; }
}
@media (max-width: 820px) { .foot { flex-wrap: wrap; gap: 10px; } }
/* active tab: suit + word both go green, whatever the suit's color */
.tabs a[aria-current="page"] .s { color: var(--accent); }

/* the hand: two photo cards; click swaps which one is in front */
.hand { outline: none; }
.hand.swappable, .hand.swappable .pc { cursor: pointer; }
.plain-back { width: 100%; height: 100%; display: grid; place-items: center; }
.plain-back .pip { font-size: 120px; line-height: 1; opacity: .9; }
.pc.front  { z-index: 2; transform: rotate(-4deg); }
.pc.behind { z-index: 1; transform: translate(34px, -10px) rotate(9deg); }
.hand:hover .pc.front  { transform: translate(-12px, 0) rotate(-7deg); }
.hand:hover .pc.behind { transform: translate(78px, -6px) rotate(15deg); }
.pc.behind.pull { transform: translate(190px, 0) rotate(20deg) !important; }
.hand:focus-visible .pc.front { box-shadow: 0 0 0 3px var(--accent), 0 18px 40px rgba(30,50,40,.18); }
.photo-ph .pip { display: block; font-size: 64px; line-height: 1; margin-bottom: 8px; }
.pc-tag { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font: italic 400 14px var(--serif); color: var(--muted); }
.hand-hint { position: absolute; left: 0; right: 0; bottom: -34px; text-align: center; font: italic 400 14px var(--serif); color: var(--accent);
  opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.hand:hover .hand-hint { opacity: .85; }
.hand.used .hand-hint { opacity: 0 !important; }
@media (hover: none) { .hand-hint { opacity: .7; } .hand.used .hand-hint { opacity: 0; } }
