/* Lifetime Wrapped. Dark first, with a light theme for people who prefer it. */
:root {
  --bg: #090d12; --bg2: #0e141b; --card: #131a22; --card2: #18212b; --line: #232e3a; --fg: #eef2f6; --muted: #8995a3;
  --accent: #1ed760; --accent-ink: #4ae28a; --accent2: #7c5cff; --amber: #ffb84d; --pink: #ff5d8f; --grey: #5d6977; --cell: #1a232d; --err: #ff6b5b;
  --glow: radial-gradient(60% 50% at 20% 0%, rgba(30, 215, 96, .16), transparent 70%), radial-gradient(50% 45% at 90% 10%, rgba(124, 92, 255, .16), transparent 70%);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f3; --bg2: #ffffff; --card: #ffffff; --card2: #f0f2ee; --line: #e1e4df; --fg: #14181d; --muted: #5d6670;
    --accent: #14b24c; --accent-ink: #0b7a33; --accent2: #5b3fe0; --amber: #d98a14; --pink: #d6336c; --grey: #a1a9b2; --cell: #e8ebe6; --err: #c0392b;
    --glow: radial-gradient(60% 50% at 20% 0%, rgba(30, 215, 96, .18), transparent 70%), radial-gradient(50% 45% at 90% 10%, rgba(124, 92, 255, .12), transparent 70%);
    --shadow: 0 10px 30px rgba(20, 30, 40, .08);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); background-image: var(--glow); background-repeat: no-repeat; color: var(--fg);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 18px 70px; }
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 1.45rem; margin: 2.2em 0 .6em; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent2)); flex: none; }
h3 { font-size: 1.1rem; margin: 1.5em 0 .5em; }
h3 small, h4 small, h2 small { font-weight: 400; color: var(--muted); font-size: .8em; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.muted { color: var(--muted); }
small { font-size: .8em; }

/* ------------------------------------------------------------ landing */
.hero { text-align: left; padding: 40px 0 8px; }
.eyebrow { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4.2rem); margin: 18px 0 14px; max-width: 13em; font-weight: 800; }
.hero h1 em { display: inline-block; font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2) 70%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin: 0; }
.drop { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 38px 20px; margin: 30px 0 12px; width: 100%; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 22px; background: color-mix(in srgb, var(--card) 85%, transparent);
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s; font-size: 1.1rem; box-shadow: var(--shadow); }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(30, 215, 96, .18); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop .up { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #04210e; background: linear-gradient(135deg, var(--accent), #8af3b0); font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.drop b { font-size: 1.2rem; }
.drop span.muted { font-size: .9rem; max-width: 30em; }
.status { max-width: 640px; margin: 10px 0; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.status.error { border-color: var(--err); color: var(--err); }


.section { margin-top: 70px; }
.section > h2 { justify-content: flex-start; text-align: left; } .section > h2::before { display: none; }
.section > .sub { text-align: left; color: var(--muted); max-width: 38em; margin: -4px 0 22px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: transform .15s, border-color .15s; }
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.feature .ic { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.feature b { display: block; margin-bottom: 4px; } .feature p { margin: 0; color: var(--muted); font-size: .9rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 18px 64px; position: relative; counter-increment: s; }
.step::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #04210e; background: linear-gradient(135deg, var(--accent), #8af3b0); }
.step b { display: block; } .step p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.privacy { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 20px; padding: 8px 26px 22px; }
.privacy h2 { justify-content: flex-start; } .privacy h2::before { display: block; }
.privacy ul { padding-left: 1.2em; } .privacy li { margin: 8px 0; }
/* top bar, hero extras, sample button, notices */
.bar { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding: 4px 0 10px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; font-size: 1.1rem; color: var(--fg); text-decoration: none; }
.brand .mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #04210e; }
.bar-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .95rem; }
.bar-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; } .bar-nav a:hover { color: var(--fg); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.drop .dt { font-size: 1.3rem; } .drop .dt b { color: var(--accent-ink); }
.drop .up { width: 56px; height: 56px; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.sample-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 6px; }
.btn-primary { font: inherit; font-weight: 700; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; background: var(--accent); color: #04210e; transition: transform .15s, box-shadow .15s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(30, 215, 96, .25); }
.btn-primary:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.warn { margin: 16px 0 0; padding: 14px 18px; border-radius: 12px; font-size: .92rem; background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line)); }

/* privacy cards and the check-it-yourself button */
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.pcard .pic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 1.25rem; margin-bottom: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); }
.pcard b { display: block; margin-bottom: 4px; } .pcard p { margin: 0; color: var(--muted); font-size: .9rem; }
.pnote { text-align: center; max-width: 44em; margin: 16px auto 0; font-size: .9rem; }

.landfoot { text-align: center; margin-top: 50px; color: var(--muted); font-size: .88rem; }

/* ------------------------------------------------------------ app header */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.top h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0; font-weight: 800; }
.top h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.metric span { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.metric b { font-size: 1.7rem; letter-spacing: -0.02em; }
.metric small { display: block; font-size: .78rem; font-weight: 600; }
.up { color: var(--accent-ink); } .down { color: var(--err); }
.chip { display: inline-block; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 999px; padding: 3px 13px; margin: 2px 0; font-size: .9rem; font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-weight: 700; padding: 0 0 0 6px; }
.personality { margin: 10px 0; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.personality p { margin: 8px 0 0; font-size: .88rem; }
.opts { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.opts > details { flex: 1 1 320px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
input[list], select { font: inherit; color: inherit; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; max-width: 100%; }
input[list] { width: min(440px, 100%); }
.chips { margin-top: 8px; }

/* ------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; margin-top: 14px; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); scrollbar-width: thin; scrollbar-color: var(--grey) transparent; }
.tabs button { flex: none; font: inherit; font-weight: 600; font-size: .9rem; background: var(--card); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; cursor: pointer; transition: all .12s; white-space: nowrap; }
.tabs button:hover { color: var(--fg); border-color: var(--grey); }
.tabs button.on { background: var(--accent); color: #04210e; border-color: var(--accent); }

/* ------------------------------------------------------------ content */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 22px; }
.scroll { scrollbar-color: var(--grey) transparent; overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
/* a list that scrolls inside its own box (the songs of your life), with the header staying put */
.scroll.scrolly { max-height: 460px; overflow-y: auto; }
.scroll.scrolly th { position: sticky; top: 0; z-index: 1; background: var(--card); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 9px 12px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
tbody tr:last-child { border-bottom: 0; } tbody tr:hover { background: var(--card2); }
td:first-child { color: var(--muted); width: 2.4em; font-variant-numeric: tabular-nums; }
td a { color: var(--fg); font-weight: 600; text-decoration: none; } td a:hover { color: var(--accent-ink); }
td.cv { width: 52px; padding: 6px 4px 6px 12px; }
td.cv img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; display: block; background: var(--cell); }
.actions, .seg { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
button { font: inherit; }
.actions button, .seg button { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; cursor: pointer; transition: all .12s; }
.actions button:hover, .seg button:hover { border-color: var(--accent); }
.seg button.on { background: var(--accent); color: #04210e; border-color: var(--accent); font-weight: 700; }
.ctl { display: block; margin: 8px 0; }
.ctl input[type=range] { display: block; width: 100%; max-width: 440px; accent-color: var(--accent); }

.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .bar rect:not(.hit) { fill: url(#g); }
.chart .bar.dim rect:not(.hit) { fill-opacity: .3; }
.chart .hit { fill: transparent; } .chart .click { cursor: pointer; }
.chart .click:hover rect:not(.hit) { fill-opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); margin: 4px 0 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.hbars { display: grid; gap: 7px; }
.hrow { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.hlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htrack { background: var(--cell); border-radius: 6px; height: 14px; overflow: hidden; }
.hfill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 6px; }
.hval { color: var(--muted); font-variant-numeric: tabular-nums; }

.wcard { max-width: 860px; padding: 28px 32px; border-radius: 20px; color: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  background: linear-gradient(135deg, #0b3d2e 0%, #1db954 55%, #7be39a 100%); }
.wcard h3 { font-size: 2.6rem; letter-spacing: -.02em; margin: 0; color: #fff; } .wcard .sub { margin: 4px 0 18px; opacity: .85; }
.wcard .big { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 10px 0 24px; }
.wcard .big div { min-width: 120px; } .wcard .big b { font-size: 2rem; display: block; line-height: 1.1; } .wcard .big span { opacity: .85; font-size: .85rem; }
.wcard .cgrid { display: grid; grid-template-columns: 200px 1fr 1fr; gap: 24px; align-items: start; }
.wcard .cover, .wcard .cover-ph { width: 200px; height: 200px; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); display: block; }
.wcard .cover-ph { display: grid; place-items: center; font-size: 4.5rem; background: rgba(255, 255, 255, .16); }
.wcard .top1 { font-weight: 700; font-size: 1.1rem; margin-top: 8px; }
.wcard ol { margin: 6px 0 0; padding-left: 20px; } .wcard li { margin: 3px 0; } .wcard li small { opacity: .8; display: block; font-size: .8rem; }
.wcard h4 { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; opacity: .85; font-weight: 500; }
.wcard .k { opacity: .8; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 14px; } .wcard .v { font-weight: 600; }
@media (max-width: 700px) { .wcard .cgrid { grid-template-columns: 1fr; } .wcard .cover, .wcard .cover-ph { width: 160px; height: 160px; } }
.foot { margin-top: 44px; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 640px) { main { padding: 18px 12px 60px; } .mock { grid-template-columns: 1fr; } .hero { padding-top: 28px; } th, td { padding: 8px 8px; } }

/* credits */
.who { display: inline-block; padding: 2px 11px; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--fg);
  background: var(--card); border: 1px solid var(--line); transition: border-color .12s; }
.who:hover { border-color: var(--accent); color: var(--accent-ink); }

/* artist eras (stream chart) */
.stream .sx { stroke: var(--fg); stroke-dasharray: 2 3; }
.stream path { transition: fill-opacity .3s ease, stroke-opacity .3s ease; }
.sleg { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 2px; }
.sleg-b { font: inherit; font-size: .82rem; display: inline-flex; align-items: center; gap: 7px; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px 3px 8px; cursor: pointer; transition: opacity .3s ease, border-color .12s; }
.sleg-b i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sleg-b:hover, .sleg-b[aria-pressed="true"] { border-color: var(--fg); }
.sleg-b.dim { opacity: .4; }
.shint { font-size: .82rem; margin: 6px 2px 0; }
.stip { position: fixed; z-index: 20; pointer-events: none; background: var(--card); color: var(--fg); border: 1px solid var(--fg); border-radius: 8px; padding: 6px 9px; font-size: .82rem; max-width: 260px; opacity: 0; transition: opacity .08s; }
.stip b { font-weight: 700; } .stip .m { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: .76rem; }
@media (prefers-reduced-motion: reduce) { .stream path, .sleg-b, .stip { transition: none; } }
/* the chart is a dark panel in both themes, so its colours read the same everywhere */
.stream { background: #0e1117; border: 1px solid #31333f; border-radius: 14px; padding: 14px 12px 10px; color: #e6eaf1; }
.stream .chart text { fill: #e6eaf1; }
.stream .chart .grid { stroke: #31333f; stroke-dasharray: none; }
.stream .sx { stroke: #e6eaf1; }
.stream .sleg-b { color: #e6eaf1; border-color: #31333f; }
.stream .sleg-b:hover, .stream .sleg-b[aria-pressed="true"] { border-color: #e6eaf1; }
.stream .shint { color: #98a0ab; }
