:root {
  --yobi-shell-width: 264px;
  --yobi-shell-rail: 58px;
  --yobi-paper: #faf7f3;
  --yobi-cream: #f2ece2;
  --yobi-ink: #1f1f1f;
  --yobi-muted: #6f6a64;
  --yobi-line: #e4dccf;
  --yobi-coral: #ef806d;
  --yobi-green: #788f52;
}

html:has(body.yobi-hosted) { background: var(--yobi-paper); }

body.yobi-hosted {
  box-sizing: border-box;
  min-height: 100vh;
  padding-left: var(--yobi-shell-width);
  background: var(--yobi-paper);
  transition: padding-left 180ms ease-out;
}

.yobi-app-sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--yobi-shell-width);
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--yobi-line);
  background: #f7f2ea;
  color: var(--yobi-ink);
  transition: width 180ms ease-out, transform 180ms ease-out;
}

.yobi-app-sidebar__head {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--yobi-line);
}

.yobi-app-sidebar__brand {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
  color: var(--yobi-ink);
  text-decoration: none;
}

.yobi-app-wordmark {
  display: inline-flex;
  align-items: baseline;
  color: inherit;
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 31px;
  font-weight: 800;
  font-style: normal;
  line-height: .82;
  letter-spacing: 0;
  white-space: nowrap;
}

.yobi-app-wordmark__char { position: relative; display: inline-block; color: inherit; }
.yobi-app-wordmark__char--o { margin-left: -.18em; }
.yobi-app-wordmark__char--b { margin-left: -.11em; }
.yobi-app-wordmark__char--e,
.yobi-app-wordmark__char--dot { margin-left: -.1em; }

.yobi-shell-toggle,
.yobi-mobile-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--yobi-ink);
  cursor: pointer;
}

.yobi-shell-toggle:hover,
.yobi-mobile-toggle:hover { background: var(--yobi-cream); }
.yobi-shell-toggle:focus-visible,
.yobi-mobile-toggle:focus-visible,
.yobi-app-nav a:focus-visible { outline: 2px solid var(--yobi-ink); outline-offset: 2px; }
.yobi-shell-toggle svg,.yobi-mobile-toggle svg,.yobi-app-nav svg,.yobi-back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }

.yobi-app-sidebar__scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 19px 10px; }
.yobi-app-context { margin: 0 10px 13px; color: var(--yobi-muted); font-family: Inter, "DM Sans", ui-sans-serif, system-ui, sans-serif; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.yobi-app-nav { display: grid; gap: 2px; }
.yobi-app-nav + .yobi-app-nav { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--yobi-line); }

.yobi-app-nav__label {
  margin: 0 10px 7px;
  color: var(--yobi-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.yobi-app-nav a {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  border-radius: 10px;
  color: #514d48;
  font-family: Inter, "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
  transition: background 160ms ease-out, color 160ms ease-out;
}

.yobi-app-nav a:hover { background: #eee7dc; color: var(--yobi-ink); }
.yobi-app-nav a[aria-current="page"] { background: var(--yobi-ink); color: #fff; }
.yobi-app-nav svg { width: 17px; height: 17px; flex: none; }
.yobi-app-nav__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.yobi-app-sidebar__foot { padding: 14px 10px 16px; border-top: 1px solid var(--yobi-line); }
.yobi-app-status { padding: 0 10px 14px; color: var(--yobi-muted); font-family: Inter, "DM Sans", ui-sans-serif, system-ui, sans-serif; font-size: 11px; line-height: 1.45; }
.yobi-app-status strong { display: block; color: var(--yobi-ink); font-size: 12px; }
.yobi-app-status span { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
.yobi-app-status i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--yobi-green); }
.yobi-back-link { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 0 10px; border-radius: 10px; color: var(--yobi-muted); font-family: Inter, "DM Sans", ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 750; text-decoration: none; }
.yobi-back-link:hover { color: var(--yobi-ink); background: #eee7dc; }

.yobi-mobile-toggle,.yobi-shell-scrim { display: none; }

body.yobi-hosted .tools-nav { display: none; }
body.yobi-hosted .shell { width: min(calc(100% - 56px), 1420px); }
body.yobi-hosted .index-shell { width: min(calc(100% - 56px), 1420px); max-width: 1420px; padding-top: 52px; }
body.yobi-hosted .nav { display: none; }
body.yobi-hosted .footer { width: min(calc(100% - 56px), 1420px); margin-inline: auto; }

body.yobi-hosted[data-yobi-shell="collapsed"] { padding-left: var(--yobi-shell-rail); }
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-sidebar { width: var(--yobi-shell-rail); }
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-sidebar__head { justify-content: center; padding-inline: 10px; }
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-sidebar__brand { display: none; }
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-nav__label,
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-nav__text,
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-context,
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-status,
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-back-link span { display: none; }
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-nav a,
body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-back-link { justify-content: center; padding-inline: 0; }

@media (max-width: 820px) {
  body.yobi-hosted { padding-left: 0; }
  body.yobi-hosted .yobi-app-sidebar { transform: translateX(-100%); box-shadow: 18px 0 40px rgba(36, 29, 21, .15); }
  body.yobi-hosted[data-yobi-mobile-open="true"] .yobi-app-sidebar { transform: translateX(0); }
  body.yobi-hosted[data-yobi-shell="collapsed"] { padding-left: 0; }
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-sidebar { width: var(--yobi-shell-width); }
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-sidebar__head { justify-content: space-between; padding-inline: 18px; }
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-sidebar__brand,
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-nav__label,
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-nav__text,
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-context,
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-status,
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-back-link span { display: initial; }
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-app-nav a,
  body.yobi-hosted[data-yobi-shell="collapsed"] .yobi-back-link { justify-content: initial; padding-inline: 10px; }
  .yobi-mobile-toggle { position: fixed; z-index: 40; top: 13px; left: 13px; display: inline-grid; background: rgba(250,247,243,.94); box-shadow: 0 2px 12px rgba(36,29,21,.12); }
  .yobi-shell-scrim { position: fixed; z-index: 45; inset: 0; background: rgba(31,31,31,.22); }
  body.yobi-hosted[data-yobi-mobile-open="true"] .yobi-shell-scrim { display: block; }
  body.yobi-hosted .shell,body.yobi-hosted .index-shell,body.yobi-hosted .footer { width: min(calc(100% - 28px), 1420px); }
  body.yobi-hosted .shell { padding-top: 36px; }
  body.yobi-hosted .index-shell { padding-top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  body.yobi-hosted, .yobi-app-sidebar, .yobi-app-nav a { transition: none; }
}
