/* Shared theme, layout primitives and controls for every page. */

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 9999;
  padding: 8px 14px;
  background: var(--focus-ring);
  color: #0b1120;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.skip-link:focus { top: 0; }

/* ===== Screen-reader only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Base / Theme ===== */
:root {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --accent: #7dd3fc;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --border-color: #475569;
  --focus-ring: #facc15;
  --danger: #ef4444;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100svh;
  padding: clamp(12px, 3vw, 20px);
}

.container { max-width: 960px; margin: 0 auto; }

/* ===== Header ===== */
header {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: #fff; margin-bottom: 6px; }

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.button,
.page-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.button:hover,
.page-nav a:hover,
.page-nav a[aria-current="page"] {
  background-color: var(--accent);
  color: #0b1120;
  border-color: var(--accent);
}

.button.secondary { font-weight: 600; }

.button.danger:hover {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.empty-state {
  padding: 16px 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Accessibility / Focus ===== */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

