/* themes/default.css — structural, brand-neutral default theme.
   Tenant identity (name, content) comes from config + Notion, never from here. */

:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #6a737d;
  --line: #e4e7eb;
  --accent: #3b5bcc;
  --code-bg: #f3f4f6;
  --callout-bg: #f6f7f9;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --fg: #e6e9ec;
    --muted: #8b949e;
    --line: #2a2f36;
    --accent: #7da2ff;
    --code-bg: #1b2027;
    --callout-bg: #171c22;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1.25rem;
}
.site-header a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1, h2, h3 { line-height: 1.25; }
.page-title { margin-top: 0.5rem; }

a { color: var(--accent); }

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

blockquote {
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
blockquote p { margin: 0.4rem 0; }

code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

figure { margin: 1.5rem 0; }
figure img, p img { max-width: 100%; border-radius: 8px; }
figcaption { color: var(--muted); font-size: 0.9em; margin-top: 0.4rem; }

.callout {
  display: flex;
  gap: 0.6rem;
  background: var(--callout-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}
.callout-icon { flex: 0 0 auto; }
img.callout-icon { width: 1.4em; height: 1.4em; }
.callout-body { min-width: 0; }
.callout-body p { margin: 0.2rem 0; }

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.8rem 0;
}
details summary { cursor: pointer; font-weight: 500; }
details .toggle-body { margin-top: 0.5rem; }
details summary h1, details summary h2, details summary h3 { display: inline; margin: 0; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0;
}
th, td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--code-bg); }

.child-page {
  display: block;
  margin: 0.6rem 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}
.child-page::after { content: " →"; color: var(--muted); }
.tenant-meta { font-size: 0.85em; font-weight: 400; color: var(--muted); margin-top: 0.2rem; }

.indent { margin-left: 1.25rem; }

.unsupported {
  border: 1px dashed var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin: 0.8rem 0;
}

/* Notion text colors */
.c-gray { color: #787774; }
.c-brown { color: #9f6b53; }
.c-orange { color: #d9730d; }
.c-yellow { color: #cb912f; }
.c-green { color: #448361; }
.c-blue { color: #337ea9; }
.c-purple { color: #9065b0; }
.c-pink { color: #c14c8a; }
.c-red { color: #d44c47; }

/* Notion background colors */
.c-gray_background { background: #f1f1ef; }
.c-brown_background { background: #f4eeee; }
.c-orange_background { background: #faebdd; }
.c-yellow_background { background: #fbf3db; }
.c-green_background { background: #edf3ec; }
.c-blue_background { background: #e7f3f8; }
.c-purple_background { background: #f4f0f7; }
.c-pink_background { background: #faf1f5; }
.c-red_background { background: #fdebec; }

@media (prefers-color-scheme: dark) {
  .c-gray_background, .c-brown_background, .c-orange_background,
  .c-yellow_background, .c-green_background, .c-blue_background,
  .c-purple_background, .c-pink_background, .c-red_background {
    background: var(--callout-bg);
  }
}
