:root {
  --paper: #f4f3ea;
  --ink: #29372c;
  --muted: #7a8178;
  --green: #365b42;
  --border: #dfe2d5;
  --white: #fffef9;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { color: #2b3b2f; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 28px 18px 18px;
  overflow-y: auto;
  background: #fbfaf4;
  border-right: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 38px;
  color: #304936;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.brand img {
  width: 35px;
  height: 35px;
  border-radius: 9px;
}

.brand-dot { color: #a36c42; }

.workspace-label {
  margin: 0 14px 15px;
  color: #8b917d;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.4px;
}

.sidebar nav { display: grid; }

.nav-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  margin-bottom: 5px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #647166;
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link svg { flex-shrink: 0; stroke-width: 1.65; }
.nav-link:hover { background: #eff1e7; color: #314f39; }
.nav-link.active { background: #e8eddf; color: #2e5138; font-weight: 650; }

.nav-new {
  margin-left: auto;
  padding: 3px 5px;
  border-radius: 3px;
  background: #f0e8db;
  color: #865d37;
  font-size: 8px;
  letter-spacing: 0.7px;
}

.sidebar-rule {
  margin: 24px 14px;
  border-top: 1px solid #e7e5d9;
}

.sidebar-bottom { margin-top: auto; padding-top: 28px; }

.sidebar-note {
  margin: 0 4px 15px;
  padding: 17px 15px;
  border: 1px solid #e3e4d8;
  border-radius: 7px;
  background: #f1f2e7;
}

.little-spark {
  display: block;
  margin-bottom: 8px;
  color: #8b9a68;
  font-size: 25px;
}

.sidebar-note strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.sidebar-note p { margin: 7px 0 11px; color: #778174; font-size: 11px; }

.sidebar-note a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #365b42;
  font-size: 11px;
  text-decoration: none;
}

.sidebar-bottom .nav-link { gap: 9px; padding-left: 11px; font-size: 10px; }
.sidebar-foot { padding: 10px 14px 0; color: #959888; font-size: 8px; letter-spacing: 1.4px; }

.main-shell {
  width: calc(100% - 252px);
  min-height: 100vh;
  margin-left: 252px;
}

.topbar {
  position: relative;
  z-index: 15;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 54px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 254, 249, 0.94);
}

.app-shell-blueprint .topbar { position: sticky; top: 0; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #788276;
  font-size: 12px;
}

.breadcrumbs strong { color: #344b39; font-weight: 600; }
.breadcrumbs .slash { color: #9ba493; }
.breadcrumbs > a { color: #788276; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs > a:hover { color: #344b39; }

.topbar-right { display: flex; align-items: center; gap: 20px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button.secondary { border-color: #d9dfd1; background: #fffef9; color: #3b5b42; }
.button.secondary:hover { background: #f0f2e9; }
.button.small { min-height: 34px; padding: 7px 12px; font-size: 11px; }

.mobile-menu { display: none; }

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dce0d5;
  border-radius: 5px;
  background: #fffef8;
  color: #566b52;
}

.icon-button:hover { background: #e8eddf; color: #365b42; }
.mobile-menu { touch-action: manipulation; }

.sidebar-scrim { display: none; }
.sidebar-scrim:not([hidden]) { display: block; }

.profile-menu { position: relative; }
.profile-menu > summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.profile { color: #344b39; font-size: 12px; }
.avatar { display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid #f5f4eb; border-radius: 50%; background: #e5e8d9; color: #435740; }
.profile-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; min-width: 230px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); box-shadow: 0 8px 24px #29372c14; }
.profile-account { overflow-wrap: anywhere; color: #59665c; font-size: 12px; }
.profile-signout { margin-top: 10px; color: #365b42; font-size: 12px; }

.page-footer {
  display: flex;
  max-width: 1480px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 25px auto 0;
  padding: 18px clamp(24px, 4vw, 58px);
  border-top: 1px solid var(--border);
  color: #747d71;
  font-size: 11px;
}

.page-footer > span { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.page-footer .footer-links { display: flex; flex-wrap: wrap; gap: 17px; font-size: 11px; }
.page-footer a:hover { color: #365b42; }

@media (max-width: 1200px) {
  .sidebar { width: 252px; padding-right: 18px; padding-left: 18px; }
  .main-shell { width: calc(100% - 252px); margin-left: 252px; }
}

@media (max-width: 1120px) {
  .sidebar { width: 226px; }
  .main-shell { margin-left: 226px; width: calc(100% - 226px); }
}

@media (max-width: 900px) {
  .sidebar { width: 252px; padding-right: 18px; padding-left: 18px; transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main-shell { width: 100%; margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .sidebar-scrim:not([hidden]) { position: fixed; inset: 0; z-index: 29; background: #1f2b2280; }
}

@media (max-width: 700px) {
  .topbar { height: 60px; padding: 0 18px; }
  .breadcrumbs { gap: 9px; }
  .topbar-right { gap: 9px; }
  .profile > span:nth-child(2), .profile > svg { display: none; }
  .page-footer { align-items: flex-start; flex-direction: column; padding: 17px 18px; }
}

@media (max-width: 390px) {
  .topbar { padding: 0 14px; }
  .breadcrumbs > span:first-of-type, .breadcrumbs .slash { display: none; }
}
