@charset "UTF-8";

/* override some pygments stuff to make it look better with Tufte CSS */
.codehilite {
  padding-top: 15px;
  padding-bottom: 15px;
  background: none;
}


/*
  inspired in large part by Tufte CSS:

  https://github.com/edwardtufte/tufte-css/blob/gh-pages/tufte.css

  copy-pasted lots of portions of tufte-css into here

*/


/* Import ET Book styles
   adapted from https://github.com/edwardtufte/et-book/blob/gh-pages/et-book.css */

@font-face {
    font-family: "et-book";
    src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot");
    src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "et-book";
    src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot");
    src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") format("svg");
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "et-book";
    src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot");
    src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "et-book-roman-old-style";
    src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot");
    src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* Tufte CSS styles - adapted and simplified by me ... general notes:
 
- do NOT add dark mode styles since it messed up a lot of stuff
 
*/

html {
    /* set font-size here and use 'rem' elsewhere to set it relative to this */
    font-size: 14px;
}

body {
    width: 87.5%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12.5%;
    font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    background-color: #fffff8;
    color: #111;

    /* original ... */
    /*max-width: 1400px;*/

    /* tweaked -- make it not too wide since i won't have sidenotes or margin notes */
    max-width: 700px;

    counter-reset: sidenote-counter;

    /* taken from 'article' in tufte.css since we don't use <article> */
    padding: 5rem 0rem;

    /* taken from 'section' in tufte.css since we don't use <section> */
    padding-top: 1rem;
    padding-bottom: 1rem;
}

h1 {
    font-weight: 400;
    /* original:
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
    */

    /* tweaked: to be a bit smaller */
    margin-top: 3rem;
    margin-bottom: 0rem;
    font-size: 2.4rem;

    line-height: 1;
}

/* make the title a bit bigger */
h1.articleTitle {
  font-size: 2.8rem;
  line-height: 1.2;
}

/* NOTE: Tufte CSS italicizes h2 (and h3 below still is), but we deliberately
   dropped 'font-style: italic' here on 2026-07-31 -- upright h2 subsection
   headings are easier to skim in a long article. Don't "restore" it for
   Tufte fidelity. */
h2 {
    font-weight: 400;
    margin-top: 2.1rem;
    margin-bottom: 1.4rem;
    font-size: 2.2rem;
    line-height: 1;
}

h3 {
    font-style: italic;
    font-weight: 400;
    font-size: 1.7rem;
    margin-top: 2rem;
    margin-bottom: 1.4rem;
    line-height: 1;
}

hr {
    display: block;
    height: 1px;
    /*width: 55%;*/
    width: 95%;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/* i added a .summary and .footer class */

p,
dl,
ol,
ul,
.summary {
    font-size: 1.4rem;
    line-height: 2rem;
}

p,
.summary {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
}

.summary {
  border-top: 1px solid #888;
  border-bottom: 1px solid #888;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;

  /* make a bit smaller than p */
  font-size: 1.25rem;
  line-height: 1.8rem;
}

.footer {
  border-top: 1px solid #888;
  padding-top: 0.5rem;
  font-size: 1.2rem;
}


/* Links: replicate underline that clears descenders */
a:link,
a:visited {
    color: inherit;
}

.no-tufte-underline:link {
    background: unset;
    text-shadow: unset;
}

a:link, .tufte-underline, .hover-tufte-underline:hover {
    text-decoration: none;
    background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(currentColor, currentColor);
    background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(currentColor, currentColor);
    -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
    -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
    background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
    background-repeat: no-repeat, no-repeat, repeat-x;
    text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, -0.15em 0 #fffff8;
    background-position: 0% 93%, 100% 93%, 0% 93%;
}

/* i don't know what this is but i'm gonna comment this out since it
   makes the UNDERLINED LINKS within the python tutor visualizations look truncated */
/*
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    a:link, .tufte-underline, .hover-tufte-underline:hover {
        background-position-y: 87%, 87%, 87%;
    }
}
*/

a:link::selection,
a:link::-moz-selection {
    text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe;
    background: #b4d5fe;
}

code, pre > code {
    /* original */
    /*font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;*/
    /*font-size: 1.0rem;*/

    /* tweaked to match pytutor.css code font */
    font-family: Andale mono, monospace;
    font-size: 1.05rem;

    line-height: 1.42;
    -webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS. See https://github.com/edwardtufte/tufte-css/issues/81#issuecomment-261953409 */
}

.sans > code {
    font-size: 1.2rem;
}

h1 > code,
h2 > code,
h3 > code {
    font-size: 0.80em;
}

.marginnote > code,
.sidenote > code {
    font-size: 1rem;
}

pre > code {
    font-size: 0.9rem;
    /*width: 52.5%;*/ /* <-- comment this out or else it truncates long lines of code */
    margin-left: 2.5%;
    overflow-x: auto;
    display: block;
}
