/* ─────────────────────────────────────────────────────────────────────
 * index.css — landing-page-specific styles (cards grid)
 * ───────────────────────────────────────────────────────────────────── */

/* Shown only on archived version pages (see the _currentArchivedVersion
   check in index.html) — a clear visual break from the live site so an
   old stable snapshot never gets mistaken for "latest". */
.archive-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent-3);
  border-bottom: 3px solid var(--accent);
  text-align: center;
}
.archive-banner a { color: #fff; text-decoration: underline; }

main.landing {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.intro {
  text-align: center;
  margin-bottom: 36px;
}
.intro h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.intro p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1rem;
}

.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 26px 0 12px;
  font-weight: 600;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  box-shadow: var(--shadow);
}
.tool-card:hover {
  background: #fff8e8;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-card .head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-card .icon {
  width: 36px; height: 36px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tool-card .name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.tool-card .desc {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
}

.tool-card .tag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.3px;
}
.tag.app    { border-color: #b35c0055; color: var(--accent); }
.tag.future { border-color: #c9b48f; color: var(--muted); font-style: italic; }
.tag.experimental-tag { border-color: #7b1fa255; color: #7b1fa2; font-style: italic; }

.tool-card.experimental { opacity: 0.75; }
.tool-card.experimental:hover { background: #f5eeff; border-color: #9c27b0; opacity: 1; }
.tool-card.experimental .name { color: #7b1fa2; }

/* ── Data-folder bar ─────────────────────────────────────────────────── */
.folder-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  border: 2px dashed var(--border); border-radius: 8px;
  background: var(--bg-deep); margin-bottom: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.folder-bar.has-folder {
  border-style: solid; border-color: #2e7d32; background: #f1f8f1;
}
.folder-bar.needs-reconnect {
  border-style: solid; border-color: #b71c1c; background: #fdf1f1;
}
.folder-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.folder-bar-label {
  font-size: 0.85rem; font-weight: 700; color: var(--text); white-space: nowrap;
}
.folder-bar-name {
  font-size: 0.85rem; color: var(--muted); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.folder-bar.has-folder .folder-bar-name {
  color: #2e7d32; font-style: normal; font-weight: 600;
}
.folder-bar.needs-reconnect .folder-bar-name {
  color: #b71c1c; font-style: normal; font-weight: 600;
}
.folder-bar-btn {
  flex-shrink: 0; padding: 5px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; font-size: 0.82rem; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background 0.1s, border-color 0.1s;
}
.folder-bar-btn:hover { background: #e4e8ee; border-color: #9aa0aa; }
/* ─────────────────────────────────────────────────────────────────────── */

/* ── Pyodide pre-load status (inline with "🔍 Tools" label) ─────────── */
.py-preload-bar {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 10px;
  opacity: 0.8;
  transition: opacity 1.5s ease;
}
.py-preload-bar.ready {
  color: var(--accent-3);
}
/* ─────────────────────────────────────────────────────────────────────── */

/* ── Create-folder modal ─────────────────────────────────────────────── */
.idx-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 500;
  align-items: center; justify-content: center;
}
.idx-modal-overlay.open { display: flex; }
.idx-modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  width: min(96vw, 420px); display: flex; flex-direction: column;
}
.idx-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.idx-modal-title { font-size: 0.9rem; font-weight: 700; }
.idx-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--muted); line-height: 1;
}
.idx-modal-body { padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 8px; }
.idx-modal-hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.idx-modal-steps {
  margin: 0; padding-left: 1.4em;
  font-size: 0.85rem; color: var(--text);
  display: flex; flex-direction: column; gap: 5px;
}
.idx-modal-err { font-size: 0.78rem; color: var(--red, #c00); min-height: 1.2em; }
.idx-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--border);
}
.idx-act-btn {
  padding: 5px 14px; font-size: 0.82rem; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer;
}
.idx-act-btn:hover { background: #e4e8ee; }
.idx-act-btn.accent {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
}
.idx-act-btn.accent:hover { background: var(--accent-2); border-color: var(--accent-2); }

.ps-ver-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.ps-ver-label {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.ps-ver-row select {
  font-size: 0.78rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

footer.obie-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 24px 0 12px;
  border-top: 1px solid var(--border);
  margin-top: 30px;
}
