:root {
  --bg: #0d0d0f;
  --panel: #16161a;
  --line: #2a2a31;
  --text: #ecebe6;
  --muted: #9a98a3;
  --accent: #7ee36b;      /* GRYSKLL green */
  --warn: #ffb547;
  --bad: #ff6b6b;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.brand { font-family: 'Archivo Black', sans-serif; font-size: 22px; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 34px; width: auto; display: block; }
.brand .ce { color: var(--accent); }
.who { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 14px; }

main { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.foot {
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center;
  padding: 18px; border-top: 1px solid var(--line); font-size: 13px;
}
.foot a { color: var(--muted); }
.version { color: var(--muted); }

h1, h2 { font-family: 'Archivo Black', sans-serif; font-weight: 400; margin: 0 0 10px; }
h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.05; }
h2 { font-size: 20px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 22px 0 8px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 600; margin: 0 0 12px; }
.muted { color: var(--muted); }
.error { color: var(--bad); }

.hero { padding: 48px 0; }
.hero p { max-width: 460px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }

.wordmark-plate {
  background: #ecebe6; border-radius: var(--radius); padding: 10px 18px; margin-bottom: 28px;
  max-width: 300px;
}
.wordmark-plate img { width: 100%; height: auto; display: block; }
.count {
  min-width: 32px; height: 32px; padding: 0 10px; border-radius: 999px;
  display: grid; place-items: center; background: #23232a; font-weight: 600;
}

button { font: inherit; cursor: pointer; }
.primary {
  background: var(--accent); color: #0d0d0f; border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 600; margin-top: 8px;
}
.primary:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: 0; color: var(--muted); padding: 0; text-decoration: underline; }

ul.takes, ul.songs { list-style: none; margin: 14px 0 0; padding: 0; }
.take, .song { padding: 14px 0; border-top: 1px solid var(--line); }
.take:first-child, .song:first-child { border-top: 0; }
.take-main, .song-main { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.take-song { font-weight: 600; }
.take-name, .roles { color: var(--muted); font-size: 14px; }
.take-meta, .song-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; font-size: 13px; }
.take-notes { margin: 8px 0 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.song-main a, .song-main span:first-child { font-weight: 600; }

.tag {
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
  font-size: 12px; color: var(--muted);
}
.status-owed { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.status-needs-decision { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.status-submitted { color: #7fb6ff; border-color: #7fb6ff66; }
.status-accepted { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.due { color: var(--muted); }
.overdue { color: var(--bad); font-weight: 600; }

details { margin-top: 18px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }

@media (max-width: 480px) {
  .card { padding: 18px 16px; }
  .who #who-name { display: none; }
}

/* V2: announcements, tasks, member updates */
.small { font-size: 13px; }
.pending { color: #7fb6ff; margin: 8px 0 0; }
.card.attention { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.count.hot { background: var(--warn); color: #0d0d0f; }
.ann-body { margin: 8px 0 12px; white-space: pre-wrap; }
.announcement.read .ann-body { color: var(--muted); }
.primary.small { padding: 8px 16px; margin-top: 0; font-size: 14px; }
.ghost {
  background: none; color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px;
}
.ghost:hover { border-color: var(--accent); }
.update { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; font-size: 13px; }
.update-form { width: 100%; display: grid; gap: 8px; }
.update-form p { margin: 0; }
.update-form input, .update-form textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.update-form input:focus, .update-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.row { display: flex; gap: 14px; align-items: center; }
.task-done, .task-complete, .task-completed { color: var(--accent); }
.task-in-progress { color: var(--warn); }

/* V3: funding */
.money { margin-top: 10px; }
.money p { margin: 0 0 6px; }
.meter { height: 8px; background: #23232a; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.owed { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.owed p { margin: 0; }
ul.takes.nested { margin: 6px 0 0 14px; }
.item-paid, .stage-complete { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.item-quoted, .stage-underway { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* v0.3.2: home tiles, sections, project updates */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; position: relative;
}
.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile-count { font-family: 'Archivo Black', sans-serif; font-size: 40px; line-height: 1; margin-bottom: auto; }
.tile-title { font-weight: 600; font-size: 16px; line-height: 1.25; }
.tile-sub { color: var(--muted); font-size: 13px; }
.tile.hot { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.tile.hot .tile-count { color: var(--warn); }
.tile.bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.tile.bad .tile-count, .tile.bad .tile-sub { color: var(--bad); }
.back { display: inline-block; color: var(--muted); font-size: 15px; margin: 0 0 16px; padding: 6px 0; }
.back:hover { color: var(--text); text-decoration: none; }
.card-head + * { margin-top: 14px; }
.block { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--line); }
.release { margin: 10px 0 0; font-weight: 600; }
.dev-released { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.dev-mastering, .dev-re-mastering, .dev-release-ready { color: #7fb6ff; border-color: #7fb6ff66; }
.dev-arrangement, .dev-mixing, .dev-mixing-prep, .dev-recording { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* v0.3.5: easier to tell where you are */
.crumbs { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.crumbs .back { margin: 0; }
.crumbs .here {
  color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 700;
}
.crumbs .here::before { content: '/'; color: var(--line); margin-right: 10px; }
.card h3 {
  color: var(--accent); border-left: 3px solid var(--accent); padding-left: 10px;
  font-size: 13px; letter-spacing: 1.2px;
}
.block h3 { margin-top: 18px; }
.pill {
  white-space: nowrap; flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
}
.card-head .tag { white-space: nowrap; flex-shrink: 0; }
.card-head h2 { line-height: 1.15; }
.status-not-used { color: var(--muted); }

/* v0.3.7: help page */
a.brand { color: var(--text); text-decoration: none; }
.help h1 { margin-bottom: 12px; }
.help > .muted { max-width: 560px; margin-bottom: 20px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.toc a {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--text);
}
.toc a:hover { border-color: var(--accent); text-decoration: none; }
.help .card { scroll-margin-top: 16px; }
.help .card h2 { margin-bottom: 12px; }
.help .card p { margin: 0 0 10px; }
.help .card ul, .help .card ol { margin: 0 0 10px; padding-left: 20px; }
.help .card li { margin-bottom: 6px; }
.help .card li:last-child, .help .card p:last-child { margin-bottom: 0; }
.home-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.home-head .eyebrow { margin: 0; }
a.help-button { display: inline-block; color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 16px; font-size: 14px; }
a.help-button:hover { text-decoration: none; }
.help-intro { margin: 0 0 20px; }
.signin-mark { display: block; width: 96px; height: auto; margin-bottom: 28px; }

/* v0.4: funding stage buttons, Awaiting Mix Funding */
.segs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 16px; }
.seg {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 12px; font-weight: 600; font-size: 14px;
}
.seg:hover { border-color: var(--accent); }
.seg.on { background: var(--accent); color: #0d0d0f; border-color: var(--accent); }
.seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stage-now { font-family: 'Archivo Black', sans-serif; font-size: 18px; margin: 0 0 6px; }
.dev-awaiting-mix-funding { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* v0.4.1: ISRC codes, Leadership */
.doc-approved { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.doc-submitted { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.doc-needs-input { color: #ff9f5a; border-color: #ff9f5a66; }
.doc-draft { color: #7fb6ff; border-color: #7fb6ff66; }
.update-form input[type="search"] { margin: 4px 0 8px; }
.song .update { margin-top: 8px; }

/* v0.4.5: product name on sign-in */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.product-name {
  margin: 0 0 14px; text-transform: uppercase; letter-spacing: 2px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.product-name .pn-crew { color: var(--text); letter-spacing: 3px; margin-right: 4px; }
.product-name .pn-c { color: var(--accent); font-weight: 800; }
.product-name .pn-word { display: inline-block; transition: opacity 0.35s ease, transform 0.35s ease; }
.product-name .pn-word.out { opacity: 0; transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .product-name .pn-word { transition: none; } }

/* v0.4.6: developer credit */
.foot .credit { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 12px; }
.foot .credit a { color: var(--text); }

/* v0.4.7: contributions by project, stage and type */
.contrib-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.contrib-head h3, .contrib-head h4 { margin-bottom: 6px; }
/* Each stage is its own tinted box. Pre-campaign money gets a warm edge. */
.contrib-stage {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-left: 4px solid var(--accent);
}
.contrib-stage.before {
  background: color-mix(in srgb, var(--warn) 6%, transparent);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
  border-left-color: var(--warn);
}
.contrib-stage h4 { margin: 0 0 4px; font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 16px; }
.contrib-stage.before h4 { color: var(--warn); }
/* Contributor types each get their own color. */
.contrib-type { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.contrib-type:first-of-type { border-top: 0; }
.contrib-type h5 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.type-crew h5 { color: var(--accent); }
.type-crewmunity h5 { color: #7fb6ff; }
.type-family-loan h5 { color: #ff9f5a; }
.contrib-type .takes { margin-top: 6px; }

/* v0.4.10: colored groups, used across gryCE */
.group {
  --tone: var(--muted);
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent);
  border-left: 4px solid var(--tone);
}
.group .group { margin-top: 12px; }
.tone-green  { --tone: var(--accent); }
.tone-amber  { --tone: var(--warn); }
.tone-orange { --tone: #ff9f5a; }
.tone-blue   { --tone: #7fb6ff; }
.tone-red    { --tone: var(--bad); }
.tone-gray   { --tone: #8a8a96; }
.group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 4px; }
.group-head h4 {
  margin: 0; color: var(--tone); font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 16px;
}
.group-count {
  min-width: 24px; text-align: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #0d0d0f; background: var(--tone);
}
.group > .takes, .group > .songs { margin-top: 6px; }
.group > p.small { margin: 0 0 6px; }

/* v0.4.13: section cards that jump down the page */
.tiles.jump { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.tiles.jump .tile {
  aspect-ratio: auto; min-height: 92px; padding: 12px; font: inherit; text-align: left; cursor: pointer;
}
.tiles.jump .tile-count { font-size: 28px; }
.tiles.jump .tile-title { font-size: 14px; }
.tiles.jump .tile-sub { font-size: 12px; }
@media (max-width: 360px) { .tiles.jump { grid-template-columns: repeat(2, 1fr); } }

/* v0.4.15: project cards */
.tiles.cards { margin-top: 10px; }
.tiles.cards .tile { aspect-ratio: auto; min-height: 132px; }
.tiles.cards .tile-count { font-size: 32px; }
.tiles.cards .tile-title { font-size: 15px; }
.tile-flag { align-self: flex-start; margin-top: 4px; }

/* v0.4.17: group efforts */
.effort-line { margin: 8px 0 0; font-weight: 700; }

/* v0.4.19: View as (Support) */
.view-as-banner {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin: 0 0 1rem; padding: 0.6rem 0.9rem;
  border: 1px solid var(--warn); border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 18%, var(--panel));
}
.view-as-banner p { margin: 0; font-size: 0.9rem; }
body.viewing-as .update { display: none; }

/* v0.4.21: links show as buttons */
.link-button {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: baseline;
  margin: 2px 2px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 600; line-height: 1.5; text-decoration: none; white-space: nowrap;
}
.link-button::after { content: '↗'; font-size: 11px; opacity: 0.8; }
.link-button[href$=".html"]::after, .link-button[href^="#"]::after { content: none; }
.link-button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
