/* Reasonwell Arcade hub and Today pages. Built on the arcade shell's tokens. */
.hub-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .hub-wrap { padding-inline: 28px; } }
.hub { display: block; padding-bottom: 48px; }
.hub-eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 800 .74rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hub-eyebrow svg { width: 16px; height: 16px; }
.hub-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 40px 28px; }
.hub-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-top: 10px; }
.hub-hero h1 em { font-style: normal; background: linear-gradient(90deg, #2B7A9E, #C2255C 50%, #E0672C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hub-lede { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; margin: 14px 0 0; }

.hub-today { display: grid; gap: 14px; padding: 22px; border-radius: 26px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.hub-today h2 { font-size: 1.4rem; margin-top: 6px; }
.hub-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hub-stop { display: grid; grid-template-columns: 30px 40px 1fr; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--panel-2); }
/* the stop number sits on a darker shade of the game's color, so the white numeral reads clearly on every game */
.hub-stop-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 72%, #000); color: #fff; font: 800 .9rem var(--f-display); }
.hub-stop.done .hub-stop-n { background: var(--good); }
.hub-stop-em svg { width: 40px; height: 40px; display: block; }
.hub-stop-t b { display: block; font-family: var(--f-display); font-size: 1.02rem; }
.hub-stop-t small { color: var(--ink-3); }
.hub-today .ar-btn { justify-self: start; }
.hub-today-map { display: block; border-radius: 18px; overflow: hidden; border: 1.5px solid #A8936A; box-shadow: var(--shadow); background: #BCDDE6; }
.hub-today-map img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
/* a wide card (tablets) centers the picture at its 340 px height instead of cutting off its top and bottom (hub.js sets the max-width) */
.hub-today-map { justify-self: center; width: 100%; }
/* today's stops on the game cards */
.hub-card-today { justify-self: start; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 2px; padding: 2px 10px 2px 8px; border-radius: 999px; background: color-mix(in srgb, #F2B134 26%, var(--panel)); border: 1px solid color-mix(in srgb, #F2B134 60%, transparent); font: 800 .74rem var(--f-ui); letter-spacing: .04em; color: var(--ink); }
.hub-card-today svg { width: 14px; height: 14px; }
.hub-card-today.done { background: color-mix(in srgb, var(--good) 16%, var(--panel)); border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.hub-card-ds { color: #B57A08; letter-spacing: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-card-ds { color: #F2B134; } }
:root[data-theme="dark"] .hub-card-ds { color: #F2B134; }

.hub-section-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin: 18px 0 16px; }
.hub-section-h h2 { font-size: 1.7rem; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-filters { display: grid; gap: 8px; justify-items: end; }
.hub-shown { margin: -6px 0 14px; color: var(--ink-2); font-weight: 600; font-size: .94rem; }
.hub-shown:empty { margin: 0; }
@media (max-width: 760px) { .hub-filters { justify-items: start; } }
.hub-chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 700; font-size: .9rem; }
.hub-chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.hub-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
/* an odd card out spans the row, so no card sits alone beside a gap */
.hub-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.hub-card { display: flex; }
.hub-card-link { display: grid; grid-template-columns: 150px minmax(0, 1fr); width: 100%; border-radius: 24px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.hub-card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.hub-card-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hub-card-art { position: relative; min-height: 100%; background: linear-gradient(160deg, color-mix(in srgb, var(--sky) 70%, #fff), var(--sky) 55%, color-mix(in srgb, var(--accent) 55%, var(--sky))); display: grid; place-items: center; overflow: hidden; }
.hub-card-art::after { content: ''; position: absolute; inset: auto -30% -50px -30%; height: 110px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 70%, var(--deep)); opacity: .5; }
.hub-card-em { position: absolute; z-index: 2; right: 8px; top: 8px; width: 34px; height: 34px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .2)); transition: transform .3s var(--spring); }
.hub-card-host { position: relative; z-index: 1; width: 128px; height: 128px; }
.hub-card-host svg { width: 100%; height: 100%; display: block; }
.hub-card-hostline { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.hub-cast-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 44px; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hub-cast-faces { display: inline-flex; }
.hub-cast-faces svg { width: 42px; height: 42px; margin-left: -10px; background: var(--panel); border-radius: 50%; border: 2px solid var(--line); }
.hub-cast-faces svg:first-child { margin-left: 0; }
/* Pip sits beside the eyebrow and the heading (never alone on a row of his own on a phone) */
.hub-today-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: start; }
.hub-today-head .hub-eyebrow { grid-column: 1; grid-row: 1; align-self: center; }
.hub-today-head h2 { grid-column: 1; grid-row: 2; }
.hub-today-pip { grid-column: 2; grid-row: 1 / span 2; width: 74px; height: 74px; margin: -8px -4px 0 0; }
.hub-today-pip svg { width: 100%; height: 100%; display: block; }
.hub-card-em svg { width: 100%; height: 100%; display: block; }
.hub-card-link:hover .hub-card-em { transform: rotate(-6deg) scale(1.06); }
.hub-card-body { display: grid; gap: 4px; padding: 16px 18px 18px; align-content: start; }
.hub-card-kicker { font: 800 .7rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hub-card-title { font-family: var(--f-display); font-size: 1.38rem; line-height: 1.1; }
.hub-card-skill { font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.hub-card-tag { color: var(--ink-2); font-size: .95rem; line-height: 1.45; margin-top: 4px; }
.hub-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.hub-meter { flex: 1 1 40px; min-width: 40px; height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.hub-meter i { display: block; height: 100%; width: calc(var(--f) * 100%); background: linear-gradient(90deg, #F2B134, #E8A317); border-radius: 4px; }
.hub-starcount { display: inline-flex; align-items: center; gap: 3px; font-size: .88rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hub-starcount svg { width: 16px; height: 16px; color: #E8A317; }
.hub-starcount b { color: var(--ink); }
.hub-play { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: color-mix(in srgb, var(--accent) 78%, #000); white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-play { color: var(--ink); } }
:root[data-theme="dark"] .hub-play { color: var(--ink); }
.hub-play svg { width: 18px; height: 18px; }

.hub-grownups { margin-top: 40px; }
.hub-grownups h2 { font-size: 1.7rem; margin-bottom: 14px; }
.hub-gu-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 24px; }
.hub-gu-grid > div { padding: 20px 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.hub-gu-grid h3 { font-size: 1.15rem; margin-bottom: 10px; }
.hub-gu-grid ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); }
.hub-tbl { overflow-x: auto; border-radius: 10px; }
.hub-tbl:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hub-tbl table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hub-tbl th, .hub-tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hub-tbl thead th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.hub-tbl tbody th { font-family: var(--f-display); white-space: nowrap; }
.hub-cc { font-family: var(--f-math); font-size: .8rem; color: var(--ink-3); }
.hub-cc a { display: inline-block; padding-block: 4px; min-height: 26px; color: var(--ink-2); text-underline-offset: 2px; }
.hub-toward { display: block; margin-top: 2px; font-family: var(--f-ui); }
.hub-note { margin: 10px 0 0; font-size: .85rem; color: var(--ink-3); }
@media (max-width: 860px) {
  .hub-hero { grid-template-columns: 1fr; padding-block: 24px 12px; gap: 20px; }
  .hub-gu-grid { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card-link { grid-template-columns: 104px minmax(0, 1fr); }
  .hub-card-host { width: 92px; height: 92px; }
  .hub-today .ar-btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .hub-card-link, .hub-card-em { transition: none; } }
/* phones: the standards table becomes a list, so nothing scrolls sideways */
@media (max-width: 560px) {
  .hub-tbl table, .hub-tbl tbody, .hub-tbl tr, .hub-tbl th, .hub-tbl td { display: block; }
  .hub-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hub-tbl tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .hub-tbl th, .hub-tbl td { padding: 0; border: 0; }
  .hub-tbl tbody th { white-space: normal; font-size: 1rem; }
  .hub-tbl td { display: inline; color: var(--ink-2); }
  .hub-tbl td:nth-of-type(2)::before { content: ' · Grades '; }
  .hub-tbl td.hub-cc { display: block; margin-top: 2px; }
}
/* narrow phones: the card art narrows and the footer wraps, so nothing is cut off */
@media (max-width: 400px) {
  .hub-card-link { grid-template-columns: 84px minmax(0, 1fr); }
  .hub-card-host { width: 78px; height: 78px; }
  .hub-card-body { padding: 14px 14px 16px; }
  .hub-card-title { font-size: 1.24rem; }
  .hub-today { padding: 16px; }
}
@media (max-width: 400px) { .hub-today-pip { width: 58px; height: 58px; margin-top: -4px; } }
/* the top bar's star count says what it counts (Today's stars are on Today's card) */
.hub-stars-l { display: none; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-left: 2px; }
@media (min-width: 800px) { .hub-stars-l { display: inline; } }
/* a short way down to the games from the top of the page (on a short screen the map card comes first) */
.hub-hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; }
.hub-hero-links .hub-cast-link { margin-top: 0; }
.hub-jump { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--panel); color: var(--ink); border: 2px solid var(--ink); font-weight: 800; text-decoration: none; }
.hub-jump:hover { background: var(--panel-2, var(--panel)); }
.hub-games { scroll-margin-top: 76px; }
#games-h { scroll-margin-top: 80px; }
