.site-root {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -10%, color-mix(in srgb, var(--anb-gold) 18%, transparent) 0%, transparent 40%),
    radial-gradient(circle at 82% 5%, color-mix(in srgb, var(--anb-gold-dim) 16%, transparent) 0%, transparent 42%),
    linear-gradient(180deg, var(--anb-base), var(--anb-abyss));
  color: var(--anb-text);
  font-family: var(--anb-font);
}

.site-root *, .site-root *::before, .site-root *::after { box-sizing: border-box; }
.site-root a { color: var(--anb-text); text-decoration: none; }
.site-root a:visited { color: var(--anb-text); }
.site-root a:hover { color: var(--anb-gold-hi); }
.site-root a:focus-visible, .site-root button:focus-visible { outline: 2px solid var(--anb-gold); outline-offset: 3px; }
.site-root h1, .site-root h2, .site-root p { margin-top: 0; }
[hidden] { display: none !important; }

.site-shell {
  width: min(1660px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--anb-line);
  border-radius: var(--anb-r-lg);
  background: linear-gradient(135deg, var(--anb-surface), var(--anb-base));
  box-shadow: var(--anb-shadow-sm);
}

.site-brand { display: flex; align-items: center; gap: 15px; min-width: 0; color: var(--anb-text); }
.site-brand:visited { color: var(--anb-text); }
.site-brand:hover { color: var(--anb-text); }
.site-brand .site-mark { color: var(--anb-gold); }
.site-brand .site-mark-cutout { fill: var(--anb-base); }
.site-brand .site-title { color: var(--anb-text); }
.site-mark { width: 42px; height: 42px; flex: none; }
.site-brand-text { display: grid; gap: 4px; min-width: 0; }
.site-brand-text .anb-eyebrow { margin: 0; }
.site-title { margin-bottom: 0; font-size: clamp(1.65rem, 2.4vw, 2.65rem); line-height: 1; }
.site-subtitle { max-width: 68ch; margin-bottom: 0; color: var(--anb-muted); font-size: 0.96rem; line-height: 1.45; }
.site-header-actions { display: inline-flex; flex: none; flex-wrap: wrap; gap: 8px; align-items: center; }

/* No min-height here. The state panels below carry their own presence for the empty and
   loading cases; putting a floor on the container instead stretched the populated card grid
   and left a hole in every card between the last line of text and the PLAY button. */
.site-body { display: grid; gap: 18px; }
.site-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 184px;
  padding: 28px;
  border: 1px dashed var(--anb-line);
  border-radius: var(--anb-r-lg);
  background: linear-gradient(135deg, var(--anb-surface), var(--anb-base));
  color: var(--anb-muted);
  box-shadow: var(--anb-shadow-sm);
}
.site-state p { max-width: 62ch; margin-bottom: 0; line-height: 1.55; }
.site-state[data-state='failure'] { border-color: color-mix(in srgb, var(--anb-danger) 55%, var(--anb-line)); color: var(--anb-text); }
.site-state[data-state='missing'] { border-color: var(--anb-line); color: var(--anb-text); }
.site-state[data-state='empty'] { color: var(--anb-text); }

.site-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 18px; align-items: stretch; }
.site-project-card { padding: 20px; display: flex; flex-direction: column; gap: 18px; background: linear-gradient(160deg, var(--anb-surface), var(--anb-base)); box-shadow: var(--anb-shadow-sm); animation: anb-rise 0.28s ease both; }
.site-project-card:hover { background: linear-gradient(160deg, var(--anb-raised), var(--anb-base)); box-shadow: var(--anb-shadow); }
.site-card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.site-card-title { margin-bottom: 0; font-size: clamp(1.2rem, 1.4vw, 1.55rem); line-height: 1.1; }
.site-card-summary { margin-bottom: 0; color: var(--anb-muted); line-height: 1.55; }
.site-card-meta { margin-bottom: 0; color: var(--anb-faint); font: 600 0.74rem/1.4 var(--anb-font-mono); letter-spacing: 0.04em; }
.site-link { color: var(--anb-gold) !important; text-decoration: underline !important; text-decoration-color: color-mix(in srgb, var(--anb-gold) 48%, transparent) !important; text-underline-offset: 0.18em; }
.site-link:visited { color: var(--anb-gold) !important; }
.site-link:hover, .site-link:focus-visible { color: var(--anb-gold-hi) !important; text-decoration-color: var(--anb-gold-hi) !important; }
.site-card-actions { min-height: 32px; margin-top: auto; display: flex; align-items: end; }
.site-card-play { width: 100%; justify-content: center; }

.site-profile { display: grid; gap: 18px; }
.site-profile-head { display: grid; gap: 12px; padding: 26px; background: linear-gradient(135deg, var(--anb-surface), var(--anb-base)); }
.site-profile-head .anb-eyebrow { margin-bottom: 0; }
.site-profile-title { margin-bottom: 0; color: var(--anb-text); font: 700 clamp(2rem, 4vw, 4rem)/1 var(--anb-font-display); letter-spacing: -0.02em; }
.site-profile-stats { display: flex; flex-wrap: wrap; gap: 8px; color: var(--anb-muted); }
.site-profile-stat { margin-bottom: 0; padding: 7px 10px; border: 1px solid var(--anb-line-soft); border-radius: var(--anb-r-sm); background: var(--anb-base); color: var(--anb-muted); font: 600 0.78rem/1.2 var(--anb-font-mono); }
.site-inline-empty { grid-column: 1 / -1; min-height: 130px; margin-bottom: 0; padding: 24px; border: 1px dashed var(--anb-line); border-radius: var(--anb-r); background: var(--anb-surface); color: var(--anb-muted); }

.site-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--anb-line-soft); color: var(--anb-faint); font: 600 0.78rem/1.3 var(--anb-font-mono); letter-spacing: 0.05em; }
.site-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .site-shell { width: min(100% - 32px, 1660px); padding-top: 20px; }
  .site-header { flex-direction: column; }
  .site-header-actions { width: 100%; }
}

@media (max-width: 640px) {
  .site-shell { width: min(100% - 24px, 1660px); gap: 16px; padding-bottom: 32px; }
  .site-header { gap: 18px; padding: 18px; }
  .site-brand { align-items: flex-start; }
  .site-mark { width: 34px; height: 34px; }
  .site-header-actions .anb-btn { flex: 1 1 auto; justify-content: center; }
  .site-card-grid { grid-template-columns: 1fr; }
  .site-state { min-height: 210px; flex-direction: column; align-items: flex-start; justify-content: center; }
}
