/* ngspice manual — clean, print/PDF-ready (wkhtmltopdf) stylesheet */

:root{
  --ink:#1a1a1a; --muted:#555; --rule:#d0d0d0;
  --accent:#0b5394; --accent-soft:#eaf1f8;
  --code-bg:#f6f8fa; --code-ink:#0b3d63;
  --warn-bg:#fff6e6; --warn-bd:#e0a300;
  --ok:#2e7d32;
}

html{font-size:15px}
body{
  font-family:"DejaVu Serif",Georgia,serif; color:var(--ink);
  max-width:52em; margin:0 auto; padding:2em 2.5em 4em; line-height:1.5;
}
h1,h2,h3,h4{font-family:"DejaVu Sans",Arial,sans-serif; line-height:1.2; color:var(--ink)}
h1{font-size:2.1rem; border-bottom:3px solid var(--accent); padding-bottom:.3em; margin:0 0 .3em}
h2{font-size:1.5rem; color:var(--accent); border-bottom:1px solid var(--rule);
   padding-bottom:.2em; margin-top:2.2em}
h3{font-size:1.15rem; margin-top:1.8em}
h3 code{font-size:1em}
p,li{color:var(--ink)}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
code,kbd,pre{font-family:"DejaVu Sans Mono",Consolas,monospace}
code{background:var(--code-bg); color:var(--code-ink); padding:.05em .35em; border-radius:3px; font-size:.9em}

/* --- command reference entry --- */
.cmd{border:1px solid var(--rule); border-radius:6px; padding:0 1.2em 1em; margin:1.4em 0}
.cmd>h3{border-top:4px solid var(--accent); margin:0 -1.2em .6em; padding:.5em 1.2em;
        background:var(--accent-soft); border-radius:5px 5px 0 0}
.mode{float:right; font-family:"DejaVu Sans",sans-serif; font-size:.7rem; font-weight:bold;
      letter-spacing:.03em; padding:.2em .6em; border-radius:10px; vertical-align:middle}
.mode.both{background:#e3f0e4; color:var(--ok); border:1px solid #b7d8b9}
.mode.ui{background:#eee; color:#666; border:1px solid #ccc}
.field{margin:.6em 0}
.field>b{font-family:"DejaVu Sans",sans-serif; font-size:.8rem; text-transform:uppercase;
         letter-spacing:.04em; color:var(--muted); display:block; margin-bottom:.15em}

/* --- example block: deck -> command -> captured output --- */
.ex{margin:1em 0; border:1px solid var(--rule); border-radius:5px; overflow:hidden}
.ex>figcaption{background:#f0f0f0; font-family:"DejaVu Sans",sans-serif; font-size:.8rem;
               font-weight:bold; padding:.35em .8em; border-bottom:1px solid var(--rule)}
a.dl{font-family:"DejaVu Sans Mono",monospace; background:#e7f0e8; color:#1a5c22;
     border:1px solid #b7d8b9; border-radius:3px; padding:.05em .4em; text-decoration:none}
a.dl::before{content:"\2b07\fe0e  "}   /* download glyph */
a.dl:hover{background:#d4e8d6}
pre{background:var(--code-bg); margin:0; padding:.7em 1em; overflow-x:auto; white-space:pre; font-size:.86rem; line-height:1.4}
pre.deck{color:#222}
pre.cmd-line{background:#0f1b26; color:#e6edf3; border-top:1px solid var(--rule)}
pre.cmd-line::before{content:"$ "; color:#6fb3e0}
pre.out{background:#fbfbf7; color:#333; border-top:1px dashed var(--rule)}
pre.out::before{content:"→ output"; display:block; color:var(--muted); font-size:.7rem;
                font-family:"DejaVu Sans",sans-serif; margin-bottom:.3em}
.ex img{display:block; max-width:100%; height:auto; margin:0 auto; padding:.6em; background:#fff}

/* --- gotcha / note callouts --- */
.note{border-left:4px solid var(--accent); background:var(--accent-soft); padding:.6em 1em; margin:1em 0; border-radius:0 4px 4px 0}
.gotcha{border-left:4px solid var(--warn-bd); background:var(--warn-bg); padding:.6em 1em; margin:1em 0; border-radius:0 4px 4px 0}
.gotcha>b:first-child,.note>b:first-child{font-family:"DejaVu Sans",sans-serif}

/* --- tables --- */
table{border-collapse:collapse; width:100%; margin:1em 0; font-size:.9rem}
th,td{border:1px solid var(--rule); padding:.4em .6em; text-align:left; vertical-align:top}
th{background:var(--accent-soft); font-family:"DejaVu Sans",sans-serif}

/* --- table of contents --- */
nav.toc{border:1px solid var(--rule); border-radius:6px; padding:1em 1.5em; background:#fafafa}
nav.toc ol{margin:.3em 0}
nav.toc>b{font-family:"DejaVu Sans",sans-serif}

.reserved{color:var(--muted); font-style:italic}

/* --- alphabetical command index --- */
nav.alpha{border:1px solid var(--rule); border-radius:6px; padding:1em 1.5em; background:#fbfbfd; margin:1em 0}
nav.alpha>b{font-family:"DejaVu Sans",sans-serif; display:block; margin-bottom:.5em}
nav.alpha ul{list-style:none; margin:0; padding:0; column-width:11em; column-gap:2em}
nav.alpha li{break-inside:avoid; padding:.12em 0; font-size:.9rem}
nav.alpha code{background:none; padding:0}
nav.alpha .dot{color:var(--accent); font-weight:bold}
nav.alpha .todo a,nav.alpha .todo{color:var(--muted)}

/* --- print / PDF --- */
@media print{
  body{max-width:none; padding:0}
  h2{page-break-before:always}
  h2#toc,h2:first-of-type{page-break-before:avoid}
  .cmd,.ex,table,.gotcha,.note{page-break-inside:avoid}
  a{color:var(--ink)}
  pre{white-space:pre-wrap; word-wrap:break-word}
}
