/* Wiki-specific styles — base variables and Tailwind utilities are in Base.astro */

/* ── Prose typography ────────────────────────────────────────────────── */
.prose-wiki {
  color: var(--text-2);
  line-height: 1.75;
  font-size: 1rem;
}
.prose-wiki h1,
.prose-wiki h2,
.prose-wiki h3,
.prose-wiki h4,
.prose-wiki h5,
.prose-wiki h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin: 1.5em 0 0.5em;
}
.prose-wiki h1 { font-size: 2em; }
.prose-wiki h2 { font-size: 1.5em; }
.prose-wiki h3 { font-size: 1.25em; }
.prose-wiki h4 { font-size: 1.1em; }
.prose-wiki p  { margin-bottom: 1em; }
.prose-wiki a  { color: var(--accent); text-decoration: underline; }
.prose-wiki a:hover { opacity: 0.8; }
.prose-wiki ul,
.prose-wiki ol { padding-left: 1.5em; margin-bottom: 1em; }
.prose-wiki ul { list-style-type: disc; }
.prose-wiki ol { list-style-type: decimal; }
.prose-wiki li { margin-bottom: 0.25em; }
.prose-wiki strong { color: var(--text-primary); font-weight: 600; }
.prose-wiki code {
  background: var(--bg-elevated);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
}
.prose-wiki pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25em;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1em;
}
.prose-wiki pre > code { background: none; padding: 0; font-size: 0.875em; }
.prose-wiki blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  margin: 0 0 1em 0;
  color: var(--text-4);
  font-style: italic;
}
.prose-wiki img {
  max-width: 100%;
  border-radius: 8px;
}
.prose-wiki hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.prose-wiki table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
.prose-wiki th,
.prose-wiki td {
  padding: 0.5em 0.75em;
  border: 1px solid var(--border);
}
.prose-wiki th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Semantic tree ──────────────────────────────────────────────────── */
.branch {
  color: var(--accent);
  list-style: "#";
}

/* ── Accessibility ──────────────────────────────────────────────────── */
.sr-only {
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Wikiref styles ─────────────────────────────────────────────────── */

/* attrbox */
aside.attrbox {
  text-align: center;
  border: 1px double var(--border-sub);
  color: var(--text-4);
  border-radius: 12px;
  margin: 0.5em;
  padding: 0.2em;
  float: right;
  background: var(--bg-card);
}
span.attrbox-title {
  margin: 0.5em;
  color: var(--text-4);
}
dl { margin: 0.5em; }
dt {
  width: 100px;
  float: left;
  clear: left;
  text-align: right;
  font-weight: bold;
  color: var(--text-3);
}
dt::after { content: ":"; }
dd {
  margin: 0 0 0 110px;
  padding: 0 0 0.5em 0;
}

/* Wiki links */
a.wiki[href] { color: var(--text-color-wiki); }
a.wiki[href]:visited { color: var(--text-color-wiki-visited); }
a.invalid {
  color: var(--text-color-invalid-wikilink);
  cursor: help;
}

/* ── Embed styles ───────────────────────────────────────────────────── */
.embed-wrapper {
  border: 1px solid var(--border-sub);
  border-radius: 6px;
  padding: 5px 20px 15px 20px;
  margin: 0 20px;
  position: relative;
  background: var(--bg-card);
}
.embed-title {
  height: 36px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: 26px;
  line-height: 42px;
  width: 100%;
  text-align: center;
  font-weight: 900;
  color: var(--text-primary);
}
.embed-link {
  position: absolute;
  top: 6px;
  right: 12px;
  cursor: pointer;
}
.embed-link-icon { text-decoration: none; }
.link-icon { font-size: 18px; color: var(--text-5); }
.link-icon::before { content: "🔗"; }
.embed-content { max-height: 500px; overflow-y: auto; padding-right: 10px; }
.embed-media { display: flex; justify-content: center; margin: 0 auto; }
.embed-audio  { height: 100%; width: 100%; }
.embed-image  { height: 75%; width: 75%; }
.embed-video  { height: 75%; width: 75%; }
