:root {
  --brand-gradient: linear-gradient(90deg, #ea1f27 0%, #a5002f 30%, #625d80 62%, #2638c4 100%);
  --bg: #f3f4fa; --panel: #fff; --field-bg: #fff;
  --line: rgba(18,19,64,.11); --line-strong: rgba(18,19,64,.2);
  --text: #121340; --muted: #5d6187; --faint: #7d81a3;
  --accent: #1e7fc1; --accent-soft: rgba(30,127,193,.1);
  --ok: #0d7f52; --danger: #c62828;
  --bar-bg: rgba(255,255,255,.92); --ink-rgb: 18,19,64;
  --shadow: 0 1px 2px rgba(18,19,64,.06), 0 6px 18px rgba(18,19,64,.06);
  --brand-nudge: 4.5px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0c2c; --panel: #15174a; --field-bg: #1b1e5a;
  --line: rgba(145,155,205,.18); --line-strong: rgba(145,155,205,.32);
  --text: #fff; --muted: #aab1d8; --faint: #7f87b8;
  --accent: #6cb6ec; --accent-soft: rgba(30,127,193,.2);
  --ok: #3ddc97; --danger: #ff6b6b;
  --bar-bg: rgba(11,12,44,.92); --ink-rgb: 255,255,255;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bar { position: sticky; top: 0; z-index: 5; background: var(--bar-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1180px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.stripe { height: 3px; background: var(--brand-gradient); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex: none; }
.brand img { height: 26px; display: block; }
.brand span { font-weight: 800; font-size: 17px; line-height: 1; padding: 2px 0 2px 12px; border-left: 1px solid var(--line-strong); transform: translateY(var(--brand-nudge)); }
.brand .logo-dark, [data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }

.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field-bg); color: var(--muted); width: 260px; min-width: 0; }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; width: 100%; min-width: 0; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(var(--ink-rgb), .06); color: var(--text); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
.icon-btn.done { color: var(--ok); }

.page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.group + .group { margin-top: 30px; }
.group h2 { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.card { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.main { display: block; padding: 16px 18px 10px; color: inherit; text-decoration: none; flex: 1; }
.head { display: flex; align-items: center; gap: 8px; }
.head h3 { margin: 0; font-size: 16.5px; font-weight: 700; }
.go { margin-left: auto; color: var(--faint); display: inline-flex; }
.card:hover .go { color: var(--accent); }
.main p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); opacity: .5; flex: none; }
.dot.ok { background: var(--ok); opacity: 1; }
.dot.bad { background: var(--danger); opacity: 1; }

.foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 18px; min-width: 0; }
.tag { font-size: 11.5px; font-weight: 600; color: var(--muted); background: rgba(var(--ink-rgb), .06); padding: 3px 8px; border-radius: 999px; flex: none; }
.subs { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; flex: 1; }
.sub { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.sub:hover { text-decoration: underline; }
.copy { margin-left: auto; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

@media (max-width: 640px) {
  .bar-in { padding: 0 14px; gap: 10px; }
  .brand img { height: 22px; }
  .brand span { font-size: 15px; padding-left: 10px; --brand-nudge: 3.8px; }
  .search { width: auto; flex: 1; }
  .page { padding: 20px 14px 48px; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) { .brand span { display: none; } }

/* Group card (Studio): several projects inside one card */
.card.multi .main { flex: none; padding-bottom: 6px; }
.items { display: grid; gap: 8px; padding: 4px 10px 6px; }
.item { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(var(--ink-rgb), .025); color: inherit; text-decoration: none; min-width: 0; }
.item:hover { border-color: var(--accent); }
.item .head { gap: 8px; }
.item h4 { margin: 0; font-size: 15px; font-weight: 700; }
.item p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.item:hover .go { color: var(--accent); }
