/* Global base styles. OWNER: coordinator. */
@import url("./tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg); }
.num { font-variant-numeric: tabular-nums; }

.container { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--raised); color: var(--text);
  font-weight: 600; font-size: var(--step-0);
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s;
}
.btn:hover { border-color: var(--text-3); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffc065; border-color: #ffc065; color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--raised); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Status pill: <span class="status status-ongoing">Ongoing</span> */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 600; text-transform: capitalize; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ongoing { color: var(--ongoing); }
.status-completed { color: var(--completed); }
.status-hiatus { color: var(--hiatus); }
.status-dropped { color: var(--dropped); }

/* Section heading row */
.section { padding-block: 40px 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: var(--step-3); }
.section-head a { color: var(--text-2); font-weight: 600; font-size: var(--step--1); }

/* Shared states */
.skeleton { background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state, .error-state { padding: 48px 20px; text-align: center; color: var(--text-2); }
.empty-state h3, .error-state h3 { color: var(--text); font-size: var(--step-2); margin-bottom: 8px; }
.error-state .btn { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
