@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=PT+Mono&display=swap');

body {
  font-family: Merriweather, Georgia, serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #343a40;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #343a40;
  color: #f1f1f1;
  position: relative;
  padding: 20px 0;
}

header a.logo-link {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
}

header img.logo {
  width: 90px;
  height: auto;
  filter: brightness(0) invert(1);
}

nav {
  text-align: center;
  margin-top: 10px;
}

nav a {
  color: #f1f1f1;
  margin: 0 10px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #007bff;
}

.container {
  flex: 1;
  max-width: 960px;
  margin: 40px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
  background-color: #343a40;
  color: #f1f1f1;
  text-align: center;
  padding: 15px 0;
  border-top: 5px solid #007bff;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f1f1f1;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  text-align: center;
}

code {
  background-color: #f5f5f5;
  padding: 0.2rem 0rem;
  border-radius: 4px;
  font-family: Consolas, monospace;
}

pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1em;
}

table.main-builtin-table th:nth-child(2),
table.main-builtin-table td:nth-child(2),
table.main-builtin-table td:nth-child(2) code {
  white-space: nowrap !important;
}

code.stack-effect-nowrap {
  white-space: nowrap !important;
  display: inline-block;
}

ul.builtin-name-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

ul.builtin-name-list li {
  margin: 0;
}

ul.overview-group-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

ul.overview-group-list li {
  margin: 0 0 8px 0;
}

p.example-note {
  color: #555;
  font-size: 0.95rem;
  font-style: italic;
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}

p.example-file-label {
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

p.example-file-label code {
  display: inline-block;
  padding: 0.2rem 0.4rem;
}

ul.empty-io {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
}

ul.empty-io li {
  margin-left: 0;
}

h3#inputs + ul,
h3#outputs + ul,
h3#behavior + ul,
h3#see-also + ul {
  margin-top: 0.35rem;
}

h3#see-also + ul li {
  margin-bottom: 0.35rem;
}

.ref-index {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  flex-wrap: wrap;
}

.ref-index li {
  background: #eee;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.module-list {
  margin-left: 1rem;
  margin-bottom: 2rem;
}

.module-list p {
  margin: 0.4rem 0;
}

.module-description {
  color: #555;
  margin-left: 0.5rem;
}

.index-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.index-list li {
  background: #eee;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.index-list li a {
  text-decoration: none;
  color: #333;
}

.index-list li a:hover {
  text-decoration: underline;
}

.method-box {
  border: 1px solid #ccc;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #fefefe;
}

table.method-table {
  border-collapse: collapse;
  border: none;
  margin: 0;
  table-layout: auto;
  width: auto;
}

table.method-table tr {
  border: none;
}

table.method-table td {
  border: none;
  padding: 0.3rem 0.5rem;
  vertical-align: top;
}

.method-name code,
.method-stack code {
  font-family: monospace;
  white-space: pre;
}

.preconditions,
.postconditions {
  margin-top: 0.8rem;
  margin-left: 1rem;
}

.preconditions ul,
.postconditions ul {
  margin-top: 0.3rem;
  margin-bottom: 0.6rem;
}

.details {
  margin-top: 0.8rem;
  margin-left: 1rem;
}

.example {
  margin-top: 1rem;
  margin-left: 1rem;
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1rem;
}

.example code {
  background: #fff;
}

hr.index-separator {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border: none;
  border-bottom: 1px solid #ccc;
}

body.sl-ref-page .container {
  line-height: 1.2;
}

.refpath-navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0 0.75rem;
  background: #f8f9fa;
  border-top: 1px solid #c7ccd1;
  border-bottom: 1px solid #c7ccd1;
}

.refpath-item {
  position: relative;
}

.refpath-label,
.refpath-link,
.refpath-leaf {
  display: block;
  padding: 0.45rem 0.8rem;
  color: #202122;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  background: #f8f9fa;
  user-select: none;
  cursor: pointer;
  border: 0;
  border-right: 1px solid #d0d4d8;
  font: inherit;
  text-align: left;
  box-sizing: border-box;
}

.refpath-item:first-child .refpath-label,
.refpath-navbar > .refpath-link:first-of-type,
.refpath-navbar > .refpath-leaf:first-of-type {
  border-left: 1px solid #d0d4d8;
}

.refpath-item:hover > .refpath-label,
.refpath-item:focus-within > .refpath-label {
  background: #eaecf0;
}

.refpath-item.open > .refpath-label {
  background: #eaecf0;
}

.refpath-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 18rem;
  max-width: min(70rem, calc(100vw - 2rem));
  max-height: 28rem;
  overflow: auto;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid #a2a9b1;
  box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.15);
  z-index: 30;
}

.refpath-item.open > .refpath-menu,
.refpath-item:hover > .refpath-menu,
.refpath-item:focus-within > .refpath-menu {
  display: block;
}

.refpath-menu > a {
  display: block;
  padding: 0.35rem 0.8rem;
  color: #202122;
  text-decoration: none;
  white-space: nowrap;
}

.refpath-menu > a:hover {
  background: #eaecf0;
}

.refpath-menu-overview {
  min-width: 28rem;
  padding: 0.6rem 0.8rem;
}

.refpath-menu-overview .overview-group-list {
  margin: 0;
  padding-left: 1rem;
}

.refpath-menu-overview .overview-group-list li {
  margin-bottom: 0.4rem;
}

@media (max-width: 900px) {
  .refpath-navbar {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .refpath-menu {
    left: 0;
    right: auto;
    min-width: min(18rem, calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
    max-height: 60vh;
  }
}

body.refpath-page {
  margin: 0;
}

body.refpath-page .container {
  margin: 0 auto;
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.refpath-link {
  text-decoration: none;
}

.refpath-leaf {
  background: #e2e6ea;
  font-weight: 600;
  cursor: default;
}

.refpath-terminal {
  background: #e2e6ea;
  font-weight: 600;
}

.refpath-item:hover > .refpath-terminal,
.refpath-item:focus-within > .refpath-terminal,
.refpath-item.open > .refpath-terminal {
  background: #d8dde3;
}
