/* web-kit design layer - tokens, a minimal reset, and shared keyframes.
 *
 * SPDX-FileCopyrightText: 2026 Dr Sohil Momin
 * SPDX-License-Identifier: MIT
 *
 * This is the part of a house style that should never be re-derived per app. It is
 * additive and opt-in: link it, or copy the parts you want. Nothing here changes a
 * layout you already have unless you ask it to.
 */

/* ---- tokens: one set of names, shared by the store, the hub and every app ---- */
:root {
  --bg0:#fbf7f0; --bg1:#f4ede1; --surface:#ffffff; --line:#e3d9c8;
  --ink:#241c14; --ink-soft:#5a4c3c; --faint:#8a7a66;
  --accent:#7a2e2e; --accent-soft:#a4514f; --gold:#b8862b;
  --ok:#2e7d32; --warn:#b8862b; --bad:#a4262c;
  --radius:10px; --radius-sm:6px;
  --step-0:.95rem; --step-1:1.1rem; --step-2:1.35rem; --step-3:1.7rem; --step-4:2.2rem;
  --lh:1.55; --space:12px;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;
}
[data-theme="dark"] {
  --bg0:#141110; --bg1:#1d1917; --surface:#241f1c; --line:#3a322d;
  --ink:#f4ede1; --ink-soft:#cfc3b2; --faint:#9c8d7c;
  --accent:#e0a3a1; --accent-soft:#c47f7d; --gold:#e0c07a;
}

/* ---- reset: only what should never be re-decided ---- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
body { background: var(--bg0); color: var(--ink); font-family: var(--sans);
       font-size: var(--step-0); line-height: var(--lh); }
h1 { font-size: var(--step-4); line-height: 1.15; }
h2 { font-size: var(--step-3); line-height: 1.2; }
h3 { font-size: var(--step-2); }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
table { border-collapse: collapse; }
.mut { color: var(--faint); }

/* ---- keyframes: the console animates bespoke today; this makes it consistent ---- */
@keyframes fade  { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise  { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
@keyframes shimmer { from { background-position: -200% 0 } to { background-position: 200% 0 } }
.anim-fade  { animation: fade .3s ease both; }
.anim-rise  { animation: rise .35s ease both; }
.anim-pulse { animation: pulse 1.6s ease-in-out infinite; }
.skeleton   { background: linear-gradient(90deg, var(--bg1) 25%, var(--surface) 37%, var(--bg1) 63%);
              background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* ---- motion, respected. Not an afterthought: a page that ignores this is a page
   that makes some people ill. ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
