/* Shared pieces for the archive, mint, forge, collection, stats and FAQ pages. */

.page-head { padding: 150px var(--gutter) 40px; }
.page-head .statement { max-width: 24em; }
.page-head .facts { margin-top: 22px; max-width: 46em; }

/* segmented filters */
.filters { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; padding: 0 var(--gutter) 28px; border-bottom: 1px solid var(--hair); }
.seg { display: flex; gap: 2px; align-items: center; }
.seg .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-right: 10px; }
.seg button { padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--dim); transition: color 0.2s, background 0.2s; display: inline-flex; align-items: center; gap: 7px; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed='true'] { color: var(--fg); background: rgba(var(--tint), 0.07); }
.seg button i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.count { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); text-transform: uppercase; }

/* archive: songs */
.song-list { padding: 0 var(--gutter); }
.song-row { display: grid; grid-template-columns: 56px minmax(160px, 1.1fr) minmax(240px, 3fr) minmax(140px, 1fr); gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hair); transition: background 0.2s; }
.song-row:hover { background: rgba(var(--tint), 0.02); }
.song-row .no { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.08em; }
.song-row .name { font-size: 16px; }
.song-row .name small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.song-row canvas { width: 100%; height: 30px; }
.song-row .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--dim); text-align: right; line-height: 1.7; }
.dots { display: inline-flex; gap: 4px; margin-top: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.dots i.missing { background: transparent; box-shadow: inset 0 0 0 1px var(--c); opacity: 0.6; }

/* archive: stems */
.stem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; padding: 1px var(--gutter) 0; }
.stem-card { position: relative; outline: 1px solid var(--hair); padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: background 0.2s; }
.stem-card:hover { background: rgba(var(--tint), 0.025); }
.stem-card canvas { width: 100%; aspect-ratio: 1; }
.stem-card .cat { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--faint); }
.stem-card b { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.stem-card b i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.stem-card span { font-size: 12px; color: var(--dim); }
.stem-card.playing { background: rgba(var(--tint), 0.05); }

/* two-column object pages (mint, forge) */
.object { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: start; padding: 140px var(--gutter) 80px; max-width: 1240px; margin: 0 auto; }
.object .art .frame { width: 100%; aspect-ratio: 1; outline: 1px solid var(--hair); }
.object .art .frame svg { width: 100%; height: 100%; }
.object .art .caption { margin-top: 16px; }
.spec { border-top: 1px solid var(--line); }
.spec > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.spec dt { color: var(--dim); }
.spec dd { text-align: right; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); font-size: 16px; }
.stepper button:hover { border-color: var(--faint); }
.stepper output { min-width: 44px; text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; }
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 8px; }
.tiers div { outline: 1px solid var(--hair); padding: 12px 10px; text-align: center; font-size: 13px; color: var(--faint); transition: color 0.2s, background 0.2s; }
.tiers div b { display: block; font-weight: 400; font-size: 18px; color: var(--dim); }
.tiers div.on { color: var(--fg); background: rgba(var(--tint), 0.06); }
.tiers div.on b { color: var(--fg); }
.note { font-size: 13px; color: var(--faint); line-height: 1.6; }
.done { border: 1px solid var(--line); border-radius: 14px; padding: 20px; font-size: 14px; color: var(--dim); }
.done b { color: var(--fg); font-weight: 500; }

/* forge */
.forge { padding: 140px var(--gutter) 80px; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.holdings { display: flex; flex-direction: column; gap: 26px; }
.holdings h3 { font-size: 14px; font-weight: 400; display: flex; justify-content: space-between; color: var(--dim); }
.holdings h3 b { color: var(--fg); font-weight: 400; }
.hold-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.hold { position: relative; aspect-ratio: 1; outline: 1px solid var(--hair); transition: outline-color 0.2s, opacity 0.2s; }
.hold svg { width: 100%; height: 100%; }
.hold:hover { outline-color: var(--faint); }
.hold[aria-pressed='true'] { outline: 2px solid var(--fg); }
.hold.blocked { opacity: 0.3; }
.bench { display: flex; flex-direction: column; gap: 18px; }
/* Stays in view while you pick; scrolls inside if taller than the screen, with the button pinned below. */
.bench-card { position: sticky; top: 96px; max-height: calc(100vh - 176px); overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: clamp(22px, 2.6vw, 32px) clamp(22px, 2.6vw, 32px) 0; border: 1px solid var(--line); border-radius: 20px; }
.equation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: center; }
.equation .slot { height: 140px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--faint); font-size: 13px; }
.burn { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; align-content: center; }
.burn figure, .create figure { display: flex; flex-direction: column; gap: 10px; }
.burn .frame, .create .frame { aspect-ratio: 1; outline: 1px solid var(--hair); background: var(--frame); }
.create .frame { outline-color: var(--faint); }
.create figure { max-width: 230px; margin-left: auto; }
.burn svg, .create svg { width: 100%; height: 100%; display: block; }
.burn .caption span, .create .caption span { color: var(--faint); }
.equation .op { color: var(--faint); font-size: 24px; }
.empty { min-height: 200px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--faint); font-size: 14px; border: 1px dashed var(--line); border-radius: 14px; padding: 24px; }

/* the recipe: every stem of the song, in this forge, held, or still missing */
.recipe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.part { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; cursor: default; }
.part i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--fg)); }
.part.in { background: rgba(var(--tint), 0.1); color: var(--fg); }
.part.held { color: var(--dim); border: 1px dashed var(--faint); cursor: pointer; }
.part.held:hover { color: var(--fg); border-color: var(--fg); }
.part.held i, .part.missing i { background: transparent; box-shadow: inset 0 0 0 1px var(--c, var(--faint)); }
.part.missing { color: var(--faint); }

/* what this forge does, as plain facts */
.forge-facts { border-top: 1px solid var(--line); }
.forge-facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.forge-facts dt { color: var(--faint); }
.forge-facts dd small { display: block; margin-top: 2px; color: var(--faint); font-size: 12.5px; }

/* nothing picked yet: the songs you could forge */
.ready { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid var(--hair); }
.ready-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--hair); font-size: 14px; transition: background 0.2s; }
.ready-row:hover { background: rgba(var(--tint), 0.04); }
.ready-row b { font-weight: 400; }
.ready-row span { color: var(--faint); font-size: 13px; }
.ready-row .pick, .holdings .pick { color: var(--fg); font-size: 12.5px; border-bottom: 1px solid var(--faint); }
.go-bar { position: sticky; bottom: 0; margin-top: -4px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 0 clamp(22px, 2.6vw, 32px); background: var(--bg); }
.go-bar:has(#go[hidden]) { padding-top: 0; }
.go-bar .note { margin: 0; }

/* collection */
.groups { padding: 0 var(--gutter); display: flex; flex-direction: column; }
.group { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--hair); }
.group h3 { font-size: 18px; font-weight: 400; }
.group .sub { color: var(--faint); font-size: 12px; margin-top: 4px; }
.group .actions { display: flex; gap: 14px; margin-top: 14px; font-size: 13px; }
.group .actions a { color: var(--dim); border-bottom: 1px solid var(--line); }
.group .actions a:hover { color: var(--fg); }
.group .tokens { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.group .tokens .frame { aspect-ratio: 1; outline: 1px solid var(--hair); }
.group .tokens svg { width: 100%; height: 100%; }
.group .tokens figcaption { font-size: 12px; color: var(--dim); margin-top: 8px; }
.gate-msg { padding: 60px var(--gutter) 120px; }

/* stats */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 60px; gap: 18px; align-items: center; font-size: 13px; }
.bar .track { height: 10px; background: rgba(var(--tint), 0.04); border-radius: 5px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 5px; background: var(--c, var(--fg)); }
.bar .v { text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.album-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.album-stats > div { outline: 1px solid var(--hair); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.album-stats .name { font-size: 34px; letter-spacing: -0.02em; }
.album-stats .songs { display: flex; flex-wrap: wrap; gap: 4px; }
.album-stats .songs i { width: 14px; height: 14px; border-radius: 3px; outline: 1px solid var(--line); }
.album-stats .songs i.done { background: var(--fg); }

/* faq */
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--hair); }
.qa summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 18px; display: flex; justify-content: space-between; gap: 20px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--faint); font-weight: 300; }
.qa details[open] summary::after { content: '–'; }
.qa details > div { padding: 0 0 24px; max-width: 40em; color: var(--dim); line-height: 1.7; font-size: 15px; }
.qa details > div p + p { margin-top: 10px; }
.reqs { width: 100%; border-collapse: collapse; font-size: 13px; }
.reqs th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 400; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.reqs td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.reqs td:first-child { font-family: var(--mono); color: var(--faint); width: 54px; }
.reqs .types { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--dim); }
.reqs .types span { display: inline-flex; align-items: center; gap: 6px; }
.reqs .types i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }

@media (max-width: 960px) {
  .object, .forge { grid-template-columns: 1fr; }
  .song-row { grid-template-columns: 40px 1fr; }
  .song-row canvas, .song-row .meta { grid-column: 1 / -1; text-align: left; }
  .group { grid-template-columns: 1fr; }
  .album-stats { grid-template-columns: 1fr; }
  .equation { grid-template-columns: 1fr; }
}

/* faq: how it works */
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; }
.how-step { outline: 1px solid var(--hair); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.how-step p { font-size: 14px; color: var(--dim); line-height: 1.6; }
.how-step .piece .frame { width: 100%; }
.wide-fig .fig { margin: 28px 0; }
@media (max-width: 960px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phones: filter pills scroll sideways instead of running off the page. */
@media (max-width: 860px) {
  .filters, .toolbar { gap: 14px; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; }
  .seg .k { flex: none; }
}

/* Phones: the forge button stays on screen while you pick tokens further up the page. */
@media (max-width: 960px) {
  .forge { padding-bottom: 120px; }
  .hold-grid { grid-template-columns: repeat(4, 1fr); }
  .go-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 12px var(--gutter) 16px; background: var(--bg); border-top: 1px solid var(--line); }
  .go-bar .button { width: 100%; justify-content: center; }
  .go-bar:has(#go[hidden]) { display: none; }
  .bench-card { position: static; max-height: none; overflow: visible; padding-bottom: 22px; }
  .forge-facts div { grid-template-columns: 120px minmax(0, 1fr); }
}
