/* vito.css — the app's own styles, loaded after tokens.css.
 *
 * Two rules govern this file, and both matter for the same reason
 * rastrillo's own blog example states them: they are what let this
 * stylesheet follow the dark theme without ever knowing dark exists.
 *   1. Every value comes from a token. No literal colour, no literal
 *      px spacing.
 *   2. It never styles an .rst- class — those belong to the ui
 *      partials, and this file only adds what they deliberately don't
 *      ship.
 *
 * Task 2 ships just enough to style the four static page shells
 * (feed/event/page/error) and the prose Markdown rendering produces;
 * later tasks add the feed cards, player and chat layout as those
 * screens get built out.
 */

.vito-shell { max-inline-size: 44rem; }
.vito-shell p { color: var(--rst-text-muted); }

/* Pre-canary review: the layout's masthead — every community's own
 * name, visible on every screen, not just its own settings form. */
.vito-masthead { margin-block-end: var(--rst-sp-4); }
.vito-masthead-name {
  color: var(--rst-text);
  font-weight: 700;
  text-decoration: none;
}
.vito-masthead-name:hover { color: var(--rst-accent); }

/* Pre-canary review: the layout's main nav — Home plus every published
 * page, with the sign-out control (when signed in) pushed to the end
 * rather than sitting in its own separate, unstyled nav. */
.vito-main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rst-sp-4);
  border-bottom: 1px solid var(--rst-line);
  margin-block-end: var(--rst-sp-5);
  padding-block-end: var(--rst-sp-3);
}
.vito-main-nav a { color: var(--rst-text-muted); text-decoration: none; }
.vito-main-nav a:hover { color: var(--rst-accent); }
.vito-main-nav form { margin-inline-start: auto; }

/* Prose measure for RenderMarkdown's output — plain pages, post/comment
 * bodies, event descriptions. */
.vito-prose { color: var(--rst-text); line-height: 1.7; max-inline-size: 34rem; }
.vito-prose p { margin: 0 0 var(--rst-sp-4); }
.vito-prose h1,
.vito-prose h2,
.vito-prose h3 { margin: var(--rst-sp-5) 0 var(--rst-sp-3); }
.vito-prose ul { margin: 0 0 var(--rst-sp-4); padding-inline-start: var(--rst-sp-5); }
.vito-prose pre {
  background: var(--rst-surface-2);
  border-radius: var(--rst-radius-sm);
  overflow-x: auto;
  padding: var(--rst-sp-3);
}
.vito-prose a { color: var(--rst-accent); }

/* Task 5: the community feed — hero, tabs, composer, post/event
 * cards. Same two rules as above: every value is a token, and none of
 * these touch an .rst- class. */

.vito-feed-hero {
  background: var(--rst-accent-soft);
  border-radius: var(--rst-radius);
  padding: var(--rst-sp-4);
  margin-block-end: var(--rst-sp-5);
}
.vito-feed-hero p { color: var(--rst-text); margin: 0 0 var(--rst-sp-3); }

.vito-feed-tabs {
  display: flex;
  gap: var(--rst-sp-4);
  border-bottom: 1px solid var(--rst-line);
  margin-block-end: var(--rst-sp-5);
  padding-block-end: var(--rst-sp-2);
}
.vito-feed-tabs a { color: var(--rst-text-muted); text-decoration: none; }
.vito-feed-tabs a.vito-feed-tab--active { color: var(--rst-accent); font-weight: 600; }

.vito-composer,
.vito-comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--rst-sp-2);
  margin-block-end: var(--rst-sp-5);
}
.vito-composer textarea,
.vito-comment-form textarea {
  font: inherit;
  border: 1px solid var(--rst-line-strong);
  border-radius: var(--rst-radius-sm);
  padding: var(--rst-sp-3);
  background: var(--rst-surface);
  color: var(--rst-text);
}
.vito-feed-join-nudge { color: var(--rst-text-muted); margin-block-end: var(--rst-sp-5); }

.vito-feed-items { display: flex; flex-direction: column; gap: var(--rst-sp-5); }
.vito-feed-empty,
.vito-event-empty { color: var(--rst-text-muted); }

.vito-post-card,
.vito-event-card {
  border: 1px solid var(--rst-line);
  border-radius: var(--rst-radius);
  padding: var(--rst-sp-4);
  background: var(--rst-surface);
}
.vito-post-meta { color: var(--rst-text-faint); font-size: var(--rst-fs-sm); margin: 0 0 var(--rst-sp-2); }
.vito-event-card-label {
  color: var(--rst-accent);
  font-size: var(--rst-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.vito-event-card h2 { margin: var(--rst-sp-1) 0 var(--rst-sp-2); }

.vito-comment-list {
  list-style: none;
  margin: var(--rst-sp-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--rst-sp-3);
}
.vito-comment { border-inline-start: 2px solid var(--rst-line); padding-inline-start: var(--rst-sp-3); }

.vito-error {
  color: var(--rst-tone-negative-fg);
  background: var(--rst-tone-negative-bg);
  border-radius: var(--rst-radius-sm);
  padding: var(--rst-sp-2) var(--rst-sp-3);
  margin: 0 0 var(--rst-sp-2);
}
