/* Claimd — direction A, "Gold Night".
   Near-black ground, warm gold accent, one colour per organisation.
   Space Grotesk for headings and numbers, Inter for everything else.
   Mobile-first (390 px), single dark theme by design. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Layout: one 390-px column of rounded panels on a near-black ground. */
  --bg: #0E0D0B;
  --surface: #1A1814;
  --surface-2: #2A2620;     /* dividers, quiet buttons, avatar */
  --track: #2E2A23;         /* empty parts of rings and meters */
  --text: #F5EFE6;
  --muted: #A39B8F;
  --accent: #E8A33D;
  --accent-hover: #F5C46E;
  --on-accent: #17130C;
  --warn: #F08A6C;          /* blockers in plain English */
  --ok: #2BB6A3;
  --error-soft: rgb(240 138 108 / 14%);
  --warn-soft: rgb(232 163 61 / 14%);
  --ok-soft: rgb(43 182 163 / 14%);
  --focus: #F5C46E;
  --hero-ink: #FFF8EE;
  --hero-ink-2: #FFE2C4;
  --scrim: rgb(14 13 11 / 45%);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-lg: 20px;
  --r-md: 18px;
  --r-sm: 12px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  /* On the home-screen app the page runs under the status bar: start content
     below it, so the sticky top bar never sits on top of the page title. */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 30; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: var(--r-sm); }

/* ---------- top bar ---------- */
/* Hidden where the page has its own header: the track page's cover and the sign-in hero. */
body[data-view="track"] .topbar, body[data-view="auth"] .topbar { display: none; }
body[data-view="track"] main { padding-top: 0; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--bg);
  padding-block: 18px 8px; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.5px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand span { color: var(--accent); }
.avatar {
  width: 36px; height: 36px; border-radius: 18px; background: var(--surface-2); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; text-decoration: none;
}
.avatar:hover { color: var(--accent-hover); }
.avatar[hidden] { display: none; }

main {
  max-width: 640px; margin: 0 auto;
  padding-block: 8px 24px; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: flex; flex-direction: column; gap: 16px;
}
main > * { margin-top: 0; margin-bottom: 0; }
.page-title { margin: 4px 0 0; }
.subtitle { color: var(--muted); margin: -8px 0 0; }
.section, .eyebrow {
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); margin: 8px 0 -6px;
}
.muted { color: var(--muted); }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 420px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- panels ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; min-width: 0; }
.card > :last-child { margin-bottom: 0; }
fieldset.card { border: 0; margin: 0; }
legend { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; padding: 0; float: left; width: 100%; margin-bottom: 12px; }
legend + * { clear: both; }

/* ---------- auth ---------- */
.hero { text-align: center; padding: 28px 0 4px; }
.hero h1 { font-size: 2.4rem; letter-spacing: -1px; margin: 0; }
.hero h1 span { color: var(--accent); }
.tagline { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; color: var(--accent); margin: 6px 0 10px; }
.lede { color: var(--muted); max-width: 34ch; margin: 0 auto; }
.switch { text-align: center; margin: 14px 0 0; }
.fineprint { font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; min-width: 0; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.hint { font-size: .85rem; color: var(--muted); margin: -2px 0 8px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--surface-2); border-radius: var(--r-sm);
  appearance: none;
}
input::placeholder { color: #6F685E; }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(232 163 61 / 25%); }
[aria-invalid="true"] { border-color: var(--warn) !important; }
.field-error:empty, .form-error:empty { display: none; }
.field-error { color: var(--warn); font-size: .85rem; margin: 6px 0 0; }
.form-error { color: var(--warn); font-weight: 600; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.check label { font-weight: 500; }
.check-cell { display: flex; align-items: end; }
.pct { text-align: right; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
}
.btn:hover { border-color: var(--accent-hover); color: var(--accent-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); min-height: 52px; font-size: 16px; }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.quiet { background: var(--surface-2); border-color: var(--surface-2); color: var(--text); font-weight: 500; }
.btn.quiet:hover { color: var(--text); background: #353027; }
.btn.ghost { border-color: var(--surface-2); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); color: var(--text); }
.btn.danger { color: var(--warn); border-color: transparent; }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: progress; }
.actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions.stack { flex-direction: column; }
.actions.split > * { flex: 1; }
.sticky-actions {
  position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 3;
  padding: 12px 0 4px; background: linear-gradient(transparent, var(--bg) 35%);
}

/* ---------- setup ---------- */
.progress { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.progress-bar { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s ease; }
.step { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.setup .field > label { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; margin-bottom: 10px; }

/* ---------- home ---------- */
.greeting { font-size: 14px; color: var(--muted); margin: 0; }
.claim-card { display: flex; gap: 18px; align-items: center; }
.claim-card svg { flex: none; }
.ring-label { font-family: var(--font-display); font-weight: 700; fill: var(--text); }
.claim-card h2 { font-size: 20px; margin: 0 0 6px; }
.claim-card p { font-size: 13px; color: var(--muted); margin: 0; }
.ring-track { stroke: var(--track); }
.ring-fill { stroke: var(--accent); transition: stroke-dasharray .6s ease; }
.next-card { display: flex; gap: 14px; align-items: center; padding: 16px; }
.next-card strong { display: block; font-size: 15px; font-weight: 600; }
.next-card span { font-size: 13px; color: var(--muted); }
.next-card > div:not(.art) { min-width: 0; flex: 1; }
.stack-10 { display: flex; flex-direction: column; gap: 10px; }
.collectors { padding: 6px 16px; }
.collector {
  display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--text); text-decoration: none;
}
.collector + .collector { border-top: 1px solid var(--surface-2); }
.collector:hover { color: var(--text); }
.collector .name { flex: 1; font-size: 15px; }
.collector .state { font-size: 13px; color: var(--org, var(--muted)); text-align: right; }
.collector .state.blocked { color: var(--warn); }
.collector .state.muted, .collector .state.done { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 5px; background: var(--org, var(--muted)); flex: none; }
.dot.lg { width: 12px; height: 12px; border-radius: 6px; }

/* artwork: real cover, or a quiet tile with the release initials */
.art {
  width: 64px; height: 64px; border-radius: var(--r-sm); flex: none; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: flex-end; padding: 6px;
  font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1.1;
}
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art.has-img { padding: 0; }
.art.sm { width: 44px; height: 44px; border-radius: 9px; font-size: 9px; padding: 4px; }
.art.sm.has-img { padding: 0; }

/* collapsible summaries (Catalogue / Registrations / To-do) */
.summary-card { background: var(--surface); border-radius: var(--r-lg); }
.summary-card summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; position: relative;
  display: flex; flex-direction: column; gap: 2px; min-height: 64px;
}
.summary-card summary::-webkit-details-marker { display: none; }
.summary-card summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.summary-card[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.summary-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.summary-headline { color: var(--muted); font-size: 13px; }
.summary-body { padding: 4px 18px 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin: 0 0 12px; }
.stats div { background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats dd.ok { color: var(--ok); }
.stats dd.bad { color: var(--warn); }
.org-list { list-style: none; padding: 0; margin: 0 0 8px; }
.org-list li { padding: 10px 0; border-top: 1px solid var(--surface-2); display: flex; flex-direction: column; font-size: 14px; }
.cta h2 { margin-bottom: .35rem; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 4px 16px; background: var(--surface); border-radius: var(--r-lg); }
.list li + li { border-top: 1px solid var(--surface-2); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: 60px; color: var(--text); text-decoration: none; }
.row:hover { color: var(--text); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
.row-main:hover { color: var(--text); }
.row-main strong { font-weight: 600; }
.row-main strong, .row-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main .muted { font-size: 13px; }
.chev { color: var(--muted); font-size: 1.4rem; }
.simple-list { color: var(--muted); padding-left: 1.4rem; margin: 0; }

/* ---------- status text, badges, issues ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; line-height: 1.4; white-space: normal; }
.badge-ready { background: var(--ok-soft); color: var(--ok); }
.badge-missing { background: var(--error-soft); color: var(--warn); }
.badge-warn { background: var(--warn-soft); color: var(--accent); }
.badge-na { background: var(--surface-2); color: var(--muted); }
.badge-todo { background: var(--warn-soft); color: var(--accent); }
.issues { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.issues li { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; }
.issue-error { background: var(--error-soft); color: var(--warn); }
.issue-warning { background: var(--warn-soft); color: var(--accent-hover); }
.banner { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; }
.banner-warn { background: var(--warn-soft); color: var(--accent-hover); }
.notes { margin: 10px 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 13px; }
.notes li + li { margin-top: 4px; }

/* ---------- to-do ---------- */
.todo-list { list-style: none; padding: 0; margin: 0; }
.todo-list li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--surface-2); }
.todo-list li:first-child { border-top: 0; }
main > .todo-list { background: var(--surface); border-radius: var(--r-lg); padding: 4px 16px; }
.todo-text { flex: 1; min-width: 0; font-size: 14px; }
.todo-text a { color: var(--text); text-decoration-color: var(--surface-2); text-underline-offset: 3px; }
.todo-text p { margin: 4px 0 0; font-size: 13px; }

/* ---------- track page ---------- */
.track-hero {
  position: relative; min-height: 300px; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
  padding: 18px var(--gutter-r) 20px var(--gutter-l);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface-2) center / cover no-repeat; color: var(--hero-ink); overflow: hidden;
}
.track-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgb(14 13 11 / 10%) 0%, rgb(14 13 11 / 35%) 45%, rgb(14 13 11 / 88%) 100%);
}
.track-hero > * { position: relative; z-index: 1; }
.track-hero .eyebrow { color: var(--hero-ink-2); margin: 0 0 6px; }
.track-hero h1 { font-size: 34px; line-height: 1.05; letter-spacing: -0.5px; color: var(--hero-ink); margin: 0 0 6px; }
.track-hero .meta-line { font-size: 13px; color: var(--hero-ink-2); margin: 0; }
.back {
  width: 40px; height: 40px; border-radius: 20px; background: var(--scrim); color: var(--hero-ink);
  display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
}
.back:hover { color: var(--hero-ink); background: rgb(14 13 11 / 65%); }
.meter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meter-head h2 { font-size: 18px; margin: 0; }
.meter { display: flex; gap: 6px; }
.meter span { width: 34px; height: 6px; border-radius: 3px; background: var(--track); }
.meter span.on { background: var(--org, var(--accent)); }
.org-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-md); }
.org-card .org-head { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.org-card .org-head:hover { color: var(--text); }
.org-card .org-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.org-card .org-name { font-size: 15px; font-weight: 600; }
.org-card .org-state { font-size: 13px; color: var(--muted); }
.org-card .org-state.ready { color: var(--org); }
.org-card .org-state.blocked { color: var(--warn); }
.org-card .tick { color: var(--org); flex: none; }
.org-card .notes { margin-top: 0; }
.org-card details summary { cursor: pointer; font-size: 13px; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.reg { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 420px) { .reg { grid-template-columns: 1fr 1fr auto; align-items: center; } }
.meta { margin: 0; display: grid; gap: 10px; font-size: 14px; }
.meta div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 8px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- release header ---------- */
.release-head { display: flex; gap: 16px; align-items: center; }
.release-head .art { width: 96px; height: 96px; border-radius: 14px; font-size: 12px; }
.release-head h1 { font-size: 1.5rem; margin: 0 0 4px; }

/* ---------- review & editor ---------- */
.artwork { float: right; border-radius: var(--r-sm); margin: 0 0 8px 12px; width: 96px; height: 96px; object-fit: cover; }
.review-tracks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.review-track { background: var(--surface); border-radius: var(--r-md); padding: 16px 16px 4px; }
.track-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.track-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.track-head .btn { margin-left: auto; }
.editor { display: flex; flex-direction: column; gap: 16px; }
.rows { list-style: none; padding: 0; margin: 0; }
.share-row { border: 1px solid var(--surface-2); border-radius: var(--r-sm); padding: 12px 12px 8px; margin-bottom: 10px; background: var(--bg); }
.total { font-family: var(--font-display); font-weight: 700; margin: 4px 0; font-variant-numeric: tabular-nums; }
.total.ok { color: var(--ok); }
.total.bad { color: var(--warn); }
.totals { display: grid; grid-template-columns: 1fr; margin: 6px 0; }

/* ---------- registration packs ---------- */
.pack-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pack-head { display: flex; gap: 12px; align-items: flex-start; }
.pack-head input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.pack-head label { min-width: 0; }
.pack-details summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.pack-section h4 { margin: 14px 0 6px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.pack-fields { margin: 0; display: grid; }
.pack-fields div { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dt btn" "dd btn"; gap: 0 10px; padding: 9px 0; border-top: 1px solid var(--surface-2); align-items: center; }
.pack-fields dt { grid-area: dt; font-size: 12px; color: var(--muted); }
.pack-fields dd { grid-area: dd; margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pack-fields .copy { grid-area: btn; }
.pack-fields .empty dd { font-style: italic; }
.steps { padding-left: 1.3rem; margin: 0 0 12px; font-size: 14px; }
.steps li + li { margin-top: 6px; }
.pack-link { margin-top: 4px; }
.org-title { display: flex; align-items: center; gap: 10px; }
.center { text-align: center; margin: 0 0 6px; }
.offscreen { position: fixed; left: -9999px; top: 0; }
.samples { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.samples .hint { margin: 0; }

/* ---------- dialog sheet ---------- */
dialog.sheet {
  border: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  width: 100%; max-width: 640px; margin: auto auto 0; background: var(--surface); color: var(--text);
}
dialog.sheet::backdrop { background: rgb(0 0 0 / 60%); }
@media (min-width: 640px) { dialog.sheet { border-radius: var(--r-lg); margin: auto; } }

/* ---------- bottom navigation ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: space-around; align-items: center;
  background: var(--bg); border-top: 1px solid var(--surface-2);
  padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left, 0px));
  min-height: 76px;
}
.tabbar[hidden] { display: none; }
.nav-item {
  flex: 1; min-width: 0; max-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 0; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--accent); }
.nav-fab {
  flex: none; width: 52px; height: 52px; border-radius: 26px; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; margin: -14px 6px 0;
}
.nav-fab:hover { background: var(--accent-hover); color: var(--on-accent); }
.icon { width: 22px; height: 22px; background: currentColor; mask: var(--i) center / 22px no-repeat; -webkit-mask: var(--i) center / 22px no-repeat; }
.nav-fab .icon { width: 24px; height: 24px; mask-size: 24px; -webkit-mask-size: 24px; }
.icon-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.icon-disc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.icon-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.icon-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E"); }
.icon-send { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3 10 14'/%3E%3Cpath d='M21 3l-7 18-4-7-7-4z'/%3E%3C/svg%3E"); }
.icon-user { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E"); }

/* ---------- misc ---------- */
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; }
.spin { width: 18px; height: 18px; border: 2.5px solid var(--surface-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
  opacity: 0; transition: opacity .25s, transform .25s; z-index: 20; max-width: calc(100% - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--warn); color: var(--on-accent); }
.question h2 { font-size: 1.4rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- danger zone ---------- */
.danger-zone summary { cursor: pointer; color: var(--warn); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.danger-zone[open] summary { margin-bottom: 12px; }
.btn.danger-solid { background: var(--warn); border-color: var(--warn); color: var(--on-accent); }
.btn.danger-solid:hover { background: #F5A48B; color: var(--on-accent); }

/* ---------- earnings ---------- */
.earn-card { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.earn-card:hover { color: var(--text); }
.earn-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.earn-total { font-family: var(--font-display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.earn-big { display: block; font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.earn-check { font-size: 13px; color: var(--accent); }
.match-card { display: flex; flex-direction: column; gap: 4px; }
.match-card p { margin: 0; overflow-wrap: anywhere; }
.match-card .actions { margin-top: 8px; }
.assign { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
@media (min-width: 420px) { .assign { grid-template-columns: 1fr auto; align-items: center; } }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.sample { border-collapse: collapse; font-size: 12px; min-width: 100%; }
table.sample th, table.sample td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--surface-2); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
table.sample th { color: var(--muted); font-weight: 600; }
input[type="file"] { width: 100%; font: inherit; color: var(--muted); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 8px 16px; margin-right: 12px; cursor: pointer; }

/* ---------- your data ---------- */
.restore { margin-top: 14px; }
.restore summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.restore[open] summary { margin-bottom: 10px; }

/* ---------- BMI import ---------- */
.bmi-row { display: flex; flex-direction: column; gap: 6px; }
.bmi-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bmi-head strong { min-width: 0; overflow-wrap: anywhere; }
.bmi-row p { margin: 0; overflow-wrap: anywhere; }
.bmi-row .field { margin: 6px 0 0; }

/* ---------- bring your own form ---------- */
.map-list { gap: 8px; }
.map-row { background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.map-head { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.map-head strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.map-col { font-family: var(--font-display); font-size: 12px; color: var(--muted); min-width: 22px; }

/* ---------- complete your catalogue ---------- */
.check-card { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.check-card:hover { color: var(--text); }
.check-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.check-card strong { font-family: var(--font-display); font-size: 18px; }
.check-card span { font-size: 13px; color: var(--muted); }
.check-bar { display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 6px; }
.check-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.check-item { display: flex; flex-direction: column; gap: 8px; }
.check-item p { margin: 0; }
.check-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.check-head strong { min-width: 0; overflow-wrap: anywhere; }
.st-done strong { color: var(--muted); }
.how summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.pick-list .row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.progress-list { margin: 0; padding-left: 1.2rem; font-size: 14px; color: var(--muted); }
.progress-list:empty { display: none; }
.progress-list .bad { color: var(--warn); }
.check-head .badge { flex: none; white-space: nowrap; }

/* Who you are, and your artists */
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--surface-2); border-radius: 14px; cursor: pointer; }
.choice + .choice { margin-top: 8px; }
.choice input { margin-top: 4px; accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--warn-soft); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset legend { font-weight: 600; margin-bottom: 10px; }
.artist-input { display: flex; gap: 8px; align-items: center; }
.artist-input input { flex: 1; min-width: 0; }
.add-artist { display: flex; gap: 8px; }
.add-artist input { flex: 1; min-width: 0; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--accent); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--surface-2); color: var(--muted); font-size: 14px; text-decoration: none; white-space: nowrap; }
.chip.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.version { text-align: center; font-size: 12px; margin-top: 16px; }
.collector.add-society .name { color: var(--accent); }
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; }
.segmented button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 8px; }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Rights health */
.health-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.health-score { display: flex; align-items: baseline; flex: none; }
.health-num { font-family: 'Space Grotesk', sans-serif; font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1; }
.health-of { color: var(--muted); font-size: 14px; margin-left: 2px; }
.health-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.health-top { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.health-parts { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.health-part-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.health-bar { display: block; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; margin-bottom: 4px; }
.health-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.health-issues { list-style: none; padding: 0; margin: 0; }
.small-print { font-size: 12px; margin-top: 12px; }

/* Earnings */
.earn-home { display: flex; flex-direction: column; gap: 12px; }
.earn-head { display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: inherit; }
.earn-head > div { display: flex; flex-direction: column; gap: 2px; }
.earn-sources { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--surface-2); }
.earn-sources li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.earn-sources .name { flex: 1; }
.earn-sources .amt { font-variant-numeric: tabular-nums; }
.earn-missing { font-size: 13px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: block; text-decoration: none; color: inherit; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { flex: none; font-variant-numeric: tabular-nums; }
.bar-track { display: block; height: 8px; border-radius: 4px; background: var(--track); }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.month-chart { display: flex; align-items: stretch; gap: 2px; height: 160px; overflow-x: auto; }
.col { flex: 1 0 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font: inherit; }
.col-plot { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.col-bar { display: block; width: 70%; max-width: 28px; background: var(--accent); border-radius: 4px 4px 0 0; }
.col:hover .col-bar, .col:focus .col-bar { background: var(--accent-hover); }
.col-label { font-size: 11px; }
.month-readout { margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.todo-items { margin-top: 6px; font-size: 14px; } .todo-items ul { margin: 6px 0 0; padding-left: 18px; }
.banner-warn-card { border: 1px solid var(--warn); }

/* History and song link */
.history { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.history li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; font-size: 14px; }
.history-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.history-text { min-width: 0; }
.song-link .check-head { align-items: center; }
.residence { display: flex; gap: 10px; align-items: flex-end; }
.residence .field { flex: 1; min-width: 0; margin: 0; }
.reco-reason { font-size: 14px; color: var(--text); border-left: 2px solid var(--accent); padding-left: 10px; margin: 0; }
.warn-text { color: var(--warn); } .declaration legend { font-weight: 600; margin-bottom: 8px; }
.verified { display: block; color: var(--ok); font-size: 13px; }
.self-declared { display: block; color: var(--muted); font-size: 13px; }
.verified-badge, .self-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; }
.verified-badge { color: var(--ok); background: var(--ok-soft); }
.self-badge { color: var(--muted); background: var(--surface-2); }
.back-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; margin-right: 4px; border-radius: 50%; color: var(--text); text-decoration: none; }
.back-btn:hover, .back-btn:focus-visible { background: var(--surface-2); } .back-btn:not(:hover):not(:focus-visible) { background: none; }
.topbar .brand { margin-right: auto; }

/* Opportunities (top of Home) */
.opps { display: flex; flex-direction: column; gap: 12px; }
.opps-title { font-family: var(--font-display); font-size: 26px; line-height: 1.15; margin: 0; text-wrap: balance; }
.opp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opp-tile { background: var(--surface); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); min-width: 0; }
.opp-tile strong { font-family: var(--font-display); font-size: 24px; font-variant-numeric: tabular-nums; }
.opp-tile span { font-size: 14px; }
.opp-tile small { font-size: 12px; color: var(--muted); }
.opp-tile.warn strong { color: var(--accent); }
.opp-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--text); border: 1px solid var(--accent); }
.opp-next > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opp-next span { color: var(--muted); font-size: 14px; }
.opps-note { font-size: 12px; color: var(--muted); margin: 0; }
.back-btn[hidden] { display: none; }
.rate-basis { margin-top: 12px; }
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border: 1px solid var(--accent); font-size: 14px; }

/* Track: song and recording rights */
.rights-section > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.rights-section > summary::-webkit-details-marker { display: none; }
.rights-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rights-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.rights-count { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rights-count.ok { color: var(--ok); }
.rights-count.gap { color: var(--warn); }
.rights-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rights-orgs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); min-width: 0; }
.rights-earned { font-variant-numeric: tabular-nums; flex: none; }
.rights-body { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rights-section[open] .rights-line::after { content: ''; }
.artist-checks { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.artist-checks li.ok > span:first-child { color: var(--ok); }
.artist-checks li.no > span:first-child, .artist-checks li.no strong { color: var(--muted); }
.artist-checks strong { font-weight: 600; }
.list li .artist-checks { margin: 4px 0 10px; }
.artist-checks li { display: block !important; padding: 0 !important; border: 0 !important; min-height: 0 !important; line-height: 1.5; }
.artist-item > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.artist-item > summary::-webkit-details-marker { display: none; }
.artist-item[open] .chev { transform: rotate(90deg); }
.artist-detail { padding: 4px 0 10px; }
.ok-text { color: var(--ok); }
.added-note { border: 1px solid var(--ok); }
.found-artist { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--ok); border-radius: 14px; }
.found-artist img { border-radius: 50%; object-fit: cover; }
.profile-head { display: flex; flex-direction: column; gap: 4px; } .profile-head strong { font-family: var(--font-display); font-size: 20px; }
.legal-sec { margin-top: 20px; }
.legal-sec h2 { font-size: 18px; margin: 0 0 8px; }
.legal-sec p, .legal-sec li { color: var(--text); line-height: 1.6; max-width: 65ch; }
.legal-sec ul { padding-left: 20px; margin: 8px 0; }
.legal-note { font-size: 13px; color: var(--muted); }
.legal { display: flex; flex-direction: column; gap: 8px; padding-block: 16px 40px; }
.health-part-link { display: block; color: inherit; text-decoration: none; border-radius: 10px; margin: -6px; padding: 6px; }
.health-part-link:hover, .health-parts li.is-focus .health-part-link { background: var(--surface-2, rgba(255,255,255,.04)); }
.health-part-go { display: block; margin-top: 6px; color: var(--accent); font-weight: 600; font-size: .92em; }
#waiting, #attention { scroll-margin-top: 84px; }
.reminders { display: flex; flex-direction: column; gap: 4px; }
.reminder-list { list-style: none; margin: 0; padding: 0; }
.reminder-list li + li, .reminder-more .reminder-list li:first-child { border-top: 1px solid var(--surface-2); }
.reminder { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--text); text-decoration: none; }
.reminder:hover { color: var(--text); }
.reminder-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reminder-main .muted { font-size: .92em; }
.reminder-more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0 4px; list-style: none; }
.reminder-more summary::-webkit-details-marker { display: none; }
.verified-badge, .self-badge { white-space: nowrap; display: inline-block; }
.currency-choice { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .currency-choice label { color: var(--muted, #9a948a); font-size: .92em; } .currency-choice select { flex: 1; }

/* ---- Home v2: one screen, four boxes (design/v2/Home-v2) ---- */
.home { display: flex; flex-direction: column; gap: 12px;
  /* Fill the screen between the header (62 px) and the space kept for the tab bar (92 px), plus safe areas. */
  min-height: calc(100dvh - 62px - 8px - 92px - 4px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
.home .greeting { margin: 0; }
.home-title { font-family: var(--font-display); font-size: clamp(20px, 5.8vw, 24px); line-height: 1.15; margin: 0; }
.home-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: rgb(232 163 61 / 12%); color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; }
.home-banner:hover { color: var(--text); background: rgb(232 163 61 / 18%); }
.home-banner .dot { background: var(--accent); width: 8px; height: 8px; }
.home-banner > span:nth-child(2) { flex: 1; min-width: 0; color: var(--muted); }
.home-banner strong { color: var(--text); }
.home-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, minmax(140px, 1fr)); gap: 10px; }
.home-box { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; padding: 14px; border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.home-box:hover { color: var(--text); background: #211E19; }
.home-box .eyebrow { margin: 0; }
.home-box p { margin: 0; font-size: 13px; line-height: 1.35; }
.home-big { font-family: var(--font-display); font-size: clamp(22px, 7vw, 28px); white-space: nowrap; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.home-name { font-family: var(--font-display); font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.home-link { margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 600; }
.home-orgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px;
  /* Spread the societies through the box; with many, they simply sit closer. */
  flex: 1 1 0; min-height: 0; justify-content: space-evenly; }
.home-orgs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.home-orgs li span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-ring { flex: 1; display: flex; align-items: center; }
.home-ring svg { width: clamp(64px, 13vh, 128px); height: clamp(64px, 13vh, 128px); }
.home-box .art.sm, .home-box .art-tile.sm { width: clamp(36px, 6vh, 48px); height: clamp(36px, 6vh, 48px); }
.accent { color: var(--accent); }
main:has(> .home) { padding-block-end: 4px; }

/* ---- Royalties v2: Earned / Claimd tabs ---- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 14px; }
.tabs a { flex: 1; text-align: center; padding: 10px 8px; border-radius: 11px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.card.stat strong { font-family: var(--font-display); font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.source-list, .society-list { list-style: none; margin: 0; padding: 4px 16px; }
.source-list li + li, .society-list li + li { border-top: 1px solid var(--surface-2); }
.source-row, .society-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; color: var(--text); text-decoration: none; }
.source-row:hover, .society-row:hover { color: var(--text); }
.source-name { flex: 1; min-width: 0; }
.society-row .row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.society-row .row-main .muted { font-size: 13px; }
.pill { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  color: var(--org, var(--accent)); background: color-mix(in srgb, var(--org, var(--accent)) 18%, transparent); }
.pill.warn { color: var(--warn); background: var(--error-soft); }
.pill.quiet { color: var(--muted); background: var(--surface-2); }
.tick { flex: none; color: var(--ok); font-weight: 700; font-size: 18px; }

/* ---- Catalogue v2 ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head .page-title { margin: 4px 0 0; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; cursor: pointer; user-select: none; }
.icon-btn:hover { background: var(--surface-2); }
.dropdown-list { position: absolute; right: 0; top: 52px; z-index: 20; min-width: 260px; display: flex; flex-direction: column; padding: 6px; border-radius: var(--r-md); background: #23201B; box-shadow: 0 12px 32px rgb(0 0 0 / 45%); }
.dropdown-list a { padding: 12px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px; }
.dropdown-list a:hover { background: var(--surface-2); color: var(--text); }
input.search { width: 100%; min-height: 46px; padding: 10px 16px 10px 42px; border-radius: 14px; border: 1px solid var(--surface-2); background: var(--surface) no-repeat 14px center / 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A39B8F' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  color: var(--text); font: inherit; font-size: 15px; }
input.search::placeholder { color: var(--muted); }
button.chip { font: inherit; font-size: 14px; cursor: pointer; }
button.chip.active { font-weight: 600; }
.list-legend { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.rel-dots { display: flex; gap: 5px; flex: none; }
.sdot { width: 11px; height: 11px; border-radius: 6px; box-sizing: border-box; }
.sdot.done { background: var(--org); }
.sdot.open { border: 2px solid var(--org); background: transparent; }

/* ---- To-do v2 ---- */
.todo-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.todo-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.todo-card.done { opacity: .6; }
.todo-tick { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 13px; border: 2px solid #5A544B; background: transparent; color: var(--on-accent); font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.todo-tick:hover { border-color: var(--accent); }
.todo-tick.on { background: var(--ok); border-color: var(--ok); }
.todo-tick.ghost { cursor: default; }
.todo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.todo-body p { margin: 0; }
.todo-title { display: flex; align-items: baseline; gap: 8px; line-height: 1.3; }
.todo-title .dot { position: relative; top: -1px; width: 8px; height: 8px; }
.dot-neutral { background: var(--accent); }
.dot-error { background: var(--warn); }
.todo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.todo-done > summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; color: var(--muted); cursor: pointer; list-style: none; }
.todo-done > summary::-webkit-details-marker { display: none; }
.todo-done[open] > summary .chev { transform: rotate(180deg); }
@media (max-height: 700px) {
  .home { gap: 9px; }
  .home-box { gap: 4px; padding: 12px 14px; }
}

/* ---- Song and release earnings ---- */
.earn-list { list-style: none; margin: 0; padding: 4px 16px; }
.earn-list > li + li { border-top: 1px solid var(--surface-2); }
.earn-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 0; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.earn-row .row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.earn-row .row-main .muted { font-size: 13px; overflow-wrap: anywhere; }
.earn-row strong { flex: none; }
.earn-lines:empty { display: none; }
.earn-lines { padding: 0 0 12px; }
.line-list { list-style: none; margin: 0 0 6px; padding: 0; font-size: 13px; }
.line-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--surface-2); }
.line-list li span { min-width: 0; overflow-wrap: anywhere; }

/* ---- Profile: header, then grouped menus ---- */
.profile-top { display: flex; align-items: center; gap: 16px; }
.profile-top .avatar-lg { flex: none; width: 64px; height: 64px; border-radius: 32px; background: var(--surface-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.profile-top h1 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.profile-top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.profile-group { display: flex; flex-direction: column; gap: 8px; }
.profile-group .eyebrow { margin: 4px 0 0; }
.btn.signout { color: var(--warn); }

/* ---- Home boxes: month bars and large artwork fill the space ---- */
.mini-bars { flex: 1 1 0; min-height: 28px; display: flex; align-items: stretch; gap: 6px; padding-top: 6px; }
.mini-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.mini-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.mini-bar { width: 100%; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
.mini-bar.best { background: var(--accent); }
.mini-label { font-size: 11px; color: var(--muted); line-height: 1; }
.home-spacer { flex: 1 1 0; }
.home-art { flex: 1 1 0; min-height: 0; display: flex; }
.home-art .art { width: auto; height: 100%; max-width: 100%; max-height: 140px; aspect-ratio: 1; min-height: 0; border-radius: 12px; padding: 0; }
.home-newest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-newest span { color: var(--text); }

.home-orgs li .home-org-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-org-count { flex: none; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center; font-size: 12px; font-weight: 600;
  color: var(--org); background: color-mix(in srgb, var(--org) 18%, transparent); }
.home-org-done { flex: none; color: var(--ok); font-weight: 700; font-size: 12px; }


/* ---- Private beta: feedback button and the team's dashboard ---- */
.feedback-btn { width: 40px; height: 40px; border-radius: 20px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; margin-right: 6px; }
.feedback-btn:hover { color: var(--accent); background: var(--surface); }
.feedback-btn[hidden] { display: none; }
dialog.sheet { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 20px; box-shadow: 0 20px 60px rgb(0 0 0 / 55%); }
dialog.sheet::backdrop { background: rgb(0 0 0 / 60%); }
dialog.sheet h2 { margin: 0; }
dialog.sheet textarea { width: 100%; box-sizing: border-box; min-height: 120px; padding: 12px; border-radius: 12px; border: 1px solid var(--surface-2); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.beta-funnel { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.beta-funnel-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.beta-bar { display: block; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.beta-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.beta-list { list-style: none; margin: 0; padding: 4px 16px; }
.beta-list > li { padding: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.beta-list > li + li { border-top: 1px solid var(--surface-2); }
.beta-list p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.beta-row-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.beta-row-head strong { overflow-wrap: anywhere; }
.beta-pips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; }
.beta-pip { width: 10px; height: 10px; border-radius: 5px; border: 2px solid #5A544B; box-sizing: border-box; }
.beta-pip.on { background: var(--ok); border-color: var(--ok); }

/* Sign in and Create account (design/auth). */
.auth { display: flex; flex-direction: column; padding-top: 32px; }
.auth-logo { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.5px; color: var(--fg); text-decoration: none; text-align: center; }
.auth-logo span { color: var(--accent); }
.auth-logo.lg { font-size: 48px; letter-spacing: -1.5px; line-height: 1; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.auth-brand .tagline { margin: 0; text-align: center; font-size: 17px; }
.auth-signin .auth-card { margin-top: 32px; padding: 24px 20px; border-radius: 24px; }
.auth-card h2 { font-size: 24px; margin: 0 0 16px; }
.auth-forgot { text-align: center; margin: 14px 0 0; }
.auth-forgot:empty { display: none; }
.auth-forgot a, .auth .switch a, .auth-agree a { font-weight: 600; }
.auth .switch { margin-top: 22px; }
.auth-intro { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.auth-intro h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.5px; margin: 0; }
.auth-intro p { margin: 0; }
.auth-form { margin-top: 24px; }
.auth-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.45; margin: 4px 0 18px; }
.auth-agree input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.auth-foot { margin-top: 28px; text-align: center; font-size: 13px; color: var(--muted); }
