/* Kozeni.trade — global design tokens, reset, typography */

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

:root {
  --site-bg: #0e0d0b;
  --site-surface: #161412;
  --site-surface-2: #1c1916;
  --site-text: #f0ebe3;
  --site-text-muted: #9a948c;
  --site-copper: #b87333;
  --site-copper-light: #d4956a;
  --site-copper-dark: #7a4a1e;
  --site-border: rgba(184, 115, 51, 0.22);
  --site-border-strong: rgba(184, 115, 51, 0.38);
  --site-success: #7eb87f;
  --site-danger: #d17a7a;
  --site-error: #e8a8a8;
  --site-radius: 10px;
  --site-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --site-font-serif: "Noto Serif JP", Georgia, "Times New Roman", serif;
  --site-font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  --site-content-max: min(96vw, 72rem);

  /* Legacy aliases used in page CSS */
  --ink: var(--site-bg);
  --paper: var(--site-text);
  --copper: var(--site-copper);
  --copper-light: var(--site-copper-light);
  --copper-dark: var(--site-copper-dark);
  --muted: var(--site-text-muted);
  --border: var(--site-border);
}

html {
  font-size: 16px;
}

html,
body.site-app {
  min-height: 100%;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--site-font);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.site-app::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.site-mono {
  font-family: var(--site-font-mono);
  font-size: 0.875em;
}

.site-serif {
  font-family: var(--site-font-serif);
}

/* Shared form controls (dashboard, auth, tip, etc.) */

.site-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--site-text-muted);
  margin-top: 0.5rem;
}

.site-label:first-child {
  margin-top: 0;
}

.site-input,
.site-textarea,
.site-select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--site-font);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.site-input.site-mono,
.site-textarea.site-mono {
  font-family: var(--site-font-mono);
  font-size: 0.875rem;
}

.site-textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.site-input:focus,
.site-textarea:focus,
.site-select:focus {
  outline: 2px solid rgba(184, 115, 51, 0.45);
  outline-offset: 1px;
  border-color: var(--site-copper);
}

.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--site-border-strong);
  background: transparent;
  color: var(--site-copper-light);
  font-family: var(--site-font);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.site-btn:hover {
  background: rgba(184, 115, 51, 0.15);
  color: var(--site-text);
}

.site-btn-primary {
  background: var(--site-copper);
  border-color: var(--site-copper);
  color: #1a120c;
  font-weight: 600;
}

.site-btn-primary:hover {
  background: var(--site-copper-light);
  border-color: var(--site-copper-light);
  color: #1a120c;
}

.site-panel {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  padding: 1.25rem 1.35rem;
}

.site-alert-success {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  background: rgba(126, 184, 127, 0.12);
  border: 1px solid rgba(126, 184, 127, 0.35);
  color: #a8d4a9;
}

.site-alert-error {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  background: rgba(209, 122, 122, 0.12);
  border: 1px solid rgba(209, 122, 122, 0.35);
  color: var(--site-error);
}
