/* Shared tokens and basics for the landing page and the dashboard. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #5d6470;
  --border: #e3e6ea;
  --accent: #2f5ce0;
  --accent-text: #ffffff;
  --accent-soft: #eaf0fd;
  --danger: #c2362b;
  --danger-soft: #fdeceb;
  --success: #1d7a46;
  --success-soft: #e6f4ec;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-soft: #161920;
    --surface: #161920;
    --text: #eceef2;
    --muted: #9aa1ad;
    --border: #272b34;
    --accent: #6d8ef5;
    --accent-text: #0b0d12;
    --accent-soft: #1b2440;
    --danger: #f07167;
    --danger-soft: #3a1d1b;
    --success: #5cc58a;
    --success-soft: #16301f;
    --shadow: none;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }

p { margin: 0 0 1em; }

.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .62em 1.05em;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; filter: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; }

.input {
  width: 100%;
  padding: .62em .8em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.notice {
  padding: .7em .9em;
  border-radius: 8px;
  font-size: .92rem;
  background: var(--accent-soft);
}
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-success { background: var(--success-soft); color: var(--success); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px 7px 7px 2px;
  background: var(--accent);
}

[x-cloak] { display: none !important; }

/* Mascot (<ai-mascot>, assets/mascot.js). Fixed brand colours so it looks the same in both themes. */
ai-mascot { display: inline-block; width: 120px; aspect-ratio: 120 / 130; line-height: 0; flex: none; }
ai-mascot svg { width: 100%; height: 100%; overflow: visible; }
.m-shadow { fill: #000; opacity: .12; }
.m-body { fill: #4f74f0; }
.m-foot, .m-hand { fill: #3a5bd6; }
.m-arm { fill: none; stroke: #3a5bd6; stroke-width: 9; stroke-linecap: round; }
.m-face { fill: #f4f7ff; }
.m-eyes ellipse, .m-dots circle { fill: #15171a; }
.m-glint { fill: #fff; }
.m-happy-eye, .m-mouth { fill: none; stroke: #15171a; stroke-width: 2.6; stroke-linecap: round; }
.m-mouth-open { fill: #15171a; stroke: #15171a; stroke-width: 1.5; stroke-linejoin: round; }
.m-cheek { fill: #ff9db3; opacity: .85; }
.m-collar { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.m-tie { fill: #ff7a59; }
.m-badge { fill: #fff; }
.m-badge-text { font: 700 6.5px/1 var(--font); fill: #3a5bd6; }
.m-stalk { stroke: #3a5bd6; stroke-width: 3; stroke-linecap: round; }
.m-bubble { fill: #fff; stroke: #3a5bd6; stroke-width: 2; stroke-linejoin: round; }
.m-prop { fill: #fff; stroke: #2b3650; stroke-width: 2; }
.m-prop-line { fill: #b9c6e8; }
.m-laptop { fill: #c9d2e6; stroke: #2b3650; stroke-width: 2; stroke-linejoin: round; }
.m-laptop-key { fill: #2b3650; opacity: .35; }
.m-sign { fill: #fff; stroke: #2b3650; stroke-width: 2; }
.m-sign-text { font: 800 10px/1 var(--font); fill: #15171a; }
.m-confetti .c1 { fill: #ff7a59; }
.m-confetti .c2 { fill: #ffc94a; }
.m-confetti .c3 { fill: #3ec28f; }
.m-look-down { transform: translateY(2.5px); }
.m-look-up { transform: translate(2px, -2px); }

@media (prefers-reduced-motion: no-preference) {
  .m-bob { animation: m-bob 3.2s ease-in-out infinite; }
  .m-eyes ellipse { transform-box: fill-box; transform-origin: center; animation: m-blink 5s infinite; }
  .m-wave { transform-origin: 91px 80px; animation: m-wave 1.6s ease-in-out infinite; }
  .m-dots circle { animation: m-dot 1.4s ease-in-out infinite; }
  .m-dots circle:nth-child(2) { animation-delay: .2s; }
  .m-dots circle:nth-child(3) { animation-delay: .4s; }
  .m-type-l { animation: m-key .5s ease-in-out infinite; }
  .m-type-r { animation: m-key .5s ease-in-out .25s infinite; }
  .m-confetti > * { transform-box: fill-box; transform-origin: center; animation: m-confetti 1.8s ease-in-out infinite; }
  .m-confetti > :nth-child(2n) { animation-delay: .5s; }
  .m-confetti > :nth-child(3n) { animation-delay: .9s; }
}
@keyframes m-bob { 50% { transform: translateY(-3px); } }
@keyframes m-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes m-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); } }
@keyframes m-dot { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes m-key { 50% { transform: translateY(2px); } }
@keyframes m-confetti { 0%, 100% { transform: translateY(0) rotate(0); opacity: 1; } 50% { transform: translateY(6px) rotate(40deg); opacity: .6; } }
