@import 'reset.css';

body {
  color: #333;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 200;
  margin: 0 0 30px;
  width: 900px;
  padding: 0 30px;
}
a {
  color: #4671d5;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1 {
  font-size: 30px;
  margin: 60px 0 30px;
}
h2 {
  font-size: 18px;
  margin: 30px 0 15px;
}
p {
  line-height: 1.4em;
  margin: 5px 0 5px 0;
}
strong {
  font-weight: 700;
}
sub,
sup {
  font-size: 0.8em;
  position: relative;
}
sub {
  top: 0.5em;
}
sup {
  top: -0.5em;
}
#header {
  background: #fff;
  left: 0;
  padding-left: 30px;
  padding-bottom: 5px;
  position: fixed;
  top: 0;
  width: 980px;
  z-index: 69;
}
#nav {
  display: inline-block;
  float: left;
}
#nav li {
  border-top: 5px solid #fff;
  float: left;
}
#nav a {
  color: #333;
  display: block;
  min-width: 40px;
  text-align: center;
  padding: 8px 10px;
  transition: all 0.1s linear;
  -webkit-transition: all 0.1s linear;
  -moz-transition: all 0.1s linear;
  -o-transition: all 0.1s linear;
}
#nav a:hover {
  background: #eee;
  text-decoration: none;
}
#nav #home {
  border-top: 5px solid #333;
}
#nav #home a,
#nav #home.current a:hover {
  background: #333;
  color: #fff;
}
#nav #home a:hover {
  background: #666;
}
#nav #home.current,
#nav .current {
  border-top-color: #ffd300;
}
#nav .current a {
  background-color: #ddd;
  cursor: default;
}
#semesters {
  float: left;
  margin: 10px 0 0 20px;
}
#semesters li {
  display: inline-block;
  float: right;
}
#semesters a {
  background: #ddd;
  border: 1px solid #fff;
  border-radius: 0 4px 4px 0;
  display: inline-block;
  color: #666;
  font-size: 12px;
  margin-left: -3px;
  padding: 4px 6px 4px 8px;
}
#semesters a:hover {
  background: #ccc;
  color: #333;
  text-decoration: none;
}
#semesters .current a {
  background: #9f3ed5;
  border-radius: 4px;
  color: #fff;
  cursor: default;
  padding-left: 6px;
}
.back-nav {
  display: block;
  font-size: 12px;
  margin-top: -12px;
}
.cpp-back-nav {
  display: block;
  font-size: 12px;
  margin-top: -12px;
  margin-bottom: 20px;
}

#footer {
  border-top: 1px solid #9F3ED5;
  color: #666;
  font-size: 11px;
  margin-top: 40px;
  padding-top: 10px;
}

/*
 * index.html
 */
#announcements {
  list-style-type: square;
}
#announcements li {
  margin-left: 20px;
  margin-top: 10px;
}
#concepts li {
  float: left;
  margin-top: 30px;
  margin-right: 20px;
  width: 280px;
}
#concepts h3 {
  font-size: 18px;
  font-weight: 300;
}
#concepts p {
  font-size: 12px;
}
#landingImg {
  margin-left: 150px;
}

/*
 * syllabus.html
 */
.sections, .officehours {
  width: 480px;
  font-size: 14px;
  margin-top: 10px;
  border: none;
}

.sections tr, .officehours tr {
  border-top: 1px solid #ddd;
}

.sections td, .officehours td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.sections em, .officehours em {
  font-style: normal;
  color: #7109aa;
}

.instructors {
  margin-top: 15px;
}
.instructors img {
  border: 1px solid #ddd;
  float: left;
  margin-right: 10px;
  width: 80px;
}
.instructors li {
  float: left;
  margin-top: -40px;
  padding-top: 50px;
  width: 300px;
  height: 103px;
}
.instructors .name {
  font-size: 20px;
}
.instructors span {
  display: block;
}
.instructors .email {
  background: url('../images/email.gif');
  display: block;
  height: 0;
  margin-top: 5px;
  overflow: hidden;
  padding-top: 10px;
  width: 10px;
}
.instructors .ohrlabel,
.instructors .pos {
  font-size: 12px;
}
.instructors .pos {
  color: #666;
}
.instructors .name,
.instructors .ohr {
  margin-top: 5px;
}
.instructors .ohr,
.instructors .ohrlabel {
  color: #999;
}
.instructors .ohrlabel {
  font-style: italic;
  margin-top: 10px;
}
.instructors .ohr {
  font-size: 12px;
}
#grading li {
  margin-top: 5px;
}
ol.syllabuslist, ul.syllabuslist {
  margin-top: 10px;
  list-style-position: inside;
  padding-left: 1em;
}
ol.syllabuslist {
  list-style-type: decimal;
}
ul.syllabuslist {
  list-style-type: square;  
}
.syllabuslist > li {
  line-height: 1.4em;
}

/*
 * schedule.html
 */
#schedule {
  margin-top: 15px;
}
#schedule .week {
  border-top: 1px solid #eee;
  padding: 10px 10px;
}
#schedule .current-week {
  background: #F6F4FA;
}
.week h3 {
  float: left;
  font-size: 22px;
  font-weight: 300;
}
.week .events {
  margin-left: 110px;
}
.events dt {
  color: #999;
  float: left;
  font-size: 12px;
  min-width: 36px;
  margin-right: 10px;
}
.events dd {
  font-size: 14px;
  margin-left: 50px;
  margin-bottom: 5px;
}

.events dd a {
  font-weight: bold;
  color: #7837e1;
}

.events .label {
  border: 1px solid #9f3ed5;
  color: #7109aa;
  font-size: 11px;
  margin-right: 3px;
  padding: 0 3px;
  position: relative;
  top: -1px;
}
.events .link {
  font-size: 12px;
  line-height: 12px;
}



/*
 * docs/*
 */
pre,
code {
  font-family: Inconsolata, Courier New, monospace;
}
.docs-index,
#interface {
  display: block;
  font-size: 14px;
  line-height: 16px;
  margin-left: 20px;
}
.docs-index {
  font-size: 16px;
  line-height: 20px;
}
.spec {
  border-top: none;
  padding-top: 10px;
  padding-left: 20px;
}
.spec dt {
  margin-top: -58px;
  padding-top: 58px;
}
.spec dd {
  border-bottom: 1px solid #ddd;
  font-size: 13px;
  line-height: 18px;
  margin: 10px 0;
  padding: 10px 0 20px 20px;
}
.spec dd:last-child {
  border: none;
}
.spec dt strong {
  background: #ffe773;
  border-radius: 2px;
  font-weight: 400;
  padding: 2px 4px;
}
blockquote {
  margin: 10px 0;
  padding: 0 10px;
}
table.docs-index {
  margin: 20px 0;
  width: 100%;
}
table.docs-index td {
  padding: 5px 10px;
  text-align: left;
  vertical-align: middle;
}
table.docs-index tr {
  border-top: 1px solid #ddd;
}
table.docs-index tr.header {
  border-top: none;
}
table.docs-index tr.header td {
  text-align: left;
  font-weight: bold;
  font-size: 113%;
  padding-top: 30px;
  padding-bottom: 10px;
}
table.cost {
  margin: 20px 0;
  width: 100%;
}
table.cost td {
  padding: 5px 10px;
  text-align: center;
  vertical-align: middle;
}
table.cost td:first-child {
  text-align: left;
}
table.cost thead tr {
  background: #ffe773;
  border: 1px solid #aaa;
  border-width: 1px 0;
}
table.cost thead td {
  font-weight: 700;
  text-align: center;
}
table.cost tr {
  border-bottom: 1px solid #ddd;
}
table.cost#resources td {
  text-align: center;
}
/* A randomized cost bound names its guarantee on hover, and the table's
   caption, set below it like a footnote, explains the markers. */
span.randomized {
  cursor: help;
}
table.cost caption {
  caption-side: bottom;
  color: #666;
  font-size: 13px;
  line-height: 1.4em;
  padding-top: 6px;
  text-align: left;
}

ol.list {
  margin: 10pt;
}

ol.list li {
  margin: 5px 0;
}

ol.list li::before {content: "\2022  "; color: #7837e1}

.hljs,
.reveal pre code,
pre code {
  background-color: transparent; /* Makes the background fully transparent */
  background: none !important; /* Removes any potential background image or gradient */
  box-shadow: none !important; /* Removes any shadows that might be present */
}

pre > code:not(.definition) {
  background: #faf9fc !important;
  padding: 0.8em 1em;
  border-radius: 6px;
  display: block;
  margin: 10px 0;
}

.hljs-title {
  color: #7837e1 !important;
}

pre code.definition {
  padding: 10px !important;
  margin: 5px 5px !important;
  /* border-left: 4px solid #765678; */
}

.function-spec {
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.2em 0;
  width: 100%;
  border-bottom: 2px solid #ddd;
}

/* Header row */
.function-spec thead th {
  background: #f0edf7;               /* light purple */
  color: #333;
  font-weight: 600;
  text-align: center;
  padding: 0.4em 0.6em;
  border-top: 2px solid #ddd;
  border-bottom: 2px solid #ddd;
}

/* Signature column */
.function-spec td.signature {
  vertical-align: middle;
  padding-right: 1.5em;
}

/* Cost cells */
.function-spec td.cost {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 0.4em 0.6em;
  white-space: nowrap;
  vertical-align: middle;
  width: 160px;
  /* border-left: 2px solid #ddd; */
}

/* The header a C++ docs page needs, set small under the page title */
p.usage {
  color: #666;
  font-size: 14px;
  margin: 0 0 15px;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
  padding: 5px;
}

h2.cppdoc-section {
  font-size: 24px;
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding-left: 0.6em;

  border-left: 6px solid #765678;  /* your accent color */
  font-weight: 600;
}

div.warning {
  background: #FBF3F5;
  border-radius: 4px;
  padding: 10px;
  margin: 10px 0;
}

details.hidden-code {
  margin-top: 10px;
}

ul.actual-list {
  list-style: disc;
  padding: 10px;
  margin-left: 10px;
}

ul.actual-list li {
  margin: 5px 0;
}

h3 {
  margin-top: 1em;
}


h2.cppdoc-section ~ h3 {
  font-size: 19px;
  margin: 20pt 0 10pt 0;
}

/* A LaTeX \paragraph: bold run-in title, with room above it so it reads as a
   break rather than as just another paragraph. */
p.runin {
  margin-top: 1.4em;
}



#toc {
  position: fixed;
  top: 60px;
  left: 1000px;
  width: 250px;
  
  overflow-y: scroll;
  max-height: calc(100% - 200px);

  background: #f7f9fc;
  border: 1px solid #dde3ed;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  padding: 10px;
  font-family: system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* ----- RESET LIST DEFAULTS ----- */
#toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ----- TOP-LEVEL ITEMS ----- */
#toc > ul > li {
  margin-bottom: 2px;
}

/* ----- ALL LINKS ----- */
#toc a {
  display: block;
  padding: 8px 10px;
  color: #1f2937;
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s ease;
  line-height: 1.0;  /* BIG one for line spacing */
  font-weight: bold;
}

/* ----- HOVER EFFECT ----- */
#toc a:hover {
  background: #e5edff;
}

/* ----- NESTED LIST INDENT ----- */
#toc ul ul {
  margin-left: 8px;
  margin-top: 2px;
}

/* ----- NESTED LINKS (slightly softer) ----- */
#toc ul ul a {
  font-size: 0.95em;
  color: #374151;
  padding: 4px 6px;
  font-size: 0.88rem;
  font-weight: normal;
}

/* Scroll to an anchor should leave room for the floating header */
table, h2, h3 {
  scroll-margin-top: 50px;
}


.doc-section {
  background: white;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 5px solid #765678;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.doc-section h2 {
  margin-top: 0;
  font-size: 1.25rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.doc-section ul {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 0 0;
}

.doc-section li {
  margin: 0.5rem 0;
}

.doc-section a {
  text-decoration: none;
  font-weight: 500;
  color: #2a5db0;
}

.doc-section a:hover {
  text-decoration: underline;
}

/* Score-decay chart on the policies page. */
figure.score-chart {
  margin: 20px 0;
  max-width: 760px;
}
figure.score-chart figcaption {
  color: #666;
  font-size: 13px;
  line-height: 1.4em;
  margin-top: 4px;
}

/* The policies page uses h2 for sections and h3 for subsections, beneath the
   page title's h1. The global 18px/1em would leave them barely above body text. */
body.policies h2 {
  font-size: 24px;
  margin-top: 1.6em;
}
body.policies h3 {
  font-size: 19px;
  margin: 20pt 0 10pt 0;
}

/* Screenshots on the local-workflow page. */
figure.screenshot {
  margin: 20px 0;
}
figure.screenshot img {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
}
figure.screenshot figcaption {
  color: #666;
  font-size: 13px;
  line-height: 1.4em;
  margin-top: 6px;
}
/* Copy button, top right of an opt-in code block. */
.copyable {
  position: relative;
}
.copyable .copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  font: 12px/1 Helvetica, Arial, sans-serif;
  color: #444;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 9px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.12s;
}
.copyable:hover .copy-btn,
.copyable .copy-btn:hover,
.copyable .copy-btn:focus {
  opacity: 1;
}
