@font-face {
  font-family: lato;
  src: url('/css/Lato-Regular.ttf');
  font-style: normal;
  font-weight: normal;
  text-rendering: optimizeLegibility;
}
@font-face {
  font-family: lato_bold;
  src: url('/css/Lato-Bold.ttf');
  font-style: normal;
  font-weight: normal;
  text-rendering: optimizeLegibility;
}
@font-face {
  font-family: lato_italic;
  src: url('/css/Lato-Italic.ttf');
  font-style: italic;
  font-weight: normal;
  text-rendering: optimizeLegibility;
}

/* Reset */
*{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
}
body{
  margin: 0;
  font-family: lato, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2d3436;
  background-color: #f0f7f0;
}

/* Header */
.doc-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #fff;
  border-bottom: 1px solid #d4e6d4;
  padding: 0 24px;
}
.doc-header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  height: 60px;
}
.doc-header-left{
  display: flex;
  align-items: center;
  gap: 12px;
}
.doc-logo img{
  height: 40px;
  width: auto;
}
.menu-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #2d3436;
}
.doc-breadcrumb{
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 0;
  font-size: 0.85em;
  color: rgba(45,52,54,0.5);
  border-top: 1px solid #eaf2ea;
}
.doc-breadcrumb a{
  color: rgba(45,52,54,0.5);
  text-decoration: underline;
}
.doc-breadcrumb a:hover{
  color: #2d3436;
}

/* Language switcher */
.lang-switcher select{
  font-family: lato, sans-serif;
  font-size: 0.85em;
  padding: 4px 8px;
  border: 1px solid #d4e6d4;
  border-radius: 3px;
  background-color: #f0f7f0;
  color: #2d3436;
  cursor: pointer;
}

/* Layout */
.doc-layout{
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
}

/* Sidebar */
.doc-sidebar{
  width: 240px;
  flex-shrink: 0;
  padding: 24px 16px 24px 0;
  border-right: 1px solid #d4e6d4;
}
.doc-toc h4{
  margin: 0 0 12px 0;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(45,52,54,0.5);
}
.doc-toc ul{
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-toc li{
  margin: 0;
  padding: 0;
}
.doc-toc li a{
  display: block;
  padding: 5px 10px;
  font-size: 0.9em;
  color: #2d3436;
  text-decoration: none;
  border-radius: 4px;
  border-left: 2px solid transparent;
}
.doc-toc li a:hover{
  background-color: rgba(45,52,54,0.05);
  border-left-color: #6ab04c;
}
.doc-toc li.toc-h2{
  padding-left: 12px;
}
.doc-toc li.toc-h2 a{
  font-size: 0.85em;
  color: rgba(45,52,54,0.7);
}

/* Content */
.doc-content{
  flex: 1;
  min-width: 0;
  padding: 24px 0 40px 32px;
}
.doc-content h1,
.doc-content h2,
.doc-content h3{
  scroll-margin-top: 100px;
}
.doc-content h1{
  font-size: 2em;
  font-weight: 100;
  margin: 0 0 8px 0;
  color: #2d3436;
}
.doc-content h2{
  font-size: 1.4em;
  font-weight: 100;
  margin: 32px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #d4e6d4;
  color: #2d3436;
}
.doc-content h3{
  font-size: 1.1em;
  font-weight: bold;
  margin: 20px 0 8px 0;
  color: #2d3436;
}
.doc-content p{
  margin: 0 0 12px 0;
}
.doc-content a{
  color: #6ab04c;
  text-decoration: underline;
}
.doc-content a:hover{
  color: #4a8035;
}
.doc-content code{
  background-color: rgba(106,176,76,0.1);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}
.doc-content img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
  border-radius: 4px;
  border: 1px solid #d4e6d4;
}
.doc-content hr{
  border: none;
  border-top: 1px solid #d4e6d4;
  margin: 24px 0;
}
.doc-content ol,
.doc-content ul{
  padding-left: 24px;
}
.doc-content li{
  margin: 4px 0;
}
.doc-content table{
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9em;
}
.doc-content th{
  background-color: rgba(106,176,76,0.1);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #d4e6d4;
}
.doc-content td{
  padding: 8px 12px;
  border-bottom: 1px solid #eaf2ea;
}
.doc-content strong{
  color: #2d3436;
}

/* Footer */
.doc-footer{
  text-align: center;
  padding: 20px;
  font-size: 0.85em;
  color: rgba(45,52,54,0.5);
  border-top: 1px solid #d4e6d4;
}

/* Mobile */
@media(max-width: 768px){
  .doc-header{
    padding: 0 16px;
  }
  .menu-toggle{
    display: block;
  }
  .doc-sidebar{
    position: fixed;
    top: 0;
    left: -280px;
    width: 270px;
    height: 100vh;
    background-color: #fff;
    border-right: 1px solid #d4e6d4;
    padding: 80px 16px 24px 16px;
    transition: left 0.25s ease;
    z-index: 99;
    overflow-y: auto;
    box-shadow: none;
  }
  .doc-sidebar.open{
    left: 0;
    box-shadow: 4px 0 12px rgba(0,0,0,0.1);
  }
  .doc-content{
    padding: 16px;
  }
  .doc-content h1{
    font-size: 1.5em;
  }
  .doc-content h2{
    font-size: 1.2em;
  }
  .doc-content table{
    font-size: 0.8em;
  }
  .doc-breadcrumb{
    font-size: 0.78em;
  }
}
