/* Lyxter AI — brand stylesheet (drop-in, no build step). Matches lyxter.com. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* colors */
  --lx-ink: #101828;
  --lx-ink-2: #1d2939;
  --lx-signal: #f59e0b;
  --lx-signal-hover: #d97706;
  --lx-bg: #ffffff;
  --lx-bg-muted: #f7f8fa;
  --lx-hairline: #e4e7ec;
  --lx-text-muted: #475467;

  /* fonts */
  --lx-font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --lx-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* radii */
  --lx-radius-sm: 6px;
  --lx-radius-md: 12px;
  --lx-radius-lg: 16px;
  --lx-radius-full: 9999px;

  /* shadow */
  --lx-shadow-card: 0 10px 30px -12px rgba(16, 24, 40, 0.18);
}

/* base typography (opt-in; remove this block if it clashes with the tool's CSS) */
body {
  font-family: var(--lx-font-sans);
  color: var(--lx-ink);
  background: var(--lx-bg);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--lx-font-sans);
  font-weight: 600;
  color: var(--lx-ink);
  line-height: 1.15;
}
h1, h2 {
  letter-spacing: -0.02em;
}
a {
  color: var(--lx-ink);
}

/* buttons */
.lx-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
  font-family: var(--lx-font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border-radius: var(--lx-radius-full);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lx-btn--primary {
  background: var(--lx-signal);
  color: #ffffff;
}
.lx-btn--primary:hover {
  background: var(--lx-signal-hover);
}
.lx-btn--ink {
  background: var(--lx-ink);
  color: #ffffff;
}
.lx-btn--ink:hover {
  background: var(--lx-ink-2);
}
.lx-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lx-btn--primary:active:not(:disabled) {
  transform: translateY(1px);
}

/* fault-code chip — e.g. P0420, SPN 3226 FMI 15 */
.lx-chip {
  font-family: var(--lx-font-mono);
  font-size: 0.8em;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--lx-radius-sm);
  padding: 0.05em 0.45em;
  white-space: nowrap;
}
.lx-chip--dark {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

/* card */
.lx-card {
  background: var(--lx-bg);
  border: 1px solid var(--lx-hairline);
  border-radius: var(--lx-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--lx-shadow-card);
}

/* amber accent rule (above a heading) */
.lx-rule {
  display: block;
  height: 4px;
  width: 40px;
  border-radius: var(--lx-radius-full);
  background: var(--lx-signal);
}

/* inputs */
.lx-input {
  font-family: var(--lx-font-sans);
  font-size: 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--lx-bg);
  color: var(--lx-ink);
  border: 1px solid var(--lx-hairline);
  border-radius: var(--lx-radius-md);
  outline: none;
  transition: border-color 0.2s ease;
}
.lx-input:focus {
  border-color: var(--lx-signal);
}

/* helpers */
.lx-muted { color: var(--lx-text-muted); }
.lx-hairline { border-top: 1px solid var(--lx-hairline); }
.lx-surface-muted { background: var(--lx-bg-muted); }
.lx-surface-ink { background: var(--lx-ink); color: #ffffff; }

/* ============================================================
   Lyxter theming layer — light (default) + steel blue
   Switch with <html data-theme="light|steel">; persisted in JS.
   Steel reuses the brand ink palette (#101828 / #1d2939) so the
   dark mode stays on-brand and amber remains accent-only.
   Pages consume the semantic --lx-page/-panel/-text/... tokens.
   ============================================================ */
:root,
html[data-theme="light"] {
  --lx-page:        var(--lx-bg);        /* #ffffff */
  --lx-panel:       #ffffff;             /* cards, bubbles, inputs */
  --lx-sidebar:     var(--lx-bg-muted);  /* #f7f8fa */
  --lx-sunken:      var(--lx-bg-muted);
  --lx-text:        var(--lx-ink);
  --lx-muted:       var(--lx-text-muted);
  --lx-border:      var(--lx-hairline);
  --lx-hover:       rgba(16, 24, 40, 0.05);
  --lx-accent-soft: rgba(245, 158, 11, 0.12);
  --lx-shadow:      0 10px 30px -12px rgba(16, 24, 40, 0.18);
  color-scheme: light;
}
html[data-theme="steel"] {
  --lx-page:        #101828;  /* ink navy */
  --lx-panel:       #1d2939;  /* ink-2 */
  --lx-sidebar:     #0c121e;
  --lx-sunken:      #161f2e;
  --lx-text:        #f7f8fa;
  --lx-muted:       #98a2b3;
  --lx-border:      #2a3647;
  --lx-hover:       rgba(255, 255, 255, 0.06);
  --lx-accent-soft: rgba(245, 158, 11, 0.16);
  --lx-shadow:      0 10px 30px -12px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* make the verbatim brand components follow the active theme */
body { background: var(--lx-page); color: var(--lx-text); }
.lx-card { background: var(--lx-panel); border-color: var(--lx-border); box-shadow: var(--lx-shadow); }
.lx-muted { color: var(--lx-muted); }

/* keyboard focus: visible amber ring; pointer clicks stay clean */
:focus-visible {
  outline: 2px solid var(--lx-signal);
  outline-offset: 2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; /* fields signal focus via border-color instead */
}

/* shared theme-toggle control (sun in steel mode, moon in light) */
.lx-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--lx-radius-full);
  background: transparent;
  border: 1px solid var(--lx-border);
  color: var(--lx-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.lx-theme-toggle:hover { color: var(--lx-signal); border-color: var(--lx-signal); }
.lx-theme-toggle .sun { display: none; }
.lx-theme-toggle .moon { display: block; }
html[data-theme="steel"] .lx-theme-toggle .sun { display: block; }
html[data-theme="steel"] .lx-theme-toggle .moon { display: none; }
