/* ── Shared utilities — loaded after style.css, before feature sheets ── */

/* ── Custom properties ─────────────────────────────────── */
:root {
  --t-ui: background .2s, border-color .2s, color .2s;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Spinner ────────────────────────────────────────────── */
.rune-spinner {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border-mid);
  border-top-color: var(--amber-dim);
  border-radius: 50%;
  animation: spin 1.6s linear infinite;
}

/* ── Back link ──────────────────────────────────────────── */
.back-link {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  margin-bottom: 1.2rem;
  transition: color .2s;
}
.back-link:hover { color: var(--amber-light); }

/* ── Accent gradient line ───────────────────────────────── */
/* Add as a class to any element that needs the amber gradient divider */
.accent-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--amber-dim) 20%,
    var(--amber) 50%, var(--amber-dim) 80%, transparent 100%);
}

/* ── Grid helpers ───────────────────────────────────────── */
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }
.grid-auto-md { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1rem; }
.grid-auto-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; }

/* ── Rich text block ────────────────────────────────────── */
/* Add .rich-text to any element that renders markdown / HTML content */
.rich-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--parchment);
  line-height: 1.7;
}
.rich-text h1,
.rich-text h2,
.rich-text h3 {
  font-family: var(--font-heading);
  color: var(--amber-light);
  margin: 1rem 0 .5rem;
  line-height: 1.3;
}
.rich-text p { margin-bottom: .75rem; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text ul,
.rich-text ol { padding-left: 1.5rem; margin-bottom: .75rem; }
.rich-text blockquote {
  border-left: 3px solid var(--amber-dim);
  padding-left: 1rem;
  color: var(--parchment-mid);
  font-style: italic;
  margin: .75rem 0;
}
.rich-text img { max-width: 100%; border: 1px solid var(--border-dim); }
.rich-text code {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  padding: .1em .35em;
  font-size: .9em;
}

/* ── Utility classes ────────────────────────────────────── */
.hidden       { display: none; }
.full-width   { width: 100%; }
.text-amber   { color: var(--amber); }
.text-amber-dim { color: var(--amber-dim); }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .75rem; }
