:root {
  --slides-accent: #e7ad52;
  --slides-accent-rgb: 231, 173, 82;
  --r-heading-text-transform: none;
}

.reveal .slides section {
  line-break: strict !important;
  overflow-wrap: break-word !important;
}

.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
  text-transform: none !important;
}

.reveal h2 {
  margin-bottom: 40px !important;
}

.reveal .slides > section > section {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding: 40px 60px !important;
  height: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

.reveal .slides > section > section.center {
  display: grid !important;
  place-content: center !important;
  text-align: center !important;
}

.reveal .slides > section > section > p:has(> img) {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.reveal .slides > section > section > p > img {
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

.reveal blockquote {
  border-left: 6px solid var(--slides-accent) !important;
  min-width: 85% !important;
  padding: 0.8em !important;
  background: rgba(255, 255, 255, 0.05) !important;
  font-style: normal !important;
}

.reveal table:not(.hljs-ln) {
  font-size: 0.6em !important;
  width: 100% !important;
}

.reveal table:not(.hljs-ln) th {
  background: rgba(var(--slides-accent-rgb), 0.2) !important;
  color: var(--slides-accent) !important;
}

.reveal table:not(.hljs-ln) td,
.reveal table:not(.hljs-ln) th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0.4em 0.6em !important;
  vertical-align: middle !important;
  line-height: 1.5 !important;
}

.reveal a {
  color: var(--slides-accent) !important;
}

.reveal ul, .reveal ol {
  display: block !important;
}

.reveal ol {
  list-style-position: inside !important;
}

/* Auto-layout: heading shrinks, list stretches to fill */
.reveal .slides > section > section > h1,
.reveal .slides > section > section > h2,
.reveal .slides > section > section > h3,
.reveal .slides > section > section > h4,
.reveal .slides > section > section > h5,
.reveal .slides > section > section > h6 {
  flex: 0 0 auto !important;
}

.reveal .slides .stretch-list {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-evenly !important;
}

/* Auto-layout: multi-column for long lists */
.reveal .slides .auto-columns {
  flex: 1 1 auto !important;
  columns: var(--auto-columns) !important;
  column-gap: 2em !important;
}

/* Auto-layout: spacing for multi-block slides */
.spaced-block {
  margin-top: 1.25em !important;
}

.spaced-block:is(ul, ol) {
  line-height: 1.5 !important;
}

.reveal .slides section ul li,
.reveal .slides section ol li {
  margin-bottom: 0.4em !important;
}

.reveal .slide-number {
  right: auto !important;
  left: 16px !important;
}

.reveal .searchbox {
  top: 16px !important;
  right: 88px !important;
}

.reveal .searchbox .searchinput {
  padding: 6px 16px !important;
  border-radius: 20px !important;
  font-size: 14px !important;
}

#lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  min-width: 56px;
  padding: 6px 0;
  border-radius: 20px;
  background: rgba(var(--slides-accent-rgb), 0.9);
  color: #1a1a2e;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

#lang-toggle:hover {
  background: var(--slides-accent);
}

.reveal .slides pre:has(> .hljs) {
  box-shadow: none !important;
}

.reveal pre code {
  padding: 1em !important;
  border-radius: 1em !important;
}

.reveal .slides .hljs {
  min-height: inherit !important;
}

.reveal .slides .hljs.text {
  background: none !important;
}

.hljs-ln {
  line-height: 1.5em !important;
}

.reveal .slides .hljs.text .hljs-ln-numbers {
  display: none !important;
}

/* Mobile: bump text size so body copy stays readable on small screens */
@media (max-width: 768px) {
  .reveal .slides section p,
  .reveal .slides section li,
  .reveal .slides section blockquote {
    font-size: 56px !important;
  }
  .reveal table {
    font-size: 0.7em !important;
  }
}
