/* Marco del espacio personal, con las mismas medidas y colores que la web pública. */
body.study-space {
  --study-width: 1184px;
  --study-gutter: clamp(16px, 4vw, 48px);
  color: var(--ev-ink);
  font-family: VisuEditorial, system-ui, sans-serif;
}
.study-space .main { margin: 0; min-height: 66vh; min-width: 0; }
.study-space .content, .study-space .study-header-inner {
  width: 100%;
  max-width: var(--study-width);
  margin-inline: auto;
  padding-inline: var(--study-gutter);
}
.study-space .content { padding-block: clamp(26px,4vw,52px); }
.study-space .content:focus { outline: none; }
.study-space .topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: block;
  height: auto;
  padding: 0;
  border-bottom: 1px solid var(--ev-line);
  background: #fff;
}
.study-space .study-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: clamp(62px,7vw,80px);
}
.study-space :is(.topbar,.sidebar,.site-footer) .brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(5px,1vw,8px);
  width: max-content;
  margin: 0;
  color: #111;
  font: 750 clamp(26px,3vw,38px)/1 VisuEditorial,system-ui,sans-serif;
  letter-spacing: -.055em;
  white-space: nowrap;
  text-decoration: none;
}
.study-space .brand img { width: clamp(32px,4vw,46px); height: auto; flex: none; }
.study-space .top-right { display: flex; align-items: center; gap: clamp(4px,1vw,12px); min-width: 0; }
.study-space .top-right :is(.account-menu>summary,.study-home) {
  display: flex;
  justify-content: center;
  align-items: center;
  width: clamp(84px,10vw,116px);
  height: 38px;
  min-height: 0;
  padding: 0 9px;
  border: 1px solid var(--ev-blue);
  border-radius: 12px;
  font: 650 13px/1.15 system-ui,sans-serif;
  text-decoration: none;
}
.study-space .account-menu>summary { color: var(--ev-blue); }
.study-space .top-right .account-name { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.study-space .account-menu>summary svg { width: 15px; height: 15px; }
.study-space .account-menu>summary:hover, .study-space .account-dropdown a:hover { background: var(--ev-light); }
.study-space .study-home { background: var(--ev-blue); color: white; }
.study-space .study-home:hover { background: #183994; }
.study-space :is(.mobile-menu,.mobile-close) {
  position: static;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: white;
  color: #111;
  cursor: pointer;
  padding: 0;
}
.study-space :is(.mobile-menu,.mobile-close) svg { width: 26px; height: 26px; stroke-width: 2; }
.study-space .sidebar {
  width: min(320px, calc(100vw - 36px));
  padding: 18px 16px;
  z-index: 90;
  border: none;
  visibility: hidden;
  transform: translateX(-101%);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform .2s ease, visibility .2s;
}
.study-space .sidebar.is-open { visibility: visible; transform: none; }
.study-space .mobile-overlay:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 85; background: #14223870; }
body.study-space.study-menu-open { overflow: hidden; }
.study-space .drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.study-space .side-label { margin: 0 12px 10px; color: var(--ev-blue); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.study-space .sidebar .nav { gap: 2px; }
.study-space .sidebar .nav :is(button, a), .study-space .sidebar .source-link {
  min-height: 44px;
  width: 100%;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ev-ink);
  font: 600 15px/1.3 VisuEditorial,system-ui,sans-serif;
  border-radius: 8px;
}
.study-space .sidebar .nav a { text-decoration: none; }
.study-space .sidebar .nav :is(button, a):hover, .study-space .sidebar .source-link:hover { background: var(--ev-light); }
.study-space .sidebar .nav button.active { color: var(--ev-blue); box-shadow: inset 3px 0 var(--ev-blue); }
.study-space .sidebar :is(.source-link svg,.study-lock svg) { color: var(--ev-blue); }
.study-space .sidebar .side-bottom { margin-top: 16px; border-top: 1px solid var(--ev-line); padding-top: 12px; }
.study-space .sidebar .demo-pill { display: inline-flex; margin: 8px 12px; padding: 5px 10px; font-size: 12px; letter-spacing: 0; color: var(--ev-navy); background: var(--ev-light); border: 0; }
.study-space .study-credits { margin: 32px 0 0; color: #526175; font-size: 13px; }
.study-space .study-credits a, .study-space .site-footer .developer-credit a { color: var(--ev-blue); }
.study-space .study-skip { position: fixed; left: 12px; top: -6rem; z-index: 95; background: #fff; padding: 10px; }
.study-space .study-skip:focus { top: 8px; }
.study-space .site-footer { padding: clamp(32px,5vw,55px) var(--study-gutter) 20px; }
.study-space .footer-inner,.study-space .footer-bottom { max-width: 1120px; margin-inline: auto; }
.study-space .footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(18px,4vw,40px); }
.study-space .footer-inner>div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.study-space .footer-inner>div>strong { font-size: 14px; }
.study-space .footer-inner a:not(.brand) { font-size: 13px; line-height: 1.5; text-decoration: none; color: #334357; }
.study-space .footer-inner a:hover { text-decoration: underline; }
.study-space .footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--ev-line); font-size: 12px; color: #526175; }
.study-space .loading { color: var(--ev-blue); min-height: 65vh; }
@media (max-width: 700px) {
  .study-space .top-right .account-menu>summary svg { display: none; }
  .study-space .top-right :is(.account-menu>summary,.study-home) { width: clamp(68px,20vw,90px); font-size: 12px; height: 36px; padding-inline: 6px; gap: 3px; }
  .study-space .mobile-menu { width: 36px; }
  .study-space .footer-inner { grid-template-columns: 1fr 1fr; }
  .study-space .footer-inner>div:first-child { grid-column: 1/-1; }
}
@media (max-width: 360px) {
  .study-space .study-header-inner { padding-inline: 10px; gap: 4px; }
  .study-space .top-right { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { .study-space .sidebar { transition: none; } }
