/* Slashed — the overview page and the share sheet.

   Loaded after styles.css, which owns the tokens, the shared type pieces
   (.eyebrow, .cta, .link, .orb, .bare), the keyframes and the chapter cards
   (.cc-grid / .cc). Same house rules here: the type is the graphic, nothing
   gets a box, one gold accent per view. The page is dark; the only light is a
   dune light behind the hero that fades out before it reaches an edge. */

/* --------------------------------------------------------------------- hub */

.hub-scroll {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none;
}
.hub-scroll::-webkit-scrollbar { display: none; }
.hub-inner {
  position: relative; z-index: 1; min-height: 100%; max-width: 620px; margin: 0 auto;
  padding-bottom: calc(var(--sab) + 150px);
}
/* The page is black from the top; the dunes behind barely read through. */
.hub-inner::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 5, 4, .78) 0, rgba(6, 5, 4, .92) 180px, var(--bg) 420px);
}

.hub-nav {
  position: sticky; top: 0; z-index: 20; pointer-events: none;
  display: flex; justify-content: space-between;
  padding: calc(var(--sat) + 8px) 12px 0;
}
.hub-nav .orb { pointer-events: auto; position: relative; }
.hub-nav::before { /* once scrolled, content fades out under the floating glyphs */
  content: ""; position: absolute; left: 50%; width: 100vw; transform: translateX(-50%); top: 0; bottom: -34px;
  background: linear-gradient(180deg, var(--bg) 35%, rgba(6, 5, 4, 0)); opacity: 0; transition: opacity .3s;
}
#hub.scrolled .hub-nav::before { opacity: 1; }

.hub-title { display: flex; align-items: baseline; justify-content: space-between; padding: 18px var(--pad) 0; }
.hub-title h1 { font: 400 clamp(56px, 17vw, 84px)/.95 var(--display); letter-spacing: -.025em; }
.year-wrap { position: relative; }
.year-pill { display: inline-flex; align-items: center; gap: 6px; height: 44px; font: 500 14px/1 var(--mono); letter-spacing: .06em; color: var(--gold); }
.year-pill svg { font-size: 13px; }
.menu {
  position: absolute; right: -8px; top: 42px; z-index: 30; min-width: 130px; padding: 6px 0;
  background: rgba(10, 9, 7, .96); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  animation: pop .2s var(--ease);
}
.menu[hidden] { display: none; }
.menu button { display: flex; width: 100%; justify-content: space-between; padding: 12px 16px; font: 500 14px/1 var(--mono); letter-spacing: .06em; color: var(--ink-2); }
.menu button[aria-selected="true"] { color: var(--gold); }
.menu i { font-style: normal; }

.months {
  display: flex; gap: 24px; overflow-x: auto; padding: 20px var(--pad) 4px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent);
}
.months::-webkit-scrollbar { display: none; }
.months button { flex: none; padding: 6px 0; font: 500 17px/1 var(--sans); letter-spacing: -.01em; color: var(--ink-3); transition: color .25s; font-variant-numeric: tabular-nums; }
.months button:last-child { padding-right: 40px; }
.months button.on { color: var(--ink); }

/* The hero is words over the dunes, not a slab: the art has no edge. */
.hero, .month-head { position: relative; isolation: isolate; margin: 26px var(--pad) 0; }
.hero { display: block; aspect-ratio: 1 / .86; cursor: pointer; }
.month-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 64px 0 8px; }
.hero-art {
  position: absolute; z-index: -1; inset: -34px calc(var(--pad) * -1) -30px; overflow: hidden; pointer-events: none;
  -webkit-mask-image: radial-gradient(74% 62% at 36% 52%, #000 18%, transparent 100%);
  mask-image: radial-gradient(74% 62% at 36% 52%, #000 18%, transparent 100%);
}
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 18px; text-align: left; }
.hero-k { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.hero h2 { font: 400 clamp(60px, 18.5vw, 104px)/.88 var(--display); letter-spacing: -.028em; color: var(--ink); }
.hero h2 b { display: block; font-weight: 400; font-style: italic; color: var(--gold); }
.hero-play { display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); transition: opacity .2s; }
.hero-play svg { font-size: 11px; color: var(--gold); }
.hero:active .hero-play { opacity: .5; }
.month-fig { font: 400 clamp(54px, 16.5vw, 96px)/.9 var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.delta { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* Section labels are small and quiet; the content under them does the talking. */
.sec {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 68px var(--pad) 22px;
  font: 500 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.sec span::before { content: "/"; margin-right: .65em; opacity: .6; }
.sec i { font-style: normal; font-variant-numeric: tabular-nums; }
.caption { margin: 18px var(--pad) 0; font: 400 14px/1.5 var(--sans); color: var(--ink-2); max-width: 36ch; }
.fine { margin: 64px var(--pad) 0; font: 500 10px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.hub-cards { padding: 0 var(--pad); }

/* Charts are strokes, not blocks. */
.chart { display: flex; align-items: flex-end; height: 168px; padding: 0 var(--pad); }
.chart button {
  flex: 1; height: 100%; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 12px;
  font: 500 9.5px/1 var(--mono); color: var(--ink-3); transition: color .2s;
}
.chart i { display: block; width: 3px; border-radius: 1.5px; min-height: 2px; background: rgba(245, 239, 226, .22); transition: background .2s; }
.chart button i { height: calc(var(--h) * (100% - 22px)); }
.chart .pk i, .chart i.pk { background: var(--gold); }
.chart .pk { color: var(--gold); }
.chart.days { height: 128px; justify-content: space-between; }
.chart.days i { width: 2px; border-radius: 1px; height: calc(var(--h) * 100%); }

/* The six types: yours is the headline, the other five wait quietly below. */
.types { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 var(--pad); }
.type { display: flex; flex-direction: column; align-items: flex-start; text-align: left; transition: opacity .2s, color .25s; }
.type b { font: 400 clamp(26px, 7.6vw, 34px)/1.12 var(--display); letter-spacing: -.012em; color: var(--ink-3); transition: color .25s; }
.type.own { gap: 14px; margin-bottom: 26px; }
.type.own b { font: italic 400 clamp(56px, 17.5vw, 96px)/.9 var(--display); letter-spacing: -.025em; color: var(--gold); }
.type.own span { font: 400 15px/1.5 var(--sans); color: var(--ink-2); max-width: 32ch; }
.type:active { opacity: .5; }

/* Month view: merchants as plain lines of type. */
.rows { padding: 0 var(--pad); }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 9px 0; }
.row span { min-width: 0; font: 400 clamp(24px, 7vw, 32px)/1.1 var(--display); letter-spacing: -.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row b { flex: none; font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--ink-2); }

.hub-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 30px; margin: 72px var(--pad) 0; }
.space-link { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; text-align: left; transition: opacity .2s; }
.space-link b { font: 400 clamp(26px, 7.4vw, 36px)/1.1 var(--display); letter-spacing: -.01em; }
.space-link span { font: 400 13px/1.45 var(--sans); color: var(--ink-3); max-width: 34ch; }
.space-link:active { opacity: .5; }

/* Bottom of the hub: two words and two glyphs over a fade. No bar. */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; pointer-events: none;
  padding: 54px 12px calc(var(--sab) + 12px) var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(180deg, rgba(6, 5, 4, 0), rgba(6, 5, 4, .95) 56%);
}
.dock > * { pointer-events: auto; }
.dock-main { flex: 1; min-width: 0; display: flex; align-items: baseline; text-align: left; max-width: 596px; }
.dock-text { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.dock-text b { font: italic 400 26px/1 var(--display); color: var(--gold); white-space: nowrap; }
.dock-text span { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.dock-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 21px; transition: opacity .2s; }
.dock-btn:active, .dock-main:active { opacity: .5; }
.dock-btn[data-act="play"] { font-size: 17px; color: var(--gold); }

/* ------------------------------------------------------------- share sheet */

#sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; pointer-events: auto; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .3s; }
.sheet-backdrop.on { background: rgba(0, 0, 0, .8); }
.sheet {
  width: min(100%, 560px); max-height: calc(100% - var(--sat) - 16px); overflow-y: auto; scrollbar-width: none;
  padding: 24px var(--pad) calc(var(--sab) + 24px);
  background: rgba(8, 7, 6, .97);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  transform: translateY(104%); transition: transform .42s var(--ease);
}
.sheet::-webkit-scrollbar { display: none; }
.sheet-backdrop.on .sheet { transform: none; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; }
.sheet-head h3 { font: 400 32px/1 var(--display); letter-spacing: -.015em; }
.sheet-head .link { padding: 12px 0 12px 16px; }
.preview { position: relative; display: flex; align-items: center; justify-content: center; height: min(52vh, 480px); margin: 18px 0 14px; }
.preview img { display: block; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; transition: opacity .25s; }
.preview.busy img { opacity: .3; }
.preview img:not([src]) { visibility: hidden; }
.spin { position: absolute; left: calc(50% - 11px); top: calc(50% - 11px); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(245, 239, 226, .18); border-top-color: var(--gold); opacity: 0; animation: spin .8s linear infinite; }
.preview.busy .spin { opacity: 1; }
.seg { display: flex; justify-content: center; gap: 26px; }
.seg button { flex: none; padding: 8px 0; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); transition: color .2s; }
.seg button.on { color: var(--gold); }
.sheet-actions { display: flex; align-items: baseline; justify-content: center; gap: 34px; margin-top: 16px; }
.sheet-note { min-height: 16px; margin-top: 12px; text-align: center; font: 400 12.5px/1.3 var(--sans); color: var(--ink-2); }

/* ------------------------------------------------------------- adaptations */

@media (max-height: 700px) {
  .preview { height: min(46vh, 400px); }
  .sec { margin-top: 54px; }
}
@media (min-width: 700px) {
  .sheet { margin-bottom: 24px; }
  .hero { aspect-ratio: 1 / .7; }
  .chart { height: 200px; }
}
@media (hover: hover) {
  .months button:hover { color: var(--ink-2); }
  .months button.on:hover { color: var(--ink); }
  .menu button:hover { color: var(--ink); }
  .hero:hover .hero-play, .dock-btn:hover, .dock-main:hover, .space-link:hover { opacity: .7; }
  .chart button:hover { color: var(--ink); }
  .chart button:hover i { background: rgba(245, 239, 226, .5); }
  .chart button.pk:hover i { background: var(--gold-hi); }
  .type:hover b { color: var(--ink); }
  .type.own:hover b { color: var(--gold-hi); }
  .seg button:hover { color: var(--ink-2); }
  .seg button.on:hover { color: var(--gold); }
}

.fine a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
