/* ==========================================================================
   SKY.exe — design tokens & base styles (shared by the website and the admin)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --fg: #0a0e17;
  --muted: #566074;
  --subtle: #f5f7fa;
  --card: #ffffff;
  --line: #e3e8ef;
  --accent: #0b6e9f;
  --ring: #58c9ff;
  --danger: #c62828;
  --success: #1b7f4b;
  --warning: #a15c00;
  --ink: #0a0e17;
  --sky: #58c9ff;
  --sky-deep: #1689c2;
  --radius: 1.25rem;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 20px 50px -20px rgb(10 14 23 / 0.35);
  color-scheme: light;
}

:root.dark {
  --bg: #0a0e17;
  --fg: #eef2f7;
  --muted: #9aa6b8;
  --subtle: #0f1623;
  --card: #111a29;
  --line: #1f2a3c;
  --accent: #58c9ff;
  --danger: #ff6b6b;
  --success: #4ade80;
  --warning: #fbbf24;
  color-scheme: dark;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 5rem; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--fg); color: var(--bg); padding: .5rem .9rem; border-radius: .5rem; }
.skip-link:focus { top: .75rem; }

/* Layout */
.container { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: 1.25rem; }
.container.narrow { max-width: 48rem; }
.container.medium { max-width: 64rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }

/* Typography helpers */
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .8rem 1.3rem; font-weight: 650; font-size: .95rem; line-height: 1.2;
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--sky-deep); color: #fff; }
.btn-sky { background: var(--sky); color: var(--ink); }
.btn-sky:hover { background: #8bdbff; }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #1e293b; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border-radius: 999px; border: 1px solid var(--line); transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--fg); }

/* Cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }

/* Forms */
.input {
  width: 100%; border: 1px solid var(--line); border-radius: .6rem; background: var(--card); color: var(--fg);
  padding: .6rem .75rem; font-size: .9rem; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--sky-deep); box-shadow: 0 0 0 3px rgb(88 201 255 / .25); }
.input[aria-invalid='true'] { border-color: var(--danger); }
textarea.input { resize: vertical; }
.label { display: block; font-size: .8rem; font-weight: 650; margin-bottom: .35rem; }
.help { margin-top: .3rem; font-size: .75rem; color: var(--muted); }
.error-text { margin-top: .3rem; font-size: .75rem; color: var(--danger); }
.notice { border-radius: .75rem; padding: .7rem .9rem; font-size: .875rem; }
.notice-error { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.notice-success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.notice-warning { background: color-mix(in srgb, var(--warning) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); }

/* Long-form content */
.prose { line-height: 1.75; font-size: 1.0625rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; font-weight: 800; margin-top: 2em; line-height: 1.25; }
.prose h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.6em; }
.prose h4 { font-size: 1.05rem; font-weight: 700; margin-top: 1.4em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { border-left: 3px solid var(--sky); padding-left: 1em; color: var(--muted); }
.prose code { background: var(--subtle); border: 1px solid var(--line); border-radius: .35rem; padding: .1em .35em; font-size: .9em; font-family: var(--mono); }
.prose pre { background: var(--subtle); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; overflow-x: auto; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose img { border-radius: .75rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95em; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5em .75em; text-align: left; }

/* Spinner */
.spinner {
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block { display: flex; justify-content: center; align-items: center; gap: .6rem; padding: 4rem 1rem; color: var(--muted); font-size: .9rem; }
