/* ============================================================
   RTI Wiki — "claude" template — wiki article styling
   Loaded after claude-shell.css. Targets DokuWiki-rendered HTML
   inside .wiki-article so it reads like a Claude doc.
   ============================================================ */

.wiki-article {
  width: 100%;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 24px 24px 80px;
}
.wiki-article-inner {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e6e1d6;
  border-radius: 22px;
  padding: 36px 44px;
  box-shadow: 0 6px 28px rgba(43,40,32,0.06), 0 1px 2px rgba(43,40,32,0.04);
}
@media (max-width: 720px) {
  .wiki-article-inner { padding: 22px 20px; border-radius: 16px; }
}

/* Breadcrumb / trail */
.wiki-trail {
  font: 500 13px Inter, system-ui, sans-serif;
  color: var(--c-muted);
  margin: 6px 0 18px;
}
.wiki-trail a {
  color: var(--c-action);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-action-line);
}
.wiki-trail a:hover {
  color: var(--c-action-deep);
  border-bottom-color: var(--c-action-deep);
}
.wiki-trail .bcsep { color: var(--c-line); margin: 0 6px; }

/* Body content */
.wiki-body {
  font: 17.5px/1.7 Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--c-ink);
}
.wiki-body p {
  margin: 0 0 18px;
}
.wiki-body strong { color: var(--c-ink); font-weight: 700; }
.wiki-body em { color: var(--c-ink-soft); }

/* Headings — serif H1, sans-serif H2/H3 */
.wiki-body h1, .wiki-body h2, .wiki-body h3, .wiki-body h4, .wiki-body h5 {
  color: var(--c-ink);
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.wiki-body h1 {
  font: 400 44px/1.12 "Charter", "Source Serif 4", "Source Serif Pro", "Crimson Text", "Georgia", ui-serif, serif;
  margin: 12px 0 28px;
  letter-spacing: -0.024em;
}
.wiki-body h2 {
  font: 700 26px/1.25 Inter, system-ui, sans-serif;
  margin: 40px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-line);
}
.wiki-body h3 {
  font: 700 20px/1.3 Inter, system-ui, sans-serif;
  margin: 28px 0 10px;
}
.wiki-body h4 {
  font: 700 17px/1.35 Inter, system-ui, sans-serif;
  margin: 22px 0 8px;
}

/* Section anchors (DokuWiki adds # links to headings) */
.wiki-body h1 a, .wiki-body h2 a, .wiki-body h3 a {
  color: inherit; text-decoration: none;
}

/* Lists */
.wiki-body ul, .wiki-body ol {
  margin: 8px 0 18px;
  padding-left: 24px;
}
.wiki-body li {
  margin: 6px 0;
  line-height: 1.65;
}
.wiki-body ul li::marker { color: var(--c-action); }

/* Inline links */
.wiki-body a {
  color: var(--c-action);
  text-decoration: none;
  border-bottom: 1px solid var(--c-action-line);
  transition: color .12s, border-color .12s;
}
.wiki-body a:hover {
  color: var(--c-action-deep);
  border-bottom-color: var(--c-action-deep);
}
.wiki-body a.wikilink2 {  /* missing-page link */
  color: var(--c-accent);
  border-bottom-style: dashed;
  border-bottom-color: var(--c-accent-soft);
}

/* Images */
.wiki-body img.media,
.wiki-body img.medialeft,
.wiki-body img.mediaright,
.wiki-body img.mediacenter {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 14px 0;
  border: 1px solid var(--c-line);
}
.wiki-body img.mediacenter { display: block; margin: 18px auto; }

/* Tables */
.wiki-body table.inline {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 15.5px;
}
.wiki-body table.inline th,
.wiki-body table.inline td {
  border: 1px solid var(--c-line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.wiki-body table.inline th {
  background: var(--c-bg-soft);
  font-weight: 700;
  color: var(--c-ink);
  border-bottom: 2px solid var(--c-line);
}
.wiki-body table.inline tr:nth-child(even) { background: rgba(255,255,255,0.5); }

/* Code blocks */
.wiki-body code,
.wiki-body pre,
.wiki-body pre.code {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 2px 8px;
  font: 14px ui-monospace, "SF Mono", Menlo, "Fira Code", monospace;
  color: var(--c-ink);
}
.wiki-body pre, .wiki-body pre.code {
  padding: 16px 18px;
  margin: 14px 0;
  overflow-x: auto;
  line-height: 1.55;
}

/* Blockquotes — green left rule, soft cream bg */
.wiki-body blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  background: var(--c-action-soft);
  border-left: 4px solid var(--c-action);
  border-radius: 0 10px 10px 0;
  color: var(--c-action-deep);
  font-style: italic;
}
.wiki-body blockquote p:last-child { margin-bottom: 0; }

/* DokuWiki Notes / Warnings / Tips */
.wiki-body div.notewarning,
.wiki-body div.notetip,
.wiki-body div.noteimportant,
.wiki-body div.noteclassic {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--c-line);
  background: var(--c-card);
  font-size: 15px;
  line-height: 1.6;
}
.wiki-body div.notetip      { background: var(--c-action-soft); border-color: var(--c-action-line); color: var(--c-action-deep); }
.wiki-body div.notewarning  { background: #fef3e6; border-color: #f0c993; color: #6b3f0a; }
.wiki-body div.noteimportant{ background: #fdecea; border-color: #f1b6b2; color: #7d1d1d; }

/* WRAP plugin boxes (used heavily in the wiki) */
.wiki-body .wrap_round.wrap_tip,
.wiki-body .wrap.tip {
  background: var(--c-action-soft);
  border: 1px solid var(--c-action-line);
  color: var(--c-action-deep);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
}
.wiki-body .wrap_round.wrap_alert,
.wiki-body .wrap.alert {
  background: #fdecea;
  border: 1px solid #f1b6b2;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
  color: #7d1d1d;
}

/* Table of contents — collapsible card */
.wiki-body .dokuwiki .toc,
.wiki-body div#dw__toc,
.wiki-body .dw__toc,
.dw__toc {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 18px 0 22px;
  box-shadow: var(--sh-1, 0 1px 2px rgba(43,40,32,0.04));
  font: 14.5px Inter, sans-serif;
}
.dw__toc h3 {
  margin: 0 0 8px !important;
  font: 600 13px Inter !important;
  color: var(--c-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 0 !important;
  padding: 0 !important;
}
.dw__toc ul { padding-left: 18px; margin: 0; }
.dw__toc li { margin: 3px 0; line-height: 1.5; }
.dw__toc a {
  border: 0;
  color: var(--c-ink-soft);
}
.dw__toc a:hover { color: var(--c-action); }

/* Footer meta row */
.wiki-meta {
  margin: 60px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--c-line);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  font: 13px Inter, system-ui, sans-serif;
  color: var(--c-muted);
}
.wiki-meta-tools {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.wiki-meta-tools .wiki-tool a, .wiki-meta-tools a {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: var(--c-card);
  color: var(--c-ink-soft);
  font: 500 13px Inter;
  text-decoration: none;
  transition: border-color .12s, color .12s, background .12s;
}
.wiki-meta-tools a:hover {
  border-color: var(--c-action-line);
  color: var(--c-action);
  background: var(--c-action-soft);
}

/* DokuWiki form / edit / login pages */
.wiki-body .login,
.wiki-body .resendpwd,
.wiki-body .register,
.wiki-body .profile,
.wiki-body form.dw__editform {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 22px 0;
}
.wiki-body input[type="text"],
.wiki-body input[type="password"],
.wiki-body input[type="email"],
.wiki-body textarea,
.wiki-body select {
  border: 1.5px solid var(--c-line);
  border-radius: 10px;
  padding: 10px 14px;
  font: 15px Inter, sans-serif;
  background: #fff;
  color: var(--c-ink);
  width: 100%;
  max-width: 480px;
}
.wiki-body input:focus,
.wiki-body textarea:focus {
  outline: none;
  border-color: var(--c-action);
  box-shadow: 0 0 0 3px rgba(11,107,88,.16);
}
.wiki-body button,
.wiki-body input[type="submit"] {
  background: var(--c-action);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font: 600 14.5px Inter, sans-serif;
  cursor: pointer;
}
.wiki-body button:hover,
.wiki-body input[type="submit"]:hover {
  background: var(--c-action-deep);
}

/* Mobile */
@media (max-width: 720px) {
  .wiki-article-inner { max-width: 100%; }
  .wiki-body { font-size: 16.5px; }
  .wiki-body h1 { font-size: 34px; }
  .wiki-body h2 { font-size: 22px; }
  .wiki-body h3 { font-size: 18px; }
}

/* Print — clean reading view */
@media print {
  .claude-sidebar, .claude-topbar, .cs-burger, .cs-toggle-floating { display: none !important; }
  .claude-main { padding: 0 !important; }
  .wiki-article-inner { max-width: 100%; }
}


/* === Fix: floated images breaking text columns next to WRAP boxes (2026-05-06) === */
.wiki-body img.medialeft,
.wiki-body img.mediaright {
  max-width: 48%;
  height: auto;
  margin: 8px 18px 8px 0;
  border-radius: 14px;
}
.wiki-body img.mediaright { margin: 8px 0 8px 18px; }

/* Force WRAP plugin boxes to clear floats — they should never flow next to images */
.wiki-body .plugin_wrap,
.wiki-body div[class*=wrap_] {
  clear: both;
  overflow: hidden;
}

/* On narrow viewports, kill floats entirely — full-width stack */
@media (max-width: 720px) {
  .wiki-body img.medialeft,
  .wiki-body img.mediaright {
    float: none !important;
    max-width: 100%;
    margin: 14px auto;
    display: block;
  }
}

/* Code containers also clear */
.wiki-body pre, .wiki-body table.inline { clear: both; }
