/* ============================================================
   LLOS — Common Stylesheet
   Single source of truth for tokens, reset, layout, shell,
   and shared components.

   Drop-in components (tutor, no-copy, moderation) keep their
   own files and are loaded only where needed.
   ============================================================ */


/* ── 1. Design Tokens ──────────────────────────────────────── */

:root {
  /* Core palette — light */
  --bg:             #f8fafc;
  --surface:        #ffffff;
  --surface-strong: #f1f5f9;
  --text:           #0f172a;
  --muted:          #64748b;
  --accent:         #ea580c;
  --accent-strong:  #c2410c;
  --accent-soft:    #fff7ed;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;
  --green:          #16a34a;
  --pink:           #e11d48;

  /* Shell aliases (same palette) */
  --shell-bg:         rgba(255, 255, 255, 0.94);
  --shell-panel:      #ffffff;
  --shell-text:       #0f172a;
  --shell-muted:      #475569;
  --shell-border:     #dbe4f0;
  --shell-accent:     #ea580c;
  --shell-accent-soft:#fff7ed;
}


/* ── 2. Reset ──────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
}


/* ── 3. Layout ─────────────────────────────────────────────── */

.llos-container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(14px, 4vw, 18px);
  padding-right: clamp(14px, 4vw, 18px);
}

.llos-section {
  padding: 3rem clamp(1.5rem, 4vw, 4rem);
}

.llos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}


/* ── 4. Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-link {
  background: none;
  padding: 0;
  color: var(--accent);
  align-self: flex-start;
}

.btn-dark {
  background: var(--shell-text);
  color: #fff;
  border-color: var(--shell-text);
}

.btn-dark:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}


/* ── 5. Chips ──────────────────────────────────────────────── */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}


/* ── 6. Cards ──────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
}

.card h3 {
  margin: 0 0 0.35rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.panel-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}


/* ── 7. Hero Section ───────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem clamp(1.5rem, 4vw, 4rem);
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 60%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
}

.hero__content h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin: 0 0 0.5rem;
  line-height: 1.1;
}

.hero__content p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__panel {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}


/* ── 8. Search / Connector ─────────────────────────────────── */

.connector {
  display: grid;
  gap: 1rem;
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  border-bottom: 1px solid var(--border);
}

.connector__search label {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  display: block;
  color: var(--muted);
}

.connector__search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.connector__search-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.75rem 1rem;
  font: inherit;
}

.connector__search-input input:focus {
  outline: none;
}

.connector__search-input button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  padding: 0 0.75rem;
  cursor: pointer;
}

.connector__filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.8rem;
}

.connector__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.connector__filters select {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.5rem 1rem;
  color: var(--text);
  font: inherit;
}


/* ── 9. Age / Artifact Grid ────────────────────────────────── */

.age-gravity .age-grid {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}

.age-grid div {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
}

.section-heading h2 {
  margin-bottom: 0.4rem;
}

.section-heading p {
  margin-top: 0;
  color: var(--muted);
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.artifact-card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.artifact-card h3 { margin: 0; }
.artifact-card p  { margin: 0; color: var(--muted); }

.artifact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.artifact-tag {
  font-size: 0.75rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  color: var(--muted);
}

.games__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.games__list article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  min-height: 150px;
}

.games__cta {
  margin-top: 2rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
}


/* ── 10. Shell — Header ────────────────────────────────────── */

body > .llos-shell-header:first-child {
  position: sticky;
  top: 0;
  z-index: 1200;
}

.llos-shell-header {
  background: var(--shell-bg);
  color: var(--shell-text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.llos-shell-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 13px 18px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.llos-shell-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.llos-shell-brand {
  color: var(--shell-text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
  font-family: "Playfair Display", Georgia, serif;
}

.llos-shell-brand::before {
  content: "L";
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  vertical-align: middle;
}

.llos-shell-brand:hover {
  color: var(--shell-text);
  text-decoration: none;
}

.llos-shell-brand-tag {
  display: none;
}

.llos-shell-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 560px;
}

.llos-shell-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 10px;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.llos-shell-nav a:hover,
.llos-shell-nav a[aria-current="page"] {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  box-shadow: inset 0 0 0 1px #fed7aa;
  text-decoration: none;
}


/* ── 11. Shell — Context Row ───────────────────────────────── */

.llos-shell-context-row {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.82);
}

.llos-shell-context-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 9px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.llos-shell-context-label {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.llos-shell-context-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.llos-shell-context-career {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 720px;
  flex-wrap: wrap;
  margin-left: auto;
}

.llos-shell-context-nav a,
.llos-shell-context-nav button {
  text-decoration: none;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.llos-shell-context-nav a:hover,
.llos-shell-context-nav button:hover {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  border-color: #fdba74;
  text-decoration: none;
}

.llos-shell-context-nav .llos-shell-context-cta,
.llos-shell-context-nav button.llos-shell-context-cta {
  color: #fff;
  background: #0f172a;
  border-color: #0f172a;
}

.llos-shell-context-nav .llos-shell-context-cta:hover,
.llos-shell-context-nav button.llos-shell-context-cta:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.llos-shell-context-nav button.llos-shell-context-lang {
  min-width: 42px;
}

.llos-shell-context-nav button.llos-shell-context-lang.active,
.llos-shell-context-toggle.active {
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  border-color: #fdba74;
}

.llos-shell-context-toggle {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.llos-shell-hero-tools {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.llos-shell-hero-search {
  position: relative;
  width: min(680px, 100%);
}

.llos-shell-hero-search .search-results {
  text-align: left;
}


/* ── 12. Shell — Breadcrumbs & Section Nav ─────────────────── */

.llos-shell-breadcrumbs,
nav[aria-label="Breadcrumb"],
.breadcrumbs {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 18px 0;
  color: var(--shell-muted);
  font-size: 0.92rem;
}

.llos-shell-breadcrumbs {
  position: relative;
}

.llos-shell-breadcrumbs::before {
  content: "Page Path";
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.llos-shell-breadcrumbs ol {
  margin: 0;
  padding: 14px 16px 12px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.llos-shell-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.llos-shell-breadcrumbs li + li::before {
  content: "/";
  color: #94a3b8;
}

.llos-shell-breadcrumbs a,
nav[aria-label="Breadcrumb"] a,
.breadcrumbs a {
  color: var(--shell-accent);
  text-decoration: none;
  font-weight: 600;
}

.llos-shell-breadcrumbs a:hover,
nav[aria-label="Breadcrumb"] a:hover,
.breadcrumbs a:hover {
  text-decoration: underline;
}

.llos-shell-breadcrumbs span[aria-current="page"] {
  color: var(--shell-text);
  font-weight: 700;
}

.llos-shell-section-nav {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 18px;
}

.llos-shell-section-nav-inner {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 0 0 16px 16px;
  padding: 14px 16px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.035);
}

.llos-shell-section-nav-label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.llos-shell-section-nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.llos-shell-section-nav-links a {
  text-decoration: none;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 700;
}

.llos-shell-section-nav-links a:hover {
  text-decoration: none;
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
  border-color: #fdba74;
}

.llos-shell-breadcrumbs + .llos-shell-section-nav {
  margin-top: 0;
}

.llos-shell-breadcrumbs + .llos-shell-section-nav .llos-shell-section-nav-inner {
  border-top: 1px dashed #dbe4f0;
}


/* ── 13. Shell — Footer ────────────────────────────────────── */

.llos-shell-footer,
.site-footer {
  background: #fff;
  color: #64748b;
  margin-top: 56px;
}

.llos-shell-footer {
  border-top: 1px solid #e2e8f0;
}

.llos-shell-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 18px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}

.llos-shell-footer a,
.site-footer a {
  color: #64748b;
}

.llos-shell-footer-brand {
  display: grid;
  gap: 16px;
  min-width: 280px;
  max-width: 430px;
}

.llos-shell-footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: fit-content;
}

.llos-shell-footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.llos-shell-footer-wordmark {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.llos-shell-footer-wordmark span {
  color: #2563eb;
}

.llos-shell-footer-copy {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.7;
}

.llos-shell-footer-copy strong {
  color: #475569;
}

.llos-shell-footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.llos-shell-footer-socials a,
.llos-shell-footer-socials span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
}

.llos-shell-footer-grid {
  flex: 1 1 520px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
}

.llos-shell-footer-group {
  display: grid;
  gap: 12px;
  align-content: start;
}

.llos-shell-footer-heading {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.llos-shell-footer-group a {
  text-decoration: none;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.45;
}

.llos-shell-footer-group a:hover,
.llos-shell-footer-socials a:hover,
.llos-shell-footer-legal a:hover,
.llos-shell-footer-brand-row:hover {
  color: #2563eb;
  text-decoration: none;
}

.llos-shell-footer-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  margin-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.llos-shell-footer-legal {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.llos-shell-footer-legal a {
  text-decoration: none;
  color: #94a3b8;
}

.llos-shell-footer-section,
.llos-shell-footer-year {
  color: #94a3b8;
  font-size: 0.92rem;
}

.llos-shell-footer-heart {
  color: #ef4444;
}

.site-header {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.site-footer {
  border-top: 1px solid var(--border);
}

/* ── 14. Page Footer ───────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}


/* ── 15. Responsive ────────────────────────────────────────── */

@media (max-width: 720px) {
  .llos-shell-inner,
  .llos-shell-footer-inner,
  .llos-shell-breadcrumbs,
  .llos-shell-section-nav,
  nav[aria-label="Breadcrumb"],
  .breadcrumbs {
    padding-left: 14px;
    padding-right: 14px;
  }

  .llos-shell-nav {
    justify-content: flex-start;
    flex: 1 1 100%;
  }

  .llos-shell-nav a {
    font-size: 0.84rem;
    padding: 6px 10px;
  }

  .llos-shell-brand-wrap {
    width: 100%;
  }

  .llos-shell-context-inner {
    padding-left: 14px;
    padding-right: 14px;
    align-items: flex-start;
  }

  .llos-shell-context-career {
    margin-left: 0;
    justify-content: flex-start;
  }

  .llos-shell-section-nav-inner {
    align-items: flex-start;
  }

  .llos-shell-footer-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .llos-shell-footer-inner {
    padding-top: 28px;
  }

  .llos-shell-footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .llos-shell-footer-legal {
    gap: 16px;
  }

  .llos-shell-breadcrumbs::before {
    margin-bottom: 8px;
  }

  .llos-shell-breadcrumbs ol {
    padding: 12px 14px 10px;
  }

  .llos-shell-section-nav-inner {
    padding: 12px 14px 14px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 2rem 1rem;
  }

  .connector,
  .llos-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero__actions {
    flex-direction: column;
  }
}
