/* ===== Limitless Template (scoped to .lt-main) ===== */

/* Base tokens (scoped) */
:root {
  --lt-bg: #ffffff;
  --lt-text: #1f2937;
  --lt-muted: #6b7280;
  --lt-accent: #ff9900; /* matches brand orange tone */
  --lt-surface: #f8fafc;
  --lt-border: #e5e7eb;
  --lt-shadow: 0 10px 20px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.08);
}

html.dark-mode .lt-main {
  --lt-bg: #0b1220;
  --lt-text: #e5e7eb;
  --lt-muted: #9ca3af;
  --lt-surface: #0f172a;
  --lt-border: #1f2937;
}

/* Layout shell */
.lt-main {
  background: transparent;
  color: var(--lt-text);
  padding: clamp(16px, 3vw, 28px);
}

.lt-breadcrumbs {
  font-size: .9rem;
  color: var(--lt-muted);
  margin: 0 0 12px 0;
}
.lt-breadcrumbs ol { list-style: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.lt-breadcrumbs li::after { content: "›"; margin: 0 8px; color: var(--lt-muted); }
.lt-breadcrumbs li:last-child::after { content: ""; }
.lt-breadcrumbs a { color: inherit; text-decoration: none; }

/* Grid: sidebar + content */
.lt-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
}

@media (max-width: 960px) {
  .lt-grid { grid-template-columns: 1fr; }
}

/* Sidebar */
.lt-sidebar {
  background: linear-gradient(to bottom, hsl(30 100% 38%), orange);
  color: #111;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--lt-shadow);
  position: sticky;
  top: 12px;
}
html.dark-mode .lt-sidebar { color: #111; } /* keep orange bright in dark mode */

.lt-sidebar h2 { font-size: 1.2rem; margin-bottom: 10px; color: #111; }
.lt-sidebar-section { margin-top: 18px; }
.lt-list, .lt-tag-list { list-style: none; padding: 0; margin: 8px 0 0 0; }
.lt-list li + li, .lt-tag-list li + li { margin-top: 6px; }
.lt-list a, .lt-tag-list a { color: #111; text-decoration: none; font-weight: 600; }

.lt-chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px 0; }
.lt-chip {
  border: 1px solid rgba(0,0,0,.2);
  background: rgba(255,255,255,.6);
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
  font-weight: 600;
}
.lt-chip:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

/* Content */
.lt-content { display: grid; gap: clamp(16px, 2vw, 24px); }

.lt-page-header { display: grid; gap: 10px; }
.lt-page-header h1 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.lt-subtitle { color: var(--lt-muted); }
.lt-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cards */
.lt-card {
  background: var(--lt-surface);
  border: 1px solid var(--lt-border);
  border-radius: 14px;
  padding: clamp(14px, 2vw, 18px);
  box-shadow: var(--lt-shadow);
}

.lt-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 20px);
}
@media (max-width: 1000px) {
  .lt-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .lt-card-grid { grid-template-columns: 1fr; }
}

.lt-link { color: var(--lt-accent); text-decoration: none; font-weight: 700; }
.lt-link:hover { text-decoration: underline; }

/* Stats */
.lt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lt-stat { text-align: center; }
.lt-stat-value { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; }
.lt-stat-label { color: var(--lt-muted); }

/* Split section */
.lt-split {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: start;
}
@media (max-width: 960px) { .lt-split { grid-template-columns: 1fr; } }
.lt-media { display: grid; gap: 8px; }
.lt-media-placeholder {
  display: grid; place-items: center; height: 180px;
  background: repeating-linear-gradient(45deg, #e5e7eb 0 12px, #f3f4f6 12px 24px);
  color: #111; border-radius: 12px; border: 1px dashed rgba(0,0,0,.25);
}
html.dark-mode .lt-media-placeholder {
  background: repeating-linear-gradient(45deg, #1f2937 0 12px, #111827 12px 24px);
  color: #ddd; border-color: #374151;
}
.lt-caption { color: var(--lt-muted); font-size: .9rem; }

/* Accordion */
.lt-accordion details {
  border: 1px solid var(--lt-border);
  background: var(--lt-surface);
  border-radius: 12px;
  padding: 10px 12px;
}
.lt-accordion details + details { margin-top: 10px; }
.lt-accordion summary { cursor: pointer; font-weight: 700; }
.lt-accordion p { margin: 8px 2px 2px; color: var(--lt-text); }

/* Table */
.lt-table-wrap { overflow: auto; }
.lt-table { width: 100%; border-collapse: collapse; }
.lt-table th, .lt-table td { border: 1px solid var(--lt-border); padding: 10px 12px; }
.lt-table th { background: rgba(0,0,0,.04); text-align: left; }
html.dark-mode .lt-table th { background: rgba(255,255,255,.04); }

/* Buttons */
.lt-btn {
  appearance: none; border: 1px solid var(--lt-accent); background: var(--lt-accent);
  color: #111; padding: 10px 14px; border-radius: 10px; font-weight: 800; cursor: pointer;
}
.lt-btn:hover { filter: brightness(1.05); }
.lt-btn:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

.lt-btn-outline {
  background: transparent; color: var(--lt-accent);
  border: 2px solid var(--lt-accent);
}

/* CTA */
.lt-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lt-cta-content h2 { margin: 0 0 4px; }
.lt-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Utility */
.lt-bullets { padding-left: 18px; }
.lt-bullets li { margin-bottom: 6px; }

/* === Legacy background image support === */
.lt-main { position: relative; isolation: isolate; }
.lt-main > * { position: relative; z-index: 1; }
.lt-main.has-legacy-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--lt-legacy-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .18;
}
html.dark-mode .lt-main.has-legacy-bg::before { opacity: .24; }


/* Sidebar removed: full-width content */
.lt-grid.no-sidebar { grid-template-columns: 1fr; }
