.q-account-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px clamp(20px, 5vw, 64px) 22px;
  color: #2b3931;
  background:
    linear-gradient(90deg, #eef2ea 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(#eef2ea 1px, transparent 1px) 0 0 / 48px 48px,
    #f8f7f2;
}
.q-account-brand { display: inline-flex; align-items: center; gap: 14px; width: fit-content; color: #52665a; text-decoration: none !important; }
.q-account-brand img { width: 118px; height: auto; }
.q-account-brand span { padding-left: 14px; border-left: 1px solid #c9d1c7; color: #7d897f; font-size: 11px; letter-spacing: .08em; }
.q-account-panel {
  align-self: center;
  justify-self: center;
  width: min(460px, 100%);
  margin: 42px 0 56px;
  padding: 30px;
  border: 1px solid #d8dfd4;
  border-radius: 10px;
  background: #fffefb;
  box-shadow: 0 18px 50px #263b2c12;
}
.q-account-heading { position: relative; padding-bottom: 22px; border-bottom: 1px solid #e6e9e1; }
.q-account-kicker { display: block; margin-bottom: 8px; color: #7a8a75; font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.q-account-heading h1 { margin: 0; font-family: var(--q-serif); color: #2e4938; font-size: 25px; font-weight: 600; line-height: 1.5; }
.q-account-heading p { margin: 8px 0 0; color: #758077; font-size: 12px; line-height: 1.8; }
.q-account-back { position: absolute; top: 18px; right: 0; padding: 4px; color: #657866; font-size: 11px; }
.q-account-form { display: grid; gap: 14px; margin-top: 22px; }
.q-account-field { display: grid; gap: 7px; min-width: 0; color: #536356; font-size: 12px; font-weight: 550; }
.q-account-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #d7ded2;
  border-radius: 7px;
  padding: 0 12px;
  color: #25382c;
  background: #fff;
  font-size: 14px;
  outline: 0;
}
.q-account-field input:focus { border-color: #6d8d72; box-shadow: 0 0 0 3px #dce8dd; }
.q-account-primary,
.q-account-secondary {
  min-height: 42px;
  border-radius: 7px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}
.q-account-primary { margin-top: 4px; border: 1px solid #255541 !important; background: #255541 !important; color: #fff; }
.q-account-primary:hover:not(:disabled) { background: #1c4937 !important; }
.q-account-secondary { flex: none; align-self: end; height: 44px; border: 1px solid #bccbbd !important; background: #f5f8f2 !important; color: #31523e; }
.q-account-hint { color: #7b857c; font-size: 11px; line-height: 1.7; }
.q-account-feedback { margin: 18px 0 -2px; padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.7; }
.q-account-feedback.is-error { border: 1px solid #e3c8c0; background: #fff5f1; color: #8f4134; }
.q-account-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.q-account-form-links { display: flex; justify-content: space-between; gap: 12px; padding-top: 4px; }
.q-account-form-links button { padding: 0; color: #56725b; font-size: 11px; }
.q-account-form-links button:hover { color: #2f5b40; text-decoration: underline; text-underline-offset: 3px; }
.q-account-spinner { display: inline-block; width: 13px; height: 13px; margin-right: 8px; border: 2px solid #b7c5b9; border-top-color: currentColor; border-radius: 50%; vertical-align: -2px; animation: q-account-spin .8s linear infinite; }
@keyframes q-account-spin { to { transform: rotate(360deg); } }
.q-account-footer { display: flex; justify-content: space-between; gap: 18px; color: #818c83; font-size: 10px; line-height: 1.7; }

.q-account-trigger { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 190px; padding: 4px 7px 4px 4px; border: 1px solid #dfe5da; border-radius: 18px; background: #fff; color: #4e6353; }
.q-account-trigger:hover { border-color: #adbeac; background: #f8faf6; }
.q-account-avatar { display: grid; place-items: center; flex: none; width: 25px; height: 25px; border-radius: 50%; background: #e6efe4; color: #365d44; font-family: var(--q-serif); font-size: 12px; font-weight: 700; }
.q-account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.q-account-menu {
  position: absolute;
  z-index: 80;
  top: 54px;
  right: 18px;
  width: min(250px, calc(100vw - 36px));
  padding: 8px;
  border: 1px solid #dce3d8;
  border-radius: 8px;
  background: #fffefa;
  box-shadow: 0 12px 32px #1c2d211c;
}
.q-account-menu-user { display: grid; gap: 3px; padding: 9px 10px 11px; border-bottom: 1px solid #eceee8; }
.q-account-menu-user strong { color: #334c3a; font-size: 12px; }
.q-account-menu-user span { color: #718075; font-size: 10px; }
.q-account-menu-user small { color: #8a958c; font-size: 10px; font-variant-numeric: tabular-nums; }
.q-account-menu-note { padding: 9px 10px; color: #7c887e; font-size: 10px; line-height: 1.7; }
#scoping-app .q-account-menu > button { width: 100%; margin-top: 5px; padding: 9px 10px; border-radius: 5px; color: #5f7363; text-align: left; font-size: 11px; }
#scoping-app .q-account-menu > button:hover { background: #f0f4ed; }
.q-canvas-stage.is-library { overflow: auto; background: #faf9f5; }
.q-canvas-stage.is-library > .q-library-page { min-height: 100%; }
.q-canvas-header .q-account-trigger { flex: none; }
.q-canvas-publication {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d9e0d5 !important;
  border-radius: 6px;
  background: #fff !important;
  color: #637667;
  font-size: 10px;
  white-space: nowrap;
}
.q-canvas-publication .q-icon { width: 14px; height: 14px; }
.q-canvas-publication.is-public { border-color: #b8cfb8 !important; background: #edf5eb !important; color: #3e6849; }
.q-canvas-community-title { color: #536a59; font-size: 12px; font-weight: 600; white-space: nowrap; }

.q-library-page {
  min-height: 100dvh;
  padding: 36px max(22px, calc((100vw - 1180px) / 2)) 72px;
  background: #faf9f5;
  color: #2e3c33;
}
.q-library-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid #dfe3da; }
.q-library-eyebrow { color: #738171; font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.q-library-header h1 { margin: 8px 0 9px; font-family: var(--q-serif); color: #2d4937; font-size: clamp(28px, 3vw, 38px); font-weight: 600; line-height: 1.3; }
.q-library-header p { max-width: 680px; margin: 0; color: #727d74; font-size: 12px; line-height: 1.9; }
.q-library-summary { display: flex; flex: none; gap: 20px; padding-bottom: 4px; }
.q-library-summary span { display: grid; gap: 2px; min-width: 56px; color: #7b867d; font-size: 10px; }
.q-library-summary strong { color: #344f3d; font-family: var(--q-serif); font-size: 23px; font-weight: 600; }
.q-library-error { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; padding: 11px 14px; border: 1px solid #e2c6be; border-radius: 6px; background: #fff5f2; color: #8d4336; font-size: 12px; }
.q-library-error button { color: #7b4138; font-size: 11px; text-decoration: underline; }
.q-library-section { padding-top: 30px; }
.q-library-section > header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.q-library-section h2 { margin: 0 0 4px; color: #344c3a; font-size: 16px; font-weight: 650; }
.q-library-section header p { margin: 0; color: #7e8980; font-size: 11px; line-height: 1.7; }
.q-library-new { min-height: 34px; padding: 0 12px; border: 1px solid #b9c8b7 !important; border-radius: 6px; background: #fff !important; color: #44634c; font-size: 11px; }
.q-library-count { color: #778378; font-size: 11px; white-space: nowrap; }
.q-library-own-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.q-library-own-item { display: grid; gap: 7px; min-width: 0; min-height: 108px; padding: 14px; border: 1px solid #dfe4db; border-radius: 8px; background: #fffefa; text-align: left; }
.q-library-own-item:hover { border-color: #9fb19e; background: #f8faf5; }
.q-library-own-item strong { color: #334a39; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.q-library-own-item small { color: #7b867d; font-size: 10px; line-height: 1.6; }
.q-library-visibility { width: fit-content; padding: 2px 6px; border-radius: 4px; font-size: 9px; font-weight: 600; }
.q-library-visibility.is-private { background: #eef0eb; color: #697469; }
.q-library-visibility.is-public { background: #e7f1e5; color: #456e4c; }
.q-library-public { border-top: 1px solid #e1e5dd; }
.q-library-public-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.q-library-public-item { display: grid; gap: 8px; min-width: 0; padding: 19px 20px; border: 1px solid #dce2d8; border-radius: 8px; background: #fffefa; color: inherit; text-decoration: none !important; transition: border-color .15s ease, transform .15s ease; }
.q-library-public-item:hover { border-color: #91a58f; transform: translateY(-1px); }
.q-library-public-meta { color: #7e8b80; font-size: 10px; }
.q-library-public-item h3 { margin: 0; color: #2f4938; font-family: var(--q-serif); font-size: 18px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.q-library-public-item p { display: -webkit-box; margin: 0; overflow: hidden; color: #68756b; font-size: 12px; line-height: 1.85; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.q-library-public-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 9px; border-top: 1px solid #eff1eb; color: #839085; font-size: 9px; }
.q-library-empty { display: grid; justify-items: start; gap: 5px; min-height: 106px; padding: 22px; border: 1px dashed #cfd8cb; border-radius: 8px; color: #7f8b81; font-size: 11px; line-height: 1.7; background: #f9faf6; }
.q-library-empty strong { color: #5e7063; font-size: 12px; }
.q-library-loading { display: flex; align-items: center; min-height: 90px; color: #778579; font-size: 11px; }

.q-public-report-shell { min-height: 100dvh; background: #faf9f6; }
.q-public-report-header { position: sticky; z-index: 60; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; padding: 8px max(18px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #e5e4db; background: #faf9f6ed; backdrop-filter: blur(16px); }
.q-public-report-brand { display: flex; align-items: center; gap: 13px; min-width: 0; color: #58665c; text-decoration: none !important; }
.q-public-report-brand img { width: 96px; height: auto; }
.q-public-report-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.q-public-report-actions { display: flex; gap: 7px; flex: none; }
.q-public-report-actions :is(a, button) { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid #d7ded4 !important; border-radius: 6px; background: #fffefa !important; color: #536a59; font-size: 10px; text-decoration: none !important; }
.q-public-report-main { width: min(100%, 1040px); margin: 0 auto; }
.q-public-report-main .q-report-reading { max-width: 900px !important; margin-inline: auto !important; }
.q-public-report-state { display: grid; place-items: center; min-height: calc(100dvh - 58px); padding: 24px; color: #55665a; text-align: center; }
.q-public-report-state div { display: grid; gap: 8px; max-width: 520px; }
.q-public-report-state h1 { margin: 0; font-family: var(--q-serif); color: #344b3b; font-size: 26px; }
.q-public-report-state p { margin: 0; color: #77837a; font-size: 12px; line-height: 1.8; }

@media (max-width: 880px) {
  .q-library-header { align-items: start; flex-direction: column; }
  .q-library-summary { padding-top: 2px; }
  .q-library-own-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-canvas-header .q-mode-switch button { min-width: 56px; padding-inline: 9px !important; }
  .q-canvas-header .q-account-name { display: none; }
}
@media (max-width: 620px) {
  .q-account-page { padding: 18px 14px 16px; }
  .q-account-brand span { display: none; }
  .q-account-panel { margin: 24px 0 34px; padding: 22px 18px; }
  .q-account-heading h1 { font-size: 22px; }
  .q-account-back { top: 14px; }
  .q-account-footer { flex-direction: column; gap: 3px; }
  .q-account-code-row { grid-template-columns: 1fr; }
  .q-account-secondary { width: 100%; }
  .q-library-page { padding: 24px 14px 52px; }
  .q-library-header h1 { font-size: 29px; }
  .q-library-summary { width: 100%; justify-content: space-between; gap: 8px; }
  .q-library-own-grid,
  .q-library-public-grid { grid-template-columns: 1fr; }
  .q-library-section > header { align-items: start; }
  .q-library-public-item { padding: 16px; }
  .q-account-name { display: none; }
  .q-account-trigger { padding-right: 4px; }
  .q-public-report-header { padding-inline: 12px; }
  .q-public-report-brand span { display: none; }
  .q-public-report-actions a:first-child { display: none; }
  .q-canvas-header .q-mode-switch button { min-width: auto; padding-inline: 7px !important; font-size: 10px; }
  .q-canvas-header .q-canvas-community-title,
  .q-canvas-header .q-canvas-project-switch,
  .q-canvas-header > .q-divider { display: none; }
  .q-canvas-header .q-canvas-publication span { display: none; }
  .q-canvas-header .q-canvas-publication { padding-inline: 7px; }
  .q-canvas-header .q-account-trigger { display: none; }
}
