/* Workspace (studio/home): the documents saved in the account, as cards with a preview. */
.hm-body { min-height: 100vh; }
.hm-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 53px); }
.hm-side { border-right: 1px solid var(--border); background: var(--surface-1); padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.hm-ws { padding: 4px 8px 8px; } .hm-ws b { display: block; font-size: 14px; font-weight: 600; } .hm-ws small { color: var(--text-secondary); font-size: 12px; }
.hm-create { position: relative; }
.hm-create__btn { width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); border-radius: 9px; padding: 9px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.hm-create__btn span[aria-hidden] { font-size: 18px; line-height: 1; }
.hm-create__menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); padding: 6px; }
.hm-create__menu a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--text-primary); text-decoration: none; font-size: 13.5px; } .hm-create__menu a:hover { background: var(--surface-2); }
.hm-nav { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-nav button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.hm-nav button:hover { background: var(--surface-2); } .hm-nav button[aria-current="page"] { background: #e6ecf8; color: #0a1f5c; font-weight: 600; }
.hm-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hm-nav__sep { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.hm-usage { margin: auto 8px 0; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.hm-plans { margin: 0 8px; font-size: 13px; font-weight: 600; color: #1f5fd6; text-decoration: none; }
.hm-main { padding: 24px 28px 40px; min-width: 0; }
.hm-h { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.hm-note { margin: -8px 0 16px; font-size: 13px; color: var(--text-secondary); }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.hm-card { position: relative; background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.hm-card:hover { box-shadow: var(--shadow); }
.hm-card__open { display: block; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.hm-card__img { aspect-ratio: 16 / 9; background: var(--surface-2) center / cover no-repeat; border-bottom: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.hm-card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.hm-card__img svg { width: 40px; height: 40px; fill: none; stroke: #9aa6ba; stroke-width: 1.5; }
.hm-card__body { padding: 10px 12px 12px; }
.hm-card__title { font-size: 14px; font-weight: 600; margin: 0 0 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hm-card__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.hm-card__meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.hm-card__pub { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 9px; background: #e6f6ea; color: #0b7a2e; }
.hm-card__more { position: absolute; right: 8px; bottom: 8px; border: 0; background: transparent; color: var(--text-secondary); border-radius: 6px; width: 28px; height: 26px; cursor: pointer; font-size: 18px; line-height: 1; }
.hm-card__more:hover { background: var(--surface-2); color: var(--text-primary); }
.hm-pop { position: absolute; right: 8px; bottom: 38px; z-index: 30; min-width: 190px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); padding: 6px; }
.hm-pop button, .hm-pop a { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 13px; padding: 7px 9px; border-radius: 7px; color: var(--text-primary); cursor: pointer; text-decoration: none; }
.hm-pop button:hover, .hm-pop a:hover { background: var(--surface-2); } .hm-pop .is-danger { color: #b42318; }
.hm-empty { grid-column: 1 / -1; color: var(--text-secondary); font-size: 14px; padding: 40px 0; text-align: center; }
.hm-msg { grid-column: 1 / -1; font-size: 13px; color: #b42318; }
@media (max-width: 760px) {
  .hm-app { grid-template-columns: minmax(0, 1fr); }
  .hm-side { border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .hm-nav { flex-direction: row; flex-wrap: wrap; } .hm-nav button { width: auto; padding: 6px 10px; } .hm-nav__sep { border: 0; margin: 0; padding: 0; }
  .hm-usage { margin: 0 8px; } .hm-main { padding: 16px; } .hm-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}
