/* page.css -- the PIC16F877A / PICDEM 2 Plus page: a header bar in a deep red with charcoal, white cards, a clean
   sans-serif; no fonts or scripts from elsewhere */
:root { --red: #c8102e; --red-d: #a00d25; --red-l: #fbe9ec; --char: #3a3f44; --ink: #22262a; --mute: #636a70;
        --rule: #dcdfe2; --bg: #f3f4f5; --amber: #d97a00; --amber-l: #fff3e0; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.55;
       font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif; }
a { color: var(--red-d); }
a:hover { color: var(--amber); }

/* the header bar: charcoal with a red rule */
header.bar { background: var(--char); color: #fff; position: sticky; top: 0; z-index: 2; border-bottom: 4px solid var(--red);
             box-shadow: 0 1px 4px rgba(0,0,0,.2); }
header.bar .in { max-width: 72em; margin: 0 auto; padding: .55em 1.2em; display: flex; flex-wrap: wrap; align-items: center; gap: .4em 1.4em; }
header.bar a { color: #fff; text-decoration: none; }
header.bar a:hover { color: #fff; text-decoration: underline; }
header.bar .home { font-size: .9em; opacity: .85; }
header.bar .brand { font-size: 1.25em; letter-spacing: .02em; font-weight: 300; }
header.bar .brand b { font-weight: 700; color: #ff8a9a; }
header.bar nav { display: flex; flex-wrap: wrap; gap: .2em 1.1em; margin-left: auto; font-size: .92em; font-weight: 600; }
header.bar nav a.dl { background: var(--red); color: #fff; padding: .15em .8em; border-radius: 3px; }
header.bar nav a.dl:hover { background: var(--red-d); text-decoration: none; }

/* the page and its cards */
main { max-width: 72em; margin: 0 auto; padding: 1.4em 1.2em 2em; }
h1 { font-size: 2.1em; line-height: 1.2; font-weight: 700; color: var(--ink); margin: .4em 0 .5em; }
h1::after { content: ""; display: block; width: 3.2em; height: .18em; background: var(--red); margin-top: .35em; }
section.level2 { background: #fff; border: 1px solid var(--rule); border-left: 5px solid var(--red); border-radius: 3px;
                 padding: .4em 1.6em 1.2em; margin: 1.4em 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
h2 { color: var(--red-d); font-size: 1.45em; margin: .6em 0 .5em; }
h3 { color: var(--char); font-size: 1.12em; margin: 1.4em 0 .4em; border-bottom: 1px solid var(--rule); padding-bottom: .15em; }
p, li { max-width: 62em; }

/* the warning */
blockquote { background: var(--amber-l); border: 1px solid var(--amber); border-left: 6px solid var(--amber);
             border-radius: 3px; margin: 1.2em 0; padding: .7em 1.1em; color: #4a2c00; }
blockquote strong { color: #9a4e00; }

/* figures */
img { display: block; max-width: 100%; height: auto; margin: 1.2em auto; background: #fff; border: 1px solid var(--rule);
      border-radius: 3px; padding: .4em; }

/* code */
code { font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: .86em; background: #eef0f2;
       color: #6b0a1a; padding: .08em .3em; border-radius: 2px; }
pre { background: #24282c; color: #eceff1; padding: .9em 1.1em; border-radius: 3px; overflow-x: auto; line-height: 1.35;
      border-left: 4px solid var(--red); }
pre code { background: none; color: inherit; padding: 0; font-size: .84em; }

/* tables */
table { border-collapse: collapse; margin: 1em 0; font-size: .9em; display: block; overflow-x: auto; max-width: 100%; }
th, td { border-bottom: 1px solid var(--rule); padding: .4em .7em; vertical-align: top; text-align: left; }
th { background: var(--char); color: #fff; font-weight: 600; border-bottom: 2px solid var(--red); }
tr:nth-child(even) td { background: #f8f9fa; }
.num { text-align: right; }
.mid { text-align: center; }

footer.foot { max-width: 72em; margin: 0 auto; padding: 0 1.2em 2.5em; font-size: .92em; }
@media (max-width: 700px) { header.bar nav { margin-left: 0; } h1 { font-size: 1.6em; } section.level2 { padding: .3em .9em 1em; } }
