/* ============================================================
   SES · Scottish Teachers & Students of Economics
   Obsidian Publish custom theme
   This file ONLY affects the published site (publish.obsidian.md).
   It is loaded automatically if named exactly "publish.css" at the
   vault root and enabled in Publish settings.
   ============================================================ */

:root {
  --ses-navy:    #0f2c4c;   /* primary brand */
  --ses-blue:    #1d5f9c;
  --ses-accent:  #e4b04a;   /* warm gold accent */
  --ses-bg:      #fbfbfd;
  --ses-card:    #ffffff;
  --ses-ink:     #1c2733;
  --ses-muted:   #5b6b7b;
  --ses-line:    #e3e8ee;
  --ses-radius:  14px;
}

/* ---------- Base ---------- */
body {
  --background-primary: var(--ses-bg);
  --text-normal: var(--ses-ink);
  --text-muted: var(--ses-muted);
  --interactive-accent: var(--ses-blue);
  --text-accent: var(--ses-blue);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.markdown-preview-view,
.published-container {
  line-height: 1.65;
}

/* ---------- Headings ---------- */
.markdown-preview-view h1 {
  color: var(--ses-navy);
  font-weight: 800;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--ses-accent);
  padding-bottom: 0.3em;
  margin-top: 0.2em;
}
.markdown-preview-view h2 {
  color: var(--ses-blue);
  font-weight: 700;
  margin-top: 1.8em;
}
.markdown-preview-view h3 { color: var(--ses-navy); font-weight: 600; }

/* ---------- Links ---------- */
.markdown-preview-view a { color: var(--ses-blue); text-decoration: none; }
.markdown-preview-view a:hover { text-decoration: underline; }

/* ---------- Hero banner image ---------- */
.markdown-preview-view img {
  border-radius: var(--ses-radius);
  max-width: 100%;
}

/* ---------- Tables as cards ----------
   Note: the published site uses .published-container, the in-app
   preview uses .markdown-preview-view. Target both so styling matches
   live and in Obsidian. */
.markdown-preview-view table,
.published-container table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid var(--ses-line);
  border-radius: var(--ses-radius);
  overflow: hidden;
}
.markdown-preview-view thead,
.published-container thead {
  background: var(--ses-navy);
}
.markdown-preview-view th,
.published-container th {
  background: var(--ses-navy);
  color: #fff;
  text-align: left;
  font-weight: 600;
}
.markdown-preview-view th, .markdown-preview-view td,
.published-container th, .published-container td {
  padding: 0.7em 1em;
  border-bottom: 1px solid var(--ses-line);
}
.markdown-preview-view tr:last-child td,
.published-container tr:last-child td { border-bottom: none; }
.markdown-preview-view tr:hover td,
.published-container tr:hover td { background: #f4f8fc; }

/* ---------- Callouts ---------- */
.markdown-preview-view .callout {
  border-radius: var(--ses-radius);
  border: 1px solid var(--ses-line);
  box-shadow: 0 1px 3px rgba(15,44,76,0.06);
}

/* ---------- Site title / sidebar ---------- */
.site-body-left-column .site-name,
.site-name {
  color: var(--ses-navy);
  font-weight: 800;
}

/* ---------- Homepage tweaks (cssclass: home) ---------- */
.home .markdown-preview-view h1 {
  font-size: 2.6em;
  text-align: center;
  border-bottom: none;
}
.home blockquote.callout[data-callout="info"] {
  text-align: center;
}

/* ---------- Footer / misc ---------- */
.markdown-preview-view hr {
  border: none;
  border-top: 1px solid var(--ses-line);
  margin: 2.2em 0;
}

/* ============================================================
   SIDEBAR CLEANUP  —  hide internal/utility pages from the
   Publish file-tree navigation.
   Publish renders each tree item with a title attribute equal
   to the file/folder name, so we target those.
   ============================================================ */

/* Hide the entire _internal folder */
.site-body-left-column .nav-folder-title[data-path="_internal"] {
  display: none !important;
}
/* Its children collapse with it; hide by path prefix as a belt-and-braces fallback */
.site-body-left-column .tree-item-self[data-path^="_internal/"],
.site-body-left-column .nav-file-title[data-path^="_internal/"] {
  display: none !important;
}

/* Hide any stray utility notes by leading underscore in their title */
.site-body-left-column .nav-file-title[data-path*="/_"],
.site-body-left-column .nav-file-title[data-path^="_"] {
  display: none !important;
}

/* Optional: hide the "Welcome" default note from nav */
.site-body-left-column .nav-file-title[data-path="Welcome.md"] {
  display: none !important;
}
