/* Shared design tokens, reset, site chrome, hub layout */

:root {
  --bg: #12141a;
  --surface: #1a1d26;
  --border: #2a2f3d;
  --text: #e8eaef;
  --muted: #8b92a5;
  --accent: #6b9fff;
  --accent-hover: #8cb4ff;
  --input-bg: #151922;
  --preview-bg: #1a1f28;
  --radius: 10px;
  --font-ui: "Inter", system-ui, sans-serif;
  --site-nav-h: 3rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

body.has-site-nav {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.has-site-nav > .app,
body.has-site-nav > .hub-main {
  flex: 1;
  min-height: 0;
}

/* Top navigation */

.site-nav {
  flex-shrink: 0;
  height: var(--site-nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 1rem;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.site-nav__brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__brand:hover {
  color: var(--accent-hover);
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

.site-nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.site-nav__links a:hover {
  color: var(--text);
}

.site-nav__links a.is-active,
.site-nav__links a[aria-current="page"] {
  color: var(--accent);
}

.site-nav__error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hub landing */

.hub-main {
  overflow: auto;
  padding: 2rem 1.25rem 3rem;
}

.hub-header {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
}

.hub-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hub-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.hub-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.hub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hub-card h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.hub-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.hub-card h2 a:hover {
  color: var(--accent);
}

.hub-card__desc {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.hub-card__cta {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.hub-card__cta:hover {
  color: var(--accent-hover);
}
