/* WOTAN x IDUNA style guide.
   Source of truth: the IDUNA front page (IDUNA/index.html + styles.css) -- warm cream paper, thin
   gold-edged panels, Cormorant Garamond display type over Spectral body text, wide-tracked
   uppercase labels, restrained gold accents. Founder real-time 2026-10-16: "look at the front page
   as the WOTAN style guide". New WOTAN pages link this file (with wotan-hs.css, which owns the .wn-*
   topbar) and use the .i-* components below instead of inventing a palette. Light only, like IDUNA.

   The "esports" half of the brief is carried by structure, not colour: scoreboard-style stat tiles
   with big tabular numerals, cut-corner card tops, tracked small-caps labels, clear owned / locked /
   equipped states. */

:root {
  --i-bg: #f4f1ea;
  --i-bg-soft: #ede7dc;
  --i-panel: #ebe4d8;
  --i-paper: #f8f3ea;
  --i-line: #d2c7b8;
  --i-gold: #c6a75e;
  --i-gold-soft: #bfa062;
  --i-gold-deep: #8d7340;
  --i-gold-hi: #d6bc7a;
  --i-text: #3a352e;
  --i-muted: #7a7368;
  --i-faint: #a8a093;
  --i-ok: #4f7a4a;
  --i-bad: #a8452f;
  --i-ink-dark: #1d1a26;           /* the dark console colour used for terminals/art wells */
  --i-display: "Cormorant Garamond", Georgia, serif;
  --i-body: "Spectral", Georgia, serif;
}

body.iduna {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, color-mix(in srgb, var(--i-bg) 84%, #fff 16%), var(--i-bg-soft));
  color: var(--i-text);
  font-family: var(--i-body);
  line-height: 1.5;
}
body.iduna * { box-sizing: border-box; }

.i-wrap { max-width: 1080px; margin: 0 auto; padding: 1.2rem 1rem 4.5rem; }

/* ---- type ---- */
.i-label { letter-spacing: .35em; text-transform: uppercase; font-size: .68rem; color: var(--i-muted); margin: 0; }
.i-h1 { font-family: var(--i-display); font-weight: 500; font-size: clamp(2.3rem, 5.4vw, 3.6rem); line-height: 1.05; letter-spacing: .02em; margin: .55rem 0 0; }
.i-h2 { font-family: var(--i-display); font-weight: 600; font-size: 1.6rem; letter-spacing: .02em; margin: 0; }
.i-sub { color: var(--i-muted); margin: .6rem 0 0; max-width: 56ch; }
.i-link { color: var(--i-gold-deep); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--i-gold) 65%, transparent 35%); transition: color 160ms ease, border-color 160ms ease; }
.i-link:hover { color: var(--i-text); border-color: var(--i-gold); }

/* ---- structure ---- */
.i-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.4rem 2.5rem;
  padding: 1.8rem 0 1.5rem; margin-bottom: 1.6rem; border-bottom: 1px solid color-mix(in srgb, var(--i-gold) 55%, var(--i-line) 45%); position: relative; }
.i-hero::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 5.5rem; height: 3px; background: var(--i-gold); }
.i-hero > div:first-child { flex: 1 1 22rem; }

.i-panel { border: 1px solid color-mix(in srgb, var(--i-gold) 60%, var(--i-line) 40%); border-radius: 6px;
  background: color-mix(in srgb, var(--i-panel) 92%, white 8%); padding: 1.2rem 1.3rem; }
.i-panel + .i-panel, .i-section + .i-section { margin-top: 1.4rem; }
.i-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2rem 0 .9rem; flex-wrap: wrap; }
.i-section-head .i-label { margin-bottom: .15rem; }

/* ---- buttons (the front page's CTA) ---- */
.i-btn { white-space: nowrap; appearance: none; font: 500 .98rem/1 var(--i-body); letter-spacing: .02em; color: var(--i-text); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.6rem; padding: 0 1.15rem; border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--i-gold) 80%, #7b6640 20%); background: color-mix(in srgb, var(--i-paper) 88%, #e5dac7 12%);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 120ms ease; }
.i-btn:hover:not(:disabled) { border-color: #c7ac72; background: color-mix(in srgb, var(--i-paper) 70%, #e5dac7 30%); }
.i-btn:active:not(:disabled) { transform: translateY(1px); }
.i-btn:focus-visible { outline: 2px solid var(--i-gold-deep); outline-offset: 2px; }
.i-btn:disabled { opacity: .55; cursor: default; }
.i-btn.primary { background: var(--i-gold); border-color: var(--i-gold-soft); color: #2a2418; font-weight: 600; }
.i-btn.primary:hover:not(:disabled) { background: var(--i-gold-hi); }
.i-btn.quiet { border-color: var(--i-line); background: transparent; }
.i-btn.block { width: 100%; }

/* ---- scoreboard stat tiles ---- */
.i-stats { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.i-stat { min-width: 8.2rem; padding: .7rem 1rem .75rem; border: 1px solid color-mix(in srgb, var(--i-gold) 50%, var(--i-line) 50%); border-radius: 6px; background: var(--i-paper); position: relative; }
.i-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 6px 0 0 6px; background: var(--i-gold); }
.i-stat b { display: block; font: 600 2.2rem/1 var(--i-display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.i-stat span { display: block; margin-top: .25rem; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--i-muted); }

/* ---- badges / chips ---- */
.i-badge { display: inline-block; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; padding: .22rem .55rem; border-radius: 3px;
  border: 1px solid var(--i-gold); color: var(--i-gold-deep); background: color-mix(in srgb, var(--i-gold) 12%, transparent); }
.i-badge.ok { border-color: var(--i-ok); color: var(--i-ok); background: color-mix(in srgb, var(--i-ok) 10%, transparent); }
.i-badge.dim { border-color: var(--i-line); color: var(--i-muted); background: transparent; }

/* ---- hat / item cards ---- */
.i-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.i-card { display: flex; flex-direction: column; border: 1px solid color-mix(in srgb, var(--i-gold) 55%, var(--i-line) 45%); border-radius: 6px; overflow: hidden;
  background: var(--i-paper); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.i-card:hover { border-color: var(--i-gold); box-shadow: 0 10px 26px rgba(80, 62, 24, .13); transform: translateY(-2px); }
.i-card.owned { background: color-mix(in srgb, var(--i-paper) 88%, var(--i-gold) 12%); }
.i-card.equipped { border-color: var(--i-gold-deep); box-shadow: 0 0 0 1px var(--i-gold-deep) inset; }
.i-art { height: 112px; position: relative; display: grid; place-items: center; color: var(--i-gold-hi);
  background: radial-gradient(circle at 50% 120%, rgba(214, 188, 122, .35), transparent 60%), var(--i-ink-dark);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 86% 100%, 0 100%); }
.i-art::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 14px, rgba(214, 188, 122, .06) 14px 15px); }
.i-art i { font: 600 3.4rem/1 var(--i-display); font-style: normal; position: relative; z-index: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.i-art .i-badge { position: absolute; z-index: 2; top: .6rem; left: .6rem; background: rgba(29, 26, 38, .7); }
.i-card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.i-card-name { font: 600 1.35rem/1.15 var(--i-display); margin: 0; }
.i-card-desc { color: var(--i-muted); font-size: .88rem; margin: 0; flex: 1; }
.i-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .6rem; margin-top: .6rem; }
.i-cost { font: 600 1.25rem/1 var(--i-display); font-variant-numeric: tabular-nums; color: var(--i-gold-deep); white-space: nowrap; }
.i-cost small { font: 500 .6rem var(--i-body); letter-spacing: .22em; text-transform: uppercase; color: var(--i-muted); margin-left: .25rem; }

/* ---- character plate ---- */
.i-plate { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; }
.i-avatar { width: 4.2rem; height: 4.2rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 2rem/1 var(--i-display); color: var(--i-gold-hi); background: var(--i-ink-dark); border: 2px solid var(--i-gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--i-gold) 20%, transparent); }
.i-plate-main { flex: 1 1 14rem; }
.i-plate-name { font: 600 1.9rem/1.1 var(--i-display); margin: .1rem 0 0; }
.i-plate-meta { color: var(--i-muted); font-size: .9rem; margin: .2rem 0 0; }

/* ---- states ---- */
.i-msg { min-height: 1.3rem; font-size: .9rem; margin: .7rem 0 0; color: var(--i-muted); }
.i-msg.ok { color: var(--i-ok); } .i-msg.error { color: var(--i-bad); }
.i-skel { height: 220px; border-radius: 6px; border: 1px solid var(--i-line); background: linear-gradient(100deg, var(--i-panel) 30%, var(--i-paper) 50%, var(--i-panel) 70%); background-size: 200% 100%; animation: i-shimmer 1.3s infinite linear; }
@keyframes i-shimmer { to { background-position: -200% 0; } }
.i-empty { text-align: center; padding: 2rem 1rem; color: var(--i-muted); }
.i-empty .i-h2 { color: var(--i-text); margin-bottom: .4rem; }

.i-toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 140%); z-index: 60; max-width: min(92vw, 28rem);
  padding: .75rem 1.1rem; border-radius: 6px; background: var(--i-ink-dark); color: #f4f1ea; border: 1px solid var(--i-gold);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3); transition: transform 220ms ease; font-size: .95rem; }
.i-toast:not(.show) { visibility: hidden; }
.i-toast.show { transform: translate(-50%, 0); }
.i-toast.error { border-color: #e0795f; }

@media (prefers-reduced-motion: reduce) {
  .i-card, .i-btn, .i-toast { transition: none; } .i-skel { animation: none; } .i-card:hover { transform: none; }
}
@media (max-width: 560px) {
  .i-wrap { padding: .6rem .75rem 4rem; }
  .i-stat { flex: 1 1 8rem; }
  .i-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .i-art { height: 88px; } .i-art i { font-size: 2.6rem; }
  .i-card-body { padding: .7rem .75rem .85rem; } .i-card-name { font-size: 1.15rem; }
}
@media (max-width: 380px) { .i-grid { grid-template-columns: 1fr; } }
