/* Limnic control plane styles, from the Limnic design system ("Current" direction).
   Served as a file because the Content Security Policy blocks inline styles. */

:root {
  --bg: #F5F7F9;
  --surface: #FFFFFF;
  --surface-sunken: #FAFBFC;
  --border: #E1E6EB;
  --border-subtle: #EDF0F3;
  --border-strong: #C9D2DB;
  --ink: #0F1F2E;
  --ink-secondary: #33475A;
  --ink-muted: #5A6B7B;
  --ink-faint: #8593A3;
  --on-accent: #FFFFFF;
  --accent: #0B6E83;
  --accent-hover: #08515F;
  --accent-soft: #E3F2F5;
  --live: #16794A;
  --live-ink: #11613B;
  --live-soft: #E6F4EC;
  --error: #C2410C;
  --error-ink: #7A3410;
  --error-soft: #FBEDE4;
  --syntax-function: #7A4CC2;
  --syntax-literal: #A3480E;
  --syntax-comment: #627284;

  /* Inter and JetBrains Mono when installed; no web fonts are loaded yet. */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --control-lg: 44px;
  --control-md: 40px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/20px var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ol, figure, pre { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[hidden] { display: none !important; }

/* --- Type ------------------------------------------------------------------------ */

.page-title { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }
.aside-title { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
.section-title { font-size: 16px; line-height: 24px; font-weight: 600; }
.card-title { font-size: 15px; line-height: 22px; font-weight: 600; }
.body { font-size: 14px; line-height: 20px; }
.body-long { font-size: 14px; line-height: 22px; }
.caption { font-size: 13px; line-height: 18px; }
.metric { font: 500 13px/18px var(--font-mono); color: var(--ink-secondary); }
.mono { font-family: var(--font-mono); font-size: 0.93em; }
.strong { font-weight: 500; color: var(--ink); }
.secondary { color: var(--ink-secondary); }
.muted { color: var(--ink-muted); }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.link { font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link--strong { font-weight: 600; padding: 12px 4px; }

.icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.stack-2 { display: flex; flex-direction: column; gap: 8px; }

/* --- Logo ------------------------------------------------------------------------ */

.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.logo__mark { display: block; flex: none; }
.logo__word { font: 600 20px/1 var(--font-mono); letter-spacing: -0.02em; }

/* --- Controls -------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-lg); padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-md);
  font: 600 14px/20px var(--font-sans); text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--bg); color: var(--ink); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form > .btn { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-secondary); }
.field__help { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.field__errors { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--error-ink); }

.field input {
  width: 100%; height: var(--control-lg); padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); font: 400 14px/20px var(--font-sans);
}
.field input::placeholder { color: var(--ink-muted); }
.field input[aria-invalid="true"] { border-color: var(--error); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.notices { display: flex; flex-direction: column; gap: 8px; }
.notice {
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--accent-soft); color: var(--ink);
}

.hint {
  display: flex; gap: 12px; padding: 16px;
  background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--ink-secondary);
}
.hint .icon { margin-top: 2px; }
.hint__title { font-weight: 600; color: var(--ink); }

.badge {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent);
}
.badge .icon { width: 20px; height: 20px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap;
}
.pill__dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill--live { background: var(--live-soft); color: var(--live-ink); }
.pill--live .pill__dot { background: var(--live); }

.tok-kw { color: var(--accent); font-weight: 600; }
.tok-fn { color: var(--syntax-function); }
.tok-lit { color: var(--syntax-literal); }
.tok-com { color: var(--syntax-comment); font-style: italic; }

/* --- Auth pages (sign in, sign up, sign out) ---------------------------------------- */

.auth__shell { min-height: 100vh; display: flex; flex-wrap: wrap; }

.auth__main {
  flex: 1 1 520px; min-width: 0;
  display: flex; flex-direction: column; gap: 32px; padding: 32px 40px;
  background: var(--surface); border-right: 1px solid var(--border);
}
.auth__main:last-child { border-right: 0; }
.auth__home { align-self: flex-start; text-decoration: none; }
.auth__center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.auth__column { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }
.auth__legal { display: flex; gap: 16px; font-size: 13px; line-height: 18px; }
.auth__legal a { color: var(--ink-muted); text-decoration: none; }
.auth__legal a:hover { color: var(--ink); text-decoration: underline; }

.auth__aside {
  flex: 1 1 480px; min-width: 0; padding: 48px 40px;
  display: flex; align-items: center; justify-content: center;
}
.auth__aside-inner { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 24px; }

.fineprint { padding-top: 20px; border-top: 1px solid var(--border-subtle); }

.sample { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.sample__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.sample__titles { display: flex; flex-direction: column; }
.sample__title { font-weight: 600; }
.sample__meta { display: flex; align-items: center; gap: 12px; }
.sample__code {
  padding: 12px 16px; overflow-x: auto; background: var(--surface-sunken);
  font: 400 13px/22px var(--font-mono); color: var(--ink);
}

.steps { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps__num {
  flex: none; width: 28px; height: 28px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font: 600 12px/16px var(--font-mono);
}

@media (max-width: 640px) {
  .auth__shell { align-content: flex-start; }
  .auth__main { padding: 24px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .auth__aside { padding: 32px 16px; }
}

/* --- Console (signed-in pages) ------------------------------------------------------ */

.console__shell { min-height: 100vh; display: flex; flex-wrap: wrap; }

.sidebar {
  flex: 0 0 232px; max-width: 100%;
  display: flex; flex-direction: column; gap: 20px; padding: 20px 14px;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar__home { padding: 0 8px; text-decoration: none; align-self: flex-start; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 10px; min-height: var(--control-md); padding: 0 10px;
  border-radius: var(--radius-md); color: var(--ink-secondary); text-decoration: none;
}
.nav__item .icon { width: 18px; height: 18px; }
.nav__item:hover { background: var(--bg); color: var(--ink); }
.nav__item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sidebar__account {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 8px 0; border-top: 1px solid var(--border-subtle);
}
.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font: 700 12px/1 var(--font-sans);
}
.sidebar__who { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.sidebar__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__email { font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__signout { flex-basis: 100%; margin: 0 -8px; }

.console__content {
  flex: 999 1 560px; min-width: 0;
  display: flex; flex-direction: column; gap: 28px; padding: 32px 40px 48px;
}
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-head .caption { color: var(--ink-muted); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.empty { align-items: flex-start; gap: 8px; padding: 28px; }
.empty .body-long { color: var(--ink-secondary); max-width: 52ch; }
.empty__badge {
  width: 44px; height: 44px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent);
}
.empty__badge .icon { width: 20px; height: 20px; }

@media (max-width: 800px) {
  .console__shell { align-content: flex-start; }
  .sidebar { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar__account { margin-top: 0; }
  .console__content { padding: 24px 16px 40px; }
}
