:root {
  --yb-bg: #f4f7fb;
  --yb-panel: #ffffff;
  --yb-ink: #1c2a3a;
  --yb-accent: #2f6fed;
  --yb-sidebar: #e8eef8;
  --yb-border: #c9d6e8;
}

body.site-yulberg {
  margin: 0;
  color: var(--yb-ink);
  background:
    radial-gradient(circle at top left, #dbe7ff 0%, transparent 45%),
    linear-gradient(180deg, #f7faff 0%, var(--yb-bg) 55%, #eef3f9 100%);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.page-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--yb-panel);
  box-shadow: 0 0 0 1px var(--yb-border);
}

.sidebar {
  background: linear-gradient(180deg, var(--yb-sidebar), #f8fbff);
  border-right: 1px solid var(--yb-border);
  padding: 1.25rem 1rem 2rem;
}

.sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sidebar-toolbar .brand {
  flex: 1;
  min-width: 0;
}

.site-nav-toggle {
  border: 1px solid var(--yb-border);
  background: #fff;
  padding: 0.4rem 0.55rem;
  border-radius: 0.35rem;
}

.site-nav-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.25);
}

.site-nav-toggle .navbar-toggler-icon {
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(28, 42, 58, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.brand-logo {
  max-width: 180px;
  height: auto;
}

.sidebar-nav .nav-link {
  color: var(--yb-ink);
  border-radius: 0.35rem;
  padding: 0.4rem 0.65rem;
}

.sidebar-nav .nav-link:hover {
  background: rgba(47, 111, 237, 0.12);
  color: var(--yb-accent);
}

.sidebar-nav .nav-link.active {
  background: rgba(47, 111, 237, 0.16);
  color: var(--yb-accent);
  font-weight: 600;
}

.sidebar-nav .nav-link-child {
  font-size: 0.92rem;
  padding-left: 1.25rem;
}

.sidebar-nav .nav-link-grandchild {
  font-size: 0.88rem;
  padding-left: 2rem;
  opacity: 0.95;
}

.seed-listing-items {
  padding-left: 1.25rem;
}

.seed-content figure.mosimage {
  margin: 1rem 0;
}

.seed-content figure.mosimage figcaption {
  font-size: 0.85rem;
  color: #5b6b7c;
}

.main-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-header {
  background: linear-gradient(90deg, #ffffff, #edf3ff 50%, #ffffff);
  border-bottom: 1px solid var(--yb-border);
  padding: 1rem 1.5rem;
}

.header-caption {
  max-width: 100%;
  height: auto;
}

.content-panel {
  padding: 1.5rem;
  flex: 1;
  min-width: 0;
}

.seed-content {
  min-width: 0;
  max-width: 100%;
}

.seed-content img {
  max-width: 100%;
  height: auto;
}

.seed-content table {
  max-width: 100%;
}

.seed-content table[background] {
  max-width: min(100%, 730px);
  width: 730px;
  table-layout: fixed;
  background-size: 100% 100%;
  background-position: left top;
  background-repeat: no-repeat;
}

.seed-content table[background] .paper_normal_text_justify {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  line-height: 1.45;
}

.seed-content img[align="left"] {
  float: left;
  margin: 0.35rem 1rem 0.75rem 0;
}

.seed-content img[align="right"] {
  float: right;
  margin: 0.35rem 0 0.75rem 1rem;
}

.site-footer {
  border-top: 1px solid var(--yb-border);
  padding: 0.85rem 1.5rem;
  color: #5b6b7c;
  font-size: 0.9rem;
  min-height: 0.5rem;
}

@media (max-width: 767.98px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--yb-border);
    padding-bottom: 1rem;
  }

  .sidebar-toolbar {
    margin-bottom: 0;
  }

  .sidebar-nav .nav-link {
    padding: 0.65rem 0.75rem;
  }

  .content-panel {
    padding: 1rem;
  }

  .seed-content table[background] {
    width: 100%;
    max-width: 100%;
  }

  .seed-content img[align="left"],
  .seed-content img[align="right"] {
    float: none;
    display: block;
    margin: 0.75rem auto;
  }
}

/* Home hero: capped width + image above text on phone and tablet */
@media (max-width: 1024px) {
  .seed-home .seed-content > table[background] {
    display: block;
    width: min(100%, 340px);
    max-width: 100%;
    margin: 0 auto;
    height: auto !important;
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
  }

  .seed-home .seed-content > table[background] > tbody,
  .seed-home .seed-content > table[background] > tbody > tr {
    display: block;
    width: 100%;
  }

  .seed-home .seed-content > table[background] > tbody > tr:first-child {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0;
    padding-top: 58%;
    position: relative;
    box-sizing: border-box;
  }

  .seed-home .seed-content > table[background] > tbody > tr:first-child > td {
    width: auto !important;
    height: auto !important;
  }

  .seed-home .seed-content > table[background] > tbody > tr:first-child > td:first-child {
    display: none;
  }

  .seed-home .seed-content > table[background] > tbody > tr:first-child > td:last-child {
    position: absolute;
    top: 0.4rem;
    right: 0.35rem;
    left: auto;
    text-align: right !important;
  }

  .seed-home .seed-content > table[background] > tbody > tr:first-child img {
    float: none !important;
    display: inline-block;
    max-width: 7.5rem;
    width: auto;
    height: auto;
    margin: 0;
  }

  .seed-home .seed-content > table[background] > tbody > tr:last-child {
    display: block;
    background: #fff;
    position: relative;
    z-index: 1;
  }

  .seed-home .seed-content > table[background] > tbody > tr:last-child > td {
    display: block;
    width: 100% !important;
    height: auto !important;
  }

  .seed-home .seed-content > table[background] > tbody > tr:last-child > td:first-child {
    display: none;
  }

  .seed-home .seed-content > table[background] .paper_normal_text_justify {
    padding: 0.85rem 0.7rem !important;
    background: #fff;
    text-align: left !important;
  }
}

@media (min-width: 768px) {
  .sidebar-toolbar {
    display: block;
    margin-bottom: 0.5rem;
  }

  #yulbergSiteNav {
    display: block !important;
    height: auto !important;
    visibility: visible;
  }
}
