/* App header, profile hero and filters for the collection page. */

.ah { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--cc-divider); background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
.ah-in { max-width: 1240px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@media (min-width: 640px) { .ah-in { padding: 0 32px; gap: 16px; } }
.ah-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; white-space: nowrap; }
.ah-mark { display: block; width: 22px; height: 22px; flex: none; color: var(--cc-text); }
.ah-sync { align-items: center; gap: 7px; font-family: var(--cc-font-mono); font-size: 11px; color: var(--cc-text-muted); }
.ah-sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--cc-cyan); box-shadow: 0 0 8px var(--cc-cyan); }
.ah-sync i.is-off { background: var(--cc-text-muted); box-shadow: none; }

.ah-menu { position: relative; }
.ah-me { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 99px; cursor: pointer; list-style: none; color: var(--cc-text); transition: background 150ms; }
.ah-me::-webkit-details-marker { display: none; }
.ah-me:hover, .ah-menu[open] .ah-me { background: var(--cc-track); }
@media (min-width: 640px) { .ah-me { padding: 3px 12px 3px 3px; } }
.ah-me:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: 2px; }
.ah-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; padding: 6px; border: 1px solid var(--cc-border); border-radius: 16px; background: #05050a; box-shadow: 0 24px 60px rgba(0,0,0,.8); transform-origin: top right; animation: ah-pop 180ms var(--cc-ease-spring) both; }
@keyframes ah-pop { from { opacity: 0; transform: scale(.92) translateY(-4px) } }
.ah-item { display: block; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--cc-text); cursor: pointer; }
.ah-item:hover { background: var(--cc-track); }

/* An avatar inside the rim of the rarest card held. */
.ah-ring { position: relative; display: inline-flex; flex-shrink: 0; padding: 2px; border-radius: 50%; overflow: hidden; isolation: isolate; }
.ah-ring::before { content: ""; position: absolute; inset: -50%; z-index: -1; background: var(--ring); animation: cc-spin var(--cc-dur-rim) linear infinite; }
.ah-ring img, .ah-ring .ob-avatar { border: 2px solid #000; }

.cp { display: flex; align-items: center; gap: 24px; padding: 48px 0 36px; }
/* The avatar sits inside a progress ring: how much of the sky is lit. */
.cp-ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 108px; height: 108px; border-radius: 50%; }
.cp-ring::before, .cp-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--cc-cyan) calc(var(--p) * 1%), var(--cc-track) 0);
  -webkit-mask: radial-gradient(circle, transparent 50px, #000 51px); mask: radial-gradient(circle, transparent 50px, #000 51px); }
.cp-ring::before { filter: blur(8px); opacity: .45; }
.cp-avatar { padding: 3px; box-shadow: 0 0 60px rgba(139,92,246,.18); }
.cp-avatar img, .cp-avatar .ob-avatar { border-width: 3px; }
.cp-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 2px; }
.cp-stats dt { font-family: var(--cc-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--cc-text-muted); }
.cp-stats dd { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cp-score { display: flex; flex-direction: column; min-width: 180px; }
.cp-score dd { font-size: 28px; }
.cp-score .cc-progress { margin-top: 6px; }
@media (max-width: 560px) {
  .cp { gap: 16px; padding: 28px 0 24px; }
  .cp-ring { width: 80px; height: 80px; }
  .cp-ring::before, .cp-ring::after { -webkit-mask: radial-gradient(circle, transparent 36px, #000 37px); mask: radial-gradient(circle, transparent 36px, #000 37px); }
  .cp-avatar img, .cp-avatar .ob-avatar { width: 64px !important; height: 64px !important; font-size: 24px; }
  .cp h1 { font-size: 32px; }
  .cp-stats { gap: 8px 20px; }
  .cp-score dd { font-size: 24px; }
}


/* Rarity names in running text (journal, card pages). */
.nu-h { margin-bottom: 12px; font-family: var(--cc-font-mono); font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--cc-text-muted); }
.nu-tag { background: var(--tag); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.cf-empty { padding: 40px 0 96px; text-align: center; font-family: var(--cc-font-mono); font-size: 13px; color: var(--cc-text-muted); }

/* Hero: who on the left, the score on the right, one line of what is next. Two sizes, two colours, one hairline. */
.hx { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "id score" "next next"; align-items: center; column-gap: 48px; padding: 44px 0 36px; }
.hx-id { grid-area: id; display: flex; align-items: center; gap: 22px; min-width: 0; }
.hx-who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hx-avatar { position: relative; display: inline-flex; flex-shrink: 0; padding: 3px; border-radius: 50%; isolation: isolate; overflow: hidden; }
.hx-avatar::before { content: ""; position: absolute; inset: -50%; z-index: -1; background: var(--ring); opacity: .9; }
.hx-avatar img, .hx-avatar .ob-avatar { border: 3px solid #000; }
.hx-avatar .ob-avatar-blank { font-size: 40px; }
.hx-name { font-size: 26px; line-height: 30px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-sub { font-size: 14px; line-height: 20px; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.hx-score { grid-area: score; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.hx-line { font-size: 14px; line-height: 30px; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.hx-line b { margin-right: 2px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--cc-text); }
.nx { grid-area: next; display: flex; flex-wrap: wrap; gap: 6px 36px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.06); font-size: 13px; line-height: 18px; }
.nx-h { color: var(--cc-text-muted); }
.nx-item { display: inline-flex; gap: 8px; color: var(--cc-text); font-weight: 500; transition: opacity 150ms; }
.nx-item:hover { opacity: .75; }
.nx-item:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: 3px; border-radius: 4px; }
.nx-item b { font-weight: 400; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .hx { grid-template-columns: 1fr; grid-template-areas: "id" "score" "next"; padding: 28px 0 24px; }
  .hx-avatar img, .hx-avatar .ob-avatar { width: 80px !important; height: 80px !important; }
  .hx-avatar .ob-avatar-blank { font-size: 30px; }
  .hx-name { font-size: 22px; line-height: 26px; }
  .hx-score { align-items: flex-start; text-align: left; margin-top: 20px; }
  .nx { flex-direction: column; gap: 10px; margin-top: 24px; }
}

/* Tabs: text with an underline, an icon pair for size. */
.cf { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 28px; }
.tb { display: flex; gap: 4px; margin: 0 -10px; }
.tb-tab { position: relative; padding: 10px 10px 12px; font-size: 15px; font-weight: 500; color: var(--cc-text-muted); cursor: pointer; transition: color 150ms; }
.tb-tab:hover, .tb-tab[aria-selected="true"] { color: var(--cc-text); }
.tb-tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--cc-text); transform: scaleX(0); transition: transform 260ms var(--cc-ease-out); }
.tb-tab[aria-selected="true"]::after { transform: scaleX(1); }
.tb-tab:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: -2px; border-radius: 6px; }
.tb-n { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.tb-size { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(255,255,255,.04); }
.tb-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; border-radius: 6px; color: rgba(231,233,234,.55); cursor: pointer; transition: background 150ms, color 150ms; }
.tb-ic:hover { color: var(--cc-text); }
.tb-ic[aria-checked="true"] { background: rgba(255,255,255,.1); color: var(--cc-text); }
.tb-ic:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: 1px; }

/* Panes: one of collection, catalog, sky at a time. */
.cf-pane { display: none; padding-bottom: 64px; }
.cf-root[data-view="collection"] [data-pane="collection"], .cf-root[data-view="catalog"] [data-pane="catalog"], .cf-root[data-view="sky"] [data-pane="sky"] { display: block; }
.cf-root[data-view="sky"] .cf-size, .cf-root[data-view="catalog"] .cf-size { visibility: hidden; }

/* Section headers shared by the shelf and the catalog, sentence case. */
.sh { padding-bottom: 40px; }
.sh:not(:has(.cc)) { display: none; }
.sh-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.sh-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.sh-n { font-size: 12px; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }

/* The shelf grid, and its compact size. */
.cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); justify-items: center; column-gap: 32px; row-gap: 40px; }
.cf-root[data-size="compact"] .cf-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); column-gap: 14px; row-gap: 18px; }
.cf-root[data-size="compact"] .cf-grid .cc { zoom: .56; }
@media (max-width: 639px) {
  .cf-grid { grid-template-columns: repeat(2, 1fr); column-gap: 12px; row-gap: 16px; }
  .cf-grid .cc { zoom: .62; }
  .cf-size { display: none; }
}
/* A ladder's pack: the rest of its earned cards sealed in a paper booster beside the highest one. Crimped ends with
   ridges, a perforated tear line, a window on the family's sky and a stamp with the best rarity inside. Torn open
   (pack_controller) the seam flies off, the pack drops, and the cards spread in a panel across the shelf. */
.pk { position: relative; }
.pk > .cc, .pk-head { display: none; }
.pk-pack { position: relative; display: block; width: var(--cc-card-w); height: var(--cc-card-h); padding: 0; border: 0; background: none; color: var(--cc-text); font-family: var(--cc-font); text-align: left; cursor: pointer;
  filter: drop-shadow(0 26px 34px rgba(0,0,0,.7)); transition: transform 350ms var(--cc-ease-spring); --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .11 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.pk-pack:hover { transform: translateY(-6px) rotate(-1.2deg); }
.pk-pack:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: 6px; border-radius: 16px; }
.pk-ridges { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.09) 0 1.5px, rgba(0,0,0,.25) 1.5px 3px, transparent 3px 6px); }
.pk-cap { position: absolute; left: 6px; right: 6px; top: 0; height: 40px; display: flex; align-items: center; justify-content: center; transform-origin: 90% 100%;
  background: var(--grain), linear-gradient(180deg, color-mix(in srgb, var(--pk) 30%, #0b0b16), #0b0b16);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top/14px 14px repeat-x, linear-gradient(#000 0 0) bottom/100% calc(100% - 7px) no-repeat;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top/14px 14px repeat-x, linear-gradient(#000 0 0) bottom/100% calc(100% - 7px) no-repeat; }
.pk-cap .pk-ridges { position: absolute; inset: 0; }
.pk-brand { position: relative; padding: 2px 8px; border-radius: 3px; background: rgba(0,0,0,.55); font: 600 9px var(--cc-font-mono); letter-spacing: .32em; color: rgba(231,233,234,.7); }
.pk-body { position: absolute; left: 6px; right: 6px; top: 38px; bottom: 0; display: flex; flex-direction: column; align-items: center; padding: 26px 18px 32px;
  background: radial-gradient(130% 70% at 50% 42%, transparent 48%, rgba(0,0,0,.55)), linear-gradient(90deg, rgba(0,0,0,.4), transparent 12%, rgba(255,255,255,.04) 50%, transparent 88%, rgba(0,0,0,.4)),
    var(--grain), linear-gradient(170deg, color-mix(in srgb, var(--pk) 38%, #0b0b16) 0%, #08080f 55%, color-mix(in srgb, var(--pk) 22%, #07070d) 100%);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/14px 14px repeat-x, linear-gradient(#000 0 0) top/100% calc(100% - 7px) no-repeat;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/14px 14px repeat-x, linear-gradient(#000 0 0) top/100% calc(100% - 7px) no-repeat; }
.pk-body::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1.5px dashed rgba(255,255,255,.28); }
.pk-tear { position: absolute; right: 12px; top: 6px; font: 8px var(--cc-font-mono); letter-spacing: .14em; color: rgba(231,233,234,.5); }
.pk-win { position: relative; width: 196px; height: 158px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--pk) 70%, transparent), 0 0 0 5px rgba(0,0,0,.6), 0 0 30px color-mix(in srgb, var(--pk) 30%, transparent); }
.pk-win svg { display: block; width: 100%; height: 100%; }
.pk-stamp { position: absolute; right: 2px; top: 10px; width: 66px; height: 66px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(12deg);
  background: #f1efe9; color: #0b0b12; font: 700 9px var(--cc-font-mono); letter-spacing: .08em; line-height: 1.25; box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 0 0 3px #f1efe9, inset 0 0 0 4.5px #0b0b12; }
.pk-stamp i { font-style: normal; font-size: 10.5px; background: var(--tag); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pk-name { margin-top: 20px; font-weight: 800; font-size: 34px; letter-spacing: -.04em; line-height: .9; text-align: center; text-transform: capitalize; }
.pk-kind { margin-top: 6px; font: 600 11px var(--cc-font-mono); letter-spacing: .34em; color: var(--pk); }
.pk-meta { margin-top: auto; display: flex; gap: 10px; font: 10px var(--cc-font-mono); letter-spacing: .1em; color: rgba(231,233,234,.65); }
.pk-meta b { font-weight: 600; color: var(--cc-text); }
.pk-seal { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; }

.pk.is-opening .pk-pack { pointer-events: none; transform: none; }
.pk.is-opening .pk-cap { animation: pk-cap 450ms cubic-bezier(.5,0,.75,.4) forwards; }
.pk.is-opening .pk-body { animation: pk-body 550ms cubic-bezier(.4,0,.6,1) 250ms forwards; }
@keyframes pk-cap { 40% { transform: rotate(-8deg) } to { transform: translate(60px, -90px) rotate(28deg); opacity: 0 } }
@keyframes pk-body { 20% { transform: translateY(-6px) } to { transform: translateY(120px) rotate(-4deg); opacity: 0 } }
.pk:not(.is-open) .pk-pack { animation: pk-back 450ms var(--cc-ease-spring); }
@keyframes pk-back { from { opacity: 0; transform: translateY(-24px) scale(1.04) } }

.pk.is-open { grid-column: 1 / -1; display: grid; grid-template-columns: inherit; justify-items: inherit; column-gap: inherit; row-gap: inherit; width: 100%;
  padding: 0 20px 28px; border-radius: 24px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); animation: pk-spread 450ms var(--cc-ease-out); }
@keyframes pk-spread { from { opacity: 0; transform: translateY(-8px) } }
.pk.is-open .pk-pack { display: none; }
.pk.is-open > .cc { display: block; }
.pk.is-open .pk-head { grid-column: 1 / -1; justify-self: stretch; display: flex; justify-content: space-between; align-items: center; padding: 16px 0 0; }
.pk-title { font-size: 15px; font-weight: 600; text-transform: capitalize; color: var(--cc-text); }
.pk-title span { margin-left: 6px; font-size: 13px; font-weight: 400; text-transform: none; color: var(--cc-text-muted); }
.pk-close { padding: 6px 12px; border: 1px solid var(--cc-border); border-radius: 99px; background: transparent; font-size: 13px; font-weight: 500; color: var(--cc-text-muted); cursor: pointer; }
.pk-close:hover { color: var(--cc-text); }
.pk-close:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: 2px; }
.cf-root[data-size="compact"] .pk-pack { zoom: .56; }
@media (max-width: 639px) {
  .pk-pack { zoom: .62; }
  .pk.is-open { padding: 0 10px 18px; border-radius: 18px; }
}
.cf-empty-state { display: flex; flex-direction: column; gap: 6px; padding: 48px 0 96px; max-width: 420px; }

/* Catalog: a row per ladder, scrolled sideways. */
.ct-section { padding-bottom: 32px; }
.ct-row { padding-bottom: 20px; }
.ct-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.ct-row-title { font-size: 13px; font-weight: 600; }
.ct-row-n, .ct-row-next { font-size: 12px; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.ct-row-next { margin-left: auto; }
.ct-row-next b { color: var(--cc-text); font-weight: 600; }
.ct-strip { display: flex; gap: 12px; margin: 0 -16px; padding: 10px 16px 24px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  -webkit-mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 32px), transparent); mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 32px), transparent); }
.ct-strip::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .ct-strip { margin: 0 -32px; padding: 10px 32px 24px; } }
.ct-slot { position: relative; flex-shrink: 0; width: 150px; height: 230px; scroll-snap-align: start; }
.ct-slot .cc { zoom: .575; }
.ct-slot.is-start::after { content: "you are here"; position: absolute; left: 50%; bottom: -16px; translate: -50% 0; font-size: 11px; color: var(--cc-text-muted); white-space: nowrap; }
.ct-slot .cc.locked { opacity: .72; }

/* Ghost: a locked card too far away to draw in full. */
.gh { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 150px; height: 230px; padding: 12px; border-radius: 12px; background: rgba(7,7,13,.6); box-shadow: inset 0 0 0 1px var(--cc-divider); opacity: .55; }
.gh-num, .gh-tag { font-family: var(--cc-font-mono); font-size: 9px; letter-spacing: .12em; color: var(--cc-text-muted); }
.gh-tag { background: var(--tag); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.gh-lock { align-self: center; color: var(--cc-text-dim); }
.gh-title { font-weight: 700; font-size: 14px; letter-spacing: -.01em; line-height: 1.15; color: var(--cc-text-muted); }

/* The sky map: a panel per section, a constellation per metric. */
.sky { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.sky-panel { margin: 0; border-radius: 20px; background: radial-gradient(120% 90% at 50% 0%, #0b0a1c 0%, transparent 70%), var(--cc-plate); box-shadow: var(--cc-plate-edge); overflow: hidden; }
.sky-panel figcaption { display: flex; justify-content: space-between; padding: 14px 18px 0; font-family: var(--cc-font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.sky-panel svg { display: block; width: 100%; height: auto; }
.sky-empty { padding: 72px 18px; text-align: center; font-family: var(--cc-font-mono); font-size: 12px; color: var(--cc-text-muted); }
.sky-line { fill: none; stroke: rgba(142,203,255,.28); stroke-width: 1; }
.sky-line.to-go { stroke: rgba(113,118,123,.35); stroke-dasharray: 2 4; }
.sky-star { fill: #e7e9ea; filter: drop-shadow(0 0 3px rgba(255,255,255,.6)); animation: sky-twinkle 4s ease-in-out infinite both; transform-box: fill-box; transform-origin: center; transition: transform 200ms var(--cc-ease-spring); }
.sky-star.rare { fill: #8ecbff; filter: drop-shadow(0 0 5px #1d9bf0); }
.sky-star.epic { fill: #ff8cc4; filter: drop-shadow(0 0 7px #ff4fa3); }
.sky-star.singular { fill: #ffd28a; filter: drop-shadow(0 0 9px #ffb547) drop-shadow(0 0 16px #8b5cf6); }
.sky-star.locked { fill: none; stroke: #3a3f45; stroke-width: 1; filter: none; animation: none; }
.sky-link:hover .sky-star, .sky-link:focus-visible .sky-star { transform: scale(1.8); }
.sky-link:focus-visible { outline: none; }
.sky-label { fill: var(--cc-text-muted); font-family: var(--cc-font-mono); font-size: 10px; letter-spacing: .1em; text-anchor: middle; text-transform: uppercase; }
.sky-c:hover .sky-label { fill: var(--cc-text); }
.sky-c:hover .sky-line { stroke: rgba(142,203,255,.6); }
@keyframes sky-twinkle { 0%, 100% { opacity: 1 } 50% { opacity: .55 } }
@media (prefers-reduced-motion: reduce) { .sky-star { animation: none; } }

/* Main navigation in the app header. */
.ah-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ah-link { padding: 8px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--cc-text-muted); white-space: nowrap; transition: color 150ms, background 150ms; }
.ah-link:hover { color: var(--cc-text); }
.ah-link[aria-current="page"] { color: var(--cc-text); background: var(--cc-track); }
@media (max-width: 420px) { .ah-link { padding: 8px 7px; font-size: 13px; } }

/* Public pages: share bar, sections, the sign-up nudge for visitors. */
.sb { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 36px; padding: 14px 16px 14px 20px; border-radius: 16px; background: var(--cc-plate); box-shadow: var(--cc-plate-edge); }
.sb-note { font-size: 14px; color: var(--cc-text-muted); }
.pf-section { padding-bottom: 56px; }
.jc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 64px; padding: 32px; border-radius: 24px; background: radial-gradient(80% 120% at 0% 0%, rgba(139,92,246,.16), transparent 70%), var(--cc-plate); box-shadow: var(--cc-plate-edge); }

/* One card's public page. */
.sc { display: grid; gap: 48px; align-items: center; padding: 56px 0 72px; }
@media (min-width: 900px) { .sc { grid-template-columns: auto 1fr; gap: 72px; } }
.sc-card { display: flex; justify-content: center; }
.sc-card .cc { zoom: 1.15; }
.sc-who { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.sc-who:hover { text-decoration: underline; text-underline-offset: 4px; }
.sc-meta { font-family: var(--cc-font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cc-text-muted); }
.sc-post { margin: 0; padding: 18px 20px; border-left: 3px solid var(--cc-magenta); border-radius: 16px; background: var(--cc-plate); box-shadow: var(--cc-plate-edge); max-width: 620px; }
.sc-post blockquote { margin: 0; font-size: 18px; line-height: 1.5; color: var(--cc-text); white-space: pre-line; overflow-wrap: anywhere; }
.sc-post figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; font-family: var(--cc-font-mono); font-size: 12px; color: var(--cc-text-muted); }
.sc-post figcaption b { color: var(--cc-text); font-weight: 600; }
.sc-x { margin-left: auto; color: var(--cc-text); }
.sc-x:hover { text-decoration: underline; text-underline-offset: 4px; }
.sc-facts { display: grid; gap: 16px 32px; grid-template-columns: repeat(auto-fit, minmax(200px, max-content)); }
.sc-facts dt { font-family: var(--cc-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--cc-blue); }
.sc-facts dd { margin-top: 4px; font-size: 15px; color: var(--cc-text); }

/* Page heads for journal, insights and settings. */
.pg-head { display: flex; flex-direction: column; gap: 8px; padding: 48px 0 32px; }

/* Insights: stat tiles, chart cards, the charts themselves. */
.in-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 16px; }
.in-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: var(--cc-plate); box-shadow: var(--cc-plate-edge); }
.in-tile dt { font-size: 13px; color: var(--cc-text-muted); }
.in-tile dd { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.in-delta { font-family: var(--cc-font-mono); font-size: 11px; color: var(--cc-text-muted); }
.in-card { margin-bottom: 16px; padding: 18px 20px; border-radius: 20px; background: var(--cc-plate); box-shadow: var(--cc-plate-edge); }
.in-pair { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.in-pair .in-card { margin-bottom: 0; }
.in-pair + .in-card { margin-top: 16px; }
.in-h { margin-bottom: 12px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.in-h span { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--cc-text-muted); }
.in-table { margin-top: 10px; font-size: 13px; color: var(--cc-text-muted); }
.in-table summary { cursor: pointer; font-family: var(--cc-font-mono); font-size: 11px; }
.in-table table { margin-top: 8px; width: 100%; max-width: 360px; font-variant-numeric: tabular-nums; }
.in-table th { text-align: left; font-weight: 400; padding: 4px 0; }
.in-table td { padding: 3px 0; color: var(--cc-text); }
.in-posts { display: flex; flex-direction: column; }
.in-posts li { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--cc-divider); }
.in-posts li:first-child { border-top: 0; padding-top: 0; }
.in-post-text { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.in-post-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-family: var(--cc-font-mono); font-size: 11px; color: var(--cc-text-muted); }
.in-post-meta b { color: var(--cc-text); font-weight: 600; }
.ch { position: relative; }
.ch svg { display: block; width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: var(--cc-divider); stroke-width: 1; }
.ch-tick { fill: var(--cc-text-muted); font-family: var(--cc-font-mono); font-size: 10px; }
.ch-value { fill: var(--cc-text); font-family: var(--cc-font-mono); font-size: 11px; font-weight: 600; }
.ch-line { fill: none; stroke: var(--cc-sky); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-wash { fill: var(--cc-sky); opacity: .1; }
.ch-dot { fill: var(--cc-sky); stroke: #05050a; stroke-width: 2; }
.ch-bar { fill: var(--cc-sky); }
.ch-hit { fill: transparent; outline: none; cursor: default; }
.ch-hit:hover, .ch-hit:focus-visible { fill: rgba(255,255,255,.04); }
.ch-guide { stroke: var(--cc-text-muted); stroke-width: 1; opacity: 0; pointer-events: none; }
.ch-guide.on { opacity: .6; }
.ch-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 6px 10px; border: 1px solid var(--cc-border); border-radius: 10px; background: #05050a; font-family: var(--cc-font-mono); font-size: 11px; color: var(--cc-text); white-space: nowrap; pointer-events: none; }
.ch-empty { padding: 40px 0; text-align: center; font-family: var(--cc-font-mono); font-size: 12px; color: var(--cc-text-muted); }

/* Journal head: the whole catalog as a field of dots, lit where earned. */
.jh { display: flex; flex-direction: column; gap: 22px; padding: 48px 0 40px; }
.hx-sky { display: grid; grid-template-columns: repeat(30, 8px); gap: 5px; }
.hx-sky i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 5px color-mix(in srgb, var(--c) 55%, transparent); animation: hx-lit 600ms var(--cc-ease-out) both; }
.hx-sky i.off { background: rgba(255,255,255,.06); box-shadow: none; animation: none; }
@keyframes hx-lit { from { opacity: 0; transform: scale(.3) } }
.hx-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.hx-legend li { display: inline-flex; align-items: center; gap: 6px; }
.hx-legend i { width: 6px; height: 6px; border-radius: 2px; }
@media (max-width: 640px) { .hx-sky { grid-template-columns: repeat(30, 1fr); gap: 4px; width: 100%; } .hx-sky i { width: 100%; height: auto; aspect-ratio: 1; } }

/* Journal: a timeline. One line down the page, a gem on it per card. */
.jr { display: flex; flex-direction: column; gap: 8px; padding-bottom: 96px; }
.jr-day { display: grid; gap: 6px; }
@media (min-width: 760px) { .jr-day { grid-template-columns: 150px 1fr; gap: 32px; } }
.jr-when { display: flex; flex-direction: column; gap: 4px; padding-top: 18px; }
.jr-date { font-family: var(--cc-font-mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; color: var(--cc-text); }
.jr-sum { font-family: var(--cc-font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--cc-text-muted); }
.jr-list { position: relative; display: flex; flex-direction: column; }
.jr-list::before { content: ""; position: absolute; left: 7px; top: 24px; bottom: 24px; width: 1px; background: var(--cc-divider); }
.jr-entry { position: relative; display: flex; align-items: flex-start; gap: 18px; padding: 16px 12px 16px 0; border-radius: 12px; transition: background 150ms, transform 220ms var(--cc-ease-spring); }
.jr-entry:hover { background: rgba(255,255,255,.03); transform: translateX(4px); }
.jr-entry:hover .jr-go { opacity: 1; transform: translate(0, 0); }
.jr-gem { position: relative; z-index: 1; flex-shrink: 0; width: 14px; height: 14px; margin-top: 5px; border-radius: 4px; background: var(--rim); transform: rotate(45deg); box-shadow: 0 0 0 3px #000, 0 0 16px var(--glow); }
.jr-title { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.jr-copy { font-family: var(--cc-font-mono); font-size: 11px; font-weight: 600; color: var(--cc-text-muted); }
.jr-meta { font-family: var(--cc-font-mono); font-size: 10px; letter-spacing: .08em; color: var(--cc-text-muted); }
.jr-post { font-size: 14px; line-height: 1.45; color: #b9bec4; overflow-wrap: anywhere; }
.jr-go { margin-left: auto; align-self: center; font-family: var(--cc-font-mono); font-size: 13px; color: var(--cc-text-muted); opacity: 0; transform: translate(-6px, 0); transition: opacity 150ms, transform 220ms var(--cc-ease-out); }

/* Settings. */
.st { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.st-card { padding: 20px 22px; border-radius: 20px; background: var(--cc-plate); box-shadow: var(--cc-plate-edge); }
.st-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.st-switch { appearance: none; flex-shrink: 0; width: 42px; height: 24px; margin-top: 1px; border-radius: 99px; background: var(--cc-track); box-shadow: inset 0 0 0 1px var(--cc-border); cursor: pointer; position: relative; transition: background 200ms, box-shadow 200ms; }
.st-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--cc-text-muted); transition: transform 260ms var(--cc-ease-pop), background 200ms; }
.st-switch:checked { background: var(--cc-blue); box-shadow: none; }
.st-switch:checked::after { background: #fff; transform: translateX(18px); }
.st-switch:focus-visible { outline: 2px solid var(--cc-blue); outline-offset: 3px; }
.st-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(62,230,214,.08); font-family: var(--cc-font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cc-cyan); }
.st-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--cc-cyan); box-shadow: 0 0 8px var(--cc-cyan); }
.st-pill.off { background: var(--cc-track); color: var(--cc-text-muted); }
.st-pill.off i { background: var(--cc-text-muted); box-shadow: none; }
.st-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.st-line + .st-line { border-top: 1px solid var(--cc-divider); }
.st-card > .st-line:first-child { padding-top: 0; }
.st-card > .st-line:last-child { padding-bottom: 0; }
.st-line .in-h:only-child { margin-bottom: 0; }
.st-input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--cc-border); border-radius: 12px; background: #05050a; color: var(--cc-text); font-size: 15px; }
.st-input:focus { outline: 2px solid var(--cc-blue); outline-offset: 1px; }

/* Pressed: everything clickable gives a little under the finger. */
.tb-tab, .tb-ic, .nx-item, .ah-me, .ah-link, .ah-item, .jr-entry, .ct-card, .cc-open { transition-property: color, background, border-color, transform, box-shadow; transition-duration: 150ms, 150ms, 150ms, 220ms, 220ms; transition-timing-function: ease, ease, ease, var(--cc-ease-pop), ease; }
.tb-tab:active, .tb-ic:active, .ah-link:active, .ah-item:active, .cc-open:active { transform: scale(.96); }
.ah-me:active { transform: scale(.97); }
.jr-entry:active { transform: translateY(1px) scale(.995); }
