/* wow.jhsal.se shared styles: theme tokens, page frame, and the site header with its tabs.
   Each tab is its own folder (/consumables/ ...) and keeps its page-specific styles inline. */
:root {
  --bg: #f4f3f7;
  --surface: #ffffff;
  --ink: #1c1a24;
  --muted: #5d5869;
  --line: #dad7e2;
  --holy: #855c00;
  --holy-soft: #f5ebcf;
  --ret: #b0243c;
  --ret-soft: #f6dde2;
  --both: #3a5a75;
  --both-soft: #e1e9f0;
  --class: #f58cba;
  --focus: #7a4fd0;
  --f-display: "Marcellus SC", "Trajan Pro", Georgia, serif;
  --f-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121a;
    --surface: #1d1a26;
    --ink: #ebe8f2;
    --muted: #a39eb3;
    --line: #332f3e;
    --holy: #e6b748;
    --holy-soft: #33290f;
    --ret: #f07a8e;
    --ret-soft: #3a1820;
    --both: #8fb5d4;
    --both-soft: #1b2833;
    --focus: #b79cf0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14121a;
  --surface: #1d1a26;
  --ink: #ebe8f2;
  --muted: #a39eb3;
  --line: #332f3e;
  --holy: #e6b748;
  --holy-soft: #33290f;
  --ret: #f07a8e;
  --ret-soft: #3a1820;
  --both: #8fb5d4;
  --both-soft: #1b2833;
  --focus: #b79cf0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--holy); text-underline-offset: 3px; }
a:hover { color: var(--holy); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.gutter {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Site header and tabs */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0 36px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 16px;
}
.brand:hover { color: var(--ink); }
.mark { width: 9px; height: 9px; background: var(--class); transform: rotate(45deg); flex: none; display: inline-block; }
.tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  display: flex;
  align-items: center;
  padding: 15px 14px 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--holy); }
@media (max-width: 560px) {
  .site-head-inner { gap: 0; }
  .brand { padding-block: 14px 4px; flex-basis: 100%; }
  .tabs { margin-left: -14px; }
}

/* Page frame and shared type */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-block: 40px 72px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.05;
  margin: 14px 0 0;
  text-wrap: balance;
  letter-spacing: .01em;
}
h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
h3 { margin: 0; text-wrap: balance; }
.lead { max-width: 64ch; color: var(--muted); margin: 16px 0 0; font-size: 1.06rem; }
.stamp { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.section-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.section-head p { margin: 0; color: var(--muted); max-width: 66ch; }

.tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.tag-ret { background: var(--ret-soft); color: var(--ret); }
.tag-holy { background: var(--holy-soft); color: var(--holy); }
.tag-both { background: var(--both-soft); color: var(--both); }

.site-foot { color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 18px; }
.site-foot p { margin: 0; }
