/* Akret Wiki – minimal monospace theme
   Goals: tiny CSS, readable, print-friendly, dark-mode aware, no layout JS. */

/* 1) Base layout */
:root{
  --bg: #fff;
  --fg: #111;
  --muted:#666;
  --link:#0044cc;
  --link-visited:#5a2ea6;
  --accent:#0a84ff;
  --border:#ddd;
  --code-bg:#f6f8fa;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0c0c0c;
    --fg:#e6e6e6;
    --muted:#9a9a9a;
    --link:#7aa2ff;
    --link-visited:#b58cff;
    --accent:#5aa3ff;
    --border:#2a2a2a;
    --code-bg:#16181a;
  }
}

html { font-size: 16px; }
body{
  margin:0; padding:0;
  background:var(--bg); color:var(--fg);
  font: 16px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* center a narrow, readable column */
#container, .markdown-body, .gollum-site, main, .page{
  max-width: 72ch;  /* readable line length */
  padding: 2rem 1rem 6rem;
  margin: 0 auto;
}

/* 2) Headings */
h1,h2,h3,h4,h5,h6{
  margin: 2rem 0 0.75rem;
  line-height:1.25;
  font-weight: 700;
}
h1{ font-size: 1.75rem; border-bottom: 1px solid var(--border); padding-bottom: .25rem; }
h2{ font-size: 1.35rem; }
h3{ font-size: 1.15rem; color: var(--muted); }
h4,h5,h6{ font-size: 1rem; color: var(--muted); }

/* Gollum often renders a page title area; keep it clean */
header, .header, .gollum-header { border:0; background:none; }

/* 3) Text, links, lists */
p, ul, ol, blockquote, pre, table { margin: 1rem 0; }
li { margin: .25rem 0; }
a{
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:visited{ color: var(--link-visited); }
a:hover, a:focus{ outline: none; text-decoration-thickness: 2px; }

/* 4) Code & pre */
code, kbd, samp{ background: var(--code-bg); padding: .1rem .25rem; border-radius: 4px; }
pre{
  background: var(--code-bg);
  padding: 1rem; overflow: auto; border-radius: 6px;
}
pre code{ background: transparent; padding: 0; }

/* 5) Images & media */
img, video{ max-width: 100%; height: auto; border-radius: 4px; }
figure{ margin: 1.25rem 0; }
figcaption{ color: var(--muted); font-size: .9rem; margin-top: .25rem; }

/* 6) Tables */
table{ width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td{ border: 1px solid var(--border); padding: .5rem .6rem; vertical-align: top; }
thead th{ background: color-mix(in srgb, var(--code-bg) 80%, transparent); }

/* 7) Blockquotes */
blockquote{
  margin: 1rem 0; padding: .5rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* 8) Utility bits */
hr{ border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
sup, sub{ line-height: 0; }
mark{ background: #fffb91; color: inherit; }

/* 9) Gollum-specific chrome (light touch) */
.gollum-edit-form textarea{
  font: inherit; /* keep monospace */
  line-height: 1.5;
}
.gollum-footer, .footer, nav, .actions{ color:var(--muted); }
#searchbar, .searchbar, form input[type=search]{
  font: inherit; padding: .4rem .6rem; border:1px solid var(--border); border-radius:4px; background:var(--bg); color:var(--fg);
}

/* 10) Print (nice for handouts) */
@media print{
  body{ background:#fff; color:#000; }
  a{ color:#000; text-decoration: underline; }
  pre, code{ background:#fff; }
  #container, .markdown-body, .gollum-site, main, .page{ max-width:none; padding:0; }
  header, nav, .gollum-footer, .actions{ display:none !important; }
}
