/* web/template/styles.css */
:root {
  --bg: #ffffff; --fg: #1a1a1a; --muted: #6a6a6a; --rule: #e2e2e2;
  --switch: #009E73; --signal: #56B4E9; --carry: #CC3311;
  --measure: 34rem;
}
[data-theme="dark"] {
  --bg: #0b0d10; --fg: #e8eaed; --muted: #9aa0a6; --rule: #23262b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "STIX Two Text", Georgia, serif; line-height: 1.55;
  display: grid; grid-template-columns: 16rem 1fr;
}
#theme {
  position: fixed; top: .6rem; right: .8rem; z-index: 2;
  background: none; border: 1px solid var(--rule); border-radius: 4px;
  color: var(--fg); cursor: pointer; padding: .2rem .5rem;
}
.sidebar {
  border-right: 1px solid var(--rule); padding: 1.2rem .9rem;
  height: 100vh; position: sticky; top: 0; overflow-y: auto; font-size: .9rem;
}
.sidebar a { color: var(--muted); text-decoration: none; display: block; padding: .12rem 0; }
.sidebar a.active { color: var(--fg); font-weight: 600; }
.prose { max-width: var(--measure); padding: 2.5rem 1.5rem; margin: 0 auto; }
.prose figure { margin: 1.6rem 0; text-align: center; }
.prose figure svg, .prose figure img { max-width: 100%; height: auto; }
figcaption { color: var(--muted); font-size: .88rem; font-style: italic; }
.stack-journey { list-style: none; padding: 0; margin: 1rem auto; max-width: 16rem; }
.stack-journey .rung {
  border: 1px solid var(--rule); border-radius: 3px; padding: .35rem .6rem;
  margin: .2rem 0; color: var(--muted); font-size: .85rem; text-align: center;
}
.stack-journey .rung.lit {
  border-color: var(--switch); color: var(--fg); font-weight: 600;
  background: color-mix(in srgb, var(--switch) 18%, var(--bg));
}
pre.code, pre.transcript {
  border: 1px solid var(--rule); border-radius: 4px; padding: .8rem 1rem;
  overflow-x: auto; font-family: "Source Code Pro", monospace; font-size: .82rem;
}
pre.transcript { color: var(--muted); }
.co {
  display: inline-grid; place-items: center; width: 1.1em; height: 1.1em;
  border-radius: 50%; background: var(--fg); color: var(--bg);
  font-size: .72em; margin-left: .5em; vertical-align: middle;
}
.prevnext { display: flex; justify-content: space-between; margin-top: 3rem;
  border-top: 1px solid var(--rule); padding-top: 1rem; font-size: .9rem; }

pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.code .hll { background-color: #ffffcc }
.code { background: #f8f8f8; }
.code .c { color: #3D7B7B; font-style: italic } /* Comment */
.code .err { border: 1px solid #F00 } /* Error */
.code .k { color: #008000; font-weight: bold } /* Keyword */
.code .o { color: #666 } /* Operator */
.code .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.code .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.code .cp { color: #9C6500 } /* Comment.Preproc */
.code .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.code .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.code .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.code .gd { color: #A00000 } /* Generic.Deleted */
.code .ge { font-style: italic } /* Generic.Emph */
.code .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.code .gr { color: #E40000 } /* Generic.Error */
.code .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.code .gi { color: #008400 } /* Generic.Inserted */
.code .go { color: #717171 } /* Generic.Output */
.code .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.code .gs { font-weight: bold } /* Generic.Strong */
.code .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.code .gt { color: #04D } /* Generic.Traceback */
.code .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.code .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.code .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.code .kp { color: #008000 } /* Keyword.Pseudo */
.code .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.code .kt { color: #B00040 } /* Keyword.Type */
.code .m { color: #666 } /* Literal.Number */
.code .s { color: #BA2121 } /* Literal.String */
.code .na { color: #687822 } /* Name.Attribute */
.code .nb { color: #008000 } /* Name.Builtin */
.code .nc { color: #00F; font-weight: bold } /* Name.Class */
.code .no { color: #800 } /* Name.Constant */
.code .nd { color: #A2F } /* Name.Decorator */
.code .ni { color: #717171; font-weight: bold } /* Name.Entity */
.code .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.code .nf { color: #00F } /* Name.Function */
.code .nl { color: #767600 } /* Name.Label */
.code .nn { color: #00F; font-weight: bold } /* Name.Namespace */
.code .nt { color: #008000; font-weight: bold } /* Name.Tag */
.code .nv { color: #19177C } /* Name.Variable */
.code .ow { color: #A2F; font-weight: bold } /* Operator.Word */
.code .w { color: #BBB } /* Text.Whitespace */
.code .mb { color: #666 } /* Literal.Number.Bin */
.code .mf { color: #666 } /* Literal.Number.Float */
.code .mh { color: #666 } /* Literal.Number.Hex */
.code .mi { color: #666 } /* Literal.Number.Integer */
.code .mo { color: #666 } /* Literal.Number.Oct */
.code .sa { color: #BA2121 } /* Literal.String.Affix */
.code .sb { color: #BA2121 } /* Literal.String.Backtick */
.code .sc { color: #BA2121 } /* Literal.String.Char */
.code .dl { color: #BA2121 } /* Literal.String.Delimiter */
.code .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.code .s2 { color: #BA2121 } /* Literal.String.Double */
.code .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.code .sh { color: #BA2121 } /* Literal.String.Heredoc */
.code .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.code .sx { color: #008000 } /* Literal.String.Other */
.code .sr { color: #A45A77 } /* Literal.String.Regex */
.code .s1 { color: #BA2121 } /* Literal.String.Single */
.code .ss { color: #19177C } /* Literal.String.Symbol */
.code .bp { color: #008000 } /* Name.Builtin.Pseudo */
.code .fm { color: #00F } /* Name.Function.Magic */
.code .vc { color: #19177C } /* Name.Variable.Class */
.code .vg { color: #19177C } /* Name.Variable.Global */
.code .vi { color: #19177C } /* Name.Variable.Instance */
.code .vm { color: #19177C } /* Name.Variable.Magic */
.code .il { color: #666 } /* Literal.Number.Integer.Long */